@canonical/prism-cli 0.0.0-stage → 0.51.0-experimental.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 +43 -2
- package/dist/.build-ok +0 -0
- package/dist/package.json +124 -0
- package/dist/prism.conf.js +42 -0
- package/dist/prism.conf.js.map +1 -0
- package/dist/src/bin.js +11 -0
- package/dist/src/bin.js.map +1 -0
- package/dist/src/build/generatorSurface.js +117 -0
- package/dist/src/build/generatorSurface.js.map +1 -0
- package/dist/src/build/index.js +24 -0
- package/dist/src/build/index.js.map +1 -0
- package/dist/src/capabilities/capabilities/capabilities.render.js +74 -0
- package/dist/src/capabilities/capabilities/capabilities.render.js.map +1 -0
- package/dist/src/capabilities/capabilities/capabilities.verb.js +62 -0
- package/dist/src/capabilities/capabilities/capabilities.verb.js.map +1 -0
- package/dist/src/capabilities/capabilities/catalog.js +140 -0
- package/dist/src/capabilities/capabilities/catalog.js.map +1 -0
- package/dist/src/capabilities/capabilities/index.js +13 -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 +62 -0
- package/dist/src/capabilities/colophon/colophon.render.js.map +1 -0
- package/dist/src/capabilities/colophon/colophon.verb.js +44 -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 +63 -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 +69 -0
- package/dist/src/capabilities/config/set.verb.js.map +1 -0
- package/dist/src/capabilities/config/show.render.js +123 -0
- package/dist/src/capabilities/config/show.render.js.map +1 -0
- package/dist/src/capabilities/config/show.verb.js +45 -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 +51 -0
- package/dist/src/capabilities/config/unset.verb.js.map +1 -0
- package/dist/src/capabilities/create/cliProjection.js +203 -0
- package/dist/src/capabilities/create/cliProjection.js.map +1 -0
- package/dist/src/capabilities/create/constants.js +51 -0
- package/dist/src/capabilities/create/constants.js.map +1 -0
- package/dist/src/capabilities/create/create.render.js +105 -0
- package/dist/src/capabilities/create/create.render.js.map +1 -0
- package/dist/src/capabilities/create/create.verb.js +413 -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/generatorToVerbSpec.js +106 -0
- package/dist/src/capabilities/create/generatorToVerbSpec.js.map +1 -0
- package/dist/src/capabilities/create/index.js +43 -0
- package/dist/src/capabilities/create/index.js.map +1 -0
- package/dist/src/capabilities/create/moduleNotFound.js +23 -0
- package/dist/src/capabilities/create/moduleNotFound.js.map +1 -0
- package/dist/src/capabilities/create/mount.js +302 -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 +48 -0
- package/dist/src/capabilities/create/pickGenerator.js.map +1 -0
- package/dist/src/capabilities/distribution.js +82 -0
- package/dist/src/capabilities/distribution.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkKeStore.js +41 -0
- package/dist/src/capabilities/doctor/checks/checkKeStore.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkNodeVersion.js +26 -0
- package/dist/src/capabilities/doctor/checks/checkNodeVersion.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkPackageRefs.js +156 -0
- package/dist/src/capabilities/doctor/checks/checkPackageRefs.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkPaths.js +62 -0
- package/dist/src/capabilities/doctor/checks/checkPaths.js.map +1 -0
- package/dist/src/capabilities/doctor/checks/checkPragmaVersion.js +32 -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/isSupportedNodeVersion.js +32 -0
- package/dist/src/capabilities/doctor/checks/isSupportedNodeVersion.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 +459 -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 +51 -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 +88 -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/connect.render.js +101 -0
- package/dist/src/capabilities/graph/connect.render.js.map +1 -0
- package/dist/src/capabilities/graph/connect.types.js +21 -0
- package/dist/src/capabilities/graph/connect.types.js.map +1 -0
- package/dist/src/capabilities/graph/connect.verb.js +150 -0
- package/dist/src/capabilities/graph/connect.verb.js.map +1 -0
- package/dist/src/capabilities/graph/index.js +21 -0
- package/dist/src/capabilities/graph/index.js.map +1 -0
- package/dist/src/capabilities/graph/inspect.render.js +82 -0
- package/dist/src/capabilities/graph/inspect.render.js.map +1 -0
- package/dist/src/capabilities/graph/inspect.verb.js +55 -0
- package/dist/src/capabilities/graph/inspect.verb.js.map +1 -0
- package/dist/src/capabilities/graph/query.render.js +105 -0
- package/dist/src/capabilities/graph/query.render.js.map +1 -0
- package/dist/src/capabilities/graph/query.verb.js +51 -0
- package/dist/src/capabilities/graph/query.verb.js.map +1 -0
- package/dist/src/capabilities/graph/queryText.js +234 -0
- package/dist/src/capabilities/graph/queryText.js.map +1 -0
- package/dist/src/capabilities/graph/relationIndex.js +302 -0
- package/dist/src/capabilities/graph/relationIndex.js.map +1 -0
- package/dist/src/capabilities/graph/runConnect.js +456 -0
- package/dist/src/capabilities/graph/runConnect.js.map +1 -0
- package/dist/src/capabilities/graph/runQuery.js +60 -0
- package/dist/src/capabilities/graph/runQuery.js.map +1 -0
- package/dist/src/capabilities/index.js +64 -0
- package/dist/src/capabilities/index.js.map +1 -0
- package/dist/src/capabilities/info/collectInfo.js +74 -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 +68 -0
- package/dist/src/capabilities/info/info.render.js.map +1 -0
- package/dist/src/capabilities/info/info.verb.js +44 -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 +35 -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 +190 -0
- package/dist/src/capabilities/ontology/verbs.js.map +1 -0
- package/dist/src/capabilities/packages/add.verb.js +67 -0
- package/dist/src/capabilities/packages/add.verb.js.map +1 -0
- package/dist/src/capabilities/packages/dependencies.js +103 -0
- package/dist/src/capabilities/packages/dependencies.js.map +1 -0
- package/dist/src/capabilities/packages/files.js +190 -0
- package/dist/src/capabilities/packages/files.js.map +1 -0
- package/dist/src/capabilities/packages/git.js +178 -0
- package/dist/src/capabilities/packages/git.js.map +1 -0
- package/dist/src/capabilities/packages/index.js +30 -0
- package/dist/src/capabilities/packages/index.js.map +1 -0
- package/dist/src/capabilities/packages/init.verb.js +40 -0
- package/dist/src/capabilities/packages/init.verb.js.map +1 -0
- package/dist/src/capabilities/packages/install.js +338 -0
- package/dist/src/capabilities/packages/install.js.map +1 -0
- package/dist/src/capabilities/packages/lockfile.js +378 -0
- package/dist/src/capabilities/packages/lockfile.js.map +1 -0
- package/dist/src/capabilities/packages/manifest.js +181 -0
- package/dist/src/capabilities/packages/manifest.js.map +1 -0
- package/dist/src/capabilities/packages/npm.js +216 -0
- package/dist/src/capabilities/packages/npm.js.map +1 -0
- package/dist/src/capabilities/packages/packages.render.js +59 -0
- package/dist/src/capabilities/packages/packages.render.js.map +1 -0
- package/dist/src/capabilities/packages/range.js +134 -0
- package/dist/src/capabilities/packages/range.js.map +1 -0
- package/dist/src/capabilities/packages/remove.verb.js +38 -0
- package/dist/src/capabilities/packages/remove.verb.js.map +1 -0
- package/dist/src/capabilities/packages/runLock.js +316 -0
- package/dist/src/capabilities/packages/runLock.js.map +1 -0
- package/dist/src/capabilities/packages/runVerbs.js +86 -0
- package/dist/src/capabilities/packages/runVerbs.js.map +1 -0
- package/dist/src/capabilities/packages/skills.js +233 -0
- package/dist/src/capabilities/packages/skills.js.map +1 -0
- package/dist/src/capabilities/packages/source.js +251 -0
- package/dist/src/capabilities/packages/source.js.map +1 -0
- package/dist/src/capabilities/packages/tar.js +200 -0
- package/dist/src/capabilities/packages/tar.js.map +1 -0
- package/dist/src/capabilities/packages/types.js +5 -0
- package/dist/src/capabilities/packages/types.js.map +1 -0
- package/dist/src/capabilities/packages/update.verb.js +46 -0
- package/dist/src/capabilities/packages/update.verb.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 +104 -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 +433 -0
- package/dist/src/capabilities/resources/provider.js.map +1 -0
- package/dist/src/capabilities/setup/buildPlan.js +194 -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 +44 -0
- package/dist/src/capabilities/setup/operations/index.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupCompletions.js +164 -0
- package/dist/src/capabilities/setup/operations/setupCompletions.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupConfig.js +103 -0
- package/dist/src/capabilities/setup/operations/setupConfig.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupGenerator.js +461 -0
- package/dist/src/capabilities/setup/operations/setupGenerator.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupLsp.js +646 -0
- package/dist/src/capabilities/setup/operations/setupLsp.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupMcp.js +399 -0
- package/dist/src/capabilities/setup/operations/setupMcp.js.map +1 -0
- package/dist/src/capabilities/setup/operations/setupSkills.js +820 -0
- package/dist/src/capabilities/setup/operations/setupSkills.js.map +1 -0
- package/dist/src/capabilities/setup/operations/writability.js +114 -0
- package/dist/src/capabilities/setup/operations/writability.js.map +1 -0
- package/dist/src/capabilities/setup/plan.js +177 -0
- package/dist/src/capabilities/setup/plan.js.map +1 -0
- package/dist/src/capabilities/setup/plan.render.js +295 -0
- package/dist/src/capabilities/setup/plan.render.js.map +1 -0
- package/dist/src/capabilities/setup/setup.render.js +60 -0
- package/dist/src/capabilities/setup/setup.render.js.map +1 -0
- package/dist/src/capabilities/setup/setup.verb.js +452 -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 +524 -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 +142 -0
- package/dist/src/capabilities/shared/assertExecOk.js.map +1 -0
- package/dist/src/capabilities/shared/calls.js +16 -0
- package/dist/src/capabilities/shared/calls.js.map +1 -0
- package/dist/src/capabilities/shared/index.js +28 -0
- package/dist/src/capabilities/shared/index.js.map +1 -0
- package/dist/src/capabilities/shared/packageManager.js +350 -0
- package/dist/src/capabilities/shared/packageManager.js.map +1 -0
- package/dist/src/capabilities/shared/registry.js +49 -0
- package/dist/src/capabilities/shared/registry.js.map +1 -0
- package/dist/src/capabilities/shared/releaseState.js +177 -0
- package/dist/src/capabilities/shared/releaseState.js.map +1 -0
- package/dist/src/capabilities/shared/semver.js +77 -0
- package/dist/src/capabilities/shared/semver.js.map +1 -0
- package/dist/src/capabilities/skill/discover.js +265 -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 +52 -0
- package/dist/src/capabilities/skill/render.js.map +1 -0
- package/dist/src/capabilities/skill/verbs.js +84 -0
- package/dist/src/capabilities/skill/verbs.js.map +1 -0
- package/dist/src/capabilities/sources/collectStatus.js +108 -0
- package/dist/src/capabilities/sources/collectStatus.js.map +1 -0
- package/dist/src/capabilities/sources/index.js +14 -0
- package/dist/src/capabilities/sources/index.js.map +1 -0
- package/dist/src/capabilities/sources/installSkills.js +308 -0
- package/dist/src/capabilities/sources/installSkills.js.map +1 -0
- package/dist/src/capabilities/sources/reset.render.js +37 -0
- package/dist/src/capabilities/sources/reset.render.js.map +1 -0
- package/dist/src/capabilities/sources/reset.verb.js +60 -0
- package/dist/src/capabilities/sources/reset.verb.js.map +1 -0
- package/dist/src/capabilities/sources/runReset.js +59 -0
- package/dist/src/capabilities/sources/runReset.js.map +1 -0
- package/dist/src/capabilities/sources/runUpdate.js +491 -0
- package/dist/src/capabilities/sources/runUpdate.js.map +1 -0
- package/dist/src/capabilities/sources/status.render.js +80 -0
- package/dist/src/capabilities/sources/status.render.js.map +1 -0
- package/dist/src/capabilities/sources/status.verb.js +41 -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 +57 -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 +138 -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 +54 -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 +37 -0
- package/dist/src/capabilities/version/version.verb.js.map +1 -0
- package/dist/src/constants.js +105 -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/baseDirs.js +58 -0
- package/dist/src/kernel/baseDirs.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 +286 -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 +101 -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 +20 -0
- package/dist/src/kernel/config/defaults.js.map +1 -0
- package/dist/src/kernel/config/evaluateProjectConfig.js +206 -0
- package/dist/src/kernel/config/evaluateProjectConfig.js.map +1 -0
- package/dist/src/kernel/config/findProjectConfig.js +8 -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 +32 -0
- package/dist/src/kernel/config/paths.js.map +1 -0
- package/dist/src/kernel/config/readConfig.js +79 -0
- package/dist/src/kernel/config/readConfig.js.map +1 -0
- package/dist/src/kernel/config/schema.js +129 -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/distribution/index.js +6 -0
- package/dist/src/kernel/distribution/index.js.map +1 -0
- package/dist/src/kernel/distribution/packageRoot.js +58 -0
- package/dist/src/kernel/distribution/packageRoot.js.map +1 -0
- package/dist/src/kernel/distribution/registry.js +77 -0
- package/dist/src/kernel/distribution/registry.js.map +1 -0
- package/dist/src/kernel/distribution/types.js +16 -0
- package/dist/src/kernel/distribution/types.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 +34 -0
- package/dist/src/kernel/error/recovery.js.map +1 -0
- package/dist/src/kernel/error/renderError.js +125 -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/error/validOptions.js +41 -0
- package/dist/src/kernel/error/validOptions.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 +340 -0
- package/dist/src/kernel/packs/collect.js.map +1 -0
- package/dist/src/kernel/packs/compile.js +451 -0
- package/dist/src/kernel/packs/compile.js.map +1 -0
- package/dist/src/kernel/packs/cursor.js +135 -0
- package/dist/src/kernel/packs/cursor.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 +265 -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 +108 -0
- package/dist/src/kernel/packs/iri.js.map +1 -0
- package/dist/src/kernel/packs/paging.js +108 -0
- package/dist/src/kernel/packs/paging.js.map +1 -0
- package/dist/src/kernel/packs/projectNouns.js +212 -0
- package/dist/src/kernel/packs/projectNouns.js.map +1 -0
- package/dist/src/kernel/packs/renderPack.js +328 -0
- package/dist/src/kernel/packs/renderPack.js.map +1 -0
- package/dist/src/kernel/packs/resolveEntity.js +485 -0
- package/dist/src/kernel/packs/resolveEntity.js.map +1 -0
- package/dist/src/kernel/packs/runBodies.js +337 -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 +623 -0
- package/dist/src/kernel/packs/schema.js.map +1 -0
- package/dist/src/kernel/packs/sparql/authorQuery.js +227 -0
- package/dist/src/kernel/packs/sparql/authorQuery.js.map +1 -0
- package/dist/src/kernel/packs/sparql/buildListQuery.js +318 -0
- package/dist/src/kernel/packs/sparql/buildListQuery.js.map +1 -0
- package/dist/src/kernel/packs/sparql/buildLookupQuery.js +611 -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/filterValues.js +154 -0
- package/dist/src/kernel/packs/sparql/filterValues.js.map +1 -0
- package/dist/src/kernel/packs/sparql/index.js +41 -0
- package/dist/src/kernel/packs/sparql/index.js.map +1 -0
- package/dist/src/kernel/packs/sparql/runSelect.js +105 -0
- package/dist/src/kernel/packs/sparql/runSelect.js.map +1 -0
- package/dist/src/kernel/packs/sparql/searchTerm.js +25 -0
- package/dist/src/kernel/packs/sparql/searchTerm.js.map +1 -0
- package/dist/src/kernel/packs/storyRules.js +178 -0
- package/dist/src/kernel/packs/storyRules.js.map +1 -0
- package/dist/src/kernel/packs/tierScope.js +310 -0
- package/dist/src/kernel/packs/tierScope.js.map +1 -0
- package/dist/src/kernel/packs/types.js +114 -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 +276 -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 +552 -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 +266 -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 +163 -0
- package/dist/src/kernel/project/cli/suggestNames.js.map +1 -0
- package/dist/src/kernel/project/cli/verbHelp.js +130 -0
- package/dist/src/kernel/project/cli/verbHelp.js.map +1 -0
- package/dist/src/kernel/project/mcp/buildServer.js +74 -0
- package/dist/src/kernel/project/mcp/buildServer.js.map +1 -0
- package/dist/src/kernel/project/mcp/envelope.js +38 -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 +114 -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 +163 -0
- package/dist/src/kernel/project/mcp/prompts/source.js.map +1 -0
- package/dist/src/kernel/project/mcp/registerVerb.js +378 -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/displaySafe.js +72 -0
- package/dist/src/kernel/render/displaySafe.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 +500 -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 +211 -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/findProjectConfig.js +58 -0
- package/dist/src/kernel/runtime/findProjectConfig.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/build.js +182 -0
- package/dist/src/kernel/runtime/graphpack/build.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/buildIndex.js +320 -0
- package/dist/src/kernel/runtime/graphpack/buildIndex.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/embedded.js +114 -0
- package/dist/src/kernel/runtime/graphpack/embedded.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/hash.js +43 -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 +159 -0
- package/dist/src/kernel/runtime/graphpack/manifest.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/read.js +143 -0
- package/dist/src/kernel/runtime/graphpack/read.js.map +1 -0
- package/dist/src/kernel/runtime/graphpack/schemas.js +88 -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 +69 -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 +43 -0
- package/dist/src/kernel/runtime/loadSession.js.map +1 -0
- package/dist/src/kernel/runtime/lockState.js +151 -0
- package/dist/src/kernel/runtime/lockState.js.map +1 -0
- package/dist/src/kernel/runtime/packVersion.js +75 -0
- package/dist/src/kernel/runtime/packVersion.js.map +1 -0
- package/dist/src/kernel/runtime/paths.js +160 -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 +417 -0
- package/dist/src/kernel/runtime/readEntity.js.map +1 -0
- package/dist/src/kernel/runtime/refs/gitOps.js +347 -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 +86 -0
- package/dist/src/kernel/runtime/refs/parseRef.js.map +1 -0
- package/dist/src/kernel/runtime/refs/resolve.js +397 -0
- package/dist/src/kernel/runtime/refs/resolve.js.map +1 -0
- package/dist/src/kernel/runtime/resolveSources.js +179 -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 +52 -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/call.js +167 -0
- package/dist/src/kernel/spec/call.js.map +1 -0
- package/dist/src/kernel/spec/emitReference.js +576 -0
- package/dist/src/kernel/spec/emitReference.js.map +1 -0
- package/dist/src/kernel/spec/emitSurface.js +214 -0
- package/dist/src/kernel/spec/emitSurface.js.map +1 -0
- package/dist/src/kernel/spec/guidance.js +63 -0
- package/dist/src/kernel/spec/guidance.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/spec/wireType.js +36 -0
- package/dist/src/kernel/spec/wireType.js.map +1 -0
- package/dist/src/kernel/vocabulary.js +92 -0
- package/dist/src/kernel/vocabulary.js.map +1 -0
- package/dist/src/main.js +453 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/run.js +22 -0
- package/dist/src/run.js.map +1 -0
- package/dist/src/testing/behavioral/liveReadSurface.js +68 -0
- package/dist/src/testing/behavioral/liveReadSurface.js.map +1 -0
- package/dist/src/testing/build.globalSetup.js +569 -0
- package/dist/src/testing/build.globalSetup.js.map +1 -0
- package/dist/src/testing/eval/cases/stable.js +144 -0
- package/dist/src/testing/eval/cases/stable.js.map +1 -0
- package/dist/src/testing/eval/harness.js +44 -0
- package/dist/src/testing/eval/harness.js.map +1 -0
- package/dist/src/testing/helpers/callSchema.js +36 -0
- package/dist/src/testing/helpers/callSchema.js.map +1 -0
- package/dist/src/testing/helpers/fixtureGraph.js +118 -0
- package/dist/src/testing/helpers/fixtureGraph.js.map +1 -0
- package/dist/src/testing/helpers/packRuntime.js +79 -0
- package/dist/src/testing/helpers/packRuntime.js.map +1 -0
- package/dist/src/testing/helpers/parity.js +82 -0
- package/dist/src/testing/helpers/parity.js.map +1 -0
- package/dist/src/testing/helpers/projectCli.js +28 -0
- package/dist/src/testing/helpers/projectCli.js.map +1 -0
- package/dist/src/testing/helpers/projectMcp.js +104 -0
- package/dist/src/testing/helpers/projectMcp.js.map +1 -0
- package/dist/src/testing/helpers/runCli.js +155 -0
- package/dist/src/testing/helpers/runCli.js.map +1 -0
- package/dist/src/testing/index.js +79 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/testing/prismRoot.js +13 -0
- package/dist/src/testing/prismRoot.js.map +1 -0
- package/dist/src/testing/setup/build.js +6 -0
- package/dist/src/testing/setup/build.js.map +1 -0
- package/dist/src/testing/setup/calls.js +3 -0
- package/dist/src/testing/setup/calls.js.map +1 -0
- package/dist/src/testing/setup/offline-registry.js +3 -0
- package/dist/src/testing/setup/offline-registry.js.map +1 -0
- package/dist/src/testing/setup/temp-root.js +3 -0
- package/dist/src/testing/setup/temp-root.js.map +1 -0
- package/dist/src/testing/setup/xdg.js +3 -0
- package/dist/src/testing/setup/xdg.js.map +1 -0
- package/dist/src/testing/setupCallChecking.js +29 -0
- package/dist/src/testing/setupCallChecking.js.map +1 -0
- package/dist/src/testing/setupOfflineRegistry.js +19 -0
- package/dist/src/testing/setupOfflineRegistry.js.map +1 -0
- package/dist/src/testing/setupXdgIsolation.js +84 -0
- package/dist/src/testing/setupXdgIsolation.js.map +1 -0
- package/dist/src/testing/tempRoot.globalSetup.js +115 -0
- package/dist/src/testing/tempRoot.globalSetup.js.map +1 -0
- package/dist/src/types.js +11 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +122 -4
- package/prism.conf.ts +50 -0
- package/src/bin.ts +12 -0
- package/src/build/generatorSurface.ts +151 -0
- package/src/build/index.ts +42 -0
- package/src/capabilities/capabilities/capabilities.render.ts +94 -0
- package/src/capabilities/capabilities/capabilities.verb.ts +69 -0
- package/src/capabilities/capabilities/catalog.ts +174 -0
- package/src/capabilities/capabilities/index.ts +15 -0
- package/src/capabilities/capabilities/types.ts +58 -0
- package/src/capabilities/colophon/collectColophon.ts +94 -0
- package/src/capabilities/colophon/colophon.render.ts +74 -0
- package/src/capabilities/colophon/colophon.verb.ts +49 -0
- package/src/capabilities/colophon/index.ts +6 -0
- package/src/capabilities/colophon/markdownTerminal.ts +104 -0
- package/src/capabilities/colophon/types.ts +37 -0
- package/src/capabilities/config/collectConfigShow.ts +69 -0
- package/src/capabilities/config/field.render.ts +27 -0
- package/src/capabilities/config/fields.ts +61 -0
- package/src/capabilities/config/get.verb.ts +72 -0
- package/src/capabilities/config/index.ts +10 -0
- package/src/capabilities/config/runField.ts +77 -0
- package/src/capabilities/config/runGet.ts +34 -0
- package/src/capabilities/config/runSet.ts +64 -0
- package/src/capabilities/config/set.verb.ts +80 -0
- package/src/capabilities/config/show.render.ts +142 -0
- package/src/capabilities/config/show.verb.ts +51 -0
- package/src/capabilities/config/types.ts +49 -0
- package/src/capabilities/config/unset.verb.ts +60 -0
- package/src/capabilities/create/cliProjection.ts +244 -0
- package/src/capabilities/create/constants.ts +67 -0
- package/src/capabilities/create/create.render.ts +121 -0
- package/src/capabilities/create/create.verb.ts +492 -0
- package/src/capabilities/create/createHelp.ts +71 -0
- package/src/capabilities/create/generatorToVerbSpec.ts +113 -0
- package/src/capabilities/create/index.ts +49 -0
- package/src/capabilities/create/moduleNotFound.ts +28 -0
- package/src/capabilities/create/mount.ts +403 -0
- package/src/capabilities/create/pathJail.ts +76 -0
- package/src/capabilities/create/pickGenerator.ts +51 -0
- package/src/capabilities/distribution.ts +109 -0
- package/src/capabilities/doctor/checks/checkKeStore.ts +42 -0
- package/src/capabilities/doctor/checks/checkNodeVersion.ts +29 -0
- package/src/capabilities/doctor/checks/checkPackageRefs.ts +186 -0
- package/src/capabilities/doctor/checks/checkPaths.ts +81 -0
- package/src/capabilities/doctor/checks/checkPragmaVersion.ts +36 -0
- package/src/capabilities/doctor/checks/checkShellCompletions.ts +217 -0
- package/src/capabilities/doctor/checks/harnessInventory.ts +302 -0
- package/src/capabilities/doctor/checks/index.ts +27 -0
- package/src/capabilities/doctor/checks/isSupportedNodeVersion.ts +31 -0
- package/src/capabilities/doctor/checks/mcpCommand.ts +69 -0
- package/src/capabilities/doctor/checks/targetHealth.ts +576 -0
- package/src/capabilities/doctor/doctor.render.ts +199 -0
- package/src/capabilities/doctor/doctor.verb.ts +57 -0
- package/src/capabilities/doctor/index.ts +6 -0
- package/src/capabilities/doctor/runChecks.ts +104 -0
- package/src/capabilities/doctor/types.ts +63 -0
- package/src/capabilities/graph/connect.render.ts +141 -0
- package/src/capabilities/graph/connect.types.ts +136 -0
- package/src/capabilities/graph/connect.verb.ts +168 -0
- package/src/capabilities/graph/index.ts +23 -0
- package/src/capabilities/graph/inspect.render.ts +94 -0
- package/src/capabilities/graph/inspect.verb.ts +66 -0
- package/src/capabilities/graph/query.render.ts +127 -0
- package/src/capabilities/graph/query.verb.ts +61 -0
- package/src/capabilities/graph/queryText.ts +287 -0
- package/src/capabilities/graph/relationIndex.ts +372 -0
- package/src/capabilities/graph/runConnect.ts +576 -0
- package/src/capabilities/graph/runQuery.ts +80 -0
- package/src/capabilities/index.ts +73 -0
- package/src/capabilities/info/collectInfo.ts +90 -0
- package/src/capabilities/info/index.ts +6 -0
- package/src/capabilities/info/info.render.ts +89 -0
- package/src/capabilities/info/info.verb.ts +49 -0
- package/src/capabilities/info/types.ts +50 -0
- package/src/capabilities/meta/complete.verb.ts +52 -0
- package/src/capabilities/meta/index.ts +15 -0
- package/src/capabilities/meta/mcp.verb.ts +39 -0
- package/src/capabilities/ontology/index.ts +23 -0
- package/src/capabilities/ontology/queries.ts +197 -0
- package/src/capabilities/ontology/render.ts +86 -0
- package/src/capabilities/ontology/verbs.ts +242 -0
- package/src/capabilities/packages/add.verb.ts +86 -0
- package/src/capabilities/packages/dependencies.ts +122 -0
- package/src/capabilities/packages/files.ts +260 -0
- package/src/capabilities/packages/git.ts +218 -0
- package/src/capabilities/packages/index.ts +32 -0
- package/src/capabilities/packages/init.verb.ts +48 -0
- package/src/capabilities/packages/install.ts +480 -0
- package/src/capabilities/packages/lockfile.ts +493 -0
- package/src/capabilities/packages/manifest.ts +222 -0
- package/src/capabilities/packages/npm.ts +271 -0
- package/src/capabilities/packages/packages.render.ts +62 -0
- package/src/capabilities/packages/range.ts +149 -0
- package/src/capabilities/packages/remove.verb.ts +48 -0
- package/src/capabilities/packages/runLock.ts +430 -0
- package/src/capabilities/packages/runVerbs.ts +122 -0
- package/src/capabilities/packages/skills.ts +290 -0
- package/src/capabilities/packages/source.ts +338 -0
- package/src/capabilities/packages/tar.ts +217 -0
- package/src/capabilities/packages/types.ts +32 -0
- package/src/capabilities/packages/update.verb.ts +58 -0
- package/src/capabilities/prompt/index.ts +18 -0
- package/src/capabilities/prompt/prompt.render.ts +91 -0
- package/src/capabilities/prompt/types.ts +30 -0
- package/src/capabilities/prompt/verbs.ts +122 -0
- package/src/capabilities/resources/index.ts +15 -0
- package/src/capabilities/resources/provider.ts +535 -0
- package/src/capabilities/setup/buildPlan.ts +267 -0
- package/src/capabilities/setup/index.ts +12 -0
- package/src/capabilities/setup/mode.ts +74 -0
- package/src/capabilities/setup/operations/index.ts +94 -0
- package/src/capabilities/setup/operations/setupCompletions.ts +221 -0
- package/src/capabilities/setup/operations/setupConfig.ts +129 -0
- package/src/capabilities/setup/operations/setupGenerator.ts +651 -0
- package/src/capabilities/setup/operations/setupLsp.ts +934 -0
- package/src/capabilities/setup/operations/setupMcp.ts +583 -0
- package/src/capabilities/setup/operations/setupSkills.ts +1057 -0
- package/src/capabilities/setup/operations/writability.ts +135 -0
- package/src/capabilities/setup/plan.render.ts +371 -0
- package/src/capabilities/setup/plan.ts +320 -0
- package/src/capabilities/setup/setup.render.ts +70 -0
- package/src/capabilities/setup/setup.verb.ts +555 -0
- package/src/capabilities/setup/shell.ts +237 -0
- package/src/capabilities/setup/targets.ts +685 -0
- package/src/capabilities/setup/types.ts +88 -0
- package/src/capabilities/shared/assertExecOk.ts +169 -0
- package/src/capabilities/shared/calls.ts +20 -0
- package/src/capabilities/shared/index.ts +45 -0
- package/src/capabilities/shared/packageManager.ts +457 -0
- package/src/capabilities/shared/registry.ts +63 -0
- package/src/capabilities/shared/releaseState.ts +221 -0
- package/src/capabilities/shared/semver.ts +74 -0
- package/src/capabilities/skill/discover.ts +288 -0
- package/src/capabilities/skill/index.ts +12 -0
- package/src/capabilities/skill/render.ts +64 -0
- package/src/capabilities/skill/verbs.ts +103 -0
- package/src/capabilities/sources/collectStatus.ts +117 -0
- package/src/capabilities/sources/index.ts +16 -0
- package/src/capabilities/sources/installSkills.ts +380 -0
- package/src/capabilities/sources/reset.render.ts +43 -0
- package/src/capabilities/sources/reset.verb.ts +70 -0
- package/src/capabilities/sources/runReset.ts +65 -0
- package/src/capabilities/sources/runUpdate.ts +619 -0
- package/src/capabilities/sources/status.render.ts +95 -0
- package/src/capabilities/sources/status.verb.ts +51 -0
- package/src/capabilities/sources/types.ts +70 -0
- package/src/capabilities/sources/update.render.ts +42 -0
- package/src/capabilities/sources/update.verb.ts +68 -0
- package/src/capabilities/upgrade/index.ts +6 -0
- package/src/capabilities/upgrade/runUpgrade.ts +161 -0
- package/src/capabilities/upgrade/types.ts +29 -0
- package/src/capabilities/upgrade/upgrade.render.ts +61 -0
- package/src/capabilities/upgrade/upgrade.verb.ts +62 -0
- package/src/capabilities/version/index.ts +12 -0
- package/src/capabilities/version/version.verb.ts +40 -0
- package/src/constants.ts +145 -0
- package/src/index.ts +50 -0
- package/src/kernel/baseDirs.ts +73 -0
- package/src/kernel/completion/complete.ts +77 -0
- package/src/kernel/completion/emitScripts.ts +124 -0
- package/src/kernel/completion/entitySource.ts +303 -0
- package/src/kernel/completion/index.ts +42 -0
- package/src/kernel/completion/model.ts +349 -0
- package/src/kernel/completion/parse.ts +309 -0
- package/src/kernel/completion/rank.ts +118 -0
- package/src/kernel/completion/resolve.ts +134 -0
- package/src/kernel/completion/templates/bash.ts +254 -0
- package/src/kernel/completion/templates/fish.ts +267 -0
- package/src/kernel/completion/templates/index.ts +23 -0
- package/src/kernel/completion/templates/shared.ts +134 -0
- package/src/kernel/completion/templates/zsh.ts +246 -0
- package/src/kernel/completion/types.ts +160 -0
- package/src/kernel/config/defaults.ts +23 -0
- package/src/kernel/config/evaluateProjectConfig.ts +240 -0
- package/src/kernel/config/findProjectConfig.ts +8 -0
- package/src/kernel/config/firstRun.ts +34 -0
- package/src/kernel/config/globalConfig.ts +94 -0
- package/src/kernel/config/index.ts +34 -0
- package/src/kernel/config/paths.ts +36 -0
- package/src/kernel/config/readConfig.ts +95 -0
- package/src/kernel/config/schema.ts +144 -0
- package/src/kernel/config/types.ts +162 -0
- package/src/kernel/config/writeConfigField.ts +82 -0
- package/src/kernel/copy.ts +54 -0
- package/src/kernel/distribution/index.ts +27 -0
- package/src/kernel/distribution/packageRoot.ts +58 -0
- package/src/kernel/distribution/registry.ts +99 -0
- package/src/kernel/distribution/types.ts +330 -0
- package/src/kernel/error/PragmaError.ts +184 -0
- package/src/kernel/error/constants.ts +41 -0
- package/src/kernel/error/fromTaskError.ts +102 -0
- package/src/kernel/error/index.ts +23 -0
- package/src/kernel/error/recovery.ts +37 -0
- package/src/kernel/error/renderError.ts +154 -0
- package/src/kernel/error/serialize.ts +28 -0
- package/src/kernel/error/types.ts +83 -0
- package/src/kernel/error/validOptions.ts +45 -0
- package/src/kernel/index.ts +35 -0
- package/src/kernel/interactivity.ts +69 -0
- package/src/kernel/packs/collect.ts +445 -0
- package/src/kernel/packs/compile.ts +596 -0
- package/src/kernel/packs/cursor.ts +135 -0
- package/src/kernel/packs/disclosure.ts +98 -0
- package/src/kernel/packs/glob.ts +39 -0
- package/src/kernel/packs/graphql/buildLookupDocument.ts +404 -0
- package/src/kernel/packs/graphql/fetchGraphqlLookup.ts +216 -0
- package/src/kernel/packs/graphql/index.ts +20 -0
- package/src/kernel/packs/graphql/nameMap.ts +67 -0
- package/src/kernel/packs/index.ts +40 -0
- package/src/kernel/packs/iri.ts +129 -0
- package/src/kernel/packs/paging.ts +110 -0
- package/src/kernel/packs/projectNouns.ts +251 -0
- package/src/kernel/packs/renderPack.ts +478 -0
- package/src/kernel/packs/resolveEntity.ts +734 -0
- package/src/kernel/packs/runBodies.ts +494 -0
- package/src/kernel/packs/sample.ts +60 -0
- package/src/kernel/packs/schema.ts +719 -0
- package/src/kernel/packs/sparql/authorQuery.ts +257 -0
- package/src/kernel/packs/sparql/buildListQuery.ts +434 -0
- package/src/kernel/packs/sparql/buildLookupQuery.ts +681 -0
- package/src/kernel/packs/sparql/escape.ts +22 -0
- package/src/kernel/packs/sparql/filterValues.ts +201 -0
- package/src/kernel/packs/sparql/index.ts +53 -0
- package/src/kernel/packs/sparql/runSelect.ts +160 -0
- package/src/kernel/packs/sparql/searchTerm.ts +29 -0
- package/src/kernel/packs/storyRules.ts +213 -0
- package/src/kernel/packs/tierScope.ts +407 -0
- package/src/kernel/packs/types.ts +893 -0
- package/src/kernel/packs/uniqueness.ts +35 -0
- package/src/kernel/project/cli/buildProgram.ts +380 -0
- package/src/kernel/project/cli/constants.ts +34 -0
- package/src/kernel/project/cli/dispatch.ts +680 -0
- package/src/kernel/project/cli/exitCodes.ts +68 -0
- package/src/kernel/project/cli/globalFlags.ts +256 -0
- package/src/kernel/project/cli/helpFormat.ts +70 -0
- package/src/kernel/project/cli/index.ts +21 -0
- package/src/kernel/project/cli/rootHelp.ts +338 -0
- package/src/kernel/project/cli/suggest.ts +91 -0
- package/src/kernel/project/cli/suggestNames.ts +195 -0
- package/src/kernel/project/cli/verbHelp.ts +157 -0
- package/src/kernel/project/mcp/buildServer.ts +89 -0
- package/src/kernel/project/mcp/envelope.ts +45 -0
- package/src/kernel/project/mcp/index.ts +8 -0
- package/src/kernel/project/mcp/instructions.ts +141 -0
- package/src/kernel/project/mcp/mcpError.ts +52 -0
- package/src/kernel/project/mcp/prompts/index.ts +37 -0
- package/src/kernel/project/mcp/prompts/provider.ts +120 -0
- package/src/kernel/project/mcp/prompts/source.ts +209 -0
- package/src/kernel/project/mcp/registerVerb.ts +426 -0
- package/src/kernel/project/mcp/serve.ts +42 -0
- package/src/kernel/render/compactUri.ts +25 -0
- package/src/kernel/render/contracts.ts +101 -0
- package/src/kernel/render/disclosure.ts +46 -0
- package/src/kernel/render/displaySafe.ts +80 -0
- package/src/kernel/render/envelope.ts +49 -0
- package/src/kernel/render/formatters.ts +31 -0
- package/src/kernel/render/index.ts +30 -0
- package/src/kernel/render/prefixes.ts +48 -0
- package/src/kernel/render/renderers.ts +682 -0
- package/src/kernel/render/style.ts +127 -0
- package/src/kernel/render/turtle.ts +242 -0
- package/src/kernel/render/vocabulary.ts +276 -0
- package/src/kernel/render/writeStdout.ts +49 -0
- package/src/kernel/runtime/boot.ts +59 -0
- package/src/kernel/runtime/facade.ts +47 -0
- package/src/kernel/runtime/findProjectConfig.ts +62 -0
- package/src/kernel/runtime/graphpack/build.ts +260 -0
- package/src/kernel/runtime/graphpack/buildIndex.ts +371 -0
- package/src/kernel/runtime/graphpack/embedded.ts +136 -0
- package/src/kernel/runtime/graphpack/hash.ts +56 -0
- package/src/kernel/runtime/graphpack/index.ts +21 -0
- package/src/kernel/runtime/graphpack/manifest.ts +172 -0
- package/src/kernel/runtime/graphpack/read.ts +170 -0
- package/src/kernel/runtime/graphpack/schemas.ts +97 -0
- package/src/kernel/runtime/graphpack/stories.ts +84 -0
- package/src/kernel/runtime/graphpack/types.ts +187 -0
- package/src/kernel/runtime/index.ts +15 -0
- package/src/kernel/runtime/loadSession.ts +57 -0
- package/src/kernel/runtime/lockState.ts +196 -0
- package/src/kernel/runtime/packVersion.ts +84 -0
- package/src/kernel/runtime/paths.ts +176 -0
- package/src/kernel/runtime/probe.ts +39 -0
- package/src/kernel/runtime/readEntity.ts +598 -0
- package/src/kernel/runtime/refs/gitOps.ts +426 -0
- package/src/kernel/runtime/refs/index.ts +39 -0
- package/src/kernel/runtime/refs/parseRef.ts +127 -0
- package/src/kernel/runtime/refs/resolve.ts +475 -0
- package/src/kernel/runtime/resolveSources.ts +235 -0
- package/src/kernel/runtime/store.ts +90 -0
- package/src/kernel/runtime/storeReadiness.ts +61 -0
- package/src/kernel/runtime/types.ts +266 -0
- package/src/kernel/spec/asVerb.ts +23 -0
- package/src/kernel/spec/call.ts +186 -0
- package/src/kernel/spec/emitReference.ts +701 -0
- package/src/kernel/spec/emitSurface.ts +285 -0
- package/src/kernel/spec/guidance.ts +68 -0
- package/src/kernel/spec/index.ts +41 -0
- package/src/kernel/spec/surfaceConformance.ts +143 -0
- package/src/kernel/spec/types.ts +636 -0
- package/src/kernel/spec/validate.ts +126 -0
- package/src/kernel/spec/wireType.ts +53 -0
- package/src/kernel/vocabulary.ts +121 -0
- package/src/main.ts +615 -0
- package/src/run.ts +26 -0
- package/src/testing/behavioral/liveReadSurface.ts +112 -0
- package/src/testing/build.globalSetup.ts +641 -0
- package/src/testing/eval/cases/stable.ts +165 -0
- package/src/testing/eval/harness.ts +91 -0
- package/src/testing/helpers/callSchema.ts +40 -0
- package/src/testing/helpers/fixtureGraph.ts +165 -0
- package/src/testing/helpers/packRuntime.ts +117 -0
- package/src/testing/helpers/parity.ts +119 -0
- package/src/testing/helpers/projectCli.ts +36 -0
- package/src/testing/helpers/projectMcp.ts +178 -0
- package/src/testing/helpers/runCli.ts +209 -0
- package/src/testing/index.ts +218 -0
- package/src/testing/prismRoot.ts +14 -0
- package/src/testing/setup/build.ts +5 -0
- package/src/testing/setup/calls.ts +2 -0
- package/src/testing/setup/offline-registry.ts +2 -0
- package/src/testing/setup/temp-root.ts +2 -0
- package/src/testing/setup/xdg.ts +2 -0
- package/src/testing/setupCallChecking.ts +30 -0
- package/src/testing/setupOfflineRegistry.ts +20 -0
- package/src/testing/setupXdgIsolation.ts +87 -0
- package/src/testing/tempRoot.globalSetup.ts +122 -0
- package/src/types.ts +61 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ontology list` and `ontology lookup <prefix>` — schema (TBox) inspection.
|
|
3
|
+
*
|
|
4
|
+
* `list` groups loaded namespaces by prefix with class/property counts; `lookup`
|
|
5
|
+
* renders a namespace's class hierarchy (with per-class instance counts read
|
|
6
|
+
* from the pack index) and, with `--properties`, a `--class` focus, or a
|
|
7
|
+
* `--detail` of `standard`+, its properties. `--full-uris` shows absolute IRIs;
|
|
8
|
+
* `--class <name>` narrows to one class and the properties whose domain is that
|
|
9
|
+
* class.
|
|
10
|
+
*
|
|
11
|
+
* `ontology lookup` is the ratified by-name read name (AV-228 B1 renamed it
|
|
12
|
+
* from `show` for consistency with block/standard/tier/etc.); the old alias
|
|
13
|
+
* is gone — one job, one spelling.
|
|
14
|
+
*
|
|
15
|
+
* Disclosure (B5): rather than reinvent its own scheme, the by-name read declares
|
|
16
|
+
* the canonical disclosure ladder and honours the `--detail`/config `detail` the
|
|
17
|
+
* rest of the CLI reads AND the injected `detail` tool param the MCP projector
|
|
18
|
+
* derives from that declaration — a two-behaviour fold where `summary` is
|
|
19
|
+
* classes-only and `standard`/`detailed` add the properties section. The frozen
|
|
20
|
+
* `--properties` flag stays as an explicit override (it forces the section at
|
|
21
|
+
* any level), so the covenant is untouched.
|
|
22
|
+
*/
|
|
23
|
+
import { BIN_NAME } from "../../constants.js";
|
|
24
|
+
import { callRecovery, PragmaError } from "../../kernel/error/index.js";
|
|
25
|
+
import { resolvePackDetail } from "../../kernel/packs/disclosure.js";
|
|
26
|
+
import { asVerb } from "../../kernel/spec/asVerb.js";
|
|
27
|
+
import { listNamespaces, localName, queryClasses, queryProperties, } from "./queries.js";
|
|
28
|
+
import { ontologyListFormatters, ontologyShowFormatters } from "./render.js";
|
|
29
|
+
/** Resolve a prefix (`ds`) or full namespace URI to the `{ prefix, namespace }` pair. */
|
|
30
|
+
function resolvePrefix(input, prefixes) {
|
|
31
|
+
if (input.startsWith("http://") || input.startsWith("https://")) {
|
|
32
|
+
const entry = Object.entries(prefixes).find(([, ns]) => ns === input);
|
|
33
|
+
if (entry)
|
|
34
|
+
return { prefix: entry[0], namespace: entry[1] };
|
|
35
|
+
throw PragmaError.invalidInput("namespace", input, {
|
|
36
|
+
validOptions: Object.values(prefixes),
|
|
37
|
+
recovery: callRecovery({ verb: "ontology list" }, "List loaded ontology namespaces."),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const namespace = prefixes[input];
|
|
41
|
+
if (namespace === undefined) {
|
|
42
|
+
throw PragmaError.invalidInput("prefix", input, {
|
|
43
|
+
validOptions: Object.keys(prefixes),
|
|
44
|
+
recovery: callRecovery({ verb: "ontology list" }, "List loaded ontologies."),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return { prefix: input, namespace };
|
|
48
|
+
}
|
|
49
|
+
const listVerb = {
|
|
50
|
+
path: ["ontology", "list"],
|
|
51
|
+
summary: "List loaded ontology namespaces with class and property counts.",
|
|
52
|
+
useWhen: "when asked which vocabularies (namespaces and their prefixes) the data uses — the first step before writing a raw query",
|
|
53
|
+
params: [],
|
|
54
|
+
output: { formatters: ontologyListFormatters },
|
|
55
|
+
examples: [{ cmd: `${BIN_NAME} ontology list` }],
|
|
56
|
+
capability: {
|
|
57
|
+
needsStore: true,
|
|
58
|
+
mutates: false,
|
|
59
|
+
mcp: {
|
|
60
|
+
expose: true,
|
|
61
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
run: async (_params, rt) => {
|
|
65
|
+
const session = await rt.store.get();
|
|
66
|
+
return listNamespaces(rt, session.prefixes);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* The canonical disclosure the by-name read folds onto (B5). Declared on
|
|
71
|
+
* {@link ontologyLookupVerb} — so the MCP projector injects the `detail` enum
|
|
72
|
+
* tool param and its per-call `withDetail` seeding light up (symmetric with
|
|
73
|
+
* `block`/`standard`, which an inline resolve left dark over MCP) — AND read by
|
|
74
|
+
* `run` to resolve the effective level, so the advertised param and the fetched
|
|
75
|
+
* level share ONE source. The levels are the full canonical ladder; the fold is
|
|
76
|
+
* two-behaviour (`summary` = classes only, `standard`/`detailed` add properties).
|
|
77
|
+
*/
|
|
78
|
+
const BY_NAME_DISCLOSURE = {
|
|
79
|
+
levels: ["summary", "standard", "detailed"],
|
|
80
|
+
default: "summary",
|
|
81
|
+
};
|
|
82
|
+
/** The params of the `ontology lookup` by-name read. */
|
|
83
|
+
const BY_NAME_PARAMS = [
|
|
84
|
+
{
|
|
85
|
+
kind: "string",
|
|
86
|
+
name: "prefix",
|
|
87
|
+
doc: "The namespace prefix (ds) or full URI.",
|
|
88
|
+
positional: true,
|
|
89
|
+
required: true,
|
|
90
|
+
complete: { kind: "names", source: { from: "prefixes" } },
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
kind: "boolean",
|
|
94
|
+
name: "properties",
|
|
95
|
+
doc: "Include the properties section (also implied by --detail standard or higher).",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
kind: "boolean",
|
|
99
|
+
name: "fullUris",
|
|
100
|
+
doc: "Show full IRIs instead of prefixed.",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
kind: "string",
|
|
104
|
+
name: "class",
|
|
105
|
+
doc: "Focus on one class and its properties.",
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
/** The by-name read capability — a storeless-free, read-only MCP tool. */
|
|
109
|
+
const BY_NAME_CAPABILITY = {
|
|
110
|
+
needsStore: true,
|
|
111
|
+
mutates: false,
|
|
112
|
+
mcp: {
|
|
113
|
+
expose: true,
|
|
114
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* The `ontology lookup` by-name read handler.
|
|
119
|
+
*
|
|
120
|
+
* @param params - The coerced param bag (`prefix`, `properties`, `fullUris`, `class`).
|
|
121
|
+
* @param rt - The runtime (store + disclosure precedence).
|
|
122
|
+
* @returns The namespace's classes (and, per disclosure, properties) payload.
|
|
123
|
+
*/
|
|
124
|
+
async function runByName(params, rt) {
|
|
125
|
+
const session = await rt.store.get();
|
|
126
|
+
const { prefix, namespace } = resolvePrefix(String(params.prefix), session.prefixes);
|
|
127
|
+
const focus = typeof params.class === "string" ? params.class : undefined;
|
|
128
|
+
// Fold ontology's bespoke disclosure onto the canonical `--detail` (B5),
|
|
129
|
+
// resolving through the SAME {@link BY_NAME_DISCLOSURE} the verb declares (so
|
|
130
|
+
// the MCP `detail` param and its withDetail seeding resolve identically, not
|
|
131
|
+
// just the CLI `--detail` flag) and the SAME precedence packs use (flag >
|
|
132
|
+
// explicit config > default). The frozen `--properties` flag and a `--class`
|
|
133
|
+
// focus still force the section, so honouring the level is covenant-safe.
|
|
134
|
+
const level = await resolvePackDetail(rt, BY_NAME_DISCLOSURE);
|
|
135
|
+
const wantProperties = params.properties === true || focus !== undefined || level !== "summary";
|
|
136
|
+
// The class list is the GRAPH-TRUTH surface, so a class's count is named +
|
|
137
|
+
// anonymous instances: the shipped pack models every `ds:Property` /
|
|
138
|
+
// `ds:ChangeLogEntry` individual as a blank node, and the named-only count
|
|
139
|
+
// reported those 330/42 instances as 0 (A11). The two records stay separate
|
|
140
|
+
// in the index (named keeps its browse-promise meaning); summing here is
|
|
141
|
+
// this display's choice.
|
|
142
|
+
const totalCounts = {
|
|
143
|
+
...session.index.instanceCountByType,
|
|
144
|
+
};
|
|
145
|
+
for (const [uri, count] of Object.entries(session.index.anonymousInstanceCountByType ?? {})) {
|
|
146
|
+
totalCounts[uri] = (totalCounts[uri] ?? 0) + count;
|
|
147
|
+
}
|
|
148
|
+
let classes = await queryClasses(rt, namespace, totalCounts);
|
|
149
|
+
let properties = wantProperties ? await queryProperties(rt, namespace) : [];
|
|
150
|
+
if (focus !== undefined) {
|
|
151
|
+
const needle = focus.toLowerCase();
|
|
152
|
+
classes = classes.filter((c) => localName(c.uri).toLowerCase() === needle ||
|
|
153
|
+
c.label.toLowerCase() === needle);
|
|
154
|
+
const focusUris = new Set(classes.map((c) => c.uri));
|
|
155
|
+
properties = properties.filter((p) => p.domain !== undefined && focusUris.has(p.domain));
|
|
156
|
+
}
|
|
157
|
+
if (classes.length === 0 && properties.length === 0) {
|
|
158
|
+
throw PragmaError.notFound("ontology", String(params.prefix), {
|
|
159
|
+
recovery: callRecovery({ verb: "ontology list" }, "List loaded ontologies."),
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
prefix,
|
|
164
|
+
namespace,
|
|
165
|
+
classes,
|
|
166
|
+
properties,
|
|
167
|
+
fullUris: params.fullUris === true,
|
|
168
|
+
...(focus !== undefined ? { focus } : {}),
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/** The `ontology` verbs (`list` and the `lookup` by-name read). */
|
|
172
|
+
export const ontologyListVerb = asVerb(listVerb);
|
|
173
|
+
/** `ontology lookup <prefix>` — the by-name schema read. */
|
|
174
|
+
export const ontologyLookupVerb = asVerb({
|
|
175
|
+
path: ["ontology", "lookup"],
|
|
176
|
+
summary: "Look up a namespace's classes (hierarchy + counts) and properties.",
|
|
177
|
+
useWhen: "before writing a raw query, to find the real class and property names under one prefix",
|
|
178
|
+
example: { prefix: "owl" },
|
|
179
|
+
params: BY_NAME_PARAMS,
|
|
180
|
+
output: { formatters: ontologyShowFormatters },
|
|
181
|
+
examples: [
|
|
182
|
+
{ cmd: `${BIN_NAME} ontology lookup owl` },
|
|
183
|
+
{ cmd: `${BIN_NAME} ontology lookup owl --properties` },
|
|
184
|
+
{ cmd: `${BIN_NAME} ontology lookup owl --class Class` },
|
|
185
|
+
],
|
|
186
|
+
disclosure: BY_NAME_DISCLOSURE,
|
|
187
|
+
capability: BY_NAME_CAPABILITY,
|
|
188
|
+
run: runByName,
|
|
189
|
+
});
|
|
190
|
+
//# sourceMappingURL=verbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verbs.js","sourceRoot":"","sources":["../../../../src/capabilities/ontology/verbs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAMrD,OAAO,EACL,cAAc,EACd,SAAS,EAGT,YAAY,EACZ,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE7E,yFAAyF;AACzF,SAAS,aAAa,CACpB,KAAa,EACb,QAA0C;IAE1C,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAChE,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,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AAC;AAEjD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,OAAO,EAAE,oEAAoE;IAC7E,OAAO,EACL,wFAAwF;IAC1F,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;IAC1B,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE;IAC9C,QAAQ,EAAE;QACR,EAAE,GAAG,EAAE,GAAG,QAAQ,sBAAsB,EAAE;QAC1C,EAAE,GAAG,EAAE,GAAG,QAAQ,mCAAmC,EAAE;QACvD,EAAE,GAAG,EAAE,GAAG,QAAQ,oCAAoC,EAAE;KACzD;IACD,UAAU,EAAE,kBAAkB;IAC9B,UAAU,EAAE,kBAAkB;IAC9B,GAAG,EAAE,SAAS;CAC+C,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `add` verb — bring a package of definitions, data and skills into the
|
|
3
|
+
* project (or, with `--global`, the global set), pin it in the lock, and
|
|
4
|
+
* rebuild. No registry: a path, a git URL or an npm name.
|
|
5
|
+
*/
|
|
6
|
+
import { BIN_NAME } from "../../constants.js";
|
|
7
|
+
import { packagesFormatters } from "./packages.render.js";
|
|
8
|
+
/** The `--global` param `add`, `remove` and `update` share. */
|
|
9
|
+
export const GLOBAL_PARAM = {
|
|
10
|
+
kind: "boolean",
|
|
11
|
+
name: "global",
|
|
12
|
+
doc: "Use the global set, not this project's.",
|
|
13
|
+
};
|
|
14
|
+
/** The `add` verb spec. */
|
|
15
|
+
export const addVerb = {
|
|
16
|
+
path: ["add"],
|
|
17
|
+
summary: "Add a package from a path, a git URL or npm, and pin it.",
|
|
18
|
+
doc: "Pins it in the lock and rebuilds. Nothing in a package runs.",
|
|
19
|
+
useWhen: "when asked to add a package to the graph",
|
|
20
|
+
example: { source: "./packages/my-terms" },
|
|
21
|
+
params: [
|
|
22
|
+
{
|
|
23
|
+
kind: "string",
|
|
24
|
+
name: "source",
|
|
25
|
+
doc: "Folder, git URL, or npm:<name>[@<range>].",
|
|
26
|
+
required: true,
|
|
27
|
+
positional: true,
|
|
28
|
+
complete: { kind: "files" },
|
|
29
|
+
},
|
|
30
|
+
{ kind: "string", name: "tag", doc: "Git tag." },
|
|
31
|
+
{ kind: "string", name: "branch", doc: "Git branch." },
|
|
32
|
+
{ kind: "string", name: "rev", doc: "Git commit." },
|
|
33
|
+
{
|
|
34
|
+
kind: "string",
|
|
35
|
+
name: "subpath",
|
|
36
|
+
doc: "Folder in the repository.",
|
|
37
|
+
},
|
|
38
|
+
GLOBAL_PARAM,
|
|
39
|
+
],
|
|
40
|
+
output: { formatters: packagesFormatters("add") },
|
|
41
|
+
examples: [
|
|
42
|
+
{
|
|
43
|
+
cmd: `${BIN_NAME} add ./packages/my-terms`,
|
|
44
|
+
note: "a folder in this project",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
cmd: `${BIN_NAME} add https://github.com/org/terms.git --tag v1.2.0 --subpath packages/terms`,
|
|
48
|
+
note: "a package inside a repository, pinned to a tag",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
cmd: `${BIN_NAME} add npm:@org/terms@^1.2.0`,
|
|
52
|
+
note: "from npm, no scripts run",
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
capability: {
|
|
56
|
+
needsStore: false,
|
|
57
|
+
mutates: true,
|
|
58
|
+
needsNetwork: true,
|
|
59
|
+
mcp: {
|
|
60
|
+
expose: false,
|
|
61
|
+
reason: "It fetches from a source a person names; an agent must not fetch untrusted packages on a prompt.",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
// `Promise<Task<R>>` through the `Task<R>` arm — see `sources update`.
|
|
65
|
+
run: (params, runtime) => import("./runVerbs.js").then((module) => module.runAdd(params, runtime)),
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingUR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ACjD,QAAQ,EAAE;QACR;YACE,GAAG,EAAE,GAAG,QAAQ,0BAA0B;YAC1C,IAAI,EAAE,0BAA0B;SACjC;QACD;YACE,GAAG,EAAE,GAAG,QAAQ,6EAA6E;YAC7F,IAAI,EAAE,gDAAgD;SACvD;QACD;YACE,GAAG,EAAE,GAAG,QAAQ,4BAA4B;YAC5C,IAAI,EAAE,0BAA0B;SACjC;KACF;IACD,UAAU,EAAE;QACV,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,IAAI;QAClB,GAAG,EAAE;YACH,MAAM,EAAE,KAAK;YACb,MAAM,EACJ,kGAAkG;SACrG;KACF;IACD,uEAAuE;IACvE,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CACvB,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACtC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACE;CACrC,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependencies between packages: declared, checked, never fetched.
|
|
3
|
+
*
|
|
4
|
+
* A package's `dependencies` name other packages and the versions it works
|
|
5
|
+
* with. They are resolved from the packages the project already has — nothing
|
|
6
|
+
* is fetched to satisfy one, and there is no solver choosing versions. So a
|
|
7
|
+
* set of packages is valid when, for every package:
|
|
8
|
+
*
|
|
9
|
+
* - each dependency is another package in the set (a pack the configuration
|
|
10
|
+
* declares has no manifest and no version, so it does not count);
|
|
11
|
+
* - that package's version satisfies the declared range;
|
|
12
|
+
* - and following dependencies never leads back to where it started.
|
|
13
|
+
*/
|
|
14
|
+
import { PragmaError } from "../../kernel/error/index.js";
|
|
15
|
+
import { satisfies } from "./range.js";
|
|
16
|
+
/**
|
|
17
|
+
* Check a set of packages against each other.
|
|
18
|
+
*
|
|
19
|
+
* @param packages - Every package the scope will load.
|
|
20
|
+
* @throws PragmaError CONFIG_ERROR listing every missing dependency, every
|
|
21
|
+
* version that does not satisfy its range, and the first cycle found.
|
|
22
|
+
*/
|
|
23
|
+
export function checkDependencies(packages) {
|
|
24
|
+
const byName = new Map(packages.map((pkg) => [pkg.name, pkg]));
|
|
25
|
+
const problems = [];
|
|
26
|
+
for (const pkg of packages) {
|
|
27
|
+
for (const [dep, range] of Object.entries(pkg.dependencies)) {
|
|
28
|
+
const found = byName.get(dep);
|
|
29
|
+
if (found === undefined) {
|
|
30
|
+
problems.push(`${pkg.name} depends on ${dep} ${range}, which is not added`);
|
|
31
|
+
}
|
|
32
|
+
else if (!satisfies(found.version, range)) {
|
|
33
|
+
problems.push(`${pkg.name} depends on ${dep} ${range}, and ${dep} is ${found.version}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const cycle = findCycle(byName);
|
|
38
|
+
if (cycle !== undefined) {
|
|
39
|
+
problems.push(`the dependencies form a cycle: ${cycle.join(" → ")}`);
|
|
40
|
+
}
|
|
41
|
+
if (problems.length > 0) {
|
|
42
|
+
throw PragmaError.configError(`The packages do not fit together: ${problems.join("; ")}.`, {
|
|
43
|
+
recovery: {
|
|
44
|
+
message: "Add each missing dependency first, from its own source, at a version its dependents accept; a cycle is broken by removing one of its dependencies from a manifest.",
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The first dependency cycle, as the path that closes it.
|
|
51
|
+
*
|
|
52
|
+
* Iterative depth-first search over the present packages, so a long chain or a
|
|
53
|
+
* cycle cannot overflow the stack.
|
|
54
|
+
*/
|
|
55
|
+
function findCycle(byName) {
|
|
56
|
+
const done = new Set();
|
|
57
|
+
for (const start of [...byName.keys()].sort()) {
|
|
58
|
+
if (done.has(start))
|
|
59
|
+
continue;
|
|
60
|
+
const path = [];
|
|
61
|
+
const onPath = new Set();
|
|
62
|
+
const stack = [];
|
|
63
|
+
const enter = (name) => {
|
|
64
|
+
path.push(name);
|
|
65
|
+
onPath.add(name);
|
|
66
|
+
const deps = Object.keys(byName.get(name)?.dependencies ?? {})
|
|
67
|
+
.filter((dep) => byName.has(dep))
|
|
68
|
+
.sort();
|
|
69
|
+
stack.push({ name, next: deps });
|
|
70
|
+
};
|
|
71
|
+
enter(start);
|
|
72
|
+
while (stack.length > 0) {
|
|
73
|
+
const top = stack[stack.length - 1];
|
|
74
|
+
const dep = top.next.shift();
|
|
75
|
+
if (dep === undefined) {
|
|
76
|
+
stack.pop();
|
|
77
|
+
path.pop();
|
|
78
|
+
onPath.delete(top.name);
|
|
79
|
+
done.add(top.name);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (onPath.has(dep))
|
|
83
|
+
return [...path.slice(path.indexOf(dep)), dep];
|
|
84
|
+
if (!done.has(dep))
|
|
85
|
+
enter(dep);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The packages that depend on one package.
|
|
92
|
+
*
|
|
93
|
+
* @param name - The package.
|
|
94
|
+
* @param packages - The set.
|
|
95
|
+
* @returns The names of its dependents, sorted.
|
|
96
|
+
*/
|
|
97
|
+
export function dependentsOf(name, packages) {
|
|
98
|
+
return packages
|
|
99
|
+
.filter((pkg) => name in pkg.dependencies)
|
|
100
|
+
.map((pkg) => pkg.name)
|
|
101
|
+
.sort();
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../../src/capabilities/packages/dependencies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AASvC;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAmC;IACnE,MAA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,EAAE,CAAC;gBACX,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACnB,SAAS;YACX,CAAC;YACD,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,IAAY,EACZ,QAAmC;IAEnC,OAAO,QAAQ;SACZ,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,YAAY,CAAC;SACzC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;SACtB,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The files a package brings, read safely, and the content hash that pins a
|
|
3
|
+
* path source.
|
|
4
|
+
*
|
|
5
|
+
* A package is its manifest plus every regular file under its three folders.
|
|
6
|
+
* Reading it follows no link and leaves no folder:
|
|
7
|
+
*
|
|
8
|
+
* - a symbolic link anywhere in a folder is refused, as is a folder (or the
|
|
9
|
+
* manifest) that resolves outside the package;
|
|
10
|
+
* - an entry that is neither a file nor a folder (a device, a socket, a FIFO)
|
|
11
|
+
* is refused;
|
|
12
|
+
* - entries whose name begins with `.` are skipped, unread (`.git`, editor
|
|
13
|
+
* files);
|
|
14
|
+
* - sizes are bounded before anything is read — per file, in total, and in
|
|
15
|
+
* count — from `lstat`, so an enormous or sparse file is refused unread.
|
|
16
|
+
*
|
|
17
|
+
* The content hash is SHA-256 over one line per file, in code-unit order of
|
|
18
|
+
* the file's path relative to the package (`/`-separated): the path, a NUL,
|
|
19
|
+
* the file's own SHA-256 in hex, and a newline. It is written `sha256-<hex>`.
|
|
20
|
+
* Moving, renaming, adding or changing any file the package brings changes it;
|
|
21
|
+
* a dot-entry or anything outside the folders does not.
|
|
22
|
+
*/
|
|
23
|
+
import { createHash } from "node:crypto";
|
|
24
|
+
import { existsSync, lstatSync, readdirSync, readFileSync, realpathSync, } from "node:fs";
|
|
25
|
+
import { join, relative, sep } from "node:path";
|
|
26
|
+
import { PragmaError } from "../../kernel/error/index.js";
|
|
27
|
+
import { FOLDER_KEYS, MANIFEST_FILE, parseManifest, } from "./manifest.js";
|
|
28
|
+
/** The limits every package is read under. */
|
|
29
|
+
export const PACKAGE_LIMITS = {
|
|
30
|
+
maxFileBytes: 32 * 1024 * 1024,
|
|
31
|
+
maxTotalBytes: 256 * 1024 * 1024,
|
|
32
|
+
maxFiles: 20_000,
|
|
33
|
+
};
|
|
34
|
+
/** The largest manifest read, in bytes. */
|
|
35
|
+
const MAX_MANIFEST_BYTES = 64 * 1024;
|
|
36
|
+
/** Throw the error a package that breaks the reading rules raises. */
|
|
37
|
+
function unsafe(root, message) {
|
|
38
|
+
throw PragmaError.configError(`The package at ${root} cannot be read: ${message}.`);
|
|
39
|
+
}
|
|
40
|
+
/** Whether `inner` is `outer` or lies inside it (both real paths). */
|
|
41
|
+
export function isInside(outer, inner) {
|
|
42
|
+
return inner === outer || inner.startsWith(`${outer}${sep}`);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Read and validate a package's manifest.
|
|
46
|
+
*
|
|
47
|
+
* @param root - The package folder.
|
|
48
|
+
* @returns The manifest.
|
|
49
|
+
* @throws PragmaError CONFIG_ERROR when the folder has no manifest (with what
|
|
50
|
+
* to write), or when it is not a plain file, too large, or invalid.
|
|
51
|
+
* @note Impure — reads the filesystem.
|
|
52
|
+
*/
|
|
53
|
+
export function readPackageManifest(root) {
|
|
54
|
+
const path = join(root, MANIFEST_FILE);
|
|
55
|
+
let stat;
|
|
56
|
+
try {
|
|
57
|
+
stat = lstatSync(path);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
throw PragmaError.configError(`${root} has no ${MANIFEST_FILE}, so it is not a package.`, {
|
|
61
|
+
recovery: {
|
|
62
|
+
message: `Write a ${MANIFEST_FILE} in that folder holding at least {"name": "<package name>", "version": "0.1.0"}; its Turtle goes in definitions/ and data/, its skills in skills/.`,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (!stat.isFile())
|
|
67
|
+
unsafe(root, `${MANIFEST_FILE} is not a plain file`);
|
|
68
|
+
if (stat.size > MAX_MANIFEST_BYTES) {
|
|
69
|
+
unsafe(root, `${MANIFEST_FILE} is larger than ${MAX_MANIFEST_BYTES} bytes`);
|
|
70
|
+
}
|
|
71
|
+
let raw;
|
|
72
|
+
try {
|
|
73
|
+
raw = JSON.parse(readFileSync(path, "utf-8"));
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
throw PragmaError.configError(`${path} is not valid JSON: ${error.message}`);
|
|
77
|
+
}
|
|
78
|
+
return parseManifest(raw, path);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Read a package: its manifest and every file its folders hold.
|
|
82
|
+
*
|
|
83
|
+
* @param root - The package folder.
|
|
84
|
+
* @param limits - The size bounds.
|
|
85
|
+
* @returns The manifest and the files, sorted by path.
|
|
86
|
+
* @throws PragmaError CONFIG_ERROR when any reading rule is broken.
|
|
87
|
+
* @note Impure — reads the filesystem.
|
|
88
|
+
*/
|
|
89
|
+
export function readPackage(root, limits = PACKAGE_LIMITS) {
|
|
90
|
+
const real = realpathSync(root);
|
|
91
|
+
const manifest = readPackageManifest(root);
|
|
92
|
+
const files = new Map();
|
|
93
|
+
let total = 0;
|
|
94
|
+
const add = (absolute, size) => {
|
|
95
|
+
const path = relative(real, absolute).split(sep).join("/");
|
|
96
|
+
if (files.has(path))
|
|
97
|
+
return;
|
|
98
|
+
if (size > limits.maxFileBytes) {
|
|
99
|
+
unsafe(root, `${path} is ${size} bytes, over the ${limits.maxFileBytes}-byte limit for one file`);
|
|
100
|
+
}
|
|
101
|
+
total += size;
|
|
102
|
+
if (total > limits.maxTotalBytes) {
|
|
103
|
+
unsafe(root, `its files exceed the ${limits.maxTotalBytes}-byte limit for a package`);
|
|
104
|
+
}
|
|
105
|
+
if (files.size >= limits.maxFiles) {
|
|
106
|
+
unsafe(root, `it holds more than ${limits.maxFiles} files`);
|
|
107
|
+
}
|
|
108
|
+
files.set(path, { path, absolute, size });
|
|
109
|
+
};
|
|
110
|
+
add(join(real, MANIFEST_FILE), lstatSync(join(real, MANIFEST_FILE)).size);
|
|
111
|
+
const walk = (dir) => {
|
|
112
|
+
let entries;
|
|
113
|
+
try {
|
|
114
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
unsafe(root, `${relative(real, dir)} cannot be listed`);
|
|
118
|
+
}
|
|
119
|
+
for (const entry of entries) {
|
|
120
|
+
if (entry.name.startsWith("."))
|
|
121
|
+
continue;
|
|
122
|
+
const absolute = join(dir, entry.name);
|
|
123
|
+
const shown = relative(real, absolute).split(sep).join("/");
|
|
124
|
+
const stat = lstatSync(absolute);
|
|
125
|
+
if (stat.isSymbolicLink()) {
|
|
126
|
+
unsafe(root, `${shown} is a symbolic link, and a package holds plain files only`);
|
|
127
|
+
}
|
|
128
|
+
if (stat.isDirectory())
|
|
129
|
+
walk(absolute);
|
|
130
|
+
else if (stat.isFile())
|
|
131
|
+
add(absolute, stat.size);
|
|
132
|
+
else
|
|
133
|
+
unsafe(root, `${shown} is not a file or a folder`);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
for (const key of FOLDER_KEYS) {
|
|
137
|
+
const dir = join(real, manifest[key]);
|
|
138
|
+
if (!existsSync(dir))
|
|
139
|
+
continue;
|
|
140
|
+
if (lstatSync(dir).isSymbolicLink() || !isInside(real, realpathSync(dir))) {
|
|
141
|
+
unsafe(root, `its "${key}" folder ${manifest[key]} leads outside the package`);
|
|
142
|
+
}
|
|
143
|
+
if (!lstatSync(dir).isDirectory()) {
|
|
144
|
+
unsafe(root, `its "${key}" folder ${manifest[key]} is not a folder`);
|
|
145
|
+
}
|
|
146
|
+
walk(dir);
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
root: real,
|
|
150
|
+
manifest,
|
|
151
|
+
files: [...files.values()].sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The content hash of a package's files.
|
|
156
|
+
*
|
|
157
|
+
* @param files - The files, as {@link readPackage} returns them.
|
|
158
|
+
* @returns `sha256-<hex>`.
|
|
159
|
+
* @note Impure — reads each file.
|
|
160
|
+
*/
|
|
161
|
+
export function contentHash(files) {
|
|
162
|
+
const hash = createHash("sha256");
|
|
163
|
+
const sorted = [...files].sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
164
|
+
for (const file of sorted) {
|
|
165
|
+
const digest = createHash("sha256")
|
|
166
|
+
.update(readFileSync(file.absolute))
|
|
167
|
+
.digest("hex");
|
|
168
|
+
hash.update(`${file.path}\0${digest}\n`);
|
|
169
|
+
}
|
|
170
|
+
return `sha256-${hash.digest("hex")}`;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The Turtle files a package contributes to the graph — those under its
|
|
174
|
+
* `definitions` and `data` folders — labelled `<name>/<path>`, sorted.
|
|
175
|
+
*
|
|
176
|
+
* @param contents - The package, as {@link readPackage} returns it.
|
|
177
|
+
* @returns The labelled sources.
|
|
178
|
+
* @note Impure — reads each file.
|
|
179
|
+
*/
|
|
180
|
+
export function turtleSources(contents) {
|
|
181
|
+
const folders = [contents.manifest.definitions, contents.manifest.data];
|
|
182
|
+
return contents.files
|
|
183
|
+
.filter((file) => file.path.endsWith(".ttl") &&
|
|
184
|
+
folders.some((folder) => file.path.startsWith(`${folder}/`)))
|
|
185
|
+
.map((file) => ({
|
|
186
|
+
path: `${contents.manifest.name}/${file.path}`,
|
|
187
|
+
content: readFileSync(file.absolute, "utf-8"),
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../../src/capabilities/packages/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAEL,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACL,WAAW,EACX,aAAa,EAEb,aAAa,GACd,MAAM,eAAe,CAAC;AAYvB,8CAA8C;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAkB;IAC3C,YAAY,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IAC9B,aAAa,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IAChC,QAAQ,EAAE,MAAM;CACjB,CAAC;AAEF,2CAA2C;AAC3C,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AAiBrC,sEAAsE;AACtE,SAAS,MAAM,CAAC,IAAY,EAAE,OAAe;IAC3C,MAAM,WAAW,CAAC,WAAW,CAC3B,kBAAkB,IAAI,oBAAoB,OAAO,GAAG,CACrD,CAAC;AACJ,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,QAAQ,CAAC,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