Compare commits

..

No commits in common. "main" and "release/workspace-groups-1.3.0-r2" have entirely different histories.

10 changed files with 93 additions and 370 deletions

View File

@ -1,8 +1,7 @@
# QQ 插件索引(DSH 插件市场索引 · 格式 1) # QQ 插件索引(DSH 插件市场索引 · 格式 1)
给 DSH「发现」页用的自定义插件索引,列出 QQ-dsh 全家桶和它的四个组件, 给 DSH「发现」页用的自定义插件索引,列出 QQ-dsh 全家桶和它的四个组件,
另收录两个外部插件:GitHub 上的 ds-harness-remote-fast 和 dsh-better-sidebar; 安装源是本组织在 git.qyhhh.top 上的仓库,固定到发布提交。
安装源是本组织在 git.qyhhh.top 上的仓库或对应的 GitHub 仓库,固定到发布提交。
## 在 DSH 里使用 ## 在 DSH 里使用
@ -15,11 +14,16 @@
## 维护 ## 维护
发新版后重新生成索引(自动读取各仓库分支 HEAD 的提交号与时间): 发布批次统一记录在 `release-manifest.json`(组件版本、固定提交、全家桶版本)。
`make-index.mjs` 优先从该清单生成索引;清单不存在时才回退到读取各仓库分支 HEAD。
发版后:
```sh ```sh
node make-index.mjs node make-index.mjs
node verify-release.mjs --qq-dsh ../QQ-dsh --sources ..
``` ```
生成后把 `index.json` 提交到本仓库即可。索引格式由 DSH 自带的 `verify-release.mjs` 同时检查独立插件索引与 QQ-dsh 全家桶的版本、固定提交和
`@deepseek-ai/dsh-plugin-market-index` 校验器定义。 构建产物是否存在,两个安装渠道不一致时直接失败。生成/校验后把 `index.json`
提交到本仓库即可。索引格式由 DSH 自带的 `@deepseek-ai/dsh-plugin-market-index`
校验器定义。

View File

@ -1,16 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#f8a91c"/>
<stop offset="1" stop-color="#d96c06"/>
</linearGradient>
</defs>
<rect width="512" height="512" rx="112" fill="url(#bg)"/>
<ellipse cx="256" cy="70" rx="300" ry="130" fill="#ffffff" opacity="0.08"/>
<g stroke="#ffffff" stroke-width="28" fill="none" stroke-linecap="round">
<path d="M135 183 A148 148 0 0 1 377 183"/>
<path d="M175 212 A99 99 0 0 1 337 212"/>
<path d="M213 239 A52 52 0 0 1 299 239"/>
</g>
<polygon points="276,244 218,330 250,330 232,404 300,308 264,308" fill="#ffffff"/>
</svg>

Before

Width:  |  Height:  |  Size: 731 B

View File

