@canonical/pragma-cli 0.30.0 → 0.32.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/dist/pragma +0 -0
- package/package.json +27 -40
- package/src/bin.ts +292 -11
- package/src/capabilities/block/blockList.verb.ts +150 -0
- package/src/capabilities/block/index.ts +25 -0
- package/src/capabilities/block/pack.ts +155 -0
- package/src/capabilities/block/parity.test.ts +180 -0
- package/src/capabilities/block/tierChain.ts +78 -0
- package/src/capabilities/capabilities/capabilities.render.ts +89 -0
- package/src/capabilities/capabilities/capabilities.test.ts +131 -0
- package/src/capabilities/capabilities/capabilities.verb.ts +48 -0
- package/src/capabilities/capabilities/catalog.ts +144 -0
- package/src/capabilities/capabilities/hints.ts +221 -0
- package/src/capabilities/capabilities/index.ts +13 -0
- package/src/capabilities/capabilities/types.ts +58 -0
- package/src/capabilities/colophon/collectColophon.ts +68 -0
- package/src/capabilities/colophon/colophon.render.test.ts +87 -0
- package/src/capabilities/colophon/colophon.render.ts +38 -0
- package/src/capabilities/colophon/colophon.test.ts +241 -0
- package/src/capabilities/colophon/colophon.verb.ts +41 -0
- package/src/capabilities/colophon/index.ts +6 -0
- package/src/capabilities/colophon/markdownTerminal.test.ts +50 -0
- package/src/capabilities/colophon/markdownTerminal.ts +85 -0
- package/src/capabilities/colophon/pragmaColophon.ts +66 -0
- package/src/capabilities/colophon/types.ts +29 -0
- package/src/capabilities/config/collectConfigShow.ts +32 -0
- package/src/capabilities/config/field.render.ts +28 -0
- package/src/capabilities/config/field.test.ts +188 -0
- package/src/capabilities/config/fields.ts +152 -0
- package/src/capabilities/config/index.ts +6 -0
- package/src/capabilities/config/runField.ts +59 -0
- package/src/capabilities/config/runSet.ts +38 -0
- package/src/capabilities/config/set.test.ts +207 -0
- package/src/capabilities/config/set.verb.ts +70 -0
- package/src/capabilities/config/show.render.ts +61 -0
- package/src/capabilities/config/show.verb.ts +45 -0
- package/src/capabilities/config/types.ts +27 -0
- package/src/capabilities/create/byteEquality.subprocess.test.ts +88 -0
- package/src/capabilities/create/byteEquality.test.ts +222 -0
- package/src/capabilities/create/compiledCreate.subprocess.test.ts +152 -0
- package/src/capabilities/create/create.mcp.test.ts +139 -0
- package/src/capabilities/create/create.render.ts +50 -0
- package/src/capabilities/create/create.test.ts +403 -0
- package/src/capabilities/create/create.verb.ts +435 -0
- package/src/capabilities/create/cwdJail.test.ts +129 -0
- package/src/capabilities/create/generatorToVerbSpec.ts +111 -0
- package/src/capabilities/create/index.ts +25 -0
- package/src/capabilities/create/pathJail.ts +73 -0
- package/src/capabilities/create/pickGenerator.ts +63 -0
- package/src/capabilities/create/templates.embedded.generated.ts +53 -0
- package/src/capabilities/create/types.ts +8 -0
- package/src/capabilities/doctor/checks/checkConfigFile.ts +41 -0
- package/src/capabilities/doctor/checks/checkKeStore.ts +39 -0
- package/src/capabilities/doctor/checks/checkMcpCommands.ts +108 -0
- package/src/capabilities/doctor/checks/checkMcpConfigured.ts +61 -0
- package/src/capabilities/doctor/checks/checkNodeVersion.ts +25 -0
- package/src/capabilities/doctor/checks/checkPackageRefs.ts +73 -0
- package/src/capabilities/doctor/checks/checkPragmaVersion.ts +22 -0
- package/src/capabilities/doctor/checks/checkShellCompletions.test.ts +111 -0
- package/src/capabilities/doctor/checks/checkShellCompletions.ts +131 -0
- package/src/capabilities/doctor/checks/checkSkillsSymlinked.ts +60 -0
- package/src/capabilities/doctor/doctor.render.ts +116 -0
- package/src/capabilities/doctor/doctor.test.ts +179 -0
- package/src/capabilities/doctor/doctor.verb.ts +46 -0
- package/src/capabilities/doctor/index.ts +6 -0
- package/src/capabilities/doctor/runChecks.ts +76 -0
- package/src/capabilities/doctor/types.ts +41 -0
- package/src/capabilities/emptyRecovery.test.ts +112 -0
- package/src/capabilities/graph/index.ts +21 -0
- package/src/capabilities/graph/inspect.render.ts +38 -0
- package/src/capabilities/graph/inspect.test.ts +80 -0
- package/src/capabilities/graph/inspect.verb.ts +51 -0
- package/src/capabilities/graph/query.render.ts +77 -0
- package/src/capabilities/graph/query.test.ts +156 -0
- package/src/capabilities/graph/query.verb.ts +58 -0
- package/src/capabilities/graph/runQuery.ts +49 -0
- package/src/capabilities/index.ts +54 -0
- package/src/capabilities/info/collectInfo.ts +76 -0
- package/src/capabilities/info/index.ts +6 -0
- package/src/capabilities/info/info.render.ts +72 -0
- package/src/capabilities/info/info.test.ts +127 -0
- package/src/capabilities/info/info.verb.ts +46 -0
- package/src/capabilities/info/types.ts +42 -0
- package/src/capabilities/lazy.test.ts +89 -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 +35 -0
- package/src/capabilities/modifier/index.ts +15 -0
- package/src/capabilities/modifier/pack.ts +64 -0
- package/src/capabilities/ontology/index.ts +12 -0
- package/src/capabilities/ontology/ontology.test.ts +94 -0
- package/src/capabilities/ontology/queries.ts +197 -0
- package/src/capabilities/ontology/render.ts +87 -0
- package/src/capabilities/ontology/verbs.ts +170 -0
- package/src/capabilities/prompt/index.ts +18 -0
- package/src/capabilities/prompt/prompt.render.ts +70 -0
- package/src/capabilities/prompt/prompt.test.ts +119 -0
- package/src/capabilities/prompt/types.ts +30 -0
- package/src/capabilities/prompt/verbs.ts +93 -0
- package/src/capabilities/resources/index.ts +15 -0
- package/src/capabilities/resources/provider.ts +231 -0
- package/src/capabilities/resources/resources.test.ts +114 -0
- package/src/capabilities/roundtrip.test.ts +107 -0
- package/src/capabilities/setup/index.ts +6 -0
- package/src/capabilities/setup/operations/setupCompletions.ts +108 -0
- package/src/capabilities/setup/operations/setupGenerator.ts +307 -0
- package/src/capabilities/setup/operations/setupLsp.ts +61 -0
- package/src/capabilities/setup/operations/setupMcp.ts +85 -0
- package/src/capabilities/setup/operations/setupSkills.ts +199 -0
- package/src/capabilities/setup/setup.render.ts +49 -0
- package/src/capabilities/setup/setup.test.ts +351 -0
- package/src/capabilities/setup/setup.verb.ts +209 -0
- package/src/capabilities/setup/shell.ts +85 -0
- package/src/capabilities/setup/types.ts +42 -0
- package/src/capabilities/shared/assertExecOk.ts +106 -0
- package/src/capabilities/shared/packageManager.ts +62 -0
- package/src/capabilities/shared/registry.ts +70 -0
- package/src/capabilities/skill/discover.ts +178 -0
- package/src/capabilities/skill/index.ts +12 -0
- package/src/capabilities/skill/render.ts +60 -0
- package/src/capabilities/skill/skill.test.ts +142 -0
- package/src/capabilities/skill/verbs.ts +100 -0
- package/src/capabilities/sources/collectStatus.ts +87 -0
- package/src/capabilities/sources/index.ts +15 -0
- package/src/capabilities/sources/installSkills.ts +124 -0
- package/src/capabilities/sources/runUpdate.ts +407 -0
- package/src/capabilities/sources/sources.test.ts +642 -0
- package/src/capabilities/sources/status.render.ts +56 -0
- package/src/capabilities/sources/status.verb.ts +42 -0
- package/src/capabilities/sources/types.ts +51 -0
- package/src/capabilities/sources/update.render.ts +35 -0
- package/src/capabilities/sources/update.verb.ts +76 -0
- package/src/capabilities/standard/index.ts +18 -0
- package/src/capabilities/standard/pack.ts +128 -0
- package/src/capabilities/standard/parity.test.ts +208 -0
- package/src/capabilities/surface.test.ts +208 -0
- package/src/capabilities/tier/index.ts +19 -0
- package/src/capabilities/tier/lookup.render.ts +34 -0
- package/src/capabilities/tier/lookup.test.ts +68 -0
- package/src/capabilities/tier/lookup.verb.ts +44 -0
- package/src/capabilities/tier/pack.ts +28 -0
- package/src/capabilities/tier/runLookup.ts +59 -0
- package/src/capabilities/token/addConfig.render.ts +27 -0
- package/src/capabilities/token/addConfig.test.ts +62 -0
- package/src/capabilities/token/addConfig.verb.ts +40 -0
- package/src/capabilities/token/index.ts +19 -0
- package/src/capabilities/token/pack.ts +58 -0
- package/src/capabilities/token/runAddConfig.ts +95 -0
- package/src/capabilities/upgrade/index.ts +6 -0
- package/src/capabilities/upgrade/runUpgrade.ts +119 -0
- package/src/capabilities/upgrade/types.ts +21 -0
- package/src/capabilities/upgrade/upgrade.render.ts +55 -0
- package/src/capabilities/upgrade/upgrade.test.ts +372 -0
- package/src/capabilities/upgrade/upgrade.verb.ts +56 -0
- package/src/constants.test.ts +33 -0
- package/src/constants.ts +38 -68
- package/src/index.ts +27 -134
- package/src/kernel/completion/__snapshots__/emitScripts.test.ts.snap +340 -0
- package/src/kernel/completion/bashDrive.test.ts +73 -0
- package/src/kernel/completion/complete.test.ts +101 -0
- package/src/kernel/completion/complete.ts +77 -0
- package/src/kernel/completion/emitScripts.test.ts +173 -0
- package/src/kernel/completion/emitScripts.ts +122 -0
- package/src/kernel/completion/entitySource.test.ts +198 -0
- package/src/kernel/completion/entitySource.ts +269 -0
- package/src/kernel/completion/index.ts +42 -0
- package/src/kernel/completion/model.test.ts +405 -0
- package/src/kernel/completion/model.ts +259 -0
- package/src/kernel/completion/parse.test.ts +338 -0
- package/src/kernel/completion/parse.ts +294 -0
- package/src/kernel/completion/rank.test.ts +100 -0
- package/src/kernel/completion/rank.ts +118 -0
- package/src/kernel/completion/resolve.test.ts +204 -0
- package/src/kernel/completion/resolve.ts +133 -0
- package/src/kernel/completion/safety.test.ts +374 -0
- package/src/kernel/completion/templates/bash.ts +249 -0
- package/src/kernel/completion/templates/fish.ts +245 -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 +153 -0
- package/src/kernel/config/__snapshots__/firstRun.test.ts.snap +11 -0
- package/src/kernel/config/defaults.ts +28 -0
- package/src/kernel/config/evaluateProjectConfig.ts +119 -0
- package/src/kernel/config/findProjectConfig.ts +45 -0
- package/src/kernel/config/firstRun.test.ts +60 -0
- package/src/kernel/config/firstRun.ts +91 -0
- package/src/kernel/config/globalConfig.ts +94 -0
- package/src/kernel/config/index.ts +35 -0
- package/src/kernel/config/paths.ts +39 -0
- package/src/kernel/config/readConfig.test.ts +245 -0
- package/src/kernel/config/readConfig.ts +94 -0
- package/src/kernel/config/schema.ts +56 -0
- package/src/kernel/config/types.ts +106 -0
- package/src/kernel/config/writeConfigField.ts +82 -0
- package/src/kernel/error/PragmaError.test.ts +119 -0
- package/src/kernel/error/PragmaError.ts +182 -0
- package/src/kernel/error/constants.ts +38 -0
- package/src/kernel/error/fromTaskError.test.ts +83 -0
- package/src/kernel/error/fromTaskError.ts +80 -0
- package/src/kernel/error/index.ts +23 -0
- package/src/kernel/error/recovery.test.ts +60 -0
- package/src/kernel/error/recovery.ts +49 -0
- package/src/kernel/error/renderError.ts +101 -0
- package/src/kernel/error/serialize.ts +28 -0
- package/src/kernel/error/types.ts +62 -0
- package/src/kernel/packs/collect.test.ts +138 -0
- package/src/kernel/packs/collect.ts +108 -0
- package/src/kernel/packs/compile.test.ts +229 -0
- package/src/kernel/packs/compile.ts +315 -0
- package/src/kernel/packs/disclosure.test.ts +200 -0
- package/src/kernel/packs/disclosure.ts +98 -0
- package/src/kernel/packs/glob.ts +39 -0
- package/src/kernel/packs/graphql/buildLookupDocument.ts +397 -0
- package/src/kernel/packs/graphql/fetchGraphqlLookup.ts +217 -0
- package/src/kernel/packs/graphql/nameMap.ts +67 -0
- package/src/kernel/packs/graphqlSource.test.ts +383 -0
- package/src/kernel/packs/iri.ts +78 -0
- package/src/kernel/packs/renderPack.ts +196 -0
- package/src/kernel/packs/resolveEntity.ts +232 -0
- package/src/kernel/packs/runBodies.ts +157 -0
- package/src/kernel/packs/sample.ts +60 -0
- package/src/kernel/packs/schema.ts +328 -0
- package/src/kernel/packs/sparql/applyFilters.ts +83 -0
- package/src/kernel/packs/sparql/applySearch.ts +33 -0
- package/src/kernel/packs/sparql/buildLookupQuery.ts +180 -0
- package/src/kernel/packs/sparql/escape.ts +22 -0
- package/src/kernel/packs/sparql/runSelect.test.ts +80 -0
- package/src/kernel/packs/sparql/runSelect.ts +84 -0
- package/src/kernel/packs/toolDescription.test.ts +81 -0
- package/src/kernel/packs/types.ts +337 -0
- package/src/kernel/packs/uniqueness.ts +35 -0
- package/src/kernel/project/cli/buildProgram.test.ts +387 -0
- package/src/kernel/project/cli/buildProgram.ts +280 -0
- package/src/kernel/project/cli/dispatch.test.ts +288 -0
- package/src/kernel/project/cli/dispatch.ts +334 -0
- package/src/kernel/project/cli/exitCodes.test.ts +59 -0
- package/src/kernel/project/cli/exitCodes.ts +68 -0
- package/src/kernel/project/cli/globalFlags.test.ts +99 -0
- package/src/kernel/project/cli/globalFlags.ts +149 -0
- package/src/kernel/project/cli/helpFormat.ts +58 -0
- package/src/kernel/project/cli/index.ts +21 -0
- package/src/kernel/project/cli/interactionSeam.test.ts +99 -0
- package/src/kernel/project/cli/rootHelp.ts +218 -0
- package/src/kernel/project/cli/suggest.test.ts +54 -0
- package/src/kernel/project/cli/suggest.ts +67 -0
- package/src/kernel/project/cli/suggestNames.ts +122 -0
- package/src/kernel/project/cli/verbHelp.test.ts +138 -0
- package/src/kernel/project/cli/verbHelp.ts +144 -0
- package/src/kernel/project/mcp/buildServer.ts +70 -0
- package/src/kernel/project/mcp/envelope.ts +44 -0
- package/src/kernel/project/mcp/index.ts +8 -0
- package/src/kernel/project/mcp/instructions.ts +48 -0
- package/src/kernel/project/mcp/parity.test.ts +72 -0
- package/src/kernel/project/mcp/prompts/prompts.test.ts +96 -0
- package/src/kernel/project/mcp/prompts/provider.ts +74 -0
- package/src/kernel/project/mcp/prompts/source.ts +194 -0
- package/src/kernel/project/mcp/registerVerb.test.ts +238 -0
- package/src/kernel/project/mcp/registerVerb.ts +296 -0
- package/src/kernel/project/mcp/serve.ts +34 -0
- package/src/kernel/project/mcp/toolDescriptions.test.ts +80 -0
- package/src/kernel/render/__snapshots__/renderers.test.ts.snap +127 -0
- package/src/kernel/render/compactUri.ts +25 -0
- package/src/kernel/render/contracts.ts +72 -0
- package/src/kernel/render/disclosure.ts +44 -0
- package/src/kernel/render/envelope.ts +50 -0
- package/src/kernel/render/formatters.ts +30 -0
- package/src/kernel/render/index.ts +30 -0
- package/src/kernel/render/prefixes.ts +21 -0
- package/src/kernel/render/renderers.test.ts +171 -0
- package/src/kernel/render/renderers.ts +429 -0
- package/src/kernel/render/writeStdout.test.ts +43 -0
- package/src/kernel/render/writeStdout.ts +49 -0
- package/src/kernel/runtime/boot.test.ts +69 -0
- package/src/kernel/runtime/boot.ts +59 -0
- package/src/kernel/runtime/facade.test.ts +125 -0
- package/src/kernel/runtime/facade.ts +47 -0
- package/src/kernel/runtime/graphpack/build.ts +148 -0
- package/src/kernel/runtime/graphpack/buildIndex.ts +229 -0
- package/src/kernel/runtime/graphpack/embedded/pack.generated.ts +8 -0
- package/src/kernel/runtime/graphpack/embedded/pack.index.generated.ts +4 -0
- package/src/kernel/runtime/graphpack/embedded/sample.ttl +39 -0
- package/src/kernel/runtime/graphpack/embedded.ts +70 -0
- package/src/kernel/runtime/graphpack/graphpack.test.ts +153 -0
- package/src/kernel/runtime/graphpack/hash.ts +46 -0
- package/src/kernel/runtime/graphpack/index.ts +21 -0
- package/src/kernel/runtime/graphpack/manifest.ts +55 -0
- package/src/kernel/runtime/graphpack/read.ts +102 -0
- package/src/kernel/runtime/graphpack/types.ts +111 -0
- package/src/kernel/runtime/index.ts +15 -0
- package/src/kernel/runtime/loadSession.ts +56 -0
- package/src/kernel/runtime/lock.ts +90 -0
- package/src/kernel/runtime/paths.ts +37 -0
- package/src/kernel/runtime/probe.test.ts +16 -0
- package/src/kernel/runtime/probe.ts +39 -0
- package/src/kernel/runtime/readEntity.ts +83 -0
- package/src/kernel/runtime/refs/gitOps.ts +88 -0
- package/src/kernel/runtime/refs/parseRef.test.ts +34 -0
- package/src/kernel/runtime/refs/parseRef.ts +103 -0
- package/src/kernel/runtime/refs/resolve.ts +320 -0
- package/src/kernel/runtime/resolveSources.test.ts +154 -0
- package/src/kernel/runtime/resolveSources.ts +66 -0
- package/src/kernel/runtime/store.test.ts +94 -0
- package/src/kernel/runtime/store.ts +90 -0
- package/src/kernel/runtime/storeless.test.ts +86 -0
- package/src/kernel/runtime/types.ts +210 -0
- package/src/kernel/runtime/wasmEmbed.test.ts +142 -0
- package/src/kernel/spec/asVerb.ts +23 -0
- package/src/kernel/spec/emitSurface.test.ts +65 -0
- package/src/kernel/spec/emitSurface.ts +223 -0
- package/src/kernel/spec/index.ts +34 -0
- package/src/kernel/spec/surfaceConformance.test.ts +94 -0
- package/src/kernel/spec/surfaceConformance.ts +135 -0
- package/src/kernel/spec/types.ts +233 -0
- package/src/kernel/spec/validate.test.ts +81 -0
- package/src/kernel/spec/validate.ts +125 -0
- package/src/testing/PARITY_GAPS.test.ts +32 -0
- package/src/testing/PARITY_GAPS.ts +179 -0
- package/src/testing/behavioral/README.md +164 -0
- package/src/testing/behavioral/agentSession.mcp.test.ts +160 -0
- package/src/testing/behavioral/autoLlm.e2e.test.ts +44 -0
- package/src/testing/behavioral/completion.test.ts +132 -0
- package/src/testing/behavioral/disclosure.test.ts +103 -0
- package/src/testing/behavioral/errorMatrix.mcp.test.ts +120 -0
- package/src/testing/behavioral/errorMatrix.storeless.test.ts +123 -0
- package/src/testing/behavioral/exitCodes.e2e.test.ts +53 -0
- package/src/testing/behavioral/firstRun.e2e.test.ts +40 -0
- package/src/testing/behavioral/harness.foundation.test.ts +136 -0
- package/src/testing/behavioral/journeys.cli.test.ts +129 -0
- package/src/testing/behavioral/liveReadSurface.ts +80 -0
- package/src/testing/behavioral/mcpServe.e2e.test.ts +21 -0
- package/src/testing/behavioral/mcpSurface.test.ts +139 -0
- package/src/testing/behavioral/parity.test.ts +224 -0
- package/src/testing/behavioral/rootCli.e2e.test.ts +62 -0
- package/src/testing/eval/__snapshots__/eval.test.ts.snap +201 -0
- package/src/testing/eval/cases/assembly.ts +195 -0
- package/src/testing/eval/cases/effectful.ts +245 -0
- package/src/testing/eval/cases/readNouns.ts +232 -0
- package/src/testing/eval/cases/stable.ts +163 -0
- package/src/testing/eval/eval.test.ts +74 -0
- package/src/testing/eval/harness.ts +91 -0
- package/src/testing/eval/report.ts +58 -0
- package/src/testing/fixtures/blockGraph.ts +112 -0
- package/src/testing/fixtures/completionFixture.ts +239 -0
- package/src/testing/fixtures/fixtureCapability.ts +175 -0
- package/src/testing/fixtures/graph/canonical.ts +184 -0
- package/src/testing/fixtures/packs/recipe.ts +78 -0
- package/src/testing/helpers/fixtureGraph.ts +148 -0
- package/src/testing/helpers/golden.ts +45 -0
- package/src/testing/helpers/packRuntime.ts +118 -0
- package/src/testing/helpers/parity.ts +86 -0
- package/src/testing/helpers/projectCli.ts +35 -0
- package/src/testing/helpers/projectMcp.ts +145 -0
- package/src/testing/helpers/runCli.ts +128 -0
- package/src/testing/perf/budgets.test.ts +164 -0
- package/src/testing/perf/budgets.ts +37 -0
- package/src/testing/perf/globalSetup.ts +30 -0
- package/src/testing/perf/measure.ts +97 -0
- package/src/testing/setupXdgIsolation.ts +17 -5
- package/src/types.ts +42 -0
- package/README.md +0 -429
- package/src/bin.test.ts +0 -54
- package/src/compile-validation.runner.ts +0 -137
- package/src/compile-validation.ts +0 -191
- package/src/completions/computeSocketPath.test.ts +0 -26
- package/src/completions/computeSocketPath.ts +0 -16
- package/src/completions/constants.ts +0 -18
- package/src/completions/handleQuery.test.ts +0 -93
- package/src/completions/handleQuery.ts +0 -30
- package/src/completions/index.ts +0 -14
- package/src/completions/queryCompletions.test.ts +0 -100
- package/src/completions/queryCompletions.ts +0 -61
- package/src/completions/querySocket.test.ts +0 -70
- package/src/completions/querySocket.ts +0 -44
- package/src/completions/startCompletionsServer.test.ts +0 -74
- package/src/completions/startCompletionsServer.ts +0 -75
- package/src/completions/startCompletionsServer.unit.test.ts +0 -131
- package/src/completions/waitForSocket.test.ts +0 -27
- package/src/completions/waitForSocket.ts +0 -27
- package/src/config/configExists.ts +0 -14
- package/src/config/defaultConfig.test.ts +0 -33
- package/src/config/defaultConfig.ts +0 -59
- package/src/config/defaults.json +0 -17
- package/src/config/findProjectConfigPath.test.ts +0 -53
- package/src/config/findProjectConfigPath.ts +0 -36
- package/src/config/index.ts +0 -21
- package/src/config/mergeConfigFileUpdate.ts +0 -58
- package/src/config/parseConfigValues.ts +0 -215
- package/src/config/readConfig.test.ts +0 -395
- package/src/config/readConfig.ts +0 -21
- package/src/config/readConfigLayers.test.ts +0 -107
- package/src/config/readConfigLayers.ts +0 -115
- package/src/config/resolveConfigPath.test.ts +0 -20
- package/src/config/resolveConfigPath.ts +0 -11
- package/src/config/resolveGlobalConfigPath.ts +0 -13
- package/src/config/resolveWriteConfigPath.test.ts +0 -53
- package/src/config/resolveWriteConfigPath.ts +0 -31
- package/src/config/types.ts +0 -121
- package/src/config/writeConfig.ts +0 -37
- package/src/domains/block/blockConfig.ts +0 -97
- package/src/domains/block/commands/index.ts +0 -5
- package/src/domains/block/commands/list.test.ts +0 -111
- package/src/domains/block/commands/list.ts +0 -11
- package/src/domains/block/commands/lookup.test.ts +0 -187
- package/src/domains/block/commands/lookup.ts +0 -14
- package/src/domains/block/commands/sample.ts +0 -55
- package/src/domains/block/formatters/index.ts +0 -5
- package/src/domains/block/formatters/list.test.ts +0 -107
- package/src/domains/block/formatters/list.ts +0 -50
- package/src/domains/block/formatters/lookup.test.ts +0 -318
- package/src/domains/block/formatters/lookup.ts +0 -149
- package/src/domains/block/formatters/sample.ts +0 -21
- package/src/domains/block/formatters/types.ts +0 -16
- package/src/domains/block/helpers/index.ts +0 -4
- package/src/domains/block/helpers/resolveAspects.test.ts +0 -64
- package/src/domains/block/helpers/resolveAspects.ts +0 -35
- package/src/domains/block/index.ts +0 -25
- package/src/domains/block/mcp/index.ts +0 -2
- package/src/domains/block/mcp/specs.ts +0 -67
- package/src/domains/block/operations/index.ts +0 -5
- package/src/domains/block/operations/list.test.ts +0 -80
- package/src/domains/block/operations/list.ts +0 -72
- package/src/domains/block/operations/lookup.test.ts +0 -129
- package/src/domains/block/operations/lookup.ts +0 -446
- package/src/domains/block/operations/sample.ts +0 -41
- package/src/domains/block/orchestration/blockEmptyError.test.ts +0 -26
- package/src/domains/block/orchestration/blockEmptyError.ts +0 -19
- package/src/domains/block/orchestration/buildBlockFilters.ts +0 -12
- package/src/domains/block/orchestration/enrichBlocks.ts +0 -41
- package/src/domains/block/orchestration/index.ts +0 -5
- package/src/domains/block/orchestration/resolveBlockList.ts +0 -39
- package/src/domains/block/orchestration/resolveBlockLookup.ts +0 -35
- package/src/domains/block/stories.test.ts +0 -28
- package/src/domains/block/stories.ts +0 -254
- package/src/domains/block/types.ts +0 -30
- package/src/domains/config/commands/channel.test.ts +0 -112
- package/src/domains/config/commands/channel.ts +0 -86
- package/src/domains/config/commands/configScope.ts +0 -46
- package/src/domains/config/commands/framework.test.ts +0 -105
- package/src/domains/config/commands/framework.ts +0 -91
- package/src/domains/config/commands/index.ts +0 -6
- package/src/domains/config/commands/show.test.ts +0 -61
- package/src/domains/config/commands/show.ts +0 -11
- package/src/domains/config/commands/tier.test.ts +0 -95
- package/src/domains/config/commands/tier.ts +0 -84
- package/src/domains/config/commands/trace.test.ts +0 -165
- package/src/domains/config/commands/trace.ts +0 -83
- package/src/domains/config/formatters/channel.test.ts +0 -70
- package/src/domains/config/formatters/channel.ts +0 -37
- package/src/domains/config/formatters/framework.ts +0 -37
- package/src/domains/config/formatters/index.ts +0 -6
- package/src/domains/config/formatters/show.test.ts +0 -153
- package/src/domains/config/formatters/show.ts +0 -89
- package/src/domains/config/formatters/tier.test.ts +0 -86
- package/src/domains/config/formatters/tier.ts +0 -48
- package/src/domains/config/formatters/trace.ts +0 -28
- package/src/domains/config/index.ts +0 -36
- package/src/domains/config/mcp/index.ts +0 -2
- package/src/domains/config/mcp/specs.ts +0 -100
- package/src/domains/config/operations/index.ts +0 -6
- package/src/domains/config/operations/show.test.ts +0 -78
- package/src/domains/config/operations/show.ts +0 -48
- package/src/domains/config/operations/types.ts +0 -20
- package/src/domains/config/operations/validateChannel.test.ts +0 -36
- package/src/domains/config/operations/validateChannel.ts +0 -24
- package/src/domains/config/operations/validateFramework.ts +0 -24
- package/src/domains/config/operations/validateTier.test.ts +0 -56
- package/src/domains/config/operations/validateTier.ts +0 -35
- package/src/domains/config/stories.ts +0 -42
- package/src/domains/config/tasks/index.ts +0 -6
- package/src/domains/config/tasks/setChannel.ts +0 -21
- package/src/domains/config/tasks/setFramework.ts +0 -21
- package/src/domains/config/tasks/setTier.ts +0 -20
- package/src/domains/config/tasks/setTrace.ts +0 -20
- package/src/domains/config/tasks/writeConfigField.ts +0 -41
- package/src/domains/create/commands/component.test.ts +0 -166
- package/src/domains/create/commands/component.ts +0 -123
- package/src/domains/create/commands/index.ts +0 -3
- package/src/domains/create/commands/package.test.ts +0 -35
- package/src/domains/create/commands/package.ts +0 -21
- package/src/domains/create/generators.ts +0 -8
- package/src/domains/create/index.ts +0 -15
- package/src/domains/create/mcp/index.ts +0 -2
- package/src/domains/create/mcp/specs.ts +0 -168
- package/src/domains/doctor/commands/doctor.test.ts +0 -75
- package/src/domains/doctor/commands/doctor.ts +0 -43
- package/src/domains/doctor/commands/index.ts +0 -2
- package/src/domains/doctor/formatters/doctor.test.ts +0 -117
- package/src/domains/doctor/formatters/doctor.ts +0 -84
- package/src/domains/doctor/formatters/index.ts +0 -2
- package/src/domains/doctor/index.ts +0 -9
- package/src/domains/doctor/mcp/index.ts +0 -2
- package/src/domains/doctor/mcp/specs.ts +0 -41
- package/src/domains/doctor/operations/checks/checkConfigFile.ts +0 -42
- package/src/domains/doctor/operations/checks/checkKeStore.ts +0 -38
- package/src/domains/doctor/operations/checks/checkMcpCommands.ts +0 -130
- package/src/domains/doctor/operations/checks/checkMcpConfigured.ts +0 -65
- package/src/domains/doctor/operations/checks/checkNodeVersion.ts +0 -25
- package/src/domains/doctor/operations/checks/checkPackageRefs.ts +0 -58
- package/src/domains/doctor/operations/checks/checkPragmaVersion.ts +0 -20
- package/src/domains/doctor/operations/checks/checkShellCompletions.ts +0 -42
- package/src/domains/doctor/operations/checks/checkSkillsSymlinked.ts +0 -64
- package/src/domains/doctor/operations/checks/index.ts +0 -10
- package/src/domains/doctor/operations/checks.test.ts +0 -305
- package/src/domains/doctor/operations/index.ts +0 -3
- package/src/domains/doctor/operations/runChecks.test.ts +0 -176
- package/src/domains/doctor/operations/runChecks.ts +0 -78
- package/src/domains/doctor/operations/types.ts +0 -20
- package/src/domains/graph/commands/index.ts +0 -4
- package/src/domains/graph/commands/inspect.test.ts +0 -94
- package/src/domains/graph/commands/inspect.ts +0 -63
- package/src/domains/graph/commands/query.test.ts +0 -92
- package/src/domains/graph/commands/query.ts +0 -60
- package/src/domains/graph/formatters/index.ts +0 -4
- package/src/domains/graph/formatters/inspect.ts +0 -50
- package/src/domains/graph/formatters/query.ts +0 -37
- package/src/domains/graph/helpers/index.ts +0 -3
- package/src/domains/graph/helpers/resolveUri.test.ts +0 -50
- package/src/domains/graph/helpers/resolveUri.ts +0 -77
- package/src/domains/graph/index.ts +0 -22
- package/src/domains/graph/mcp/index.ts +0 -2
- package/src/domains/graph/mcp/specs.ts +0 -82
- package/src/domains/graph/operations/executeQuery.test.ts +0 -68
- package/src/domains/graph/operations/executeQuery.ts +0 -32
- package/src/domains/graph/operations/index.ts +0 -4
- package/src/domains/graph/operations/inspectUri.test.ts +0 -101
- package/src/domains/graph/operations/inspectUri.ts +0 -64
- package/src/domains/graphql/commands/build.test.ts +0 -196
- package/src/domains/graphql/commands/build.ts +0 -117
- package/src/domains/graphql/commands/check.test.ts +0 -141
- package/src/domains/graphql/commands/check.ts +0 -81
- package/src/domains/graphql/commands/index.ts +0 -5
- package/src/domains/graphql/commands/serve.test.ts +0 -40
- package/src/domains/graphql/commands/serve.ts +0 -131
- package/src/domains/graphql/constants.ts +0 -10
- package/src/domains/graphql/formatters/index.ts +0 -3
- package/src/domains/graphql/formatters/report.ts +0 -78
- package/src/domains/graphql/helpers/gatherSources.test.ts +0 -92
- package/src/domains/graphql/helpers/gatherSources.ts +0 -58
- package/src/domains/graphql/helpers/index.ts +0 -6
- package/src/domains/graphql/helpers/parsePrefixes.test.ts +0 -44
- package/src/domains/graphql/helpers/parsePrefixes.ts +0 -38
- package/src/domains/graphql/helpers/resolveSourceFiles.test.ts +0 -56
- package/src/domains/graphql/helpers/resolveSourceFiles.ts +0 -45
- package/src/domains/graphql/helpers/routeGraphql.test.ts +0 -43
- package/src/domains/graphql/helpers/routeGraphql.ts +0 -28
- package/src/domains/graphql/index.ts +0 -24
- package/src/domains/graphql/operations/compileSchema.test.ts +0 -95
- package/src/domains/graphql/operations/compileSchema.ts +0 -107
- package/src/domains/graphql/operations/createSchemaServer.test.ts +0 -50
- package/src/domains/graphql/operations/createSchemaServer.ts +0 -75
- package/src/domains/graphql/operations/index.ts +0 -12
- package/src/domains/graphql/types.ts +0 -29
- package/src/domains/info/commands/index.ts +0 -4
- package/src/domains/info/commands/info.test.ts +0 -88
- package/src/domains/info/commands/info.ts +0 -47
- package/src/domains/info/commands/upgrade.test.ts +0 -183
- package/src/domains/info/commands/upgrade.ts +0 -153
- package/src/domains/info/constants.test.ts +0 -22
- package/src/domains/info/constants.ts +0 -15
- package/src/domains/info/formatters/index.ts +0 -8
- package/src/domains/info/formatters/info.test.ts +0 -207
- package/src/domains/info/formatters/info.ts +0 -131
- package/src/domains/info/formatters/upgrade.test.ts +0 -133
- package/src/domains/info/formatters/upgrade.ts +0 -68
- package/src/domains/info/index.ts +0 -9
- package/src/domains/info/mcp/index.ts +0 -2
- package/src/domains/info/mcp/specs.ts +0 -65
- package/src/domains/info/operations/checkRegistryVersion.test.ts +0 -124
- package/src/domains/info/operations/checkRegistryVersion.ts +0 -45
- package/src/domains/info/operations/collectInfo.test.ts +0 -122
- package/src/domains/info/operations/collectInfo.ts +0 -94
- package/src/domains/info/operations/collectStoreSummary.test.ts +0 -61
- package/src/domains/info/operations/collectStoreSummary.ts +0 -42
- package/src/domains/info/operations/index.ts +0 -5
- package/src/domains/info/types.test-d.ts +0 -35
- package/src/domains/info/types.ts +0 -54
- package/src/domains/llm/capabilities.test.ts +0 -91
- package/src/domains/llm/commands/capabilities.ts +0 -28
- package/src/domains/llm/commands/index.ts +0 -4
- package/src/domains/llm/commands/llm.ts +0 -37
- package/src/domains/llm/data/commandReference.ts +0 -97
- package/src/domains/llm/data/decisionTrees.ts +0 -50
- package/src/domains/llm/data/index.ts +0 -6
- package/src/domains/llm/data/toolCatalog.ts +0 -190
- package/src/domains/llm/formatters/capabilities.ts +0 -50
- package/src/domains/llm/formatters/index.ts +0 -4
- package/src/domains/llm/formatters/orientation.ts +0 -53
- package/src/domains/llm/index.ts +0 -9
- package/src/domains/llm/llmCommand.test.ts +0 -93
- package/src/domains/llm/mcp/index.ts +0 -2
- package/src/domains/llm/mcp/specs.ts +0 -94
- package/src/domains/llm/operations/collectContext.ts +0 -47
- package/src/domains/llm/operations/index.ts +0 -3
- package/src/domains/llm/types.ts +0 -72
- package/src/domains/modifier/commands/index.ts +0 -5
- package/src/domains/modifier/commands/list.test.ts +0 -57
- package/src/domains/modifier/commands/list.ts +0 -9
- package/src/domains/modifier/commands/lookup.test.ts +0 -91
- package/src/domains/modifier/commands/lookup.ts +0 -14
- package/src/domains/modifier/commands/sample.ts +0 -53
- package/src/domains/modifier/formatters/index.ts +0 -8
- package/src/domains/modifier/formatters/list.test.ts +0 -38
- package/src/domains/modifier/formatters/list.ts +0 -22
- package/src/domains/modifier/formatters/lookup.test.ts +0 -33
- package/src/domains/modifier/formatters/lookup.ts +0 -50
- package/src/domains/modifier/formatters/sample.ts +0 -15
- package/src/domains/modifier/index.ts +0 -27
- package/src/domains/modifier/mcp/index.ts +0 -2
- package/src/domains/modifier/mcp/specs.ts +0 -65
- package/src/domains/modifier/modifierConfig.ts +0 -36
- package/src/domains/modifier/operations/index.ts +0 -5
- package/src/domains/modifier/operations/list.test.ts +0 -39
- package/src/domains/modifier/operations/list.ts +0 -41
- package/src/domains/modifier/operations/lookup.test.ts +0 -37
- package/src/domains/modifier/operations/lookup.ts +0 -67
- package/src/domains/modifier/operations/sample.ts +0 -32
- package/src/domains/modifier/orchestration/index.ts +0 -3
- package/src/domains/modifier/orchestration/modifierEmptyError.test.ts +0 -26
- package/src/domains/modifier/orchestration/modifierEmptyError.ts +0 -15
- package/src/domains/modifier/orchestration/resolveModifierList.ts +0 -16
- package/src/domains/modifier/orchestration/resolveModifierLookup.ts +0 -33
- package/src/domains/modifier/stories.test.ts +0 -20
- package/src/domains/modifier/stories.ts +0 -77
- package/src/domains/modifier/types.ts +0 -5
- package/src/domains/ontology/commands/index.ts +0 -4
- package/src/domains/ontology/commands/list.test.ts +0 -82
- package/src/domains/ontology/commands/list.ts +0 -11
- package/src/domains/ontology/commands/show.test.ts +0 -103
- package/src/domains/ontology/commands/show.ts +0 -14
- package/src/domains/ontology/formatters/index.ts +0 -4
- package/src/domains/ontology/formatters/list.ts +0 -39
- package/src/domains/ontology/formatters/show.ts +0 -105
- package/src/domains/ontology/helpers/findNamespace.ts +0 -23
- package/src/domains/ontology/helpers/index.ts +0 -7
- package/src/domains/ontology/helpers/queryClasses.ts +0 -50
- package/src/domains/ontology/helpers/queryProperties.ts +0 -57
- package/src/domains/ontology/helpers/resolvePrefix.ts +0 -45
- package/src/domains/ontology/index.ts +0 -26
- package/src/domains/ontology/mcp/index.ts +0 -2
- package/src/domains/ontology/mcp/specs.ts +0 -16
- package/src/domains/ontology/operations/index.ts +0 -5
- package/src/domains/ontology/operations/listOntologies.test.ts +0 -45
- package/src/domains/ontology/operations/listOntologies.ts +0 -101
- package/src/domains/ontology/operations/showOntology.test.ts +0 -65
- package/src/domains/ontology/operations/showOntology.ts +0 -41
- package/src/domains/ontology/operations/showOntologyRaw.test.ts +0 -39
- package/src/domains/ontology/operations/showOntologyRaw.ts +0 -50
- package/src/domains/ontology/stories.test.ts +0 -36
- package/src/domains/ontology/stories.ts +0 -108
- package/src/domains/refs/commands/updateRefs.ts +0 -52
- package/src/domains/refs/formatters/updateRefs.ts +0 -27
- package/src/domains/refs/index.ts +0 -27
- package/src/domains/refs/operations/gitOps.test.ts +0 -155
- package/src/domains/refs/operations/gitOps.ts +0 -92
- package/src/domains/refs/operations/index.ts +0 -10
- package/src/domains/refs/operations/parseRef.test.ts +0 -157
- package/src/domains/refs/operations/parseRef.ts +0 -114
- package/src/domains/refs/operations/paths.test.ts +0 -98
- package/src/domains/refs/operations/paths.ts +0 -91
- package/src/domains/refs/operations/readGlobalRefs.test.ts +0 -63
- package/src/domains/refs/operations/readGlobalRefs.ts +0 -37
- package/src/domains/refs/operations/updateRefs.test.ts +0 -167
- package/src/domains/refs/operations/updateRefs.ts +0 -181
- package/src/domains/setup/commands/all.ts +0 -58
- package/src/domains/setup/commands/completions.ts +0 -85
- package/src/domains/setup/commands/entrypoints.test.ts +0 -170
- package/src/domains/setup/commands/index.ts +0 -6
- package/src/domains/setup/commands/lsp.ts +0 -49
- package/src/domains/setup/commands/mcp.ts +0 -119
- package/src/domains/setup/commands/skills.test.ts +0 -68
- package/src/domains/setup/commands/skills.ts +0 -110
- package/src/domains/setup/formatters/index.ts +0 -2
- package/src/domains/setup/formatters/skills.test.ts +0 -103
- package/src/domains/setup/formatters/skills.ts +0 -112
- package/src/domains/setup/formatters/types.ts +0 -7
- package/src/domains/setup/helpers/completionScripts.test.ts +0 -58
- package/src/domains/setup/helpers/completionScripts.ts +0 -92
- package/src/domains/setup/helpers/constants.ts +0 -2
- package/src/domains/setup/helpers/detectShell.test.ts +0 -48
- package/src/domains/setup/helpers/detectShell.ts +0 -20
- package/src/domains/setup/helpers/index.ts +0 -12
- package/src/domains/setup/helpers/runSetupTask.test.ts +0 -277
- package/src/domains/setup/helpers/runSetupTask.ts +0 -221
- package/src/domains/setup/index.ts +0 -33
- package/src/domains/setup/operations/index.ts +0 -6
- package/src/domains/setup/operations/setupAll.test.ts +0 -48
- package/src/domains/setup/operations/setupAll.ts +0 -41
- package/src/domains/setup/operations/setupCompletions.test.ts +0 -94
- package/src/domains/setup/operations/setupCompletions.ts +0 -54
- package/src/domains/setup/operations/setupLsp.test.ts +0 -29
- package/src/domains/setup/operations/setupLsp.ts +0 -17
- package/src/domains/setup/operations/setupMcp.test.ts +0 -120
- package/src/domains/setup/operations/setupMcp.ts +0 -108
- package/src/domains/setup/operations/setupSkills.test.ts +0 -191
- package/src/domains/setup/operations/setupSkills.ts +0 -160
- package/src/domains/setup/types.ts +0 -18
- package/src/domains/shared/ToolSpec.ts +0 -49
- package/src/domains/shared/bootStore.ts +0 -135
- package/src/domains/shared/buildQuery.ts +0 -18
- package/src/domains/shared/compactUri.test.ts +0 -32
- package/src/domains/shared/compactUri.ts +0 -21
- package/src/domains/shared/context.ts +0 -16
- package/src/domains/shared/contracts.ts +0 -164
- package/src/domains/shared/createInteractivePromptSession.test.ts +0 -439
- package/src/domains/shared/createInteractivePromptSession.ts +0 -236
- package/src/domains/shared/emptyErrorRecovery.test.ts +0 -109
- package/src/domains/shared/extractLocalName.test.ts +0 -21
- package/src/domains/shared/extractLocalName.ts +0 -14
- package/src/domains/shared/filters/buildChannelFilter.test.ts +0 -52
- package/src/domains/shared/filters/buildChannelFilter.ts +0 -41
- package/src/domains/shared/filters/buildFilterConfig.ts +0 -15
- package/src/domains/shared/filters/buildFilters.test.ts +0 -33
- package/src/domains/shared/filters/buildFilters.ts +0 -30
- package/src/domains/shared/filters/buildTierFilter.test.ts +0 -78
- package/src/domains/shared/filters/buildTierFilter.ts +0 -69
- package/src/domains/shared/filters/describeFilters.ts +0 -14
- package/src/domains/shared/filters/index.ts +0 -10
- package/src/domains/shared/formatters.ts +0 -82
- package/src/domains/shared/loaders/bundledLoader.test.ts +0 -248
- package/src/domains/shared/loaders/bundledLoader.ts +0 -206
- package/src/domains/shared/loaders/gitLoader.ts +0 -31
- package/src/domains/shared/loaders/index.ts +0 -9
- package/src/domains/shared/loaders/localLoader.ts +0 -87
- package/src/domains/shared/loaders/readPackageDir.ts +0 -147
- package/src/domains/shared/loaders/storyAssetsPlugin.test.ts +0 -84
- package/src/domains/shared/loaders/storyAssetsPlugin.ts +0 -46
- package/src/domains/shared/lookupMany.test.ts +0 -120
- package/src/domains/shared/lookupMany.ts +0 -85
- package/src/domains/shared/mergeAndParseRefs.test.ts +0 -89
- package/src/domains/shared/mergeAndParseRefs.ts +0 -44
- package/src/domains/shared/namespaces.ts +0 -18
- package/src/domains/shared/packages.ts +0 -20
- package/src/domains/shared/pickRandom.ts +0 -22
- package/src/domains/shared/prefixes.ts +0 -37
- package/src/domains/shared/renderers.ts +0 -410
- package/src/domains/shared/resolveConfiguredGraphs.test.ts +0 -27
- package/src/domains/shared/resolveConfiguredGraphs.ts +0 -41
- package/src/domains/shared/runtime.ts +0 -61
- package/src/domains/shared/sampleFormatters.ts +0 -47
- package/src/domains/shared/semanticPackage.ts +0 -112
- package/src/domains/shared/stories/compileLookupCommand.test.ts +0 -145
- package/src/domains/shared/stories/compileLookupCommand.ts +0 -100
- package/src/domains/shared/stories/compileLookupTool.test.ts +0 -105
- package/src/domains/shared/stories/compileLookupTool.ts +0 -96
- package/src/domains/shared/stories/compileReadCommand.test.ts +0 -121
- package/src/domains/shared/stories/compileReadCommand.ts +0 -48
- package/src/domains/shared/stories/compileReadTool.test.ts +0 -64
- package/src/domains/shared/stories/compileReadTool.ts +0 -38
- package/src/domains/shared/stories/condense.test.ts +0 -18
- package/src/domains/shared/stories/condense.ts +0 -15
- package/src/domains/shared/stories/index.ts +0 -20
- package/src/domains/shared/stories/normalizeNames.test.ts +0 -20
- package/src/domains/shared/stories/normalizeNames.ts +0 -22
- package/src/domains/shared/stories/pack/applyPackFilters.test.ts +0 -102
- package/src/domains/shared/stories/pack/applyPackFilters.ts +0 -76
- package/src/domains/shared/stories/pack/buildLookupQuery.test.ts +0 -51
- package/src/domains/shared/stories/pack/buildLookupQuery.ts +0 -80
- package/src/domains/shared/stories/pack/collectPackStories.test.ts +0 -108
- package/src/domains/shared/stories/pack/collectPackStories.ts +0 -76
- package/src/domains/shared/stories/pack/compilePackCommands.ts +0 -40
- package/src/domains/shared/stories/pack/compilePackStories.test.ts +0 -146
- package/src/domains/shared/stories/pack/compilePackStories.ts +0 -253
- package/src/domains/shared/stories/pack/compilePackToolSpecs.ts +0 -43
- package/src/domains/shared/stories/pack/index.ts +0 -28
- package/src/domains/shared/stories/pack/runSelectQuery.ts +0 -31
- package/src/domains/shared/stories/pack/standardParity.test.ts +0 -308
- package/src/domains/shared/stories/pack/types.ts +0 -104
- package/src/domains/shared/stories/pack/validateStoryPackDefinition.test.ts +0 -240
- package/src/domains/shared/stories/pack/validateStoryPackDefinition.ts +0 -408
- package/src/domains/shared/stories/projectCliParameters.test.ts +0 -59
- package/src/domains/shared/stories/projectCliParameters.ts +0 -57
- package/src/domains/shared/stories/projectToolParams.test.ts +0 -50
- package/src/domains/shared/stories/projectToolParams.ts +0 -32
- package/src/domains/shared/stories/requirePragmaContext.test.ts +0 -23
- package/src/domains/shared/stories/requirePragmaContext.ts +0 -23
- package/src/domains/shared/stories/resolveLookupDetailed.test.ts +0 -57
- package/src/domains/shared/stories/resolveLookupDetailed.ts +0 -27
- package/src/domains/shared/stories/types.ts +0 -171
- package/src/domains/shared/suggestions/detectCrossDomain.test.ts +0 -43
- package/src/domains/shared/suggestions/detectCrossDomain.ts +0 -116
- package/src/domains/shared/suggestions/expandGlob.test.ts +0 -92
- package/src/domains/shared/suggestions/expandGlob.ts +0 -52
- package/src/domains/shared/suggestions/expandLookupQueries.ts +0 -57
- package/src/domains/shared/suggestions/index.ts +0 -7
- package/src/domains/shared/suggestions/listDomainNames.ts +0 -61
- package/src/domains/shared/suggestions/suggestNames.test.ts +0 -70
- package/src/domains/shared/suggestions/suggestNames.ts +0 -130
- package/src/domains/shared/types/block.ts +0 -107
- package/src/domains/shared/types/common.ts +0 -33
- package/src/domains/shared/types/graph.ts +0 -17
- package/src/domains/shared/types/index.ts +0 -50
- package/src/domains/shared/types/modifier.ts +0 -22
- package/src/domains/shared/types/ontology.ts +0 -50
- package/src/domains/shared/types/runtime.ts +0 -24
- package/src/domains/shared/types/sample.ts +0 -17
- package/src/domains/shared/types/standard.ts +0 -64
- package/src/domains/shared/types/tier.ts +0 -15
- package/src/domains/shared/types/token.ts +0 -30
- package/src/domains/skill/commands/index.ts +0 -4
- package/src/domains/skill/commands/list.test.ts +0 -115
- package/src/domains/skill/commands/list.ts +0 -11
- package/src/domains/skill/commands/lookup.test.ts +0 -118
- package/src/domains/skill/commands/lookup.ts +0 -14
- package/src/domains/skill/formatters/index.ts +0 -3
- package/src/domains/skill/formatters/list.test.ts +0 -140
- package/src/domains/skill/formatters/list.ts +0 -119
- package/src/domains/skill/formatters/lookup.test.ts +0 -46
- package/src/domains/skill/formatters/lookup.ts +0 -57
- package/src/domains/skill/formatters/types.ts +0 -8
- package/src/domains/skill/helpers/index.ts +0 -6
- package/src/domains/skill/helpers/parseFrontmatter.test.ts +0 -122
- package/src/domains/skill/helpers/parseFrontmatter.ts +0 -112
- package/src/domains/skill/helpers/resolveSkillSources.ts +0 -70
- package/src/domains/skill/index.ts +0 -23
- package/src/domains/skill/mcp/index.ts +0 -2
- package/src/domains/skill/mcp/specs.ts +0 -19
- package/src/domains/skill/operations/discover.test.ts +0 -176
- package/src/domains/skill/operations/discover.ts +0 -59
- package/src/domains/skill/operations/index.ts +0 -5
- package/src/domains/skill/operations/list.test.ts +0 -76
- package/src/domains/skill/operations/list.ts +0 -47
- package/src/domains/skill/operations/lookup.test.ts +0 -91
- package/src/domains/skill/operations/lookup.ts +0 -70
- package/src/domains/skill/stories.test.ts +0 -43
- package/src/domains/skill/stories.ts +0 -103
- package/src/domains/skill/types.ts +0 -33
- package/src/domains/standard/commands/categories.test.ts +0 -70
- package/src/domains/standard/commands/categories.ts +0 -48
- package/src/domains/standard/commands/index.ts +0 -6
- package/src/domains/standard/commands/list.test.ts +0 -105
- package/src/domains/standard/commands/list.ts +0 -11
- package/src/domains/standard/commands/lookup.test.ts +0 -135
- package/src/domains/standard/commands/lookup.ts +0 -14
- package/src/domains/standard/commands/sample.ts +0 -57
- package/src/domains/standard/formatters/categories.test.ts +0 -44
- package/src/domains/standard/formatters/categories.ts +0 -38
- package/src/domains/standard/formatters/index.ts +0 -10
- package/src/domains/standard/formatters/list.test.ts +0 -169
- package/src/domains/standard/formatters/list.ts +0 -184
- package/src/domains/standard/formatters/lookup.test.ts +0 -95
- package/src/domains/standard/formatters/lookup.ts +0 -101
- package/src/domains/standard/formatters/sample.ts +0 -15
- package/src/domains/standard/formatters/types.ts +0 -31
- package/src/domains/standard/index.ts +0 -40
- package/src/domains/standard/mcp/index.ts +0 -2
- package/src/domains/standard/mcp/specs.ts +0 -89
- package/src/domains/standard/operations/categories.test.ts +0 -61
- package/src/domains/standard/operations/categories.ts +0 -38
- package/src/domains/standard/operations/index.ts +0 -6
- package/src/domains/standard/operations/list.test.ts +0 -75
- package/src/domains/standard/operations/list.ts +0 -64
- package/src/domains/standard/operations/lookup.test.ts +0 -58
- package/src/domains/standard/operations/lookup.ts +0 -151
- package/src/domains/standard/operations/sample.ts +0 -35
- package/src/domains/standard/orchestration/buildStandardFilters.ts +0 -11
- package/src/domains/standard/orchestration/index.ts +0 -4
- package/src/domains/standard/orchestration/resolveStandardList.ts +0 -45
- package/src/domains/standard/orchestration/resolveStandardLookup.ts +0 -33
- package/src/domains/standard/orchestration/standardEmptyError.test.ts +0 -33
- package/src/domains/standard/orchestration/standardEmptyError.ts +0 -29
- package/src/domains/standard/standardConfig.ts +0 -42
- package/src/domains/standard/stories.test.ts +0 -24
- package/src/domains/standard/stories.ts +0 -151
- package/src/domains/standard/types.ts +0 -15
- package/src/domains/tier/commands/index.ts +0 -3
- package/src/domains/tier/commands/list.test.ts +0 -67
- package/src/domains/tier/commands/list.ts +0 -9
- package/src/domains/tier/formatters/index.ts +0 -3
- package/src/domains/tier/formatters/list.test.ts +0 -33
- package/src/domains/tier/formatters/list.ts +0 -45
- package/src/domains/tier/index.ts +0 -17
- package/src/domains/tier/mcp/index.ts +0 -2
- package/src/domains/tier/mcp/specs.ts +0 -12
- package/src/domains/tier/operations/index.ts +0 -3
- package/src/domains/tier/operations/list.test.ts +0 -32
- package/src/domains/tier/operations/list.ts +0 -33
- package/src/domains/tier/stories.test.ts +0 -22
- package/src/domains/tier/stories.ts +0 -52
- package/src/domains/token/commands/add-config.test.ts +0 -68
- package/src/domains/token/commands/add-config.ts +0 -62
- package/src/domains/token/commands/index.ts +0 -6
- package/src/domains/token/commands/list.test.ts +0 -82
- package/src/domains/token/commands/list.ts +0 -54
- package/src/domains/token/commands/lookup.test.ts +0 -125
- package/src/domains/token/commands/lookup.ts +0 -95
- package/src/domains/token/commands/sample.ts +0 -53
- package/src/domains/token/formatters/index.ts +0 -8
- package/src/domains/token/formatters/list.test.ts +0 -37
- package/src/domains/token/formatters/list.ts +0 -24
- package/src/domains/token/formatters/lookup.test.ts +0 -61
- package/src/domains/token/formatters/lookup.ts +0 -107
- package/src/domains/token/formatters/sample.ts +0 -16
- package/src/domains/token/index.ts +0 -40
- package/src/domains/token/mcp/index.ts +0 -2
- package/src/domains/token/mcp/specs.ts +0 -195
- package/src/domains/token/operations/add-config.test.ts +0 -68
- package/src/domains/token/operations/add-config.ts +0 -61
- package/src/domains/token/operations/index.ts +0 -8
- package/src/domains/token/operations/list.test.ts +0 -50
- package/src/domains/token/operations/list.ts +0 -52
- package/src/domains/token/operations/lookup.test.ts +0 -42
- package/src/domains/token/operations/lookup.ts +0 -75
- package/src/domains/token/operations/sample.ts +0 -32
- package/src/domains/token/orchestration/index.ts +0 -3
- package/src/domains/token/orchestration/resolveTokenList.ts +0 -17
- package/src/domains/token/orchestration/resolveTokenLookup.ts +0 -33
- package/src/domains/token/orchestration/tokenEmptyError.test.ts +0 -33
- package/src/domains/token/orchestration/tokenEmptyError.ts +0 -20
- package/src/domains/token/tokenConfig.ts +0 -38
- package/src/domains/token/types.ts +0 -6
- package/src/domains/trace/commands/clear.ts +0 -71
- package/src/domains/trace/commands/index.ts +0 -5
- package/src/domains/trace/commands/sessions.ts +0 -32
- package/src/domains/trace/commands/show.ts +0 -145
- package/src/domains/trace/formatters/index.ts +0 -9
- package/src/domains/trace/formatters/sessions.ts +0 -80
- package/src/domains/trace/formatters/show.ts +0 -122
- package/src/domains/trace/index.ts +0 -17
- package/src/domains/trace/operations/index.ts +0 -8
- package/src/domains/trace/operations/listSessions.test.ts +0 -55
- package/src/domains/trace/operations/listSessions.ts +0 -52
- package/src/domains/trace/operations/readTraceLog.test.ts +0 -100
- package/src/domains/trace/operations/readTraceLog.ts +0 -104
- package/src/domains/trace/tracePlugin.test.ts +0 -171
- package/src/domains/trace/tracePlugin.ts +0 -159
- package/src/domains/trace/types.ts +0 -65
- package/src/embedWasm.ts +0 -42
- package/src/error/PragmaError.test.ts +0 -121
- package/src/error/PragmaError.ts +0 -177
- package/src/error/constants.ts +0 -12
- package/src/error/index.ts +0 -4
- package/src/error/types.ts +0 -55
- package/src/mcp/createMcpServer.test.ts +0 -41
- package/src/mcp/createMcpServer.ts +0 -53
- package/src/mcp/error/buildRecovery.test.ts +0 -37
- package/src/mcp/error/buildRecovery.ts +0 -17
- package/src/mcp/error/index.ts +0 -12
- package/src/mcp/error/serializeError.test.ts +0 -121
- package/src/mcp/error/serializeError.ts +0 -31
- package/src/mcp/error/serializeErrorPayload.test.ts +0 -38
- package/src/mcp/error/serializeErrorPayload.ts +0 -34
- package/src/mcp/error/types.ts +0 -59
- package/src/mcp/index.ts +0 -15
- package/src/mcp/registerResources.test.ts +0 -566
- package/src/mcp/registerResources.ts +0 -9
- package/src/mcp/resources/buildGraphIndex.ts +0 -167
- package/src/mcp/resources/buildResourceList.test.ts +0 -97
- package/src/mcp/resources/buildResourceList.ts +0 -176
- package/src/mcp/resources/classifyEntity.test.ts +0 -40
- package/src/mcp/resources/classifyEntity.ts +0 -27
- package/src/mcp/resources/constants.ts +0 -105
- package/src/mcp/resources/displayPredicates.ts +0 -62
- package/src/mcp/resources/pickFirstValue.test.ts +0 -29
- package/src/mcp/resources/pickFirstValue.ts +0 -26
- package/src/mcp/resources/pickPrimaryType.test.ts +0 -41
- package/src/mcp/resources/pickPrimaryType.ts +0 -26
- package/src/mcp/resources/rankUriCompletions.test.ts +0 -52
- package/src/mcp/resources/rankUriCompletions.ts +0 -64
- package/src/mcp/resources/readEntity.ts +0 -169
- package/src/mcp/resources/registerResources.ts +0 -126
- package/src/mcp/resources/types.ts +0 -128
- package/src/mcp/runMcpServer.test.ts +0 -66
- package/src/mcp/runMcpServer.ts +0 -24
- package/src/mcp/tools/index.ts +0 -66
- package/src/mcp/tools/registerFromSpec.ts +0 -97
- package/src/mcp/tools/registerTools.test.ts +0 -1201
- package/src/mcp/types.ts +0 -66
- package/src/mcp/utils/estimateTokens.test.ts +0 -14
- package/src/mcp/utils/estimateTokens.ts +0 -9
- package/src/mcp/utils/index.ts +0 -11
- package/src/mcp/utils/wrapTool.test.ts +0 -109
- package/src/mcp/utils/wrapTool.ts +0 -81
- package/src/package-manager/constants.ts +0 -29
- package/src/package-manager/detectInstallSource.test.ts +0 -23
- package/src/package-manager/detectInstallSource.ts +0 -111
- package/src/package-manager/detectLocalInstall.test.ts +0 -16
- package/src/package-manager/detectLocalInstall.ts +0 -43
- package/src/package-manager/detectPackageManager.test.ts +0 -81
- package/src/package-manager/detectPackageManager.ts +0 -30
- package/src/package-manager/index.ts +0 -6
- package/src/package-manager/types.ts +0 -10
- package/src/pipeline/collectCommands.test.ts +0 -37
- package/src/pipeline/collectCommands.ts +0 -60
- package/src/pipeline/constants.ts +0 -14
- package/src/pipeline/createProgram.test.ts +0 -112
- package/src/pipeline/createProgram.ts +0 -89
- package/src/pipeline/formatTerminal.test.ts +0 -43
- package/src/pipeline/formatTerminal.ts +0 -53
- package/src/pipeline/index.ts +0 -22
- package/src/pipeline/mapExitCode.test.ts +0 -41
- package/src/pipeline/mapExitCode.ts +0 -12
- package/src/pipeline/parseGlobalFlags.test.ts +0 -92
- package/src/pipeline/parseGlobalFlags.ts +0 -46
- package/src/pipeline/renderError.test.ts +0 -151
- package/src/pipeline/renderError.ts +0 -129
- package/src/pipeline/resolveCommandKind.test.ts +0 -68
- package/src/pipeline/resolveCommandKind.ts +0 -78
- package/src/pipeline/runCli.orchestration.test.ts +0 -419
- package/src/pipeline/runCli.test.ts +0 -70
- package/src/pipeline/runCli.ts +0 -268
- package/src/pipeline/types.ts +0 -17
- package/src/testing/cli.ts +0 -43
- package/src/testing/createTestMcpClient.ts +0 -68
- package/src/testing/dsFixtures.ts +0 -506
- package/src/testing/fixtures/canonical-config.json +0 -4
- package/src/testing/fixtures/canonical.ttl +0 -437
- package/src/testing/fixtures/filtered-config.json +0 -4
- package/src/testing/fixtures.ts +0 -34
- package/src/testing/graphqlFixtures.ts +0 -72
- package/src/testing/helpers/assertParity.ts +0 -28
- package/src/testing/helpers/createTestMcpClient.ts +0 -40
- package/src/testing/helpers/createTestRuntime.ts +0 -67
- package/src/testing/index.ts +0 -25
- package/src/testing/integration/__snapshots__/executor-golden.test.ts.snap +0 -1207
- package/src/testing/integration/agent-session.test.ts +0 -148
- package/src/testing/integration/boot.test.ts +0 -105
- package/src/testing/integration/cli-user-stories.test.ts +0 -198
- package/src/testing/integration/cross-binary-byte-equality.test.ts +0 -129
- package/src/testing/integration/edge-cases.test.ts +0 -263
- package/src/testing/integration/executor-execution.test.ts +0 -101
- package/src/testing/integration/executor-golden.test.ts +0 -145
- package/src/testing/integration/mcp-surface.test.ts +0 -580
- package/src/testing/integration/parity.test.ts +0 -547
- package/src/testing/regression/0001-skill-discovery-granularity.test.ts +0 -71
- package/src/testing/standardParityFixtures.ts +0 -92
- package/src/testing/store.ts +0 -39
- package/src/testing/storyFixtures.ts +0 -63
- package/src/testing/types.ts +0 -20
- package/src/tui/components/BulletList/BulletList.tsx +0 -46
- package/src/tui/components/BulletList/index.ts +0 -2
- package/src/tui/components/BulletList/types.ts +0 -6
- package/src/tui/components/Card/Card.tsx +0 -73
- package/src/tui/components/Card/index.ts +0 -1
- package/src/tui/components/Card/types.ts +0 -12
- package/src/tui/components/CodeBlock/CodeBlock.tsx +0 -37
- package/src/tui/components/CodeBlock/index.ts +0 -2
- package/src/tui/components/CodeBlock/types.ts +0 -6
- package/src/tui/components/DataRow/DataRow.tsx +0 -80
- package/src/tui/components/DataRow/index.ts +0 -2
- package/src/tui/components/DataRow/types.ts +0 -14
- package/src/tui/components/FieldRow/FieldRow.tsx +0 -24
- package/src/tui/components/FieldRow/index.ts +0 -2
- package/src/tui/components/FieldRow/types.ts +0 -10
- package/src/tui/components/HeaderRow/HeaderRow.tsx +0 -32
- package/src/tui/components/HeaderRow/index.ts +0 -2
- package/src/tui/components/HeaderRow/types.ts +0 -8
- package/src/tui/components/MarkdownText/MarkdownText.tsx +0 -19
- package/src/tui/components/MarkdownText/index.ts +0 -2
- package/src/tui/components/MarkdownText/types.ts +0 -4
- package/src/tui/components/MiniTable/MiniTable.tsx +0 -82
- package/src/tui/components/MiniTable/index.ts +0 -2
- package/src/tui/components/MiniTable/types.ts +0 -6
- package/src/tui/components/SectionRenderer/SectionRenderer.tsx +0 -91
- package/src/tui/components/SectionRenderer/index.ts +0 -2
- package/src/tui/components/SectionRenderer/types.ts +0 -15
- package/src/tui/components/TreeView/TreeView.tsx +0 -84
- package/src/tui/components/TreeView/index.ts +0 -2
- package/src/tui/components/TreeView/types.ts +0 -6
- package/src/tui/components/index.ts +0 -19
- package/src/tui/constants.ts +0 -39
- package/src/tui/createListView.ts +0 -23
- package/src/tui/createLookupView.ts +0 -26
- package/src/tui/helpers/computeWidths.ts +0 -53
- package/src/tui/helpers/fitColumns.ts +0 -33
- package/src/tui/helpers/formatMarkdown.ts +0 -19
- package/src/tui/helpers/getTerminalSize.ts +0 -16
- package/src/tui/helpers/index.ts +0 -6
- package/src/tui/helpers/syntaxColor.ts +0 -67
- package/src/tui/helpers/truncateText.ts +0 -12
- package/src/tui/hooks/index.ts +0 -3
- package/src/tui/hooks/types.ts +0 -7
- package/src/tui/hooks/useAutoExit.ts +0 -17
- package/src/tui/hooks/useTerminalSize.ts +0 -19
- package/src/tui/index.ts +0 -15
- package/src/tui/renderInk.tsx +0 -18
- package/src/tui/types.ts +0 -12
- package/src/tui/views/ListView/ListView.tsx +0 -104
- package/src/tui/views/ListView/index.ts +0 -2
- package/src/tui/views/ListView/types.ts +0 -14
- package/src/tui/views/LookupView/LookupView.tsx +0 -244
- package/src/tui/views/LookupView/index.ts +0 -2
- package/src/tui/views/LookupView/types.ts +0 -16
- package/src/tui/views/index.ts +0 -4
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assembly-level eval cases (PR7 nouns) — the orientation surface `capabilities`
|
|
3
|
+
* + `instructions` + native prompts add ABOVE per-noun tools.
|
|
4
|
+
*
|
|
5
|
+
* These run over the shared `env.mcp` (the live catalog), so they cost no fixture
|
|
6
|
+
* boot: the catalog, the tool descriptions, the instructions, and the handshake
|
|
7
|
+
* capabilities are all storeless. The NL-intent ("prompt") cases assert that an
|
|
8
|
+
* agent following the annotated catalog would reach the right tool — the payoff
|
|
9
|
+
* of the orientation surface. Data-backed prompt/graph cases live in
|
|
10
|
+
* `cases/effectful.ts`. R2: no noun list is hard-coded — the catalog is read live.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import assert from "node:assert/strict";
|
|
14
|
+
import { capabilities } from "../../../capabilities/index.js";
|
|
15
|
+
import { emitSurface } from "../../../kernel/spec/emitSurface.js";
|
|
16
|
+
import type { EvalCase } from "../harness.js";
|
|
17
|
+
|
|
18
|
+
/** Assert an intent maps to a tool by checking that tool's advertised description. */
|
|
19
|
+
function assertIntentTool(
|
|
20
|
+
tools: { name: string; description?: string }[],
|
|
21
|
+
tool: string,
|
|
22
|
+
pattern: RegExp,
|
|
23
|
+
): void {
|
|
24
|
+
const found = tools.find((t) => t.name === tool);
|
|
25
|
+
assert.ok(found, `expected a \`${tool}\` tool in the catalog`);
|
|
26
|
+
assert.match(String(found?.description ?? ""), pattern);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const assemblyEvalCases: readonly EvalCase[] = [
|
|
30
|
+
{
|
|
31
|
+
id: "tool-capabilities-annotates-every-live-tool",
|
|
32
|
+
kind: "tool",
|
|
33
|
+
input:
|
|
34
|
+
"the `capabilities` tool catalogs EVERY live tool, each with a non-empty use_when hint.",
|
|
35
|
+
async expect({ mcp }) {
|
|
36
|
+
const result = await mcp.callTool("capabilities");
|
|
37
|
+
const data = result.data as {
|
|
38
|
+
tools: { name: string; use_when: string }[];
|
|
39
|
+
};
|
|
40
|
+
const live = (await mcp.listTools()).map((t) => t.name).sort();
|
|
41
|
+
assert.deepEqual(
|
|
42
|
+
data.tools.map((t) => t.name).sort(),
|
|
43
|
+
live,
|
|
44
|
+
"capabilities catalog must cover exactly the live tool set",
|
|
45
|
+
);
|
|
46
|
+
for (const tool of data.tools) {
|
|
47
|
+
assert.ok(
|
|
48
|
+
tool.use_when.length > 0,
|
|
49
|
+
`tool ${tool.name} has an empty use_when`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "content-capabilities-counts-derived-from-categories",
|
|
56
|
+
kind: "content",
|
|
57
|
+
input:
|
|
58
|
+
"the capabilities counts are derived (total == tools.length; category sizes sum to total; orientation=1, diagnostic=2).",
|
|
59
|
+
async expect({ mcp }) {
|
|
60
|
+
const result = await mcp.callTool("capabilities");
|
|
61
|
+
const data = result.data as {
|
|
62
|
+
tools: unknown[];
|
|
63
|
+
counts: {
|
|
64
|
+
total: number;
|
|
65
|
+
read: number;
|
|
66
|
+
write: number;
|
|
67
|
+
orientation: number;
|
|
68
|
+
diagnostic: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
const { counts } = data;
|
|
72
|
+
assert.equal(counts.total, data.tools.length);
|
|
73
|
+
assert.equal(
|
|
74
|
+
counts.read + counts.write + counts.orientation + counts.diagnostic,
|
|
75
|
+
counts.total,
|
|
76
|
+
);
|
|
77
|
+
assert.equal(counts.orientation, 1);
|
|
78
|
+
assert.equal(counts.diagnostic, 2);
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "content-capabilities-selfconsistent-with-emitsurface",
|
|
83
|
+
kind: "content",
|
|
84
|
+
input:
|
|
85
|
+
"the capabilities catalog tool set equals emitSurface(capabilities).mcpSurface.tools (grammar self-consistency).",
|
|
86
|
+
async expect({ mcp }) {
|
|
87
|
+
const result = await mcp.callTool("capabilities");
|
|
88
|
+
const data = result.data as { tools: { name: string }[] };
|
|
89
|
+
assert.deepEqual(
|
|
90
|
+
data.tools.map((t) => t.name).sort(),
|
|
91
|
+
[...emitSurface(capabilities).mcpSurface.tools].sort(),
|
|
92
|
+
);
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "content-instructions-present-and-mentions-discovery",
|
|
97
|
+
kind: "content",
|
|
98
|
+
input:
|
|
99
|
+
"the server sends handshake instructions that mention `capabilities` and the discovery flow.",
|
|
100
|
+
async expect({ mcp }) {
|
|
101
|
+
const instructions = mcp.instructions();
|
|
102
|
+
assert.ok(instructions, "expected server instructions at initialize");
|
|
103
|
+
assert.match(String(instructions), /capabilities/);
|
|
104
|
+
assert.match(String(instructions).toLowerCase(), /discovery/);
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "content-handshake-advertises-tools-resources-prompts",
|
|
109
|
+
kind: "content",
|
|
110
|
+
input:
|
|
111
|
+
"the initialize handshake advertises the tools, resources, AND prompts capabilities.",
|
|
112
|
+
async expect({ mcp }) {
|
|
113
|
+
const caps = mcp.serverCapabilities();
|
|
114
|
+
assert.ok(caps?.tools, "expected a tools capability");
|
|
115
|
+
assert.ok(caps?.resources, "expected a resources capability");
|
|
116
|
+
assert.ok(caps?.prompts, "expected a prompts capability");
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: "content-capabilities-covers-listtools",
|
|
121
|
+
kind: "content",
|
|
122
|
+
input:
|
|
123
|
+
"every tool the server lists appears in the capabilities catalog (no live tool is invisible to orientation).",
|
|
124
|
+
async expect({ mcp }) {
|
|
125
|
+
const result = await mcp.callTool("capabilities");
|
|
126
|
+
const cataloged = new Set(
|
|
127
|
+
(result.data as { tools: { name: string }[] }).tools.map((t) => t.name),
|
|
128
|
+
);
|
|
129
|
+
for (const tool of await mcp.listTools()) {
|
|
130
|
+
assert.ok(
|
|
131
|
+
cataloged.has(tool.name),
|
|
132
|
+
`tool ${tool.name} is not in the capabilities catalog`,
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "prompt-scaffold-maps-to-create-component",
|
|
139
|
+
kind: "prompt",
|
|
140
|
+
input: '"Scaffold a new component" should map to `create_component`.',
|
|
141
|
+
async expect({ mcp }) {
|
|
142
|
+
assertIntentTool(await mcp.listTools(), "create_component", /component/i);
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "prompt-environment-maps-to-doctor",
|
|
147
|
+
kind: "prompt",
|
|
148
|
+
input: '"What is wrong with my environment?" should map to `doctor`.',
|
|
149
|
+
async expect({ mcp }) {
|
|
150
|
+
assertIntentTool(
|
|
151
|
+
await mcp.listTools(),
|
|
152
|
+
"doctor",
|
|
153
|
+
/diagnos|environment|health/i,
|
|
154
|
+
);
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "prompt-sparql-maps-to-graph-query",
|
|
159
|
+
kind: "prompt",
|
|
160
|
+
input: '"Run an arbitrary SPARQL query" should map to `graph_query`.',
|
|
161
|
+
async expect({ mcp }) {
|
|
162
|
+
assertIntentTool(await mcp.listTools(), "graph_query", /sparql/i);
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: "prompt-set-tier-maps-to-config-tier",
|
|
167
|
+
kind: "prompt",
|
|
168
|
+
input: '"Set the active tier" should map to `config_tier`.',
|
|
169
|
+
async expect({ mcp }) {
|
|
170
|
+
assertIntentTool(await mcp.listTools(), "config_tier", /tier/i);
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: "prompt-tokens-config-maps-to-token-add-config",
|
|
175
|
+
kind: "prompt",
|
|
176
|
+
input:
|
|
177
|
+
'"Generate a terrazzo tokens config" should map to `token_add-config`.',
|
|
178
|
+
async expect({ mcp }) {
|
|
179
|
+
assertIntentTool(
|
|
180
|
+
await mcp.listTools(),
|
|
181
|
+
"token_add-config",
|
|
182
|
+
/token|terrazzo/i,
|
|
183
|
+
);
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: "prompt-browse-prompts-maps-to-prompt-list",
|
|
188
|
+
kind: "prompt",
|
|
189
|
+
input:
|
|
190
|
+
'"Browse the available workflow prompts" should map to `prompt_list`.',
|
|
191
|
+
async expect({ mcp }) {
|
|
192
|
+
assertIntentTool(await mcp.listTools(), "prompt_list", /prompt/i);
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
];
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Effectful eval cases (PR6 + PR7 nouns): the SPARQL escape hatch, the plan-first
|
|
3
|
+
* mutations, the diagnostic self-verb, and the store-backed prompt content.
|
|
4
|
+
*
|
|
5
|
+
* Storeless cases (plan-first previews, doctor shape, invalid-query) run over the
|
|
6
|
+
* shared `env.mcp` (no fixture cost). Data-backed cases build their OWN canonical
|
|
7
|
+
* fixture (the `cases/readNouns.ts` pattern), so they stay independent of the
|
|
8
|
+
* shared env. Anchor VALUES come from the canonical fixture this package controls;
|
|
9
|
+
* noun/tool names are read from the live surface (R2).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import assert from "node:assert/strict";
|
|
13
|
+
import { capabilities } from "../../../capabilities/index.js";
|
|
14
|
+
import {
|
|
15
|
+
ALL_VISIBLE_CONFIG,
|
|
16
|
+
CANONICAL_CONFIG,
|
|
17
|
+
CANONICAL_TTL,
|
|
18
|
+
} from "../../fixtures/graph/canonical.js";
|
|
19
|
+
import { bootFixtureRuntime } from "../../helpers/fixtureGraph.js";
|
|
20
|
+
import { projectMcp } from "../../helpers/projectMcp.js";
|
|
21
|
+
import type { EvalCase } from "../harness.js";
|
|
22
|
+
|
|
23
|
+
/** Run one case's body against a fresh canonical fixture, always disposing. */
|
|
24
|
+
async function withCanonicalFixture(
|
|
25
|
+
config: typeof CANONICAL_CONFIG | typeof ALL_VISIBLE_CONFIG,
|
|
26
|
+
body: (mcp: Awaited<ReturnType<typeof projectMcp>>) => Promise<void>,
|
|
27
|
+
): Promise<void> {
|
|
28
|
+
const fixture = await bootFixtureRuntime({ ttl: CANONICAL_TTL, config });
|
|
29
|
+
try {
|
|
30
|
+
const mcp = await projectMcp(capabilities, fixture.cwd);
|
|
31
|
+
try {
|
|
32
|
+
await body(mcp);
|
|
33
|
+
} finally {
|
|
34
|
+
await mcp.cleanup();
|
|
35
|
+
}
|
|
36
|
+
} finally {
|
|
37
|
+
await fixture.dispose();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const effectfulEvalCases: readonly EvalCase[] = [
|
|
42
|
+
{
|
|
43
|
+
id: "tool-graph-query-counts-components",
|
|
44
|
+
kind: "tool",
|
|
45
|
+
input:
|
|
46
|
+
"graph_query (the real PR6 verb, closing graph-query-deferred) counts exactly 4 ds:Component individuals in the canonical graph.",
|
|
47
|
+
async expect() {
|
|
48
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
49
|
+
const result = await mcp.callTool("graph_query", {
|
|
50
|
+
sparql: "SELECT (COUNT(*) AS ?c) WHERE { ?comp a ds:Component }",
|
|
51
|
+
});
|
|
52
|
+
assert.equal(result.ok, true);
|
|
53
|
+
// graph_query returns the serialized QueryResult ({ type, bindings, … }).
|
|
54
|
+
const data = result.data as { bindings: { c: string }[] };
|
|
55
|
+
assert.equal(Number(data.bindings[0]?.c), 4);
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "tool-graph-query-invalid-is-invalid-input",
|
|
61
|
+
kind: "tool",
|
|
62
|
+
input:
|
|
63
|
+
"graph_query with a syntax error returns INVALID_INPUT (exit-2 class), not a crash.",
|
|
64
|
+
async expect({ mcp }) {
|
|
65
|
+
const result = await mcp.callTool("graph_query", {
|
|
66
|
+
sparql: "NOT VALID SPARQL {{{",
|
|
67
|
+
});
|
|
68
|
+
assert.equal(result.ok, false);
|
|
69
|
+
assert.equal((result.error as { code: string }).code, "INVALID_INPUT");
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "tool-config-tier-is-plan-first",
|
|
74
|
+
kind: "tool",
|
|
75
|
+
input:
|
|
76
|
+
"config_tier without `confirm` returns a plan (planOnly) and writes nothing — the uniform plan-first mutation contract.",
|
|
77
|
+
async expect({ mcp }) {
|
|
78
|
+
const result = await mcp.callTool("config_tier", { path: "apps/lxd" });
|
|
79
|
+
assert.equal(result.ok, true);
|
|
80
|
+
const meta = result.meta as { planOnly?: boolean };
|
|
81
|
+
assert.equal(meta.planOnly, true);
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "tool-doctor-reports-check-tallies",
|
|
86
|
+
kind: "tool",
|
|
87
|
+
input:
|
|
88
|
+
"doctor returns a { checks, passed, failed, skipped } diagnostic report where the tallies sum to the checks.",
|
|
89
|
+
async expect({ mcp }) {
|
|
90
|
+
const result = await mcp.callTool("doctor");
|
|
91
|
+
assert.equal(result.ok, true);
|
|
92
|
+
const data = result.data as {
|
|
93
|
+
checks: unknown[];
|
|
94
|
+
passed: number;
|
|
95
|
+
failed: number;
|
|
96
|
+
skipped: number;
|
|
97
|
+
};
|
|
98
|
+
assert.ok(Array.isArray(data.checks), "expected a checks array");
|
|
99
|
+
assert.equal(
|
|
100
|
+
data.passed + data.failed + data.skipped,
|
|
101
|
+
data.checks.length,
|
|
102
|
+
);
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "tool-upgrade-is-plan-first",
|
|
107
|
+
kind: "tool",
|
|
108
|
+
input:
|
|
109
|
+
"upgrade without `confirm` returns a plan (planOnly) — the CLI self-upgrade never runs on a discovery call.",
|
|
110
|
+
async expect({ mcp }) {
|
|
111
|
+
const result = await mcp.callTool("upgrade");
|
|
112
|
+
assert.equal(result.ok, true);
|
|
113
|
+
const meta = result.meta as { planOnly?: boolean };
|
|
114
|
+
assert.equal(meta.planOnly, true);
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "tool-prompt-list-resolves-authored-prompts",
|
|
119
|
+
kind: "tool",
|
|
120
|
+
input:
|
|
121
|
+
"prompt_list (needsStore) resolves the authored ds:Prompt entities, each carrying its arguments.",
|
|
122
|
+
async expect() {
|
|
123
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
124
|
+
const result = await mcp.callTool("prompt_list");
|
|
125
|
+
const data = result.data as { prompts: { name: string }[] };
|
|
126
|
+
assert.ok(
|
|
127
|
+
data.prompts.some((p) => p.name === "build-a-block"),
|
|
128
|
+
"expected the build-a-block prompt",
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: "content-native-prompts-list-nonempty",
|
|
135
|
+
kind: "content",
|
|
136
|
+
input:
|
|
137
|
+
"the native MCP prompts/list is non-empty over a graph with ds:Prompt entities, each with a description.",
|
|
138
|
+
async expect() {
|
|
139
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
140
|
+
const prompts = await mcp.listPrompts();
|
|
141
|
+
assert.ok(prompts.length > 0, "expected native prompts");
|
|
142
|
+
for (const prompt of prompts) {
|
|
143
|
+
assert.ok(
|
|
144
|
+
prompt.description,
|
|
145
|
+
`prompt ${prompt.name} lacks a description`,
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: "content-native-prompt-get-fills-arguments",
|
|
153
|
+
kind: "content",
|
|
154
|
+
input:
|
|
155
|
+
"prompts/get materializes the body store-backed and substitutes {{arg}} placeholders.",
|
|
156
|
+
async expect() {
|
|
157
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
158
|
+
const result = await mcp.getPrompt("build-a-block", {
|
|
159
|
+
blockName: "Button",
|
|
160
|
+
});
|
|
161
|
+
const first = result.messages[0] as {
|
|
162
|
+
content: { text: string };
|
|
163
|
+
};
|
|
164
|
+
assert.match(first.content.text, /Button/);
|
|
165
|
+
assert.ok(!first.content.text.includes("{{blockName}}"));
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "tool-token-add-config-is-plan-first",
|
|
171
|
+
kind: "tool",
|
|
172
|
+
input:
|
|
173
|
+
"token_add-config (needsStore mutation) without `confirm` returns a plan naming tokens.config.mjs and writes nothing.",
|
|
174
|
+
async expect() {
|
|
175
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
176
|
+
const result = await mcp.callTool("token_add-config");
|
|
177
|
+
assert.equal(result.ok, true);
|
|
178
|
+
const meta = result.meta as { planOnly?: boolean };
|
|
179
|
+
assert.equal(meta.planOnly, true);
|
|
180
|
+
const data = result.data as { plan: string[] };
|
|
181
|
+
assert.match(data.plan.join("\n"), /tokens\.config\.mjs/);
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "tool-tier-lookup-lists-scoped-blocks",
|
|
187
|
+
kind: "tool",
|
|
188
|
+
input:
|
|
189
|
+
"tier_lookup {name:apps/lxd} resolves the tier and lists the blocks scoped to it (LXD Panel).",
|
|
190
|
+
async expect() {
|
|
191
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
192
|
+
const result = await mcp.callTool("tier_lookup", { name: "apps/lxd" });
|
|
193
|
+
assert.equal(result.ok, true);
|
|
194
|
+
const data = result.data as { name: string; blocks: string[] };
|
|
195
|
+
assert.equal(data.name, "apps/lxd");
|
|
196
|
+
assert.ok(data.blocks.includes("LXD Panel"));
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: "tool-block-sample-returns-exemplars",
|
|
202
|
+
kind: "tool",
|
|
203
|
+
input:
|
|
204
|
+
"block_sample (the no-argument PR7 sample) returns complete block exemplars for shape discovery.",
|
|
205
|
+
async expect() {
|
|
206
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
207
|
+
const result = await mcp.callTool("block_sample");
|
|
208
|
+
assert.equal(result.ok, true);
|
|
209
|
+
const data = result.data as { samples: unknown[]; totalCount: number };
|
|
210
|
+
assert.ok(data.samples.length > 0, "expected at least one exemplar");
|
|
211
|
+
assert.ok(data.totalCount >= data.samples.length);
|
|
212
|
+
});
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: "tool-modifier-sample-returns-exemplars",
|
|
217
|
+
kind: "tool",
|
|
218
|
+
input:
|
|
219
|
+
"modifier_sample (the no-argument PR7 sample) returns complete modifier exemplars for shape discovery.",
|
|
220
|
+
async expect() {
|
|
221
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
222
|
+
const result = await mcp.callTool("modifier_sample");
|
|
223
|
+
assert.equal(result.ok, true);
|
|
224
|
+
const data = result.data as { samples: unknown[]; totalCount: number };
|
|
225
|
+
assert.ok(data.samples.length > 0, "expected at least one exemplar");
|
|
226
|
+
assert.ok(data.totalCount >= data.samples.length);
|
|
227
|
+
});
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: "tool-token-sample-returns-exemplars",
|
|
232
|
+
kind: "tool",
|
|
233
|
+
input:
|
|
234
|
+
"token_sample (the no-argument PR7 sample) returns complete token exemplars for shape discovery.",
|
|
235
|
+
async expect() {
|
|
236
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
237
|
+
const result = await mcp.callTool("token_sample");
|
|
238
|
+
assert.equal(result.ok, true);
|
|
239
|
+
const data = result.data as { samples: unknown[]; totalCount: number };
|
|
240
|
+
assert.ok(data.samples.length > 0, "expected at least one exemplar");
|
|
241
|
+
assert.ok(data.totalCount >= data.samples.length);
|
|
242
|
+
});
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
];
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-noun eval seed cases (commit 4) — extends `cases/stable.ts` once PR3's
|
|
3
|
+
* read nouns are live. Representative, NOT exhaustive (PR7 populates the full
|
|
4
|
+
* MCP eval matrix); each case builds its OWN fixture via `bootFixtureRuntime`
|
|
5
|
+
* so it stays independent of `eval.test.ts`'s shared env.
|
|
6
|
+
*
|
|
7
|
+
* Anchor VALUES (Button, `importance`->`primary`, `code/function/purity`, 4
|
|
8
|
+
* components) come from the ported canonical fixture graph
|
|
9
|
+
* (`testing/fixtures/graph/canonical.ts`), which THIS package controls — not
|
|
10
|
+
* from PR3's noun/verb/tool SET, which is read from the live surface
|
|
11
|
+
* elsewhere (`liveReadSurface.ts`) per R2.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import assert from "node:assert/strict";
|
|
15
|
+
import { capabilities } from "../../../capabilities/index.js";
|
|
16
|
+
import {
|
|
17
|
+
ALL_VISIBLE_CONFIG,
|
|
18
|
+
CANONICAL_CONFIG,
|
|
19
|
+
CANONICAL_TTL,
|
|
20
|
+
} from "../../fixtures/graph/canonical.js";
|
|
21
|
+
import { bootFixtureRuntime } from "../../helpers/fixtureGraph.js";
|
|
22
|
+
import { projectMcp } from "../../helpers/projectMcp.js";
|
|
23
|
+
import type { EvalCase } from "../harness.js";
|
|
24
|
+
|
|
25
|
+
/** Run one case's body against a fresh canonical fixture, always disposing. */
|
|
26
|
+
async function withCanonicalFixture(
|
|
27
|
+
config: typeof CANONICAL_CONFIG | typeof ALL_VISIBLE_CONFIG,
|
|
28
|
+
body: (mcp: Awaited<ReturnType<typeof projectMcp>>) => Promise<void>,
|
|
29
|
+
): Promise<void> {
|
|
30
|
+
const fixture = await bootFixtureRuntime({ ttl: CANONICAL_TTL, config });
|
|
31
|
+
try {
|
|
32
|
+
const mcp = await projectMcp(capabilities, fixture.cwd);
|
|
33
|
+
try {
|
|
34
|
+
await body(mcp);
|
|
35
|
+
} finally {
|
|
36
|
+
await mcp.cleanup();
|
|
37
|
+
}
|
|
38
|
+
} finally {
|
|
39
|
+
await fixture.dispose();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const readNounEvalCases: readonly EvalCase[] = [
|
|
44
|
+
{
|
|
45
|
+
id: "tool-block-lookup-button-has-modifier-families",
|
|
46
|
+
kind: "tool",
|
|
47
|
+
input:
|
|
48
|
+
"block_lookup {name:[Button]} resolves name===Button and carries modifierFamilies.",
|
|
49
|
+
async expect() {
|
|
50
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
51
|
+
const result = await mcp.callTool("block_lookup", { name: ["Button"] });
|
|
52
|
+
assert.equal(result.ok, true);
|
|
53
|
+
const entity = (result.data as { results: Record<string, unknown>[] })
|
|
54
|
+
.results[0];
|
|
55
|
+
assert.equal(entity?.name, "Button");
|
|
56
|
+
assert.ok(
|
|
57
|
+
Array.isArray(entity?.modifierFamilies) &&
|
|
58
|
+
(entity.modifierFamilies as unknown[]).length > 0,
|
|
59
|
+
"expected a non-empty modifierFamilies array",
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "tool-standard-lookup-has-dos-and-donts",
|
|
66
|
+
kind: "tool",
|
|
67
|
+
input:
|
|
68
|
+
"standard_lookup {name:[react/component/props], detail:detailed} has non-empty dos and donts.",
|
|
69
|
+
async expect() {
|
|
70
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
71
|
+
const result = await mcp.callTool("standard_lookup", {
|
|
72
|
+
name: ["react/component/props"],
|
|
73
|
+
detail: "detailed",
|
|
74
|
+
});
|
|
75
|
+
assert.equal(result.ok, true);
|
|
76
|
+
const entity = (result.data as { results: Record<string, unknown>[] })
|
|
77
|
+
.results[0];
|
|
78
|
+
assert.ok(
|
|
79
|
+
(entity?.dos as unknown[])?.length > 0,
|
|
80
|
+
"expected non-empty dos",
|
|
81
|
+
);
|
|
82
|
+
assert.ok(
|
|
83
|
+
(entity?.donts as unknown[])?.length > 0,
|
|
84
|
+
"expected non-empty donts",
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "content-canonical-graph-has-4-components",
|
|
91
|
+
kind: "content",
|
|
92
|
+
input:
|
|
93
|
+
"the canonical fixture graph carries exactly 4 ds:Component individuals, including Button and Beta Widget.",
|
|
94
|
+
async expect() {
|
|
95
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
96
|
+
const result = await mcp.callTool("block_list", { allTiers: true });
|
|
97
|
+
const names = (result.data as { name: string }[])
|
|
98
|
+
.map((r) => r.name)
|
|
99
|
+
.sort();
|
|
100
|
+
assert.deepEqual(names, [
|
|
101
|
+
"Beta Widget",
|
|
102
|
+
"Button",
|
|
103
|
+
"LXD Panel",
|
|
104
|
+
"Modal",
|
|
105
|
+
]);
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "content-code-function-purity-description-mentions-pure",
|
|
111
|
+
kind: "content",
|
|
112
|
+
input: "the code/function/purity standard's description contains 'pure'.",
|
|
113
|
+
async expect() {
|
|
114
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
115
|
+
const result = await mcp.callTool("standard_lookup", {
|
|
116
|
+
name: ["code/function/purity"],
|
|
117
|
+
});
|
|
118
|
+
const entity = (result.data as { results: Record<string, unknown>[] })
|
|
119
|
+
.results[0];
|
|
120
|
+
assert.match(String(entity?.description ?? ""), /pure/i);
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "content-importance-family-includes-primary",
|
|
126
|
+
kind: "content",
|
|
127
|
+
input: "the modifier family `importance` includes the value `primary`.",
|
|
128
|
+
async expect() {
|
|
129
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
130
|
+
const result = await mcp.callTool("modifier_lookup", {
|
|
131
|
+
name: ["importance"],
|
|
132
|
+
});
|
|
133
|
+
const entity = (result.data as { results: Record<string, unknown>[] })
|
|
134
|
+
.results[0];
|
|
135
|
+
const values = (entity?.values as { name: string }[] | undefined)?.map(
|
|
136
|
+
(v) => v.name,
|
|
137
|
+
);
|
|
138
|
+
assert.ok(
|
|
139
|
+
values?.includes("primary"),
|
|
140
|
+
`expected "primary" in ${values}`,
|
|
141
|
+
);
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "content-standard-list-length-equals-category-count-sum",
|
|
147
|
+
kind: "content",
|
|
148
|
+
input:
|
|
149
|
+
"standard_list length equals the sum of standard_categories counts (the cross-surface count-parity invariant).",
|
|
150
|
+
async expect() {
|
|
151
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
152
|
+
const list = await mcp.callTool("standard_list");
|
|
153
|
+
const categories = await mcp.callTool("standard_categories");
|
|
154
|
+
const listLength = (list.data as unknown[]).length;
|
|
155
|
+
const categorySum = (categories.data as { count: string }[]).reduce(
|
|
156
|
+
(sum, row) => sum + Number(row.count),
|
|
157
|
+
0,
|
|
158
|
+
);
|
|
159
|
+
assert.ok(
|
|
160
|
+
listLength > 0,
|
|
161
|
+
"standard_list must be non-empty for the count-parity invariant to be meaningful",
|
|
162
|
+
);
|
|
163
|
+
assert.equal(listLength, categorySum);
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: "content-normal-channel-drops-beta-only-block",
|
|
169
|
+
kind: "content",
|
|
170
|
+
input:
|
|
171
|
+
"the normal channel (CANONICAL_CONFIG) excludes the beta-only block; the prerelease channel (ALL_VISIBLE_CONFIG) includes it.",
|
|
172
|
+
async expect() {
|
|
173
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
174
|
+
const normal = await mcp.callTool("block_list", { allTiers: true });
|
|
175
|
+
const normalNames = (normal.data as { name: string }[]).map(
|
|
176
|
+
(r) => r.name,
|
|
177
|
+
);
|
|
178
|
+
assert.ok(!normalNames.includes("Beta Widget"));
|
|
179
|
+
});
|
|
180
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
181
|
+
const prerelease = await mcp.callTool("block_list", { allTiers: true });
|
|
182
|
+
const prereleaseNames = (prerelease.data as { name: string }[]).map(
|
|
183
|
+
(r) => r.name,
|
|
184
|
+
);
|
|
185
|
+
assert.ok(prereleaseNames.includes("Beta Widget"));
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: "disclosure-block-lookup-detailed-adds-anatomy",
|
|
191
|
+
kind: "disclosure",
|
|
192
|
+
input:
|
|
193
|
+
"block_lookup {name:[Button], detail:summary} omits anatomyDsl; {detail:detailed} includes it.",
|
|
194
|
+
async expect() {
|
|
195
|
+
await withCanonicalFixture(ALL_VISIBLE_CONFIG, async (mcp) => {
|
|
196
|
+
const summary = await mcp.callTool("block_lookup", {
|
|
197
|
+
name: ["Button"],
|
|
198
|
+
detail: "summary",
|
|
199
|
+
});
|
|
200
|
+
const detailed = await mcp.callTool("block_lookup", {
|
|
201
|
+
name: ["Button"],
|
|
202
|
+
detail: "detailed",
|
|
203
|
+
});
|
|
204
|
+
const summaryEntity = (
|
|
205
|
+
summary.data as { results: Record<string, unknown>[] }
|
|
206
|
+
).results[0];
|
|
207
|
+
const detailedEntity = (
|
|
208
|
+
detailed.data as { results: Record<string, unknown>[] }
|
|
209
|
+
).results[0];
|
|
210
|
+
assert.equal(summaryEntity?.anatomyDsl, undefined);
|
|
211
|
+
assert.equal(
|
|
212
|
+
detailedEntity?.anatomyDsl,
|
|
213
|
+
"root: button; children: label, icon",
|
|
214
|
+
);
|
|
215
|
+
});
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: "prompt-block-question-maps-to-block-lookup",
|
|
220
|
+
kind: "prompt",
|
|
221
|
+
input:
|
|
222
|
+
'"What is the anatomy of the Button component?" should map to `block_lookup`.',
|
|
223
|
+
async expect() {
|
|
224
|
+
await withCanonicalFixture(CANONICAL_CONFIG, async (mcp) => {
|
|
225
|
+
const tools = await mcp.listTools();
|
|
226
|
+
const blockLookup = tools.find((t) => t.name === "block_lookup");
|
|
227
|
+
assert.ok(blockLookup, "expected a block_lookup tool in the catalog");
|
|
228
|
+
assert.match(String(blockLookup?.description ?? ""), /block/i);
|
|
229
|
+
});
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
];
|