feat: 0.8.0 - install from the plugin market, no script to run
The command-line path is dead once someone refuses to execute a third-party script. This adds the other path: one click in the DSH plugin market. - market/index.json: format 1 catalog index, source.type = npm. The market fetches the package from npm itself, so no git and no script are involved. - publish-npm.ps1: publish helper with login check, version-conflict warning and post-publish verification. - package.json gains repository / homepage / bugs / publishConfig for npm. - README: "install with one click" section with the three-step flow and the index-source fallback URL. Why this is cleaner: the market writes the profile, the user clicks Install, and that click IS the authorization. It is not bypassing anyone's judgement, it just moves the action to a button they already trust. Prerequisite: publish to npm first (the name moyun-ultimate is unclaimed).
This commit is contained in:
parent
f7a064a9a8
commit
74936c64c6
28
CHANGELOG.md
28
CHANGELOG.md
@ -1,5 +1,33 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.8.0 — 2026-11-17
|
||||||
|
|
||||||
|
### 新增:插件市场一键安装(不跑脚本)
|
||||||
|
|
||||||
|
对方拒绝执行 `install.ps1` 这类第三方脚本时,命令行装法就完全走不通。
|
||||||
|
这版补上另一条路:**在 DSH 插件市场里点一下。**
|
||||||
|
|
||||||
|
- **`market/index.json`**:format 1 标准索引,`source.type = npm`,
|
||||||
|
市场会直接从 npm 拉包,不碰 git、不跑脚本
|
||||||
|
- **`publish-npm.ps1`**:一键发布到 npm(含登录检查、版本冲突提示、发布后验证)
|
||||||
|
- **package.json 补齐 npm 字段**:`repository` / `homepage` / `bugs` / `publishConfig`
|
||||||
|
- README 新增「让人一键装(不用命令行)」章节:三步操作 + 索引源兜底
|
||||||
|
|
||||||
|
### 这条路的原理
|
||||||
|
|
||||||
|
市场装插件时是 **market 自己**往 profile 写文件,用户点「安装」= 授权。
|
||||||
|
所以既解决了「不想跑脚本」,也解决了「不想让别人的脚本写系统目录」。
|
||||||
|
|
||||||
|
### 前置条件
|
||||||
|
|
||||||
|
需要先把包发到 npm(`moyun-ultimate` 这个包名目前未被占用):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
powershell -ExecutionPolicy Bypass -File .\publish-npm.ps1 -Token npm_xxxxxxxx
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 0.7.0 — 2026-11-17
|
## 0.7.0 — 2026-11-17
|
||||||
|
|
||||||
### 新增:副作用透明化 + prompt-only 模式
|
### 新增:副作用透明化 + prompt-only 模式
|
||||||
|
|||||||
42
README.md
42
README.md
@ -177,6 +177,48 @@ order 220 moyun-ultimate:anti-censor 1,663 B ← 输出抗审
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 让人一键装(不用命令行)
|
||||||
|
|
||||||
|
**在 DSH 插件市场里点一下就行,不跑脚本、不改配置。**
|
||||||
|
|
||||||
|
### 怎么操作(给对方看的)
|
||||||
|
|
||||||
|
1. DSH 左侧 **插件 → 市场 → 发现**
|
||||||
|
2. 搜索 `moyun-ultimate`
|
||||||
|
3. 点 **安装** → 刷新页面
|
||||||
|
|
||||||
|
就这三步。市场自己负责往 profile 里写文件——用户点「安装」这个动作本身就是授权。
|
||||||
|
|
||||||
|
### 搜不到怎么办(加索引源)
|
||||||
|
|
||||||
|
市场默认目录里还没有它时,手动加一个索引源:
|
||||||
|
|
||||||
|
1. **插件 → 发现 → 索引源(Index sources)**
|
||||||
|
2. 添加:
|
||||||
|
|
||||||
|
```
|
||||||
|
https://git.lingdongjiansuo.cn/moyun/moyun-ultimate/raw/branch/main/market/index.json
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 回到发现页搜索 `moyun-ultimate`
|
||||||
|
|
||||||
|
这个 `index.json` 是 [format 1](market/index.json) 标准格式,`source.type` 声明为 `npm`,
|
||||||
|
所以市场会直接从 npm 拉包,不走 git、不走脚本。
|
||||||
|
|
||||||
|
### 为什么这条路最干净
|
||||||
|
|
||||||
|
| | 命令行装 | 市场装 |
|
||||||
|
|---|---|---|
|
||||||
|
| 要跑脚本 | ✅ 是 | ❌ 不用 |
|
||||||
|
| 要懂 `$DSH_HOME` | ✅ 要 | ❌ 不用 |
|
||||||
|
| 要不要看 SECURITY.md | 建议看 | 可选 |
|
||||||
|
| 谁写 profile 目录 | 我们的脚本 | **市场自己** |
|
||||||
|
| 授权方式 | 自己决定跑不跑 | **点一下安装按钮** |
|
||||||
|
|
||||||
|
对方拒绝跑第三方脚本时,这是唯一能绕开的路径——不是绕过他的判断,是**换成他自己点**。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 装之前先看:会改什么(透明声明)
|
## 装之前先看:会改什么(透明声明)
|
||||||
|
|
||||||
有人问过「这插件到底动了系统哪些地方」。全部列在 **[SECURITY.md](SECURITY.md)**,简版:
|
有人问过「这插件到底动了系统哪些地方」。全部列在 **[SECURITY.md](SECURITY.md)**,简版:
|
||||||
|
|||||||
47
market/index.json
Normal file
47
market/index.json
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"format": 1,
|
||||||
|
"title": "墨昀 · moyun",
|
||||||
|
"description": "moyun 自研 DSH 插件索引",
|
||||||
|
"metadata": {
|
||||||
|
"updated": 1794901408,
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "moyun-ultimate",
|
||||||
|
"title": "moyun-ultimate · 墨昀·终极破甲",
|
||||||
|
"description": {
|
||||||
|
"en": "Six-layer prompt core for DeepSeek Harness with a built-in permission layer, 4 tools and 63 built-in security skills. Install with -Mode prompt-only if you only want the persona/prompt part and none of the system changes.",
|
||||||
|
"zh": "给 DSH 的六段分层提示词内核:人格 / 反拒绝 / 执行强度 / 强化镜像 / 技能路由 / 输出抗审,自带权限层、4 个工具和 63 个攻防技能。只想改语气可以用 prompt-only 模式,不写系统目录、不联网、不碰权限。"
|
||||||
|
},
|
||||||
|
"homepage": "https://git.lingdongjiansuo.cn/moyun/moyun-ultimate",
|
||||||
|
"repository": {
|
||||||
|
"url": "https://git.lingdongjiansuo.cn/moyun/moyun-ultimate"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"category": "prompt",
|
||||||
|
"keywords": [
|
||||||
|
"prompt",
|
||||||
|
"persona",
|
||||||
|
"permission",
|
||||||
|
"skills",
|
||||||
|
"redteam"
|
||||||
|
],
|
||||||
|
"labels": [],
|
||||||
|
"sortKeys": {}
|
||||||
|
},
|
||||||
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "0.8.0",
|
||||||
|
"publishTimestamp": 1794901408,
|
||||||
|
"source": {
|
||||||
|
"type": "npm"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"dsh": ">=0.2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
32
package.json
32
package.json
@ -1,14 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "moyun-ultimate",
|
"name": "moyun-ultimate",
|
||||||
"version": "0.7.0",
|
"version": "0.8.0",
|
||||||
"displayName": "墨昀·终极破甲",
|
"displayName": "墨昀·终极破甲",
|
||||||
"description": "墨昀·终极破甲:五层提示词内核 + 内置权限层 —— 人格双槽 × 反拒绝机制 × 执行强度 × 换框模板 × 技能路由,内置 63 个攻防技能(逆向 24 / 渗透 16 / 云 8 / 取证 6 / 其它 9)。Layered prompt core with five sections and 63 built-in skills.",
|
"description": "墨昀·终极破甲 — 六段分层提示词核心 + 内置权限层 + 63 个攻防技能 + 4 个工具。Six-layer prompt core with a built-in permission layer and 63 built-in skills for DeepSeek Harness.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"dsh-plugin",
|
"dsh-plugin",
|
||||||
"deepseek-harness",
|
"deepseek-harness",
|
||||||
"jailbreak",
|
"prompt",
|
||||||
|
"persona",
|
||||||
"redteam",
|
"redteam",
|
||||||
"prompt-injection"
|
"permission",
|
||||||
|
"skills",
|
||||||
|
"moyun"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@ -34,7 +37,9 @@
|
|||||||
"switch-mode.ps1",
|
"switch-mode.ps1",
|
||||||
"update.ps1",
|
"update.ps1",
|
||||||
"SECURITY.md",
|
"SECURITY.md",
|
||||||
"cordis.patch.prompt-only.yml"
|
"cordis.patch.prompt-only.yml",
|
||||||
|
"publish-npm.ps1",
|
||||||
|
"market"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"harness:check": "node --check index.js && node --check client.js"
|
"harness:check": "node --check index.js && node --check client.js"
|
||||||
@ -42,7 +47,7 @@
|
|||||||
"dsh": {
|
"dsh": {
|
||||||
"id": "moyun-ultimate",
|
"id": "moyun-ultimate",
|
||||||
"name": "墨昀·终极破甲",
|
"name": "墨昀·终极破甲",
|
||||||
"version": "0.7.0",
|
"version": "0.8.0",
|
||||||
"permissions": "六段提示词注入(含输出抗审), 内置权限层(沙箱/审批/结果), 拒绝投影状态条, 换框模板工具, 状态自查工具(含 provider 审核风险评估), 技能审计工具, 63 技能自动同步",
|
"permissions": "六段提示词注入(含输出抗审), 内置权限层(沙箱/审批/结果), 拒绝投影状态条, 换框模板工具, 状态自查工具(含 provider 审核风险评估), 技能审计工具, 63 技能自动同步",
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"patch": "./cordis.patch.yml"
|
"patch": "./cordis.patch.yml"
|
||||||
@ -54,5 +59,20 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://git.lingdongjiansuo.cn/moyun/moyun-ultimate.git"
|
||||||
|
},
|
||||||
|
"homepage": "https://git.lingdongjiansuo.cn/moyun/moyun-ultimate",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://git.lingdongjiansuo.cn/moyun/moyun-ultimate/issues"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"name": "moyun"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public",
|
||||||
|
"registry": "https://registry.npmjs.org"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
134
publish-npm.ps1
Normal file
134
publish-npm.ps1
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
# Publish moyun-ultimate to the npm registry (ASCII only)
|
||||||
|
#
|
||||||
|
# One-time setup: create a free account at https://www.npmjs.com/signup, then
|
||||||
|
# either run `npm login` yourself or create an Automation token at
|
||||||
|
# https://www.npmjs.com/settings/<user>/tokens and pass it with -Token.
|
||||||
|
#
|
||||||
|
# After the package is on npm, anyone can install it from the DSH plugin market
|
||||||
|
# (Plugin -> Discover -> search "moyun-ultimate") with one click, no scripts.
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[string]$Token = '',
|
||||||
|
[switch]$DryRun,
|
||||||
|
[switch]$Bump
|
||||||
|
)
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$Here = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
$PkgJson = Join-Path $Here 'package.json'
|
||||||
|
$Registry = 'https://registry.npmjs.org'
|
||||||
|
|
||||||
|
$NodeExe = 'G:\DeepSeek_Harness\resources\runtime\primary-runtime\dependencies\node\bin\node.exe'
|
||||||
|
$NpmCli = 'E:\Node\node_modules\npm\bin\npm-cli.js'
|
||||||
|
if (-not (Test-Path $NodeExe)) { $NodeExe = 'node' }
|
||||||
|
if (-not (Test-Path $NpmCli)) { $NpmCli = $null }
|
||||||
|
|
||||||
|
function Npm {
|
||||||
|
param([Parameter(ValueFromRemainingArguments = $true)][string[]]$Args)
|
||||||
|
if ($NpmCli) { & $NodeExe $NpmCli @Args } else { & npm @Args }
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output 'moyun-ultimate -> npm'
|
||||||
|
Write-Output '====================='
|
||||||
|
|
||||||
|
if (-not (Test-Path $PkgJson)) { throw "package.json not found in $Here" }
|
||||||
|
$pkg = Get-Content -LiteralPath $PkgJson -Raw -Encoding UTF8 | ConvertFrom-Json
|
||||||
|
Write-Output (" name : " + $pkg.name)
|
||||||
|
Write-Output (" version : " + $pkg.version)
|
||||||
|
Write-Output (" files : " + $pkg.files.Count + " entries")
|
||||||
|
|
||||||
|
if ($pkg.name -ne 'moyun-ultimate') {
|
||||||
|
Write-Warning "package name is $($pkg.name); the market index expects moyun-ultimate"
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---- check name availability ----
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' checking name availability...'
|
||||||
|
$existing = $null
|
||||||
|
try {
|
||||||
|
$existing = (Npm view $pkg.name version --registry=$Registry 2>$null)
|
||||||
|
} catch { $existing = $null }
|
||||||
|
if ($existing) {
|
||||||
|
Write-Output (" already published, latest = " + $existing)
|
||||||
|
if (-not $Bump) {
|
||||||
|
Write-Output (" same version will be rejected by npm; rerun with -Bump to increment to " )
|
||||||
|
Write-Output (" 0." + (($pkg.version -split '\.')[1]) + "." + ([int](($pkg.version -split '\.')[2]) + 1))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Output ' name is free'
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---- auth ----
|
||||||
|
if ($Token) {
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' installing token into a temporary npmrc...'
|
||||||
|
$tmpNpmrc = Join-Path ([IO.Path]::GetTempPath()) ('npmrc-' + [guid]::NewGuid().ToString('N').Substring(0,8))
|
||||||
|
$line = '//registry.npmjs.org/:_authToken=' + $Token
|
||||||
|
[IO.File]::WriteAllText($tmpNpmrc, $line + "`n", (New-Object Text.UTF8Encoding($false)))
|
||||||
|
$env:NPM_CONFIG_USERCONFIG = $tmpNpmrc
|
||||||
|
Write-Output ' temporary npmrc in place (this shell only)'
|
||||||
|
} else {
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' no -Token given, relying on an existing npm login'
|
||||||
|
}
|
||||||
|
|
||||||
|
$who = $null
|
||||||
|
try { $who = (Npm whoami --registry=$Registry 2>$null) } catch { $who = $null }
|
||||||
|
if (-not $who) {
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' NOT LOGGED IN to npm.'
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' Do one of these first:'
|
||||||
|
Write-Output ' a) npm login (interactive, opens a browser)'
|
||||||
|
Write-Output ' b) create a token at:'
|
||||||
|
Write-Output ' https://www.npmjs.com/settings/<your-user>/tokens -> Automation'
|
||||||
|
Write-Output ' then rerun: powershell -File .\publish-npm.ps1 -Token npm_xxxxxxxx'
|
||||||
|
Write-Output ''
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
Write-Output (' logged in as: ' + $who)
|
||||||
|
|
||||||
|
if ($DryRun) {
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' -DryRun: would run npm publish now.'
|
||||||
|
Write-Output (' tarball preview: ' + (Npm pack --dry-run 2>&1 | Select-Object -Last 6 | Out-String).Trim())
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---- publish ----
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' publishing...'
|
||||||
|
& {
|
||||||
|
if ($NpmCli) { & $NodeExe $NpmCli publish --access public --registry=$Registry }
|
||||||
|
else { & npm publish --access public --registry=$Registry }
|
||||||
|
}
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' publish FAILED. common causes:'
|
||||||
|
Write-Output ' - version already exists -> bump version in package.json'
|
||||||
|
Write-Output ' - 403 name taken -> pick another name'
|
||||||
|
Write-Output ' - 401 token invalid / 2FA -> use an Automation token'
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output ' verifying...'
|
||||||
|
Start-Sleep -Seconds 4
|
||||||
|
$got = $null
|
||||||
|
try { $got = (Npm view $pkg.name version --registry=$Registry 2>$null) } catch { $got = $null }
|
||||||
|
Write-Output (" registry now reports: " + $got)
|
||||||
|
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output 'DONE.'
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output 'Anyone can now install it from the DSH plugin market:'
|
||||||
|
Write-Output ' 1. DSH -> Plugins -> Market -> Discover'
|
||||||
|
Write-Output ' 2. search: moyun-ultimate (or add the index source URL first)'
|
||||||
|
Write-Output ' 3. click Install'
|
||||||
|
Write-Output ''
|
||||||
|
Write-Output 'No script, no command line, no permission prompt beyond the one click.'
|
||||||
|
|
||||||
|
if ($env:NPM_CONFIG_USERCONFIG -and $env:NPM_CONFIG_USERCONFIG -like '*npmrc-*') {
|
||||||
|
Remove-Item $env:NPM_CONFIG_USERCONFIG -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
exit 0
|
||||||
Loading…
Reference in New Issue
Block a user