diff --git a/AGENTS.md b/AGENTS.md index f94dc70..4ae606c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,3 +20,18 @@ See the [Host notification guide](https://github.com/cordisx/cordisx/blob/3cfe37 for the interaction contract and older-Host capability boundary. Dependency setup: [notification migration](./.agents/docs/notifications.md). + +## Development and release + +- Requires Node.js 22 or newer. Install dependencies with `npm ci`. +- Run `npm run check`, `npm pack --dry-run`, and `git diff --check` before a + release checkpoint. The package check verifies descriptor and runtime output. +- Keep public READMEs focused on installation and use. Migration history, + architecture, source layout, local development, tests, and release operations + belong here or in indexed maintainer documentation. +- Releases use a GitHub prerelease, not npm. Build the exact merged main commit, + package with `npm pack`, attach the archive with `SHA256SUMS`, then download + and verify both assets. The archive must contain `cordisx-package.json`, its + referenced runtime manifest, and the browser and service bundle entries. +- Marketplace artifact URLs and digests are updated separately by the catalog + owner after verification. Do not copy older trust records. diff --git a/README.md b/README.md index bdcbfa6..9af8456 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,75 @@ # CordisX Channel -This public repository is the owner of the CordisX Channel management plugin. -It preserves the filtered Git authorship history of the former built-in Host -directory through Host commit -`1cbe9d0ff1a803b1486bb2ddcbedc98a187d4f11`. -The repository is licensed under AGPL-3.0-or-later, matching that source -history. +Channel provides a CordisX workspace for viewing and managing channel accounts, +runtime state, logs, and Session bindings. This release includes the local +Simulator adapter and uses Host-owned flows for real provider credentials and +transport. -## Current checkpoint +## Install -The repository now builds an executable plugin candidate. -The former built-in source depended on private Host renderer, service-config, -credential, and Channel Manager modules. Those files remain in Git history for -provenance and have been removed from the public source tree. +Plugin ID: `channel`. Current release: `0.1.1`. -The candidate consumes the formal Protocol Channel Manager v2 types at -`3f0dbcd8b04ae83c920d2d913ac2c313af5f83f1` and the formal Host provider at -`dfb071e02eca0ef52f84d67b2393c25aced7d3f0`. +The CordisX Community Marketplace feed must already be configured and enabled +before `--source` can select it: -See [MIGRATION.md](MIGRATION.md) for the boundary and delivery order. +```sh +FEED_URL=https://raw.githubusercontent.com/cordisx/marketplace/main/marketplace.json +npx cordisx@beta source add "$FEED_URL" --yes +npx cordisx@beta plugin install channel --source "$FEED_URL" --version 0.1.1 +``` -## Ownership +Skip `source add` when that exact feed is already enabled. For another profile, +add the same `--profile ` argument to both commands. `--yes` confirms +the source change only; it does not approve plugin permissions. A discovery +source is not a trust root. -This plugin owns localized Channel routes, page body presentation, its view -model, one page factory and lifecycle, `src/channel.css`, and the Simulator -adapter definition loaded through the public `ctx.channel` service. +The install command becomes available after the Marketplace entry lists the +`0.1.1` artifact. Until then, download the archive and `SHA256SUMS` from the +[GitHub release](https://github.com/cordisx/plugin-channel/releases/tag/v0.1.1). -CordisX Host continues to own Manager chrome and history, credential capture, -download handling, semantic UI primitives, accessibility policy, native -integration, the single Channel runtime, credential-bearing adapter transport, -and adapter publication authority. The plugin will not -import private Host files or carry credentials, raw account identifiers, -filesystem paths, DOM handles, or transport callbacks. +## Use -The package remains private at version `0.1.0` to prevent accidental -publication before the Host-stamped service configuration revision and final -consumer removal are complete. +Open Channel Manager in CordisX to list available accounts. From an account you +can inspect configuration, runtime counters, logs, and Session bindings, then +run only the operations exposed by the Host for that account. -## Plugin brand artwork +The bundled Simulator connection uses the fixed local target +`simulator/local/test`. Creating Feishu or Lark connections continues through +Host-owned credential capture; the plugin does not store provider credentials +or implement their transport. -The selected 256×256 PNG is owned at `assets/channel.png` and included in the -package file allowlist. `src/brand-icon.ts` embeds the same bytes in the public -module `icon` export (`CordisXPluginBrandIcon` from `cordisx/contracts`), which -Host validates and renders in its plugin list. This does not replace semantic -menu or action icons. Run `node scripts/generate-brand-icon.mjs` after an -approved artwork replacement; the package tests verify the bundled icon bytes. +## Configuration -Artwork ships through this repository's source distribution on `main`. -The package remains private at `0.1.0`; this change does not publish an npm -release or introduce a separate artifact release channel. +The Channel service reads a Host-provided `cordisx.channel-service-config/v1` +configuration on plugin restart. Configure connections through CordisX. The +plugin registers only enabled Simulator definitions that match its declared +scope and fails closed on malformed or stale configuration. -## Notification feedback +## Permissions and limits -See [operation notifications and development dependencies](./.agents/docs/notifications.md). +Account read access is required. Connect, receive, subscribe, send, binding +read/write, and attachment read capabilities are optional and separately +scoped. The packaged Simulator scope is limited to its local test tenant and +direct test conversation. Review requested permissions before enabling them. + +The Host remains responsible for credentials, native integration, downloads, +accessibility, navigation history, and the channel runtime. Unsupported or +unavailable operations stay disabled rather than falling back to private APIs. + +## Troubleshooting + +- **Install cannot find version `0.1.1`:** confirm the Marketplace entry lists + the release artifact. `--source` does not add or repair a feed. +- **No accounts appear:** confirm account-read permission and an enabled Host + Channel service configuration. +- **A control is disabled:** the Host did not expose that operation for the + selected account or its permission is not enabled. +- **Simulator is unavailable:** verify the configured adapter, account, and + tenant are exactly `simulator`, `local`, and `test`. + +## License + +Channel is licensed under +[AGPL-3.0-or-later](LICENSE). Third-party notices are in +[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). Maintainer setup, checks, and +release instructions are in [AGENTS.md](AGENTS.md). diff --git a/README.zh-Hans.md b/README.zh-Hans.md index 349190c..e9d873a 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -1,32 +1,64 @@ -# CordisX 渠道插件 +# CordisX Channel -此公开仓库是 CordisX Channel 管理插件的 owner。仓库保留了原 Host 内置目录截至 -Host 提交 `1cbe9d0ff1a803b1486bb2ddcbedc98a187d4f11` 的筛选 Git 作者历史。 -仓库继续采用该来源历史的 AGPL-3.0-or-later 许可证。 +Channel 提供 CordisX 内的渠道账号、运行状态、日志和 Session binding 管理界面。 +本版本包含本地 Simulator adapter;真实渠道的凭据和 transport 继续由 Host 负责。 -## 当前检查点 +## 安装 -仓库现在已经构建出可执行插件候选。原内置实现依赖 Host 私有 renderer、 -service-config、凭据与 Channel Manager 模块。这些文件只保留在 Git 历史中,已经 -从公开源码树删除。 +插件 ID:`channel`。当前版本:`0.1.1`。 -候选已消费正式 Protocol Channel Manager v2 类型 -`3f0dbcd8b04ae83c920d2d913ac2c313af5f83f1`,以及正式 Host provider -`dfb071e02eca0ef52f84d67b2393c25aced7d3f0`。 +CordisX Community Marketplace feed 必须先完成配置并启用,`--source` 才能选择它: -具体边界与交付顺序见 [MIGRATION.md](MIGRATION.md)。 +```sh +FEED_URL=https://raw.githubusercontent.com/cordisx/marketplace/main/marketplace.json +npx cordisx@beta source add "$FEED_URL" --yes +npx cordisx@beta plugin install channel --source "$FEED_URL" --version 0.1.1 +``` -## 所有权 +若该 feed 已启用,可跳过 `source add`。使用其他 profile 时,两条命令都要添加 +相同的 `--profile `。`--yes` 只确认来源变更,不会批准插件权限;发现来源 +也不等同于 trust root。 -本插件负责本地化 Channel route、页面 body 表现、view model、唯一 page factory -与 lifecycle、`src/channel.css`,以及通过公共 `ctx.channel` 加载的 Simulator -adapter definition。 +Marketplace 条目列出 `0.1.1` artifact 后,安装命令才可用。在此之前,可从 +[GitHub Release](https://github.com/cordisx/plugin-channel/releases/tag/v0.1.1) +下载压缩包与 `SHA256SUMS`。 -CordisX Host 继续负责 Manager chrome 与历史、凭据捕获、下载处理、语义 UI -primitive、无障碍策略、原生集成、唯一 Channel runtime、含凭据 adapter transport -与 adapter 发布权。插件不会导入 -Host 私有文件,也不会携带凭据、原始账号标识、文件系统路径、DOM handle 或 -transport callback。 +## 使用 -package 保持 `0.1.0` 且 `private: true`,防止 Host-stamped service configuration -revision 与最终 consumer 删除完成前被误发布。 +在 CordisX 中打开 Channel Manager 查看可用账号。进入账号后,可以检查配置、运行 +计数、日志和 Session binding,并且只执行 Host 为该账号开放的操作。 + +内置 Simulator connection 使用固定的本地目标 `simulator/local/test`。创建 Feishu +或 Lark connection 时仍会进入 Host 管理的凭据捕获流程;插件不会保存渠道凭据,也 +不实现这些渠道的 transport。 + +## 配置 + +Channel service 在插件重启时读取 Host 提供的 +`cordisx.channel-service-config/v1` 配置。请通过 CordisX 配置 connection。插件只会 +注册已启用且符合声明 scope 的 Simulator definition;配置格式错误或 revision 无效 +时会 fail closed。 + +## 权限与限制 + +账号读取权限是必需的。连接、接收、订阅、发送、binding 读写和附件读取均为独立的 +可选权限。包内 Simulator scope 仅覆盖本地测试 tenant 和 direct test conversation。 +启用前请检查插件请求的权限。 + +凭据、原生集成、下载、无障碍、导航历史和 Channel runtime 均由 Host 负责。不支持 +或不可用的操作会保持禁用,不会回退到私有 API。 + +## 排错 + +- **找不到 `0.1.1`:**确认 Marketplace 条目已列出 release artifact;`--source` + 不会添加或修复 feed。 +- **没有账号:**检查账号读取权限和已启用的 Host Channel service 配置。 +- **操作按钮不可用:**Host 未为当前账号开放该操作,或对应权限尚未启用。 +- **Simulator 不可用:**确认 adapter、account 和 tenant 分别为 `simulator`、`local` + 和 `test`。 + +## 许可证 + +Channel 使用 [AGPL-3.0-or-later](LICENSE)。第三方声明见 +[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。维护者环境、检查和发布步骤见 +[AGENTS.md](AGENTS.md)。 diff --git a/cordisx-package.json b/cordisx-package.json index b5caff6..0bd5a69 100644 --- a/cordisx-package.json +++ b/cordisx-package.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/cordisx/cordisx-protocol/main/schemas/plugin-package.v8.schema.json", "schemaVersion": 8, "id": "channel", - "version": "0.1.0", + "version": "0.1.1", "entry": "./dist/channel.js", "readme": "./README.md", "canonicalSource": "https://github.com/cordisx/plugin-channel", diff --git a/package-lock.json b/package-lock.json index ea8a4a9..5ce7753 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cordisx/channel", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cordisx/channel", - "version": "0.1.0", + "version": "0.1.1", "license": "AGPL-3.0-or-later", "devDependencies": { "@cordisx/eslint-config": "github:cordisx/cordisxmono#c63c2e8c2ba7e11502934a52ad2ce3734e804cdc", diff --git a/package.json b/package.json index a48dac3..232ee58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cordisx/channel", - "version": "0.1.0", + "version": "0.1.1", "private": true, "description": "CordisX channel management plugin", "license": "AGPL-3.0-or-later",