@ -1,14 +0,0 @@
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="6.5" y="9" width="23" height="18" rx="2.5" fill="url(#a)" />
<rect x="21.5" y="9" width="8" height="18" rx="2.5" fill="url(#b)" />
<defs>
<linearGradient id="a" x1="6.5" y1="9" x2="29.5" y2="27" gradientUnits="userSpaceOnUse">
<stop stop-color="#69B9FF" />
<stop offset="1" stop-color="#324DE2" />
</linearGradient>
<linearGradient id="b" x1="25.5" y1="9" x2="25.5" y2="27" gradientUnits="userSpaceOnUse">
<stop stop-color="#45E7A4" />
<stop offset="1" stop-color="#05909D" />
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,7 +1,7 @@
{ {
"format": 1, "format": 1,
"title": "QQ 插件索引", "title": "QQ 插件索引",
"description": "newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,另收录外部依赖 Better Sidebar;源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。", "description": "newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。",
"metadata": { "metadata": {
"categories": {}, "categories": {},
"labels": {}, "labels": {},
@ -9,10 +9,10 @@
}, },
"plugins": [ "plugins": [
{ {
"name": "dsh-sansheng-liubu", "name": "dsh-sansheng-liubu-mode",
"title": "三省六部 · 十席工作台", "title": "三省六部工作台",
"icon": "icons/sansheng.png", "icon": "icons/sansheng.png",
"description": "每个项目固定十席角色与独立会话。丞相自然下派,关键歧义才启动 Grill Me。门下通过后尚书并行派工,部门可在任务里会商。项目决定与原生审批集中在「待你处理」,丞相可用原生后台助手整理需求、跟踪进度和汇总反馈。", "description": "十个独立部门会话的派发、审批与三层记忆(部门 / 项目 / 长期),原生 DSH 工作台后端。右侧栏「朝堂」朝堂面板已并入本包,装这一条即可。",
"author": "newbie", "author": "newbie",
"homepage": "https://git.qyhhh.top/DeepsSeekHarness/dsh-sansheng-liubu", "homepage": "https://git.qyhhh.top/DeepsSeekHarness/dsh-sansheng-liubu",
"repository": { "repository": {
@ -29,12 +29,12 @@
}, },
"versions": [ "versions": [
{ {
"version": "1.1.5", "version": "0.14.0",
"publishTimestamp": 1795864370, "publishTimestamp": 1794480735,
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-sansheng-liubu", "url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-sansheng-liubu",
"commit": "819a57d7694723cb279f84a10b33398d66253229" "commit": "efc4a32c758d1df9bb3c22bb53f1359e0d433ab1"
}, },
"engines": {} "engines": {}
} }
@ -62,12 +62,12 @@
}, },
"versions": [ "versions": [
{ {
"version": "0.10.5", "version": "0.9.5",
"publishTimestamp": 1795835418, "publishTimestamp": 1794539486,
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-brain", "url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-brain",
"commit": "645e47bd5908a94d0b91945952e5fa7eda92bcb7" "commit": "4579dad2517d0590bb0f4ee757b1e565c4ed1875"
}, },
"engines": {} "engines": {}
} }
@ -95,12 +95,12 @@
}, },
"versions": [ "versions": [
{ {
"version": "1.3.1", "version": "1.3.0",
"publishTimestamp": 1795054575, "publishTimestamp": 1794539664,
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.qyhhh.top/DeepsSeekHarness/workspace-groups-remote", "url": "https://git.qyhhh.top/DeepsSeekHarness/workspace-groups-remote",
"commit": "97f4c3e07ffa665cfa2b5476625b4f1715f18295" "commit": "637c62f1f347bbd65bc0c856e9fc164ff2abc312"
}, },
"engines": {} "engines": {}
} }
@ -108,9 +108,9 @@
}, },
{ {
"name": "dsh-better-chat", "name": "dsh-better-chat",
"title": "dsh-better-chat · 聊天增强", "title": "dsh-better-chat · 聊天增强与阅读视图",
"icon": "icons/chat.png", "icon": "icons/chat.png",
"description": "审批卡快捷键(可自定义)、权限界面移除「完全权限」、插件商店更新按钮;对话页提供左侧 AI 回复气泡与下方过程折叠、默认 6 轮长会话渲染窗口与顶部锚定加载、WorkBuddy 风格右侧目录时间轴,以及外观/气泡样式/宽度自定义设置,并保留官方聊天契约让 dsh-btw 等插件照常工作。", "description": "审批卡快捷键(可自定义)、权限界面移除「完全权限」、插件商店更新按钮,以及合并自 dsh-better-display 的阅读视图(过程折叠、毛玻璃、mcp-app 交互卡片)。",
"author": "newbie", "author": "newbie",
"homepage": "https://git.qyhhh.top/DeepsSeekHarness/dsh-better-chat", "homepage": "https://git.qyhhh.top/DeepsSeekHarness/dsh-better-chat",
"repository": { "repository": {
@ -120,84 +120,20 @@
"keywords": [ "keywords": [
"chat", "chat",
"approval", "approval",
"permission" "permission",
"reader"
], ],
"labels": [], "labels": [],
"sortKeys": {} "sortKeys": {}
}, },
"versions": [ "versions": [
{ {
"version": "1.4.0", "version": "1.0.1",
"publishTimestamp": 1795931763, "publishTimestamp": 1794535495,
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-better-chat", "url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-better-chat",
"commit": "7d8dfb1e5dc6e943961a874d346179e24e15a74f" "commit": "5c80061f08cec764131300008d4d5396612936a3"
},
"engines": {}
}
]
},
{
"name": "ds-harness-remote-fast",
"title": "ds-harness-remote-fast · 远程极速版",
"icon": "icons/remote-fast.png",
"description": "ds-harness-remote 的极速分支(rainow):主机端首屏快照裁剪,解决大会话帧超限断连;服务端与客户端不用换,加密与配对与原版一致。安装源为 GitHub 上的 rainow/ds-harness-remote-fast。",
"author": "newbie",
"homepage": "https://github.com/rainow/ds-harness-remote-fast",
"repository": {
"url": "https://github.com/rainow/ds-harness-remote-fast"
},
"metadata": {
"keywords": [
"remote",
"远程",
"fast"
],
"labels": [],
"sortKeys": {}
},
"versions": [
{
"version": "0.6.8-fast.1",
"publishTimestamp": 1795665151,
"source": {
"type": "git",
"url": "https://github.com/rainow/ds-harness-remote-fast",
"commit": "20188ec9044a4b4add15651ba89f240dd96a4a42"
},
"engines": {}
}
]
},
{
"name": "dsh-better-sidebar",
"title": "Better Sidebar · 右栏整合",
"icon": "icons/better-sidebar.svg",
"description": "把文件树、编辑器、改动、任务与侧边对话收进一列右栏,按会话分开;并向其他插件提供注册右栏标签与文件查看器的服务。三省六部的 Better Sidebar 子插件依赖它。安装源为 GitHub 上的 omdsh-dev/DSH-better-sidebar,固定到 v0.33.0。",
"author": "omdsh-dev",
"homepage": "https://github.com/omdsh-dev/DSH-better-sidebar",
"repository": {
"url": "https://github.com/omdsh-dev/DSH-better-sidebar"
},
"metadata": {
"keywords": [
"sidebar",
"editor",
"files",
"better-sidebar"
],
"labels": [],
"sortKeys": {}
},
"versions": [
{
"version": "0.33.0",
"publishTimestamp": 1795502227,
"source": {
"type": "git",
"url": "https://github.com/omdsh-dev/DSH-better-sidebar",
"commit": "0f4b87c49dc6ae4aef7371be0a78f9d277a7b4e0"
}, },
"engines": {} "engines": {}
} }

View File

@ -1,12 +1,10 @@
// Regenerate the QQ plugin market index (DSH plugin-market index format 1). // Regenerate the QQ plugin market index (DSH plugin-market index format 1).
// //
// The index lists the four QQ-dsh component plugins, plus one external plugin // The index lists the four QQ-dsh component plugins. Each entry's install
// (ds-harness-remote-fast) whose canonical source is GitHub's rainow fork, not // source is a git source pinned to the repo HEAD commit; versions are read
// our Gitea mirror. Each entry's install source is a git source pinned to the // live from each repo's package.json, so re-running this after a release is
// repo HEAD commit; versions are read live from each repo's package.json, so // the whole maintenance story. The Gitea repos are public, so the branch
// re-running this after a release is the whole maintenance story. The repos are // endpoints are read anonymously. Output: ./index.json next to this script.
// public, so the endpoints are read anonymously. Output: ./index.json next to
// this script.
// //
// Why git and not the org's Gitea npm registry (tried 2026-11-12, reverted // Why git and not the org's Gitea npm registry (tried 2026-11-12, reverted
// the same day): Gitea's npm registry strips the `dsh` field from the // the same day): Gitea's npm registry strips the `dsh` field from the
@ -19,22 +17,23 @@
// overwrite); DSH's native update button does not apply to git sources. // overwrite); DSH's native update button does not apply to git sources.
// //
// node make-index.mjs // node make-index.mjs
import { writeFileSync } from 'node:fs' import { existsSync, readFileSync, writeFileSync } from 'node:fs'
import { dirname, join } from 'node:path' import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'
const API = 'https://git.qyhhh.top/api/v1' const API = 'https://git.qyhhh.top/api/v1'
const WEB = 'https://git.qyhhh.top/DeepsSeekHarness' const WEB = 'https://git.qyhhh.top/DeepsSeekHarness'
const GITHUB = 'https://api.github.com' const ROOT = dirname(fileURLToPath(import.meta.url))
const MANIFEST = join(ROOT, 'release-manifest.json')
const PLUGINS = [ const PLUGINS = [
{ {
name: 'dsh-sansheng-liubu', name: 'dsh-sansheng-liubu-mode',
icon: 'icons/sansheng.png', icon: 'icons/sansheng.png',
repo: 'dsh-sansheng-liubu', repo: 'dsh-sansheng-liubu',
branch: 'release/v1.1.5', branch: 'master',
title: '三省六部 · 十席工作台', title: '三省六部工作台',
description: '每个项目固定十席角色与独立会话。丞相自然下派,关键歧义才启动 Grill Me。门下通过后尚书并行派工,部门可在任务里会商。项目决定与原生审批集中在「待你处理」,丞相可用原生后台助手整理需求、跟踪进度和汇总反馈。', description: '十个独立部门会话的派发、审批与三层记忆(部门 / 项目 / 长期),原生 DSH 工作台后端。右侧栏「朝堂」朝堂面板已并入本包,装这一条即可。',
keywords: ['workbench', 'sansheng', '三省六部'], keywords: ['workbench', 'sansheng', '三省六部'],
}, },
{ {
@ -60,110 +59,73 @@ const PLUGINS = [
icon: 'icons/chat.png', icon: 'icons/chat.png',
repo: 'dsh-better-chat', repo: 'dsh-better-chat',
branch: 'main', branch: 'main',
title: 'dsh-better-chat · 聊天增强', title: 'dsh-better-chat · 聊天增强与阅读视图',
description: '审批卡快捷键(可自定义)、权限界面移除「完全权限」、插件商店更新按钮;对话页提供左侧 AI 回复气泡与下方过程折叠、默认 6 轮长会话渲染窗口与顶部锚定加载、WorkBuddy 风格右侧目录时间轴,以及外观/气泡样式/宽度自定义设置,并保留官方聊天契约让 dsh-btw 等插件照常工作。', description: '审批卡快捷键(可自定义)、权限界面移除「完全权限」、插件商店更新按钮,以及合并自 dsh-better-display 的阅读视图(过程折叠、毛玻璃、mcp-app 交互卡片)。',
keywords: ['chat', 'approval', 'permission'], keywords: ['chat', 'approval', 'permission', 'reader'],
},
{
name: 'ds-harness-remote-fast',
icon: 'icons/remote-fast.png',
repo: 'ds-harness-remote-fast',
branch: 'lite',
github: true,
owner: 'rainow',
title: 'ds-harness-remote-fast · 远程极速版',
description: 'ds-harness-remote 的极速分支(rainow):主机端首屏快照裁剪,解决大会话帧超限断连;服务端与客户端不用换,加密与配对与原版一致。安装源为 GitHub 上的 rainow/ds-harness-remote-fast。',
keywords: ['remote', '远程', 'fast'],
},
{
name: 'dsh-better-sidebar',
icon: 'icons/better-sidebar.svg',
repo: 'DSH-better-sidebar',
branch: 'v0.33.0',
github: true,
owner: 'omdsh-dev',
author: 'omdsh-dev',
title: 'Better Sidebar · 右栏整合',
description: '把文件树、编辑器、改动、任务与侧边对话收进一列右栏,按会话分开;并向其他插件提供注册右栏标签与文件查看器的服务。三省六部的 Better Sidebar 子插件依赖它。安装源为 GitHub 上的 omdsh-dev/DSH-better-sidebar,固定到 v0.33.0。',
keywords: ['sidebar', 'editor', 'files', 'better-sidebar'],
}, },
] ]
// Transient resets to GitHub are common from this host; retry a few times
// with a growing pause before giving up (the unattended updater relies on it).
async function fetchRetry(url, options = {}, attempts = 5) {
let lastError
for (let attempt = 1; attempt <= attempts; attempt += 1) {
try {
return await fetch(url, options)
} catch (error) {
lastError = error
if (attempt < attempts) await new Promise((resolve) => setTimeout(resolve, attempt * 500))
}
}
throw lastError
}
async function headOf(repo, branch) { async function headOf(repo, branch) {
const response = await fetchRetry(`${API}/repos/DeepsSeekHarness/${repo}/branches/${encodeURIComponent(branch)}`) const response = await fetch(`${API}/repos/DeepsSeekHarness/${repo}/branches/${branch}`)
if (!response.ok) throw new Error(`branch lookup failed for ${repo}/${branch}: HTTP ${response.status}`) if (!response.ok) throw new Error(`branch lookup failed for ${repo}/${branch}: HTTP ${response.status}`)
const body = await response.json() const body = await response.json()
return { commit: body.commit.id, timestamp: Math.floor(Date.parse(body.commit.timestamp) / 1000) } return { commit: body.commit.id, timestamp: Math.floor(Date.parse(body.commit.timestamp) / 1000) }
} }
async function githubHead(owner, repo, branch) { const release = existsSync(MANIFEST) ? JSON.parse(readFileSync(MANIFEST, 'utf8')) : null
const response = await fetchRetry(`${GITHUB}/repos/${owner}/${repo}/commits/${encodeURIComponent(branch)}`, { const componentByRepo = new Map()
headers: { Accept: 'application/vnd.github+json', 'User-Agent': 'dsh-market-index' }, for (const component of release?.components ?? []) componentByRepo.set(component.repo, component)
})
if (!response.ok) throw new Error(`github commit lookup failed for ${owner}/${repo}@${branch}: HTTP ${response.status}`)
const body = await response.json()
return { commit: body.sha, timestamp: Math.floor(Date.parse(body.commit.committer.date) / 1000) }
}
const plugins = [] const plugins = []
for (const plugin of PLUGINS) { for (const plugin of PLUGINS) {
const onGithub = plugin.github === true let version
const head = onGithub ? await githubHead(plugin.owner, plugin.repo, plugin.branch) : await headOf(plugin.repo, plugin.branch) let commit
const web = onGithub ? `https://github.com/${plugin.owner}/${plugin.repo}` : `${WEB}/${plugin.repo}` let timestamp
// Read package.json through each host's API. For GitHub we deliberately use const pinned = componentByRepo.get(plugin.repo)
// the contents API (api.github.com), not raw.githubusercontent.com: the raw if (pinned !== undefined) {
// host resets TLS connections from this machine while the API stays reliable. // The checked-in release manifest is the source of truth for a published
const pkgUrl = onGithub // batch: version, commit and index entry are generated from the SAME record.
? `${GITHUB}/repos/${plugin.owner}/${plugin.repo}/contents/package.json?ref=${head.commit}` if (pinned.package !== plugin.name) throw new Error(`release manifest package mismatch for ${plugin.repo}: ${pinned.package} vs ${plugin.name}`)
: `${API}/repos/DeepsSeekHarness/${plugin.repo}/contents/package.json?ref=${head.commit}` version = pinned.version
const pkgResponse = await fetchRetry(pkgUrl, onGithub commit = pinned.sourceCommit
? { headers: { Accept: 'application/vnd.github+json', 'User-Agent': 'dsh-market-index' } } timestamp = pinned.publishTimestamp ?? Math.floor(Date.now() / 1000)
: {}) if (!/^[0-9a-f]{40}$/i.test(commit)) throw new Error(`release manifest has no pinned commit for ${plugin.repo}`)
} else {
const head = await headOf(plugin.repo, plugin.branch)
const pkgResponse = await fetch(`${API}/repos/DeepsSeekHarness/${plugin.repo}/contents/package.json?ref=${plugin.branch}`)
if (!pkgResponse.ok) throw new Error(`package.json fetch failed for ${plugin.repo}: HTTP ${pkgResponse.status}`) if (!pkgResponse.ok) throw new Error(`package.json fetch failed for ${plugin.repo}: HTTP ${pkgResponse.status}`)
const pkgFile = await pkgResponse.json() const pkgFile = await pkgResponse.json()
const pkg = JSON.parse(Buffer.from(pkgFile.content, 'base64').toString('utf8')) const pkg = JSON.parse(Buffer.from(pkgFile.content, 'base64').toString('utf8'))
if (pkg.name !== plugin.name) throw new Error(`name mismatch for ${plugin.repo}: index says ${plugin.name}, package.json says ${pkg.name}`) if (pkg.name !== plugin.name) throw new Error(`name mismatch for ${plugin.repo}: index says ${plugin.name}, package.json says ${pkg.name}`)
const version = pkg.version version = pkg.version
commit = head.commit
timestamp = head.timestamp
}
plugins.push({ plugins.push({
name: plugin.name, name: plugin.name,
title: plugin.title, title: plugin.title,
icon: plugin.icon, icon: plugin.icon,
description: plugin.description, description: plugin.description,
author: plugin.author || 'newbie', author: 'newbie',
homepage: web, homepage: `${WEB}/${plugin.repo}`,
repository: { url: web }, repository: { url: `${WEB}/${plugin.repo}` },
metadata: { keywords: plugin.keywords, labels: [], sortKeys: {} }, metadata: { keywords: plugin.keywords, labels: [], sortKeys: {} },
versions: [ versions: [
{ {
version: version, version: version,
publishTimestamp: head.timestamp, publishTimestamp: timestamp,
source: { type: 'git', url: web, commit: head.commit }, source: { type: 'git', url: `${WEB}/${plugin.repo}`, commit: commit },
engines: {}, engines: {},
}, },
], ],
}) })
console.log(`${plugin.name} ${version} @ ${head.commit.slice(0, 8)}`) console.log(`${plugin.name} ${version} @ ${String(commit).slice(0, 8)}${pinned ? ' (release-manifest)' : ' (live)'}`)
} }
const index = { const index = {
format: 1, format: 1,
title: 'QQ 插件索引', title: 'QQ 插件索引',
description: 'newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,另收录外部依赖 Better Sidebar;源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。', description: 'newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。',
metadata: { categories: {}, labels: {}, sortKeys: {} }, metadata: { categories: {}, labels: {}, sortKeys: {} },
plugins, plugins,
} }

View File

@ -1,42 +1,42 @@
{ {
"format": 1, "format": 1,
"generatedAt": "2026-11-29T05:56:03.000Z", "generatedAt": "2026-11-13T11:14:24+08:00",
"components": [ "components": [
{ {
"id": "dsh-sansheng-liubu", "id": "dsh-sansheng-liubu",
"package": "dsh-sansheng-liubu", "package": "dsh-sansheng-liubu-mode",
"version": "1.1.2", "version": "0.14.0",
"repo": "dsh-sansheng-liubu", "repo": "dsh-sansheng-liubu",
"branch": "release/v1.1.2", "branch": "fix/workbench-entry-project-isolation",
"sourceCommit": "fc414a542b4306f8469ccf028ce933cee3b1b938", "sourceCommit": "efc4a32c758d1df9bb3c22bb53f1359e0d433ab1",
"publishTimestamp": 1795684440 "publishTimestamp": 1794480735
}, },
{ {
"id": "dsh-brain", "id": "dsh-brain",
"package": "dsh-brain", "package": "dsh-brain",
"version": "0.10.2", "version": "0.9.5",
"repo": "dsh-brain", "repo": "dsh-brain",
"branch": "main", "branch": "main",
"sourceCommit": "7a4ad249fc469ebbd4872f827f1b6b89c7a1a574", "sourceCommit": "4579dad2517d0590bb0f4ee757b1e565c4ed1875",
"publishTimestamp": 1795695017 "publishTimestamp": 1794539486
}, },
{ {
"id": "workspace-groups-remote", "id": "workspace-groups-remote",
"package": "workspace-groups-remote", "package": "workspace-groups-remote",
"version": "1.3.1", "version": "1.3.0",
"repo": "workspace-groups-remote", "repo": "workspace-groups-remote",
"branch": "main", "branch": "main",
"sourceCommit": "97f4c3e07ffa665cfa2b5476625b4f1715f18295", "sourceCommit": "637c62f1f347bbd65bc0c856e9fc164ff2abc312",
"publishTimestamp": 1795054575 "publishTimestamp": 1794539664
}, },
{ {
"id": "dsh-better-chat", "id": "dsh-better-chat",
"package": "dsh-better-chat", "package": "dsh-better-chat",
"version": "1.4.0", "version": "1.0.1",
"repo": "dsh-better-chat", "repo": "dsh-better-chat",
"branch": "main", "branch": "main",
"sourceCommit": "7d8dfb1e5dc6e943961a874d346179e24e15a74f", "sourceCommit": "5c80061f08cec764131300008d4d5396612936a3",
"publishTimestamp": 1795931763 "publishTimestamp": 1794535495
} }
], ],
"bundle": { "bundle": {

View File

@ -1,22 +0,0 @@
import { readFileSync, writeFileSync } from 'node:fs'
const API='https://git.qyhhh.top/api/v1'
const repo='dsh-better-chat'
const br=await (await fetch(API+'/repos/DeepsSeekHarness/'+repo+'/branches/main')).json()
const commit=br.commit.id
const ts=Math.floor(Date.parse(br.commit.timestamp)/1000)
const pkg=JSON.parse(Buffer.from((await (await fetch(API+'/repos/DeepsSeekHarness/'+repo+'/contents/package.json?ref=main')).json()).content,'base64').toString('utf8'))
console.log('live',pkg.version,commit.slice(0,8),ts)
const idx=JSON.parse(readFileSync('index.json','utf8'))
const p=idx.plugins.find(x=>x.name===repo)
p.title='dsh-better-chat · 聊天增强'
p.description='审批卡快捷键(可自定义)、权限界面移除「完全权限」、插件商店更新按钮;1.2 起把阅读页搬进对话页:过程自动折叠、逐字动效、mcp-app 交互卡片、公式与表格排版,并保留官方聊天契约让 dsh-btw 等插件照常工作。'
p.metadata = p.metadata||{}
p.metadata.keywords=['chat','approval','permission']
p.versions=[{version:pkg.version,publishTimestamp:ts,source:{type:'git',url:'https://git.qyhhh.top/DeepsSeekHarness/'+repo,commit},engines:{}}]
writeFileSync('index.json',JSON.stringify(idx,null,2)+'\n')
const mf=JSON.parse(readFileSync('release-manifest.json','utf8'))
const c=mf.components.find(x=>x.repo===repo)
c.version=pkg.version;c.sourceCommit=commit;c.publishTimestamp=ts;c.branch='main'
mf.generatedAt=new Date().toISOString().replace(/\.\d+Z$/,'.000Z')
writeFileSync('release-manifest.json',JSON.stringify(mf,null,2)+'\n')
console.log('done',p.versions[0].version,c.version,c.sourceCommit.slice(0,8))

View File

@ -1,5 +0,0 @@
@echo off
rem Unattended market-index refresh. Registered as the Windows scheduled task
rem "dsh-market-index-update"; logs to update-index.log next to this file.
set NODE=C:\Users\qyh15\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\node\bin\node.exe
"%NODE%" "%~dp0update-index.mjs"

View File

@ -1,122 +0,0 @@
// Unattended index updater.
//
// make-index.mjs reads each plugin repo's live HEAD and rewrites index.json from
// scratch. That is right for a release, but unsafe to run unattended: a plugin
// whose PLUGINS branch lags behind what the index already advertises (today:
// dsh-sansheng-liubu is pinned to release/v1.1.1 while the index says 1.1.2)
// would be downgraded, and plugins missing from PLUGINS would be dropped.
//
// This wrapper regenerates, then merges with a no-downgrade rule and pushes only
// when something really changed. Safe to run on a schedule.
//
// node update-index.mjs # pull, regenerate, merge, commit, push
// node update-index.mjs --dry-run # show what would change, write nothing
import { spawnSync } from 'node:child_process'
import { readFileSync, writeFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
const ROOT = dirname(fileURLToPath(import.meta.url))
const INDEX = join(ROOT, 'index.json')
const DRY = process.argv.includes('--dry-run')
const LOG = join(ROOT, 'update-index.log')
function log(message) {
const line = `[${new Date().toISOString()}] ${message}`
console.log(line)
try {
const previous = readFileSync(LOG, 'utf8').split('\n').filter(Boolean).slice(-500).join('\n')
writeFileSync(LOG, `${previous}${previous === '' ? '' : '\n'}${line}\n`, 'utf8')
} catch {
// Logging must never break the update.
}
}
function run(command, args) {
const result = spawnSync(command, args, { cwd: ROOT, encoding: 'utf8' })
if (result.status !== 0) {
throw new Error(`${command} ${args.join(' ')} failed (${result.status}): ${(result.stderr || '').trim().slice(0, 400)}`)
}
return (result.stdout || '').trim()
}
/** Compare dotted versions; returns >0 when left is newer. */
function compareVersions(left, right) {
const a = String(left ?? '').split('.').map((part) => Number.parseInt(part, 10) || 0)
const b = String(right ?? '').split('.').map((part) => Number.parseInt(part, 10) || 0)
for (let index = 0; index < Math.max(a.length, b.length); index += 1) {
const diff = (a[index] ?? 0) - (b[index] ?? 0)
if (diff !== 0) return diff
}
return 0
}
try {
log('update-index: start')
run('git', ['pull', '--ff-only', '--quiet'])
// make-index.mjs overwrites index.json in place, so keep the committed text
// to diff against and to restore for --dry-run.
const beforeText = readFileSync(INDEX, 'utf8')
const before = JSON.parse(beforeText)
run(process.execPath, [join(ROOT, 'make-index.mjs')])
const generated = JSON.parse(readFileSync(INDEX, 'utf8'))
const existing = new Map((before.plugins ?? []).map((plugin) => [plugin.name, plugin]))
const merged = []
const notes = []
for (const plugin of generated.plugins ?? []) {
const current = existing.get(plugin.name)
if (current === undefined) {
merged.push(plugin)
notes.push(`add ${plugin.name} ${plugin.versions?.[0]?.version}`)
continue
}
const nextVersion = plugin.versions?.[0]?.version
const currentVersion = current.versions?.[0]?.version
if (compareVersions(nextVersion, currentVersion) < 0) {
merged.push(current)
notes.push(`keep ${plugin.name} ${currentVersion} (regenerator saw ${nextVersion})`)
continue
}
if (compareVersions(nextVersion, currentVersion) === 0
&& plugin.versions?.[0]?.source?.commit === current.versions?.[0]?.source?.commit) {
merged.push(current)
continue
}
merged.push(plugin)
notes.push(`update ${plugin.name} ${currentVersion} -> ${nextVersion}`)
}
// Plugins the regenerator no longer knows about stay in the index.
for (const [name, plugin] of existing) {
if (!merged.some((item) => item.name === name)) {
merged.push(plugin)
notes.push(`keep ${name} (absent from generator)`)
}
}
const next = { ...generated, plugins: merged }
const text = `${JSON.stringify(next, null, 2)}\n`
const unchanged = text === beforeText
if (unchanged) {
if (readFileSync(INDEX, 'utf8') !== beforeText) writeFileSync(INDEX, beforeText, 'utf8')
log('update-index: nothing to do')
process.exit(0)
}
for (const note of notes) log(` ${note}`)
if (DRY) {
writeFileSync(INDEX, beforeText, 'utf8')
log('update-index: dry run, not writing')
process.exit(0)
}
writeFileSync(INDEX, text, 'utf8')
run('git', ['add', 'index.json'])
run('git', ['-c', 'user.name=newbie', '-c', 'user.email=newbie@git.qyhhh.top',
'commit', '--quiet', '-m', `market: refresh index\n\n${notes.join('\n')}`])
run('git', ['push', '--quiet', 'origin', 'HEAD:main'])
log('update-index: pushed')
} catch (error) {
log(`update-index: FAILED ${error instanceof Error ? error.message : String(error)}`)
process.exitCode = 1
}