blacksmith-organization-system 1.0.0-dev.3 → 1.1.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 +61 -65
- package/dist/bridges/git.d.ts +8 -0
- package/dist/bridges/git.js +20 -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 +51 -0
- package/dist/main.js +85 -0
- package/dist/main.js.map +1 -0
- package/dist/models/_index.d.ts +18 -0
- package/dist/models/_index.js +20 -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/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 +7 -0
- package/dist/procedures/_index.js +10 -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/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 +17 -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/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/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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Element } from "../../core/element.js";
|
|
2
|
+
import { bumpGrih, GRIH_START } from "../../core/version.js";
|
|
3
|
+
import { Project } from "../project/class.js";
|
|
4
|
+
import { isRepository } from "../project/git.js";
|
|
5
|
+
export const SCOPE_FILE = ".bos/scope.json";
|
|
6
|
+
const SKIPPED = new Set(["node_modules", "dist", "build", "site", "throwbox"]);
|
|
7
|
+
export class Scope extends Element {
|
|
8
|
+
static type = "scope";
|
|
9
|
+
static maxDepth = 3;
|
|
10
|
+
// is the scope itself a repository (a scope repo with submodule members)?
|
|
11
|
+
isRepository() {
|
|
12
|
+
return isRepository(this.host, this.path);
|
|
13
|
+
}
|
|
14
|
+
projects() {
|
|
15
|
+
const found = [];
|
|
16
|
+
const walk = (dir, depth) => {
|
|
17
|
+
if (depth > Scope.maxDepth)
|
|
18
|
+
return;
|
|
19
|
+
for (const entry of this.host.list(dir)) {
|
|
20
|
+
if (!entry.directory || entry.name.startsWith(".") || SKIPPED.has(entry.name))
|
|
21
|
+
continue;
|
|
22
|
+
const path = `${dir}/${entry.name}`;
|
|
23
|
+
if (isRepository(this.host, path))
|
|
24
|
+
found.push(new Project(this.host, path, this));
|
|
25
|
+
else
|
|
26
|
+
walk(path, depth + 1);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
walk(this.path, 1);
|
|
30
|
+
return found;
|
|
31
|
+
}
|
|
32
|
+
data() {
|
|
33
|
+
return this.readJSON(SCOPE_FILE, null);
|
|
34
|
+
}
|
|
35
|
+
version() {
|
|
36
|
+
return this.data()?.version ?? null;
|
|
37
|
+
}
|
|
38
|
+
// raise the scope's GRIH version for a loop event; a scope without one starts at 0.0.0.0
|
|
39
|
+
bump(event, context) {
|
|
40
|
+
const data = this.data() ?? {};
|
|
41
|
+
const from = data.version ?? null;
|
|
42
|
+
const to = bumpGrih(from ?? GRIH_START, event);
|
|
43
|
+
if (!context.dryRun)
|
|
44
|
+
this.host.mkdir(this.file(".bos"));
|
|
45
|
+
this.writeJSON(SCOPE_FILE, { ...data, version: to }, context);
|
|
46
|
+
return { from, to };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../../src/models/scope/class.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OA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AC;;oBAC7E,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,QAAQ,CAAmB,UAAU,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,IAAI,IAAI,CAAC;IACtC,CAAC;IAED,yFAAyF;IACzF,IAAI,CAAC,KAAgB,EAAE,OAAgB;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC;QAClC,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,IAAI,UAAU,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,CAAC,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;QAC9D,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LoopData } from "../loop/data.ts";
|
|
2
|
+
export declare const BUMPS: readonly ["major", "minor", "patch"];
|
|
3
|
+
export type Bump = (typeof BUMPS)[number];
|
|
4
|
+
export type VersioningData = {
|
|
5
|
+
bumps: Record<string, Bump>;
|
|
6
|
+
tagPrefix: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const DEFAULT_VERSIONING: VersioningData;
|
|
9
|
+
export type SettingsData = {
|
|
10
|
+
loop?: Partial<LoopData>;
|
|
11
|
+
versioning?: Partial<VersioningData>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// how far a version moves: semver X, Y or Z
|
|
2
|
+
export const BUMPS = ["major", "minor", "patch"];
|
|
3
|
+
// the routine of phase 2: landing on revision is a minor bump, reaching
|
|
4
|
+
// master without it a patch ("hotfix"); only a released version is bumped
|
|
5
|
+
export const DEFAULT_VERSIONING = {
|
|
6
|
+
bumps: { revision: "minor", master: "patch" },
|
|
7
|
+
tagPrefix: "v",
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../src/models/settings/data.ts"],"names":[],"mappings":"AAKA,4CAA4C;AAC5C,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAU1D,wEAAwE;AACxE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IAChD,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAC7C,SAAS,EAAE,GAAG;CACf,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Host } from "../../core/host.ts";
|
|
2
|
+
import { type SettingsData, type VersioningData } from "./data.ts";
|
|
3
|
+
export type Settings = {
|
|
4
|
+
source: string;
|
|
5
|
+
data: SettingsData;
|
|
6
|
+
};
|
|
7
|
+
export declare function settingsFile(projectPath: string): string;
|
|
8
|
+
export declare function settingsOf(host: Host, projectPath: string): Settings;
|
|
9
|
+
export declare function versioningOf(settings: Settings): VersioningData;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { join } from "../../core/paths.js";
|
|
2
|
+
import { BUMPS, DEFAULT_VERSIONING } from "./data.js";
|
|
3
|
+
export function settingsFile(projectPath) {
|
|
4
|
+
return join(projectPath, ".github", "bos.json");
|
|
5
|
+
}
|
|
6
|
+
export function settingsOf(host, projectPath) {
|
|
7
|
+
const file = settingsFile(projectPath);
|
|
8
|
+
const text = host.readText(file);
|
|
9
|
+
if (text === null)
|
|
10
|
+
return { source: "default", data: {} };
|
|
11
|
+
let data;
|
|
12
|
+
try {
|
|
13
|
+
data = JSON.parse(text);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw new Error(`${file} is not JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
17
|
+
}
|
|
18
|
+
if (typeof data !== "object" || data === null || Array.isArray(data))
|
|
19
|
+
throw new Error(`${file} is not an object`);
|
|
20
|
+
return { source: file, data: data };
|
|
21
|
+
}
|
|
22
|
+
export function versioningOf(settings) {
|
|
23
|
+
const own = settings.data.versioning ?? {};
|
|
24
|
+
const versioning = { ...DEFAULT_VERSIONING, ...own, bumps: { ...DEFAULT_VERSIONING.bumps, ...own.bumps } };
|
|
25
|
+
for (const [branch, bump] of Object.entries(versioning.bumps)) {
|
|
26
|
+
if (!BUMPS.includes(bump)) {
|
|
27
|
+
throw new Error(`${settings.source}: versioning.bumps.${branch} is "${bump}", not one of ${BUMPS.join(", ")}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return versioning;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=load.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../../src/models/settings/load.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAA0C,MAAM,WAAW,CAAC;AAI9F,MAAM,UAAU,YAAY,CAAC,WAAmB;IAC9C,OAAO,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAU,EAA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CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,sBAAsB,MAAM,QAAQ,IAAI,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Element } from "../../core/element.ts";
|
|
2
|
+
import { Nests, Setup } from "./parts.ts";
|
|
3
|
+
import { Storylines } from "./storylines.ts";
|
|
4
|
+
export declare class System extends Element {
|
|
5
|
+
static type: string;
|
|
6
|
+
static dirname: string;
|
|
7
|
+
static children: (typeof Setup | typeof Nests | typeof Storylines)[];
|
|
8
|
+
static descriptors: {
|
|
9
|
+
"workshop.json": (element: Element) => {
|
|
10
|
+
createdBy: string;
|
|
11
|
+
host: string;
|
|
12
|
+
unixusat: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
get storylines(): Storylines;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// .BOS: where BOS keeps itself inside a workshop (glossary: system).
|
|
2
|
+
// The only hidden area; everything else in the workshop is the owner's work.
|
|
3
|
+
import { Element } from "../../core/element.js";
|
|
4
|
+
import { Data, Nests, Setup } from "./parts.js";
|
|
5
|
+
import { Storylines } from "./storylines.js";
|
|
6
|
+
export class System extends Element {
|
|
7
|
+
static type = "system";
|
|
8
|
+
static dirname = ".BOS";
|
|
9
|
+
static children = [Setup, Data, Nests, Storylines];
|
|
10
|
+
static descriptors = {
|
|
11
|
+
"workshop.json": (element) => ({
|
|
12
|
+
createdBy: "blacksmith-organization-system",
|
|
13
|
+
host: element.host.hostname(),
|
|
14
|
+
unixusat: element.host.now(),
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
get storylines() {
|
|
18
|
+
return this.child(Storylines);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../../src/models/system/class.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,6EAA6E;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,OAAO,MAAO,SAAQ,OAAO;IACjC,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,QAAQ,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACnD,MAAM,CAAC,WAAW,GAAG;QACnB,eAAe,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC;YACtC,SAAS,EAAE,gCAAgC;YAC3C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC7B,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE;SAC7B,CAAC;KACH,CAAC;IAEF,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Element } from "../../core/element.ts";
|
|
2
|
+
export declare class Setup extends Element {
|
|
3
|
+
static type: string;
|
|
4
|
+
static dirname: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class Data extends Element {
|
|
7
|
+
static type: string;
|
|
8
|
+
static dirname: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class Nests extends Element {
|
|
11
|
+
static type: string;
|
|
12
|
+
static dirname: string;
|
|
13
|
+
static descriptors: {
|
|
14
|
+
".index.json": () => {
|
|
15
|
+
nests: {};
|
|
16
|
+
};
|
|
17
|
+
".manifest.json": () => {
|
|
18
|
+
files: {};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// The parts of .BOS (glossary: system, setup, data, nestrelm, storylines).
|
|
2
|
+
import { Element } from "../../core/element.js";
|
|
3
|
+
// .BOS/setup: keys, VPN, routing, aliases, tokens, setternet
|
|
4
|
+
export class Setup extends Element {
|
|
5
|
+
static type = "setup";
|
|
6
|
+
static dirname = "setup";
|
|
7
|
+
}
|
|
8
|
+
// .BOS/data: data BOS works from, e.g. <pack>.gitlist
|
|
9
|
+
export class Data extends Element {
|
|
10
|
+
static type = "data";
|
|
11
|
+
static dirname = "data";
|
|
12
|
+
}
|
|
13
|
+
// .BOS/nests: volumes and disks of containers and VMs, always indexed and guarded
|
|
14
|
+
export class Nests extends Element {
|
|
15
|
+
static type = "nestrelm";
|
|
16
|
+
static dirname = "nests";
|
|
17
|
+
static descriptors = {
|
|
18
|
+
".index.json": () => ({ nests: {} }),
|
|
19
|
+
".manifest.json": () => ({ files: {} }),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=parts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../src/models/system/parts.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,6DAA6D;AAC7D,MAAM,OAAO,KAAM,SAAQ,OAAO;IAChC,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;;AAG3B,sDAAsD;AACtD,MAAM,OAAO,IAAK,SAAQ,OAAO;IAC/B,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;;AAG1B,kFAAkF;AAClF,MAAM,OAAO,KAAM,SAAQ,OAAO;IAChC,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG;QACnB,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QACpC,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;KACxC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Context } from "../../core/context.ts";
|
|
2
|
+
import { Element } from "../../core/element.ts";
|
|
3
|
+
export declare class Logs extends Element {
|
|
4
|
+
static type: string;
|
|
5
|
+
static dirname: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class Ttystories extends Element {
|
|
8
|
+
static type: string;
|
|
9
|
+
static dirname: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class Manifests extends Element {
|
|
12
|
+
static type: string;
|
|
13
|
+
static dirname: string;
|
|
14
|
+
}
|
|
15
|
+
export type StoryEvent = {
|
|
16
|
+
event: string;
|
|
17
|
+
[field: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
export declare class Storylines extends Element {
|
|
20
|
+
static type: string;
|
|
21
|
+
static dirname: string;
|
|
22
|
+
static mandatory: boolean;
|
|
23
|
+
static children: (typeof Logs)[];
|
|
24
|
+
static descriptors: {
|
|
25
|
+
"metadata.json": (element: Element) => {
|
|
26
|
+
origin: {
|
|
27
|
+
host: string;
|
|
28
|
+
user: string;
|
|
29
|
+
unixusat: number;
|
|
30
|
+
createdBy: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
get logs(): Logs;
|
|
35
|
+
record(event: StoryEvent, context: Context): StoryEvent & {
|
|
36
|
+
unixusat: number;
|
|
37
|
+
host: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Element } from "../../core/element.js";
|
|
2
|
+
export class Logs extends Element {
|
|
3
|
+
static type = "logs";
|
|
4
|
+
static dirname = "logs";
|
|
5
|
+
}
|
|
6
|
+
export class Ttystories extends Element {
|
|
7
|
+
static type = "ttystories";
|
|
8
|
+
static dirname = "ttystories";
|
|
9
|
+
}
|
|
10
|
+
export class Manifests extends Element {
|
|
11
|
+
static type = "manifests";
|
|
12
|
+
static dirname = "manifests";
|
|
13
|
+
}
|
|
14
|
+
export class Storylines extends Element {
|
|
15
|
+
static type = "storylines";
|
|
16
|
+
static dirname = "storylines";
|
|
17
|
+
static mandatory = false;
|
|
18
|
+
static children = [Logs, Ttystories, Manifests];
|
|
19
|
+
static descriptors = {
|
|
20
|
+
"metadata.json": (element) => ({
|
|
21
|
+
origin: {
|
|
22
|
+
host: element.host.hostname(),
|
|
23
|
+
user: element.host.user(),
|
|
24
|
+
unixusat: element.host.now(),
|
|
25
|
+
createdBy: "blacksmith-organization-system",
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
get logs() {
|
|
30
|
+
return this.child(Logs);
|
|
31
|
+
}
|
|
32
|
+
// one JSON line per event in logs/workshop.jsonl; creates storylines on first use
|
|
33
|
+
record(event, context) {
|
|
34
|
+
const entry = { unixusat: this.host.now(), host: this.host.hostname(), ...event };
|
|
35
|
+
if (!context.dryRun) {
|
|
36
|
+
this.ensure(context);
|
|
37
|
+
this.host.appendText(this.logs.file("workshop.jsonl"), `${JSON.stringify(entry)}\n`);
|
|
38
|
+
}
|
|
39
|
+
return entry;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=storylines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storylines.js","sourceRoot":"","sources":["../../../src/models/system/storylines.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,MAAM,OAAO,IAAK,SAAQ,OAAO;I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AAO,CAAC,MAAM,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvF,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Element } from "../../core/element.ts";
|
|
2
|
+
import type { Host } from "../../core/host.ts";
|
|
3
|
+
import { Archive } from "../archive/class.ts";
|
|
4
|
+
import { Devarmory } from "../devarmory/class.ts";
|
|
5
|
+
import { Forge } from "../forge/class.ts";
|
|
6
|
+
import { System } from "../system/class.ts";
|
|
7
|
+
import { type Located } from "./locate.ts";
|
|
8
|
+
export declare const ROOT_FILES: Set<string>;
|
|
9
|
+
export declare class Workshop extends Element {
|
|
10
|
+
static type: string;
|
|
11
|
+
static dirname: string;
|
|
12
|
+
static children: (typeof Archive | typeof Devarmory | typeof System)[];
|
|
13
|
+
readonly located: Located | null;
|
|
14
|
+
constructor(host: Host, path: string, parent?: Element | null, located?: Located | null);
|
|
15
|
+
static locate(host: Host, explicit?: string): Workshop;
|
|
16
|
+
get system(): System;
|
|
17
|
+
get forge(): Forge;
|
|
18
|
+
get areaNames(): string[];
|
|
19
|
+
strays(): string[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// The workshop: root of crafting on a host or partition (glossary: workshop).
|
|
2
|
+
// Five mandatory areas: .BOS (BOS itself), devarmory, forge, craftbook, archive.
|
|
3
|
+
import { Element } from "../../core/element.js";
|
|
4
|
+
import { Archive } from "../archive/class.js";
|
|
5
|
+
import { Craftbook } from "../craftbook/class.js";
|
|
6
|
+
import { Devarmory } from "../devarmory/class.js";
|
|
7
|
+
import { Forge } from "../forge/class.js";
|
|
8
|
+
import { System } from "../system/class.js";
|
|
9
|
+
import { locateWorkshop, WORKSHOP_DIRNAME } from "./locate.js";
|
|
10
|
+
// what may lie in a workshop root besides the areas: the agents' guides and their settings
|
|
11
|
+
export const ROOT_FILES = new Set(["AGENTS.md", "CLAUDE.md", ".claude", "README.md", ".gitignore"]);
|
|
12
|
+
export class Workshop extends Element {
|
|
13
|
+
static type = "workshop";
|
|
14
|
+
static dirname = WORKSHOP_DIRNAME;
|
|
15
|
+
static children = [System, Devarmory, Forge, Craftbook, Archive];
|
|
16
|
+
located;
|
|
17
|
+
constructor(host, path, parent = null, located = null) {
|
|
18
|
+
super(host, path, parent);
|
|
19
|
+
this.located = located;
|
|
20
|
+
}
|
|
21
|
+
static locate(host, explicit) {
|
|
22
|
+
const located = locateWorkshop(host, explicit);
|
|
23
|
+
return new Workshop(host, located.root, null, located);
|
|
24
|
+
}
|
|
25
|
+
get system() {
|
|
26
|
+
return this.child(System);
|
|
27
|
+
}
|
|
28
|
+
get forge() {
|
|
29
|
+
return this.child(Forge);
|
|
30
|
+
}
|
|
31
|
+
get areaNames() {
|
|
32
|
+
return Workshop.children.map((Kind) => Kind.dirname ?? Kind.type);
|
|
33
|
+
}
|
|
34
|
+
// entries in the root that are neither an area nor a known file
|
|
35
|
+
strays() {
|
|
36
|
+
const areas = new Set(this.areaNames);
|
|
37
|
+
return this.host
|
|
38
|
+
.list(this.path)
|
|
39
|
+
.map((entry) => entry.name)
|
|
40
|
+
.filter((name) => !areas.has(name) && !ROOT_FILES.has(name));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../../src/models/workshop/class.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,iFAAiF;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AA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3B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE,CAAC;IAED,gEAAgE;IAChE,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,IAAI;aACb,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;aACf,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;aAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Host } from "../../core/host.ts";
|
|
2
|
+
export declare const WORKSHOP_DIRNAME = "__WORKSHOP";
|
|
3
|
+
export declare function workshopName(host: Host): string;
|
|
4
|
+
export declare function findAncestorWorkshop(start: string, name?: string): string | null;
|
|
5
|
+
export type Located = {
|
|
6
|
+
root: string;
|
|
7
|
+
source: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function locateWorkshop(host: Host, explicit?: string): Located;
|
|
10
|
+
export type Place = {
|
|
11
|
+
area: string | null;
|
|
12
|
+
scope?: string | null;
|
|
13
|
+
project?: string | null;
|
|
14
|
+
inner?: string | null;
|
|
15
|
+
};
|
|
16
|
+
export declare function placeOf(root: string, target: string): Place | null;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { basename, dirname, inside, join, normalize } from "../../core/paths.js";
|
|
2
|
+
export const WORKSHOP_DIRNAME = "__WORKSHOP";
|
|
3
|
+
// $WORKSHOP_RENAME names the workshop directory differently (e.g. ".__WORKSHOP")
|
|
4
|
+
export function workshopName(host) {
|
|
5
|
+
return host.env("WORKSHOP_RENAME")?.trim() || WORKSHOP_DIRNAME;
|
|
6
|
+
}
|
|
7
|
+
export function findAncestorWorkshop(start, name = WORKSHOP_DIRNAME) {
|
|
8
|
+
let dir = normalize(start);
|
|
9
|
+
while (dir !== "/") {
|
|
10
|
+
if (basename(dir) === name)
|
|
11
|
+
return dir;
|
|
12
|
+
dir = dirname(dir);
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
// the workshop itself ($BOS_WORKSHOP), or the directory that holds it ($WORKSHOP_ROOT,
|
|
17
|
+
// e.g. a partition kept for tests and demonstrations, so the home workshop stays private)
|
|
18
|
+
export function locateWorkshop(host, explicit) {
|
|
19
|
+
const absolute = (path) => normalize(path.startsWith("/") ? path : join(host.cwd(), path));
|
|
20
|
+
const variable = (name) => host
|
|
21
|
+
.env(name)
|
|
22
|
+
?.trim()
|
|
23
|
+
.replace(/^~(?=$|\/)/, host.home()) || undefined;
|
|
24
|
+
const name = workshopName(host);
|
|
25
|
+
const workshop = variable("BOS_WORKSHOP");
|
|
26
|
+
const root = variable("WORKSHOP_ROOT");
|
|
27
|
+
const rules = [
|
|
28
|
+
["--workshop option", () => explicit && absolute(explicit)],
|
|
29
|
+
["$BOS_WORKSHOP", () => workshop && absolute(workshop)],
|
|
30
|
+
["$WORKSHOP_ROOT", () => root && join(absolute(root), name)],
|
|
31
|
+
["ancestor of the current directory", () => findAncestorWorkshop(host.cwd(), name)],
|
|
32
|
+
["default per user", () => join(host.home(), name)],
|
|
33
|
+
];
|
|
34
|
+
for (const [source, rule] of rules) {
|
|
35
|
+
const root = rule();
|
|
36
|
+
if (root)
|
|
37
|
+
return { root, source };
|
|
38
|
+
}
|
|
39
|
+
throw new Error("no workshop found");
|
|
40
|
+
}
|
|
41
|
+
// where a path sits inside a workshop: its area and, in the forge, its scope;
|
|
42
|
+
// null when outside. The project needs the scope's tree: Workshop.placeOf resolves it.
|
|
43
|
+
export function placeOf(root, target) {
|
|
44
|
+
const rel = inside(root, target);
|
|
45
|
+
if (rel === null)
|
|
46
|
+
return null;
|
|
47
|
+
if (rel === "")
|
|
48
|
+
return { area: null };
|
|
49
|
+
const [area = null, ...rest] = rel.split("/");
|
|
50
|
+
if (area === "forge")
|
|
51
|
+
return { area, scope: rest[0] ?? null, inner: rest.slice(1).join("/") || null };
|
|
52
|
+
return { area, inner: rest.join("/") || null };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=locate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locate.js","sourceRoot":"","sources":["../../../src/models/workshop/locate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE7C,iFAAiF;AACjF,MAAM,UAAU,YAAY,CAAC,IAAU;IACrC,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,gBAAgB,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAa,EAAE,IAAI,GAAG,gBAAgB;IACzE,IAAI,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,GAAG,KAAK,GAAG,EAAE,CAAC;QACnB,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,IAAI;YAAE,OAAO,GAAG,CAAC;QACvC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAID,uFAAuF;AACvF,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,IAAU,EAAE,QAAiB;IAC1D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,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,KAAK,CAAC,mBAAmB,CAAC,CAAC;AACvC,CAAC;AAID,8EAA8E;AAC9E,uFAAuF;AACvF,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,MAAc;IAClD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC9B,IAAI,GAAG,KAAK,EAAE;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACtC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;IACtG,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { type AutomergeContext, automerging } from "./automerging/_index.ts";
|
|
2
|
+
export { type BootstrapContext, bootstrapping } from "./bootstrapping/_index.ts";
|
|
3
|
+
export { type BumpContext, type BumpOutcome, bumping, unbumped } from "./bumping/_index.ts";
|
|
4
|
+
export { emptyReport, type Finding, type InspectContext, inspecting, type ScopeReport, type WorkshopReport, } from "./inspecting/_index.ts";
|
|
5
|
+
export { type FlowOutcome, type ProposeContext, proposing, undecided } from "./proposing/_index.ts";
|
|
6
|
+
export { type VersionContext, versioning } from "./versioning/_index.ts";
|
|
7
|
+
export { classify, isNoise, type WatchContext, type WorkshopEvent, watching } from "./watching/_index.ts";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Every procedure of the core. A new behaviour is a new directory here:
|
|
2
|
+
// DESCRIPTION.md (why), one file per step (how), _index.ts (the order).
|
|
3
|
+
export { automerging } from "./automerging/_index.js";
|
|
4
|
+
export { bootstrapping } from "./bootstrapping/_index.js";
|
|
5
|
+
export { bumping, unbumped } from "./bumping/_index.js";
|
|
6
|
+
export { emptyReport, inspecting, } from "./inspecting/_index.js";
|
|
7
|
+
export { proposing, undecided } from "./proposing/_index.js";
|
|
8
|
+
export { versioning } from "./versioning/_index.js";
|
|
9
|
+
export { classify, isNoise, watching } from "./watching/_index.js";
|
|
10
|
+
//# sourceMappingURL=_index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_index.js","sourceRoot":"","sources":["../../src/procedures/_index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wEAAwE;AAExE,OAAO,EAAyB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAyB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAsC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EACL,WAAW,EAGX,UAAU,GAGX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAyC,SAAS,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAuB,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAyC,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Procedure } from "../../core/procedure.js";
|
|
2
|
+
import { decide, merge, read } from "./steps.js";
|
|
3
|
+
export const automerging = new Procedure("automerging", [
|
|
4
|
+
{ name: "read", run: read },
|
|
5
|
+
{ name: "decide", run: decide },
|
|
6
|
+
{ name: "merge", run: merge },
|
|
7
|
+
]);
|
|
8
|
+
//# sourceMappingURL=_index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_index.js","sourceRoot":"","sources":["../../../src/procedures/automerging/_index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIjD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,SAAS,CAAmB,aAAa,EAAE;IACxE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IAC3B,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE;IAC/B,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE;CAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GitHub, PullRequest } from "../../bridges/github.ts";
|
|
2
|
+
import type { Context } from "../../core/context.ts";
|
|
3
|
+
import type { Loop } from "../../models/_index.ts";
|
|
4
|
+
import type { FlowOutcome } from "../proposing/context.ts";
|
|
5
|
+
export type AutomergeContext = Context & {
|
|
6
|
+
loop: Loop;
|
|
7
|
+
github: GitHub;
|
|
8
|
+
number: number;
|
|
9
|
+
pullRequest?: PullRequest;
|
|
10
|
+
outcome: FlowOutcome;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/procedures/automerging/context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export function read(context) {
|
|
2
|
+
const pr = context.github.pullRequest(context.number);
|
|
3
|
+
context.pullRequest = pr;
|
|
4
|
+
context.outcome.pullRequest = pr.number;
|
|
5
|
+
if (pr.state !== "OPEN")
|
|
6
|
+
context.outcome.reason = `#${pr.number} is ${pr.state.toLowerCase()}`;
|
|
7
|
+
}
|
|
8
|
+
export function decide(context) {
|
|
9
|
+
const { outcome, pullRequest: pr, loop } = context;
|
|
10
|
+
if (outcome.reason || !pr)
|
|
11
|
+
return;
|
|
12
|
+
const step = loop.step(pr.head);
|
|
13
|
+
outcome.step = step;
|
|
14
|
+
const forward = step !== null && step.to === pr.base;
|
|
15
|
+
if (pr.crossRepository)
|
|
16
|
+
outcome.reason = `#${pr.number} comes from a fork: a person merges it`;
|
|
17
|
+
else if (!forward)
|
|
18
|
+
outcome.reason = `${pr.head} → ${pr.base} is not a forward step of the loop: a person merges it`;
|
|
19
|
+
else if (!step.automerge)
|
|
20
|
+
outcome.reason = `automerge is off for ${pr.head} → ${pr.base}: a person merges it`;
|
|
21
|
+
}
|
|
22
|
+
export function merge(context) {
|
|
23
|
+
const { outcome, pullRequest: pr } = context;
|
|
24
|
+
if (outcome.reason || !pr)
|
|
25
|
+
return;
|
|
26
|
+
context.changes.push(`merge of #${pr.number} ${pr.head} → ${pr.base}`);
|
|
27
|
+
if (context.dryRun) {
|
|
28
|
+
Object.assign(outcome, { action: "would-merge", reason: `would merge #${pr.number}` });
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
context.github.merge(pr.number);
|
|
32
|
+
Object.assign(outcome, { action: "merged", reason: `merged #${pr.number} ${pr.head} → ${pr.base}` });
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/procedures/automerging/steps.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,IAAI,CAAC,OAAyB;IAC5C,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,OAAO,CAAC,WAAW,GAAG,EAAE,CAAC;IACzB,OAAO,CAAC,OAAO,CAAC,WAAW,GAAG,EAAE,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,KAAK,KAAK,MAAM;QAAE,OAAO,CAAC,OA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C,MAAM,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACvF,OAAO;IACT,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,IAAI,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACvG,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Procedure } from "../../core/procedure.js";
|
|
2
|
+
import { ensureTree } from "./ensure-tree.js";
|
|
3
|
+
import { record } from "./record.js";
|
|
4
|
+
export const bootstrapping = new Procedure("bootstrapping", [
|
|
5
|
+
{ name: "ensure-tree", run: ensureTree },
|
|
6
|
+
{ name: "record", run: record },
|
|
7
|
+
]);
|
|
8
|
+
//# sourceMappingURL=_index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_index.js","sourceRoot":"","sources":["../../../src/procedures/bootstrapping/_index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,SAAS,CAAmB,eAAe,EAAE;IAC5E,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,UAAU,EAAE;IACxC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE;CAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/procedures/bootstrapping/context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensure-tree.js","sourceRoot":"","sources":["../../../src/procedures/bootstrapping/ensure-tree.ts"],"names":[],"mappings":"AAEA,+DAA+D;AAC/D,MAAM,UAAU,UAAU,CAAC,OAAyB;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
|