@canonical/pragma-cli 0.33.0 → 0.35.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/dist/.build-ok +0 -0
- package/dist/package.json +83 -0
- package/dist/pragma.conf.js +814 -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 +293 -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 +92 -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/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 +205 -0
- package/dist/src/capabilities/doctor/checks/targetHealth.js.map +1 -0
- package/dist/src/capabilities/doctor/doctor.render.js +185 -0
- package/dist/src/capabilities/doctor/doctor.render.js.map +1 -0
- package/dist/src/capabilities/doctor/doctor.verb.js +45 -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 +83 -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 +66 -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 +53 -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 +168 -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 +343 -0
- package/dist/src/capabilities/setup/operations/setupGenerator.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupLsp.js +277 -0
- package/dist/src/capabilities/setup/operations/setupLsp.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupMcp.js +207 -0
- package/dist/src/capabilities/setup/operations/setupMcp.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupSkills.js +316 -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 +193 -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 +334 -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 +263 -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/bands.js +16 -0
- package/dist/src/capabilities/shared/bands.js.map +1 -0
- package/dist/src/capabilities/shared/index.js +26 -0
- package/dist/src/capabilities/shared/index.js.map +1 -0
- package/dist/src/capabilities/shared/packageManager.js +103 -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 +195 -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 +167 -0
- package/dist/src/capabilities/sources/installSkills.js.map +1 -0
- package/dist/src/capabilities/sources/runUpdate.js +394 -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 +99 -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 +44 -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 +82 -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 +25 -0
- package/dist/src/kernel/index.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 +223 -0
- package/dist/src/kernel/packs/resolveEntity.js.map +1 -0
- package/dist/src/kernel/packs/runBodies.js +87 -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 +369 -0
- package/dist/src/kernel/packs/schema.js.map +1 -0
- package/dist/src/kernel/packs/sparql/applyFilters.js +68 -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 +217 -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 +216 -0
- package/dist/src/kernel/project/cli/globalFlags.js.map +1 -0
- package/dist/src/kernel/project/cli/helpFormat.js +59 -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 +197 -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 +300 -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 +85 -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/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 +25 -24
- package/pragma.conf.ts +853 -0
- package/src/bin.ts +276 -82
- package/src/capabilities/block.parity.test.ts +253 -0
- package/src/capabilities/capabilities/capabilities.render.ts +4 -3
- package/src/capabilities/capabilities/capabilities.verb.ts +32 -14
- package/src/capabilities/capabilities/catalog.ts +20 -12
- package/src/capabilities/capabilities/hints.ts +43 -24
- package/src/capabilities/capabilities/index.ts +1 -1
- package/src/capabilities/colophon/collectColophon.ts +50 -24
- package/src/capabilities/colophon/colophon.render.ts +25 -1
- package/src/capabilities/colophon/colophon.test.ts +42 -21
- package/src/capabilities/colophon/colophon.verb.ts +9 -5
- package/src/capabilities/colophon/types.ts +16 -7
- package/src/capabilities/config/collectConfigShow.test.ts +58 -0
- package/src/capabilities/config/collectConfigShow.ts +43 -6
- package/src/capabilities/config/field.render.ts +4 -5
- package/src/capabilities/config/fields.ts +17 -37
- 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 +14 -9
- package/src/capabilities/config/show.render.test.ts +77 -5
- package/src/capabilities/config/show.render.ts +8 -13
- package/src/capabilities/config/show.verb.ts +13 -9
- package/src/capabilities/config/types.ts +26 -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 +95 -103
- package/src/capabilities/create/cliProjection.ts +227 -0
- package/src/capabilities/create/constants.ts +50 -0
- package/src/capabilities/create/create.mcp.test.ts +91 -7
- package/src/capabilities/create/create.render.ts +71 -7
- package/src/capabilities/create/create.test.ts +523 -162
- package/src/capabilities/create/create.verb.ts +361 -321
- 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 +9 -14
- 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 +40 -46
- package/src/capabilities/create/shippedCreate.subprocess.test.ts +164 -0
- package/src/capabilities/create/types.ts +29 -5
- package/src/capabilities/{standard/parity.test.ts → distribution.parity.test.ts} +24 -14
- package/src/capabilities/distribution.test.ts +122 -0
- package/src/capabilities/distribution.ts +54 -0
- package/src/capabilities/doctor/checks/checkKeStore.ts +9 -7
- package/src/capabilities/doctor/checks/checkPackageRefs.ts +82 -46
- package/src/capabilities/doctor/checks/checkPragmaVersion.ts +5 -4
- package/src/capabilities/doctor/checks/checkShellCompletions.test.ts +125 -30
- package/src/capabilities/doctor/checks/checkShellCompletions.ts +113 -27
- 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 +274 -0
- package/src/capabilities/doctor/doctor.render.test.ts +24 -13
- package/src/capabilities/doctor/doctor.render.ts +45 -20
- package/src/capabilities/doctor/doctor.test.ts +158 -40
- package/src/capabilities/doctor/doctor.verb.ts +9 -5
- package/src/capabilities/doctor/runChecks.ts +65 -66
- package/src/capabilities/doctor/types.ts +21 -5
- package/src/capabilities/emptyRecovery.test.ts +44 -22
- 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 -5
- package/src/capabilities/graph/query.render.ts +15 -3
- package/src/capabilities/graph/query.verb.ts +5 -4
- package/src/capabilities/graph/runQuery.ts +9 -7
- package/src/capabilities/index.ts +25 -19
- package/src/capabilities/info/collectInfo.ts +15 -10
- package/src/capabilities/info/info.render.ts +4 -3
- package/src/capabilities/info/info.verb.ts +4 -3
- package/src/capabilities/lazy.test.ts +125 -2
- 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 +42 -83
- package/src/capabilities/prompt/index.ts +2 -2
- package/src/capabilities/prompt/prompt.render.ts +6 -2
- package/src/capabilities/prompt/prompt.test.ts +12 -6
- package/src/capabilities/prompt/types.ts +1 -1
- package/src/capabilities/prompt/verbs.ts +26 -14
- package/src/capabilities/reference.test.ts +63 -0
- package/src/capabilities/resources/provider.ts +367 -91
- package/src/capabilities/resources/resources.test.ts +411 -59
- package/src/capabilities/setup/buildPlan.ts +236 -0
- package/src/capabilities/setup/index.ts +7 -7
- package/src/capabilities/setup/mode.ts +74 -0
- package/src/capabilities/setup/operations/index.ts +74 -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 +397 -320
- package/src/capabilities/setup/operations/setupLsp.ts +329 -68
- package/src/capabilities/setup/operations/setupMcp.ts +137 -97
- package/src/capabilities/setup/operations/setupSkills.ts +336 -108
- package/src/capabilities/setup/plan.render.ts +241 -0
- package/src/capabilities/setup/plan.ts +236 -0
- package/src/capabilities/setup/setup.mcp.correctness.test.ts +432 -0
- package/src/capabilities/setup/setup.render.test.ts +281 -73
- package/src/capabilities/setup/setup.render.ts +45 -77
- package/src/capabilities/setup/setup.test.ts +972 -209
- package/src/capabilities/setup/setup.verb.ts +233 -74
- package/src/capabilities/setup/shell.test.ts +86 -0
- package/src/capabilities/setup/shell.ts +166 -14
- package/src/capabilities/setup/targets.ts +367 -0
- package/src/capabilities/setup/types.ts +18 -57
- package/src/capabilities/shared/assertExecOk.ts +68 -10
- package/src/capabilities/shared/index.ts +32 -0
- package/src/capabilities/shared/packageManager.test.ts +55 -0
- package/src/capabilities/shared/packageManager.ts +62 -6
- package/src/capabilities/skill/discover.ts +47 -9
- package/src/capabilities/skill/index.ts +1 -1
- package/src/capabilities/skill/render.ts +14 -14
- package/src/capabilities/skill/skill.test.ts +7 -5
- package/src/capabilities/skill/verbs.ts +9 -10
- package/src/capabilities/sources/collectStatus.ts +61 -51
- package/src/capabilities/sources/index.ts +2 -2
- package/src/capabilities/sources/installSkills.ts +86 -9
- package/src/capabilities/sources/runUpdate.ts +164 -141
- package/src/capabilities/sources/sources.test.ts +265 -119
- package/src/capabilities/sources/status.render.test.ts +53 -24
- package/src/capabilities/sources/status.render.ts +25 -30
- package/src/capabilities/sources/status.verb.ts +16 -9
- package/src/capabilities/sources/types.ts +18 -25
- package/src/capabilities/sources/update.render.ts +10 -3
- package/src/capabilities/sources/update.verb.ts +13 -24
- package/src/capabilities/surface.test.ts +165 -25
- package/src/capabilities/tier.parity.test.ts +144 -0
- package/src/capabilities/upgrade/runUpgrade.ts +8 -8
- package/src/capabilities/upgrade/upgrade.render.ts +4 -5
- package/src/capabilities/upgrade/upgrade.test.ts +3 -3
- package/src/capabilities/upgrade/upgrade.verb.ts +8 -4
- 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.test.ts +8 -6
- package/src/constants.ts +78 -22
- package/src/identity.test.ts +348 -0
- package/src/index.ts +2 -2
- package/src/kernel/completion/__snapshots__/emitScripts.test.ts.snap +20 -15
- package/src/kernel/completion/complete.test.ts +12 -2
- package/src/kernel/completion/complete.ts +1 -1
- package/src/kernel/completion/emitScripts.test.ts +1 -1
- package/src/kernel/completion/emitScripts.ts +5 -3
- package/src/kernel/completion/entitySource.test.ts +185 -41
- package/src/kernel/completion/entitySource.ts +133 -110
- package/src/kernel/completion/model.test.ts +165 -13
- package/src/kernel/completion/model.ts +105 -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 +104 -50
- package/src/kernel/completion/shellDrive.test.ts +611 -0
- package/src/kernel/completion/templates/bash.ts +7 -2
- package/src/kernel/completion/templates/fish.ts +28 -6
- package/src/kernel/completion/templates/index.ts +23 -0
- package/src/kernel/completion/types.ts +10 -3
- package/src/kernel/config/defaults.test.ts +108 -0
- package/src/kernel/config/defaults.ts +13 -23
- package/src/kernel/config/evaluateProjectConfig.ts +33 -11
- package/src/kernel/config/findProjectConfig.ts +4 -3
- package/src/kernel/config/firstRun.test.ts +44 -38
- package/src/kernel/config/firstRun.ts +24 -81
- package/src/kernel/config/globalConfig.ts +2 -2
- package/src/kernel/config/index.ts +5 -6
- package/src/kernel/config/paths.ts +17 -17
- package/src/kernel/config/readConfig.test.ts +246 -7
- package/src/kernel/config/readConfig.ts +8 -8
- package/src/kernel/config/schema.test.ts +50 -0
- package/src/kernel/config/schema.ts +100 -11
- package/src/kernel/config/types.ts +75 -19
- package/src/kernel/copy.test.ts +483 -0
- package/src/kernel/copy.ts +54 -0
- package/src/kernel/error/PragmaError.test.ts +6 -3
- package/src/kernel/error/PragmaError.ts +4 -2
- package/src/kernel/error/constants.ts +7 -4
- package/src/kernel/error/fromTaskError.ts +28 -6
- package/src/kernel/error/index.ts +1 -1
- package/src/kernel/error/recovery.test.ts +22 -45
- package/src/kernel/error/recovery.ts +36 -27
- package/src/kernel/error/renderError.ts +42 -1
- package/src/kernel/error/types.ts +25 -4
- package/src/kernel/index.ts +26 -0
- package/src/kernel/packs/collect.test.ts +195 -11
- package/src/kernel/packs/collect.ts +212 -61
- package/src/kernel/packs/compile.test.ts +293 -8
- package/src/kernel/packs/compile.ts +108 -15
- package/src/kernel/packs/disclosure.test.ts +5 -2
- package/src/kernel/packs/disclosure.ts +2 -2
- package/src/kernel/packs/graphql/buildLookupDocument.ts +1 -1
- package/src/kernel/packs/graphql/fetchGraphqlLookup.ts +13 -13
- package/src/kernel/packs/graphql/index.ts +20 -0
- package/src/kernel/packs/graphqlSource.test.ts +6 -3
- package/src/kernel/packs/index.ts +40 -0
- package/src/kernel/packs/iri.test.ts +73 -0
- package/src/kernel/packs/iri.ts +70 -20
- package/src/kernel/packs/renderPack.ts +28 -7
- package/src/kernel/packs/resolveEntity.test.ts +213 -0
- package/src/kernel/packs/resolveEntity.ts +132 -34
- package/src/kernel/packs/runBodies.ts +16 -16
- package/src/kernel/packs/sample.ts +1 -1
- package/src/kernel/packs/schema.ts +114 -11
- package/src/kernel/packs/sparql/applyFilters.ts +16 -17
- package/src/kernel/packs/sparql/buildLookupQuery.ts +75 -3
- package/src/kernel/packs/sparql/index.ts +37 -0
- package/src/kernel/packs/sparql/runSelect.test.ts +104 -10
- package/src/kernel/packs/sparql/runSelect.ts +75 -37
- package/src/kernel/packs/toolDescription.test.ts +52 -5
- package/src/kernel/packs/types.ts +52 -4
- package/src/kernel/packs/uniqueness.ts +5 -5
- package/src/kernel/project/cli/buildProgram.test.ts +157 -17
- package/src/kernel/project/cli/buildProgram.ts +77 -18
- package/src/kernel/project/cli/constants.ts +34 -0
- package/src/kernel/project/cli/dispatch.test.ts +227 -3
- package/src/kernel/project/cli/dispatch.ts +250 -48
- 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 +130 -30
- package/src/kernel/project/cli/helpFormat.ts +14 -1
- package/src/kernel/project/cli/rootHelp.ts +140 -111
- 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 +18 -10
- package/src/kernel/project/mcp/envelope.ts +2 -2
- package/src/kernel/project/mcp/instructions.ts +12 -7
- package/src/kernel/project/mcp/mcpError.ts +1 -1
- package/src/kernel/project/mcp/parity.test.ts +42 -1
- package/src/kernel/project/mcp/prompts/index.ts +37 -0
- package/src/kernel/project/mcp/prompts/prompts.test.ts +120 -5
- package/src/kernel/project/mcp/prompts/provider.ts +22 -8
- package/src/kernel/project/mcp/prompts/source.ts +69 -68
- package/src/kernel/project/mcp/registerVerb.ts +56 -11
- package/src/kernel/project/mcp/serve.ts +13 -5
- package/src/kernel/project/mcp/toolDescriptions.test.ts +6 -2
- package/src/kernel/render/__snapshots__/renderers.test.ts.snap +7 -4
- package/src/kernel/render/contracts.ts +21 -0
- package/src/kernel/render/disclosure.ts +4 -2
- package/src/kernel/render/envelope.ts +2 -3
- package/src/kernel/render/formatters.ts +1 -1
- package/src/kernel/render/prefixes.test.ts +36 -0
- package/src/kernel/render/prefixes.ts +40 -13
- package/src/kernel/render/renderers.test.ts +244 -7
- package/src/kernel/render/renderers.ts +222 -20
- package/src/kernel/render/style.test.ts +75 -24
- package/src/kernel/render/style.ts +31 -1
- package/src/kernel/render/turtle.ts +222 -0
- package/src/kernel/runtime/graphpack/build.ts +29 -3
- package/src/kernel/runtime/graphpack/buildIndex.test.ts +46 -0
- package/src/kernel/runtime/graphpack/buildIndex.ts +53 -18
- package/src/kernel/runtime/graphpack/embedded/pack.generated.ts +5 -5
- package/src/kernel/runtime/graphpack/embedded/pack.index.generated.ts +3 -3
- package/src/kernel/runtime/graphpack/embedded/pack.stories.generated.ts +3 -0
- package/src/kernel/runtime/graphpack/embedded.ts +39 -13
- package/src/kernel/runtime/graphpack/graphpack.test.ts +205 -5
- package/src/kernel/runtime/graphpack/hash.ts +3 -2
- package/src/kernel/runtime/graphpack/index.ts +1 -1
- package/src/kernel/runtime/graphpack/manifest.ts +114 -12
- package/src/kernel/runtime/graphpack/read.ts +5 -11
- package/src/kernel/runtime/graphpack/schemas.ts +74 -0
- package/src/kernel/runtime/graphpack/stories.ts +84 -0
- package/src/kernel/runtime/graphpack/types.ts +61 -48
- package/src/kernel/runtime/loadSession.ts +1 -1
- package/src/kernel/runtime/paths.ts +64 -15
- package/src/kernel/runtime/probe.test.ts +8 -4
- package/src/kernel/runtime/probe.ts +6 -6
- package/src/kernel/runtime/readEntity.ts +477 -32
- package/src/kernel/runtime/refs/gitOps.ts +1 -19
- package/src/kernel/runtime/refs/index.ts +39 -0
- package/src/kernel/runtime/refs/parseRef.ts +8 -8
- package/src/kernel/runtime/refs/resolve.ts +82 -66
- package/src/kernel/runtime/resolveSources.test.ts +63 -24
- package/src/kernel/runtime/resolveSources.ts +36 -25
- package/src/kernel/runtime/storeReadiness.ts +10 -10
- package/src/kernel/runtime/storeless.test.ts +1 -1
- package/src/kernel/runtime/types.ts +15 -1
- package/src/kernel/runtime/wasmEmbed.test.ts +56 -55
- package/src/kernel/spec/emitReference.test.ts +3 -3
- package/src/kernel/spec/emitReference.ts +242 -34
- package/src/kernel/spec/emitSurface.ts +57 -11
- package/src/kernel/spec/surfaceConformance.test.ts +4 -2
- package/src/kernel/spec/surfaceConformance.ts +8 -0
- package/src/kernel/spec/types.ts +277 -13
- package/src/kernel/spec/validate.ts +2 -1
- package/src/kernel/vocabulary.test.ts +164 -0
- package/src/kernel/vocabulary.ts +146 -0
- package/src/testing/PARITY_GAPS.ts +8 -2
- package/src/testing/behavioral/README.md +3 -3
- package/src/testing/behavioral/completion.test.ts +19 -6
- package/src/testing/behavioral/docExamples.test.ts +14 -0
- package/src/testing/behavioral/errorMatrix.mcp.test.ts +6 -5
- package/src/testing/behavioral/errorMatrix.storeless.test.ts +1 -1
- package/src/testing/behavioral/exitCodes.e2e.test.ts +6 -5
- package/src/testing/behavioral/firstRun.e2e.test.ts +24 -24
- package/src/testing/behavioral/harness.foundation.test.ts +14 -5
- package/src/testing/behavioral/journeys.cli.test.ts +117 -76
- package/src/testing/behavioral/journeys.defaultPack.test.ts +88 -182
- package/src/testing/behavioral/journeys.firstInstall.test.ts +167 -0
- 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.mcpLifecycle.mcp.test.ts +9 -6
- package/src/testing/behavioral/journeys.packageStories.test.ts +188 -0
- package/src/testing/behavioral/liveReadSurface.ts +4 -3
- package/src/testing/behavioral/mcpServe.e2e.test.ts +57 -2
- package/src/testing/behavioral/mcpSurface.test.ts +10 -5
- package/src/testing/behavioral/rootCli.e2e.test.ts +26 -2
- package/src/testing/behavioral/staleCommands.test.ts +10 -0
- package/src/testing/eval/__snapshots__/eval.test.ts.snap +7 -7
- package/src/testing/eval/cases/assembly.ts +13 -6
- package/src/testing/eval/cases/effectful.ts +28 -15
- package/src/testing/eval/cases/readNouns.ts +22 -20
- package/src/testing/eval/cases/stable.ts +5 -1
- package/src/testing/eval/eval.test.ts +7 -1
- package/src/testing/fixtures/blockGraph.ts +79 -0
- package/src/testing/fixtures/fixtureCapability.ts +45 -1
- package/src/testing/fixtures/graph/canonical.ts +94 -5
- package/src/testing/fixtures/graph/defaultPack.ts +7 -6
- package/src/testing/fixtures/graph/owlExport.ts +7 -5
- package/src/testing/helpers/blankCanonicalRanges.ts +36 -0
- package/src/testing/helpers/fixtureGraph.ts +33 -16
- package/src/testing/helpers/packRuntime.ts +2 -3
- package/src/testing/helpers/projectCli.ts +2 -1
- package/src/testing/helpers/projectMcp.ts +38 -6
- package/src/testing/helpers/runCli.ts +35 -18
- package/src/testing/perf/budgets.test.ts +24 -9
- package/src/testing/perf/budgets.ts +76 -12
- package/src/testing/perf/codegen.test.ts +126 -0
- package/src/testing/perf/globalSetup.test.ts +286 -0
- package/src/testing/perf/globalSetup.ts +611 -14
- 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/src/types.ts +2 -2
- package/dist/pragma +0 -0
- package/src/capabilities/block/blockList.test.ts +0 -79
- package/src/capabilities/block/blockList.verb.ts +0 -163
- package/src/capabilities/block/index.ts +0 -25
- package/src/capabilities/block/pack.ts +0 -166
- package/src/capabilities/block/parity.test.ts +0 -187
- package/src/capabilities/block/tierChain.ts +0 -78
- package/src/capabilities/colophon/pragmaColophon.ts +0 -66
- package/src/capabilities/create/compiledCreate.subprocess.test.ts +0 -152
- package/src/capabilities/create/templates.embedded.generated.ts +0 -53
- package/src/capabilities/doctor/checks/checkConfigFile.ts +0 -41
- package/src/capabilities/doctor/checks/checkMcpCommands.ts +0 -114
- package/src/capabilities/doctor/checks/checkMcpConfigured.ts +0 -67
- package/src/capabilities/doctor/checks/checkSkillsSymlinked.ts +0 -60
- package/src/capabilities/doctor/checks/deriveBand.test.ts +0 -42
- package/src/capabilities/doctor/checks/deriveBand.ts +0 -28
- package/src/capabilities/modifier/index.ts +0 -15
- package/src/capabilities/modifier/pack.ts +0 -64
- package/src/capabilities/standard/index.ts +0 -18
- package/src/capabilities/standard/pack.ts +0 -128
- package/src/capabilities/tier/index.ts +0 -19
- package/src/capabilities/tier/lookup.render.test.ts +0 -72
- package/src/capabilities/tier/lookup.render.ts +0 -59
- package/src/capabilities/tier/lookup.test.ts +0 -83
- package/src/capabilities/tier/lookup.verb.ts +0 -44
- package/src/capabilities/tier/pack.ts +0 -28
- package/src/capabilities/tier/runLookup.ts +0 -87
- package/src/capabilities/token/addConfig.render.ts +0 -27
- package/src/capabilities/token/addConfig.test.ts +0 -62
- package/src/capabilities/token/addConfig.verb.ts +0 -40
- package/src/capabilities/token/index.ts +0 -19
- package/src/capabilities/token/pack.ts +0 -58
- package/src/capabilities/token/runAddConfig.ts +0 -95
- package/src/kernel/completion/bashDrive.test.ts +0 -73
- package/src/kernel/config/__snapshots__/firstRun.test.ts.snap +0 -11
- package/src/kernel/runtime/graphpack/embedded/sample.ttl +0 -39
- package/src/kernel/runtime/lock.ts +0 -90
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The bundled `standard` pack — code standards as data.
|
|
3
|
-
*
|
|
4
|
-
* `standard list|lookup|categories|sample` compile from this definition through
|
|
5
|
-
* the one pack kernel. Normalized for v2: the old `digest` level is renamed to
|
|
6
|
-
* the canonical `standard`, so disclosure gates by the canonical index; the
|
|
7
|
-
* default is `summary` (base fields by name), `--detail standard` adds the `dos`
|
|
8
|
-
* examples, `--detail detailed` adds `donts`. `cs:extends` stays the raw IRI in
|
|
9
|
-
* JSON (renderers compact it at display time).
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import type { PackDefinition } from "../../kernel/packs/types.js";
|
|
13
|
-
|
|
14
|
-
export const standardPack: PackDefinition = {
|
|
15
|
-
noun: "standard",
|
|
16
|
-
description: "List all code standards.",
|
|
17
|
-
toolDescription:
|
|
18
|
-
"List code standards. Optionally filter by category or search term.",
|
|
19
|
-
list: {
|
|
20
|
-
query: [
|
|
21
|
-
"SELECT ?uri ?name ?category ?description",
|
|
22
|
-
"WHERE {",
|
|
23
|
-
" ?uri a cs:CodeStandard ;",
|
|
24
|
-
" cs:description ?description .",
|
|
25
|
-
" OPTIONAL { ?uri cs:name ?n . }",
|
|
26
|
-
' BIND(COALESCE(?n, REPLACE(STRAFTER(STR(?uri), "#"), "\\\\.", "/")) AS ?name)',
|
|
27
|
-
" OPTIONAL {",
|
|
28
|
-
" ?uri cs:hasCategory ?cat .",
|
|
29
|
-
" ?cat cs:slug ?category .",
|
|
30
|
-
" }",
|
|
31
|
-
"}",
|
|
32
|
-
"ORDER BY ?name",
|
|
33
|
-
].join("\n"),
|
|
34
|
-
columns: [
|
|
35
|
-
{ field: "uri", label: "IRI" },
|
|
36
|
-
{ field: "name", label: "Name" },
|
|
37
|
-
{ field: "category", label: "Category" },
|
|
38
|
-
{ field: "description", label: "Description" },
|
|
39
|
-
],
|
|
40
|
-
filters: [
|
|
41
|
-
{
|
|
42
|
-
param: "category",
|
|
43
|
-
variable: "category",
|
|
44
|
-
description: "Filter by category name.",
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
search: {
|
|
48
|
-
variables: ["name", "description"],
|
|
49
|
-
description: "Search in name and description.",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
verbs: [
|
|
53
|
-
{
|
|
54
|
-
verb: "categories",
|
|
55
|
-
description: "List all standard categories with counts.",
|
|
56
|
-
toolDescription: "List all code standard categories.",
|
|
57
|
-
query: [
|
|
58
|
-
"SELECT ?name (COUNT(?standard) AS ?count)",
|
|
59
|
-
"WHERE {",
|
|
60
|
-
" ?cat a cs:Category ;",
|
|
61
|
-
" cs:slug ?name .",
|
|
62
|
-
" OPTIONAL {",
|
|
63
|
-
" ?standard a cs:CodeStandard ;",
|
|
64
|
-
" cs:hasCategory ?cat .",
|
|
65
|
-
" }",
|
|
66
|
-
"}",
|
|
67
|
-
"GROUP BY ?name",
|
|
68
|
-
"ORDER BY ?name",
|
|
69
|
-
].join("\n"),
|
|
70
|
-
columns: [
|
|
71
|
-
{ field: "name", label: "Category" },
|
|
72
|
-
{ field: "count", label: "Standards" },
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
lookup: {
|
|
77
|
-
source: "sparql",
|
|
78
|
-
by: "cs:name",
|
|
79
|
-
type: "cs:CodeStandard",
|
|
80
|
-
description:
|
|
81
|
-
"Look up detailed information for a standard by name, IRI, or glob.",
|
|
82
|
-
toolDescription:
|
|
83
|
-
"Get detailed information about one or more code standards including dos and donts with code examples. Address standards by name, prefixed name (cs:…), absolute IRI, or glob pattern (react/component/*).",
|
|
84
|
-
fields: [
|
|
85
|
-
{
|
|
86
|
-
name: "category",
|
|
87
|
-
property: "cs:hasCategory/cs:slug",
|
|
88
|
-
label: "Category",
|
|
89
|
-
},
|
|
90
|
-
{ name: "description", property: "cs:description", label: "Description" },
|
|
91
|
-
{ name: "extends", property: "cs:extends", label: "Extends" },
|
|
92
|
-
],
|
|
93
|
-
expand: [
|
|
94
|
-
{
|
|
95
|
-
name: "dos",
|
|
96
|
-
heading: "Do",
|
|
97
|
-
relation: "cs:do",
|
|
98
|
-
select: [
|
|
99
|
-
{ name: "caption", property: "cs:description" },
|
|
100
|
-
{ name: "language", property: "cs:language" },
|
|
101
|
-
{ name: "code", property: "cs:code" },
|
|
102
|
-
],
|
|
103
|
-
level: "standard",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: "donts",
|
|
107
|
-
heading: "Don't",
|
|
108
|
-
relation: "cs:dont",
|
|
109
|
-
select: [
|
|
110
|
-
{ name: "caption", property: "cs:description" },
|
|
111
|
-
{ name: "language", property: "cs:language" },
|
|
112
|
-
{ name: "code", property: "cs:code" },
|
|
113
|
-
],
|
|
114
|
-
level: "detailed",
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
disclosure: {
|
|
118
|
-
levels: ["summary", "standard", "detailed"],
|
|
119
|
-
default: "summary",
|
|
120
|
-
},
|
|
121
|
-
sample: {
|
|
122
|
-
description:
|
|
123
|
-
"Return randomly selected complete standard instances as exemplars for shape discovery.",
|
|
124
|
-
toolDescription:
|
|
125
|
-
"Return 1–5 randomly selected complete code standard instances as exemplars. Use BEFORE writing queries to see actual data shapes, property names, and value formats. Each call returns different instances.",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `tier` capability module — the bundled flat-list pack compiled to `list`.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { compilePack } from "../../kernel/packs/compile.js";
|
|
6
|
-
import { DEFAULT_PREFIX_MAP } from "../../kernel/render/prefixes.js";
|
|
7
|
-
import type { CapabilityModule } from "../../kernel/spec/types.js";
|
|
8
|
-
import { tierLookupVerb } from "./lookup.verb.js";
|
|
9
|
-
import { tierPack } from "./pack.js";
|
|
10
|
-
|
|
11
|
-
/** The `tier` capability module — the bundled flat-list pack plus the bespoke
|
|
12
|
-
* single-name `lookup` (a pack lookup would emit the variadic `<name...>`). */
|
|
13
|
-
export const tierModule: CapabilityModule = {
|
|
14
|
-
name: "tier",
|
|
15
|
-
verbs: [
|
|
16
|
-
...compilePack(tierPack, "bundled:tier", DEFAULT_PREFIX_MAP),
|
|
17
|
-
tierLookupVerb,
|
|
18
|
-
],
|
|
19
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import chalk from "chalk";
|
|
2
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
3
|
-
import { type TierLookupData, tierLookupFormatters } from "./lookup.render.js";
|
|
4
|
-
|
|
5
|
-
const TIER: TierLookupData = {
|
|
6
|
-
uri: "cs:apps/lxd-panel",
|
|
7
|
-
name: "apps/lxd-panel",
|
|
8
|
-
blocks: ["LXD Panel", "Status Bar"],
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
/** Run `body` with stdout's `isTTY` forced to `value`, then restore it. */
|
|
12
|
-
function withStdoutTty(value: boolean | undefined, body: () => void): void {
|
|
13
|
-
const stream = process.stdout as { isTTY?: boolean };
|
|
14
|
-
const saved = stream.isTTY;
|
|
15
|
-
stream.isTTY = value;
|
|
16
|
-
try {
|
|
17
|
-
body();
|
|
18
|
-
} finally {
|
|
19
|
-
stream.isTTY = saved;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
describe("tierLookupFormatters", () => {
|
|
24
|
-
it("underlines the plain title with an ═ rule (B7)", () => {
|
|
25
|
-
const [title, rule, blank, blocks] = tierLookupFormatters
|
|
26
|
-
.plain(TIER)
|
|
27
|
-
.split("\n");
|
|
28
|
-
expect(title).toBe("apps/lxd-panel (cs:apps/lxd-panel)");
|
|
29
|
-
expect(rule).toBe("═".repeat(Math.max((title as string).length, 24)));
|
|
30
|
-
expect(blank).toBe("");
|
|
31
|
-
expect(blocks).toBe(" blocks: LXD Panel, Status Bar");
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it("floors the plain rule at 24 columns for a short title", () => {
|
|
35
|
-
const out = tierLookupFormatters.plain({ ...TIER, uri: "x", name: "a" });
|
|
36
|
-
expect(out.split("\n").at(1)).toBe("═".repeat(24));
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it("heads the llm entity read at H2, never H1 (B2)", () => {
|
|
40
|
-
const out = tierLookupFormatters.llm(TIER);
|
|
41
|
-
expect(out.startsWith("## apps/lxd-panel\n")).toBe(true);
|
|
42
|
-
expect(out).not.toMatch(/^# /m);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
describe("tierLookupFormatters — shared style seam (B7)", () => {
|
|
47
|
-
const prevLevel = chalk.level;
|
|
48
|
-
afterEach(() => {
|
|
49
|
-
chalk.level = prevLevel;
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it("styles the plain title on a color-capable TTY (single-sourced frame)", () => {
|
|
53
|
-
chalk.level = 1;
|
|
54
|
-
withStdoutTty(true, () => {
|
|
55
|
-
// Delegating to `renderLookupPlain` now carries the same TTY tint block and
|
|
56
|
-
// skill lookups get — previously the tier title stayed unstyled.
|
|
57
|
-
// biome-ignore lint/suspicious/noControlCharactersInRegex: asserting the ESC byte is the point
|
|
58
|
-
expect(tierLookupFormatters.plain(TIER)).toMatch(/\x1b\[/);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it("keeps piped plain output byte-stable off a TTY", () => {
|
|
63
|
-
chalk.level = 3;
|
|
64
|
-
withStdoutTty(undefined, () => {
|
|
65
|
-
const out = tierLookupFormatters.plain(TIER);
|
|
66
|
-
// biome-ignore lint/suspicious/noControlCharactersInRegex: asserting NO ESC byte survives
|
|
67
|
-
expect(out).not.toMatch(/\x1b\[/);
|
|
68
|
-
expect(out.split("\n").at(0)).toBe("apps/lxd-panel (cs:apps/lxd-panel)");
|
|
69
|
-
expect(out.split("\n").at(3)).toBe(" blocks: LXD Panel, Status Bar");
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
});
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formatters + data shape for `tier lookup <name>`.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { RenderLookupOptions } from "../../kernel/render/contracts.js";
|
|
6
|
-
import { renderLookupPlain } from "../../kernel/render/renderers.js";
|
|
7
|
-
import type { Formatters } from "../../kernel/spec/types.js";
|
|
8
|
-
|
|
9
|
-
/** The looked-up tier: its IRI, name, and the blocks scoped directly to it. */
|
|
10
|
-
export interface TierLookupData {
|
|
11
|
-
readonly uri: string;
|
|
12
|
-
readonly name: string;
|
|
13
|
-
readonly blocks: readonly string[];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The shared plain-lookup layout for a tier: a `name (uri)` title over an ═ rule,
|
|
18
|
-
* then the directly-scoped blocks as one inline field. Delegating to
|
|
19
|
-
* {@link renderLookupPlain} single-sources the frame AND the TTY styling (bold
|
|
20
|
-
* title, dim rule, cyan label) that block/skill lookups already earn — so a tier
|
|
21
|
-
* title no longer stays unstyled on a terminal while theirs are bold (B7).
|
|
22
|
-
*/
|
|
23
|
-
const tierPlainOptions: RenderLookupOptions<TierLookupData> = {
|
|
24
|
-
title: (tier) => `${tier.name} (${tier.uri})`,
|
|
25
|
-
fields: [
|
|
26
|
-
{
|
|
27
|
-
label: "blocks",
|
|
28
|
-
// Pre-joined so the empty case still renders (the shared field renderer
|
|
29
|
-
// skips an empty array). Blocks are `ds:name` display strings, never IRIs,
|
|
30
|
-
// so the shared renderer's URI compaction is a no-op here — byte-stable.
|
|
31
|
-
value: (tier) =>
|
|
32
|
-
tier.blocks.length > 0
|
|
33
|
-
? tier.blocks.join(", ")
|
|
34
|
-
: "(none scoped directly to this tier)",
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
sections: [],
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const tierLookupFormatters: Formatters<TierLookupData> = {
|
|
41
|
-
plain(data) {
|
|
42
|
-
return renderLookupPlain(data, tierPlainOptions);
|
|
43
|
-
},
|
|
44
|
-
llm(data) {
|
|
45
|
-
// A byte-frozen agent contract that DIVERGES from the generic
|
|
46
|
-
// `renderLookupLlm`: an H2 `name` title (not `name (uri)`) with the IRI and
|
|
47
|
-
// blocks backtick-wrapped (`\`cs:…\``) — a shape the shared renderer does not
|
|
48
|
-
// emit. The llm path is never styled, so it has no TTY drift to single-source;
|
|
49
|
-
// kept inline so the frozen bytes hold (B2).
|
|
50
|
-
const lines = [`## ${data.name}`, `- IRI: \`${data.uri}\``];
|
|
51
|
-
if (data.blocks.length > 0) {
|
|
52
|
-
lines.push(`- Blocks: ${data.blocks.map((b) => `\`${b}\``).join(", ")}`);
|
|
53
|
-
}
|
|
54
|
-
return lines.join("\n");
|
|
55
|
-
},
|
|
56
|
-
json(data) {
|
|
57
|
-
return JSON.stringify(data);
|
|
58
|
-
},
|
|
59
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
2
|
-
import type { PragmaRuntime } from "../../kernel/runtime/types.js";
|
|
3
|
-
import { CANONICAL_TTL } from "../../testing/fixtures/graph/canonical.js";
|
|
4
|
-
import {
|
|
5
|
-
bootFixtureRuntime,
|
|
6
|
-
type FixtureGraph,
|
|
7
|
-
} from "../../testing/helpers/fixtureGraph.js";
|
|
8
|
-
import type { McpHarness } from "../../testing/helpers/projectMcp.js";
|
|
9
|
-
import { projectMcp } from "../../testing/helpers/projectMcp.js";
|
|
10
|
-
import { capabilities } from "../index.js";
|
|
11
|
-
import { runTierLookup } from "./runLookup.js";
|
|
12
|
-
|
|
13
|
-
let fixture: FixtureGraph;
|
|
14
|
-
let mcp: McpHarness;
|
|
15
|
-
|
|
16
|
-
beforeAll(async () => {
|
|
17
|
-
fixture = await bootFixtureRuntime({ ttl: CANONICAL_TTL });
|
|
18
|
-
mcp = await projectMcp(capabilities, fixture.cwd);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
afterAll(async () => {
|
|
22
|
-
await mcp.cleanup();
|
|
23
|
-
await fixture.dispose();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
describe("tier_lookup — bespoke single-name lookup (PROTECTED)", () => {
|
|
27
|
-
it("resolves a tier and the blocks scoped directly to it", async () => {
|
|
28
|
-
const result = await mcp.callTool("tier_lookup", { name: "apps/lxd" });
|
|
29
|
-
expect(result.ok).toBe(true);
|
|
30
|
-
const data = result.data as { name: string; blocks: string[] };
|
|
31
|
-
expect(data.name).toBe("apps/lxd");
|
|
32
|
-
// The canonical fixture scopes "LXD Panel" to apps/lxd.
|
|
33
|
-
expect(data.blocks).toContain("LXD Panel");
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("errors on an unknown tier name with a tier_list recovery", async () => {
|
|
37
|
-
const result = await mcp.callTool("tier_lookup", { name: "not-a-tier" });
|
|
38
|
-
expect(result.ok).toBe(false);
|
|
39
|
-
const error = result.error as { code: string };
|
|
40
|
-
expect(error.code).toBe("ENTITY_NOT_FOUND");
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it("suggests a near-miss tier name from the full list (did-you-mean parity)", async () => {
|
|
44
|
-
// B6: tier lookup was the only entity lookup that omitted suggestions,
|
|
45
|
-
// though — like the others — it can read the full tier list on a miss.
|
|
46
|
-
let caught: unknown;
|
|
47
|
-
try {
|
|
48
|
-
await runTierLookup(fixture.runtime, "apps/lxdd");
|
|
49
|
-
} catch (error) {
|
|
50
|
-
caught = error;
|
|
51
|
-
}
|
|
52
|
-
expect(caught).toMatchObject({ code: "ENTITY_NOT_FOUND" });
|
|
53
|
-
expect((caught as { suggestions: string[] }).suggestions).toContain(
|
|
54
|
-
"apps/lxd",
|
|
55
|
-
);
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
describe("tier_lookup — cold/unseeded store (ROOT A)", () => {
|
|
60
|
-
it("remaps a 'Prefix not found' to STORE_UNAVAILABLE, not INTERNAL_ERROR", async () => {
|
|
61
|
-
// The bespoke lookup used to call `rt.query.sparql` directly, bypassing the
|
|
62
|
-
// `runSelect` remap — so a cold store's raw "Prefix not found" collapsed to
|
|
63
|
-
// INTERNAL_ERROR. It now routes through `runSelect`, inheriting the remap.
|
|
64
|
-
const coldRuntime = {
|
|
65
|
-
query: {
|
|
66
|
-
sparql: async () => {
|
|
67
|
-
throw new Error("Prefix not found: ds");
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
} as unknown as PragmaRuntime;
|
|
71
|
-
|
|
72
|
-
let caught: unknown;
|
|
73
|
-
try {
|
|
74
|
-
await runTierLookup(coldRuntime, "apps/lxd");
|
|
75
|
-
} catch (error) {
|
|
76
|
-
caught = error;
|
|
77
|
-
}
|
|
78
|
-
expect(caught).toMatchObject({ code: "STORE_UNAVAILABLE" });
|
|
79
|
-
expect(
|
|
80
|
-
(caught as { recovery?: { mcp?: { tool: string } } }).recovery?.mcp,
|
|
81
|
-
).toMatchObject({ tool: "sources_update" });
|
|
82
|
-
});
|
|
83
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `tier lookup <name>` — the covenant `tier_lookup` tool.
|
|
3
|
-
*
|
|
4
|
-
* Bespoke store-backed lookup with a SINGLE `<name>` positional (a pack lookup
|
|
5
|
-
* would emit the variadic `<name...>`), so it emits
|
|
6
|
-
* `{ v: "lookup", args: ["<name>"], needsStore: true, mcp: "tier_lookup" }`.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { asVerb } from "../../kernel/spec/asVerb.js";
|
|
10
|
-
import type { VerbSpec } from "../../kernel/spec/types.js";
|
|
11
|
-
import { type TierLookupData, tierLookupFormatters } from "./lookup.render.js";
|
|
12
|
-
|
|
13
|
-
const tierLookupSpec: VerbSpec<Record<string, unknown>, TierLookupData> = {
|
|
14
|
-
path: ["tier", "lookup"],
|
|
15
|
-
summary: "Show one tier by name, with the blocks scoped to it.",
|
|
16
|
-
doc: "Look up a single tier by its name (e.g. apps/lxd) and list the blocks scoped directly to it.",
|
|
17
|
-
params: [
|
|
18
|
-
{
|
|
19
|
-
kind: "string",
|
|
20
|
-
name: "name",
|
|
21
|
-
doc: "The tier name (e.g. apps/lxd).",
|
|
22
|
-
positional: true,
|
|
23
|
-
required: true,
|
|
24
|
-
complete: { kind: "names", source: { from: "tiers" } },
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
output: { formatters: tierLookupFormatters },
|
|
28
|
-
examples: [{ cmd: "pragma tier lookup apps/lxd" }],
|
|
29
|
-
capability: {
|
|
30
|
-
needsStore: true,
|
|
31
|
-
mutates: false,
|
|
32
|
-
mcp: {
|
|
33
|
-
expose: true,
|
|
34
|
-
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
run: (params, rt) =>
|
|
38
|
-
import("./runLookup.js").then((m) =>
|
|
39
|
-
m.runTierLookup(rt, String(params.name)),
|
|
40
|
-
),
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/** The `tier lookup` verb, widened for registry composition. */
|
|
44
|
-
export const tierLookupVerb = asVerb(tierLookupSpec);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The bundled `tier` pack — a flat, name-ordered list story.
|
|
3
|
-
*
|
|
4
|
-
* Tier hierarchy is encoded in the slash-separated path string (`apps/lxd`), not
|
|
5
|
-
* in graph edges, so `tier list` is a flat list; the ordered-inheritance logic
|
|
6
|
-
* lives in the block list's tier chain. SPARQL-sourced (a flat-ordered list).
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type { PackDefinition } from "../../kernel/packs/types.js";
|
|
10
|
-
|
|
11
|
-
export const tierPack: PackDefinition = {
|
|
12
|
-
noun: "tier",
|
|
13
|
-
description: "List all tiers in the design system ontology.",
|
|
14
|
-
toolDescription:
|
|
15
|
-
"List all tiers in the design-system ontology. Use when understanding the tier hierarchy before setting a tier filter. Example: tier_list {}.",
|
|
16
|
-
list: {
|
|
17
|
-
query: [
|
|
18
|
-
"SELECT ?uri ?name WHERE {",
|
|
19
|
-
" ?uri a ds:Tier ;",
|
|
20
|
-
" ds:name ?name .",
|
|
21
|
-
"} ORDER BY ?name",
|
|
22
|
-
].join("\n"),
|
|
23
|
-
columns: [
|
|
24
|
-
{ field: "uri", label: "IRI" },
|
|
25
|
-
{ field: "name", label: "Name" },
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `tier lookup` run body (lazily imported, off the fast path).
|
|
3
|
-
*
|
|
4
|
-
* Bespoke (not a pack lookup): the covenant freezes `tier_lookup` with a SINGLE
|
|
5
|
-
* `<name>` positional, whereas a pack lookup emits the variadic `<name...>`.
|
|
6
|
-
* Resolves the tier by its `ds:name` and returns the blocks scoped directly to
|
|
7
|
-
* it (a joined OPTIONAL, so a tier with no direct members still resolves).
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { PragmaError } from "../../kernel/error/PragmaError.js";
|
|
11
|
-
import { runSelect } from "../../kernel/packs/sparql/runSelect.js";
|
|
12
|
-
import { suggestNames } from "../../kernel/project/cli/suggestNames.js";
|
|
13
|
-
import { compactUri } from "../../kernel/render/compactUri.js";
|
|
14
|
-
import { DEFAULT_PREFIX_MAP } from "../../kernel/render/prefixes.js";
|
|
15
|
-
import type { PragmaRuntime } from "../../kernel/runtime/types.js";
|
|
16
|
-
import type { TierLookupData } from "./lookup.render.js";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Read every tier name in the store (its `ds:name`), ordered.
|
|
20
|
-
*
|
|
21
|
-
* The bespoke lookup already holds the machinery to reach the store, so a
|
|
22
|
-
* name-not-found can rank "did you mean?" candidates the same way every other
|
|
23
|
-
* entity lookup does — the tier list is a single cheap SELECT away.
|
|
24
|
-
*
|
|
25
|
-
* @param rt - The runtime (its store is booted by the projector for needsStore).
|
|
26
|
-
* @returns The tier names, ordered.
|
|
27
|
-
* @note Impure — queries the store through `runSelect`.
|
|
28
|
-
*/
|
|
29
|
-
async function selectTierNames(rt: PragmaRuntime): Promise<string[]> {
|
|
30
|
-
const rows = await runSelect(
|
|
31
|
-
rt,
|
|
32
|
-
"SELECT ?name WHERE { ?tier a ds:Tier ; ds:name ?name } ORDER BY ?name",
|
|
33
|
-
"tier",
|
|
34
|
-
);
|
|
35
|
-
return rows
|
|
36
|
-
.map((row) => row.name as string | undefined)
|
|
37
|
-
.filter((name): name is string => Boolean(name));
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Look up one tier by name.
|
|
42
|
-
*
|
|
43
|
-
* @param rt - The runtime (its store is booted by the projector for needsStore).
|
|
44
|
-
* @param name - The tier name (its `ds:name`, e.g. `apps/lxd`).
|
|
45
|
-
* @returns The tier's IRI, name, and directly-scoped block names.
|
|
46
|
-
* @throws PragmaError ENTITY_NOT_FOUND when no tier has that name;
|
|
47
|
-
* STORE_UNAVAILABLE (exit 3) when the store is unseeded for this project.
|
|
48
|
-
*/
|
|
49
|
-
export async function runTierLookup(
|
|
50
|
-
rt: PragmaRuntime,
|
|
51
|
-
name: string,
|
|
52
|
-
): Promise<TierLookupData> {
|
|
53
|
-
const query = [
|
|
54
|
-
"SELECT ?uri ?blockName WHERE {",
|
|
55
|
-
" ?uri a ds:Tier ; ds:name ?tierName .",
|
|
56
|
-
` FILTER(STR(?tierName) = ${JSON.stringify(name)})`,
|
|
57
|
-
" OPTIONAL { ?block ds:tier ?uri ; ds:name ?blockName }",
|
|
58
|
-
"}",
|
|
59
|
-
"ORDER BY ?blockName",
|
|
60
|
-
].join("\n");
|
|
61
|
-
|
|
62
|
-
// Route through `runSelect` (not `rt.query.sparql` directly) so a cold/unseeded
|
|
63
|
-
// store — a generated `ds:` query hitting an unknown prefix — is remapped to an
|
|
64
|
-
// actionable STORE_UNAVAILABLE with `pragma sources update` recovery, instead of
|
|
65
|
-
// a raw "Prefix not found" collapsing to INTERNAL_ERROR at the boundary.
|
|
66
|
-
const rows = await runSelect(rt, query, "tier");
|
|
67
|
-
const uri = rows[0]?.uri;
|
|
68
|
-
if (!uri) {
|
|
69
|
-
// Rank "did you mean?" candidates from the full tier list — the only entity
|
|
70
|
-
// lookup that used to omit suggestions, though (like the others) it has the
|
|
71
|
-
// names in hand. The suggestion query runs only on this cold, not-found path.
|
|
72
|
-
const suggestions = suggestNames(name, await selectTierNames(rt));
|
|
73
|
-
throw PragmaError.notFound("tier", name, {
|
|
74
|
-
suggestions,
|
|
75
|
-
recovery: {
|
|
76
|
-
message: "List available tiers.",
|
|
77
|
-
cli: "pragma tier list",
|
|
78
|
-
mcp: { tool: "tier_list" },
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
const blocks = rows
|
|
83
|
-
// `blockName` rides an OPTIONAL, so the key is absent for a memberless tier.
|
|
84
|
-
.map((row) => row.blockName as string | undefined)
|
|
85
|
-
.filter((block): block is string => Boolean(block));
|
|
86
|
-
return { uri: compactUri(uri, DEFAULT_PREFIX_MAP), name, blocks };
|
|
87
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formatters for `token add-config` — plain, llm, json.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { Formatters } from "../../kernel/spec/types.js";
|
|
6
|
-
import type { AddConfigResult } from "./runAddConfig.js";
|
|
7
|
-
|
|
8
|
-
export const addConfigFormatters: Formatters<AddConfigResult> = {
|
|
9
|
-
plain(data) {
|
|
10
|
-
const lines = [
|
|
11
|
-
`${data.alreadyExisted ? "Updated" : "Wrote"} ${data.path}`,
|
|
12
|
-
` ${data.tokenCount} token${data.tokenCount === 1 ? "" : "s"} in the active graph`,
|
|
13
|
-
` sources: ${data.sources.join(", ")}`,
|
|
14
|
-
];
|
|
15
|
-
return lines.join("\n");
|
|
16
|
-
},
|
|
17
|
-
llm(data) {
|
|
18
|
-
return [
|
|
19
|
-
`${data.alreadyExisted ? "Updated" : "Wrote"} \`${data.path}\` for the terrazzo token pipeline.`,
|
|
20
|
-
`- ${data.tokenCount} token(s) in the active graph`,
|
|
21
|
-
`- sources: ${data.sources.map((source) => `\`${source}\``).join(", ")}`,
|
|
22
|
-
].join("\n");
|
|
23
|
-
},
|
|
24
|
-
json(data) {
|
|
25
|
-
return JSON.stringify(data);
|
|
26
|
-
},
|
|
27
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync, rmSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
4
|
-
import { CANONICAL_TTL } from "../../testing/fixtures/graph/canonical.js";
|
|
5
|
-
import {
|
|
6
|
-
bootFixtureRuntime,
|
|
7
|
-
type FixtureGraph,
|
|
8
|
-
} from "../../testing/helpers/fixtureGraph.js";
|
|
9
|
-
import type { McpHarness } from "../../testing/helpers/projectMcp.js";
|
|
10
|
-
import { projectMcp } from "../../testing/helpers/projectMcp.js";
|
|
11
|
-
import { capabilities } from "../index.js";
|
|
12
|
-
|
|
13
|
-
let fixture: FixtureGraph;
|
|
14
|
-
let mcp: McpHarness;
|
|
15
|
-
let configPath: string;
|
|
16
|
-
|
|
17
|
-
beforeAll(async () => {
|
|
18
|
-
fixture = await bootFixtureRuntime({ ttl: CANONICAL_TTL });
|
|
19
|
-
mcp = await projectMcp(capabilities, fixture.cwd);
|
|
20
|
-
configPath = join(fixture.cwd, "tokens.config.mjs");
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
afterAll(async () => {
|
|
24
|
-
await mcp.cleanup();
|
|
25
|
-
await fixture.dispose();
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
beforeEach(() => {
|
|
29
|
-
rmSync(configPath, { force: true });
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
describe("token_add-config — plan-first mutation (PROTECTED)", () => {
|
|
33
|
-
it("without confirm, returns a plan and writes NOTHING", async () => {
|
|
34
|
-
const result = await mcp.callTool("token_add-config");
|
|
35
|
-
expect(result.ok).toBe(true);
|
|
36
|
-
const meta = result.meta as {
|
|
37
|
-
planOnly?: boolean;
|
|
38
|
-
confirmRequired?: boolean;
|
|
39
|
-
};
|
|
40
|
-
expect(meta.planOnly).toBe(true);
|
|
41
|
-
expect(meta.confirmRequired).toBe(true);
|
|
42
|
-
const data = result.data as { plan: string[] };
|
|
43
|
-
expect(data.plan.join("\n")).toMatch(/tokens\.config\.mjs/);
|
|
44
|
-
expect(existsSync(configPath)).toBe(false);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it("with confirm, writes a terrazzo config reflecting the store token count", async () => {
|
|
48
|
-
const result = await mcp.callTool("token_add-config", { confirm: true });
|
|
49
|
-
expect(result.ok).toBe(true);
|
|
50
|
-
const data = result.data as {
|
|
51
|
-
path: string;
|
|
52
|
-
tokenCount: number;
|
|
53
|
-
sources: string[];
|
|
54
|
-
};
|
|
55
|
-
expect(existsSync(configPath)).toBe(true);
|
|
56
|
-
// The canonical fixture holds 2 ds:Token entities.
|
|
57
|
-
expect(data.tokenCount).toBe(2);
|
|
58
|
-
const written = readFileSync(configPath, "utf-8");
|
|
59
|
-
expect(written).toContain("defineConfig");
|
|
60
|
-
expect(written).toContain("@canonical/terrazzo");
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `token add-config` — generate a terrazzo `tokens.config.mjs` (the one `token`
|
|
3
|
-
* mutation). Store-backed (needsStore, per covenant) so it can report the token
|
|
4
|
-
* count; plan-first through the uniform mutation seam (a tool call without
|
|
5
|
-
* `confirm` returns the write plan; `--dry-run`/`--yes` on the CLI). No params —
|
|
6
|
-
* the covenant emits `{ v: "add-config", mutates: true, needsStore: true }`.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type { Task } from "@canonical/task";
|
|
10
|
-
import { asVerb } from "../../kernel/spec/asVerb.js";
|
|
11
|
-
import type { VerbSpec } from "../../kernel/spec/types.js";
|
|
12
|
-
import { addConfigFormatters } from "./addConfig.render.js";
|
|
13
|
-
import type { AddConfigResult } from "./runAddConfig.js";
|
|
14
|
-
|
|
15
|
-
const addConfigVerb: VerbSpec<Record<string, unknown>, AddConfigResult> = {
|
|
16
|
-
path: ["token", "add-config"],
|
|
17
|
-
summary: "Generate a tokens.config.mjs for the terrazzo token pipeline.",
|
|
18
|
-
doc: "Writes a terrazzo `defineConfig` at the project root, sourcing token JSON from the configured design-system packages. Store-backed so it reports how many tokens the active graph holds. Plan-first: returns the write plan until you confirm.",
|
|
19
|
-
params: [],
|
|
20
|
-
output: { formatters: addConfigFormatters },
|
|
21
|
-
examples: [
|
|
22
|
-
{ cmd: "pragma token add-config --dry-run", note: "preview the write" },
|
|
23
|
-
{ cmd: "pragma token add-config --yes", note: "write the config" },
|
|
24
|
-
],
|
|
25
|
-
capability: {
|
|
26
|
-
needsStore: true,
|
|
27
|
-
mutates: true,
|
|
28
|
-
mcp: {
|
|
29
|
-
expose: true,
|
|
30
|
-
annotations: { readOnlyHint: false, openWorldHint: false },
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
run: (_params, rt) =>
|
|
34
|
-
import("./runAddConfig.js").then((m) =>
|
|
35
|
-
m.runAddConfig(rt),
|
|
36
|
-
) as unknown as Task<AddConfigResult>,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/** The `token add-config` verb, widened for registry composition. */
|
|
40
|
-
export const tokenAddConfigVerb = asVerb(addConfigVerb);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `token` capability module — the bundled SPARQL pack compiled to verbs.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { compilePack } from "../../kernel/packs/compile.js";
|
|
6
|
-
import { DEFAULT_PREFIX_MAP } from "../../kernel/render/prefixes.js";
|
|
7
|
-
import type { CapabilityModule } from "../../kernel/spec/types.js";
|
|
8
|
-
import { tokenAddConfigVerb } from "./addConfig.verb.js";
|
|
9
|
-
import { tokenPack } from "./pack.js";
|
|
10
|
-
|
|
11
|
-
/** The `token` capability module — the bundled read pack plus the `add-config`
|
|
12
|
-
* mutation (hand-written; the pack compiler emits reads only). */
|
|
13
|
-
export const tokenModule: CapabilityModule = {
|
|
14
|
-
name: "token",
|
|
15
|
-
verbs: [
|
|
16
|
-
...compilePack(tokenPack, "bundled:token", DEFAULT_PREFIX_MAP),
|
|
17
|
-
tokenAddConfigVerb,
|
|
18
|
-
],
|
|
19
|
-
};
|