dsh-plugin-guide 0.3.32 → 0.3.35
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-es.md +7 -1
- package/README-hi.md +7 -1
- package/README-pt.md +7 -1
- package/README-zh.md +7 -1
- package/README.md +358 -352
- package/SKILL.md +4 -1
- package/data/facts.json +54 -0
- package/data/seams/index.json +397 -0
- package/dist/dsh-plugin-dev.js +196 -1
- package/package.json +12 -5
- package/references/cli-positioning-decision.md +78 -0
- package/scripts/check-docs-drift-detail.mjs +145 -0
- package/scripts/check-facts.mjs +162 -0
- package/scripts/verify-artifacts.mjs +37 -0
|
@@ -32,6 +32,43 @@ check(existsSync(join(root, 'bin', 'dsh-plugin-dev.js')), 'bin/dsh-plugin-dev.js
|
|
|
32
32
|
check(existsSync(join(root, 'templates', 'ts')), 'templates/ts exists')
|
|
33
33
|
check(existsSync(join(root, 'templates', 'js')), 'templates/js exists')
|
|
34
34
|
|
|
35
|
+
// Files a subcommand reads at RUNTIME but that nothing else asserts are shipped.
|
|
36
|
+
// `data/seams/index.json` was missing from package.json `files[]` while the
|
|
37
|
+
// `seams` command already depended on it: the command worked from the source
|
|
38
|
+
// tree and would have failed for every installed user with "seam index not
|
|
39
|
+
// found". Reading the file in-repo cannot catch that, so assert the manifest
|
|
40
|
+
// declares it.
|
|
41
|
+
{
|
|
42
|
+
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'))
|
|
43
|
+
const declared = (p) => pkg.files.some((f) => f === p || f.startsWith(`${p}/`) || f === `${p}`)
|
|
44
|
+
const runtimeInputs = [
|
|
45
|
+
['data', 'data/seams/index.json read by `seams`'],
|
|
46
|
+
['data', 'data/facts.json read by check-facts'],
|
|
47
|
+
['SKILL.md', 'SKILL.md registered as the agent skill'],
|
|
48
|
+
]
|
|
49
|
+
for (const [entry, why] of runtimeInputs) {
|
|
50
|
+
check(declared(entry), `package.json files[] ships ${why}`)
|
|
51
|
+
}
|
|
52
|
+
const seamIndex = JSON.parse(readFileSync(join(root, 'data', 'seams', 'index.json'), 'utf8'))
|
|
53
|
+
check(Array.isArray(seamIndex.seams) && seamIndex.seams.length > 0, 'seam index parses and is non-empty')
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// The `seams` command must resolve its data through the BUILT bundle, since that
|
|
57
|
+
// is what ships; a source-tree-only path resolution works in tests and fails in
|
|
58
|
+
// the published artifact.
|
|
59
|
+
{
|
|
60
|
+
const seams = runNode(['dist/dsh-plugin-dev.js', 'seams', 'L3', '--json'], { stdio: ['ignore', 'pipe', 'pipe'] })
|
|
61
|
+
let parsed = null
|
|
62
|
+
try { parsed = JSON.parse(seams.stdout) } catch { parsed = null }
|
|
63
|
+
check(seams.status === 0 && parsed?.state === 'found', `bundled \`seams L3\` resolves its data (exit ${seams.status})`)
|
|
64
|
+
|
|
65
|
+
// The third state must survive bundling: an unmatched query reports unknown.
|
|
66
|
+
const unknown = runNode(['dist/dsh-plugin-dev.js', 'seams', 'zzz-nothing', '--json'], { stdio: ['ignore', 'pipe', 'pipe'] })
|
|
67
|
+
let u = null
|
|
68
|
+
try { u = JSON.parse(unknown.stdout) } catch { u = null }
|
|
69
|
+
check(unknown.status === 3 && u?.state === 'unknown', `bundled \`seams\` reports unknown with exit 3 (exit ${unknown.status})`)
|
|
70
|
+
}
|
|
71
|
+
|
|
35
72
|
// 2. Version + dogfood self-check.
|
|
36
73
|
const version = runNode(['dist/dsh-plugin-dev.js', '--version'])
|
|
37
74
|
check(version.status === 0 && /\d+\.\d+\.\d+/.test(version.stdout.trim()), `--version prints a semver (${version.stdout.trim()})`)
|