dsh-standards 0.0.3 → 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 +18 -0
- 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 -12
- 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
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* governance-check.mjs — validate the machine-readable governance files.
|
|
4
|
+
*
|
|
5
|
+
* It checks the rules that must not rot:
|
|
6
|
+
* - exactly one human organizer;
|
|
7
|
+
* - every AI role is a bot and never holds a forbidden permission;
|
|
8
|
+
* - Class A decisions are human-only; Class B can be drafted by AI but not decided;
|
|
9
|
+
* - AI merge allowlist/denylist still protect spec/governance/checker;
|
|
10
|
+
* - contributors and reviewers reference an existing role and a known terms version.
|
|
11
|
+
*
|
|
12
|
+
* Exit codes: 0 all checks pass; 2 at least one error.
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* node 40-checker/scripts/governance-check.mjs [--root <dir>] [--format text|json]
|
|
16
|
+
*/
|
|
17
|
+
import fs from 'node:fs'
|
|
18
|
+
import path from 'node:path'
|
|
19
|
+
import { fileURLToPath } from 'node:url'
|
|
20
|
+
|
|
21
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
|
22
|
+
const DEFAULT_ROOT = path.resolve(HERE, '..', '..')
|
|
23
|
+
const TERMS_VERSION = 'dsh-ct/1'
|
|
24
|
+
const VALUES = new Set(['allow', 'allow-with-allowlist', 'propose', 'review', 'deny'])
|
|
25
|
+
const LEVELS = new Set(['signed', 'verified', 'trusted', 'entity-covered'])
|
|
26
|
+
const REVIEW_STATUS = new Set(['provisional', 'active', 'dormant', 'revoked'])
|
|
27
|
+
|
|
28
|
+
function readJson(root, rel) {
|
|
29
|
+
const file = path.join(root, rel)
|
|
30
|
+
return JSON.parse(fs.readFileSync(file, 'utf8'))
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function validateGovernance({ roles, contributors, reviewers, coi }) {
|
|
34
|
+
const errors = []
|
|
35
|
+
const warnings = []
|
|
36
|
+
const err = (m) => errors.push(m)
|
|
37
|
+
const warn = (m) => warnings.push(m)
|
|
38
|
+
|
|
39
|
+
if (!roles || roles.schema !== 'dsh-governance/1') err('roles.schema must be dsh-governance/1')
|
|
40
|
+
if (!contributors || contributors.schema !== 'dsh-contributors/1') err('contributors.schema must be dsh-contributors/1')
|
|
41
|
+
if (!reviewers || reviewers.schema !== 'dsh-reviewers/1') err('reviewers.schema must be dsh-reviewers/1')
|
|
42
|
+
if (!coi || coi.schema !== 'dsh-coi/1') err('coi.schema must be dsh-coi/1')
|
|
43
|
+
if (!roles || !roles.roles || !roles.matrix) {
|
|
44
|
+
return { errors: errors.concat('roles.json must contain roles and matrix'), warnings }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 1. Roles and matrix.
|
|
48
|
+
const roleIds = Object.keys(roles.roles)
|
|
49
|
+
const humanRoles = roleIds.filter((id) => roles.roles[id].humanOnly === true)
|
|
50
|
+
const organizers = roleIds.filter((id) => id === 'organizer' || roles.roles[id].appointment === 'creator')
|
|
51
|
+
if (organizers.length !== 1) err(`exactly one organizer is required, found ${organizers.length}`)
|
|
52
|
+
if (!humanRoles.includes('organizer')) err('organizer must be humanOnly')
|
|
53
|
+
if (roles.roles.organizer && roles.roles.organizer.maxHolders !== 1) err('organizer.maxHolders must be 1')
|
|
54
|
+
if (!humanRoles.includes('maintainer')) err('maintainer must be humanOnly')
|
|
55
|
+
if (!humanRoles.includes('reviewer')) err('reviewer must be humanOnly')
|
|
56
|
+
|
|
57
|
+
const permissions = roles.permissions
|
|
58
|
+
if (!Array.isArray(permissions) || permissions.length < 10) err('roles.permissions must list the permission keys')
|
|
59
|
+
for (const id of roleIds) {
|
|
60
|
+
const role = roles.roles[id]
|
|
61
|
+
if (typeof role.label !== 'string' || !role.label) err(`${id}.label is required`)
|
|
62
|
+
if (role.bot === true && role.humanOnly === true) err(`${id} cannot be both bot and humanOnly`)
|
|
63
|
+
if (typeof role.bot !== 'boolean') err(`${id}.bot must be boolean`)
|
|
64
|
+
if (typeof role.humanOnly !== 'boolean') err(`${id}.humanOnly must be boolean`)
|
|
65
|
+
const row = roles.matrix[id]
|
|
66
|
+
if (!row) { err(`matrix.${id} is missing`); continue }
|
|
67
|
+
for (const permission of permissions) {
|
|
68
|
+
if (!(permission in row)) err(`matrix.${id}.${permission} is missing`)
|
|
69
|
+
else if (!VALUES.has(row[permission])) err(`matrix.${id}.${permission} has invalid value ${row[permission]}`)
|
|
70
|
+
}
|
|
71
|
+
for (const key of Object.keys(row)) {
|
|
72
|
+
if (!permissions.includes(key)) err(`matrix.${id}.${key} is not a declared permission`)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// 2. AI boundaries.
|
|
77
|
+
const ai = roles.ai || {}
|
|
78
|
+
const forbidden = new Set(ai.forbiddenPermissions || [])
|
|
79
|
+
for (const id of roleIds.filter((rid) => roles.roles[rid].bot === true)) {
|
|
80
|
+
for (const permission of forbidden) {
|
|
81
|
+
const value = roles.matrix[id]?.[permission]
|
|
82
|
+
if (value && value !== 'deny' && value !== 'propose') {
|
|
83
|
+
err(`AI role ${id} must not hold ${permission} (got ${value})`)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (roles.matrix[id]?.['appeal.decide'] !== 'deny') err(`AI role ${id} must not decide appeals`)
|
|
87
|
+
if (roles.matrix[id]?.['repo.merge.main'] === 'allow') err(`AI role ${id} needs allow-with-allowlist, not allow`)
|
|
88
|
+
}
|
|
89
|
+
if (!Array.isArray(ai.mergeAllowlist) || ai.mergeAllowlist.length === 0) err('ai.mergeAllowlist must not be empty')
|
|
90
|
+
if (!Array.isArray(ai.mergeDenylist)) err('ai.mergeDenylist must be an array')
|
|
91
|
+
for (const required of ['spec/', 'governance/', '40-checker/']) {
|
|
92
|
+
if (!(ai.mergeDenylist || []).includes(required)) err(`ai.mergeDenylist must include ${required}`)
|
|
93
|
+
}
|
|
94
|
+
if (!Array.isArray(ai.mustNot) || ai.mustNot.length < 3) warn('ai.mustNot should list the hard prohibitions')
|
|
95
|
+
|
|
96
|
+
// 3. Decision classes.
|
|
97
|
+
for (const [cls, rule] of Object.entries(roles.decisions || {})) {
|
|
98
|
+
const approvers = rule.approver || []
|
|
99
|
+
if (approvers.length === 0) err(`decision ${cls} has no approver`)
|
|
100
|
+
for (const approver of approvers) {
|
|
101
|
+
if (!roles.roles[approver]) err(`decision ${cls} references unknown role ${approver}`)
|
|
102
|
+
}
|
|
103
|
+
if (cls === 'A') {
|
|
104
|
+
if (rule.aiAllowed !== false) err('decision A must set aiAllowed=false')
|
|
105
|
+
for (const approver of approvers) {
|
|
106
|
+
if (roles.roles[approver]?.humanOnly !== true) err(`decision A approver ${approver} must be human`)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (cls === 'B') {
|
|
110
|
+
if (rule.aiAllowed !== true) err('decision B should allow AI drafting')
|
|
111
|
+
if (rule.aiRole !== 'draft-only') err('decision B aiRole must be draft-only')
|
|
112
|
+
}
|
|
113
|
+
if (cls === 'D') {
|
|
114
|
+
for (const approver of approvers) {
|
|
115
|
+
if (roles.roles[approver]?.bot !== true) err(`decision D approver ${approver} must be an AI role`)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// 4. Quorum must never give AI a vote.
|
|
121
|
+
for (const [stage, rule] of Object.entries(roles.quorum || {})) {
|
|
122
|
+
if (typeof rule.claim !== 'string' || !/official|provisional|reviewed|consensus/i.test(rule.claim)) {
|
|
123
|
+
warn(`quorum.${stage}.claim should state the claim limit`)
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 5. Contributors.
|
|
128
|
+
const contributorHandles = new Set()
|
|
129
|
+
for (const entry of contributors.contributors || []) {
|
|
130
|
+
if (!entry.handle) { err('contributor entry without handle'); continue }
|
|
131
|
+
if (contributorHandles.has(entry.handle)) err(`duplicate contributor ${entry.handle}`)
|
|
132
|
+
contributorHandles.add(entry.handle)
|
|
133
|
+
if (!LEVELS.has(entry.level)) err(`contributor ${entry.handle} has invalid level ${entry.level}`)
|
|
134
|
+
if (entry.signedOff !== true) err(`contributor ${entry.handle} has no DCO sign-off`)
|
|
135
|
+
if (entry.terms !== contributors.terms) err(`contributor ${entry.handle} terms mismatch`)
|
|
136
|
+
if (entry.terms !== TERMS_VERSION) err(`contributor ${entry.handle} must use ${TERMS_VERSION}`)
|
|
137
|
+
if (entry.entityCla !== null && !/^[0-9a-f]{64}$/.test(entry.entityCla || '')) {
|
|
138
|
+
err(`contributor ${entry.handle} entityCla must be null or a sha256`)
|
|
139
|
+
}
|
|
140
|
+
if (!Array.isArray(entry.coi)) err(`contributor ${entry.handle} must declare coi[]`)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// 6. Reviewers.
|
|
144
|
+
for (const entry of reviewers.reviewers || []) {
|
|
145
|
+
if (!entry.handle) { err('reviewer entry without handle'); continue }
|
|
146
|
+
if (!REVIEW_STATUS.has(entry.status)) err(`reviewer ${entry.handle} has invalid status ${entry.status}`)
|
|
147
|
+
if (!Array.isArray(entry.scopes) || entry.scopes.length === 0) err(`reviewer ${entry.handle} needs scopes[]`)
|
|
148
|
+
if (!entry.expiresAt || Number.isNaN(Date.parse(entry.expiresAt))) err(`reviewer ${entry.handle} needs expiresAt`)
|
|
149
|
+
if (!Array.isArray(entry.coi)) err(`reviewer ${entry.handle} needs coi[]`)
|
|
150
|
+
if (roles.roles[entry.role]?.humanOnly !== true) err(`reviewer ${entry.handle} must reference a human role`)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// 7. COI declarations.
|
|
154
|
+
for (const entry of coi.declarations || []) {
|
|
155
|
+
if (!entry.handle) { err('coi entry without handle'); continue }
|
|
156
|
+
for (const field of roles.coi?.requiredFields || []) {
|
|
157
|
+
if (!(field in entry)) err(`coi ${entry.handle} is missing ${field}`)
|
|
158
|
+
}
|
|
159
|
+
if (entry.reviewDue && Number.isNaN(Date.parse(entry.reviewDue))) err(`coi ${entry.handle} reviewDue is invalid`)
|
|
160
|
+
if (entry.reviewDue && Date.parse(entry.reviewDue) < Date.now()) warn(`coi ${entry.handle} review is overdue`)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// 8. Basic consistency between registries.
|
|
164
|
+
for (const entry of reviewers.reviewers || []) {
|
|
165
|
+
if (entry.handle && !contributorHandles.has(entry.handle)) warn(`reviewer ${entry.handle} is not in contributors.json`)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return { errors, warnings }
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function main(argv = process.argv.slice(2)) {
|
|
172
|
+
let root = DEFAULT_ROOT
|
|
173
|
+
let format = 'text'
|
|
174
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
175
|
+
if (argv[i] === '--root') root = path.resolve(argv[++i])
|
|
176
|
+
else if (argv[i] === '--format') format = argv[++i]
|
|
177
|
+
else if (argv[i] === '--help' || argv[i] === '-h') {
|
|
178
|
+
console.log('usage: governance-check.mjs [--root <dir>] [--format text|json]')
|
|
179
|
+
return 0
|
|
180
|
+
} else {
|
|
181
|
+
console.error(`unknown argument: ${argv[i]}`)
|
|
182
|
+
return 2
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
let data
|
|
186
|
+
try {
|
|
187
|
+
data = {
|
|
188
|
+
roles: readJson(root, 'governance/roles.json'),
|
|
189
|
+
contributors: readJson(root, 'governance/contributors.json'),
|
|
190
|
+
reviewers: readJson(root, 'governance/reviewers.json'),
|
|
191
|
+
coi: readJson(root, 'governance/coi.json'),
|
|
192
|
+
}
|
|
193
|
+
} catch (error) {
|
|
194
|
+
console.error(`governance-check: cannot read input: ${error.message}`)
|
|
195
|
+
return 2
|
|
196
|
+
}
|
|
197
|
+
const result = validateGovernance(data)
|
|
198
|
+
if (format === 'json') {
|
|
199
|
+
console.log(JSON.stringify({ ok: result.errors.length === 0, ...result }, null, 2))
|
|
200
|
+
} else {
|
|
201
|
+
for (const warning of result.warnings) console.log(`WARN ${warning}`)
|
|
202
|
+
for (const error of result.errors) console.log(`FAIL ${error}`)
|
|
203
|
+
console.log(`${result.errors.length === 0 ? 'PASS' : 'FAIL'} governance: ${result.errors.length} error(s), ${result.warnings.length} warning(s)`)
|
|
204
|
+
}
|
|
205
|
+
return result.errors.length === 0 ? 0 : 2
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
209
|
+
process.exitCode = main()
|
|
210
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Build a temporary host farm for L1-L3 runs.
|
|
4
|
+
*
|
|
5
|
+
* The checker itself stays zero-dependency. This script is a *test utility*:
|
|
6
|
+
* it links a DSH checkout's installed dependencies plus every `@deepseek-ai/*`
|
|
7
|
+
* workspace/vendor package into a temp `node_modules`, copies one plugin into
|
|
8
|
+
* `farm/plugins/<name>`, and optionally runs `npm install` / `npm run build`.
|
|
9
|
+
*
|
|
10
|
+
* Linux/WSL is the supported environment (symlinks). Windows may need
|
|
11
|
+
* Developer Mode or an elevated shell for directory junctions.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* node scripts/host-farm.mjs \
|
|
15
|
+
* --plugin /tmp/dsh-verify-samples/foo \
|
|
16
|
+
* --farm /tmp/dsh-farm \
|
|
17
|
+
* --host <dsh-checkout> \
|
|
18
|
+
* --install --build
|
|
19
|
+
*/
|
|
20
|
+
import fs from 'node:fs'
|
|
21
|
+
import path from 'node:path'
|
|
22
|
+
import { spawnSync } from 'node:child_process'
|
|
23
|
+
|
|
24
|
+
function parse(argv) {
|
|
25
|
+
const options = { plugin: null, farm: null, host: '<dsh-checkout>', install: false, build: false, link: false, quiet: false }
|
|
26
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
27
|
+
const arg = argv[i]
|
|
28
|
+
if (arg === '--plugin') options.plugin = argv[++i]
|
|
29
|
+
else if (arg === '--farm') options.farm = argv[++i]
|
|
30
|
+
else if (arg === '--host') options.host = argv[++i]
|
|
31
|
+
else if (arg === '--install') options.install = true
|
|
32
|
+
else if (arg === '--build') options.build = true
|
|
33
|
+
else if (arg === '--link') options.link = true
|
|
34
|
+
else if (arg === '--quiet') options.quiet = true
|
|
35
|
+
else if (arg === '--help' || arg === '-h') { console.log(fs.readFileSync(new URL(import.meta.url), 'utf8').split('\n').slice(0, 20).join('\n')); process.exit(0) }
|
|
36
|
+
else throw new Error(`unknown option: ${arg}`)
|
|
37
|
+
}
|
|
38
|
+
if (!options.plugin) throw new Error('--plugin is required')
|
|
39
|
+
if (!options.farm) throw new Error('--farm is required')
|
|
40
|
+
return options
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function ensureDir(dir) {
|
|
44
|
+
fs.mkdirSync(dir, { recursive: true })
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function link(source, dest) {
|
|
48
|
+
try {
|
|
49
|
+
if (fs.existsSync(dest) || fs.lstatSync(dest, { throwIfNoEntry: false })) return false
|
|
50
|
+
} catch { /* lstat can throw for broken links; fall through */ }
|
|
51
|
+
try {
|
|
52
|
+
fs.symlinkSync(source, dest, process.platform === 'win32' ? 'junction' : 'dir')
|
|
53
|
+
return true
|
|
54
|
+
} catch {
|
|
55
|
+
return false
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function linkNodeModules(host, farm) {
|
|
60
|
+
const sourceModules = path.join(host, 'node_modules')
|
|
61
|
+
const destModules = path.join(farm, 'node_modules')
|
|
62
|
+
ensureDir(destModules)
|
|
63
|
+
let linked = 0
|
|
64
|
+
if (fs.existsSync(sourceModules)) {
|
|
65
|
+
for (const entry of fs.readdirSync(sourceModules, { withFileTypes: true })) {
|
|
66
|
+
if (entry.name === '@deepseek-ai') continue
|
|
67
|
+
const source = path.join(sourceModules, entry.name)
|
|
68
|
+
const dest = path.join(destModules, entry.name)
|
|
69
|
+
if (entry.name.startsWith('@') && entry.isDirectory()) {
|
|
70
|
+
ensureDir(dest)
|
|
71
|
+
for (const child of fs.readdirSync(source, { withFileTypes: true })) {
|
|
72
|
+
if (link(path.join(source, child.name), path.join(dest, child.name))) linked += 1
|
|
73
|
+
}
|
|
74
|
+
} else if (link(source, dest)) linked += 1
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return linked
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function linkWorkspacePackages(host, farm) {
|
|
81
|
+
const scope = path.join(farm, 'node_modules', '@deepseek-ai')
|
|
82
|
+
ensureDir(scope)
|
|
83
|
+
let linked = 0
|
|
84
|
+
const seen = new Set()
|
|
85
|
+
const walk = (directory) => {
|
|
86
|
+
if (!fs.existsSync(directory)) return
|
|
87
|
+
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
88
|
+
if (!entry.isDirectory()) continue
|
|
89
|
+
if (entry.name === 'node_modules' || entry.name === '.git') continue
|
|
90
|
+
const absolute = path.join(directory, entry.name)
|
|
91
|
+
const manifestPath = path.join(absolute, 'package.json')
|
|
92
|
+
if (fs.existsSync(manifestPath)) {
|
|
93
|
+
try {
|
|
94
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
|
|
95
|
+
if (typeof manifest.name === 'string' && manifest.name.startsWith('@deepseek-ai/')) {
|
|
96
|
+
const short = manifest.name.slice('@deepseek-ai/'.length)
|
|
97
|
+
if (!seen.has(short)) {
|
|
98
|
+
seen.add(short)
|
|
99
|
+
if (link(absolute, path.join(scope, short))) linked += 1
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
} catch { /* ignore malformed package.json */ }
|
|
103
|
+
}
|
|
104
|
+
if (entry.name === 'packages' || entry.name === 'vendor') walk(absolute)
|
|
105
|
+
else if (absolute.startsWith(path.join(host, 'packages')) || absolute.startsWith(path.join(host, 'vendor'))) walk(absolute)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
walk(path.join(host, 'packages'))
|
|
109
|
+
walk(path.join(host, 'vendor'))
|
|
110
|
+
return linked
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function copyPlugin(plugin, farm, asLink) {
|
|
114
|
+
const name = path.basename(path.resolve(plugin))
|
|
115
|
+
const dest = path.join(farm, 'plugins', name)
|
|
116
|
+
ensureDir(path.dirname(dest))
|
|
117
|
+
if (fs.existsSync(dest)) fs.rmSync(dest, { recursive: true, force: true })
|
|
118
|
+
if (asLink) {
|
|
119
|
+
fs.symlinkSync(path.resolve(plugin), dest, process.platform === 'win32' ? 'junction' : 'dir')
|
|
120
|
+
} else {
|
|
121
|
+
fs.cpSync(plugin, dest, { recursive: true, dereference: false })
|
|
122
|
+
}
|
|
123
|
+
return { name, dest }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function run(command, args, cwd) {
|
|
127
|
+
const result = spawnSync(command, args, { cwd, stdio: 'inherit', env: { ...process.env, npm_config_audit: 'false', npm_config_fund: 'false' } })
|
|
128
|
+
if (result.error) return { ok: false, error: String(result.error) }
|
|
129
|
+
return { ok: result.status === 0, status: result.status }
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function main() {
|
|
133
|
+
const options = parse(process.argv.slice(2))
|
|
134
|
+
const farm = path.resolve(options.farm)
|
|
135
|
+
const plugin = path.resolve(options.plugin)
|
|
136
|
+
if (!fs.existsSync(path.join(plugin, 'package.json'))) throw new Error(`not a package directory: ${plugin}`)
|
|
137
|
+
if (!fs.existsSync(options.host)) throw new Error(`host checkout not found: ${options.host}`)
|
|
138
|
+
ensureDir(farm)
|
|
139
|
+
const modules = linkNodeModules(options.host, farm)
|
|
140
|
+
const workspace = linkWorkspacePackages(options.host, farm)
|
|
141
|
+
const copied = copyPlugin(plugin, farm, options.link)
|
|
142
|
+
let install = null
|
|
143
|
+
let build = null
|
|
144
|
+
if (options.install) {
|
|
145
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(copied.dest, 'package.json'), 'utf8'))
|
|
146
|
+
if (manifest.dependencies && Object.keys(manifest.dependencies).length > 0) {
|
|
147
|
+
install = run('npm', ['install', '--omit=dev', '--ignore-scripts', '--no-audit', '--no-fund'], copied.dest)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (options.build) {
|
|
151
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(copied.dest, 'package.json'), 'utf8'))
|
|
152
|
+
if (manifest.scripts?.build) build = run('npm', ['run', 'build'], copied.dest)
|
|
153
|
+
}
|
|
154
|
+
const summary = { farm, plugin: copied.dest, linkedModules: modules, linkedWorkspace: workspace, install, build }
|
|
155
|
+
if (!options.quiet) console.log(JSON.stringify(summary, null, 2))
|
|
156
|
+
return copied.dest
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
try {
|
|
160
|
+
const plugin = main()
|
|
161
|
+
console.log(plugin)
|
|
162
|
+
} catch (error) {
|
|
163
|
+
console.error(`host-farm: ${error.message}`)
|
|
164
|
+
process.exitCode = 3
|
|
165
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* J3 + J7 runtime probe on a fixture plugin.
|
|
4
|
+
*
|
|
5
|
+
* J3: an invalid config value must fail loudly with a field path; a valid value
|
|
6
|
+
* and the default must boot.
|
|
7
|
+
* J7: the start line must name the package/version; a keyless boot must reach a
|
|
8
|
+
* diagnosable credential boundary.
|
|
9
|
+
*
|
|
10
|
+
* This is fixture-level evidence. It does not prove that every plugin validates
|
|
11
|
+
* its config or logs a start line.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* node 40-checker/scripts/journey-config-observe.mjs \
|
|
15
|
+
* --package 40-checker/fixtures/flow-config \
|
|
16
|
+
* --dsh /tmp/dsh022/node_modules/@deepseek-ai/dsh/lib/bin.js --json
|
|
17
|
+
*/
|
|
18
|
+
import fs from 'node:fs'
|
|
19
|
+
import os from 'node:os'
|
|
20
|
+
import path from 'node:path'
|
|
21
|
+
import { spawnSync } from 'node:child_process'
|
|
22
|
+
|
|
23
|
+
function parse(argv) {
|
|
24
|
+
const out = { package: null, dsh: process.env.DSH_BIN || 'dsh', json: false, timeout: 120_000 }
|
|
25
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
26
|
+
if (argv[i] === '--package') out.package = argv[++i]
|
|
27
|
+
else if (argv[i] === '--dsh') out.dsh = argv[++i]
|
|
28
|
+
else if (argv[i] === '--json') out.json = true
|
|
29
|
+
else if (argv[i] === '--timeout') out.timeout = Number(argv[++i])
|
|
30
|
+
else if (argv[i] === '--help' || argv[i] === '-h') { console.log('usage: journey-config-observe.mjs --package <dir> [--dsh <bin>] [--json]'); process.exit(0) }
|
|
31
|
+
else throw new Error(`unknown option: ${argv[i]}`)
|
|
32
|
+
}
|
|
33
|
+
if (!out.package) throw new Error('--package is required')
|
|
34
|
+
return out
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function sh(cmd, args, env, timeout) {
|
|
38
|
+
return spawnSync(cmd, args, { encoding: 'utf8', timeout, env, maxBuffer: 8 * 1024 * 1024 })
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function main() {
|
|
42
|
+
const options = parse(process.argv.slice(2))
|
|
43
|
+
const pkg = path.resolve(options.package)
|
|
44
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8'))
|
|
45
|
+
const home = fs.mkdtempSync(path.join(os.tmpdir(), 'dsh-config-'))
|
|
46
|
+
const profile = 'flow-config'
|
|
47
|
+
const env = { ...process.env, DSH_HOME: home }
|
|
48
|
+
delete env.DEEPSEEK_API_KEY
|
|
49
|
+
delete env.OPENAI_API_KEY
|
|
50
|
+
const checks = []
|
|
51
|
+
let dshVersion = null
|
|
52
|
+
const add = (id, result, reason) => checks.push({ id, result, reason })
|
|
53
|
+
try {
|
|
54
|
+
const version = sh(options.dsh, ['--version'], env, 20_000)
|
|
55
|
+
dshVersion = (version.stdout || '').trim()
|
|
56
|
+
const create = sh(options.dsh, ['--profile', profile, '--from-default-profile', 'headless', '--dump-config'], env, options.timeout)
|
|
57
|
+
if (create.status !== 0) {
|
|
58
|
+
add('setup.profile', 'BLOCKED', `profile create exit=${create.status}`)
|
|
59
|
+
} else {
|
|
60
|
+
const install = sh(options.dsh, ['plugin', '--profile', profile, 'add', pkg], env, options.timeout)
|
|
61
|
+
add('setup.install', install.status === 0 ? 'PASS' : 'BLOCKED', `plain dependency install exit=${install.status}`)
|
|
62
|
+
|
|
63
|
+
const overlay = path.join(home, 'flow-config.yml')
|
|
64
|
+
const write = (config) => {
|
|
65
|
+
const body = config === undefined
|
|
66
|
+
? `- insert:\n - id: flow-config\n name: '${manifest.name}'\n`
|
|
67
|
+
: `- insert:\n - id: flow-config\n name: '${manifest.name}'\n config:\n port: ${JSON.stringify(config)}\n`
|
|
68
|
+
fs.writeFileSync(overlay, body)
|
|
69
|
+
}
|
|
70
|
+
const boot = () => sh(options.dsh, ['--profile', profile, '--patch', overlay, 'reply with one short sentence'], env, 60_000)
|
|
71
|
+
|
|
72
|
+
write('not-a-number')
|
|
73
|
+
const invalid = boot()
|
|
74
|
+
const invalidText = `${invalid.stdout}${invalid.stderr}`
|
|
75
|
+
const fieldPath = /config\.port/.test(invalidText)
|
|
76
|
+
add('J3.invalid-field-path', invalid.status !== 0 && fieldPath ? 'PASS' : 'FAIL', `invalid config exit=${invalid.status}; fieldPath=${fieldPath}`)
|
|
77
|
+
|
|
78
|
+
write(8080)
|
|
79
|
+
const valid = boot()
|
|
80
|
+
const validText = `${valid.stdout}${valid.stderr}`
|
|
81
|
+
add('J3.valid-config', valid.status !== 0 && /started \(port=8080\)/.test(validText) ? 'PASS' : 'FAIL', `valid config exit=${valid.status}`)
|
|
82
|
+
add('J7.start-line', /flow-config@1\.0\.0 started/.test(validText) ? 'PASS' : 'FAIL', 'start line names package@version')
|
|
83
|
+
add('J7.diagnosable', /MISSING_CREDENTIAL|no API key|AUTH|credential/i.test(validText) ? 'PASS' : 'FAIL', 'keyless failure reaches a diagnosable credential boundary')
|
|
84
|
+
|
|
85
|
+
write(undefined)
|
|
86
|
+
const defaults = boot()
|
|
87
|
+
add('J3.defaults', /started \(port=default\)/.test(`${defaults.stdout}${defaults.stderr}`) ? 'PASS' : 'FAIL', 'missing config uses the default')
|
|
88
|
+
}
|
|
89
|
+
} finally {
|
|
90
|
+
try { fs.rmSync(home, { recursive: true, force: true }) } catch { /* ignore */ }
|
|
91
|
+
}
|
|
92
|
+
const result = {
|
|
93
|
+
schema: 'dsh-flow-config-observe/1',
|
|
94
|
+
generatedAt: new Date().toISOString(),
|
|
95
|
+
package: manifest.name,
|
|
96
|
+
version: manifest.version,
|
|
97
|
+
environment: { dsh: dshVersion, node: process.version, platform: process.platform },
|
|
98
|
+
checks,
|
|
99
|
+
summary: {
|
|
100
|
+
pass: checks.filter((c) => c.result === 'PASS').length,
|
|
101
|
+
fail: checks.filter((c) => c.result === 'FAIL').length,
|
|
102
|
+
blocked: checks.filter((c) => c.result === 'BLOCKED').length,
|
|
103
|
+
},
|
|
104
|
+
limitations: ['fixture-level only; not every plugin validates config or logs a start line'],
|
|
105
|
+
}
|
|
106
|
+
if (options.json || !process.stdout.isTTY) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`)
|
|
107
|
+
process.exitCode = result.summary.fail > 0 ? 1 : 0
|
|
108
|
+
}
|
|
109
|
+
try { main() } catch (error) { console.error(`journey-config-observe: ${error.message}`); process.exitCode = 3 }
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* J5/J8 static preflight.
|
|
4
|
+
*
|
|
5
|
+
* J5: are capabilities/labels/commitments declared and does the README avoid
|
|
6
|
+
* forbidden claims? The final permissions judgement is still human.
|
|
7
|
+
* J8: is the client/server shape declared (exports["./client"], server entry)?
|
|
8
|
+
* This is a shape preflight, not a browser render probe (see web-probe.mjs).
|
|
9
|
+
*
|
|
10
|
+
* Usage: node 40-checker/scripts/journey-disclosure-shape.mjs --package <dir> [--json]
|
|
11
|
+
*/
|
|
12
|
+
import fs from 'node:fs'
|
|
13
|
+
import path from 'node:path'
|
|
14
|
+
import { spawnSync } from 'node:child_process'
|
|
15
|
+
import { fileURLToPath } from 'node:url'
|
|
16
|
+
|
|
17
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
|
18
|
+
const CHECKER = path.resolve(HERE, '..', 'bin', 'dsh-plugin-verify.mjs')
|
|
19
|
+
const FORBIDDEN = /\b(official|certified|secure|recommended)\b|官方认证|安全审计|推荐标准/i
|
|
20
|
+
|
|
21
|
+
function parse(argv) {
|
|
22
|
+
const out = { package: null, json: false }
|
|
23
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
24
|
+
if (argv[i] === '--package') out.package = argv[++i]
|
|
25
|
+
else if (argv[i] === '--json') out.json = true
|
|
26
|
+
else if (argv[i] === '--help' || argv[i] === '-h') { console.log('usage: journey-disclosure-shape.mjs --package <dir> [--json]'); process.exit(0) }
|
|
27
|
+
else throw new Error(`unknown option: ${argv[i]}`)
|
|
28
|
+
}
|
|
29
|
+
if (!out.package) throw new Error('--package is required')
|
|
30
|
+
return out
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function main() {
|
|
34
|
+
const options = parse(process.argv.slice(2))
|
|
35
|
+
const dir = path.resolve(options.package)
|
|
36
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'))
|
|
37
|
+
const readme = ['README.md', 'readme.md', 'Readme.md'].map((n) => path.join(dir, n)).find((p) => fs.existsSync(p))
|
|
38
|
+
const text = readme ? fs.readFileSync(readme, 'utf8') : ''
|
|
39
|
+
const declared = {
|
|
40
|
+
capabilities: Array.isArray(manifest.dsh?.capabilities),
|
|
41
|
+
labels: Array.isArray(manifest.dsh?.labels),
|
|
42
|
+
commitments: Array.isArray(manifest.dsh?.commitments),
|
|
43
|
+
}
|
|
44
|
+
const forbidden = FORBIDDEN.test(text)
|
|
45
|
+
const run = spawnSync(process.execPath, [CHECKER, dir, '--scope', 'entry', '--entry-claim', 'static', '--format', 'json'], { encoding: 'utf8', timeout: 120_000, maxBuffer: 8 * 1024 * 1024 })
|
|
46
|
+
let checker = null
|
|
47
|
+
try { checker = JSON.parse(run.stdout) } catch { /* leave null */ }
|
|
48
|
+
const byId = new Map((checker?.checks ?? []).map((c) => [c.id, c]))
|
|
49
|
+
const declaration = ['DSC-11', 'DSC-12', 'DSC-13'].map((id) => ({ id, result: byId.get(id)?.result ?? 'NOT-RUN' }))
|
|
50
|
+
const j5 = forbidden ? 'FAIL' : declaration.some((d) => d.result === 'FAIL') ? 'FAIL' : declaration.some((d) => d.result === 'WARN') ? 'WARN' : 'PASS'
|
|
51
|
+
const hasClient = manifest.dsh?.client !== undefined
|
|
52
|
+
const clientExport = Boolean(manifest.exports?.['./client'])
|
|
53
|
+
const serverEntry = Boolean(manifest.exports?.['.'] || manifest.main)
|
|
54
|
+
const j8 = hasClient && !clientExport ? 'FAIL' : hasClient && clientExport && serverEntry ? 'PASS' : 'WARN'
|
|
55
|
+
const result = {
|
|
56
|
+
schema: 'dsh-flow-disclosure-shape/1',
|
|
57
|
+
generatedAt: new Date().toISOString(),
|
|
58
|
+
package: manifest.name,
|
|
59
|
+
version: manifest.version,
|
|
60
|
+
checks: {
|
|
61
|
+
J5: {
|
|
62
|
+
machine: j5,
|
|
63
|
+
humanReview: 'required',
|
|
64
|
+
declared,
|
|
65
|
+
forbiddenWords: forbidden,
|
|
66
|
+
declaration,
|
|
67
|
+
reason: forbidden ? 'README contains a forbidden claim' : 'permissions/disclosure judgement is still human',
|
|
68
|
+
},
|
|
69
|
+
J8: {
|
|
70
|
+
machine: j8,
|
|
71
|
+
humanReview: 'required for UI/render',
|
|
72
|
+
hasClient,
|
|
73
|
+
clientExport,
|
|
74
|
+
serverEntry,
|
|
75
|
+
reason: hasClient ? 'client shape checked statically; render not tested' : 'no dsh.client declaration',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
limitations: ['J5 is a disclosure preflight, not a security review', 'J8 is a shape preflight, not a browser render probe'],
|
|
79
|
+
}
|
|
80
|
+
if (options.json || !process.stdout.isTTY) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`)
|
|
81
|
+
process.exitCode = [j5, j8].includes('FAIL') ? 1 : 0
|
|
82
|
+
}
|
|
83
|
+
try { main() } catch (error) { console.error(`journey-disclosure-shape: ${error.message}`); process.exitCode = 3 }
|