fix: 保留正式目录格式并隔离作者候选协议

This commit is contained in:
2026-10-13 17:13:57 +08:00
parent 0c0f991baa
commit bd973d9751
8 changed files with 5234 additions and 1762 deletions

View File

@@ -9,7 +9,7 @@ DesireCore 客户端启动时会克隆此仓库,并定期同步更新。用户
```text
.
├── README.md # 本文件
├── SCHEMA_VERSION # 数据格式版本号(4.3.0兼容候选,尚未开放新工作台条目)
├── SCHEMA_VERSION # 正式数据格式仍为4.2.0;4.3候选另存独立Schema文件
├── manifest.json # 仓库元数据(版本、统计、维护者)
├── package.json # Registry 校验入口
├── schemas/ # legacy entry、仓库 manifest 与 catalog sidecar Schema
@@ -70,6 +70,10 @@ English: Plugins are App products with host contributions, sharing the canonical
## 固定工作台应用(4.3兼容候选)
本PR只新增 `schemas/registry-entry.v4.3.schema.json` 和合成fixtures/validator,正式 `SCHEMA_VERSION`、manifest数据版本与 `schemas/registry-entry.schema.json` 原4.2字节保持。正式Schema SHA-256仍为 `ea63d6305ae17994e595aea009a131c41300d2b7fdb07ec83cc2c19c37b32038`;4.3候选为 `29ece0b6ae92d2b31d18bbb288b5ed33220dde125924082e1e38c20ace900200`。旧已发行客户端不会因为此Schema先行PR丢失原外部listing或其他类目。
发布顺序:先review候选Schema/fixtures → 主仓固定候选摘要并交付兼容reader(官方候选只允许原类目,可信非官方测试源可验新类型)→ 核心Agent/Market知识经各自PR合入再同步真实main bootstrap → 客户端能力实际发行并验证 → 单独PR将正式Schema激活4.3并开放新entries。每一步取实际提交/发行/目录回执,不把未合入commit固定成官方seed。若有4.3checkout先到新reader,只有版本/字节摘要完全匹配才读原类目;未知或被篡改Schema继续关闭,新作者条目仍等待正式准入。
4.3保留全部4.2旧分支,新增 `web-bundle` 与带 `appRelease` 的 `native-app`/`docker-app` 严格分支。网页包不冒充无执行声明artifact;宿主/容器服务应用使用 `install.method: release`,运行知识与依赖在固定清单中,不限定Node技术栈,也不自动执行说明文字。Docker显式声明固定imageRefs,每项是repository@sha256,复用原容器/执行/服务owner;没有真实身份adapter时保留Agent管理,不因为Schema合法声称直开。新分支声明来源无关releaseDigest、包内manifestPath/definitionPath与实际能力要求,source.sha256仍为下载归档原始字节摘要;descriptor在安装时按来源物化并单独核验。
正式目录未新增工作台条目。`fixtures/authoring/`只有合成的listing-only契约样本,example.test地址不是可获取的应用发行物,不表示上传、审核、运行或第二用户安装已完成。主仓内置seed保持旧受审提交;此候选先经外仓与客户端reader分别review,只有客户端真实app-authoring-v1/web-bundle等能力发行后才能开放新entries。最低版本字符串不能代替握手,旧客户端继续读取旧条目并忽略未知类型,不允许改交付类型绕过。

View File

@@ -1 +1 @@
4.3.0
4.2.0

View File

@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"id": "desirecore-registry-manifest",
"version": "4.3.0",
"version": "4.2.0",
"name": "DesireCore Registry",
"description": "DesireCore 官方注册表 — 应用、插件、MCP 服务、HTTP API 和第三方外部集成的统一目录",
"maintainer": "DesireCore Team",
@@ -15,7 +15,7 @@
"httpApis": 5,
"externalIntegrations": 1
},
"dataVersion": "4.3.0",
"dataVersion": "4.2.0",
"catalogMetadata": {
"version": "1.0.0",
"schema": "schemas/catalog-metadata.v1.schema.json",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@desirecore/registry",
"version": "4.3.0",
"version": "4.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@desirecore/registry",
"version": "4.3.0",
"version": "4.2.0",
"devDependencies": {
"ajv": "8.20.0"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@desirecore/registry",
"version": "4.3.0",
"version": "4.2.0",
"private": true,
"description": "Validated catalog data for the DesireCore Registry",
"type": "module",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -11,21 +11,24 @@ import { validateApplicationReleaseContract } from './catalog/application-releas
const source = join(dirname(fileURLToPath(import.meta.url)),'..')
const temporary = []
afterEach(() => { for (const root of temporary.splice(0)) rmSync(root,{recursive:true,force:true}) })
const schema = JSON.parse(readFileSync(join(source,'schemas/registry-entry.schema.json'),'utf8'))
const schema = JSON.parse(readFileSync(join(source,'schemas/registry-entry.v4.3.schema.json'),'utf8'))
const validate = new Ajv({allErrors:true,strict:true,strictTypes:false,strictRequired:false,validateFormats:false}).compile(schema)
const load = id => JSON.parse(readFileSync(join(source,'fixtures/authoring/entries',id,'manifest.json'),'utf8'))
test('4.3只新增兼容与合成fixtures,正式目录仍无web-bundle或appRelease条目',() => {
test('4.3只新增候选文件和合成fixtures,正式4.2目录不提前激活新格式',() => {
const root = JSON.parse(readFileSync(join(source,'manifest.json'),'utf8'))
assert.equal(root.version,'4.3.0')
assert.equal(root.version,'4.2.0')
assert.equal(readFileSync(join(source,'SCHEMA_VERSION'),'utf8').trim(),'4.2.0')
assert.equal(root.stats.totalEntries,24)
assert.equal(root.stats.webBundles,undefined)
})
test('静态与带服务合成目录三文件保持App语义,两个validator同样通过',() => {
const root = mkdtempSync(join(tmpdir(),'registry-authoring-'));temporary.push(root)
cpSync(join(source,'schemas'),join(root,'schemas'),{recursive:true})
cpSync(join(source,'schemas/registry-entry.v4.3.schema.json'),join(root,'schemas/registry-entry.schema.json'))
cpSync(join(source,'fixtures/authoring/entries'),join(root,'entries'),{recursive:true})
const manifest = JSON.parse(readFileSync(join(source,'manifest.json'),'utf8'))
manifest.version='4.3.0';manifest.dataVersion='4.3.0'
manifest.stats={totalEntries:3,dockerApps:1,nativeApps:1,webBundles:1,mcpServices:0,httpApis:0,externalIntegrations:0}
writeFileSync(join(root,'manifest.json'),JSON.stringify(manifest));writeFileSync(join(root,'SCHEMA_VERSION'),'4.3.0\n')
const report = validateRegistry(root)