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,25 +0,0 @@
|
|
|
1
|
-
// A conventional-commit draft from the staged changes alone: deterministic, no guessing beyond paths.
|
|
2
|
-
import { scopeOf, targetOf } from "./scopes.mjs";
|
|
3
|
-
|
|
4
|
-
const ONLY = { docs: "docs", tests: "test", ci: "ci", build: "build" };
|
|
5
|
-
const MARK = { added: "A", modified: "M", deleted: "D" };
|
|
6
|
-
|
|
7
|
-
export function composeMessage(staged) {
|
|
8
|
-
if (!staged.length) return null;
|
|
9
|
-
const scopes = [...new Set(staged.map(([path]) => scopeOf(path)))];
|
|
10
|
-
const states = new Set(staged.map(([, state]) => state));
|
|
11
|
-
const addsCode = staged.some(([path, state]) => state === "added" && path.startsWith("src/"));
|
|
12
|
-
const type = scopes.length === 1 && ONLY[scopes[0]] ? ONLY[scopes[0]] : addsCode ? "feat" : "chore";
|
|
13
|
-
const scope = scopes.length <= 2 ? `(${scopes.join(",")})` : "";
|
|
14
|
-
const verb = states.size === 1 ? { added: "add", deleted: "remove", modified: "update" }[[...states][0]] : "update";
|
|
15
|
-
const targets = [...new Set(staged.map(([path]) => targetOf(path)))];
|
|
16
|
-
const named = targets.slice(0, 3).join(", ") + (targets.length > 3 ? ` +${targets.length - 3} more` : "");
|
|
17
|
-
const header = `${type}${scope}: ${verb} ${named}`.slice(0, 100);
|
|
18
|
-
const body = staged.slice(0, 40).map(([path, state]) => `${MARK[state]} ${path}`);
|
|
19
|
-
if (staged.length > 40) body.push(`… ${staged.length - 40} more files`);
|
|
20
|
-
return `${header}\n\n${body.join("\n")}\n`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const composeDraft = (context) => {
|
|
24
|
-
context.message = composeMessage(context.staged);
|
|
25
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import GitClient from "../../bridge/git-client/_index.mjs";
|
|
2
|
-
|
|
3
|
-
export const readStaged = async (context) => {
|
|
4
|
-
const git = new GitClient();
|
|
5
|
-
context.repo = (await git.root(context.options.cwd ?? process.cwd())) ?? process.cwd();
|
|
6
|
-
context.staged = await git.staged(context.repo);
|
|
7
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Which part of the project a path belongs to: the scope of a conventional commit.
|
|
2
|
-
const BUILD = new Set([
|
|
3
|
-
"package.json",
|
|
4
|
-
"package-lock.json",
|
|
5
|
-
"Taskfile.yml",
|
|
6
|
-
"vitest.config.mjs",
|
|
7
|
-
"commitlint.config.mjs",
|
|
8
|
-
"release.config.mjs",
|
|
9
|
-
"biome.json",
|
|
10
|
-
"Dockerfile",
|
|
11
|
-
"compose.yaml",
|
|
12
|
-
".dockerignore",
|
|
13
|
-
"mkdocs.yml",
|
|
14
|
-
".readthedocs.yaml",
|
|
15
|
-
".gitignore",
|
|
16
|
-
]);
|
|
17
|
-
|
|
18
|
-
export function scopeOf(path) {
|
|
19
|
-
const [top, part] = path.split("/");
|
|
20
|
-
if (top === "src") return ["main.ts", "cli.mjs", "index.mjs"].includes(part) ? "core" : part;
|
|
21
|
-
if (top === "tests") return "tests";
|
|
22
|
-
if (top === "docs") return "docs";
|
|
23
|
-
if (top === ".github") return "ci";
|
|
24
|
-
if (top === "resources") return "resources";
|
|
25
|
-
if (["skills", "template", ".claude-plugin"].includes(top)) return "skills";
|
|
26
|
-
if (top === ".husky" || BUILD.has(path)) return "build";
|
|
27
|
-
return "repo";
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// the thing a path is about: src/procedures/closing/x.mjs → closing; docs/glossary/mode.md → mode
|
|
31
|
-
export function targetOf(path) {
|
|
32
|
-
const parts = path.split("/");
|
|
33
|
-
const base = parts.at(-1).replace(/\.[^.]+$/, "");
|
|
34
|
-
if (parts[0] === "src" && parts.length > 3) return parts[2];
|
|
35
|
-
return ["_index", "index", "class", "README", "exec", "help"].includes(base) && parts.length > 1
|
|
36
|
-
? parts.at(-2)
|
|
37
|
-
: base;
|
|
38
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// What Skryba reads: the stat of the staged changes, and a trimmed diff
|
|
2
|
-
// (lock files skipped, each file and the whole capped) so it fits a small model.
|
|
3
|
-
import SubprocessRunner from "../../bridge/subprocess-runner/_index.mjs";
|
|
4
|
-
|
|
5
|
-
const SKIP = /(^|\/)(package-lock\.json|uv\.lock|yarn\.lock|pnpm-lock\.yaml)$/;
|
|
6
|
-
|
|
7
|
-
export function stagedDiff(repo, { perFile = 1500, total = 8000 } = {}) {
|
|
8
|
-
const git = new SubprocessRunner();
|
|
9
|
-
const stat = git.try("git", ["diff", "--cached", "--stat"], { cwd: repo }) ?? "";
|
|
10
|
-
const diff = git.try("git", ["diff", "--cached", "-U2", "--no-color"], { cwd: repo }) ?? "";
|
|
11
|
-
let budget = total;
|
|
12
|
-
const parts = diff
|
|
13
|
-
.split(/^(?=diff --git )/m)
|
|
14
|
-
.filter((part) => {
|
|
15
|
-
const path = part.match(/^diff --git a\/(\S+)/)?.[1] ?? "";
|
|
16
|
-
return path && !SKIP.test(path);
|
|
17
|
-
})
|
|
18
|
-
.map((part) => {
|
|
19
|
-
const cut = part.slice(0, Math.max(0, Math.min(perFile, budget)));
|
|
20
|
-
budget -= cut.length;
|
|
21
|
-
return cut.length < part.length ? `${cut}\n… (trimmed)\n` : cut;
|
|
22
|
-
})
|
|
23
|
-
.filter(Boolean);
|
|
24
|
-
return { stat, diff: parts.join("") };
|
|
25
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
|
-
|
|
3
|
-
// prepare-commit-msg: fill the editor only for a plain `git commit`, never over a
|
|
4
|
-
// message given with -m, a merge, a squash or an amend
|
|
5
|
-
const KEEP = new Set(["message", "merge", "squash", "commit"]);
|
|
6
|
-
|
|
7
|
-
export const writeMessage = (context) => {
|
|
8
|
-
const { file, source } = context.options;
|
|
9
|
-
if (!file || !context.message || KEEP.has(source)) return;
|
|
10
|
-
const current = readFileSync(file, "utf8");
|
|
11
|
-
if (current.split("\n").some((line) => line.trim() && !line.startsWith("#"))) return;
|
|
12
|
-
const hint = "# drafted by BOS from the staged changes: edit the type, scope and subject freely\n";
|
|
13
|
-
if (!context.dryRun) writeFileSync(file, context.message + hint + current);
|
|
14
|
-
context.written = file;
|
|
15
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Gathering Protocol
|
|
2
|
-
|
|
3
|
-
Part of PROVISION. Shows the House of Anubis as it is, along three axes:
|
|
4
|
-
|
|
5
|
-
- **children**: the adopted, named residents of `resources/house/children/`,
|
|
6
|
-
with their state (active, resting, frozen) and presence
|
|
7
|
-
- **orders**: groups with a duty, such as RavensArmy (`resources/house/orders/`),
|
|
8
|
-
with local units (ravens) and remote ones
|
|
9
|
-
- **bloodlines**: every served model grouped by releaser, found by following
|
|
10
|
-
its `parent_model` back to the root (`resources/house/bloodlines.json`)
|
|
11
|
-
|
|
12
|
-
Only the list of models is read from ollama; no model is started or prompted,
|
|
13
|
-
so resting residents are never disturbed.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import { listServed } from "./list-served.mjs";
|
|
3
|
-
import { mergeResidents } from "./merge-residents.mjs";
|
|
4
|
-
import { readRegistry } from "./read-registry.mjs";
|
|
5
|
-
|
|
6
|
-
export const gathering = new BOS.Procedure("gathering", [], {
|
|
7
|
-
description: "the House of Anubis: registry merged with what ollama serves",
|
|
8
|
-
})
|
|
9
|
-
.step("read the House registry", readRegistry)
|
|
10
|
-
.step("list served models", listServed)
|
|
11
|
-
.step("merge residents", mergeResidents);
|
|
12
|
-
|
|
13
|
-
export default gathering;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import OllamaLink from "../../bridge/ollama-link/_index.mjs";
|
|
2
|
-
|
|
3
|
-
// what ollama serves right now (names, architectures, parents); listing starts no model.
|
|
4
|
-
// null when ollama is unreachable
|
|
5
|
-
export const listServed = async (context) => {
|
|
6
|
-
const ollama = context.options.ollama ?? new OllamaLink();
|
|
7
|
-
const catalog = await ollama.catalog();
|
|
8
|
-
context.catalog = catalog.length ? catalog : null;
|
|
9
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { groupOf, sameModel } from "../../models/house/groups.mjs";
|
|
2
|
-
|
|
3
|
-
// children and orders with presence, bloodline of each served model, and bloodlines grouped by releaser
|
|
4
|
-
export const mergeResidents = (context) => {
|
|
5
|
-
const catalog = context.catalog ?? [];
|
|
6
|
-
const served = catalog.map((entry) => entry.name);
|
|
7
|
-
const present = (model) => (context.catalog ? served.some((name) => sameModel(name, model)) : null);
|
|
8
|
-
const withPresence = (group) => {
|
|
9
|
-
const claimed = served
|
|
10
|
-
.filter((model) => groupOf([group], model) && !group.members.some((m) => m.model && sameModel(m.model, model)))
|
|
11
|
-
.map((model) => ({ model, kind: "local" }));
|
|
12
|
-
const members = [...group.members, ...claimed].map((member) => ({
|
|
13
|
-
...member,
|
|
14
|
-
state: member.state ?? group.state,
|
|
15
|
-
present: member.kind === "remote" ? null : present(member.model),
|
|
16
|
-
bloodline: member.model && context.catalog ? context.house.bloodlineOf(catalog, member.model) : null,
|
|
17
|
-
}));
|
|
18
|
-
return { ...group, members };
|
|
19
|
-
};
|
|
20
|
-
context.children = context.children.map(withPresence);
|
|
21
|
-
context.orders = context.orders.map(withPresence);
|
|
22
|
-
const lines = {};
|
|
23
|
-
for (const model of served) {
|
|
24
|
-
const { releaser } = context.house.bloodlineOf(catalog, model);
|
|
25
|
-
lines[releaser] ??= [];
|
|
26
|
-
lines[releaser].push(model);
|
|
27
|
-
}
|
|
28
|
-
context.bloodlines = Object.entries(lines)
|
|
29
|
-
.map(([releaser, models]) => ({ releaser, models }))
|
|
30
|
-
.sort((a, b) => b.models.length - a.models.length);
|
|
31
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# Hooking Protocol
|
|
2
|
-
|
|
3
|
-
Git hooks of any repository inside the workshop report to storylines: the
|
|
4
|
-
commit, branch or merge, and where the repository sits
|
|
5
|
-
(`forge / <scope> / <project>`). `bos hooks install` links a repository's
|
|
6
|
-
`post-commit`, `post-checkout` and `post-merge` to `bos hook <name>`.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import loading from "../loading/_index.mjs";
|
|
3
|
-
import locating from "../locating/_index.mjs";
|
|
4
|
-
import { installHooks } from "./install-hooks.mjs";
|
|
5
|
-
import { recordHook } from "./record-hook.mjs";
|
|
6
|
-
|
|
7
|
-
export const hooking = loading.chain(new BOS.Procedure("hooking").step("record hook", recordHook), "hooking");
|
|
8
|
-
export const installingHooks = locating.chain(
|
|
9
|
-
new BOS.Procedure("installing-hooks").step("link hooks", installHooks),
|
|
10
|
-
"installing-hooks",
|
|
11
|
-
);
|
|
12
|
-
export default hooking;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// what each git hook adds to its storyline entry
|
|
2
|
-
import GitClient from "../../bridge/git-client/_index.mjs";
|
|
3
|
-
|
|
4
|
-
const git = new GitClient();
|
|
5
|
-
|
|
6
|
-
export const HOOKS = {
|
|
7
|
-
"post-commit": async (repo) => ({ commit: (await git.log(repo, 1))[0] ?? null }),
|
|
8
|
-
"post-checkout": async (repo) => ({ branch: await git.branch(repo) }),
|
|
9
|
-
"post-merge": async (repo) => ({ head: (await git.log(repo, 1))[0]?.oid ?? null }),
|
|
10
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { chmodSync, existsSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
|
|
4
|
-
import GitClient from "../../bridge/git-client/_index.mjs";
|
|
5
|
-
import { createIfMissing } from "../../core/basic-element.mjs";
|
|
6
|
-
import { CLI } from "../../core/self.mjs";
|
|
7
|
-
import { HOOKS } from "./hooks.mjs";
|
|
8
|
-
|
|
9
|
-
// link a repository's hooks to `bos hook <name>`; someone's own hook is left alone
|
|
10
|
-
export const installHooks = async (context) => {
|
|
11
|
-
const git = new GitClient();
|
|
12
|
-
const root = await git.root(context.env.cwd);
|
|
13
|
-
if (!root) throw new Error("not inside a git repository");
|
|
14
|
-
context.skipped = [];
|
|
15
|
-
// hooks managed elsewhere (e.g. husky sets core.hooksPath): those hooks should call `bos hook <name>` themselves
|
|
16
|
-
const managed = await git.hooksPath(root);
|
|
17
|
-
if (managed) {
|
|
18
|
-
context.managedBy = managed;
|
|
19
|
-
context.skipped.push(`all: core.hooksPath is ${managed}`);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
for (const hook of Object.keys(HOOKS)) {
|
|
23
|
-
const target = join(root, ".git", "hooks", hook);
|
|
24
|
-
if (existsSync(target)) context.skipped.push(target);
|
|
25
|
-
createIfMissing(
|
|
26
|
-
target,
|
|
27
|
-
() => {
|
|
28
|
-
writeFileSync(target, `#!/bin/sh\nexec node "${CLI}" hook ${hook} "$@"\n`);
|
|
29
|
-
chmodSync(target, 0o755);
|
|
30
|
-
},
|
|
31
|
-
context,
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import GitClient from "../../bridge/git-client/_index.mjs";
|
|
2
|
-
import { HOOKS } from "./hooks.mjs";
|
|
3
|
-
|
|
4
|
-
export const recordHook = async (context) => {
|
|
5
|
-
const hook = context.options.hook;
|
|
6
|
-
if (!(hook in HOOKS)) throw new Error(`unhandled hook "${hook}" (known: ${Object.keys(HOOKS).join(", ")})`);
|
|
7
|
-
const repo = (await new GitClient().root(context.env.cwd)) ?? context.env.cwd;
|
|
8
|
-
const storylines = context.workshop.storylines.ensure(context);
|
|
9
|
-
context.event = storylines.record(
|
|
10
|
-
{ event: "git-hook", hook, repo, place: context.workshop.placeOf(repo), ...(await HOOKS[hook](repo)) },
|
|
11
|
-
context,
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import loading from "../loading/_index.mjs";
|
|
3
|
-
|
|
4
|
-
const own = new BOS.Procedure("inspecting").step("inspect tree", (context) => {
|
|
5
|
-
context.tree = context.workshop.inspect();
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export const inspecting = loading.chain(own, "inspecting");
|
|
9
|
-
export default inspecting;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import locating from "../locating/_index.mjs";
|
|
3
|
-
import { loadConfig } from "./load-config.mjs";
|
|
4
|
-
import { validateMode } from "./validate-mode.mjs";
|
|
5
|
-
import { validateRole } from "./validate-role.mjs";
|
|
6
|
-
|
|
7
|
-
const own = new BOS.Procedure("loading", [], {
|
|
8
|
-
description: "load workshop.json over the defaults and validate role and mode",
|
|
9
|
-
})
|
|
10
|
-
.step("load workshop config", loadConfig)
|
|
11
|
-
.step("validate host role", validateRole)
|
|
12
|
-
.step("validate mode", validateMode);
|
|
13
|
-
|
|
14
|
-
export const loading = locating.chain(own, "loading");
|
|
15
|
-
export default loading;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
|
|
4
|
-
import { RESOURCES } from "../../core/self.mjs";
|
|
5
|
-
import Workshop from "../../models/workshop/class.mjs";
|
|
6
|
-
|
|
7
|
-
// resources defaults, overridden by .BOS/workshop.json; a null there means "not set", so the default applies
|
|
8
|
-
export const loadConfig = (context) => {
|
|
9
|
-
const defaults = JSON.parse(readFileSync(join(RESOURCES, "workshop.default.json"), "utf8"));
|
|
10
|
-
context.workshop = new Workshop(context.workshopRoot);
|
|
11
|
-
const own = Object.fromEntries(
|
|
12
|
-
Object.entries(context.workshop.system.readJSON("workshop.json", {})).filter(([, value]) => value !== null),
|
|
13
|
-
);
|
|
14
|
-
context.config = { ...defaults, ...own };
|
|
15
|
-
context.defaulted = Object.keys(defaults).filter((key) => !(key in own) && defaults[key] !== null);
|
|
16
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MODES } from "../../models/workshop/modes.mjs";
|
|
2
|
-
|
|
3
|
-
export const validateMode = (context) => {
|
|
4
|
-
const { mode } = context.config;
|
|
5
|
-
if (mode && !(mode in MODES)) {
|
|
6
|
-
throw new Error(`unknown mode "${mode}" in workshop.json (known: ${Object.keys(MODES).join(", ")})`);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HOST_ROLES } from "../../models/workshop/host-roles.mjs";
|
|
2
|
-
|
|
3
|
-
export const validateRole = (context) => {
|
|
4
|
-
const { role } = context.config;
|
|
5
|
-
if (role && !(role in HOST_ROLES)) {
|
|
6
|
-
throw new Error(`unknown host role "${role}" in workshop.json (known: ${Object.keys(HOST_ROLES).join(", ")})`);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# Locating Protocol
|
|
2
|
-
|
|
3
|
-
Reads who, where and when (host, user, home, cwd, unixusat), then finds the
|
|
4
|
-
active workshop. The first rule that answers wins: `--workshop`,
|
|
5
|
-
`$BOS_WORKSHOP`, the nearest parent `__WORKSHOP`, the workshop BOS is installed
|
|
6
|
-
in, `~/__WORKSHOP`. Finally it finds where BOS itself sits. Every other protocol starts here.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import { locateSelf } from "./locate-self.mjs";
|
|
3
|
-
import { locateWorkshop } from "./locate-workshop.mjs";
|
|
4
|
-
import { readEnvironment } from "./read-environment.mjs";
|
|
5
|
-
|
|
6
|
-
export const locating = new BOS.Procedure("locating", [], {
|
|
7
|
-
description: "read the machine, find the active workshop and BOS itself",
|
|
8
|
-
})
|
|
9
|
-
.step("read environment", readEnvironment)
|
|
10
|
-
.step("locate workshop", locateWorkshop)
|
|
11
|
-
.step("locate self", locateSelf);
|
|
12
|
-
|
|
13
|
-
export default locating;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CLI, REPO_ROOT, VERSION } from "../../core/self.mjs";
|
|
2
|
-
import { placeOf } from "../../models/workshop/locate.mjs";
|
|
3
|
-
|
|
4
|
-
// BOS is a project like any other: where does it sit in the workshop?
|
|
5
|
-
export const locateSelf = (context) => {
|
|
6
|
-
context.self = { root: REPO_ROOT, cli: CLI, version: VERSION, place: placeOf(REPO_ROOT, context.workshopRoot) };
|
|
7
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { REPO_ROOT } from "../../core/self.mjs";
|
|
2
|
-
import { listWorkshops, resolveWorkshop } from "../../models/workshop/locate.mjs";
|
|
3
|
-
|
|
4
|
-
export const locateWorkshop = (context) => {
|
|
5
|
-
const { root, source } = resolveWorkshop({
|
|
6
|
-
explicit: context.options?.workshop,
|
|
7
|
-
variable: process.env.BOS_WORKSHOP,
|
|
8
|
-
cwd: context.env.cwd,
|
|
9
|
-
self: REPO_ROOT,
|
|
10
|
-
home: context.env.home,
|
|
11
|
-
});
|
|
12
|
-
context.workshopRoot = root;
|
|
13
|
-
context.workshopSource = source;
|
|
14
|
-
context.workshops = listWorkshops(context.env.home);
|
|
15
|
-
if (!context.workshops.includes(root)) context.workshops.unshift(root);
|
|
16
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { homedir, hostname, userInfo } from "node:os";
|
|
2
|
-
|
|
3
|
-
export const readEnvironment = (context) => {
|
|
4
|
-
context.env = {
|
|
5
|
-
host: hostname(),
|
|
6
|
-
user: userInfo().username,
|
|
7
|
-
home: homedir(),
|
|
8
|
-
cwd: process.cwd(),
|
|
9
|
-
platform: process.platform,
|
|
10
|
-
unixusat: Date.now(), // unix timestamp in milliseconds
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Mode Switching Protocol
|
|
2
|
-
|
|
3
|
-
Part of COMMANDORATE. Sets the mode of work of this workshop in
|
|
4
|
-
`.BOS/workshop.json` (`"mode"`) and records the switch in storylines
|
|
5
|
-
(`{"event":"mode","from":…,"to":…}`). Accepts a name or its digit:
|
|
6
|
-
1 almanac, 2 conform, 3 smeltry, 4 commandorate, 5 provision.
|
|
7
|
-
The workshop is bootstrapped first, so `.BOS/` exists to hold the choice.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import bootstrapping from "../bootstrapping/_index.mjs";
|
|
3
|
-
import { recordMode } from "./record-mode.mjs";
|
|
4
|
-
import { switchMode } from "./switch-mode.mjs";
|
|
5
|
-
|
|
6
|
-
const own = new BOS.Procedure("mode-switching").step("switch mode", switchMode).step("record mode", recordMode);
|
|
7
|
-
|
|
8
|
-
// the workshop must be whole before it can change its mode
|
|
9
|
-
export const modeSwitching = bootstrapping.chain(own, "mode-switching");
|
|
10
|
-
export default modeSwitching;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const recordMode = (context) => {
|
|
2
|
-
if (context.previousMode === context.config.mode) return;
|
|
3
|
-
const storylines = context.workshop.storylines.ensure(context);
|
|
4
|
-
context.event = storylines.record(
|
|
5
|
-
{ event: "mode", from: context.previousMode, to: context.config.mode, user: context.env.user },
|
|
6
|
-
context,
|
|
7
|
-
);
|
|
8
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MODES, modeByDigit } from "../../models/workshop/modes.mjs";
|
|
2
|
-
|
|
3
|
-
// accepts a name (smeltry) or its digit (3)
|
|
4
|
-
export const switchMode = (context) => {
|
|
5
|
-
const asked = String(context.options.mode ?? "").toLowerCase();
|
|
6
|
-
const mode = asked in MODES ? asked : modeByDigit(asked);
|
|
7
|
-
if (!mode)
|
|
8
|
-
throw new Error(
|
|
9
|
-
`unknown mode "${asked}" (known: ${Object.entries(MODES)
|
|
10
|
-
.map(([name, m]) => `${m.digit} ${name}`)
|
|
11
|
-
.join(", ")})`,
|
|
12
|
-
);
|
|
13
|
-
context.previousMode = context.config.mode ?? null;
|
|
14
|
-
context.config = context.workshop.system.update({ mode }, context);
|
|
15
|
-
context.config.mode = mode;
|
|
16
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import bootstrapping from "../bootstrapping/_index.mjs";
|
|
3
|
-
import { recordOpening } from "./record-opening.mjs";
|
|
4
|
-
|
|
5
|
-
const own = new BOS.Procedure("opening").step("record opening", recordOpening);
|
|
6
|
-
|
|
7
|
-
export const opening = bootstrapping.chain(own, "opening");
|
|
8
|
-
export default opening;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Promoting Protocol
|
|
2
|
-
|
|
3
|
-
Moves the current branch one station along the flow
|
|
4
|
-
(`docs/infographics/branch-movement-procedures.md`):
|
|
5
|
-
master → developement → revision → testing → releasing → master.
|
|
6
|
-
With `--reject`, sends work back to developement. It is a dry run unless
|
|
7
|
-
applied. Merges are made locally with isomorphic-git (a merge commit, like
|
|
8
|
-
`--no-ff`). releasing → master opens a GitHub pull request instead.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import { apply } from "./apply.mjs";
|
|
3
|
-
import { plan } from "./plan.mjs";
|
|
4
|
-
import { readPosition } from "./read-position.mjs";
|
|
5
|
-
|
|
6
|
-
export const promoting = new BOS.Procedure("promoting", [], {
|
|
7
|
-
description: "move work one station along the branch flow",
|
|
8
|
-
})
|
|
9
|
-
.step("read position", readPosition)
|
|
10
|
-
.step("plan", plan)
|
|
11
|
-
.step("apply", apply);
|
|
12
|
-
|
|
13
|
-
export * from "./branch-flow.mjs";
|
|
14
|
-
export default promoting;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
|
|
3
|
-
import git from "isomorphic-git";
|
|
4
|
-
|
|
5
|
-
import GitClient from "../../bridge/git-client/_index.mjs";
|
|
6
|
-
import GithubApi from "../../bridge/github-api/_index.mjs";
|
|
7
|
-
|
|
8
|
-
// owner/repo from a github remote url (https or ssh)
|
|
9
|
-
async function githubRepo(dir) {
|
|
10
|
-
const url = (await git.getConfig({ fs, dir, path: "remote.origin.url" })) ?? "";
|
|
11
|
-
const match = url.match(/github\.com[:/]([^/]+)\/(.+?)(\.git)?$/);
|
|
12
|
-
if (!match) throw new Error(`origin is not a GitHub repository: ${url || "no origin"}`);
|
|
13
|
-
return { owner: match[1], repo: match[2] };
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const apply = async (context) => {
|
|
17
|
-
if (context.dryRun) return;
|
|
18
|
-
const { from, to, repo } = context;
|
|
19
|
-
if (context.pullRequest) {
|
|
20
|
-
context.result = await new GithubApi().pullRequest({ ...(await githubRepo(repo)), head: from, base: to });
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const client = new GitClient();
|
|
24
|
-
const changes = await client.changes(repo);
|
|
25
|
-
if (changes.length) throw new Error(`${changes.length} uncommitted changes in ${repo}: commit them before promoting`);
|
|
26
|
-
if (!(await client.hasBranch(repo, to))) await client.createBranch(repo, to, from);
|
|
27
|
-
context.result = await client.merge(repo, from, to);
|
|
28
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// docs/infographics/branch-movement-procedures.md as data:
|
|
2
|
-
// master → developement → revision → testing → releasing → master (pull request);
|
|
3
|
-
// a rejection at revision, testing or releasing goes back to developement.
|
|
4
|
-
export const CANON = "master";
|
|
5
|
-
|
|
6
|
-
export const BRANCHES = {
|
|
7
|
-
master: "spine of canon: stable state shared with production",
|
|
8
|
-
developement: "further changing: here we code",
|
|
9
|
-
revision: "control of code: approval by a maintainer",
|
|
10
|
-
testing: "quality assurance: tests, nightly builds",
|
|
11
|
-
releasing: "stamping, publishing and announcing",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const PROMOTION = {
|
|
15
|
-
master: "developement",
|
|
16
|
-
developement: "revision",
|
|
17
|
-
revision: "testing",
|
|
18
|
-
testing: "releasing",
|
|
19
|
-
releasing: CANON,
|
|
20
|
-
};
|
|
21
|
-
export const REJECTION = { revision: "developement", testing: "developement", releasing: "developement" };
|
|
22
|
-
|
|
23
|
-
export const needsPullRequest = (from, to) => from === "releasing" && to === CANON;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import GitClient from "../../bridge/git-client/_index.mjs";
|
|
2
|
-
import { needsPullRequest } from "./branch-flow.mjs";
|
|
3
|
-
|
|
4
|
-
export const plan = async (context) => {
|
|
5
|
-
const { from, to, repo } = context;
|
|
6
|
-
context.pullRequest = needsPullRequest(from, to);
|
|
7
|
-
context.plan = context.pullRequest
|
|
8
|
-
? [`pull request ${from} → ${to} on GitHub`]
|
|
9
|
-
: [
|
|
10
|
-
...((await new GitClient().hasBranch(repo, to)) ? [] : [`create branch ${to} from ${from}`]),
|
|
11
|
-
`merge ${from} into ${to} (merge commit "${from} → ${to}")`,
|
|
12
|
-
`leave ${to} checked out`,
|
|
13
|
-
];
|
|
14
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import GitClient from "../../bridge/git-client/_index.mjs";
|
|
2
|
-
import { PROMOTION, REJECTION } from "./branch-flow.mjs";
|
|
3
|
-
|
|
4
|
-
export const readPosition = async (context) => {
|
|
5
|
-
const git = new GitClient();
|
|
6
|
-
context.repo = (await git.root(context.options.cwd ?? process.cwd())) ?? process.cwd();
|
|
7
|
-
context.from = context.options.from ?? (await git.branch(context.repo));
|
|
8
|
-
const table = context.options.reject ? REJECTION : PROMOTION;
|
|
9
|
-
context.to = table[context.from];
|
|
10
|
-
if (!context.to) {
|
|
11
|
-
throw new Error(
|
|
12
|
-
`"${context.from}" has no ${context.options.reject ? "rejection" : "promotion"} target (flow: ${Object.keys(table).join(", ")})`,
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Sinking Protocol
|
|
2
|
-
|
|
3
|
-
Moment when it is important to suddenly abandon current workstation that can be compromised, collect all results of work progress on projects, secure them on dedicated to this purpose huge hard drive and reinstall operating system of currently used machine. this is procedure of ASAP matter to ensure safety and security against threat of being compromised. If it is possible to migrate workspace setups for new environment customizing without danger of contamination it is worth to list all available toolsets and programs by for example extraction of terminal history stories
|
|
4
|
-
|
|
5
|
-
Implemented so far (read-only): an inventory of every forge project, with its
|
|
6
|
-
branch and uncommitted changes, plus the ttystories that reveal which tools
|
|
7
|
-
were used. Securing results onto the rescue drive and reinstalling the system:
|
|
8
|
-
[`TODO`]
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BOS } from "../../main.ts";
|
|
2
|
-
import loading from "../loading/_index.mjs";
|
|
3
|
-
import { inventoryForge } from "./inventory-forge.mjs";
|
|
4
|
-
import { inventoryTools } from "./inventory-tools.mjs";
|
|
5
|
-
|
|
6
|
-
// first, read-only part of sinking: know what has to be rescued
|
|
7
|
-
const own = new BOS.Procedure("sinking")
|
|
8
|
-
.step("inventory forge", inventoryForge)
|
|
9
|
-
.step("inventory tools", inventoryTools);
|
|
10
|
-
|
|
11
|
-
export const sinking = loading.chain(own, "sinking");
|
|
12
|
-
export default sinking;
|