@canonical/pragma-cli 0.34.0 → 0.36.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/README.md +153 -30
- package/bundled-skills/add-standard/SKILL.md +338 -0
- package/bundled-skills/adoption-a1-styles/SKILL.md +269 -0
- package/bundled-skills/adoption-a2-components/SKILL.md +291 -0
- package/bundled-skills/adoption-a3-forms/SKILL.md +260 -0
- package/bundled-skills/anatomy-author/ANATOMY_DSL_SPEC.md +406 -0
- package/bundled-skills/anatomy-author/SKILL.md +1226 -0
- package/bundled-skills/design-auditor/SKILL.md +455 -0
- package/bundled-skills/implement-component/SKILL.md +333 -0
- package/bundled-skills/specify-component/SKILL.md +331 -0
- package/bundled-skills/specify-pattern/SKILL.md +292 -0
- package/dist/.build-ok +0 -0
- package/dist/package.json +84 -0
- package/dist/pragma.conf.js +1016 -0
- package/dist/pragma.conf.js.map +1 -0
- package/dist/src/bin.js +356 -0
- package/dist/src/bin.js.map +1 -0
- package/dist/src/capabilities/capabilities/capabilities.render.js +70 -0
- package/dist/src/capabilities/capabilities/capabilities.render.js.map +1 -0
- package/dist/src/capabilities/capabilities/capabilities.verb.js +59 -0
- package/dist/src/capabilities/capabilities/capabilities.verb.js.map +1 -0
- package/dist/src/capabilities/capabilities/catalog.js +130 -0
- package/dist/src/capabilities/capabilities/catalog.js.map +1 -0
- package/dist/src/capabilities/capabilities/hints.js +195 -0
- package/dist/src/capabilities/capabilities/hints.js.map +1 -0
- package/dist/src/capabilities/capabilities/index.js +11 -0
- package/dist/src/capabilities/capabilities/index.js.map +1 -0
- package/dist/src/capabilities/capabilities/types.js +11 -0
- package/dist/src/capabilities/capabilities/types.js.map +1 -0
- package/dist/src/capabilities/colophon/collectColophon.js +83 -0
- package/dist/src/capabilities/colophon/collectColophon.js.map +1 -0
- package/dist/src/capabilities/colophon/colophon.render.js +59 -0
- package/dist/src/capabilities/colophon/colophon.render.js.map +1 -0
- package/dist/src/capabilities/colophon/colophon.verb.js +43 -0
- package/dist/src/capabilities/colophon/colophon.verb.js.map +1 -0
- package/dist/src/capabilities/colophon/index.js +5 -0
- package/dist/src/capabilities/colophon/index.js.map +1 -0
- package/dist/src/capabilities/colophon/markdownTerminal.js +90 -0
- package/dist/src/capabilities/colophon/markdownTerminal.js.map +1 -0
- package/dist/src/capabilities/colophon/types.js +10 -0
- package/dist/src/capabilities/colophon/types.js.map +1 -0
- package/dist/src/capabilities/config/collectConfigShow.js +59 -0
- package/dist/src/capabilities/config/collectConfigShow.js.map +1 -0
- package/dist/src/capabilities/config/field.render.js +22 -0
- package/dist/src/capabilities/config/field.render.js.map +1 -0
- package/dist/src/capabilities/config/fields.js +46 -0
- package/dist/src/capabilities/config/fields.js.map +1 -0
- package/dist/src/capabilities/config/get.verb.js +61 -0
- package/dist/src/capabilities/config/get.verb.js.map +1 -0
- package/dist/src/capabilities/config/index.js +5 -0
- package/dist/src/capabilities/config/index.js.map +1 -0
- package/dist/src/capabilities/config/runField.js +59 -0
- package/dist/src/capabilities/config/runField.js.map +1 -0
- package/dist/src/capabilities/config/runGet.js +28 -0
- package/dist/src/capabilities/config/runGet.js.map +1 -0
- package/dist/src/capabilities/config/runSet.js +53 -0
- package/dist/src/capabilities/config/runSet.js.map +1 -0
- package/dist/src/capabilities/config/set.verb.js +66 -0
- package/dist/src/capabilities/config/set.verb.js.map +1 -0
- package/dist/src/capabilities/config/show.render.js +84 -0
- package/dist/src/capabilities/config/show.render.js.map +1 -0
- package/dist/src/capabilities/config/show.verb.js +44 -0
- package/dist/src/capabilities/config/show.verb.js.map +1 -0
- package/dist/src/capabilities/config/types.js +5 -0
- package/dist/src/capabilities/config/types.js.map +1 -0
- package/dist/src/capabilities/config/unset.verb.js +49 -0
- package/dist/src/capabilities/config/unset.verb.js.map +1 -0
- package/dist/src/capabilities/create/cliProjection.js +195 -0
- package/dist/src/capabilities/create/cliProjection.js.map +1 -0
- package/dist/src/capabilities/create/constants.js +47 -0
- package/dist/src/capabilities/create/constants.js.map +1 -0
- package/dist/src/capabilities/create/create.render.js +100 -0
- package/dist/src/capabilities/create/create.render.js.map +1 -0
- package/dist/src/capabilities/create/create.verb.js +438 -0
- package/dist/src/capabilities/create/create.verb.js.map +1 -0
- package/dist/src/capabilities/create/createHelp.js +47 -0
- package/dist/src/capabilities/create/createHelp.js.map +1 -0
- package/dist/src/capabilities/create/createSurface.generated.js +394 -0
- package/dist/src/capabilities/create/createSurface.generated.js.map +1 -0
- package/dist/src/capabilities/create/generatorToVerbSpec.js +106 -0
- package/dist/src/capabilities/create/generatorToVerbSpec.js.map +1 -0
- package/dist/src/capabilities/create/index.js +18 -0
- package/dist/src/capabilities/create/index.js.map +1 -0
- package/dist/src/capabilities/create/messages.js +16 -0
- package/dist/src/capabilities/create/messages.js.map +1 -0
- package/dist/src/capabilities/create/mount.js +294 -0
- package/dist/src/capabilities/create/mount.js.map +1 -0
- package/dist/src/capabilities/create/pathJail.js +65 -0
- package/dist/src/capabilities/create/pathJail.js.map +1 -0
- package/dist/src/capabilities/create/pickGenerator.js +53 -0
- package/dist/src/capabilities/create/pickGenerator.js.map +1 -0
- package/dist/src/capabilities/create/types.js +2 -0
- package/dist/src/capabilities/create/types.js.map +1 -0
- package/dist/src/capabilities/distribution.js +40 -0
- package/dist/src/capabilities/distribution.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkKeStore.js +40 -0
- package/dist/src/capabilities/doctor/checks/checkKeStore.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkNodeVersion.js +21 -0
- package/dist/src/capabilities/doctor/checks/checkNodeVersion.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkPackageRefs.js +148 -0
- package/dist/src/capabilities/doctor/checks/checkPackageRefs.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkPragmaVersion.js +19 -0
- package/dist/src/capabilities/doctor/checks/checkPragmaVersion.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkShellCompletions.js +199 -0
- package/dist/src/capabilities/doctor/checks/checkShellCompletions.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/harnessInventory.js +195 -0
- package/dist/src/capabilities/doctor/checks/harnessInventory.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/index.js +27 -0
- package/dist/src/capabilities/doctor/checks/index.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/mcpCommand.js +57 -0
- package/dist/src/capabilities/doctor/checks/mcpCommand.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/targetHealth.js +349 -0
- package/dist/src/capabilities/doctor/checks/targetHealth.js.map +1 -0
- package/dist/src/capabilities/doctor/doctor.render.js +164 -0
- package/dist/src/capabilities/doctor/doctor.render.js.map +1 -0
- package/dist/src/capabilities/doctor/doctor.verb.js +49 -0
- package/dist/src/capabilities/doctor/doctor.verb.js.map +1 -0
- package/dist/src/capabilities/doctor/index.js +5 -0
- package/dist/src/capabilities/doctor/index.js.map +1 -0
- package/dist/src/capabilities/doctor/runChecks.js +86 -0
- package/dist/src/capabilities/doctor/runChecks.js.map +1 -0
- package/dist/src/capabilities/doctor/types.js +5 -0
- package/dist/src/capabilities/doctor/types.js.map +1 -0
- package/dist/src/capabilities/graph/index.js +19 -0
- package/dist/src/capabilities/graph/index.js.map +1 -0
- package/dist/src/capabilities/graph/inspect.render.js +76 -0
- package/dist/src/capabilities/graph/inspect.render.js.map +1 -0
- package/dist/src/capabilities/graph/inspect.verb.js +53 -0
- package/dist/src/capabilities/graph/inspect.verb.js.map +1 -0
- package/dist/src/capabilities/graph/query.render.js +73 -0
- package/dist/src/capabilities/graph/query.render.js.map +1 -0
- package/dist/src/capabilities/graph/query.verb.js +49 -0
- package/dist/src/capabilities/graph/query.verb.js.map +1 -0
- package/dist/src/capabilities/graph/runQuery.js +41 -0
- package/dist/src/capabilities/graph/runQuery.js.map +1 -0
- package/dist/src/capabilities/index.js +56 -0
- package/dist/src/capabilities/index.js.map +1 -0
- package/dist/src/capabilities/info/collectInfo.js +72 -0
- package/dist/src/capabilities/info/collectInfo.js.map +1 -0
- package/dist/src/capabilities/info/index.js +5 -0
- package/dist/src/capabilities/info/index.js.map +1 -0
- package/dist/src/capabilities/info/info.render.js +57 -0
- package/dist/src/capabilities/info/info.render.js.map +1 -0
- package/dist/src/capabilities/info/info.verb.js +42 -0
- package/dist/src/capabilities/info/info.verb.js.map +1 -0
- package/dist/src/capabilities/info/types.js +5 -0
- package/dist/src/capabilities/info/types.js.map +1 -0
- package/dist/src/capabilities/meta/complete.verb.js +43 -0
- package/dist/src/capabilities/meta/complete.verb.js.map +1 -0
- package/dist/src/capabilities/meta/index.js +13 -0
- package/dist/src/capabilities/meta/index.js.map +1 -0
- package/dist/src/capabilities/meta/mcp.verb.js +34 -0
- package/dist/src/capabilities/meta/mcp.verb.js.map +1 -0
- package/dist/src/capabilities/ontology/index.js +21 -0
- package/dist/src/capabilities/ontology/index.js.map +1 -0
- package/dist/src/capabilities/ontology/queries.js +123 -0
- package/dist/src/capabilities/ontology/queries.js.map +1 -0
- package/dist/src/capabilities/ontology/render.js +66 -0
- package/dist/src/capabilities/ontology/render.js.map +1 -0
- package/dist/src/capabilities/ontology/verbs.js +181 -0
- package/dist/src/capabilities/ontology/verbs.js.map +1 -0
- package/dist/src/capabilities/prompt/index.js +16 -0
- package/dist/src/capabilities/prompt/index.js.map +1 -0
- package/dist/src/capabilities/prompt/prompt.render.js +78 -0
- package/dist/src/capabilities/prompt/prompt.render.js.map +1 -0
- package/dist/src/capabilities/prompt/types.js +10 -0
- package/dist/src/capabilities/prompt/types.js.map +1 -0
- package/dist/src/capabilities/prompt/verbs.js +93 -0
- package/dist/src/capabilities/prompt/verbs.js.map +1 -0
- package/dist/src/capabilities/resources/index.js +10 -0
- package/dist/src/capabilities/resources/index.js.map +1 -0
- package/dist/src/capabilities/resources/provider.js +423 -0
- package/dist/src/capabilities/resources/provider.js.map +1 -0
- package/dist/src/capabilities/setup/buildPlan.js +172 -0
- package/dist/src/capabilities/setup/buildPlan.js.map +1 -0
- package/dist/src/capabilities/setup/index.js +5 -0
- package/dist/src/capabilities/setup/index.js.map +1 -0
- package/dist/src/capabilities/setup/mode.js +53 -0
- package/dist/src/capabilities/setup/mode.js.map +1 -0
- package/dist/src/capabilities/setup/operations/index.js +39 -0
- package/dist/src/capabilities/setup/operations/index.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupCompletions.js +160 -0
- package/dist/src/capabilities/setup/operations/setupCompletions.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupConfig.js +101 -0
- package/dist/src/capabilities/setup/operations/setupConfig.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupGenerator.js +390 -0
- package/dist/src/capabilities/setup/operations/setupGenerator.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupLsp.js +329 -0
- package/dist/src/capabilities/setup/operations/setupLsp.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupMcp.js +253 -0
- package/dist/src/capabilities/setup/operations/setupMcp.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupSkills.js +594 -0
- package/dist/src/capabilities/setup/operations/setupSkills.js.map +1 -0
- package/dist/src/capabilities/setup/plan.js +128 -0
- package/dist/src/capabilities/setup/plan.js.map +1 -0
- package/dist/src/capabilities/setup/plan.render.js +271 -0
- package/dist/src/capabilities/setup/plan.render.js.map +1 -0
- package/dist/src/capabilities/setup/setup.render.js +54 -0
- package/dist/src/capabilities/setup/setup.render.js.map +1 -0
- package/dist/src/capabilities/setup/setup.verb.js +387 -0
- package/dist/src/capabilities/setup/setup.verb.js.map +1 -0
- package/dist/src/capabilities/setup/shell.js +196 -0
- package/dist/src/capabilities/setup/shell.js.map +1 -0
- package/dist/src/capabilities/setup/targets.js +328 -0
- package/dist/src/capabilities/setup/targets.js.map +1 -0
- package/dist/src/capabilities/setup/types.js +5 -0
- package/dist/src/capabilities/setup/types.js.map +1 -0
- package/dist/src/capabilities/shared/assertExecOk.js +137 -0
- package/dist/src/capabilities/shared/assertExecOk.js.map +1 -0
- package/dist/src/capabilities/shared/index.js +27 -0
- package/dist/src/capabilities/shared/index.js.map +1 -0
- package/dist/src/capabilities/shared/packageManager.js +349 -0
- package/dist/src/capabilities/shared/packageManager.js.map +1 -0
- package/dist/src/capabilities/shared/registry.js +55 -0
- package/dist/src/capabilities/shared/registry.js.map +1 -0
- package/dist/src/capabilities/skill/discover.js +281 -0
- package/dist/src/capabilities/skill/discover.js.map +1 -0
- package/dist/src/capabilities/skill/index.js +10 -0
- package/dist/src/capabilities/skill/index.js.map +1 -0
- package/dist/src/capabilities/skill/render.js +49 -0
- package/dist/src/capabilities/skill/render.js.map +1 -0
- package/dist/src/capabilities/skill/verbs.js +83 -0
- package/dist/src/capabilities/skill/verbs.js.map +1 -0
- package/dist/src/capabilities/sources/collectStatus.js +103 -0
- package/dist/src/capabilities/sources/collectStatus.js.map +1 -0
- package/dist/src/capabilities/sources/index.js +13 -0
- package/dist/src/capabilities/sources/index.js.map +1 -0
- package/dist/src/capabilities/sources/installSkills.js +309 -0
- package/dist/src/capabilities/sources/installSkills.js.map +1 -0
- package/dist/src/capabilities/sources/runUpdate.js +460 -0
- package/dist/src/capabilities/sources/runUpdate.js.map +1 -0
- package/dist/src/capabilities/sources/status.render.js +64 -0
- package/dist/src/capabilities/sources/status.render.js.map +1 -0
- package/dist/src/capabilities/sources/status.verb.js +40 -0
- package/dist/src/capabilities/sources/status.verb.js.map +1 -0
- package/dist/src/capabilities/sources/types.js +6 -0
- package/dist/src/capabilities/sources/types.js.map +1 -0
- package/dist/src/capabilities/sources/update.render.js +34 -0
- package/dist/src/capabilities/sources/update.render.js.map +1 -0
- package/dist/src/capabilities/sources/update.verb.js +55 -0
- package/dist/src/capabilities/sources/update.verb.js.map +1 -0
- package/dist/src/capabilities/upgrade/index.js +5 -0
- package/dist/src/capabilities/upgrade/index.js.map +1 -0
- package/dist/src/capabilities/upgrade/runUpgrade.js +135 -0
- package/dist/src/capabilities/upgrade/runUpgrade.js.map +1 -0
- package/dist/src/capabilities/upgrade/types.js +5 -0
- package/dist/src/capabilities/upgrade/types.js.map +1 -0
- package/dist/src/capabilities/upgrade/upgrade.render.js +52 -0
- package/dist/src/capabilities/upgrade/upgrade.render.js.map +1 -0
- package/dist/src/capabilities/upgrade/upgrade.verb.js +52 -0
- package/dist/src/capabilities/upgrade/upgrade.verb.js.map +1 -0
- package/dist/src/capabilities/version/index.js +10 -0
- package/dist/src/capabilities/version/index.js.map +1 -0
- package/dist/src/capabilities/version/version.verb.js +36 -0
- package/dist/src/capabilities/version/version.verb.js.map +1 -0
- package/dist/src/constants.js +87 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/index.js +12 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/kernel/completion/complete.js +66 -0
- package/dist/src/kernel/completion/complete.js.map +1 -0
- package/dist/src/kernel/completion/emitScripts.js +92 -0
- package/dist/src/kernel/completion/emitScripts.js.map +1 -0
- package/dist/src/kernel/completion/entitySource.js +285 -0
- package/dist/src/kernel/completion/entitySource.js.map +1 -0
- package/dist/src/kernel/completion/index.js +14 -0
- package/dist/src/kernel/completion/index.js.map +1 -0
- package/dist/src/kernel/completion/model.js +301 -0
- package/dist/src/kernel/completion/model.js.map +1 -0
- package/dist/src/kernel/completion/parse.js +253 -0
- package/dist/src/kernel/completion/parse.js.map +1 -0
- package/dist/src/kernel/completion/rank.js +101 -0
- package/dist/src/kernel/completion/rank.js.map +1 -0
- package/dist/src/kernel/completion/resolve.js +100 -0
- package/dist/src/kernel/completion/resolve.js.map +1 -0
- package/dist/src/kernel/completion/templates/bash.js +209 -0
- package/dist/src/kernel/completion/templates/bash.js.map +1 -0
- package/dist/src/kernel/completion/templates/fish.js +214 -0
- package/dist/src/kernel/completion/templates/fish.js.map +1 -0
- package/dist/src/kernel/completion/templates/index.js +23 -0
- package/dist/src/kernel/completion/templates/index.js.map +1 -0
- package/dist/src/kernel/completion/templates/shared.js +98 -0
- package/dist/src/kernel/completion/templates/shared.js.map +1 -0
- package/dist/src/kernel/completion/templates/zsh.js +201 -0
- package/dist/src/kernel/completion/templates/zsh.js.map +1 -0
- package/dist/src/kernel/completion/types.js +13 -0
- package/dist/src/kernel/completion/types.js.map +1 -0
- package/dist/src/kernel/config/defaults.js +17 -0
- package/dist/src/kernel/config/defaults.js.map +1 -0
- package/dist/src/kernel/config/evaluateProjectConfig.js +126 -0
- package/dist/src/kernel/config/evaluateProjectConfig.js.map +1 -0
- package/dist/src/kernel/config/findProjectConfig.js +43 -0
- package/dist/src/kernel/config/findProjectConfig.js.map +1 -0
- package/dist/src/kernel/config/firstRun.js +34 -0
- package/dist/src/kernel/config/firstRun.js.map +1 -0
- package/dist/src/kernel/config/globalConfig.js +79 -0
- package/dist/src/kernel/config/globalConfig.js.map +1 -0
- package/dist/src/kernel/config/index.js +16 -0
- package/dist/src/kernel/config/index.js.map +1 -0
- package/dist/src/kernel/config/paths.js +35 -0
- package/dist/src/kernel/config/paths.js.map +1 -0
- package/dist/src/kernel/config/readConfig.js +78 -0
- package/dist/src/kernel/config/readConfig.js.map +1 -0
- package/dist/src/kernel/config/schema.js +130 -0
- package/dist/src/kernel/config/schema.js.map +1 -0
- package/dist/src/kernel/config/types.js +19 -0
- package/dist/src/kernel/config/types.js.map +1 -0
- package/dist/src/kernel/config/writeConfigField.js +59 -0
- package/dist/src/kernel/config/writeConfigField.js.map +1 -0
- package/dist/src/kernel/copy.js +43 -0
- package/dist/src/kernel/copy.js.map +1 -0
- package/dist/src/kernel/error/PragmaError.js +149 -0
- package/dist/src/kernel/error/PragmaError.js.map +1 -0
- package/dist/src/kernel/error/constants.js +40 -0
- package/dist/src/kernel/error/constants.js.map +1 -0
- package/dist/src/kernel/error/fromTaskError.js +96 -0
- package/dist/src/kernel/error/fromTaskError.js.map +1 -0
- package/dist/src/kernel/error/index.js +13 -0
- package/dist/src/kernel/error/index.js.map +1 -0
- package/dist/src/kernel/error/recovery.js +52 -0
- package/dist/src/kernel/error/recovery.js.map +1 -0
- package/dist/src/kernel/error/renderError.js +115 -0
- package/dist/src/kernel/error/renderError.js.map +1 -0
- package/dist/src/kernel/error/serialize.js +25 -0
- package/dist/src/kernel/error/serialize.js.map +1 -0
- package/dist/src/kernel/error/types.js +9 -0
- package/dist/src/kernel/error/types.js.map +1 -0
- package/dist/src/kernel/index.js +34 -0
- package/dist/src/kernel/index.js.map +1 -0
- package/dist/src/kernel/interactivity.js +68 -0
- package/dist/src/kernel/interactivity.js.map +1 -0
- package/dist/src/kernel/packs/collect.js +187 -0
- package/dist/src/kernel/packs/collect.js.map +1 -0
- package/dist/src/kernel/packs/compile.js +304 -0
- package/dist/src/kernel/packs/compile.js.map +1 -0
- package/dist/src/kernel/packs/disclosure.js +76 -0
- package/dist/src/kernel/packs/disclosure.js.map +1 -0
- package/dist/src/kernel/packs/glob.js +38 -0
- package/dist/src/kernel/packs/glob.js.map +1 -0
- package/dist/src/kernel/packs/graphql/buildLookupDocument.js +258 -0
- package/dist/src/kernel/packs/graphql/buildLookupDocument.js.map +1 -0
- package/dist/src/kernel/packs/graphql/fetchGraphqlLookup.js +157 -0
- package/dist/src/kernel/packs/graphql/fetchGraphqlLookup.js.map +1 -0
- package/dist/src/kernel/packs/graphql/index.js +20 -0
- package/dist/src/kernel/packs/graphql/index.js.map +1 -0
- package/dist/src/kernel/packs/graphql/nameMap.js +63 -0
- package/dist/src/kernel/packs/graphql/nameMap.js.map +1 -0
- package/dist/src/kernel/packs/index.js +34 -0
- package/dist/src/kernel/packs/index.js.map +1 -0
- package/dist/src/kernel/packs/iri.js +110 -0
- package/dist/src/kernel/packs/iri.js.map +1 -0
- package/dist/src/kernel/packs/renderPack.js +129 -0
- package/dist/src/kernel/packs/renderPack.js.map +1 -0
- package/dist/src/kernel/packs/resolveEntity.js +274 -0
- package/dist/src/kernel/packs/resolveEntity.js.map +1 -0
- package/dist/src/kernel/packs/runBodies.js +140 -0
- package/dist/src/kernel/packs/runBodies.js.map +1 -0
- package/dist/src/kernel/packs/sample.js +56 -0
- package/dist/src/kernel/packs/sample.js.map +1 -0
- package/dist/src/kernel/packs/schema.js +421 -0
- package/dist/src/kernel/packs/schema.js.map +1 -0
- package/dist/src/kernel/packs/sparql/applyFilters.js +167 -0
- package/dist/src/kernel/packs/sparql/applyFilters.js.map +1 -0
- package/dist/src/kernel/packs/sparql/applySearch.js +25 -0
- package/dist/src/kernel/packs/sparql/applySearch.js.map +1 -0
- package/dist/src/kernel/packs/sparql/buildLookupQuery.js +480 -0
- package/dist/src/kernel/packs/sparql/buildLookupQuery.js.map +1 -0
- package/dist/src/kernel/packs/sparql/escape.js +21 -0
- package/dist/src/kernel/packs/sparql/escape.js.map +1 -0
- package/dist/src/kernel/packs/sparql/index.js +31 -0
- package/dist/src/kernel/packs/sparql/index.js.map +1 -0
- package/dist/src/kernel/packs/sparql/runSelect.js +101 -0
- package/dist/src/kernel/packs/sparql/runSelect.js.map +1 -0
- package/dist/src/kernel/packs/types.js +30 -0
- package/dist/src/kernel/packs/types.js.map +1 -0
- package/dist/src/kernel/packs/uniqueness.js +30 -0
- package/dist/src/kernel/packs/uniqueness.js.map +1 -0
- package/dist/src/kernel/project/cli/buildProgram.js +263 -0
- package/dist/src/kernel/project/cli/buildProgram.js.map +1 -0
- package/dist/src/kernel/project/cli/constants.js +27 -0
- package/dist/src/kernel/project/cli/constants.js.map +1 -0
- package/dist/src/kernel/project/cli/dispatch.js +420 -0
- package/dist/src/kernel/project/cli/dispatch.js.map +1 -0
- package/dist/src/kernel/project/cli/exitCodes.js +66 -0
- package/dist/src/kernel/project/cli/exitCodes.js.map +1 -0
- package/dist/src/kernel/project/cli/globalFlags.js +219 -0
- package/dist/src/kernel/project/cli/globalFlags.js.map +1 -0
- package/dist/src/kernel/project/cli/helpFormat.js +58 -0
- package/dist/src/kernel/project/cli/helpFormat.js.map +1 -0
- package/dist/src/kernel/project/cli/index.js +14 -0
- package/dist/src/kernel/project/cli/index.js.map +1 -0
- package/dist/src/kernel/project/cli/rootHelp.js +227 -0
- package/dist/src/kernel/project/cli/rootHelp.js.map +1 -0
- package/dist/src/kernel/project/cli/suggest.js +75 -0
- package/dist/src/kernel/project/cli/suggest.js.map +1 -0
- package/dist/src/kernel/project/cli/suggestNames.js +96 -0
- package/dist/src/kernel/project/cli/suggestNames.js.map +1 -0
- package/dist/src/kernel/project/cli/verbHelp.js +131 -0
- package/dist/src/kernel/project/cli/verbHelp.js.map +1 -0
- package/dist/src/kernel/project/mcp/buildServer.js +67 -0
- package/dist/src/kernel/project/mcp/buildServer.js.map +1 -0
- package/dist/src/kernel/project/mcp/envelope.js +37 -0
- package/dist/src/kernel/project/mcp/envelope.js.map +1 -0
- package/dist/src/kernel/project/mcp/index.js +8 -0
- package/dist/src/kernel/project/mcp/index.js.map +1 -0
- package/dist/src/kernel/project/mcp/instructions.js +44 -0
- package/dist/src/kernel/project/mcp/instructions.js.map +1 -0
- package/dist/src/kernel/project/mcp/mcpError.js +42 -0
- package/dist/src/kernel/project/mcp/mcpError.js.map +1 -0
- package/dist/src/kernel/project/mcp/prompts/index.js +36 -0
- package/dist/src/kernel/project/mcp/prompts/index.js.map +1 -0
- package/dist/src/kernel/project/mcp/prompts/provider.js +98 -0
- package/dist/src/kernel/project/mcp/prompts/provider.js.map +1 -0
- package/dist/src/kernel/project/mcp/prompts/source.js +154 -0
- package/dist/src/kernel/project/mcp/prompts/source.js.map +1 -0
- package/dist/src/kernel/project/mcp/registerVerb.js +315 -0
- package/dist/src/kernel/project/mcp/registerVerb.js.map +1 -0
- package/dist/src/kernel/project/mcp/serve.js +35 -0
- package/dist/src/kernel/project/mcp/serve.js.map +1 -0
- package/dist/src/kernel/render/compactUri.js +24 -0
- package/dist/src/kernel/render/compactUri.js.map +1 -0
- package/dist/src/kernel/render/contracts.js +10 -0
- package/dist/src/kernel/render/contracts.js.map +1 -0
- package/dist/src/kernel/render/disclosure.js +34 -0
- package/dist/src/kernel/render/disclosure.js.map +1 -0
- package/dist/src/kernel/render/envelope.js +30 -0
- package/dist/src/kernel/render/envelope.js.map +1 -0
- package/dist/src/kernel/render/formatters.js +27 -0
- package/dist/src/kernel/render/formatters.js.map +1 -0
- package/dist/src/kernel/render/index.js +15 -0
- package/dist/src/kernel/render/index.js.map +1 -0
- package/dist/src/kernel/render/prefixes.js +46 -0
- package/dist/src/kernel/render/prefixes.js.map +1 -0
- package/dist/src/kernel/render/renderers.js +468 -0
- package/dist/src/kernel/render/renderers.js.map +1 -0
- package/dist/src/kernel/render/style.js +105 -0
- package/dist/src/kernel/render/style.js.map +1 -0
- package/dist/src/kernel/render/turtle.js +194 -0
- package/dist/src/kernel/render/turtle.js.map +1 -0
- package/dist/src/kernel/render/vocabulary.js +174 -0
- package/dist/src/kernel/render/vocabulary.js.map +1 -0
- package/dist/src/kernel/render/writeStdout.js +43 -0
- package/dist/src/kernel/render/writeStdout.js.map +1 -0
- package/dist/src/kernel/runtime/boot.js +49 -0
- package/dist/src/kernel/runtime/boot.js.map +1 -0
- package/dist/src/kernel/runtime/facade.js +39 -0
- package/dist/src/kernel/runtime/facade.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/build.js +122 -0
- package/dist/src/kernel/runtime/graphpack/build.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/buildIndex.js +303 -0
- package/dist/src/kernel/runtime/graphpack/buildIndex.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/embedded/pack.generated.js +6 -0
- package/dist/src/kernel/runtime/graphpack/embedded/pack.generated.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/embedded/pack.index.generated.js +4 -0
- package/dist/src/kernel/runtime/graphpack/embedded/pack.index.generated.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/embedded/pack.stories.generated.js +4 -0
- package/dist/src/kernel/runtime/graphpack/embedded/pack.stories.generated.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/embedded.js +82 -0
- package/dist/src/kernel/runtime/graphpack/embedded.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/hash.js +38 -0
- package/dist/src/kernel/runtime/graphpack/hash.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/index.js +11 -0
- package/dist/src/kernel/runtime/graphpack/index.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/manifest.js +145 -0
- package/dist/src/kernel/runtime/graphpack/manifest.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/read.js +92 -0
- package/dist/src/kernel/runtime/graphpack/read.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/schemas.js +70 -0
- package/dist/src/kernel/runtime/graphpack/schemas.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/stories.js +68 -0
- package/dist/src/kernel/runtime/graphpack/stories.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/types.js +55 -0
- package/dist/src/kernel/runtime/graphpack/types.js.map +1 -0
- package/dist/src/kernel/runtime/index.js +8 -0
- package/dist/src/kernel/runtime/index.js.map +1 -0
- package/dist/src/kernel/runtime/loadSession.js +34 -0
- package/dist/src/kernel/runtime/loadSession.js.map +1 -0
- package/dist/src/kernel/runtime/paths.js +78 -0
- package/dist/src/kernel/runtime/paths.js.map +1 -0
- package/dist/src/kernel/runtime/probe.js +37 -0
- package/dist/src/kernel/runtime/probe.js.map +1 -0
- package/dist/src/kernel/runtime/readEntity.js +363 -0
- package/dist/src/kernel/runtime/readEntity.js.map +1 -0
- package/dist/src/kernel/runtime/refs/gitOps.js +65 -0
- package/dist/src/kernel/runtime/refs/gitOps.js.map +1 -0
- package/dist/src/kernel/runtime/refs/index.js +29 -0
- package/dist/src/kernel/runtime/refs/index.js.map +1 -0
- package/dist/src/kernel/runtime/refs/parseRef.js +70 -0
- package/dist/src/kernel/runtime/refs/parseRef.js.map +1 -0
- package/dist/src/kernel/runtime/refs/resolve.js +332 -0
- package/dist/src/kernel/runtime/refs/resolve.js.map +1 -0
- package/dist/src/kernel/runtime/resolveSources.js +62 -0
- package/dist/src/kernel/runtime/resolveSources.js.map +1 -0
- package/dist/src/kernel/runtime/store.js +75 -0
- package/dist/src/kernel/runtime/store.js.map +1 -0
- package/dist/src/kernel/runtime/storeReadiness.js +51 -0
- package/dist/src/kernel/runtime/storeReadiness.js.map +1 -0
- package/dist/src/kernel/runtime/types.js +11 -0
- package/dist/src/kernel/runtime/types.js.map +1 -0
- package/dist/src/kernel/spec/asVerb.js +21 -0
- package/dist/src/kernel/spec/asVerb.js.map +1 -0
- package/dist/src/kernel/spec/emitReference.js +578 -0
- package/dist/src/kernel/spec/emitReference.js.map +1 -0
- package/dist/src/kernel/spec/emitSurface.js +202 -0
- package/dist/src/kernel/spec/emitSurface.js.map +1 -0
- package/dist/src/kernel/spec/index.js +11 -0
- package/dist/src/kernel/spec/index.js.map +1 -0
- package/dist/src/kernel/spec/surfaceConformance.js +103 -0
- package/dist/src/kernel/spec/surfaceConformance.js.map +1 -0
- package/dist/src/kernel/spec/types.js +14 -0
- package/dist/src/kernel/spec/types.js.map +1 -0
- package/dist/src/kernel/spec/validate.js +110 -0
- package/dist/src/kernel/spec/validate.js.map +1 -0
- package/dist/src/kernel/vocabulary.js +97 -0
- package/dist/src/kernel/vocabulary.js.map +1 -0
- package/dist/src/types.js +11 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +22 -23
- package/pragma.conf.ts +486 -90
- package/src/bin.ts +274 -82
- package/src/capabilities/block.parity.test.ts +29 -12
- package/src/capabilities/block.shipped.exec.test.ts +282 -0
- package/src/capabilities/block.tierRank.exec.test.ts +300 -0
- package/src/capabilities/capabilities/capabilities.render.ts +1 -1
- package/src/capabilities/capabilities/capabilities.verb.ts +1 -1
- package/src/capabilities/capabilities/catalog.ts +3 -3
- package/src/capabilities/capabilities/hints.ts +32 -7
- package/src/capabilities/capabilities/index.ts +1 -1
- package/src/capabilities/colophon/collectColophon.ts +35 -24
- package/src/capabilities/colophon/colophon.render.ts +24 -1
- package/src/capabilities/colophon/colophon.test.ts +42 -21
- package/src/capabilities/colophon/colophon.verb.ts +4 -4
- package/src/capabilities/config/collectConfigShow.test.ts +1 -0
- package/src/capabilities/config/collectConfigShow.ts +3 -3
- package/src/capabilities/config/field.render.ts +4 -5
- package/src/capabilities/config/fields.ts +17 -10
- package/src/capabilities/config/get.verb.ts +70 -0
- package/src/capabilities/config/getUnset.test.ts +264 -0
- package/src/capabilities/config/index.ts +5 -1
- package/src/capabilities/config/runField.ts +40 -22
- package/src/capabilities/config/runGet.ts +34 -0
- package/src/capabilities/config/runSet.ts +35 -9
- package/src/capabilities/config/set.test.ts +48 -14
- package/src/capabilities/config/set.verb.ts +8 -7
- package/src/capabilities/config/show.render.ts +1 -1
- package/src/capabilities/config/show.verb.ts +9 -6
- package/src/capabilities/config/types.ts +18 -4
- package/src/capabilities/config/unset.verb.ts +58 -0
- package/src/capabilities/create/byteEquality.subprocess.test.ts +2 -3
- package/src/capabilities/create/byteEquality.test.ts +25 -11
- package/src/capabilities/create/cliProjection.ts +227 -0
- package/src/capabilities/create/constants.ts +36 -61
- package/src/capabilities/create/create.mcp.test.ts +89 -5
- package/src/capabilities/create/create.render.ts +71 -7
- package/src/capabilities/create/create.test.ts +433 -219
- package/src/capabilities/create/create.verb.ts +297 -328
- package/src/capabilities/create/createGrammar.test.ts +865 -0
- package/src/capabilities/create/createHelp.ts +71 -0
- package/src/capabilities/create/createSurface.generated.ts +400 -0
- package/src/capabilities/create/crossCli.subprocess.test.ts +745 -0
- package/src/capabilities/create/cwdJail.test.ts +24 -5
- package/src/capabilities/create/generatorToVerbSpec.test.ts +186 -0
- package/src/capabilities/create/generatorToVerbSpec.ts +13 -11
- package/src/capabilities/create/index.ts +7 -4
- package/src/capabilities/create/messages.ts +18 -0
- package/src/capabilities/create/mount.ts +391 -0
- package/src/capabilities/create/pathJail.test.ts +90 -0
- package/src/capabilities/create/pathJail.ts +8 -5
- package/src/capabilities/create/pickGenerator.ts +23 -35
- package/src/capabilities/create/shippedCreate.subprocess.test.ts +164 -0
- package/src/capabilities/create/types.ts +20 -0
- package/src/capabilities/distribution.parity.test.ts +4 -0
- package/src/capabilities/distribution.test.ts +3 -1
- package/src/capabilities/distribution.ts +10 -15
- package/src/capabilities/doctor/checks/checkKeStore.ts +7 -5
- package/src/capabilities/doctor/checks/checkPackageRefs.ts +75 -8
- package/src/capabilities/doctor/checks/checkPragmaVersion.ts +2 -2
- package/src/capabilities/doctor/checks/checkShellCompletions.test.ts +76 -29
- package/src/capabilities/doctor/checks/checkShellCompletions.ts +63 -17
- package/src/capabilities/doctor/checks/harnessInventory.test.ts +219 -0
- package/src/capabilities/doctor/checks/harnessInventory.ts +298 -0
- package/src/capabilities/doctor/checks/index.ts +27 -0
- package/src/capabilities/doctor/checks/mcpCommand.test.ts +100 -0
- package/src/capabilities/doctor/checks/mcpCommand.ts +69 -0
- package/src/capabilities/doctor/checks/targetHealth.ts +444 -0
- package/src/capabilities/doctor/doctor.render.test.ts +125 -38
- package/src/capabilities/doctor/doctor.render.ts +74 -74
- package/src/capabilities/doctor/doctor.test.ts +338 -37
- package/src/capabilities/doctor/doctor.verb.ts +8 -3
- package/src/capabilities/doctor/runChecks.ts +65 -63
- package/src/capabilities/doctor/types.ts +22 -15
- package/src/capabilities/emptyRecovery.test.ts +21 -8
- package/src/capabilities/graph/examples.exec.test.ts +107 -0
- package/src/capabilities/graph/index.ts +1 -1
- package/src/capabilities/graph/inspect.render.ts +70 -22
- package/src/capabilities/graph/inspect.test.ts +260 -5
- package/src/capabilities/graph/inspect.verb.ts +18 -6
- package/src/capabilities/graph/query.render.ts +15 -3
- package/src/capabilities/graph/query.verb.ts +3 -3
- package/src/capabilities/graph/runQuery.ts +2 -3
- package/src/capabilities/index.ts +3 -1
- package/src/capabilities/info/collectInfo.ts +13 -5
- package/src/capabilities/info/info.render.ts +7 -3
- package/src/capabilities/info/info.test.ts +37 -1
- package/src/capabilities/info/info.verb.ts +1 -1
- package/src/capabilities/info/types.ts +10 -2
- package/src/capabilities/lazy.test.ts +32 -0
- package/src/capabilities/meta/complete.verb.ts +1 -1
- package/src/capabilities/meta/index.ts +1 -1
- package/src/capabilities/meta/mcp.verb.ts +10 -8
- package/src/capabilities/ontology/index.ts +15 -11
- package/src/capabilities/ontology/ontology.test.ts +6 -55
- package/src/capabilities/ontology/queries.ts +2 -2
- package/src/capabilities/ontology/render.ts +3 -4
- package/src/capabilities/ontology/verbs.ts +27 -68
- package/src/capabilities/prompt/index.ts +2 -2
- package/src/capabilities/prompt/prompt.render.ts +6 -2
- package/src/capabilities/prompt/types.ts +1 -1
- package/src/capabilities/prompt/verbs.ts +4 -5
- package/src/capabilities/reference.test.ts +63 -0
- package/src/capabilities/renderVocabularySync.test.ts +82 -0
- package/src/capabilities/resources/provider.ts +342 -85
- package/src/capabilities/resources/resources.test.ts +355 -59
- package/src/capabilities/scopeTypeSync.test.ts +29 -15
- package/src/capabilities/setup/buildPlan.ts +240 -0
- package/src/capabilities/setup/index.ts +7 -7
- package/src/capabilities/setup/mode.ts +74 -0
- package/src/capabilities/setup/operations/index.ts +79 -0
- package/src/capabilities/setup/operations/setupCompletions.ts +97 -24
- package/src/capabilities/setup/operations/setupConfig.ts +124 -0
- package/src/capabilities/setup/operations/setupGenerator.ts +478 -334
- package/src/capabilities/setup/operations/setupLsp.ts +420 -67
- package/src/capabilities/setup/operations/setupMcp.ts +238 -127
- package/src/capabilities/setup/operations/setupSkills.ts +667 -105
- package/src/capabilities/setup/plan.render.ts +336 -0
- package/src/capabilities/setup/plan.ts +241 -0
- package/src/capabilities/setup/setup.mcp.correctness.test.ts +432 -0
- package/src/capabilities/setup/setup.render.test.ts +297 -75
- package/src/capabilities/setup/setup.render.ts +45 -77
- package/src/capabilities/setup/setup.test.ts +1819 -225
- package/src/capabilities/setup/setup.verb.ts +288 -78
- package/src/capabilities/setup/shell.test.ts +86 -0
- package/src/capabilities/setup/shell.ts +137 -11
- package/src/capabilities/setup/targets.ts +435 -0
- package/src/capabilities/setup/types.ts +23 -70
- package/src/capabilities/shared/assertExecOk.ts +68 -10
- package/src/capabilities/shared/index.ts +43 -0
- package/src/capabilities/shared/packageManager.test.ts +470 -0
- package/src/capabilities/shared/packageManager.ts +425 -34
- package/src/capabilities/skill/bundledSkills.test.ts +347 -0
- package/src/capabilities/skill/discover.ts +131 -10
- package/src/capabilities/skill/index.ts +1 -1
- package/src/capabilities/skill/render.ts +10 -9
- package/src/capabilities/skill/skill.test.ts +22 -7
- package/src/capabilities/skill/verbs.ts +3 -4
- package/src/capabilities/sources/collectStatus.ts +7 -2
- package/src/capabilities/sources/index.ts +1 -1
- package/src/capabilities/sources/installSkills.ts +265 -10
- package/src/capabilities/sources/runUpdate.ts +131 -23
- package/src/capabilities/sources/sources.test.ts +382 -2
- package/src/capabilities/sources/status.render.ts +1 -1
- package/src/capabilities/sources/status.verb.ts +1 -1
- package/src/capabilities/sources/update.render.ts +1 -1
- package/src/capabilities/sources/update.verb.ts +4 -4
- package/src/capabilities/surface.test.ts +136 -19
- package/src/capabilities/upgrade/runUpgrade.ts +53 -14
- package/src/capabilities/upgrade/types.ts +10 -2
- package/src/capabilities/upgrade/upgrade.render.ts +13 -7
- package/src/capabilities/upgrade/upgrade.test.ts +75 -3
- package/src/capabilities/upgrade/upgrade.verb.ts +1 -1
- package/src/capabilities/version/index.ts +12 -0
- package/src/capabilities/version/version.test.ts +66 -0
- package/src/capabilities/version/version.verb.ts +39 -0
- package/src/constants.ts +36 -1
- package/src/identity.test.ts +57 -29
- package/src/kernel/completion/__snapshots__/emitScripts.test.ts.snap +15 -13
- package/src/kernel/completion/complete.test.ts +12 -2
- package/src/kernel/completion/complete.ts +1 -1
- package/src/kernel/completion/emitScripts.ts +1 -1
- package/src/kernel/completion/entitySource.test.ts +16 -3
- package/src/kernel/completion/entitySource.ts +21 -8
- package/src/kernel/completion/model.test.ts +164 -12
- package/src/kernel/completion/model.ts +94 -14
- package/src/kernel/completion/parse.test.ts +4 -7
- package/src/kernel/completion/parse.ts +15 -0
- package/src/kernel/completion/resolve.test.ts +0 -1
- package/src/kernel/completion/safety.test.ts +50 -35
- package/src/kernel/completion/shellDrive.test.ts +28 -9
- package/src/kernel/completion/templates/bash.ts +7 -2
- package/src/kernel/completion/templates/index.ts +23 -0
- package/src/kernel/completion/types.ts +7 -0
- package/src/kernel/config/defaults.test.ts +27 -3
- package/src/kernel/config/defaults.ts +4 -3
- package/src/kernel/config/evaluateProjectConfig.ts +31 -8
- package/src/kernel/config/firstRun.test.ts +44 -38
- package/src/kernel/config/firstRun.ts +24 -88
- package/src/kernel/config/index.ts +1 -1
- package/src/kernel/config/readConfig.test.ts +6 -3
- package/src/kernel/config/readConfig.ts +1 -1
- package/src/kernel/config/schema.ts +3 -1
- package/src/kernel/config/types.ts +3 -1
- package/src/kernel/copy.test.ts +34 -4
- package/src/kernel/copy.ts +54 -0
- package/src/kernel/error/PragmaError.test.ts +5 -2
- package/src/kernel/error/PragmaError.ts +4 -2
- package/src/kernel/error/constants.ts +7 -5
- package/src/kernel/error/fromTaskError.ts +28 -6
- package/src/kernel/error/recovery.ts +14 -0
- package/src/kernel/error/renderError.ts +42 -1
- package/src/kernel/error/types.ts +21 -1
- package/src/kernel/index.ts +35 -0
- package/src/kernel/interactivity.test.ts +76 -0
- package/src/kernel/interactivity.ts +69 -0
- package/src/kernel/packs/collect.ts +12 -16
- package/src/kernel/packs/compile.test.ts +222 -1
- package/src/kernel/packs/compile.ts +93 -3
- package/src/kernel/packs/disclosure.ts +2 -2
- package/src/kernel/packs/graphql/buildLookupDocument.ts +1 -1
- package/src/kernel/packs/graphql/fetchGraphqlLookup.ts +3 -4
- package/src/kernel/packs/graphql/index.ts +20 -0
- package/src/kernel/packs/index.ts +40 -0
- package/src/kernel/packs/iri.test.ts +73 -0
- package/src/kernel/packs/iri.ts +66 -14
- package/src/kernel/packs/renderPack.ts +25 -6
- package/src/kernel/packs/resolveEntity.test.ts +274 -0
- package/src/kernel/packs/resolveEntity.ts +200 -42
- package/src/kernel/packs/runBodies.ts +86 -22
- package/src/kernel/packs/sample.ts +1 -1
- package/src/kernel/packs/schema.ts +78 -5
- package/src/kernel/packs/sparql/applyFilters.ts +136 -16
- package/src/kernel/packs/sparql/buildLookupQuery.test.ts +290 -0
- package/src/kernel/packs/sparql/buildLookupQuery.ts +367 -17
- package/src/kernel/packs/sparql/index.ts +37 -0
- package/src/kernel/packs/sparql/runSelect.test.ts +1 -1
- package/src/kernel/packs/sparql/runSelect.ts +3 -4
- package/src/kernel/packs/toolDescription.test.ts +77 -4
- package/src/kernel/packs/types.ts +136 -0
- package/src/kernel/packs/uniqueness.ts +1 -1
- package/src/kernel/project/cli/buildProgram.test.ts +218 -12
- package/src/kernel/project/cli/buildProgram.ts +84 -18
- package/src/kernel/project/cli/constants.ts +34 -0
- package/src/kernel/project/cli/dispatch.test.ts +160 -2
- package/src/kernel/project/cli/dispatch.ts +226 -45
- package/src/kernel/project/cli/exitCodes.ts +1 -1
- package/src/kernel/project/cli/globalFlags.test.ts +117 -1
- package/src/kernel/project/cli/globalFlags.ts +134 -31
- package/src/kernel/project/cli/helpFormat.ts +14 -2
- package/src/kernel/project/cli/rootHelp.ts +74 -12
- package/src/kernel/project/cli/suggest.test.ts +33 -1
- package/src/kernel/project/cli/suggest.ts +25 -1
- package/src/kernel/project/cli/verbHelp.test.ts +30 -0
- package/src/kernel/project/cli/verbHelp.ts +23 -7
- package/src/kernel/project/mcp/buildServer.ts +7 -4
- package/src/kernel/project/mcp/envelope.ts +2 -2
- package/src/kernel/project/mcp/instructions.ts +2 -2
- package/src/kernel/project/mcp/mcpError.ts +1 -1
- package/src/kernel/project/mcp/parity.test.ts +5 -2
- package/src/kernel/project/mcp/prompts/index.ts +37 -0
- package/src/kernel/project/mcp/prompts/source.ts +2 -2
- package/src/kernel/project/mcp/registerVerb.ts +55 -10
- package/src/kernel/project/mcp/serve.ts +2 -2
- package/src/kernel/render/__snapshots__/renderers.test.ts.snap +7 -4
- package/src/kernel/render/contracts.ts +21 -0
- package/src/kernel/render/envelope.ts +2 -3
- package/src/kernel/render/formatters.ts +1 -1
- package/src/kernel/render/renderers.test.ts +243 -6
- package/src/kernel/render/renderers.ts +222 -20
- package/src/kernel/render/style.test.ts +75 -24
- package/src/kernel/render/style.ts +59 -6
- package/src/kernel/render/turtle.ts +222 -0
- package/src/kernel/render/vocabulary.ts +276 -0
- package/src/kernel/runtime/graphpack/buildIndex.ts +1 -1
- package/src/kernel/runtime/graphpack/embedded/pack.generated.ts +3 -3
- package/src/kernel/runtime/graphpack/embedded/pack.index.generated.ts +1 -1
- package/src/kernel/runtime/graphpack/embedded.ts +3 -3
- package/src/kernel/runtime/graphpack/manifest.ts +1 -1
- package/src/kernel/runtime/graphpack/read.ts +1 -2
- package/src/kernel/runtime/loadSession.ts +1 -1
- package/src/kernel/runtime/probe.ts +6 -6
- package/src/kernel/runtime/readEntity.ts +472 -28
- package/src/kernel/runtime/refs/index.ts +39 -0
- package/src/kernel/runtime/refs/parseRef.ts +2 -2
- package/src/kernel/runtime/refs/resolve.ts +4 -4
- package/src/kernel/runtime/storeReadiness.ts +1 -2
- package/src/kernel/runtime/types.ts +15 -1
- package/src/kernel/runtime/wasmEmbed.test.ts +37 -39
- package/src/kernel/spec/emitReference.ts +105 -30
- package/src/kernel/spec/emitSurface.ts +48 -6
- package/src/kernel/spec/surfaceConformance.test.ts +4 -2
- package/src/kernel/spec/types.ts +277 -4
- package/src/testing/PARITY_GAPS.ts +9 -3
- package/src/testing/behavioral/docExamples.test.ts +16 -0
- package/src/testing/behavioral/errorMatrix.mcp.test.ts +112 -9
- package/src/testing/behavioral/firstRun.e2e.test.ts +24 -24
- package/src/testing/behavioral/journeys.cli.test.ts +1 -1
- package/src/testing/behavioral/journeys.defaultPack.test.ts +7 -7
- package/src/testing/behavioral/journeys.firstInstall.test.ts +7 -2
- package/src/testing/behavioral/journeys.implementation.test.ts +206 -0
- package/src/testing/behavioral/journeys.interactiveTty.e2e.test.ts +2 -2
- package/src/testing/behavioral/journeys.packageStories.test.ts +10 -7
- package/src/testing/behavioral/mcpServe.e2e.test.ts +57 -2
- package/src/testing/behavioral/mcpSurface.test.ts +1 -1
- package/src/testing/behavioral/rootCli.e2e.test.ts +26 -2
- package/src/testing/eval/__snapshots__/eval.test.ts.snap +26 -1
- package/src/testing/eval/cases/effectful.ts +3 -2
- package/src/testing/eval/cases/readNouns.ts +245 -9
- package/src/testing/fixtures/blockGraph.ts +104 -10
- package/src/testing/fixtures/graph/canonical.ts +182 -13
- package/src/testing/fixtures/graph/defaultPack.ts +1 -1
- package/src/testing/helpers/blankCanonicalRanges.ts +36 -0
- package/src/testing/helpers/projectMcp.ts +32 -6
- package/src/testing/helpers/runCli.ts +35 -18
- package/src/testing/perf/budgets.test.ts +20 -9
- package/src/testing/perf/budgets.ts +58 -9
- package/src/testing/perf/codegen.test.ts +126 -0
- package/src/testing/perf/globalSetup.test.ts +286 -0
- package/src/testing/perf/globalSetup.ts +505 -23
- package/src/testing/perf/measure.test.ts +38 -0
- package/src/testing/perf/measure.ts +23 -4
- package/src/testing/setupXdgIsolation.ts +81 -21
- package/src/testing/tempRoot.globalSetup.ts +122 -0
- package/dist/pragma +0 -0
- package/src/capabilities/create/compiledCreate.subprocess.test.ts +0 -189
- package/src/capabilities/create/templates.embedded.generated.ts +0 -28
- package/src/capabilities/doctor/checks/checkConfigFile.ts +0 -42
- package/src/capabilities/doctor/checks/checkMcpCommands.ts +0 -114
- package/src/capabilities/doctor/checks/checkMcpConfigured.ts +0 -68
- package/src/capabilities/doctor/checks/checkSkillsSymlinked.ts +0 -61
- package/src/capabilities/doctor/checks/deriveBand.test.ts +0 -42
- package/src/capabilities/doctor/checks/deriveBand.ts +0 -28
- package/src/capabilities/shared/bands.ts +0 -16
- package/src/kernel/config/__snapshots__/firstRun.test.ts.snap +0 -11
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Synthesize a setup invocation as a summon `GeneratorDefinition` driven by the
|
|
3
|
+
* TARGET TABLE, so the run-all and every sub-verb flow through the same
|
|
4
|
+
* `execute` seam `create` uses — inheriting the Ink wizard, the recap/confirm
|
|
5
|
+
* gate, live progress, colours, and the shared cancel fixes by construction.
|
|
6
|
+
*
|
|
7
|
+
* The shape mirrors `create`: detection runs FOR REAL up front (once per
|
|
8
|
+
* target/scope, in `detectTargets`), then a PURE `generate` composes only the
|
|
9
|
+
* effects for the SELECTED rows. `generate` must stay re-interpretable —
|
|
10
|
+
* `execute` invokes it more than once (the confirm-gate preview and the build) —
|
|
11
|
+
* so it is composed from combinators and does no reads of its own.
|
|
12
|
+
*
|
|
13
|
+
* The wizard is the PLAN'S EDITOR, not a parallel path: its choices are the plan
|
|
14
|
+
* rows, and what it edits is each row's `selected` flag. There is exactly one
|
|
15
|
+
* list of things this command can do, and the preview, the wizard, the progress
|
|
16
|
+
* lines and the recap are four views of it.
|
|
17
|
+
*
|
|
18
|
+
* This module carries NO static import of `@canonical/summon-core` VALUES or of
|
|
19
|
+
* React/Ink — it only `import type`s the generator shape and builds plain object
|
|
20
|
+
* literals over `@canonical/task`. It is itself reached only through the verb's
|
|
21
|
+
* lazy dynamic import, so the fast paths stay free of it.
|
|
22
|
+
*/
|
|
23
|
+
import { flatMap, pure, recover, sequence_, warn, } from "@canonical/task";
|
|
24
|
+
import { BIN_NAME } from "../../../constants.js";
|
|
25
|
+
import { PragmaError } from "../../../kernel/error/index.js";
|
|
26
|
+
import { buildPlan, detectionFailure, detectTargets, draftFor, resolveRoots, } from "../buildPlan.js";
|
|
27
|
+
import { isActionable, TARGET_IDS, withRows, } from "../plan.js";
|
|
28
|
+
/** The answer key the run-all's row multiselect writes. */
|
|
29
|
+
const ROWS_ANSWER = "targets";
|
|
30
|
+
/** The answer key the opt-in per-file MCP narrowing writes. */
|
|
31
|
+
const MCP_FILES_ANSWER = "mcpTargets";
|
|
32
|
+
/** The answer key the opt-in per-editor LSP narrowing writes. */
|
|
33
|
+
const LSP_EDITORS_ANSWER = "lspEditors";
|
|
34
|
+
/** Which answer key carries a target's per-child selection, if it has one. */
|
|
35
|
+
const CHILD_ANSWER = {
|
|
36
|
+
mcp: MCP_FILES_ANSWER,
|
|
37
|
+
lsp: LSP_EDITORS_ANSWER,
|
|
38
|
+
};
|
|
39
|
+
/** A row's identity in an answer bag: scope-qualified, so `both` stays unambiguous. */
|
|
40
|
+
const rowKey = (scope, target) => `${scope}:${target}`;
|
|
41
|
+
/**
|
|
42
|
+
* Where a failed row's error lands during interpretation.
|
|
43
|
+
*
|
|
44
|
+
* Per-row failure isolation needs somewhere to put "row X failed with Y", and
|
|
45
|
+
* `execute` yields only the generator's answers and effects — the value of the
|
|
46
|
+
* composed task is discarded. So the recover handlers record here, and the head
|
|
47
|
+
* of the sequence CLEARS it: `generate` is invoked fresh per interpretation, so
|
|
48
|
+
* the clear runs first on every drive and the last drive (the real one, which
|
|
49
|
+
* follows `execute`'s mocked preview) is the one whose records survive. The
|
|
50
|
+
* composition itself stays pure and re-interpretable — nothing is captured in
|
|
51
|
+
* the task, only written while it runs.
|
|
52
|
+
*/
|
|
53
|
+
class OutcomeSink {
|
|
54
|
+
errors = new Map();
|
|
55
|
+
/** Forget every recorded failure — run at the head of each interpretation. */
|
|
56
|
+
clear() {
|
|
57
|
+
this.errors.clear();
|
|
58
|
+
}
|
|
59
|
+
record(key, error) {
|
|
60
|
+
this.errors.set(key, error);
|
|
61
|
+
}
|
|
62
|
+
get(key) {
|
|
63
|
+
return this.errors.get(key);
|
|
64
|
+
}
|
|
65
|
+
get failureCount() {
|
|
66
|
+
return this.errors.size;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** The {@link PragmaError} a row failure carries, or a wrapper around it. */
|
|
70
|
+
const rowPragmaError = (error) => error.cause instanceof PragmaError
|
|
71
|
+
? error.cause
|
|
72
|
+
: new PragmaError({ code: "UNSUPPORTED", message: error.message });
|
|
73
|
+
/**
|
|
74
|
+
* Run the chosen rows with per-row failure isolation. The rows are independent
|
|
75
|
+
* installers, so one unsatisfiable prerequisite must not consume the others: a
|
|
76
|
+
* sequenced composition let a failing editor sideload abort the run before MCP
|
|
77
|
+
* or skills ever executed, so on every machine without a usable editor CLI the
|
|
78
|
+
* single advertised onboarding command configured nothing that mattered.
|
|
79
|
+
*
|
|
80
|
+
* Each row runs under a `recover` frame: the failure is reported inline (a
|
|
81
|
+
* `warn` right where it happened), recorded on the sink, and the remaining rows
|
|
82
|
+
* still run. The aggregate outcome is decided afterwards by the caller reading
|
|
83
|
+
* the sink — a run whose every failure is recorded does NOT rethrow, because the
|
|
84
|
+
* recap is the report and the exit code comes from the plan's own rule.
|
|
85
|
+
*
|
|
86
|
+
* Only failures travelling the task FAILURE CHANNEL are isolable — a synchronous
|
|
87
|
+
* throw bypasses the trampoline's recovery frames — which is why the row bodies
|
|
88
|
+
* raise via `checkExecOk`/`failPragma`, never a bare throw. Interruption bypasses
|
|
89
|
+
* recovery by interpreter invariant, so Ctrl-C still stops the whole run.
|
|
90
|
+
*
|
|
91
|
+
* Each row is also BRACKETED with {@link RowEvent}s — `start` as its body is
|
|
92
|
+
* entered, `done`/`failed` as it settles — emitted from the continuations,
|
|
93
|
+
* which run at interpretation time. Like the sink writes beside them, the
|
|
94
|
+
* emits capture nothing IN the task: the composition stays pure and
|
|
95
|
+
* re-interpretable, and each drive simply narrates itself as it runs.
|
|
96
|
+
*/
|
|
97
|
+
const runRowsIsolated = (sink, rows, emit) => flatMap(pure(undefined), () => {
|
|
98
|
+
sink.clear();
|
|
99
|
+
return sequence_(rows.map(({ key, label, doneLabel, task }) => recover(flatMap(pure(undefined), () => {
|
|
100
|
+
emit({ key, label, status: "start" });
|
|
101
|
+
return flatMap(task, () => {
|
|
102
|
+
emit({ key, label: doneLabel, status: "done" });
|
|
103
|
+
return pure(undefined);
|
|
104
|
+
});
|
|
105
|
+
}), (error) => flatMap(warn(`The ${key.split(":")[1]} step did not complete — continuing with the remaining targets.`), () => {
|
|
106
|
+
sink.record(key, error);
|
|
107
|
+
emit({
|
|
108
|
+
key,
|
|
109
|
+
label: `${label} — ${rowPragmaError(error).message}`,
|
|
110
|
+
status: "failed",
|
|
111
|
+
});
|
|
112
|
+
return pure(undefined);
|
|
113
|
+
}))));
|
|
114
|
+
});
|
|
115
|
+
/** Build a generator's `meta` (no stamping — the version is just header text). */
|
|
116
|
+
const buildMeta = (rt, title) => ({
|
|
117
|
+
name: title,
|
|
118
|
+
displayName: title,
|
|
119
|
+
description: `Configure ${BIN_NAME} on this machine`,
|
|
120
|
+
version: rt.version,
|
|
121
|
+
});
|
|
122
|
+
/** Read a multiselect answer as a string array. */
|
|
123
|
+
const readList = (answers, key) => Array.isArray(answers[key]) ? answers[key] : undefined;
|
|
124
|
+
/**
|
|
125
|
+
* The wizard's row multiselect — its choices ARE the plan rows. Actionable rows
|
|
126
|
+
* are pre-selected; an already-current row is offered DE-selected, so a re-run
|
|
127
|
+
* never proposes to rewrite what is already correct. A skip row is not a choice
|
|
128
|
+
* at all (summon's choice shape has no disabled state) but stays a visible row
|
|
129
|
+
* in the plan and the recap, carrying its reason.
|
|
130
|
+
*/
|
|
131
|
+
const buildRowsPrompt = (plan) => {
|
|
132
|
+
const choices = plan.rows
|
|
133
|
+
.filter((row) => row.action !== "skip")
|
|
134
|
+
.map((row) => ({
|
|
135
|
+
label: `${row.target} — ${row.detail}${row.action === "none" ? " (already configured)" : ""}`,
|
|
136
|
+
value: rowKey(row.scope, row.target),
|
|
137
|
+
}));
|
|
138
|
+
return {
|
|
139
|
+
name: ROWS_ANSWER,
|
|
140
|
+
type: "multiselect",
|
|
141
|
+
message: "Which targets would you like to configure?",
|
|
142
|
+
choices,
|
|
143
|
+
default: plan.rows
|
|
144
|
+
.filter((row) => row.selected)
|
|
145
|
+
.map((row) => rowKey(row.scope, row.target)),
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* The per-file MCP multiselect — one row per deduplicated config file, across
|
|
150
|
+
* every scope the run covers. An already-current file is DEFAULT-DESELECTED; a
|
|
151
|
+
* file that is absent or drifted stays selected. It is row-level CHILD
|
|
152
|
+
* selection, which is exactly what the plan's child rows are.
|
|
153
|
+
*
|
|
154
|
+
* It used to sit behind a meta-question — "Customize which files pragma
|
|
155
|
+
* configures?", answered no by default. That gate was read in exactly ONE place
|
|
156
|
+
* in the repo (this prompt's `when`) and nowhere else: not by `generate`, not by
|
|
157
|
+
* `applied`, not by any plan, recap, renderer or JSON projection. Answering no
|
|
158
|
+
* meant the child prompt was never asked, its key was absent from the answer
|
|
159
|
+
* bag, `readList` returned `undefined`, and the compose bodies read that as
|
|
160
|
+
* "all" — so everything detected was configured anyway. A meta-question in front
|
|
161
|
+
* of a direct question is one more thing to answer and no more control; the
|
|
162
|
+
* choices below already carry the detected state per child (`— unchanged`,
|
|
163
|
+
* `— add`, `— update`), which is the answer the meta-question was standing in
|
|
164
|
+
* front of.
|
|
165
|
+
*/
|
|
166
|
+
const buildChildPrompt = (plan, target, message, when) => {
|
|
167
|
+
const children = childrenOf(plan, target);
|
|
168
|
+
return {
|
|
169
|
+
name: CHILD_ANSWER[target],
|
|
170
|
+
type: "multiselect",
|
|
171
|
+
message,
|
|
172
|
+
when,
|
|
173
|
+
choices: children.map((child) => ({
|
|
174
|
+
label: `${child.label} — ${child.action}`,
|
|
175
|
+
value: child.key,
|
|
176
|
+
})),
|
|
177
|
+
default: children
|
|
178
|
+
.filter((child) => child.action !== "unchanged")
|
|
179
|
+
.map((child) => child.key),
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
/** Every child row a target contributes, across the scopes in the plan. */
|
|
183
|
+
const childrenOf = (plan, target) => plan.rows
|
|
184
|
+
.filter((row) => row.target === target)
|
|
185
|
+
.flatMap((row) => row.children ?? []);
|
|
186
|
+
/** Whether a row was chosen: by the wizard's answer, else by its own default. */
|
|
187
|
+
const isChosen = (row, chosen) => row.action !== "skip" &&
|
|
188
|
+
(chosen === undefined
|
|
189
|
+
? row.selected
|
|
190
|
+
: chosen.includes(rowKey(row.scope, row.target)));
|
|
191
|
+
/**
|
|
192
|
+
* What a row DID, as a past-tense word. The row's detail says what and where;
|
|
193
|
+
* the note says what happened to it, so a progress line and a recap line read
|
|
194
|
+
* as sentences rather than as two halves of one.
|
|
195
|
+
*/
|
|
196
|
+
const ACTION_NOTES = {
|
|
197
|
+
install: "installed",
|
|
198
|
+
update: "updated",
|
|
199
|
+
link: "linked",
|
|
200
|
+
remove: "removed",
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* The `2 added, 1 updated` note a row's children produce — counted over the
|
|
204
|
+
* children the run KEPT, not the ones it was offered.
|
|
205
|
+
*
|
|
206
|
+
* `kept` is the row's own child answer: the MCP files, or the LSP editors, the
|
|
207
|
+
* wizard narrowed to. Counting the plan's children instead recapped `2 added`
|
|
208
|
+
* for a run the user had just narrowed to one file, so the plan and the result
|
|
209
|
+
* described different work. Absent (`undefined`) means the narrowing prompt was
|
|
210
|
+
* never answered, which is the same thing the compose bodies read as "all".
|
|
211
|
+
*
|
|
212
|
+
* @param row - The plan row.
|
|
213
|
+
* @param kept - The child keys the run retained, or `undefined` for all.
|
|
214
|
+
* @returns The counts note, or `undefined` when the row has no children.
|
|
215
|
+
*/
|
|
216
|
+
function childNote(row, kept) {
|
|
217
|
+
const children = (row.children ?? []).filter((child) => kept === undefined || kept.includes(child.key));
|
|
218
|
+
if (children.length === 0)
|
|
219
|
+
return undefined;
|
|
220
|
+
const count = (action) => children.filter((child) => child.action === action).length;
|
|
221
|
+
const parts = [
|
|
222
|
+
count("add") > 0 ? `${count("add")} added` : "",
|
|
223
|
+
count("update") > 0 ? `${count("update")} updated` : "",
|
|
224
|
+
count("unchanged") > 0 ? `${count("unchanged")} unchanged` : "",
|
|
225
|
+
].filter((part) => part.length > 0);
|
|
226
|
+
return parts.length > 0 ? parts.join(", ") : undefined;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Build one invocation: detect, plan, synthesize the generator, and expose the
|
|
230
|
+
* projection back onto the plan.
|
|
231
|
+
*
|
|
232
|
+
* @param rt - The per-invocation runtime.
|
|
233
|
+
* @param mode - The entry point: the run-all, or one target.
|
|
234
|
+
* @param scope - The resolved scope selection.
|
|
235
|
+
* @param removal - Compose the removal (`--undo`) instead of the install.
|
|
236
|
+
* @returns The plan, the generator, and the answers-to-plan projection.
|
|
237
|
+
* @note Impure — runs every selected target's real detection.
|
|
238
|
+
*/
|
|
239
|
+
export async function buildSetupRun(rt, mode, scope, removal = false) {
|
|
240
|
+
const ids = mode === "all" ? [...TARGET_IDS] : [mode];
|
|
241
|
+
const roots = await resolveRoots(rt);
|
|
242
|
+
const detected = await detectTargets(rt, ids, scope);
|
|
243
|
+
const plan = buildPlan(scope, roots, detected, ids, removal);
|
|
244
|
+
const sink = new OutcomeSink();
|
|
245
|
+
const prompts = [];
|
|
246
|
+
if (mode === "all")
|
|
247
|
+
prompts.push(buildRowsPrompt(plan));
|
|
248
|
+
// A target is worth narrowing only when it has more than one child to choose
|
|
249
|
+
// between. `mcp` offers its config files; `lsp` offers the editors on PATH —
|
|
250
|
+
// a machine with several VS Code forks should not have the extension pushed
|
|
251
|
+
// into all of them just because they are installed.
|
|
252
|
+
const narrowable = [
|
|
253
|
+
["mcp", "Configure MCP for which files?"],
|
|
254
|
+
["lsp", "Install the extension into which editors?"],
|
|
255
|
+
].filter(([target]) => !removal && childrenOf(plan, target).length > 1);
|
|
256
|
+
for (const [target, message] of narrowable) {
|
|
257
|
+
// Asked whenever the row it narrows is in the run — one direct question,
|
|
258
|
+
// no meta-question in front of it. Removing a prompt cannot break the
|
|
259
|
+
// non-interactive paths: `autoPrompt`/`mcpPrompt` return each question's
|
|
260
|
+
// default, so a smaller prompt list means a smaller answer bag, and the
|
|
261
|
+
// compose bodies already read an absent child answer as "all". (The
|
|
262
|
+
// asymmetry is the reason this direction is safe: ADDING a defaultless
|
|
263
|
+
// prompt would hard-fail with MISSING_REQUIRED_ANSWER.)
|
|
264
|
+
const rowChosen = (answers) => {
|
|
265
|
+
const chosen = readList(answers, ROWS_ANSWER);
|
|
266
|
+
return plan.rows.some((row) => row.target === target && isChosen(row, chosen));
|
|
267
|
+
};
|
|
268
|
+
prompts.push(buildChildPrompt(plan, target, message, rowChosen));
|
|
269
|
+
}
|
|
270
|
+
/** The detection behind a row, for composing and for re-reading its draft. */
|
|
271
|
+
const detectionFor = (row) => detected.find((d) => d.target.id === row.target && d.scope === row.scope);
|
|
272
|
+
/**
|
|
273
|
+
* The success note a row's completion carries — ONE derivation for the
|
|
274
|
+
* recap's outcome and the live row event's `done` label, so the sentence a
|
|
275
|
+
* watcher saw land is the sentence the recap repeats. A removal never
|
|
276
|
+
* borrows the forward child summary: its children are the files the entry is
|
|
277
|
+
* being taken OUT of, and counting them as `1 updated` described the
|
|
278
|
+
* opposite of what the run had just done.
|
|
279
|
+
*/
|
|
280
|
+
const noteFor = (row, answers) => {
|
|
281
|
+
if (removal)
|
|
282
|
+
return ACTION_NOTES[row.action];
|
|
283
|
+
const childKey = CHILD_ANSWER[row.target];
|
|
284
|
+
const kept = childKey === undefined ? undefined : readList(answers, childKey);
|
|
285
|
+
return childNote(row, kept) ?? ACTION_NOTES[row.action];
|
|
286
|
+
};
|
|
287
|
+
/** The live row listener, when a wizard is watching. See {@link SetupRun}. */
|
|
288
|
+
let rowListener;
|
|
289
|
+
/** The id column width — the recap's own rule, so the columns agree. */
|
|
290
|
+
const idWidth = Math.max(...plan.rows.map((row) => row.target.length));
|
|
291
|
+
const generator = {
|
|
292
|
+
meta: buildMeta(rt, mode === "all" ? `${BIN_NAME} setup` : `${BIN_NAME} setup ${mode}`),
|
|
293
|
+
prompts,
|
|
294
|
+
generate: (answers) => {
|
|
295
|
+
const chosen = readList(answers, ROWS_ANSWER);
|
|
296
|
+
const tasks = plan.rows.flatMap((row) => {
|
|
297
|
+
if (!isChosen(row, chosen))
|
|
298
|
+
return [];
|
|
299
|
+
const hit = detectionFor(row);
|
|
300
|
+
if (hit === undefined)
|
|
301
|
+
return [];
|
|
302
|
+
// Each target reads ITS OWN child answer. One shared list was handing
|
|
303
|
+
// MCP file paths to every other target's compose.
|
|
304
|
+
const key = CHILD_ANSWER[row.target];
|
|
305
|
+
const children = key === undefined ? undefined : readList(answers, key);
|
|
306
|
+
const task = removal
|
|
307
|
+
? hit.target.composeRemoval(hit.detection)
|
|
308
|
+
: hit.target.compose(hit.detection, children);
|
|
309
|
+
// The row's progress sentence — the `target detail — note` shape
|
|
310
|
+
// `renderProgressLine` prints — so the live view and the recap say the
|
|
311
|
+
// same thing about the same row.
|
|
312
|
+
const label = `${row.target.padEnd(idWidth)} ${row.detail}`;
|
|
313
|
+
const note = noteFor(row, answers);
|
|
314
|
+
return [
|
|
315
|
+
{
|
|
316
|
+
key: rowKey(row.scope, row.target),
|
|
317
|
+
label,
|
|
318
|
+
doneLabel: note === undefined ? label : `${label} — ${note}`,
|
|
319
|
+
task,
|
|
320
|
+
},
|
|
321
|
+
];
|
|
322
|
+
});
|
|
323
|
+
return runRowsIsolated(sink, tasks, (event) => rowListener?.(event));
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
/** The outcome one row ended in, read off the sink and its own draft. */
|
|
327
|
+
const outcomeFor = (row, chosen, answers) => {
|
|
328
|
+
const hit = detectionFor(row);
|
|
329
|
+
// A row whose DETECTION threw has no draft to read and nothing to compose,
|
|
330
|
+
// and it is not a skip: the target was requested and did not happen. It
|
|
331
|
+
// reports `failed` with its own cause, exactly as a failed compose does, so
|
|
332
|
+
// the run names it instead of reporting a clean sweep over its siblings.
|
|
333
|
+
const failure = hit === undefined ? undefined : detectionFailure(hit);
|
|
334
|
+
if (failure !== undefined)
|
|
335
|
+
return { status: "failed", note: failure };
|
|
336
|
+
const draft = hit === undefined ? undefined : draftFor(hit, roots, removal);
|
|
337
|
+
if (row.action === "skip") {
|
|
338
|
+
return {
|
|
339
|
+
status: "skipped",
|
|
340
|
+
...(draft?.remedy === undefined ? {} : { remedy: draft.remedy }),
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
// An already-current row reports `noop` whether or not it was selected. It
|
|
344
|
+
// is offered DE-selected (there is nothing to do to it), and returning no
|
|
345
|
+
// outcome at all left a converged re-run with a plan-shaped output that
|
|
346
|
+
// claimed nothing had run — while the row still rendered a bare green ✓.
|
|
347
|
+
// Convergence is a real result: one quiet line per row, zero writes.
|
|
348
|
+
if (row.action === "none")
|
|
349
|
+
return { status: "noop", note: "unchanged" };
|
|
350
|
+
if (!isChosen(row, chosen))
|
|
351
|
+
return undefined;
|
|
352
|
+
const error = sink.get(rowKey(row.scope, row.target));
|
|
353
|
+
if (error !== undefined) {
|
|
354
|
+
const pragma = rowPragmaError(error);
|
|
355
|
+
return {
|
|
356
|
+
status: "failed",
|
|
357
|
+
note: pragma.message,
|
|
358
|
+
...(pragma.recovery?.message === undefined
|
|
359
|
+
? {}
|
|
360
|
+
: { remedy: pragma.recovery.message }),
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
if (!isActionable(row.action))
|
|
364
|
+
return { status: "noop" };
|
|
365
|
+
const note = noteFor(row, answers);
|
|
366
|
+
return {
|
|
367
|
+
status: removal ? "removed" : "done",
|
|
368
|
+
...(note === undefined ? {} : { note }),
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
return {
|
|
372
|
+
plan,
|
|
373
|
+
generator,
|
|
374
|
+
setRowListener: (listener) => {
|
|
375
|
+
rowListener = listener;
|
|
376
|
+
},
|
|
377
|
+
applied: (answers) => {
|
|
378
|
+
const chosen = readList(answers, ROWS_ANSWER);
|
|
379
|
+
return withRows(plan, plan.rows.map((row) => {
|
|
380
|
+
const outcome = outcomeFor(row, chosen, answers);
|
|
381
|
+
return {
|
|
382
|
+
...row,
|
|
383
|
+
selected: isChosen(row, chosen),
|
|
384
|
+
...(outcome === undefined ? {} : { outcome }),
|
|
385
|
+
};
|
|
386
|
+
}));
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
//# sourceMappingURL=setupGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupGenerator.js","sourceRoot":"","sources":["../../../../../src/capabilities/setup/operations/setupGenerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GA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