diff --git a/README.md b/README.md index ba7cf81..1d1f93e 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ provider sessions plugin. ## Delivery status -The standalone renderer and executable package-v9 `platform-provider` service -are merged on `main`. The renderer uses only public Host React, UI, and +This version contains the standalone renderer and executable package-v13 +`platform-provider` service. The renderer uses only public Host React, UI, and `ctx.platform` contracts. The Node service uses only the public Protocol broker and `ctx.platformProviders.register`; CLIProxy method declarations, response projection, lifecycle, and approval adaptation live here. @@ -16,9 +16,8 @@ workspace handles, method/schema policy, configuration persistence, and the single Provider Fleet. The plugin receives no endpoint, credential, process, filesystem path, raw transport, or Fleet handle. -The plugin pins Protocol `06277f9d117893a9215c991db8c0881df0f0b0f3` and -the formal Host v2 and Codex app-server broker implementation -`cb4d35d8e5a3632c18358ab9d9d04c4dec63e090`. The package remains `private` +The plugin pins Protocol `c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6` and +requires a Host with manifest/package v13 exact-request scope support. The package remains `private` to prevent npm publication; its manifest declares explicit local source distribution, and no packaged installer is available yet. diff --git a/README.zh-Hans.md b/README.zh-Hans.md index 2e7ff1b..37331e0 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -4,7 +4,7 @@ ## 交付状态 -独立 renderer 与可执行的 package-v9 `platform-provider` 服务已经合入 `main`。 +本版本包含独立 renderer 与可执行的 package-v13 `platform-provider` 服务。 Renderer 只使用公开的 Host React、UI 和 `ctx.platform` 合同;Node 服务只使用 公开 Protocol broker 与 `ctx.platformProviders.register`。CLIProxy 的方法声明、 响应投影、生命周期和审批适配均由本仓库维护。 @@ -13,9 +13,8 @@ Host 负责 endpoint 与凭据解析、进程启动、不透明 workspace handle 策略、配置持久化和唯一的 Provider Fleet。插件不会获得 endpoint、凭据、进程、 文件系统路径、原始 transport 或 Fleet handle。 -插件精确固定 Protocol `06277f9d117893a9215c991db8c0881df0f0b0f3`,并依赖 -已正式合入的 Host v2 与 Codex app-server broker -`cb4d35d8e5a3632c18358ab9d9d04c4dec63e090`。包继续保持 `private` 以阻止 npm +插件精确固定 Protocol `c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6`,并要求 Host +支持 manifest/package v13 的 exact-request scope。包继续保持 `private` 以阻止 npm 发布;manifest 声明显式本地源码分发,目前仍未提供安装包。 ## 开发 diff --git a/cordisx-package.json b/cordisx-package.json index 4ea1719..29953fa 100644 --- a/cordisx-package.json +++ b/cordisx-package.json @@ -1,6 +1,6 @@ { - "$schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-package.v9.schema.json", - "schemaVersion": 9, + "$schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-package.v13.schema.json", + "schemaVersion": 13, "id": "cli-proxy-api", "version": "0.1.0", "entry": "./dist/runtime/module.js", @@ -13,13 +13,13 @@ "compatibility": { "runtimeAbi": 1, "protocolSchemas": [ - "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-manifest.v9.schema.json" + "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-manifest.v13.schema.json" ] }, "dependencies": [], "runtimeManifest": { "path": "./runtime-manifest.json", - "schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-manifest.v9.schema.json", - "digest": "sha256:206164ae3566fe02a47f9aad6efac038d7531196860f03c6c156cacfd203bf0f" + "schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-manifest.v13.schema.json", + "digest": "sha256:42c9c6dbcb5435b8f121d83aaf5f81252c0004587837b8d1d2bcceebdd8a69b0" } } diff --git a/package-lock.json b/package-lock.json index 66258f4..a296010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "AGPL-3.0-or-later", "devDependencies": { "@cordisx/eslint-config": "github:cordisx/cordisxmono#c63c2e8c2ba7e11502934a52ad2ce3734e804cdc", - "@cordisx/protocol": "github:cordisx/cordisx-protocol#06277f9d117893a9215c991db8c0881df0f0b0f3", + "@cordisx/protocol": "github:cordisx/cordisx-protocol#c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6", "@deepseek-ai/cordis": "4.0.1", "@deepseek-ai/schemastery": "3.18.1", "@projectwallace/stylelint-plugin": "0.7.0", @@ -18,7 +18,7 @@ "@vitejs/plugin-react": "6.1.0", "ajv": "8.20.0", "ajv-formats": "3.0.1", - "cordisx": "github:cordisx/cordisx#cb4d35d8e5a3632c18358ab9d9d04c4dec63e090", + "cordisx": "github:cordisx/cordisx#152d55aa26527b23c5e70a752fb3f6562e944afc", "dprint": "0.57.1", "esbuild": "0.28.2", "eslint": "9.39.4", @@ -153,8 +153,8 @@ }, "node_modules/@cordisx/protocol": { "version": "0.1.0-alpha.0", - "resolved": "git+ssh://git@github.com/cordisx/cordisx-protocol.git#06277f9d117893a9215c991db8c0881df0f0b0f3", - "integrity": "sha512-rKK9TB8JKgRR84wHIVjX1qa5g84Ol1o70r9Cj7fwkC6zZ/QB/owk3+ui1bbaj4e/izDfYPDY4PjvlAznHfO++g==", + "resolved": "git+ssh://git@github.com/cordisx/cordisx-protocol.git#c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6", + "integrity": "sha512-m+/bdnP/tx0RbzISwUOfOcRVbjuarHTyNdHuX+IsrAETRmTwBTAhJI8S5Irx/2H+YZUrsU23JcUxMZCfcjFwxQ==", "dev": true, "license": "AGPL-3.0-or-later", "engines": { @@ -2708,8 +2708,8 @@ "node_modules/cordisx": { "name": "cordisx-monorepo", "version": "0.1.0-beta.2", - "resolved": "git+ssh://git@github.com/cordisx/cordisx.git#cb4d35d8e5a3632c18358ab9d9d04c4dec63e090", - "integrity": "sha512-ZD859MmcFOorze83nxfu9VIg1tit7RAeXXvCZ+P734hu4kFHFbtcyehs/hejijzEvONU+2eJvJCF6IbaZERX4w==", + "resolved": "git+ssh://git@github.com/cordisx/cordisx.git#152d55aa26527b23c5e70a752fb3f6562e944afc", + "integrity": "sha512-xMLYyYDpH1nN22T7jLllh83s+hbvFpfv3h2aR8R2p2DG9+bKCnA1RFfw0W6c/h5QztGWQuIRrx0bg+gadcIbYg==", "bundleDependencies": [ "@cordisx/schemastery-ui" ], @@ -2720,7 +2720,7 @@ ], "dependencies": { "@cordisx/channel": "github:cordisx/plugin-channel#4cee12e3a92eeed557bc9de8cc4792710918327a", - "@cordisx/protocol": "github:cordisx/cordisx-protocol#06277f9d117893a9215c991db8c0881df0f0b0f3", + "@cordisx/protocol": "github:cordisx/cordisx-protocol#c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6", "@cordisx/schemastery-ui": "0.1.0-beta.2", "@deepseek-ai/cordis": "4.0.1", "@deepseek-ai/schemastery": "^3.18.1", @@ -2780,7 +2780,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@cordisx/channel": "github:cordisx/plugin-channel#4cee12e3a92eeed557bc9de8cc4792710918327a", - "@cordisx/protocol": "github:cordisx/cordisx-protocol#06277f9d117893a9215c991db8c0881df0f0b0f3", + "@cordisx/protocol": "github:cordisx/cordisx-protocol#c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6", "@cordisx/schemastery-ui": "0.1.0-beta.2", "@deepseek-ai/cordis": "4.0.1", "@deepseek-ai/schemastery": "^3.18.1", @@ -2821,7 +2821,7 @@ }, "devDependencies": { "@cordisx/channel-runtime": "file:../channel-runtime", - "@cordisx/protocol": "github:cordisx/cordisx-protocol#06277f9d117893a9215c991db8c0881df0f0b0f3", + "@cordisx/protocol": "github:cordisx/cordisx-protocol#c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6", "@types/node": "^22.18.1", "@types/react": "19.2.18", "@types/react-dom": "19.2.5", diff --git a/package.json b/package.json index bc0f5b8..7aec840 100644 --- a/package.json +++ b/package.json @@ -38,13 +38,13 @@ }, "devDependencies": { "@cordisx/eslint-config": "github:cordisx/cordisxmono#c63c2e8c2ba7e11502934a52ad2ce3734e804cdc", - "@cordisx/protocol": "github:cordisx/cordisx-protocol#06277f9d117893a9215c991db8c0881df0f0b0f3", + "@cordisx/protocol": "github:cordisx/cordisx-protocol#c2f6f8e4bf4a638bf4627c9c567792f2fedbcfd6", "@deepseek-ai/cordis": "4.0.1", "@deepseek-ai/schemastery": "3.18.1", "@projectwallace/stylelint-plugin": "0.7.0", "@typescript-eslint/parser": "8.69.0", "@vitejs/plugin-react": "6.1.0", - "cordisx": "github:cordisx/cordisx#cb4d35d8e5a3632c18358ab9d9d04c4dec63e090", + "cordisx": "github:cordisx/cordisx#152d55aa26527b23c5e70a752fb3f6562e944afc", "dprint": "0.57.1", "eslint": "9.39.4", "stylelint": "17.15.0", diff --git a/runtime-manifest.json b/runtime-manifest.json index ea80be7..ee61c33 100644 --- a/runtime-manifest.json +++ b/runtime-manifest.json @@ -1,6 +1,6 @@ { - "$schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-manifest.v9.schema.json", - "schemaVersion": 9, + "$schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-manifest.v13.schema.json", + "schemaVersion": 13, "id": "cli-proxy-api", "name": "CLIProxy Providers", "capabilities": [ @@ -17,27 +17,37 @@ { "name": "tasks.content.read", "required": false, - "scope": {} + "scope": { + "runtime": "exact-request" + } }, { "name": "tasks.create", "required": false, - "scope": {} + "scope": { + "runtime": "exact-request" + } }, { "name": "tasks.control", "required": false, - "scope": {} + "scope": { + "runtime": "exact-request" + } }, { "name": "turns.submit", "required": false, - "scope": {} + "scope": { + "runtime": "exact-request" + } }, { "name": "turns.control", "required": false, - "scope": {} + "scope": { + "runtime": "exact-request" + } } ], "services": [ diff --git a/test/package-artifact.mjs b/test/package-artifact.mjs index 17cfe4f..6ef555d 100644 --- a/test/package-artifact.mjs +++ b/test/package-artifact.mjs @@ -16,7 +16,7 @@ async function validator(name) { return ajv.getSchema(schema.$id) } -test('publishes schema-valid v9 package and runtime manifests with an exact digest', async () => { +test('publishes schema-valid v13 package and runtime manifests with exact request scopes', async () => { const [packageText, runtimeText] = await Promise.all([ readFile(new URL('../cordisx-package.json', import.meta.url), 'utf8'), readFile(new URL('../runtime-manifest.json', import.meta.url), 'utf8'), @@ -24,11 +24,21 @@ test('publishes schema-valid v9 package and runtime manifests with an exact dige const packageManifest = JSON.parse(packageText) const runtimeManifest = JSON.parse(runtimeText) const [validatePackage, validateRuntime] = await Promise.all([ - validator('plugin-package.v9.schema.json'), - validator('plugin-manifest.v9.schema.json'), + validator('plugin-package.v13.schema.json'), + validator('plugin-manifest.v13.schema.json'), ]) assert.equal(validatePackage(packageManifest), true, JSON.stringify(validatePackage.errors)) assert.equal(validateRuntime(runtimeManifest), true, JSON.stringify(validateRuntime.errors)) + const runtimeExact = new Set([ + 'tasks.content.read', + 'tasks.create', + 'tasks.control', + 'turns.submit', + 'turns.control', + ]) + for (const capability of runtimeManifest.capabilities) { + assert.deepEqual(capability.scope, runtimeExact.has(capability.name) ? { runtime: 'exact-request' } : {}) + } assert.equal( packageManifest.runtimeManifest.digest, `sha256:${createHash('sha256').update(runtimeText).digest('hex')}`,