Compare commits
87 Commits
release/do
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
c6c9422582 | |
|
|
16dc2ef613 | |
|
|
cac50053e6 | |
|
|
d62f402bc4 | |
|
|
99ce4a2d04 | |
|
|
b69ab33ac4 | |
|
|
285e52cbe1 | |
|
|
f15e6e4f6d | |
|
|
ad01d35e49 | |
|
|
3952f3fa17 | |
|
|
3e385eba0a | |
|
|
1403ddb6ae | |
|
|
15550a1969 | |
|
|
070728d750 | |
|
|
0df14fea85 | |
|
|
e1f3820dee | |
|
|
23bd4aae37 | |
|
|
852c4279fa | |
|
|
0f773e0686 | |
|
|
ad5a2cfc5b | |
|
|
ccfc5ec9ad | |
|
|
935ccdfe69 | |
|
|
3d43b86b8b | |
|
|
fe9d0dc05d | |
|
|
ba0092146d | |
|
|
124d29baeb | |
|
|
94edc8d1b0 | |
|
|
54bfcc9b8c | |
|
|
256ecb71b3 | |
|
|
b08fcf468d | |
|
|
2e873432e3 | |
|
|
cce138e185 | |
|
|
b64dd13834 | |
|
|
558cf6ab64 | |
|
|
bee351b403 | |
|
|
56e8eb50a9 | |
|
|
1bf216107c | |
|
|
572ba64121 | |
|
|
7724553a02 | |
|
|
8a1962cfe7 | |
|
|
e2794243f7 | |
|
|
b4ce49e26f | |
|
|
a71890d0ea | |
|
|
4045217721 | |
|
|
bd4a428c1a | |
|
|
faec4baa1e | |
|
|
da4792ebfa | |
|
|
ab44eefcdb | |
|
|
34f5276433 | |
|
|
b525a8034b | |
|
|
4ca7cc00b6 | |
|
|
a5d91739bc | |
|
|
431fb76c56 | |
|
|
320a68034d | |
|
|
67ef4707bd | |
|
|
69fda57200 | |
|
|
6824d446e1 | |
|
|
407d2715e6 | |
|
|
0d0c0f8763 | |
|
|
abf5335bb6 | |
|
|
72b05e48e4 | |
|
|
e97b6ecdb8 | |
|
|
4a8b104afd | |
|
|
2f4d535542 | |
|
|
c31577d6ca | |
|
|
ac4bbfa8ff | |
|
|
4339ecd741 | |
|
|
130293f7fb | |
|
|
401fcc28aa | |
|
|
60bc021f02 | |
|
|
f9d00d6d7f | |
|
|
e670921272 | |
|
|
1a0be2f31b | |
|
|
006fbd13c1 | |
|
|
5e0bfa063f | |
|
|
3523d46431 | |
|
|
c14a555810 | |
|
|
4eb30331f7 | |
|
|
80e71f3f01 | |
|
|
9e4d801ee7 | |
|
|
92540bf507 | |
|
|
e41fd25708 | |
|
|
50e86a233c | |
|
|
732ee546a3 | |
|
|
a544b34b69 | |
|
|
4e8777bacb | |
|
|
b55349e31c |
14
README.md
14
README.md
|
|
@ -1,7 +1,8 @@
|
|||
# QQ 插件索引(DSH 插件市场索引 · 格式 1)
|
||||
|
||||
给 DSH「发现」页用的自定义插件索引,列出 QQ-dsh 全家桶和它的四个组件,
|
||||
安装源是本组织在 git.qyhhh.top 上的仓库,固定到发布提交。
|
||||
另收录两个外部插件:GitHub 上的 ds-harness-remote-fast 和 dsh-better-sidebar;
|
||||
安装源是本组织在 git.qyhhh.top 上的仓库或对应的 GitHub 仓库,固定到发布提交。
|
||||
|
||||
## 在 DSH 里使用
|
||||
|
||||
|
|
@ -14,16 +15,11 @@
|
|||
|
||||
## 维护
|
||||
|
||||
发布批次统一记录在 `release-manifest.json`(组件版本、固定提交、全家桶版本)。
|
||||
`make-index.mjs` 优先从该清单生成索引;清单不存在时才回退到读取各仓库分支 HEAD。
|
||||
发版后:
|
||||
发新版后重新生成索引(自动读取各仓库分支 HEAD 的提交号与时间):
|
||||
|
||||
```sh
|
||||
node make-index.mjs
|
||||
node verify-release.mjs --qq-dsh ../QQ-dsh --sources ..
|
||||
```
|
||||
|
||||
`verify-release.mjs` 同时检查独立插件索引与 QQ-dsh 全家桶的版本、固定提交和
|
||||
构建产物是否存在,两个安装渠道不一致时直接失败。生成/校验后把 `index.json`
|
||||
提交到本仓库即可。索引格式由 DSH 自带的 `@deepseek-ai/dsh-plugin-market-index`
|
||||
校验器定义。
|
||||
生成后把 `index.json` 提交到本仓库即可。索引格式由 DSH 自带的
|
||||
`@deepseek-ai/dsh-plugin-market-index` 校验器定义。
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<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>
|
||||
|
After Width: | Height: | Size: 731 B |
|
|
@ -0,0 +1,14 @@
|
|||
<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>
|
||||
|
After Width: | Height: | Size: 663 B |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
99
index.json
99
index.json
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"format": 1,
|
||||
"title": "QQ 插件索引",
|
||||
"description": "newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。",
|
||||
"description": "newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,另收录外部依赖 Better Sidebar;源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。",
|
||||
"metadata": {
|
||||
"categories": {},
|
||||
"labels": {},
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "dsh-sansheng-liubu-mode",
|
||||
"title": "三省六部工作台",
|
||||
"name": "dsh-sansheng-liubu",
|
||||
"title": "三省六部 · 十席工作台",
|
||||
"icon": "icons/sansheng.png",
|
||||
"description": "十个独立部门会话的派发、审批与三层记忆(部门 / 项目 / 长期),原生 DSH 工作台后端。右侧栏「朝堂」朝堂面板已并入本包,装这一条即可。",
|
||||
"description": "每个项目固定十席角色与独立会话。丞相自然下派,关键歧义才启动 Grill Me。门下通过后尚书并行派工,部门可在任务里会商。项目决定与原生审批集中在「待你处理」,丞相可用原生后台助手整理需求、跟踪进度和汇总反馈。",
|
||||
"author": "newbie",
|
||||
"homepage": "https://git.qyhhh.top/DeepsSeekHarness/dsh-sansheng-liubu",
|
||||
"repository": {
|
||||
|
|
@ -29,12 +29,12 @@
|
|||
},
|
||||
"versions": [
|
||||
{
|
||||
"version": "0.14.0",
|
||||
"publishTimestamp": 1794480735,
|
||||
"version": "1.1.5",
|
||||
"publishTimestamp": 1795864370,
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-sansheng-liubu",
|
||||
"commit": "efc4a32c758d1df9bb3c22bb53f1359e0d433ab1"
|
||||
"commit": "819a57d7694723cb279f84a10b33398d66253229"
|
||||
},
|
||||
"engines": {}
|
||||
}
|
||||
|
|
@ -62,12 +62,12 @@
|
|||
},
|
||||
"versions": [
|
||||
{
|
||||
"version": "0.9.1",
|
||||
"publishTimestamp": 1794480737,
|
||||
"version": "0.10.5",
|
||||
"publishTimestamp": 1795835418,
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-brain",
|
||||
"commit": "89af1f4c7c6acf65be93792f68eade383ec0d794"
|
||||
"commit": "645e47bd5908a94d0b91945952e5fa7eda92bcb7"
|
||||
},
|
||||
"engines": {}
|
||||
}
|
||||
|
|
@ -95,12 +95,12 @@
|
|||
},
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"publishTimestamp": 1794480736,
|
||||
"version": "1.3.1",
|
||||
"publishTimestamp": 1795054575,
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.qyhhh.top/DeepsSeekHarness/workspace-groups-remote",
|
||||
"commit": "71d63ced6e0da3c3798a2e81c0e1de8215edc594"
|
||||
"commit": "97f4c3e07ffa665cfa2b5476625b4f1715f18295"
|
||||
},
|
||||
"engines": {}
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
"name": "dsh-better-chat",
|
||||
"title": "dsh-better-chat · 聊天增强",
|
||||
"icon": "icons/chat.png",
|
||||
"description": "审批卡回车确认 / Esc 拒绝;权限界面移除「完全权限」,且不再改写已有会话的权限选择。",
|
||||
"description": "审批卡快捷键(可自定义)、权限界面移除「完全权限」、插件商店更新按钮;对话页提供左侧 AI 回复气泡与下方过程折叠、默认 6 轮长会话渲染窗口与顶部锚定加载、WorkBuddy 风格右侧目录时间轴,以及外观/气泡样式/宽度自定义设置,并保留官方聊天契约让 dsh-btw 等插件照常工作。",
|
||||
"author": "newbie",
|
||||
"homepage": "https://git.qyhhh.top/DeepsSeekHarness/dsh-better-chat",
|
||||
"repository": {
|
||||
|
|
@ -127,12 +127,77 @@
|
|||
},
|
||||
"versions": [
|
||||
{
|
||||
"version": "0.3.1",
|
||||
"publishTimestamp": 1794480736,
|
||||
"version": "1.4.0",
|
||||
"publishTimestamp": 1795931763,
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.qyhhh.top/DeepsSeekHarness/dsh-better-chat",
|
||||
"commit": "f2f11528bdd8779b247265ca8ba667287af12cd7"
|
||||
"commit": "7d8dfb1e5dc6e943961a874d346179e24e15a74f"
|
||||
},
|
||||
"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": {}
|
||||
}
|
||||
|
|
|
|||
132
make-index.mjs
132
make-index.mjs
|
|
@ -1,10 +1,12 @@
|
|||
// Regenerate the QQ plugin market index (DSH plugin-market index format 1).
|
||||
//
|
||||
// The index lists the four QQ-dsh component plugins. Each entry's install
|
||||
// source is a git source pinned to the repo HEAD commit; versions are read
|
||||
// live from each repo's package.json, so re-running this after a release is
|
||||
// the whole maintenance story. The Gitea repos are public, so the branch
|
||||
// endpoints are read anonymously. Output: ./index.json next to this script.
|
||||
// The index lists the four QQ-dsh component plugins, plus one external plugin
|
||||
// (ds-harness-remote-fast) whose canonical source is GitHub's rainow fork, not
|
||||
// our Gitea mirror. Each entry's install source is a git source pinned to the
|
||||
// repo HEAD commit; versions are read live from each repo's package.json, so
|
||||
// re-running this after a release is the whole maintenance story. The repos are
|
||||
// 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
|
||||
// the same day): Gitea's npm registry strips the `dsh` field from the
|
||||
|
|
@ -17,23 +19,22 @@
|
|||
// overwrite); DSH's native update button does not apply to git sources.
|
||||
//
|
||||
// node make-index.mjs
|
||||
import { existsSync, readFileSync, writeFileSync } from 'node:fs'
|
||||
import { writeFileSync } from 'node:fs'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const API = 'https://git.qyhhh.top/api/v1'
|
||||
const WEB = 'https://git.qyhhh.top/DeepsSeekHarness'
|
||||
const ROOT = dirname(fileURLToPath(import.meta.url))
|
||||
const MANIFEST = join(ROOT, 'release-manifest.json')
|
||||
const GITHUB = 'https://api.github.com'
|
||||
|
||||
const PLUGINS = [
|
||||
{
|
||||
name: 'dsh-sansheng-liubu-mode',
|
||||
name: 'dsh-sansheng-liubu',
|
||||
icon: 'icons/sansheng.png',
|
||||
repo: 'dsh-sansheng-liubu',
|
||||
branch: 'master',
|
||||
title: '三省六部工作台',
|
||||
description: '十个独立部门会话的派发、审批与三层记忆(部门 / 项目 / 长期),原生 DSH 工作台后端。右侧栏「朝堂」朝堂面板已并入本包,装这一条即可。',
|
||||
branch: 'release/v1.1.5',
|
||||
title: '三省六部 · 十席工作台',
|
||||
description: '每个项目固定十席角色与独立会话。丞相自然下派,关键歧义才启动 Grill Me。门下通过后尚书并行派工,部门可在任务里会商。项目决定与原生审批集中在「待你处理」,丞相可用原生后台助手整理需求、跟踪进度和汇总反馈。',
|
||||
keywords: ['workbench', 'sansheng', '三省六部'],
|
||||
},
|
||||
{
|
||||
|
|
@ -60,72 +61,109 @@ const PLUGINS = [
|
|||
repo: 'dsh-better-chat',
|
||||
branch: 'main',
|
||||
title: 'dsh-better-chat · 聊天增强',
|
||||
description: '审批卡回车确认 / Esc 拒绝;权限界面移除「完全权限」,且不再改写已有会话的权限选择。',
|
||||
description: '审批卡快捷键(可自定义)、权限界面移除「完全权限」、插件商店更新按钮;对话页提供左侧 AI 回复气泡与下方过程折叠、默认 6 轮长会话渲染窗口与顶部锚定加载、WorkBuddy 风格右侧目录时间轴,以及外观/气泡样式/宽度自定义设置,并保留官方聊天契约让 dsh-btw 等插件照常工作。',
|
||||
keywords: ['chat', 'approval', 'permission'],
|
||||
},
|
||||
{
|
||||
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) {
|
||||
const response = await fetch(`${API}/repos/DeepsSeekHarness/${repo}/branches/${branch}`)
|
||||
const response = await fetchRetry(`${API}/repos/DeepsSeekHarness/${repo}/branches/${encodeURIComponent(branch)}`)
|
||||
if (!response.ok) throw new Error(`branch lookup failed for ${repo}/${branch}: HTTP ${response.status}`)
|
||||
const body = await response.json()
|
||||
return { commit: body.commit.id, timestamp: Math.floor(Date.parse(body.commit.timestamp) / 1000) }
|
||||
}
|
||||
|
||||
const release = existsSync(MANIFEST) ? JSON.parse(readFileSync(MANIFEST, 'utf8')) : null
|
||||
const componentByRepo = new Map()
|
||||
for (const component of release?.components ?? []) componentByRepo.set(component.repo, component)
|
||||
async function githubHead(owner, repo, branch) {
|
||||
const response = await fetchRetry(`${GITHUB}/repos/${owner}/${repo}/commits/${encodeURIComponent(branch)}`, {
|
||||
headers: { Accept: 'application/vnd.github+json', 'User-Agent': 'dsh-market-index' },
|
||||
})
|
||||
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 = []
|
||||
for (const plugin of PLUGINS) {
|
||||
let version
|
||||
let commit
|
||||
let timestamp
|
||||
const pinned = componentByRepo.get(plugin.repo)
|
||||
if (pinned !== undefined) {
|
||||
// The checked-in release manifest is the source of truth for a published
|
||||
// batch: version, commit and index entry are generated from the SAME record.
|
||||
if (pinned.package !== plugin.name) throw new Error(`release manifest package mismatch for ${plugin.repo}: ${pinned.package} vs ${plugin.name}`)
|
||||
version = pinned.version
|
||||
commit = pinned.sourceCommit
|
||||
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}`)
|
||||
const pkgFile = await pkgResponse.json()
|
||||
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}`)
|
||||
version = pkg.version
|
||||
commit = head.commit
|
||||
timestamp = head.timestamp
|
||||
}
|
||||
const onGithub = plugin.github === true
|
||||
const head = onGithub ? await githubHead(plugin.owner, plugin.repo, plugin.branch) : await headOf(plugin.repo, plugin.branch)
|
||||
const web = onGithub ? `https://github.com/${plugin.owner}/${plugin.repo}` : `${WEB}/${plugin.repo}`
|
||||
// Read package.json through each host's API. For GitHub we deliberately use
|
||||
// the contents API (api.github.com), not raw.githubusercontent.com: the raw
|
||||
// host resets TLS connections from this machine while the API stays reliable.
|
||||
const pkgUrl = onGithub
|
||||
? `${GITHUB}/repos/${plugin.owner}/${plugin.repo}/contents/package.json?ref=${head.commit}`
|
||||
: `${API}/repos/DeepsSeekHarness/${plugin.repo}/contents/package.json?ref=${head.commit}`
|
||||
const pkgResponse = await fetchRetry(pkgUrl, onGithub
|
||||
? { headers: { Accept: 'application/vnd.github+json', 'User-Agent': 'dsh-market-index' } }
|
||||
: {})
|
||||
if (!pkgResponse.ok) throw new Error(`package.json fetch failed for ${plugin.repo}: HTTP ${pkgResponse.status}`)
|
||||
const pkgFile = await pkgResponse.json()
|
||||
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}`)
|
||||
const version = pkg.version
|
||||
plugins.push({
|
||||
name: plugin.name,
|
||||
title: plugin.title,
|
||||
icon: plugin.icon,
|
||||
description: plugin.description,
|
||||
author: 'newbie',
|
||||
homepage: `${WEB}/${plugin.repo}`,
|
||||
repository: { url: `${WEB}/${plugin.repo}` },
|
||||
author: plugin.author || 'newbie',
|
||||
homepage: web,
|
||||
repository: { url: web },
|
||||
metadata: { keywords: plugin.keywords, labels: [], sortKeys: {} },
|
||||
versions: [
|
||||
{
|
||||
version: version,
|
||||
publishTimestamp: timestamp,
|
||||
source: { type: 'git', url: `${WEB}/${plugin.repo}`, commit: commit },
|
||||
publishTimestamp: head.timestamp,
|
||||
source: { type: 'git', url: web, commit: head.commit },
|
||||
engines: {},
|
||||
},
|
||||
],
|
||||
})
|
||||
console.log(`${plugin.name} ${version} @ ${String(commit).slice(0, 8)}${pinned ? ' (release-manifest)' : ' (live)'}`)
|
||||
console.log(`${plugin.name} ${version} @ ${head.commit.slice(0, 8)}`)
|
||||
}
|
||||
|
||||
const index = {
|
||||
format: 1,
|
||||
title: 'QQ 插件索引',
|
||||
description: 'newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。',
|
||||
description: 'newbie 的 DSH 插件索引:QQ-dsh 全家桶及其四个组件,另收录外部依赖 Better Sidebar;源码托管在 git.qyhhh.top 的 DeepsSeekHarness 组织。',
|
||||
metadata: { categories: {}, labels: {}, sortKeys: {} },
|
||||
plugins,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,50 +1,50 @@
|
|||
{
|
||||
"format": 1,
|
||||
"generatedAt": "2026-11-12T18:53:45+08:00",
|
||||
"generatedAt": "2026-11-29T05:56:03.000Z",
|
||||
"components": [
|
||||
{
|
||||
"id": "dsh-sansheng-liubu",
|
||||
"package": "dsh-sansheng-liubu-mode",
|
||||
"version": "0.14.0",
|
||||
"package": "dsh-sansheng-liubu",
|
||||
"version": "1.1.2",
|
||||
"repo": "dsh-sansheng-liubu",
|
||||
"branch": "fix/workbench-entry-project-isolation",
|
||||
"sourceCommit": "efc4a32c758d1df9bb3c22bb53f1359e0d433ab1",
|
||||
"publishTimestamp": 1794480735
|
||||
"branch": "release/v1.1.2",
|
||||
"sourceCommit": "fc414a542b4306f8469ccf028ce933cee3b1b938",
|
||||
"publishTimestamp": 1795684440
|
||||
},
|
||||
{
|
||||
"id": "dsh-brain",
|
||||
"package": "dsh-brain",
|
||||
"version": "0.9.1",
|
||||
"version": "0.10.2",
|
||||
"repo": "dsh-brain",
|
||||
"branch": "fix/skill-sync-source-state",
|
||||
"sourceCommit": "89af1f4c7c6acf65be93792f68eade383ec0d794",
|
||||
"publishTimestamp": 1794480737
|
||||
"branch": "main",
|
||||
"sourceCommit": "7a4ad249fc469ebbd4872f827f1b6b89c7a1a574",
|
||||
"publishTimestamp": 1795695017
|
||||
},
|
||||
{
|
||||
"id": "workspace-groups-remote",
|
||||
"package": "workspace-groups-remote",
|
||||
"version": "1.1.0",
|
||||
"version": "1.3.1",
|
||||
"repo": "workspace-groups-remote",
|
||||
"branch": "fix/folders-state-display-dedupe",
|
||||
"sourceCommit": "71d63ced6e0da3c3798a2e81c0e1de8215edc594",
|
||||
"publishTimestamp": 1794480736
|
||||
"branch": "main",
|
||||
"sourceCommit": "97f4c3e07ffa665cfa2b5476625b4f1715f18295",
|
||||
"publishTimestamp": 1795054575
|
||||
},
|
||||
{
|
||||
"id": "dsh-better-chat",
|
||||
"package": "dsh-better-chat",
|
||||
"version": "0.3.1",
|
||||
"version": "1.4.0",
|
||||
"repo": "dsh-better-chat",
|
||||
"branch": "fix/permission-no-overwrite",
|
||||
"sourceCommit": "f2f11528bdd8779b247265ca8ba667287af12cd7",
|
||||
"publishTimestamp": 1794480736
|
||||
"branch": "main",
|
||||
"sourceCommit": "7d8dfb1e5dc6e943961a874d346179e24e15a74f",
|
||||
"publishTimestamp": 1795931763
|
||||
}
|
||||
],
|
||||
"bundle": {
|
||||
"name": "qq-dsh",
|
||||
"package": "qq-dsh",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.1",
|
||||
"repo": "QQ-dsh",
|
||||
"branch": "feat/components-0.14",
|
||||
"sourceCommit": "e466cc3fe29655fcb34362da67ff9a44e30be490"
|
||||
"sourceCommit": "3960386d138b0cbe1d65ecb8e8cdc162352c562b"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
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))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@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"
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
// 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
|
||||
}
|
||||
Loading…
Reference in New Issue