From 4a9e0c1c97d56843ceecdebb50c447daed61b330 Mon Sep 17 00:00:00 2001 From: lo2589 <651471652@qq.com> Date: Sat, 7 Nov 2026 01:36:54 -0800 Subject: [PATCH 1/4] fix: expose DSH bundle metadata at repository root --- package.json | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..09855a6 --- /dev/null +++ b/package.json @@ -0,0 +1,36 @@ +{ + "name": "jsonseek-dsh", + "version": "0.1.6", + "description": "DeepSeek Harness plugin: 14 model-callable JSON/JSONL tools, powered by the jsonseek CLI.", + "license": "MIT", + "type": "module", + "main": "./npm/index.js", + "exports": { + ".": "./npm/index.js", + "./cordis.patch.yml": "./cordis.patch.yml", + "./package.json": "./package.json" + }, + "files": [ + "npm/index.js", + "cordis.patch.yml", + "README.md", + "LICENSE" + ], + "keywords": [ + "deepseek-harness", + "dsh", + "dsh-plugin", + "json", + "jsonl", + "agent-tools" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lo2589/JSONSEEK.git" + }, + "dsh": { + "bundle": { + "patch": "./cordis.patch.yml" + } + } +} From f6ce40e938fb4d7f731b950ada232a5b05480916 Mon Sep 17 00:00:00 2001 From: lo2589 <651471652@qq.com> Date: Sat, 7 Nov 2026 01:37:23 -0800 Subject: [PATCH 2/4] ci: validate DSH install package and npm pack output --- .github/workflows/dsh-marketplace.yml | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/dsh-marketplace.yml diff --git a/.github/workflows/dsh-marketplace.yml b/.github/workflows/dsh-marketplace.yml new file mode 100644 index 0000000..b873502 --- /dev/null +++ b/.github/workflows/dsh-marketplace.yml @@ -0,0 +1,40 @@ +name: DSH marketplace package checks +on: + push: + branches: [main] + pull_request: +permissions: + contents: read +jobs: + verify-dsh-package: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Validate DSH bundle and packed files + run: | + node --input-type=module <<'NODE' + import fs from 'node:fs'; + import assert from 'node:assert/strict'; + import path from 'node:path'; + const p = JSON.parse(fs.readFileSync('package.json', 'utf8')); + assert(p.name && p.dsh?.bundle?.patch, 'Missing DSH bundle metadata'); + const patch = p.dsh.bundle.patch; + assert(fs.existsSync(patch), 'Missing bundle patch: ' + patch); + assert(fs.readFileSync(patch, 'utf8').includes('name: ' + p.name), 'Bundle patch must name installed package'); + const entry = p.main; + assert(entry && fs.existsSync(entry), 'Missing host entry: ' + entry); + if (p.dsh.client) { + const client = p.exports?.['./client']; + assert(client && fs.existsSync(client), 'Missing web client export'); + } + const included = (p.files || []).map(v=>v.replace(/\/$/, '')); + for (const f of [entry, patch, p.dsh.client ? p.exports['./client'] : null].filter(Boolean)) { + assert(included.some(v => f === v || f.startsWith(v + '/')), 'File excluded from npm pack: ' + f); + } + console.log('Bundle metadata and file inclusion OK'); + NODE + - name: Inspect npm tarball manifest + run: npm pack --dry-run --json > /tmp/dsh-pack.json && node --input-type=module -e "import fs from 'node:fs';const a=JSON.parse(fs.readFileSync('/tmp/dsh-pack.json'));if(!a[0]?.files?.length)process.exit(1);console.log(a[0].files.map(f=>f.path).join('\\n'))" From e3ebdf0cb50c9c04c8d270aee2823f4b5e6c3cd1 Mon Sep 17 00:00:00 2001 From: lo2589 <651471652@qq.com> Date: Sat, 7 Nov 2026 01:38:55 -0800 Subject: [PATCH 3/4] ci: normalize relative paths for npm file inclusion assertions --- .github/workflows/dsh-marketplace.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dsh-marketplace.yml b/.github/workflows/dsh-marketplace.yml index b873502..3b454be 100644 --- a/.github/workflows/dsh-marketplace.yml +++ b/.github/workflows/dsh-marketplace.yml @@ -30,9 +30,11 @@ jobs: const client = p.exports?.['./client']; assert(client && fs.existsSync(client), 'Missing web client export'); } - const included = (p.files || []).map(v=>v.replace(/\/$/, '')); + const clean = v => v.replace(/^\\.\\//, '').replace(/\\/$/, ''); + const included = (p.files || []).map(clean); for (const f of [entry, patch, p.dsh.client ? p.exports['./client'] : null].filter(Boolean)) { - assert(included.some(v => f === v || f.startsWith(v + '/')), 'File excluded from npm pack: ' + f); + const normalized = clean(f); + assert(included.some(v => normalized === v || normalized.startsWith(v + '/')), 'File excluded from npm pack: ' + f); } console.log('Bundle metadata and file inclusion OK'); NODE From 8bb8cbf9fa5c04039a1aa2d22d33fa42a15417d2 Mon Sep 17 00:00:00 2001 From: lo2589 <651471652@qq.com> Date: Sat, 7 Nov 2026 01:39:56 -0800 Subject: [PATCH 4/4] ci: fix malformed regexp in packaging check --- .github/workflows/dsh-marketplace.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dsh-marketplace.yml b/.github/workflows/dsh-marketplace.yml index 3b454be..9cdbf38 100644 --- a/.github/workflows/dsh-marketplace.yml +++ b/.github/workflows/dsh-marketplace.yml @@ -30,7 +30,7 @@ jobs: const client = p.exports?.['./client']; assert(client && fs.existsSync(client), 'Missing web client export'); } - const clean = v => v.replace(/^\\.\\//, '').replace(/\\/$/, ''); + const clean = v => { const s = v.startsWith('./') ? v.slice(2) : v; return s.endsWith('/') ? s.slice(0, -1) : s; }; const included = (p.files || []).map(clean); for (const f of [entry, patch, p.dsh.client ? p.exports['./client'] : null].filter(Boolean)) { const normalized = clean(f);