dsh-standards 0.0.2 → 1.0.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/40-checker/.github/workflows/plugin-verify.yml +70 -0
- package/40-checker/README.md +251 -0
- package/40-checker/bin/dsh-levels.mjs +15 -0
- package/40-checker/bin/dsh-plugin-verify.mjs +8 -0
- package/40-checker/fixtures/bad/index.mjs +12 -0
- package/40-checker/fixtures/bad/package.json +15 -0
- package/40-checker/fixtures/bad-manifest/index.js +1 -0
- package/40-checker/fixtures/bad-manifest/package.json +5 -0
- package/40-checker/fixtures/bundle/cordis.patch.yml +3 -0
- package/40-checker/fixtures/bundle/package.json +15 -0
- package/40-checker/fixtures/bundle/server.mjs +7 -0
- package/40-checker/fixtures/bundle-v0/cordis.patch.yml +3 -0
- package/40-checker/fixtures/bundle-v0/package.json +21 -0
- package/40-checker/fixtures/bundle-v0/server.mjs +7 -0
- package/40-checker/fixtures/client-missing/client.js +1 -0
- package/40-checker/fixtures/client-missing/index.js +1 -0
- package/40-checker/fixtures/client-missing/package.json +6 -0
- package/40-checker/fixtures/flow-config/index.js +9 -0
- package/40-checker/fixtures/flow-config/package.json +10 -0
- package/40-checker/fixtures/fs-write/index.mjs +7 -0
- package/40-checker/fixtures/fs-write/package.json +10 -0
- package/40-checker/fixtures/good/index.mjs +10 -0
- package/40-checker/fixtures/good/package.json +19 -0
- package/40-checker/fixtures/hang/index.mjs +5 -0
- package/40-checker/fixtures/hang/package.json +10 -0
- package/40-checker/fixtures/known-answer/expected.json +18 -0
- package/40-checker/fixtures/market-index-real.json +18 -0
- package/40-checker/fixtures/market-index.json +18 -0
- package/40-checker/fixtures/negative/bad-entry/package.json +1 -0
- package/40-checker/fixtures/negative/no-entry/package.json +1 -0
- package/40-checker/fixtures/negative/no-patch/package.json +1 -0
- package/40-checker/fixtures/negative/root-missing/cordis.patch.yml +2 -0
- package/40-checker/fixtures/negative/root-missing/package.json +1 -0
- package/40-checker/fixtures/negative/workspace/package.json +1 -0
- package/40-checker/package.json +22 -0
- package/40-checker/results/boost/REPORT.md +304 -0
- package/40-checker/results/boost/lev12458.json +1747 -0
- package/40-checker/results/client/README.md +16 -0
- package/40-checker/results/entry/18/DDDMUC__dsh-free-search.json +381 -0
- package/40-checker/results/entry/18/DDDMUC__dsh-free-search.runtime.json +34 -0
- package/40-checker/results/entry/18/Ebony-Vinyl__dsh-our-free-model.json +361 -0
- package/40-checker/results/entry/18/Ebony-Vinyl__dsh-our-free-model.runtime.json +34 -0
- package/40-checker/results/entry/18/README.md +24 -0
- package/40-checker/results/entry/18/RUNTIME.md +18 -0
- package/40-checker/results/entry/18/SeaOf0__dsh-redteam-model.json +391 -0
- package/40-checker/results/entry/18/YuJunZhiXue__dsh-purge.json +432 -0
- package/40-checker/results/entry/18/ci-diet.json +365 -0
- package/40-checker/results/entry/18/ci-diet.runtime-attempt.json +38 -0
- package/40-checker/results/entry/18/daily-log.json +357 -0
- package/40-checker/results/entry/18/daily-log.runtime.json +519 -0
- package/40-checker/results/entry/18/fullbase/ATTRIBUTION.md +29 -0
- package/40-checker/results/entry/18/fullbase/DDDMUC__dsh-free-search.json +99 -0
- package/40-checker/results/entry/18/fullbase/Ebony-Vinyl__dsh-our-free-model.json +95 -0
- package/40-checker/results/entry/18/fullbase/REPORT.md +261 -0
- package/40-checker/results/entry/18/fullbase/SeaOf0__dsh-redteam-model.json +144 -0
- package/40-checker/results/entry/18/fullbase/YuJunZhiXue__dsh-purge.json +106 -0
- package/40-checker/results/entry/18/fullbase/ci-diet.json +99 -0
- package/40-checker/results/entry/18/fullbase/daily-log.json +94 -0
- package/40-checker/results/entry/18/fullbase/howmp__dsh-pentest.json +104 -0
- package/40-checker/results/entry/18/fullbase/kingcharleslzy-ai__dsh-purge.json +143 -0
- package/40-checker/results/entry/18/fullbase/liguobao__ds-harness-remote.json +134 -0
- package/40-checker/results/entry/18/fullbase/mmparko__dsh-purge.json +138 -0
- package/40-checker/results/entry/18/fullbase/project-memory.json +108 -0
- package/40-checker/results/entry/18/fullbase/qiushi.json +94 -0
- package/40-checker/results/entry/18/fullbase/shaobeichen__dsh-pocket.json +94 -0
- package/40-checker/results/entry/18/fullbase/status-rotator.json +94 -0
- package/40-checker/results/entry/18/fullbase/summary.json +297 -0
- package/40-checker/results/entry/18/fullbase/telemetry.json +94 -0
- package/40-checker/results/entry/18/fullbase/ui-auth.json +94 -0
- package/40-checker/results/entry/18/fullbase/verification.json +94 -0
- package/40-checker/results/entry/18/fullbase/ysr666__dsh-vision-router.json +106 -0
- package/40-checker/results/entry/18/howmp__dsh-pentest.json +361 -0
- package/40-checker/results/entry/18/kingcharleslzy-ai__dsh-purge.json +411 -0
- package/40-checker/results/entry/18/liguobao__ds-harness-remote.json +379 -0
- package/40-checker/results/entry/18/mmparko__dsh-purge.json +441 -0
- package/40-checker/results/entry/18/project-memory.json +361 -0
- package/40-checker/results/entry/18/project-memory.runtime.json +519 -0
- package/40-checker/results/entry/18/qiushi.json +353 -0
- package/40-checker/results/entry/18/qiushi.runtime.json +519 -0
- package/40-checker/results/entry/18/realweb/REPORT.md +73 -0
- package/40-checker/results/entry/18/realweb/SeaOf0__dsh-redteam-model.json +104 -0
- package/40-checker/results/entry/18/realweb/YuJunZhiXue__dsh-purge.json +64 -0
- package/40-checker/results/entry/18/realweb/howmp__dsh-pentest.json +65 -0
- package/40-checker/results/entry/18/realweb/kingcharleslzy-ai__dsh-purge.json +75 -0
- package/40-checker/results/entry/18/realweb/mmparko__dsh-purge.json +70 -0
- package/40-checker/results/entry/18/realweb/shaobeichen__dsh-pocket.json +56 -0
- package/40-checker/results/entry/18/realweb/summary.json +196 -0
- package/40-checker/results/entry/18/realweb/ui-auth.json +56 -0
- package/40-checker/results/entry/18/realweb/ysr666__dsh-vision-router.json +61 -0
- package/40-checker/results/entry/18/richbase/REPORT.md +70 -0
- package/40-checker/results/entry/18/richbase/SeaOf0__dsh-redteam-model.json +61 -0
- package/40-checker/results/entry/18/richbase/SeaOf0__dsh-redteam-model.log +38 -0
- package/40-checker/results/entry/18/shaobeichen__dsh-pocket.json +363 -0
- package/40-checker/results/entry/18/status-rotator.json +362 -0
- package/40-checker/results/entry/18/status-rotator.runtime.json +519 -0
- package/40-checker/results/entry/18/summary.json +266 -0
- package/40-checker/results/entry/18/targetonly/DDDMUC__dsh-free-search.json +34 -0
- package/40-checker/results/entry/18/targetonly/Ebony-Vinyl__dsh-our-free-model.json +34 -0
- package/40-checker/results/entry/18/targetonly/SeaOf0__dsh-redteam-model.json +84 -0
- package/40-checker/results/entry/18/targetonly/YuJunZhiXue__dsh-purge.json +52 -0
- package/40-checker/results/entry/18/targetonly/ci-diet.json +34 -0
- package/40-checker/results/entry/18/targetonly/daily-log.json +34 -0
- package/40-checker/results/entry/18/targetonly/howmp__dsh-pentest.json +46 -0
- package/40-checker/results/entry/18/targetonly/kingcharleslzy-ai__dsh-purge.json +61 -0
- package/40-checker/results/entry/18/targetonly/liguobao__ds-harness-remote.json +39 -0
- package/40-checker/results/entry/18/targetonly/mmparko__dsh-purge.json +57 -0
- package/40-checker/results/entry/18/targetonly/project-memory.json +34 -0
- package/40-checker/results/entry/18/targetonly/qiushi.json +34 -0
- package/40-checker/results/entry/18/targetonly/shaobeichen__dsh-pocket.json +34 -0
- package/40-checker/results/entry/18/targetonly/status-rotator.json +34 -0
- package/40-checker/results/entry/18/targetonly/summary.json +133 -0
- package/40-checker/results/entry/18/targetonly/telemetry.json +34 -0
- package/40-checker/results/entry/18/targetonly/ui-auth.json +34 -0
- package/40-checker/results/entry/18/targetonly/verification.json +34 -0
- package/40-checker/results/entry/18/targetonly/ysr666__dsh-vision-router.json +43 -0
- package/40-checker/results/entry/18/telemetry.json +349 -0
- package/40-checker/results/entry/18/ui-auth.json +369 -0
- package/40-checker/results/entry/18/verification.json +358 -0
- package/40-checker/results/entry/18/ysr666__dsh-vision-router.json +409 -0
- package/40-checker/results/fixtures/bad.json +347 -0
- package/40-checker/results/fixtures/bundle.json +378 -0
- package/40-checker/results/fixtures/good-listing.json +382 -0
- package/40-checker/results/fixtures/good-static.json +322 -0
- package/40-checker/results/fixtures/good.json +375 -0
- package/40-checker/results/fixtures/good.sarif +274 -0
- package/40-checker/results/flow/README.md +19 -0
- package/40-checker/results/flow/j3-j7-fixture.json +51 -0
- package/40-checker/results/flow/j5-j8-client-missing.json +45 -0
- package/40-checker/results/flow/j5-j8-good.json +45 -0
- package/40-checker/results/flow/journey-fixture-bundle.json +90 -0
- package/40-checker/results/flow/journey-fixture-j1-j2-j4-j6.json +107 -0
- package/40-checker/results/flow/real/DDDMUC__dsh-free-search.json +297 -0
- package/40-checker/results/flow/real/REPORT.md +335 -0
- package/40-checker/results/flow/real/YuJunZhiXue__dsh-purge.json +317 -0
- package/40-checker/results/flow/real/ci-diet.json +351 -0
- package/40-checker/results/flow/real/daily-log.json +286 -0
- package/40-checker/results/flow/real/index.json +325 -0
- package/40-checker/results/flow/real/project-memory.json +290 -0
- package/40-checker/results/flow/real/qiushi.json +277 -0
- package/40-checker/results/flow/real/status-rotator.json +275 -0
- package/40-checker/results/flow/real/telemetry.json +178 -0
- package/40-checker/results/flow/real/ui-auth.json +288 -0
- package/40-checker/results/flow/real/verification.json +265 -0
- package/40-checker/results/governance/co-maintainer-packet.md +85 -0
- package/40-checker/results/l1/ci-diet.json +406 -0
- package/40-checker/results/l1/npm-dsh-telemetry-redactor-0.1.0.json +390 -0
- package/40-checker/results/l1/npm-dsh-verification-receipt-0.1.0.json +406 -0
- package/40-checker/results/l1/npm-qiushi-dsh-evidence-audit-0.1.0.json +394 -0
- package/40-checker/results/l1/npm-zzerx-dsh-plugin-daily-log-0.4.3.json +405 -0
- package/40-checker/results/l1/project-memory.json +402 -0
- package/40-checker/results/l1/source-DDDMUC__dsh-free-search.json +422 -0
- package/40-checker/results/l1/source-Ebony-Vinyl__dsh-our-free-model.json +421 -0
- package/40-checker/results/l1/source-SeaOf0__dsh-redteam-model.json +432 -0
- package/40-checker/results/l1/source-YuJunZhiXue__dsh-purge.json +473 -0
- package/40-checker/results/l1/source-howmp__dsh-pentest.json +402 -0
- package/40-checker/results/l1/source-kingcharleslzy-ai__dsh-purge.json +452 -0
- package/40-checker/results/l1/source-liguobao__ds-harness-remote.json +420 -0
- package/40-checker/results/l1/source-mmparko__dsh-purge.json +482 -0
- package/40-checker/results/l1/source-shaobeichen__dsh-pocket.json +404 -0
- package/40-checker/results/l1/source-ysr666__dsh-vision-router.json +384 -0
- package/40-checker/results/l1/status-rotator.json +403 -0
- package/40-checker/results/l1/ui-auth.json +429 -0
- package/40-checker/results/l1/ysr666__dsh-vision-router.published.json +384 -0
- package/40-checker/results/lev3/REPORT.md +342 -0
- package/40-checker/results/lev3/lev3.json +4835 -0
- package/40-checker/results/lev6/REPORT.md +460 -0
- package/40-checker/results/lev6/capture-sample.json +241 -0
- package/40-checker/results/lev6/capture.jsonl +4 -0
- package/40-checker/results/lev6/lev6.json +245 -0
- package/40-checker/results/lev6/replication-r1.json +245 -0
- package/40-checker/results/levels/README.md +16 -0
- package/40-checker/results/levels/dsh-plugin-doctor.json +141 -0
- package/40-checker/results/levels/dsh-plugin-guide.json +136 -0
- package/40-checker/results/m1/dsh-ci-diet-0.5.2.json +352 -0
- package/40-checker/results/m1/dsh-status-rotator-0.38.0.json +349 -0
- package/40-checker/results/m1/dsh-telemetry-redactor-0.1.0.json +336 -0
- package/40-checker/results/m1/dsh-ui-auth-0.7.1.json +356 -0
- package/40-checker/results/m1/dsh-verification-receipt-0.1.0.json +344 -0
- package/40-checker/results/m1/index-level.json +13 -0
- package/40-checker/results/m1/levels.json +72100 -0
- package/40-checker/results/m1/qiushi-dsh-evidence-audit-0.1.0.json +339 -0
- package/40-checker/results/m1/yolk_vat-y-dsh-project-memory-0.6.7.json +348 -0
- package/40-checker/results/m1/zzerx-dsh-plugin-daily-log-0.4.3.json +344 -0
- package/40-checker/results/m2/dsh-ci-diet.json +421 -0
- package/40-checker/results/m2/dsh-ci-diet.unshare-landlock.json +424 -0
- package/40-checker/results/m2/dsh-ci-diet.unshare.json +423 -0
- package/40-checker/results/m2/fixture-bundle.image.json +404 -0
- package/40-checker/results/m2/fixture-bundle.json +392 -0
- package/40-checker/results/m2/fixture-bundle.landlock.json +396 -0
- package/40-checker/results/m2/fixture-bundle.unshare.json +395 -0
- package/40-checker/results/m2/fs-write.json +338 -0
- package/40-checker/results/m2/hang.json +31 -0
- package/40-checker/results/m2/hang.unshare-landlock.json +34 -0
- package/40-checker/results/m2/hang.unshare.json +33 -0
- package/40-checker/results/m2/project-memory.json +417 -0
- package/40-checker/results/m2/status-rotator.json +418 -0
- package/40-checker/results/m2/ui-auth.json +444 -0
- package/40-checker/results/negative/bad-entry.json +345 -0
- package/40-checker/results/negative/no-entry.json +345 -0
- package/40-checker/results/negative/no-patch.json +344 -0
- package/40-checker/results/negative/root-missing.json +344 -0
- package/40-checker/results/negative/root-missing.runtime.json +30 -0
- package/40-checker/results/negative/summary.json +51 -0
- package/40-checker/results/negative/workspace.json +344 -0
- package/40-checker/results/patched/Ebony-Vinyl__dsh-our-free-model.json +334 -0
- package/40-checker/results/patched/Ebony-Vinyl__dsh-our-free-model.overlay.json +335 -0
- package/40-checker/results/patched/SeaOf0__dsh-redteam-model.json +315 -0
- package/40-checker/results/patched/SeaOf0__dsh-redteam-model.overlay.json +316 -0
- package/40-checker/results/patched/mmparko__dsh-purge.json +357 -0
- package/40-checker/results/patched/mmparko__dsh-purge.overlay.json +358 -0
- package/40-checker/results/patched/shaobeichen__dsh-pocket.json +315 -0
- package/40-checker/results/patched/shaobeichen__dsh-pocket.overlay.json +316 -0
- package/40-checker/results/real/DDDMUC__dsh-free-search.json +344 -0
- package/40-checker/results/real/Ebony-Vinyl__dsh-our-free-model.json +343 -0
- package/40-checker/results/real/SeaOf0__dsh-redteam-model.json +354 -0
- package/40-checker/results/real/YuJunZhiXue__dsh-purge.json +395 -0
- package/40-checker/results/real/howmp__dsh-pentest.json +324 -0
- package/40-checker/results/real/kingcharleslzy-ai__dsh-purge.json +374 -0
- package/40-checker/results/real/liguobao__ds-harness-remote.json +342 -0
- package/40-checker/results/real/mmparko__dsh-purge.json +404 -0
- package/40-checker/results/real/shaobeichen__dsh-pocket.json +326 -0
- package/40-checker/results/real/ysr666__dsh-vision-router.json +372 -0
- package/40-checker/results/real/ysr666__dsh-vision-router.listing.json +378 -0
- package/40-checker/results/round-robin/compare.json +52 -0
- package/40-checker/results/round-robin/runner-a.json +9 -0
- package/40-checker/results/round-robin/runner-b.json +9 -0
- package/40-checker/results/sample20/123dbl__dsh-side-session.json +344 -0
- package/40-checker/results/sample20/173787247__dsh-wsl-dns.json +360 -0
- package/40-checker/results/sample20/863683348__dsh-insight.json +375 -0
- package/40-checker/results/sample20/Ansellwan__DSH-Custom-Wallpaper.json +344 -0
- package/40-checker/results/sample20/Jamailar__beav-deepseek-harness.json +341 -0
- package/40-checker/results/sample20/ManoloRemiddi__DSH-Metafolder-Plugin.json +344 -0
- package/40-checker/results/sample20/NEAZ71eve__dsh-tool-github.json +384 -0
- package/40-checker/results/sample20/README.md +3 -0
- package/40-checker/results/sample20/RINGOLINK__dsh-desktop-shell.json +352 -0
- package/40-checker/results/sample20/Zxznb666__dsh-qoder-cn-subagent.json +349 -0
- package/40-checker/results/sample20/agent-mobile__dsh-mobile-gateway.json +353 -0
- package/40-checker/results/sample20/fangqiing__dsh-knowledge-lite.json +359 -0
- package/40-checker/results/sample20/fzy0517__deepseek-harness-session-cleaner.json +344 -0
- package/40-checker/results/sample20/gjy1992__dsh-diagram.json +350 -0
- package/40-checker/results/sample20/mrme000m__dsh-prime-orchestrator.json +414 -0
- package/40-checker/results/sample20/redstonedust__dsh-solidworks-copilot.json +362 -0
- package/40-checker/results/sample20/summary.json +234 -0
- package/40-checker/results/sample20/w2112515__dsh-remote-host.json +344 -0
- package/40-checker/results/sample20/wkfedor__deepseek-harness-voice-input.json +350 -0
- package/40-checker/results/sample20/xfgil__dsh-hot-reloader.json +344 -0
- package/40-checker/results/sample20/yizhiyizhi0128__dsh-peak-scheduler.json +360 -0
- package/40-checker/results/sample20-ci/123dbl__dsh-side-session.json +344 -0
- package/40-checker/results/sample20-ci/173787247__dsh-wsl-dns.json +360 -0
- package/40-checker/results/sample20-ci/863683348__dsh-insight.json +375 -0
- package/40-checker/results/sample20-ci/Ansellwan__DSH-Custom-Wallpaper.json +344 -0
- package/40-checker/results/sample20-ci/Jamailar__beav-deepseek-harness.json +367 -0
- package/40-checker/results/sample20-ci/ManoloRemiddi__DSH-Metafolder-Plugin.json +344 -0
- package/40-checker/results/sample20-ci/NEAZ71eve__dsh-tool-github.json +392 -0
- package/40-checker/results/sample20-ci/README.md +5 -0
- package/40-checker/results/sample20-ci/RINGOLINK__dsh-desktop-shell.json +361 -0
- package/40-checker/results/sample20-ci/Zxznb666__dsh-qoder-cn-subagent.json +349 -0
- package/40-checker/results/sample20-ci/agent-mobile__dsh-mobile-gateway.json +384 -0
- package/40-checker/results/sample20-ci/fangqiing__dsh-knowledge-lite.json +360 -0
- package/40-checker/results/sample20-ci/fzy0517__deepseek-harness-session-cleaner.json +354 -0
- package/40-checker/results/sample20-ci/gjy1992__dsh-diagram.json +381 -0
- package/40-checker/results/sample20-ci/mrme000m__dsh-prime-orchestrator.json +452 -0
- package/40-checker/results/sample20-ci/redstonedust__dsh-solidworks-copilot.json +371 -0
- package/40-checker/results/sample20-ci/summary.json +195 -0
- package/40-checker/results/sample20-ci/w2112515__dsh-remote-host.json +399 -0
- package/40-checker/results/sample20-ci/wkfedor__deepseek-harness-voice-input.json +358 -0
- package/40-checker/results/sample20-ci/xfgil__dsh-hot-reloader.json +344 -0
- package/40-checker/results/sample20-ci/yizhiyizhi0128__dsh-peak-scheduler.json +370 -0
- package/40-checker/results/sample20-ci/zed1902209846-dotcom__DPwhale-plugin.json +231 -0
- package/40-checker/results/sample60/123dbl__dsh-side-session.json +344 -0
- package/40-checker/results/sample60/173787247__dsh-wsl-dns.json +360 -0
- package/40-checker/results/sample60/863683348__dsh-insight.json +375 -0
- package/40-checker/results/sample60/Anionex__dsh-turn-rewind.json +349 -0
- package/40-checker/results/sample60/Ansellwan__DSH-Custom-Wallpaper.json +344 -0
- package/40-checker/results/sample60/Ebony-Vinyl__EAC-Pack.json +352 -0
- package/40-checker/results/sample60/EricWang1358__dsh-web-studyhub.json +376 -0
- package/40-checker/results/sample60/GanyuanRan__Aegis.json +349 -0
- package/40-checker/results/sample60/HiSeax__dsh-codely.json +358 -0
- package/40-checker/results/sample60/Jamailar__beav-deepseek-harness.json +341 -0
- package/40-checker/results/sample60/ManoloRemiddi__DSH-Metafolder-Plugin.json +344 -0
- package/40-checker/results/sample60/MichengAI__dsh-archive-manager.json +357 -0
- package/40-checker/results/sample60/MichengAI__dsh-im-connect.json +347 -0
- package/40-checker/results/sample60/MindLab-Research__dsh-generative-ui.json +350 -0
- package/40-checker/results/sample60/NEAZ71eve__dsh-tool-github.json +384 -0
- package/40-checker/results/sample60/README.md +7 -0
- package/40-checker/results/sample60/RINGOLINK__dsh-desktop-shell.json +352 -0
- package/40-checker/results/sample60/SeanTolstoyevski__dsh-code-review.json +352 -0
- package/40-checker/results/sample60/Tasihi89__dsh-talk-map.json +344 -0
- package/40-checker/results/sample60/Tyan66666__billion-context-dsh.json +469 -0
- package/40-checker/results/sample60/V1ki__dsh-plugin-subscriptions.json +350 -0
- package/40-checker/results/sample60/Yu-tao-Li__dsh-computer-use-win.json +341 -0
- package/40-checker/results/sample60/ZSeven-W__dsh-ios.json +344 -0
- package/40-checker/results/sample60/Zxznb666__dsh-qoder-cn-subagent.json +349 -0
- package/40-checker/results/sample60/agent-mobile__dsh-mobile-gateway.json +353 -0
- package/40-checker/results/sample60/c3cvld7aag__fujiang-dsh.json +361 -0
- package/40-checker/results/sample60/cxzrdxy__dsh-file-explorer.json +389 -0
- package/40-checker/results/sample60/dhicoc__dsh-reverse-skill.json +341 -0
- package/40-checker/results/sample60/fangqiing__dsh-knowledge-lite.json +359 -0
- package/40-checker/results/sample60/fwerkor__local-shell-mcp.json +369 -0
- package/40-checker/results/sample60/fzy0517__deepseek-harness-session-cleaner.json +344 -0
- package/40-checker/results/sample60/gjy1992__dsh-diagram.json +350 -0
- package/40-checker/results/sample60/howmp__dsh-pentest.json +341 -0
- package/40-checker/results/sample60/linhay__harmony-next.skills.json +344 -0
- package/40-checker/results/sample60/liustack__modsearch.json +371 -0
- package/40-checker/results/sample60/mmparko__dsh-purge.json +372 -0
- package/40-checker/results/sample60/mrme000m__dsh-prime-orchestrator.json +414 -0
- package/40-checker/results/sample60/omdsh-dev__dsh_workflow.json +439 -0
- package/40-checker/results/sample60/redstonedust__dsh-solidworks-copilot.json +362 -0
- package/40-checker/results/sample60/seriousz158__dsh-memory.json +350 -0
- package/40-checker/results/sample60/shanliuling__dsh-image-gen.json +353 -0
- package/40-checker/results/sample60/shanliuling__skills-link.json +344 -0
- package/40-checker/results/sample60/shengsheng90__DSH-taskboard.json +341 -0
- package/40-checker/results/sample60/sjh9714__dsh-win32.json +374 -0
- package/40-checker/results/sample60/skymecode__deepseek-harness-for-vscode.json +351 -0
- package/40-checker/results/sample60/sopaco__terrain.json +352 -0
- package/40-checker/results/sample60/summary.json +658 -0
- package/40-checker/results/sample60/tinqiao-oss__engramory.json +352 -0
- package/40-checker/results/sample60/tong-io__tongflow.json +359 -0
- package/40-checker/results/sample60/vibeinging__dsh-desktop.json +382 -0
- package/40-checker/results/sample60/w2112515__dsh-remote-host.json +344 -0
- package/40-checker/results/sample60/wkfedor__deepseek-harness-voice-input.json +350 -0
- package/40-checker/results/sample60/wz20__dsh-dafeiyu-dot.json +349 -0
- package/40-checker/results/sample60/xfgil__dsh-hot-reloader.json +344 -0
- package/40-checker/results/sample60/yi-yezhiqiu__dsh-prompt-market.json +360 -0
- package/40-checker/results/sample60/yizhiyizhi0128__dsh-peak-scheduler.json +360 -0
- package/40-checker/results/sample60/yjh051108__dsh-routing-suite.json +366 -0
- package/40-checker/results/sample60-ci/123dbl__dsh-side-session.json +344 -0
- package/40-checker/results/sample60-ci/173787247__dsh-wsl-dns.json +360 -0
- package/40-checker/results/sample60-ci/863683348__dsh-insight.json +375 -0
- package/40-checker/results/sample60-ci/Anionex__dsh-turn-rewind.json +379 -0
- package/40-checker/results/sample60-ci/Ansellwan__DSH-Custom-Wallpaper.json +344 -0
- package/40-checker/results/sample60-ci/Ebony-Vinyl__EAC-Pack.json +362 -0
- package/40-checker/results/sample60-ci/EricWang1358__dsh-web-studyhub.json +378 -0
- package/40-checker/results/sample60-ci/GanyuanRan__Aegis.json +349 -0
- package/40-checker/results/sample60-ci/HiSeax__dsh-codely.json +368 -0
- package/40-checker/results/sample60-ci/Jamailar__beav-deepseek-harness.json +367 -0
- package/40-checker/results/sample60-ci/LiarMTTT__TavernWeave.json +231 -0
- package/40-checker/results/sample60-ci/ManoloRemiddi__DSH-Metafolder-Plugin.json +344 -0
- package/40-checker/results/sample60-ci/MichengAI__dsh-archive-manager.json +395 -0
- package/40-checker/results/sample60-ci/MichengAI__dsh-im-connect.json +404 -0
- package/40-checker/results/sample60-ci/MindLab-Research__dsh-generative-ui.json +410 -0
- package/40-checker/results/sample60-ci/NEAZ71eve__dsh-tool-github.json +392 -0
- package/40-checker/results/sample60-ci/README.md +7 -0
- package/40-checker/results/sample60-ci/RINGOLINK__dsh-desktop-shell.json +361 -0
- package/40-checker/results/sample60-ci/Ruler4396__dsh-launcher.json +231 -0
- package/40-checker/results/sample60-ci/SeanTolstoyevski__dsh-code-review.json +363 -0
- package/40-checker/results/sample60-ci/Tasihi89__dsh-talk-map.json +372 -0
- package/40-checker/results/sample60-ci/Tyan66666__billion-context-dsh.json +469 -0
- package/40-checker/results/sample60-ci/V1ki__dsh-plugin-subscriptions.json +368 -0
- package/40-checker/results/sample60-ci/Yu-tao-Li__dsh-computer-use-win.json +349 -0
- package/40-checker/results/sample60-ci/ZSeven-W__dsh-ios.json +344 -0
- package/40-checker/results/sample60-ci/Zxznb666__dsh-qoder-cn-subagent.json +349 -0
- package/40-checker/results/sample60-ci/agent-mobile__dsh-mobile-gateway.json +384 -0
- package/40-checker/results/sample60-ci/c3cvld7aag__fujiang-dsh.json +361 -0
- package/40-checker/results/sample60-ci/cxzrdxy__dsh-file-explorer.json +399 -0
- package/40-checker/results/sample60-ci/dhicoc__dsh-reverse-skill.json +352 -0
- package/40-checker/results/sample60-ci/fangqiing__dsh-knowledge-lite.json +360 -0
- package/40-checker/results/sample60-ci/fwerkor__local-shell-mcp.json +387 -0
- package/40-checker/results/sample60-ci/fzy0517__deepseek-harness-session-cleaner.json +354 -0
- package/40-checker/results/sample60-ci/gjy1992__dsh-diagram.json +381 -0
- package/40-checker/results/sample60-ci/howmp__dsh-pentest.json +361 -0
- package/40-checker/results/sample60-ci/linhay__harmony-next.skills.json +344 -0
- package/40-checker/results/sample60-ci/liustack__modsearch.json +382 -0
- package/40-checker/results/sample60-ci/mmparko__dsh-purge.json +441 -0
- package/40-checker/results/sample60-ci/mrme000m__dsh-prime-orchestrator.json +452 -0
- package/40-checker/results/sample60-ci/omdsh-dev__dsh_workflow.json +439 -0
- package/40-checker/results/sample60-ci/plastic-labs__honcho.json +231 -0
- package/40-checker/results/sample60-ci/redstonedust__dsh-solidworks-copilot.json +371 -0
- package/40-checker/results/sample60-ci/seriousz158__dsh-memory.json +351 -0
- package/40-checker/results/sample60-ci/shanliuling__dsh-image-gen.json +382 -0
- package/40-checker/results/sample60-ci/shanliuling__skills-link.json +344 -0
- package/40-checker/results/sample60-ci/shengsheng90__DSH-taskboard.json +370 -0
- package/40-checker/results/sample60-ci/sjh9714__dsh-win32.json +410 -0
- package/40-checker/results/sample60-ci/skymecode__deepseek-harness-for-vscode.json +391 -0
- package/40-checker/results/sample60-ci/sopaco__deepwiki-rs.json +231 -0
- package/40-checker/results/sample60-ci/sopaco__terrain.json +352 -0
- package/40-checker/results/sample60-ci/summary.json +555 -0
- package/40-checker/results/sample60-ci/tinqiao-oss__engramory.json +362 -0
- package/40-checker/results/sample60-ci/tong-io__tongflow.json +393 -0
- package/40-checker/results/sample60-ci/vibeinging__dsh-desktop.json +555 -0
- package/40-checker/results/sample60-ci/w2112515__dsh-remote-host.json +399 -0
- package/40-checker/results/sample60-ci/wkfedor__deepseek-harness-voice-input.json +358 -0
- package/40-checker/results/sample60-ci/wz20__dsh-dafeiyu-dot.json +390 -0
- package/40-checker/results/sample60-ci/xfgil__dsh-hot-reloader.json +344 -0
- package/40-checker/results/sample60-ci/yi-yezhiqiu__dsh-prompt-market.json +373 -0
- package/40-checker/results/sample60-ci/yizhiyizhi0128__dsh-peak-scheduler.json +370 -0
- package/40-checker/results/sample60-ci/yjh051108__dsh-routing-suite.json +437 -0
- package/40-checker/results/sample60-ci/zed1902209846-dotcom__DPwhale-plugin.json +231 -0
- package/40-checker/results/triage/REPORT.md +317 -0
- package/40-checker/results/triage/evidence/g2-rejections.txt +63 -0
- package/40-checker/results/triage/evidence/purge-baseline-0.2.1-rc.5.json +51 -0
- package/40-checker/results/triage/evidence/purge-baseline-0.2.2-alpha.2.json +51 -0
- package/40-checker/results/triage/evidence/purge-postinstall.txt +62 -0
- package/40-checker/results/triage/evidence/purge-with-profile-0.2.1-rc.5.json +71 -0
- package/40-checker/results/triage/evidence/purge-with-profile-0.2.2-alpha.2.json +71 -0
- package/40-checker/results/triage/evidence/semver-matrix.json +32 -0
- package/40-checker/results/triage/triage.json +295 -0
- package/40-checker/results/webapp/README.md +10 -0
- package/40-checker/results/webapp/summary.json +46 -0
- package/40-checker/results/webapp/web-auth.json +19 -0
- package/40-checker/results/webruntime/DDDMUC__dsh-free-search/client-export.json +7 -0
- package/40-checker/results/webruntime/DDDMUC__dsh-free-search/installed-package.json +123 -0
- package/40-checker/results/webruntime/DDDMUC__dsh-free-search/probe.json +129 -0
- package/40-checker/results/webruntime/DDDMUC__dsh-free-search/shot.png +0 -0
- package/40-checker/results/webruntime/DDDMUC__dsh-free-search/summary.md +16 -0
- package/40-checker/results/webruntime/Ebony-Vinyl__dsh-our-free-model/client-export.json +7 -0
- package/40-checker/results/webruntime/Ebony-Vinyl__dsh-our-free-model/installed-package.json +76 -0
- package/40-checker/results/webruntime/Ebony-Vinyl__dsh-our-free-model/probe.json +129 -0
- package/40-checker/results/webruntime/Ebony-Vinyl__dsh-our-free-model/shot.png +0 -0
- package/40-checker/results/webruntime/Ebony-Vinyl__dsh-our-free-model/summary.md +16 -0
- package/40-checker/results/webruntime/REPORT.md +253 -0
- package/40-checker/results/webruntime/SeaOf0__dsh-redteam-model/client-export.json +7 -0
- package/40-checker/results/webruntime/SeaOf0__dsh-redteam-model/installed-package.json +97 -0
- package/40-checker/results/webruntime/SeaOf0__dsh-redteam-model/probe.json +129 -0
- package/40-checker/results/webruntime/SeaOf0__dsh-redteam-model/shot.png +0 -0
- package/40-checker/results/webruntime/SeaOf0__dsh-redteam-model/summary.md +16 -0
- package/40-checker/results/webruntime/YuJunZhiXue__dsh-purge/client-export.json +7 -0
- package/40-checker/results/webruntime/YuJunZhiXue__dsh-purge/installed-package.json +98 -0
- package/40-checker/results/webruntime/YuJunZhiXue__dsh-purge/probe.json +136 -0
- package/40-checker/results/webruntime/YuJunZhiXue__dsh-purge/shot.png +0 -0
- package/40-checker/results/webruntime/YuJunZhiXue__dsh-purge/summary.md +16 -0
- package/40-checker/results/webruntime/ci-diet/client-export.json +10 -0
- package/40-checker/results/webruntime/ci-diet/installed-package.json +100 -0
- package/40-checker/results/webruntime/ci-diet/probe.json +129 -0
- package/40-checker/results/webruntime/ci-diet/shot.png +0 -0
- package/40-checker/results/webruntime/ci-diet/summary.md +16 -0
- package/40-checker/results/webruntime/daily-log/client-export.json +10 -0
- package/40-checker/results/webruntime/daily-log/installed-package.json +113 -0
- package/40-checker/results/webruntime/daily-log/probe.json +129 -0
- package/40-checker/results/webruntime/daily-log/shot.png +0 -0
- package/40-checker/results/webruntime/daily-log/summary.md +16 -0
- package/40-checker/results/webruntime/howmp__dsh-pentest/client-export.json +7 -0
- package/40-checker/results/webruntime/howmp__dsh-pentest/installed-package.json +90 -0
- package/40-checker/results/webruntime/howmp__dsh-pentest/probe.json +129 -0
- package/40-checker/results/webruntime/howmp__dsh-pentest/shot.png +0 -0
- package/40-checker/results/webruntime/howmp__dsh-pentest/summary.md +16 -0
- package/40-checker/results/webruntime/kingcharleslzy-ai__dsh-purge/client-export.json +7 -0
- package/40-checker/results/webruntime/kingcharleslzy-ai__dsh-purge/installed-package.json +164 -0
- package/40-checker/results/webruntime/kingcharleslzy-ai__dsh-purge/probe.json +129 -0
- package/40-checker/results/webruntime/kingcharleslzy-ai__dsh-purge/shot.png +0 -0
- package/40-checker/results/webruntime/kingcharleslzy-ai__dsh-purge/summary.md +16 -0
- package/40-checker/results/webruntime/liguobao__ds-harness-remote/client-export.json +7 -0
- package/40-checker/results/webruntime/liguobao__ds-harness-remote/installed-package.json +166 -0
- package/40-checker/results/webruntime/liguobao__ds-harness-remote/probe.json +129 -0
- package/40-checker/results/webruntime/liguobao__ds-harness-remote/shot.png +0 -0
- package/40-checker/results/webruntime/liguobao__ds-harness-remote/summary.md +16 -0
- package/40-checker/results/webruntime/local-pre-ci/README.md +67 -0
- package/40-checker/results/webruntime/local-pre-ci/client-exports.json +158 -0
- package/40-checker/results/webruntime/local-pre-ci/dsh-free-search.probe.json +119 -0
- package/40-checker/results/webruntime/local-pre-ci/dsh-pocket.probe.json +119 -0
- package/40-checker/results/webruntime/local-pre-ci/dsh-redteam-model.probe.json +119 -0
- package/40-checker/results/webruntime/local-pre-ci/qiushi-shell-only.probe.json +104 -0
- package/40-checker/results/webruntime/local-pre-ci/ui-auth-no-login.fail.json +52 -0
- package/40-checker/results/webruntime/local-pre-ci/ui-auth.probe.json +123 -0
- package/40-checker/results/webruntime/mmparko__dsh-purge/client-export.json +7 -0
- package/40-checker/results/webruntime/mmparko__dsh-purge/installed-package.json +95 -0
- package/40-checker/results/webruntime/mmparko__dsh-purge/probe.json +136 -0
- package/40-checker/results/webruntime/mmparko__dsh-purge/shot.png +0 -0
- package/40-checker/results/webruntime/mmparko__dsh-purge/summary.md +16 -0
- package/40-checker/results/webruntime/project-memory/client-export.json +7 -0
- package/40-checker/results/webruntime/project-memory/installed-package.json +118 -0
- package/40-checker/results/webruntime/project-memory/probe.json +129 -0
- package/40-checker/results/webruntime/project-memory/shot.png +0 -0
- package/40-checker/results/webruntime/project-memory/summary.md +16 -0
- package/40-checker/results/webruntime/qiushi/client-export.json +7 -0
- package/40-checker/results/webruntime/qiushi/installed-package.json +84 -0
- package/40-checker/results/webruntime/qiushi/probe.json +114 -0
- package/40-checker/results/webruntime/qiushi/shot.png +0 -0
- package/40-checker/results/webruntime/qiushi/summary.md +16 -0
- package/40-checker/results/webruntime/shaobeichen__dsh-pocket/client-export.json +7 -0
- package/40-checker/results/webruntime/shaobeichen__dsh-pocket/installed-package.json +85 -0
- package/40-checker/results/webruntime/shaobeichen__dsh-pocket/probe.json +129 -0
- package/40-checker/results/webruntime/shaobeichen__dsh-pocket/shot.png +0 -0
- package/40-checker/results/webruntime/shaobeichen__dsh-pocket/summary.md +16 -0
- package/40-checker/results/webruntime/status-rotator/client-export.json +7 -0
- package/40-checker/results/webruntime/status-rotator/installed-package.json +107 -0
- package/40-checker/results/webruntime/status-rotator/probe.json +129 -0
- package/40-checker/results/webruntime/status-rotator/shot.png +0 -0
- package/40-checker/results/webruntime/status-rotator/summary.md +16 -0
- package/40-checker/results/webruntime/summary.json +323 -0
- package/40-checker/results/webruntime/telemetry/probe.json +20 -0
- package/40-checker/results/webruntime/telemetry/summary.md +4 -0
- package/40-checker/results/webruntime/ui-auth/client-export.json +7 -0
- package/40-checker/results/webruntime/ui-auth/installed-package.json +94 -0
- package/40-checker/results/webruntime/ui-auth/probe.json +129 -0
- package/40-checker/results/webruntime/ui-auth/shot.png +0 -0
- package/40-checker/results/webruntime/ui-auth/summary.md +16 -0
- package/40-checker/results/webruntime/verification/probe.json +20 -0
- package/40-checker/results/webruntime/verification/summary.md +4 -0
- package/40-checker/results/webruntime/ysr666__dsh-vision-router/client-export.json +7 -0
- package/40-checker/results/webruntime/ysr666__dsh-vision-router/installed-package.json +142 -0
- package/40-checker/results/webruntime/ysr666__dsh-vision-router/probe.json +129 -0
- package/40-checker/results/webruntime/ysr666__dsh-vision-router/shot.png +0 -0
- package/40-checker/results/webruntime/ysr666__dsh-vision-router/summary.md +16 -0
- package/40-checker/samples/README.md +8 -0
- package/40-checker/samples/entry18.json +139 -0
- package/40-checker/samples/frame.json +485 -0
- package/40-checker/scripts/apply-overlay.mjs +59 -0
- package/40-checker/scripts/attestation-check.mjs +151 -0
- package/40-checker/scripts/bundle-smoke.mjs +126 -0
- package/40-checker/scripts/claim-check.mjs +145 -0
- package/40-checker/scripts/clause-map.mjs +94 -0
- package/40-checker/scripts/collect-fixtures.mjs +44 -0
- package/40-checker/scripts/dashboard.mjs +85 -0
- package/40-checker/scripts/dco-check.mjs +147 -0
- package/40-checker/scripts/dependabot-check.mjs +40 -0
- package/40-checker/scripts/doc-commands-check.mjs +92 -0
- package/40-checker/scripts/entry-scan.mjs +190 -0
- package/40-checker/scripts/entry-validate.mjs +291 -0
- package/40-checker/scripts/entry18-attribution.mjs +66 -0
- package/40-checker/scripts/entry18-ci.mjs +685 -0
- package/40-checker/scripts/entry18-realweb-summary.mjs +71 -0
- package/40-checker/scripts/entry18-web.mjs +307 -0
- package/40-checker/scripts/evidence-chain.mjs +100 -0
- package/40-checker/scripts/flow-index.mjs +82 -0
- package/40-checker/scripts/flow-sample-ci.mjs +529 -0
- package/40-checker/scripts/governance-check.mjs +210 -0
- package/40-checker/scripts/host-farm.mjs +165 -0
- package/40-checker/scripts/journey-config-observe.mjs +109 -0
- package/40-checker/scripts/journey-disclosure-shape.mjs +83 -0
- package/40-checker/scripts/journey-runtime.mjs +178 -0
- package/40-checker/scripts/journey.mjs +76 -0
- package/40-checker/scripts/label-drift.mjs +74 -0
- package/40-checker/scripts/label-sync.mjs +87 -0
- package/40-checker/scripts/label-verify.mjs +90 -0
- package/40-checker/scripts/landlock-exec.c +101 -0
- package/40-checker/scripts/level-audit.mjs +336 -0
- package/40-checker/scripts/m1-sidecar.mjs +126 -0
- package/40-checker/scripts/m2-runner.mjs +213 -0
- package/40-checker/scripts/round-robin.mjs +88 -0
- package/40-checker/scripts/sample-frame.mjs +72 -0
- package/40-checker/scripts/sample20-ci.mjs +25 -0
- package/40-checker/scripts/sample60-ci.mjs +25 -0
- package/40-checker/scripts/stale-check.mjs +59 -0
- package/40-checker/scripts/surveillance.mjs +88 -0
- package/40-checker/scripts/web-probe.mjs +504 -0
- package/40-checker/src/cli.mjs +300 -0
- package/40-checker/src/client-shape.mjs +37 -0
- package/40-checker/src/declarations.mjs +242 -0
- package/40-checker/src/index.mjs +8 -0
- package/40-checker/src/install-spec.mjs +67 -0
- package/40-checker/src/label.mjs +130 -0
- package/40-checker/src/manifest.mjs +364 -0
- package/40-checker/src/permissions.mjs +60 -0
- package/40-checker/src/report.mjs +204 -0
- package/40-checker/src/result.mjs +60 -0
- package/40-checker/src/runtime.mjs +299 -0
- package/40-checker/src/semver.mjs +128 -0
- package/40-checker/src/util.mjs +148 -0
- package/40-checker/test/attestation.test.mjs +59 -0
- package/40-checker/test/checks.test.mjs +172 -0
- package/40-checker/test/claim.test.mjs +28 -0
- package/40-checker/test/client-shape.test.mjs +35 -0
- package/40-checker/test/dco.test.mjs +51 -0
- package/40-checker/test/entry-validate.test.mjs +172 -0
- package/40-checker/test/governance.test.mjs +76 -0
- package/40-checker/test/label.test.mjs +97 -0
- package/40-checker/test/level-audit.test.mjs +99 -0
- package/40-checker/test/levels.test.mjs +31 -0
- package/40-checker/test/ops.test.mjs +117 -0
- package/40-checker/test/permissions.test.mjs +40 -0
- package/40-checker/test/semver.test.mjs +32 -0
- package/40-checker/test/verify.test.mjs +57 -0
- package/LICENSE +28 -0
- package/LICENSE-APACHE +190 -0
- package/LICENSE-CC-BY +23 -0
- package/NOTICE.md +11 -0
- package/README.md +146 -3
- package/bin/dsh-levels.mjs +4 -0
- package/bin/dsh-standards.mjs +17 -4
- package/docs/BOOST-FIXTURES-2026-11-02.md +38 -0
- package/docs/DEVELOPER-JOURNEY.md +40 -0
- package/docs/HOST-J3-BUG-REPORT-DRAFT.md +27 -0
- package/docs/HOST-J3-CONFIG-REPRO-2026-11-02.md +36 -0
- package/docs/NAMING-FALLBACK.md +11 -0
- package/docs/fork-policy.md +12 -0
- package/docs/full-test-plan-2026-11-02.md +207 -0
- package/docs/incident.md +37 -0
- package/docs/onboarding.md +27 -0
- package/docs/privacy.md +12 -0
- package/docs/release.md +16 -0
- package/docs/scope-security.md +62 -0
- package/docs/status-taxonomy.md +54 -0
- package/docs/sunset.md +44 -0
- package/docs/translating.md +12 -0
- package/package.json +49 -18
- package/spec/README.md +27 -0
- package/spec/boost/README.md +8 -0
- package/spec/clauses.json +253 -0
- package/spec/entry/README.md +9 -0
- package/spec/flow/README.md +8 -0
- package/spec/levels.json +371 -0
- package/spec/levels.schema.json +45 -0
- package/spec/reference-suite.json +35 -0
- package/spec/schemas/attestation.schema.json +284 -0
- package/spec/schemas/evidence.schema.json +331 -0
- package/spec/schemas/report.schema.json +64 -0
- package/index.mjs +0 -3
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label primitives: canonical hash, schema-level checks, and effective status.
|
|
3
|
+
* A label is an immutable evidence record. It is not a grade or a ranking.
|
|
4
|
+
*/
|
|
5
|
+
import crypto from 'node:crypto'
|
|
6
|
+
|
|
7
|
+
const LEVELS = new Set(['entry', 'flow', 'boost'])
|
|
8
|
+
const STATUS = {
|
|
9
|
+
entry: new Set(['recognized', 'static', 'runtime', 'blocked', 'failed', 'not-run', 'stale', 'withdrawn', 'not-applicable']),
|
|
10
|
+
flow: new Set(['manual', 'runtime', 'failed', 'not-run', 'stale', 'withdrawn', 'not-applicable']),
|
|
11
|
+
boost: new Set(['measured', 'not-measured', 'failed', 'stale', 'withdrawn', 'not-applicable']),
|
|
12
|
+
}
|
|
13
|
+
const CLAIM = new Set(['observation', 'reference', 'advice'])
|
|
14
|
+
const REQUIRED = ['schema', 'subject', 'level', 'status', 'claimLevel', 'scope', 'validity', 'evidence', 'disclaimer', 'verifyUrl', 'issuer', 'recordHash']
|
|
15
|
+
const ALLOWED = new Set([...REQUIRED, 'withdrawn', 'revokedAt', 'supersedes'])
|
|
16
|
+
const DATE = /^\d{4}-\d{2}-\d{2}$/
|
|
17
|
+
const HASH = /^sha256:[0-9a-f]{64}$/
|
|
18
|
+
const COMMIT = /^[0-9a-f]{7,40}$/
|
|
19
|
+
const FORBIDDEN = ['grade', 'score', 'rank', 'recommended', 'official', 'certified', 'secure']
|
|
20
|
+
|
|
21
|
+
export function canonicalize(value) {
|
|
22
|
+
if (Array.isArray(value)) return value.map(canonicalize)
|
|
23
|
+
if (value && typeof value === 'object') {
|
|
24
|
+
const out = {}
|
|
25
|
+
for (const key of Object.keys(value).sort()) out[key] = canonicalize(value[key])
|
|
26
|
+
return out
|
|
27
|
+
}
|
|
28
|
+
return value
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function recordHash(record) {
|
|
32
|
+
const copy = { ...record }
|
|
33
|
+
delete copy.recordHash
|
|
34
|
+
return `sha256:${crypto.createHash('sha256').update(JSON.stringify(canonicalize(copy))).digest('hex')}`
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function normalizeLabel(record) {
|
|
38
|
+
const computed = recordHash(record)
|
|
39
|
+
return { ...record, recordHash: computed }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function labelId(record) {
|
|
43
|
+
const repo = String(record?.subject?.repo ?? 'unknown').replace(/[^a-zA-Z0-9._-]+/g, '__')
|
|
44
|
+
const version = String(record?.subject?.version ?? 'unversioned').replace(/[^a-zA-Z0-9._+-]+/g, '_')
|
|
45
|
+
return `${repo}@${version}`
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function effectiveStatus(record, now = new Date()) {
|
|
49
|
+
if (record?.withdrawn === true || record?.status === 'withdrawn' || record?.revokedAt) return 'withdrawn'
|
|
50
|
+
const today = now.toISOString().slice(0, 10)
|
|
51
|
+
if (String(record?.validity?.expiresAt ?? '') < today) return 'stale'
|
|
52
|
+
return record?.status ?? 'not-run'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function validateLabel(record, { requireReference = true } = {}) {
|
|
56
|
+
const errors = []
|
|
57
|
+
const warnings = []
|
|
58
|
+
if (!record || typeof record !== 'object' || Array.isArray(record)) {
|
|
59
|
+
return { valid: false, errors: ['record must be an object'], warnings, computedHash: null, effective: 'not-run' }
|
|
60
|
+
}
|
|
61
|
+
for (const key of Object.keys(record)) {
|
|
62
|
+
if (!ALLOWED.has(key)) errors.push(`unknown field: ${key}`)
|
|
63
|
+
}
|
|
64
|
+
for (const key of REQUIRED) {
|
|
65
|
+
if (record[key] === undefined || record[key] === null || record[key] === '') errors.push(`missing: ${key}`)
|
|
66
|
+
}
|
|
67
|
+
if (record.schema !== 'dsh-market-label/1') errors.push('schema must be dsh-market-label/1')
|
|
68
|
+
if (!LEVELS.has(record.level)) errors.push(`invalid level: ${record.level}`)
|
|
69
|
+
if (!STATUS[record.level]?.has(record.status)) errors.push(`invalid status for ${record.level}: ${record.status}`)
|
|
70
|
+
if (!CLAIM.has(record.claimLevel)) errors.push(`invalid claimLevel: ${record.claimLevel}`)
|
|
71
|
+
if (requireReference && record.claimLevel !== 'reference') errors.push('directory labels must use claimLevel=reference')
|
|
72
|
+
const subject = record.subject ?? {}
|
|
73
|
+
for (const key of ['repo', 'version', 'commit']) {
|
|
74
|
+
if (typeof subject[key] !== 'string' || subject[key].length === 0) errors.push(`subject.${key} must be a non-empty string`)
|
|
75
|
+
}
|
|
76
|
+
if (subject.commit && !COMMIT.test(subject.commit)) errors.push('subject.commit must be 7-40 lowercase hex')
|
|
77
|
+
for (const key of ['dsh', 'cordis']) {
|
|
78
|
+
if (typeof record.scope?.[key] !== 'string' || record.scope[key].length === 0) errors.push(`scope.${key} must be a non-empty string`)
|
|
79
|
+
}
|
|
80
|
+
for (const key of ['generatedAt', 'expiresAt']) {
|
|
81
|
+
if (!DATE.test(String(record.validity?.[key] ?? ''))) errors.push(`validity.${key} must be YYYY-MM-DD`)
|
|
82
|
+
}
|
|
83
|
+
if (DATE.test(String(record.validity?.generatedAt ?? '')) && DATE.test(String(record.validity?.expiresAt ?? ''))) {
|
|
84
|
+
if (record.validity.expiresAt < record.validity.generatedAt) errors.push('validity.expiresAt must be >= generatedAt')
|
|
85
|
+
}
|
|
86
|
+
if (!Array.isArray(record.evidence) || record.evidence.length === 0) errors.push('evidence must be a non-empty array')
|
|
87
|
+
else {
|
|
88
|
+
for (const [index, item] of record.evidence.entries()) {
|
|
89
|
+
if (!item || typeof item !== 'object' || Array.isArray(item)) { errors.push(`evidence[${index}] must be an object`); continue }
|
|
90
|
+
for (const key of Object.keys(item)) if (!['url', 'sha256'].includes(key)) errors.push(`evidence[${index}] unknown field: ${key}`)
|
|
91
|
+
if (typeof item.url !== 'string' || !item.url.startsWith('https://')) errors.push(`evidence[${index}].url must be https://`)
|
|
92
|
+
if (item.sha256 !== undefined && !/^[0-9a-f]{64}$/.test(String(item.sha256))) errors.push(`evidence[${index}].sha256 must be 64 hex`)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (typeof record.disclaimer !== 'string' || record.disclaimer.length < 12) errors.push('disclaimer is too short')
|
|
96
|
+
else {
|
|
97
|
+
if (!/非官方|non-official/i.test(record.disclaimer)) errors.push('disclaimer must say 非官方/non-official')
|
|
98
|
+
if (!/非认证|non-certification/i.test(record.disclaimer)) errors.push('disclaimer must say 非认证/non-certification')
|
|
99
|
+
}
|
|
100
|
+
if (typeof record.verifyUrl !== 'string' || !record.verifyUrl.startsWith('https://')) errors.push('verifyUrl must be https://')
|
|
101
|
+
if (typeof record.issuer !== 'string' || record.issuer.length === 0) errors.push('issuer must be a non-empty string')
|
|
102
|
+
if (!HASH.test(String(record.recordHash ?? ''))) errors.push('recordHash must be sha256:<64 hex>')
|
|
103
|
+
const computed = recordHash(record)
|
|
104
|
+
if (HASH.test(String(record.recordHash ?? '')) && record.recordHash !== computed) errors.push('recordHash does not match the canonical record')
|
|
105
|
+
for (const key of FORBIDDEN) {
|
|
106
|
+
if (Object.prototype.hasOwnProperty.call(record, key)) errors.push(`forbidden field: ${key}`)
|
|
107
|
+
if (Object.prototype.hasOwnProperty.call(record.subject ?? {}, key)) errors.push(`forbidden subject field: ${key}`)
|
|
108
|
+
}
|
|
109
|
+
if (record.withdrawn !== undefined && typeof record.withdrawn !== 'boolean') errors.push('withdrawn must be boolean')
|
|
110
|
+
if (record.revokedAt !== undefined && !DATE.test(String(record.revokedAt))) errors.push('revokedAt must be YYYY-MM-DD')
|
|
111
|
+
if (record.supersedes !== undefined && !HASH.test(String(record.supersedes))) errors.push('supersedes must be sha256:<64 hex>')
|
|
112
|
+
const effective = effectiveStatus(record)
|
|
113
|
+
if (effective === 'stale') warnings.push('label is stale at read time; hide it from the valid view')
|
|
114
|
+
if (effective === 'withdrawn') warnings.push('label is withdrawn; keep it in history, exclude it from the valid view')
|
|
115
|
+
return { valid: errors.length === 0, errors, warnings, computedHash: computed, effective }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function validateIndex(index) {
|
|
119
|
+
const errors = []
|
|
120
|
+
if (!index || typeof index !== 'object') return { valid: false, errors: ['index must be an object'] }
|
|
121
|
+
if (index.schema !== 'dsh-label-index/1') errors.push('index.schema must be dsh-label-index/1')
|
|
122
|
+
if (!Array.isArray(index.records)) errors.push('index.records must be an array')
|
|
123
|
+
else {
|
|
124
|
+
for (const [i, record] of index.records.entries()) {
|
|
125
|
+
const result = validateLabel(record)
|
|
126
|
+
for (const error of result.errors) errors.push(`records[${i}]: ${error}`)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return { valid: errors.length === 0, errors }
|
|
130
|
+
}
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import {
|
|
3
|
+
asArray, exists, isDirectory, isFile, isObject, readJsonMaybe, readText, rootExportTarget,
|
|
4
|
+
} from './util.mjs'
|
|
5
|
+
import { parseVersion, satisfies, validRange } from './semver.mjs'
|
|
6
|
+
import { parseInstallSpec } from './install-spec.mjs'
|
|
7
|
+
import { check, detail, worst } from './result.mjs'
|
|
8
|
+
import { checkClientShape } from './client-shape.mjs'
|
|
9
|
+
|
|
10
|
+
const PACKAGE_NAME = /^(?:@[a-z0-9][a-z0-9._~-]*\/)?[a-z0-9][a-z0-9._~-]*$/
|
|
11
|
+
const PACKAGE_NAME_MAX_LENGTH = 214
|
|
12
|
+
const EXACT_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/
|
|
13
|
+
const COMMIT = /^[0-9a-f]{40}$/
|
|
14
|
+
|
|
15
|
+
export const DEFAULT_RUNTIME_VERSION = '0.2.2-alpha.2'
|
|
16
|
+
|
|
17
|
+
export function inferKind(manifest, entryExists) {
|
|
18
|
+
const declared = manifest?.dsh?.kind
|
|
19
|
+
if (typeof declared === 'string' && declared !== '') return { kind: declared, inferred: false }
|
|
20
|
+
if (manifest?.dsh?.bundle?.patch !== undefined) return { kind: 'bundle', inferred: true }
|
|
21
|
+
if (manifest?.dsh?.client !== undefined) return { kind: 'client', inferred: true }
|
|
22
|
+
if (entryExists) return { kind: 'plugin', inferred: true }
|
|
23
|
+
return { kind: 'unknown', inferred: true }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function inside(root, target) {
|
|
27
|
+
const relative = path.relative(root, target)
|
|
28
|
+
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative))
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function resolveEntry(dir, manifest) {
|
|
32
|
+
const candidates = []
|
|
33
|
+
const exportTarget = rootExportTarget(manifest)
|
|
34
|
+
if (exportTarget) candidates.push({ source: 'exports["."]', target: exportTarget })
|
|
35
|
+
if (typeof manifest.main === 'string' && manifest.main.trim() !== '') candidates.push({ source: 'main', target: manifest.main })
|
|
36
|
+
for (const fallback of ['index.js', 'index.mjs', 'index.cjs', 'index.ts']) candidates.push({ source: 'fallback', target: fallback })
|
|
37
|
+
|
|
38
|
+
for (const candidate of candidates) {
|
|
39
|
+
const absolute = path.resolve(dir, candidate.target)
|
|
40
|
+
if (!inside(dir, absolute)) {
|
|
41
|
+
return { exists: false, escape: true, source: candidate.source, target: candidate.target, absolute }
|
|
42
|
+
}
|
|
43
|
+
if (isFile(absolute)) {
|
|
44
|
+
return { exists: true, source: candidate.source, target: candidate.target, absolute, relative: path.relative(dir, absolute).split(path.sep).join('/') }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const sourceCandidates = ['src/index.ts', 'src/index.tsx', 'src/index.js', 'src/index.mjs']
|
|
49
|
+
const sourceEntry = sourceCandidates.find(relative => isFile(path.join(dir, relative))) ?? null
|
|
50
|
+
const scripts = isObject(manifest.scripts) ? manifest.scripts : {}
|
|
51
|
+
const buildHint = Boolean(sourceEntry) || ['build', 'prepare', 'compile'].some(name => typeof scripts[name] === 'string')
|
|
52
|
+
return { exists: false, escape: false, source: 'none', target: null, absolute: null, sourceEntry, buildHint }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function checkExportShape(entry, kind) {
|
|
56
|
+
if (!entry?.exists || kind !== 'plugin') return { result: 'NA', reason: 'not a directly loadable plugin entry', evidence: [] }
|
|
57
|
+
if (entry.related === '.d.ts' || entry.absolute.endsWith('.d.ts')) return { result: 'WARN', reason: 'entry is a declaration file; runtime shape not judged', evidence: [entry.relative] }
|
|
58
|
+
let text
|
|
59
|
+
try { text = readText(entry.absolute) } catch { return { result: 'WARN', reason: 'entry is not readable', evidence: [entry.relative] } }
|
|
60
|
+
const patterns = [
|
|
61
|
+
/export\s+(?:async\s+)?function\s+apply\s*\(/,
|
|
62
|
+
/export\s+const\s+apply\s*=/,
|
|
63
|
+
/export\s+\{[^}]*\bapply\b[^}]*\}/,
|
|
64
|
+
/export\s+default\s+class\s+/,
|
|
65
|
+
/module\.exports\s*=/,
|
|
66
|
+
]
|
|
67
|
+
if (patterns.some(pattern => pattern.test(text))) {
|
|
68
|
+
return { result: 'PASS', reason: 'entry exposes apply or a default class', evidence: [entry.relative] }
|
|
69
|
+
}
|
|
70
|
+
return { result: 'WARN', reason: 'no apply/default-class shape found by static scan; L1 is authoritative', evidence: [entry.relative] }
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function analyzePatch(dir, manifest) {
|
|
74
|
+
const raw = manifest?.dsh?.bundle?.patch
|
|
75
|
+
if (raw === undefined) return { present: false, files: [], problems: [], enabledPluginManagerTools: false }
|
|
76
|
+
const files = []
|
|
77
|
+
const problems = []
|
|
78
|
+
let enabledPluginManagerTools = false
|
|
79
|
+
for (const entry of asArray(raw)) {
|
|
80
|
+
if (typeof entry !== 'string' || entry.trim() === '') {
|
|
81
|
+
problems.push('dsh.bundle.patch must be a non-empty string or string array')
|
|
82
|
+
continue
|
|
83
|
+
}
|
|
84
|
+
if (path.isAbsolute(entry) || entry.startsWith('~') || entry.includes('$') || entry.split(/[\\/]/).includes('..')) {
|
|
85
|
+
problems.push(`patch path escapes the package: ${entry}`)
|
|
86
|
+
continue
|
|
87
|
+
}
|
|
88
|
+
const absolute = path.resolve(dir, entry)
|
|
89
|
+
if (!inside(dir, absolute)) {
|
|
90
|
+
problems.push(`patch path escapes the package: ${entry}`)
|
|
91
|
+
continue
|
|
92
|
+
}
|
|
93
|
+
if (!isFile(absolute)) {
|
|
94
|
+
problems.push(`patch file is missing: ${entry}`)
|
|
95
|
+
continue
|
|
96
|
+
}
|
|
97
|
+
files.push({ relative: entry, absolute })
|
|
98
|
+
let text = ''
|
|
99
|
+
try { text = readText(absolute) } catch { problems.push(`patch file is unreadable: ${entry}`); continue }
|
|
100
|
+
const lines = text.split('\n')
|
|
101
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
102
|
+
const line = lines[index]
|
|
103
|
+
const match = /^\s*name:\s*['"]?([^'"\s#]+)['"]?/.exec(line)
|
|
104
|
+
if (!match) continue
|
|
105
|
+
const name = match[1]
|
|
106
|
+
if (path.isAbsolute(name) || name.startsWith('~') || name.includes('$') || name.split(/[\\/]/).includes('..')) {
|
|
107
|
+
problems.push(`patch row name escapes the package: ${name}`)
|
|
108
|
+
}
|
|
109
|
+
if (name === '@deepseek-ai/dsh-plugin-manager/tools') {
|
|
110
|
+
const window = lines.slice(index, index + 4).join('\n')
|
|
111
|
+
if (!/disabled:\s*true/.test(window)) enabledPluginManagerTools = true
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return { present: true, files, problems, enabledPluginManagerTools }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function supplyChain(dir, manifest) {
|
|
119
|
+
const details = []
|
|
120
|
+
const dependencies = isObject(manifest.dependencies) ? manifest.dependencies : {}
|
|
121
|
+
const peers = isObject(manifest.peerDependencies) ? manifest.peerDependencies : {}
|
|
122
|
+
const all = { ...dependencies, ...peers }
|
|
123
|
+
for (const [name, value] of Object.entries(all)) {
|
|
124
|
+
if (typeof value !== 'string') continue
|
|
125
|
+
if (/^(?:workspace|file|link|portal):/i.test(value)) {
|
|
126
|
+
details.push(detail('C-3.3', 'WARN', `non-registry dependency ${name}: ${value}`, [`package.json#dependencies.${name}`]))
|
|
127
|
+
continue
|
|
128
|
+
}
|
|
129
|
+
if (/^(?:git\+|git@|github:|gitlab:|bitbucket:|gist:|https?:)/i.test(value)) {
|
|
130
|
+
if (!/#[0-9a-f]{40}$/.test(value) && !/^https?:\/\/[^#]+\.(?:tgz|tar\.gz)/i.test(value)) {
|
|
131
|
+
details.push(detail('C-3.3', 'WARN', `non-registry dependency ${name} is not pinned to a commit: ${value}`, [`package.json#dependencies.${name}`]))
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const scripts = isObject(manifest.scripts) ? manifest.scripts : {}
|
|
136
|
+
for (const name of ['preinstall', 'install', 'postinstall', 'prepare']) {
|
|
137
|
+
if (typeof scripts[name] === 'string') {
|
|
138
|
+
details.push(detail('C-3.4', 'WARN', `install-time build script present: scripts.${name}`, [`package.json#scripts.${name}`]))
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return details
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @param {string} dir
|
|
146
|
+
* @param {{runtimeVersion?: string, installSpec?: string, marketIndex?: string, pluginName?: string}} options
|
|
147
|
+
*/
|
|
148
|
+
export function runManifestChecks(dir, options = {}) {
|
|
149
|
+
const runtimeVersion = options.runtimeVersion ?? DEFAULT_RUNTIME_VERSION
|
|
150
|
+
const parsed = readJsonMaybe(path.join(dir, 'package.json'))
|
|
151
|
+
if (parsed.error) {
|
|
152
|
+
return {
|
|
153
|
+
manifest: null,
|
|
154
|
+
kind: 'unknown',
|
|
155
|
+
entry: null,
|
|
156
|
+
patch: null,
|
|
157
|
+
g4: { hasClient: false, ok: true, result: 'NA', reason: 'manifest unavailable' },
|
|
158
|
+
checks: [
|
|
159
|
+
check({ id: 'DSC-01', clause: 'C-1', layer: 'L0', result: 'FAIL', reason: `package.json is missing or invalid: ${parsed.error.message}`, details: [detail('C-1.1', 'FAIL', parsed.error.message)], evidence: ['package.json'] }),
|
|
160
|
+
check({ id: 'DSC-02', clause: 'C-2', layer: 'L0', result: 'ERROR', coverage: 'not-run', reason: 'manifest unavailable' }),
|
|
161
|
+
check({ id: 'DSC-03', clause: 'C-3', layer: 'L0', result: 'NA', reason: 'manifest unavailable' }),
|
|
162
|
+
],
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const manifest = parsed.value
|
|
166
|
+
const entry = resolveEntry(dir, manifest)
|
|
167
|
+
const kindInfo = inferKind(manifest, entry.exists)
|
|
168
|
+
const kind = kindInfo.kind
|
|
169
|
+
const patch = analyzePatch(dir, manifest)
|
|
170
|
+
const g4 = checkClientShape(manifest)
|
|
171
|
+
|
|
172
|
+
const manifestDetails = []
|
|
173
|
+
const name = manifest.name
|
|
174
|
+
if (typeof name !== 'string' || name.trim() === '' || name.length > PACKAGE_NAME_MAX_LENGTH || !PACKAGE_NAME.test(name)) {
|
|
175
|
+
manifestDetails.push(detail('C-1.1', 'FAIL', 'name must be a valid npm package name', ['package.json#name']))
|
|
176
|
+
} else {
|
|
177
|
+
manifestDetails.push(detail('C-1.1', 'PASS', `name=${name}`))
|
|
178
|
+
}
|
|
179
|
+
if (typeof manifest.version !== 'string' || !EXACT_VERSION.test(manifest.version)) {
|
|
180
|
+
manifestDetails.push(detail('C-1.1', 'FAIL', 'version must be an exact SemVer version', ['package.json#version']))
|
|
181
|
+
} else {
|
|
182
|
+
manifestDetails.push(detail('C-1.1', 'PASS', `version=${manifest.version}`))
|
|
183
|
+
}
|
|
184
|
+
if (entry.escape) {
|
|
185
|
+
manifestDetails.push(detail('C-1.2', 'FAIL', `entry escapes the package: ${entry.target}`, ['package.json#exports']))
|
|
186
|
+
} else if (entry.exists) {
|
|
187
|
+
manifestDetails.push(detail('C-1.2', 'PASS', `entry resolves via ${entry.source}: ${entry.relative}`, [entry.relative]))
|
|
188
|
+
} else if (entry.buildHint) {
|
|
189
|
+
manifestDetails.push(detail('C-1.2', 'WARN', `entry not present in checkout; source/build hint exists (${entry.sourceEntry ?? 'build script'})`, ['package.json#scripts']))
|
|
190
|
+
} else if (kind === 'bundle' || kind === 'client') {
|
|
191
|
+
manifestDetails.push(detail('C-1.2', 'WARN', `no runtime entry; ${kind} packages may be patch/client only`, ['package.json#exports']))
|
|
192
|
+
} else {
|
|
193
|
+
manifestDetails.push(detail('C-1.2', 'FAIL', 'no resolvable runtime entry', ['package.json#exports', 'package.json#main']))
|
|
194
|
+
}
|
|
195
|
+
const shape = checkExportShape(entry, kind)
|
|
196
|
+
manifestDetails.push(detail('C-1.3', shape.result, shape.reason, shape.evidence))
|
|
197
|
+
if (!patch.present) {
|
|
198
|
+
manifestDetails.push(detail('C-1.4', 'PASS', 'no dsh.bundle.patch declared'))
|
|
199
|
+
} else if (patch.problems.length > 0) {
|
|
200
|
+
manifestDetails.push(detail('C-1.4', 'FAIL', patch.problems.join('; '), patch.files.map(file => file.relative)))
|
|
201
|
+
} else {
|
|
202
|
+
manifestDetails.push(detail('C-1.4', 'PASS', `bundle patch present (${patch.files.length} file(s))`, patch.files.map(file => file.relative)))
|
|
203
|
+
}
|
|
204
|
+
if (typeof manifest.license !== 'string' || manifest.license.trim() === '') {
|
|
205
|
+
manifestDetails.push(detail('C-1.5', 'WARN', 'license is missing', ['package.json#license']))
|
|
206
|
+
} else {
|
|
207
|
+
manifestDetails.push(detail('C-1.5', 'PASS', `license=${manifest.license}`))
|
|
208
|
+
}
|
|
209
|
+
if (manifest.private === true) {
|
|
210
|
+
manifestDetails.push(detail('C-1.6', 'WARN', 'private:true; not publishable to a registry', ['package.json#private']))
|
|
211
|
+
}
|
|
212
|
+
const manifestResult = worst(manifestDetails.map(item => item.result))
|
|
213
|
+
const manifestCheck = check({
|
|
214
|
+
id: 'DSC-01',
|
|
215
|
+
clause: 'C-1',
|
|
216
|
+
layer: 'L0',
|
|
217
|
+
result: manifestResult,
|
|
218
|
+
reason: manifestDetails.filter(item => item.result !== 'PASS' && item.result !== 'NA').map(item => `${item.item}: ${item.reason}`).join(' | '),
|
|
219
|
+
details: manifestDetails,
|
|
220
|
+
evidence: ['package.json'],
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
const compatDetails = []
|
|
224
|
+
const engines = isObject(manifest.engines) ? manifest.engines : {}
|
|
225
|
+
const dshEngine = engines.dsh
|
|
226
|
+
const peers = isObject(manifest.peerDependencies) ? manifest.peerDependencies : {}
|
|
227
|
+
const dshPeers = Object.entries(peers).filter(([peer]) => peer === '@deepseek-ai/dsh' || peer.startsWith('@deepseek-ai/dsh-'))
|
|
228
|
+
if (typeof dshEngine === 'string') {
|
|
229
|
+
if (dshEngine.startsWith('workspace:')) {
|
|
230
|
+
compatDetails.push(detail('C-2.3', 'FAIL', 'engines.dsh must not be a workspace: range', ['package.json#engines.dsh']))
|
|
231
|
+
} else if (!validRange(dshEngine)) {
|
|
232
|
+
compatDetails.push(detail('C-2.1', 'FAIL', `engines.dsh is not a SemVer range: ${dshEngine}`, ['package.json#engines.dsh']))
|
|
233
|
+
} else if (!satisfies(runtimeVersion, dshEngine)) {
|
|
234
|
+
compatDetails.push(detail('C-2.2', 'FAIL', `engines.dsh ${dshEngine} does not satisfy runtime ${runtimeVersion}`, ['package.json#engines.dsh']))
|
|
235
|
+
} else {
|
|
236
|
+
compatDetails.push(detail('C-2.1', 'PASS', `engines.dsh=${dshEngine}`))
|
|
237
|
+
compatDetails.push(detail('C-2.2', 'PASS', `runtime ${runtimeVersion} satisfies ${dshEngine}`))
|
|
238
|
+
}
|
|
239
|
+
for (const [peer, rangeValue] of dshPeers) {
|
|
240
|
+
if (typeof rangeValue !== 'string' || rangeValue.startsWith('workspace:')) continue
|
|
241
|
+
if (validRange(rangeValue) && !satisfies(runtimeVersion, rangeValue)) {
|
|
242
|
+
compatDetails.push(detail('C-2.4', 'WARN', `peer ${peer} range ${rangeValue} conflicts with engines.dsh`, [`package.json#peerDependencies.${peer}`]))
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} else if (dshPeers.length > 0) {
|
|
246
|
+
let failed = false
|
|
247
|
+
for (const [peer, rangeValue] of dshPeers) {
|
|
248
|
+
if (typeof rangeValue !== 'string') {
|
|
249
|
+
compatDetails.push(detail('C-2.1', 'FAIL', `peer ${peer} must be a string range`, [`package.json#peerDependencies.${peer}`]))
|
|
250
|
+
failed = true
|
|
251
|
+
continue
|
|
252
|
+
}
|
|
253
|
+
const effective = /^workspace:(?:\^|~|\*)$/.test(rangeValue) ? runtimeVersion : rangeValue
|
|
254
|
+
if (!validRange(effective)) {
|
|
255
|
+
compatDetails.push(detail('C-2.1', 'FAIL', `peer ${peer} is not a SemVer range: ${rangeValue}`, [`package.json#peerDependencies.${peer}`]))
|
|
256
|
+
failed = true
|
|
257
|
+
} else if (!satisfies(runtimeVersion, effective)) {
|
|
258
|
+
compatDetails.push(detail('C-2.2', 'FAIL', `peer ${peer} ${rangeValue} does not satisfy runtime ${runtimeVersion}`, [`package.json#peerDependencies.${peer}`]))
|
|
259
|
+
failed = true
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
compatDetails.push(detail('C-2.1', failed ? 'FAIL' : 'WARN', failed ? 'one or more dsh peers are unsatisfied' : 'no engines.dsh; dsh peer range is the weaker alternate declaration'))
|
|
263
|
+
} else {
|
|
264
|
+
compatDetails.push(detail('C-2.1', 'FAIL', 'neither engines.dsh nor a @deepseek-ai/dsh* peer range is declared', ['package.json#engines', 'package.json#peerDependencies']))
|
|
265
|
+
}
|
|
266
|
+
const compatResult = worst(compatDetails.map(item => item.result))
|
|
267
|
+
const compatCheck = check({
|
|
268
|
+
id: 'DSC-02',
|
|
269
|
+
clause: 'C-2',
|
|
270
|
+
layer: 'L0',
|
|
271
|
+
result: compatResult,
|
|
272
|
+
reason: compatDetails.filter(item => item.result !== 'PASS' && item.result !== 'NA').map(item => `${item.item}: ${item.reason}`).join(' | '),
|
|
273
|
+
details: compatDetails,
|
|
274
|
+
evidence: ['package.json#engines', 'package.json#peerDependencies'],
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
const supplyDetails = supplyChain(dir, manifest)
|
|
278
|
+
const installDetails = [...supplyDetails]
|
|
279
|
+
let installResult = 'NA'
|
|
280
|
+
let installReason = 'install spec not supplied (package profile)'
|
|
281
|
+
if (typeof options.installSpec === 'string' && options.installSpec.trim() !== '') {
|
|
282
|
+
try {
|
|
283
|
+
const spec = parseInstallSpec(options.installSpec)
|
|
284
|
+
installDetails.push(detail('C-3.1', 'PASS', `parsed kind=${spec.kind}`, ['--install-spec']))
|
|
285
|
+
installDetails.push(detail('C-3.2', spec.pinned ? 'PASS' : 'WARN', spec.pinned ? 'source is pinned' : 'registry spec is a bare name/tag', ['--install-spec']))
|
|
286
|
+
installResult = worst(installDetails.map(item => item.result))
|
|
287
|
+
installReason = installResult === 'PASS' ? '' : 'install spec or supply-chain issue'
|
|
288
|
+
} catch (error) {
|
|
289
|
+
installDetails.push(detail('C-3.1', 'FAIL', error.message, ['--install-spec']))
|
|
290
|
+
installResult = 'FAIL'
|
|
291
|
+
installReason = error.message
|
|
292
|
+
}
|
|
293
|
+
} else if (typeof options.marketIndex === 'string' && options.marketIndex.trim() !== '') {
|
|
294
|
+
const market = checkMarketEntry(options.marketIndex, options.pluginName)
|
|
295
|
+
installDetails.push(...market.details)
|
|
296
|
+
installResult = worst([market.result, ...supplyDetails.map(item => item.result)])
|
|
297
|
+
installReason = market.reason || (installResult === 'WARN' ? 'market entry is pinned but supply-chain warnings remain' : '')
|
|
298
|
+
}
|
|
299
|
+
const installCheck = check({
|
|
300
|
+
id: 'DSC-03',
|
|
301
|
+
clause: 'C-3',
|
|
302
|
+
layer: 'L0',
|
|
303
|
+
result: installResult,
|
|
304
|
+
coverage: installResult === 'NA' ? 'not-run' : 'full',
|
|
305
|
+
reason: installReason,
|
|
306
|
+
details: installDetails,
|
|
307
|
+
evidence: ['package.json#dependencies', 'package.json#scripts', options.marketIndex ?? '--install-spec'],
|
|
308
|
+
})
|
|
309
|
+
|
|
310
|
+
return { manifest, kind, kindInferred: kindInfo.inferred, entry, patch, g4, checks: [manifestCheck, compatCheck, installCheck] }
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export function checkMarketEntry(indexPath, pluginName) {
|
|
314
|
+
const details = []
|
|
315
|
+
let parsed
|
|
316
|
+
try { parsed = readJsonMaybe(indexPath) } catch (error) {
|
|
317
|
+
return { result: 'FAIL', reason: error.message, details: [detail('C-3.5', 'FAIL', error.message, [indexPath])] }
|
|
318
|
+
}
|
|
319
|
+
if (parsed.error) {
|
|
320
|
+
return { result: 'FAIL', reason: parsed.error.message, details: [detail('C-3.5', 'FAIL', parsed.error.message, [indexPath])] }
|
|
321
|
+
}
|
|
322
|
+
const value = parsed.value
|
|
323
|
+
if (!isObject(value) || value.format !== 1) {
|
|
324
|
+
return { result: 'FAIL', reason: 'market index format must be 1', details: [detail('C-3.5', 'FAIL', 'format !== 1', [indexPath])] }
|
|
325
|
+
}
|
|
326
|
+
if (!Array.isArray(value.plugins)) {
|
|
327
|
+
return { result: 'FAIL', reason: 'plugins must be an array', details: [detail('C-3.5', 'FAIL', 'plugins is not an array', [indexPath])] }
|
|
328
|
+
}
|
|
329
|
+
const name = pluginName ?? null
|
|
330
|
+
const plugin = name
|
|
331
|
+
? value.plugins.find(entry => isObject(entry) && entry.name === name)
|
|
332
|
+
: value.plugins.length === 1 ? value.plugins[0] : null
|
|
333
|
+
if (!isObject(plugin)) {
|
|
334
|
+
return { result: 'FAIL', reason: name ? `plugin ${name} not found` : 'plugin name is required for a multi-plugin index', details: [detail('C-3.5', 'FAIL', 'plugin not found', [indexPath])] }
|
|
335
|
+
}
|
|
336
|
+
if (typeof plugin.name !== 'string' || !PACKAGE_NAME.test(plugin.name)) {
|
|
337
|
+
details.push(detail('C-3.5', 'FAIL', `invalid plugin name: ${plugin.name}`, [indexPath]))
|
|
338
|
+
}
|
|
339
|
+
if (!Array.isArray(plugin.versions) || plugin.versions.length === 0) {
|
|
340
|
+
details.push(detail('C-3.5', 'FAIL', 'versions must be a non-empty array', [indexPath]))
|
|
341
|
+
} else {
|
|
342
|
+
for (const version of plugin.versions) {
|
|
343
|
+
if (!isObject(version) || typeof version.version !== 'string' || !EXACT_VERSION.test(version.version)) {
|
|
344
|
+
details.push(detail('C-3.5', 'FAIL', 'version must be an exact SemVer', [indexPath]))
|
|
345
|
+
continue
|
|
346
|
+
}
|
|
347
|
+
if (!isObject(version.source) || !['npm', 'git'].includes(version.source.type)) {
|
|
348
|
+
details.push(detail('C-3.5', 'FAIL', `source.type must be npm or git for ${version.version}`, [indexPath]))
|
|
349
|
+
continue
|
|
350
|
+
}
|
|
351
|
+
if (version.source.type === 'git' && (typeof version.source.commit !== 'string' || !COMMIT.test(version.source.commit))) {
|
|
352
|
+
details.push(detail('C-3.5', 'FAIL', `git source must pin a 40-hex commit for ${version.version}`, [indexPath]))
|
|
353
|
+
}
|
|
354
|
+
if (isObject(version.engines) && version.engines.dsh !== undefined) {
|
|
355
|
+
if (typeof version.engines.dsh !== 'string' || version.engines.dsh.startsWith('workspace:') || !validRange(version.engines.dsh)) {
|
|
356
|
+
details.push(detail('C-3.5', 'FAIL', `engines.dsh invalid for ${version.version}`, [indexPath]))
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (details.length === 0) details.push(detail('C-3.5', 'PASS', `market index entry ${plugin.name}@${plugin.versions?.[0]?.version ?? '?'} is pinned`))
|
|
362
|
+
const result = worst(details.map(item => item.result))
|
|
363
|
+
return { result, reason: result === 'PASS' ? '' : 'market index entry failed validation', details }
|
|
364
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* T4 field validation: dsh.commitments / dsh.disclosure.
|
|
3
|
+
*
|
|
4
|
+
* These fields are declarations, not enforcement. The checker validates their
|
|
5
|
+
* shape and reports missing/invalid values; it never FAILs C-12 merely because
|
|
6
|
+
* a commitment is absent (the standard's transition rule).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const COMMITMENT_IDS = [
|
|
10
|
+
'no-session-upload',
|
|
11
|
+
'no-third-party-proxy',
|
|
12
|
+
'no-credential-enumeration',
|
|
13
|
+
'no-silent-prompt-rewrite',
|
|
14
|
+
'no-adapter-bypass',
|
|
15
|
+
'no-webhook-auto-session',
|
|
16
|
+
'no-security-seam-replacement',
|
|
17
|
+
'third-party-endpoint-disclosure',
|
|
18
|
+
'no-danger-full-access',
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
function detail(item, result, reason) {
|
|
22
|
+
return { item, result, reason, evidence: ['package.json#dsh.commitments'] }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function validateCommitments(manifest) {
|
|
26
|
+
const value = manifest?.dsh?.commitments
|
|
27
|
+
if (value === undefined) return [detail('C-12.6', 'NA', 'dsh.commitments is not declared (optional disclosure)')]
|
|
28
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
29
|
+
return [detail('C-12.6', 'WARN', 'dsh.commitments must be an object')]
|
|
30
|
+
}
|
|
31
|
+
const details = []
|
|
32
|
+
for (const id of COMMITMENT_IDS) {
|
|
33
|
+
if (!Object.hasOwn(value, id)) details.push(detail('C-12.6', 'WARN', `missing commitment: ${id}`))
|
|
34
|
+
else if (typeof value[id] !== 'boolean') details.push(detail('C-12.6', 'WARN', `commitment ${id} must be boolean`))
|
|
35
|
+
}
|
|
36
|
+
if (details.length === 0) details.push(detail('C-12.6', 'PASS', 'all 9 commitments are declared as booleans'))
|
|
37
|
+
return details
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function validateDisclosure(manifest) {
|
|
41
|
+
const value = manifest?.dsh?.disclosure
|
|
42
|
+
if (value === undefined) return [detail('C-12.7', 'NA', 'dsh.disclosure is not declared (optional disclosure)')]
|
|
43
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
44
|
+
return [detail('C-12.7', 'WARN', 'dsh.disclosure must be an object')]
|
|
45
|
+
}
|
|
46
|
+
const details = []
|
|
47
|
+
if (value.endpoints !== undefined) {
|
|
48
|
+
if (!Array.isArray(value.endpoints) || value.endpoints.some(endpoint => typeof endpoint !== 'string' || !/^https:\/\//.test(endpoint))) {
|
|
49
|
+
details.push(detail('C-12.7', 'WARN', 'disclosure.endpoints must be an array of https URLs'))
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (value.retention !== undefined && typeof value.retention !== 'string') {
|
|
53
|
+
details.push(detail('C-12.7', 'WARN', 'disclosure.retention must be a string'))
|
|
54
|
+
}
|
|
55
|
+
if (value.systemPrompt !== undefined && typeof value.systemPrompt !== 'string') {
|
|
56
|
+
details.push(detail('C-12.7', 'WARN', 'disclosure.systemPrompt must be a string'))
|
|
57
|
+
}
|
|
58
|
+
if (details.length === 0) details.push(detail('C-12.7', 'PASS', 'dsh.disclosure is well-formed'))
|
|
59
|
+
return details
|
|
60
|
+
}
|