@eduwork/dsh-oidc 0.1.0-alpha.11 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.en.md +58 -1
- package/CHANGELOG.md +58 -1
- package/CODE_OF_CONDUCT.en.md +17 -0
- package/CODE_OF_CONDUCT.md +17 -0
- package/CONTRIBUTING.en.md +56 -0
- package/CONTRIBUTING.md +56 -0
- package/GOVERNANCE.en.md +41 -0
- package/GOVERNANCE.md +41 -0
- package/MAINTAINERS.en.md +13 -0
- package/MAINTAINERS.md +13 -0
- package/README.en.md +24 -22
- package/README.md +18 -16
- package/SECURITY.en.md +45 -0
- package/SECURITY.md +45 -0
- package/SUPPORT.en.md +15 -0
- package/SUPPORT.md +15 -0
- package/THIRD_PARTY_NOTICES.en.md +7 -5
- package/THIRD_PARTY_NOTICES.md +7 -5
- package/cordis.patch.yml +2 -1
- package/docs/EDUWORK-MIGRATION.en.md +17 -5
- package/docs/EDUWORK-MIGRATION.md +17 -5
- package/docs/account-extensions.en.md +40 -0
- package/docs/account-extensions.md +42 -0
- package/docs/architecture.en.md +9 -9
- package/docs/architecture.md +11 -10
- package/docs/compatibility.en.md +13 -3
- package/docs/compatibility.md +13 -3
- package/docs/decisions/0001-one-plugin-composition-boundary.en.md +1 -1
- package/docs/decisions/0001-one-plugin-composition-boundary.md +1 -1
- package/docs/desktop-host.en.md +69 -0
- package/docs/desktop-host.md +79 -0
- package/docs/development.en.md +42 -0
- package/docs/development.md +42 -0
- package/docs/dsh-integration.en.md +24 -8
- package/docs/dsh-integration.md +24 -8
- package/docs/ecnu-reference.en.md +3 -3
- package/docs/ecnu-reference.md +3 -3
- package/docs/enterprise-profile.en.md +21 -13
- package/docs/enterprise-profile.md +20 -12
- package/docs/getting-started.en.md +13 -17
- package/docs/getting-started.md +17 -19
- package/docs/key-binding-protocol.en.md +2 -2
- package/docs/key-binding-protocol.md +2 -2
- package/docs/oidc-interoperability.en.md +3 -3
- package/docs/oidc-interoperability.md +2 -2
- package/docs/public-resource-protocol.en.md +51 -0
- package/docs/public-resource-protocol.md +50 -0
- package/docs/release-checklist.en.md +13 -8
- package/docs/release-checklist.md +13 -8
- package/docs/server-integration-contract.en.md +124 -8
- package/docs/server-integration-contract.md +136 -8
- package/examples/ecnu.enterprise-profile.example.json +2 -2
- package/examples/enterprise-profile.example.json +78 -77
- package/examples/identity-only.example.json +10 -0
- package/examples/resources-discovery.example.json +20 -0
- package/lib/callback-page.js +42 -0
- package/lib/client.js +938 -294
- package/lib/desktop-oidc.js +205 -0
- package/lib/index.js +148 -18
- package/lib/oidc.js +314 -58
- package/lib/profile.js +96 -39
- package/lib/provider/core.js +76 -15
- package/lib/provider/index.js +54 -22
- package/lib/provider/transform-adapter.js +32 -11
- package/lib/resources.js +23 -0
- package/lib/typert-schemas.js +34 -3
- package/lib/typert.host.js +42 -36
- package/lib/typert.remote-client.js +41 -35
- package/package.json +117 -23
- package/protocol/openapi.yaml +2 -2
- package/protocol/resources.openapi.yaml +51 -0
- package/schema/enterprise-profile.v1alpha1.schema.json +193 -174
package/CHANGELOG.en.md
CHANGED
|
@@ -4,7 +4,64 @@
|
|
|
4
4
|
|
|
5
5
|
All notable changes are documented here. The format follows Keep a Changelog principles and the project uses Semantic Versioning with pre-1.0 qualifications described in `docs/compatibility.en.md`.
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [0.2.0] - 2026-09-11
|
|
8
|
+
|
|
9
|
+
- Freeze the validated dev.7 implementation under a stable semantic version and update npm installation instructions for DSH `0.1.5-rc.1`. Distribution assembly pins version and integrity. Identity, managed keys, models and default selection remain public; quota and heartbeat belong to institution extensions.
|
|
10
|
+
- No runtime source changes from dev.7. Candidate notes below preserve migration history and validation boundaries. Consult the registry for npm publication status; GitHub pushes and Releases are separate actions.
|
|
11
|
+
|
|
12
|
+
- 2026-09-11 source preparation: pin the registry-installable RC.1 development/CI dependency closure; check its lock before CI installation. Correct bilingual identity-only/desktop/server-request/migration documentation and source entry points. Package version and frozen dev.7 artifact remain unchanged; no publication.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
- Local candidate `0.2.0-dev.20260910.7`: unify the default as `EDUWORK_API_KEY`, accepting legacy automatic Profile/Provider names. Migrate only identical deployment bindings without overwriting the target. Session credential fingerprints prevent another login from reading or clearing the active key. Add Host-only `resolveBoundCredential` for extension adapters; no new RPC or organization-switching UI.
|
|
16
|
+
|
|
17
|
+
- `0.2.0-dev.20260910.6`: public OIDC now owns identity/key/models only. Removed quota HTTP, normalization, RPC fields and UI; legacy native mode no longer calls quota. Added a Host-only bounded model-resource transport and the official `oidc.account.menu.details` child slot for explicitly installed institution extensions.
|
|
18
|
+
- Exact RC.1 closure: 264 DSH packages, 78 tests and 6 compiled-browser checks; includes no implicit quota requests, host credential/destination boundaries and logout races. Existing managed keys and personal model selection survive. Public RFC/OpenAPI no longer require quota; heartbeat remains institution-only.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
- `0.2.0-dev.20260910.5`: restore the public avatar menu with quota, refresh, sign-out, keyboard navigation and outside-focus dismissal, including collapsed sidebars. Desktop callback cards use configured branding and system fonts without authorization secrets or raw server errors.
|
|
22
|
+
- Adapt to official DSH `0.1.5-rc.1` PiAi `modelErrors`, preserving model capabilities and default selection. Serialize vault cleanup and reject late identity/key/quota writes after logout. A coherent 264-package closure, 75 tests and 7 compiled-browser checks pass; final native assembly belongs to the mainline.
|
|
23
|
+
- Expand the server RFC across identity, resource discovery, key lifecycle, models, quota, refresh/logout, versions and errors; validate resource OpenAPI examples using the real normalizer. Heartbeat is a default-off optional proposal only.
|
|
24
|
+
|
|
25
|
+
- Desktop acceptance revised the same `.20260910.4` candidate: onboarding stays visible with disabled actions while the key is connected but default-model selection is still pending, and closes only after selection completes.
|
|
26
|
+
|
|
27
|
+
- Unpublished candidate `0.2.0-dev.20260910.4` fixes independent stale account state in sign-in, sidebar and organization settings. Late reads cannot overwrite newer state; official credential events and connection recovery refresh all consumers. Explicit sign-in/provisioning uses DSH 0.1.5 default/current-session model APIs; upgrade recovery preserves usable personal choices and personal credentials. Added race regressions, compiled-client rendering, real HTTP PKCE/Key/default-settings tests and a local synthetic server for desktop acceptance.
|
|
28
|
+
|
|
29
|
+
- Unpublished candidate `0.2.0-dev.20260910.3` restores compatibility with the existing `worker.user-center.v1` resource protocol while retaining new protocols and unknown-version checks. Errors distinguish authenticated identity from disconnected model resources. File-managed settings offer host-backed configuration and example buttons; organization settings stay read-only and personal models remain available.
|
|
30
|
+
|
|
31
|
+
- Unpublished `0.2.0-dev.20260910.1` adds desktop OIDC without persistent WebServer: temporary loopback PKCE, Host browser service, safe result polling and cancellation, preserving host credentials and existing resource protocols. See [desktop host integration](docs/desktop-host.en.md).
|
|
32
|
+
|
|
33
|
+
- Unpublished 0.2.0-dev.20260909.1 adds optional identity-only login and public runtime model/quota integration with legacy wire compatibility; the host and client share a single Typert schema.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Advance the local candidate to `0.1.0-dev.20260908.1`: restore the internal thinking signal lost in the previous effort-capability change. `compat.supportsReasoningEffort: false` still hides effort choices and omits `reasoning_effort`, while thinking follows the profile default. Historical user efforts cannot change that default. Non-reasoning models and explicit profile `off` retain their existing behavior.
|
|
39
|
+
- Add a 19-request real PiAi-to-HTTP regression covering direct, prepared, and DSH LLM calls, constrained model levels, historical `medium`/`xhigh`/`off`, non-reasoning models, and explicitly disabled thinking; checking internal request shape alone is insufficient.
|
|
40
|
+
- Advanced the candidate to `0.1.0-dev.20260907.3`: the complete DSH peer closure adds reviewed `0.1.3-alpha.2` (`82a5fd61…`) while continuing to reject mixed trees. An isolated Runtime with 250 coherent packages passes the complete check and 32 tests without OIDC runtime-source changes.
|
|
41
|
+
- Added a repository handoff entry that distinguishes latest user/mainline messages, historical material, current compatibility evidence, and the separate GitHub, npm, and local-deployment boundaries.
|
|
42
|
+
- Advanced the candidate to `0.1.0-dev.20260907.2`: the model-capability chain now preserves the exact seven reasoning-effort IDs, per-model defaults, and independent wire values. Undeclared levels are no longer supplied by pi-ai defaults, and `xhigh` is never rewritten as `max`.
|
|
43
|
+
- Historical provider defaults conservatively fall back within each model's supported efforts. Model resolution, call preparation, and transport share one capability snapshot; invalid efforts fail before HTTP while thinking-only and non-reasoning semantics remain distinct.
|
|
44
|
+
- Added local development candidate `0.1.0-dev.20260907.1`: the complete DSH peer closure explicitly accepts either `0.1.2-rc.1` or `0.1.3-alpha.1` while rejecting every mixed-version tree.
|
|
45
|
+
- Audited upstream `dsh-v0.1.3-alpha.1` (`d347e703…`) source contracts and an isolated Runtime. SessionHandle, session v2/locking, and asynchronous `agentLoop.create()` are outside OIDC's runtime dependency surface, so no plugin runtime source change is required.
|
|
46
|
+
- Extended the contract probe with OidcAccountService construction and all 13 Typert Remote markers while retaining Settings, LLM/Pi, WebServer, credentials, attachment, and Client-slot coverage.
|
|
47
|
+
|
|
48
|
+
## [0.1.0] - 2026-09-06
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Updated the exact compatibility baseline to DeepSeek Harness `0.1.2-rc.1` (`a66e4702…`) and stopped claiming current support for the alpha.2 combination that is outside this release acceptance.
|
|
53
|
+
- Expanded and locked the DSH peer closure, including the page package that declares `settings.general.item`, so an unlocked host cannot mix alpha.2 and rc.1 packages during npm resolution.
|
|
54
|
+
- Audited Credential Provider, Settings, LLM/Pi Provider, WebServer, API Remotes, Typert, and Client page-slot contracts; added the automated `check:dsh` contract check.
|
|
55
|
+
- Provider configuration now emits only declared fields and copies them into mutable data accepted by the rc.1 Settings/PiAi schema; reasoning and compat values are constrained to the rc.1 supported sets.
|
|
56
|
+
- The Settings section now validates serviceability so schema-shaped values that cannot construct an enterprise Provider are rejected before persistence.
|
|
57
|
+
- The Provider wrapper now delegates `imageRequestPricing` and follows rc.1's official attachment-to-read-only execution-path resolution chain.
|
|
58
|
+
- Enterprise single brand slots now use an explicit negative priority to shadow rc.1's official brand entries without colliding at default priority 0 and aborting Client initialization.
|
|
59
|
+
- Stabilized the npm package version as `@eduwork/dsh-oidc@0.1.0` while retaining `dsh-oidc/v1alpha1`, `oidcAccounts`, credential references, Provider identities, the settings namespace, and user data.
|
|
60
|
+
- Expanded CI to a Node.js 22/24 matrix on Windows and Linux and added a manual workflow that checks/packages by default and publishes through npm Trusted Publishing only after explicit authorization.
|
|
61
|
+
- Documentation-link and secret scans now explicitly ignore Git-excluded `dist/` acceptance artifacts so local caches cannot change source-check results.
|
|
62
|
+
- Release governance now accurately records the initial single-maintainer phase and relies on retained independent technical review, CI/focused regression evidence, and an explicit maintainer decision. Until Trusted Publishing is configured, the first npm publication uses browser 2FA and does not claim provenance.
|
|
63
|
+
- The npm package now includes the bilingual code of conduct, contribution, security, support, governance, and maintainer documents so README-relative links do not dangle after installation.
|
|
64
|
+
- Test discovery is pinned to the repository's `test/*.test.js`, so Git-ignored local acceptance snapshots cannot change the discovered test set or count.
|
|
8
65
|
|
|
9
66
|
## [0.1.0-alpha.11] - 2026-09-05
|
|
10
67
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,64 @@
|
|
|
4
4
|
|
|
5
5
|
所有重要变更均记录于此。格式遵循 Keep a Changelog 原则;项目使用语义化版本,并遵循[兼容性与发布策略](docs/compatibility.md)中对 1.0 之前版本的说明。
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [0.2.0] - 2026-09-11
|
|
8
|
+
|
|
9
|
+
- 将已验收的 dev.7 运行实现冻结为稳定语义版本;补齐 DSH `0.1.5-rc.1` npm 安装指引,正式产品按精确版本与 integrity 装配。身份、托管 Key、模型及默认选择归属公版;配额和心跳由机构扩展提供。
|
|
10
|
+
- 与 dev.7 相比无运行源码变更;下面的候选记录保留各次功能迁移和验证边界。npm 发布状态以 registry 为准,GitHub 推送及 Release 是独立动作。
|
|
11
|
+
|
|
12
|
+
- 2026-09-11 源码准备:锁定 npm 可安装的 RC.1 开发/CI 依赖闭包,CI 安装前验证锁;校正中英文纯身份接入、桌面、服务端请求、凭据迁移文档与开发入口。包版本和已冻结 dev.7 产物保持不变,本轮未发布。
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
- 本地候选 `0.2.0-dev.20260910.7`:企业 Key 默认统一为 `EDUWORK_API_KEY`,兼容本 Profile/Provider 的旧自动名称;仅在完整部署绑定一致时迁移,不覆盖新槽位。共享引用按会话 Key 指纹校验归属,避免其他登录读取或清除当前 Key。增加仅供 Host 使用的 `resolveBoundCredential`,供机构适配器读取同一份已验证凭据;无新增 RPC/企业切换界面。
|
|
16
|
+
|
|
17
|
+
- `0.2.0-dev.20260910.6`:公共 OIDC 只保留身份/Key/模型;移除配额 HTTP、归一化、RPC 字段和 UI,旧 native 模式不再调用配额桥。新增 Host 专属的有界模型资源运输和官方 `oidc.account.menu.details` 子插槽,由显式安装的机构扩展提供附加账户内容。
|
|
18
|
+
- 精确 RC.1 闭包 264 个 DSH 包、78 项测试及 6 项编译浏览器检查通过,覆盖无隐式配额请求、凭据/地址边界和注销竞态。保留已有托管 Key 与个人模型选择。公共 RFC/OpenAPI 不再要求配额,心跳仍仅属于机构扩展。
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
- `0.2.0-dev.20260910.5`:恢复公共头像账户菜单(配额、刷新、注销、键盘操作及失焦关闭),支持折叠侧栏;桌面回调新增无外部字体的品牌卡片,不显示授权秘密或服务端原始错误。
|
|
22
|
+
- 适配官方 DSH `0.1.5-rc.1` 的 PiAi `modelErrors` 契约,保留精确模型能力和默认选模;退出时串行清理保险库,拒绝旧请求写回身份/Key/配额。264 包一致闭包、75 项测试与 7 项编译浏览器回归通过;双桌面最终装配由主线验收。
|
|
23
|
+
- 服务端 RFC 完整覆盖身份、资源发现、Key 生命周期、目录、配额、刷新/注销、版本和错误处理;资源 OpenAPI 示例经过实际归一化器验证。心跳只新增默认关闭的可选协议草案。
|
|
24
|
+
|
|
25
|
+
- 同一 `.20260910.4` 候选在桌面联验后修正选模竞态:创建 Key 已完成但默认模型尚在保存时,登录引导保持可见且操作禁用;选模完成后才收起。
|
|
26
|
+
|
|
27
|
+
- 未发布候选 `0.2.0-dev.20260910.4`:修复登录页、侧栏与企业设置的独立旧状态;拒绝迟到查询覆盖新状态,监听官方凭据事件及连接恢复。明确登录/创建凭据后,使用 DSH 0.1.5 的默认模型和当前会话模型接口;升级时仅修复不可用默认值,保留个人凭据与可用选择。增加共享状态竞态、编译客户端显示、真实 HTTP PKCE/Key/默认设置的回归及双桌面验收用本机模拟服务。
|
|
28
|
+
|
|
29
|
+
- 未发布候选 `0.2.0-dev.20260910.3` 恢复已有资源协议 `worker.user-center.v1` 的兼容,同时保留新协议及未知版本检查;错误提示区分已登录身份与尚未连接的模型资源。配置文件模式增加宿主支持的“打开配置文件 / 查看示例”入口;企业配置保持只读,个人模型仍可使用。
|
|
30
|
+
|
|
31
|
+
- 未发布候选 `0.2.0-dev.20260910.1` 新增无常驻 WebServer 的桌面 OIDC:短时 loopback PKCE、Host 浏览器服务、安全登录轮询与取消,继续使用宿主保险库接口及原资源协议。见 [桌面宿主接入](docs/desktop-host.md)。
|
|
32
|
+
|
|
33
|
+
- 未发布候选 0.2.0-dev.20260909.1 新增纯身份模式及公共模型/配额协议,保留原部署 wire;Host/Client 共享同一份 Typert schema。
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### 变更
|
|
37
|
+
|
|
38
|
+
- 候选版本推进至 `0.1.0-dev.20260908.1`:修复上一轮模型档位适配遗漏 thinking-only 内部启用信号的问题。`compat.supportsReasoningEffort: false` 继续隐藏档位且不发送 `reasoning_effort`,同时按 Profile 默认值保留 thinking;历史会话中的 effort 不改变该默认值。无 reasoning 模型及 Profile 的 `off` 行为保持不变。
|
|
39
|
+
- 新增真实 PiAi 到 HTTP 的 19 次请求回归,覆盖直接调用、预备调用、DSH LLM 调用、受限模型档位、历史 `medium`/`xhigh`/`off`、无 reasoning 及明确关闭 thinking;避免仅检查内部请求形状而遗漏过线行为。
|
|
40
|
+
- 候选版本推进至 `0.1.0-dev.20260907.3`:完整 DSH peer 闭包增加已复核的 `0.1.3-alpha.2`(`82a5fd61…`),并继续拒绝混版依赖树;250 个一致包的隔离 Runtime 通过完整检查和 32 项测试,无需修改 OIDC 运行源码。
|
|
41
|
+
- 新增仓库接手入口说明,明确最新用户/主线消息、历史材料、兼容事实以及 GitHub、npm 和本地部署的边界。
|
|
42
|
+
- 候选版本推进至 `0.1.0-dev.20260907.2`:模型能力链路精确保留七种 reasoning effort ID、模型级默认值和独立过线值,未声明档位不再由 pi-ai 缺省补出,`xhigh` 不会被映射为 `max`。
|
|
43
|
+
- Provider 级历史默认值按模型有效档位保守回落;模型解析、调用准备和实际传输使用同一份能力快照,非法档位在任何 HTTP 请求前拒绝,同时保留 thinking-only 与无 reasoning 两种不同语义。
|
|
44
|
+
- 增加本地开发候选 `0.1.0-dev.20260907.1`:完整 DSH peer 闭包明确允许 `0.1.2-rc.1` 或 `0.1.3-alpha.1`,同时拒绝任何混版依赖树。
|
|
45
|
+
- 对上游 `dsh-v0.1.3-alpha.1`(`d347e703…`)完成源码契约核对和隔离 Runtime 验证;SessionHandle、session v2/锁和异步 `agentLoop.create()` 不在 OIDC 运行依赖面内,无需修改插件运行源码。
|
|
46
|
+
- 契约探针新增 OidcAccountService 构造及 13 个 Typert Remote 标记检查,并继续覆盖 Settings、LLM/Pi、WebServer、credentials、附件和客户端插槽。
|
|
47
|
+
|
|
48
|
+
## [0.1.0] - 2026-09-06
|
|
49
|
+
|
|
50
|
+
### 变更
|
|
51
|
+
|
|
52
|
+
- 兼容基线精确更新至 DeepSeek Harness `0.1.2-rc.1`(`a66e4702…`),不再声明支持未完成本轮验收的 alpha.2 组合。
|
|
53
|
+
- 扩充并锁定 DSH peer 闭包,显式包含声明 `settings.general.item` 的页面包,避免 npm 在未锁定宿主中混装 alpha.2 与 rc.1。
|
|
54
|
+
- 逐项核对 Credential Provider、Settings、LLM/Pi Provider、WebServer、API Remotes、Typert 和 Client 页面插槽;新增 `check:dsh` 自动契约检查。
|
|
55
|
+
- Provider 配置只输出已声明字段,并复制为 rc.1 Settings/PiAi schema 可解析的可变数据;同时将 reasoning/compat 值域收紧到 rc.1 支持集合。
|
|
56
|
+
- Settings section 增加可服务性校验,阻止 schema 虽可解析、但无法构造企业 Provider 的配置被持久化。
|
|
57
|
+
- Provider 包装器补齐 `imageRequestPricing` 委托,并沿用 rc.1 官方附件到执行环境只读路径的解析链路。
|
|
58
|
+
- 企业品牌单插槽使用显式负优先级覆盖 rc.1 官方品牌项,避免与默认优先级 0 冲突而中断 Client 初始化。
|
|
59
|
+
- npm 包版本稳定为 `@eduwork/dsh-oidc@0.1.0`;保留 `dsh-oidc/v1alpha1`、`oidcAccounts`、凭据引用、Provider 标识、设置命名空间和用户数据。
|
|
60
|
+
- CI 扩展为 Windows/Linux 上的 Node.js 22/24 矩阵,并增加默认只检查/打包、显式授权后才通过 npm Trusted Publishing 发布的手动工作流。
|
|
61
|
+
- 文档链接和敏感信息检查显式忽略已被 Git 排除的 `dist/` 验收产物,避免本地缓存影响源码检查结果。
|
|
62
|
+
- 发布治理如实记录初期单一维护者模式,以独立技术复核、CI/专项回归和维护者决定留痕;Trusted Publisher 尚未配置时,首次 npm 发布使用浏览器 2FA 且不声称 provenance。
|
|
63
|
+
- npm 包补齐行为准则、贡献、安全、支持、治理和维护者双语文档,避免 README 在安装包内出现悬空的相对链接。
|
|
64
|
+
- 测试入口固定到仓库 `test/*.test.js`,避免被 Git 忽略的本地验收快照改变测试发现范围和计数。
|
|
8
65
|
|
|
9
66
|
## [0.1.0-alpha.11] - 2026-09-05
|
|
10
67
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Code of conduct
|
|
2
|
+
|
|
3
|
+
[简体中文](CODE_OF_CONDUCT.md) | **English**
|
|
4
|
+
|
|
5
|
+
We are committed to a professional, inclusive, and harassment-free project.
|
|
6
|
+
|
|
7
|
+
Participants must:
|
|
8
|
+
|
|
9
|
+
- discuss ideas and code rather than personal characteristics;
|
|
10
|
+
- assume good intent while accepting evidence-based correction;
|
|
11
|
+
- protect private security reports, institutional information, and personal data;
|
|
12
|
+
- avoid harassment, threats, discriminatory language, sexualized conduct, doxxing, and sustained disruption;
|
|
13
|
+
- respect maintainer decisions made to protect users, protocol stability, licensing, or security.
|
|
14
|
+
|
|
15
|
+
Maintainers may edit, hide, reject, or remove contributions and may temporarily or permanently restrict participation when behavior threatens contributors or users. Enforcement should be proportionate, documented privately where appropriate, and avoid disclosing victims or security-sensitive details.
|
|
16
|
+
|
|
17
|
+
General conduct concerns may use an issue that contains no personal or sensitive details. For harassment, threats, doxxing, or another incident requiring confidentiality, use GitHub [Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-oidc/security/advisories/new) and prefix the title with “Code of Conduct”. Do not disclose an affected person's identity or evidence attachments publicly.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# 行为准则
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](CODE_OF_CONDUCT.en.md)
|
|
4
|
+
|
|
5
|
+
我们致力于维护专业、包容且无骚扰的项目环境。
|
|
6
|
+
|
|
7
|
+
参与者必须:
|
|
8
|
+
|
|
9
|
+
- 讨论观点和代码,而不是个人特征;
|
|
10
|
+
- 假设善意,同时接受基于证据的纠正;
|
|
11
|
+
- 保护私有安全报告、机构信息和个人数据;
|
|
12
|
+
- 避免骚扰、威胁、歧视性语言、性化行为、人肉搜索和持续扰乱;
|
|
13
|
+
- 尊重维护者为了保护用户、协议稳定性、许可证或安全而作出的决定。
|
|
14
|
+
|
|
15
|
+
当行为威胁贡献者或用户时,维护者可以编辑、隐藏、拒绝或删除贡献,也可以临时或永久限制参与。执行措施应当适度;适合时应私下记录,并避免暴露受害者或安全敏感细节。
|
|
16
|
+
|
|
17
|
+
一般行为问题可以创建不含个人敏感信息的 Issue。需要保密处理的骚扰、威胁、人肉搜索或其他行为事件,请使用 GitHub [Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-oidc/security/advisories/new),并在标题中标注“Code of Conduct”。不要在公开渠道披露受影响者身份或证据附件。
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
[简体中文](CONTRIBUTING.md) | **English**
|
|
4
|
+
|
|
5
|
+
Thank you for improving `dsh-oidc`. Authentication and credential code has a higher review bar than ordinary UI changes.
|
|
6
|
+
|
|
7
|
+
## Before starting
|
|
8
|
+
|
|
9
|
+
- Use a public issue for non-sensitive design/bug discussion.
|
|
10
|
+
- Use the [private security-reporting entry point](https://github.com/freedomkk-qfeng/dsh-oidc/security/advisories/new) for vulnerabilities or secrets.
|
|
11
|
+
- For a protocol or trust-boundary change, open a design issue and add an ADR under `docs/decisions/` before implementation.
|
|
12
|
+
- Do not include production endpoints, identifiers, logs, tokens, personal data, logos, or screenshots without explicit publication approval.
|
|
13
|
+
|
|
14
|
+
## Development
|
|
15
|
+
|
|
16
|
+
Requirements: Node.js 22+ and npm.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm ci
|
|
20
|
+
npm run check
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use placeholder domains under `example.com`, `example.edu`, or `example.net`. Unit tests must use generated keys and synthetic subjects.
|
|
24
|
+
|
|
25
|
+
## Pull request requirements
|
|
26
|
+
|
|
27
|
+
Every PR must:
|
|
28
|
+
|
|
29
|
+
- explain the user/security impact and affected boundary;
|
|
30
|
+
- include tests for success and negative/failure behavior;
|
|
31
|
+
- update schemas, OpenAPI, prose, examples, and changelog when a contract changes;
|
|
32
|
+
- preserve fixed callback/Key Binding paths unless introducing a versioned migration;
|
|
33
|
+
- keep profiles declarative and reject unknown executable-relevant fields;
|
|
34
|
+
- use official DSH/community capabilities where appropriate rather than introducing a parallel runtime;
|
|
35
|
+
- pass `npm run check` from a clean install;
|
|
36
|
+
- declare any new dependency, license, install script, and why it is necessary.
|
|
37
|
+
|
|
38
|
+
Changes to OIDC, Key Binding, credentials, Profile validation, the native account contract, build/release workflows, or dependency pins require independent technical review, CI, and focused regression evidence, with explicit acceptance by the current maintainer. After a second maintainer joins, these changes should also receive independent human approval.
|
|
39
|
+
|
|
40
|
+
## Code style
|
|
41
|
+
|
|
42
|
+
- Native ESM, Node 22 baseline.
|
|
43
|
+
- Small explicit modules and fail-closed validation.
|
|
44
|
+
- Public error codes are stable machine facts; messages must not contain secrets.
|
|
45
|
+
- Network operations need timeouts and bounded response bodies.
|
|
46
|
+
- Avoid logging response bodies, headers, tokens, keys, or full profiles.
|
|
47
|
+
- Prefer official DSH services and exports; document every compatibility seam.
|
|
48
|
+
|
|
49
|
+
## Commit and release hygiene
|
|
50
|
+
|
|
51
|
+
- Keep commits reviewable and signed where project policy supports it.
|
|
52
|
+
- Do not commit generated credentials, `.env`, archives, or session logs.
|
|
53
|
+
- `lib/` is generated by `npm run build`; review the source and tarball, not only minified output.
|
|
54
|
+
- Prefer protected tags and the approved Trusted Publishing workflow. Until that path is configured, the initial maintainer may publish the frozen, verified tarball with the npm CLI and browser 2FA, but must not claim provenance. Record provenance only after npm actually creates an attestation.
|
|
55
|
+
|
|
56
|
+
By participating, contributors agree to follow [`CODE_OF_CONDUCT.en.md`](CODE_OF_CONDUCT.en.md) and certify that they have the right to submit their contribution under the MIT license.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# 贡献指南
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](CONTRIBUTING.en.md)
|
|
4
|
+
|
|
5
|
+
感谢你改进 `dsh-oidc`。认证和凭据代码的审查门槛高于普通 UI 变更。
|
|
6
|
+
|
|
7
|
+
## 开始之前
|
|
8
|
+
|
|
9
|
+
- 非敏感设计或缺陷讨论请使用公开 Issue。
|
|
10
|
+
- 漏洞或秘密信息请使用[私有安全报告入口](https://github.com/freedomkk-qfeng/dsh-oidc/security/advisories/new)。
|
|
11
|
+
- 修改协议或信任边界前,请先创建设计 Issue,并在 `docs/decisions/` 下新增 ADR。
|
|
12
|
+
- 未经明确公开授权,不得提交生产 endpoint、标识符、日志、Token、个人数据、Logo 或截图。
|
|
13
|
+
|
|
14
|
+
## 开发
|
|
15
|
+
|
|
16
|
+
要求:Node.js 22+ 和 npm。
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm ci
|
|
20
|
+
npm run check
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
占位域名使用 `example.com`、`example.edu` 或 `example.net`。单元测试必须使用生成密钥和虚构 subject。
|
|
24
|
+
|
|
25
|
+
## Pull Request 要求
|
|
26
|
+
|
|
27
|
+
每个 PR 必须:
|
|
28
|
+
|
|
29
|
+
- 说明对用户和安全的影响,以及涉及的边界;
|
|
30
|
+
- 覆盖成功和反向/失败行为测试;
|
|
31
|
+
- 契约变化时同步更新 Schema、OpenAPI、规范正文、示例和 Changelog;
|
|
32
|
+
- 除非提供版本化迁移方案,否则保持 callback/Key Binding 固定路径不变;
|
|
33
|
+
- 保持 Profile 声明式,并拒绝与可执行行为相关的未知字段;
|
|
34
|
+
- 适用时优先使用 DSH 官方或社区能力,不引入平行运行时;
|
|
35
|
+
- 在干净安装中通过 `npm run check`;
|
|
36
|
+
- 声明所有新增依赖、许可证、安装脚本和引入理由。
|
|
37
|
+
|
|
38
|
+
修改 OIDC、Key Binding、凭据、Profile 校验、native 账号契约、构建/发布流程或依赖锁定,必须提供独立技术复核、CI 和专项回归证据,并由当前维护者明确接受结论。项目增加第二位维护者后,此类变更还应取得独立人工批准。
|
|
39
|
+
|
|
40
|
+
## 代码风格
|
|
41
|
+
|
|
42
|
+
- 原生 ESM,Node 22 基线。
|
|
43
|
+
- 模块保持小而明确,校验采用失败关闭。
|
|
44
|
+
- 公共错误码是稳定机器事实;消息不得包含秘密。
|
|
45
|
+
- 网络操作必须有超时和响应大小上限。
|
|
46
|
+
- 避免记录响应 body、header、Token、Key 或完整 Profile。
|
|
47
|
+
- 优先使用 DSH 官方服务和 export;记录每个兼容扩展点。
|
|
48
|
+
|
|
49
|
+
## Commit 与发布规范
|
|
50
|
+
|
|
51
|
+
- Commit 应便于审查;项目策略支持时使用签名。
|
|
52
|
+
- 不得提交生成的凭据、`.env`、归档或 session 日志。
|
|
53
|
+
- `lib/` 由 `npm run build` 生成;审查源码和 tarball,而不只是压缩产物。
|
|
54
|
+
- 优先通过受保护 tag 和批准的 Trusted Publishing 工作流发布。该流程尚未配置时,初始维护者可以用 npm CLI 和浏览器 2FA 发布已冻结并核验的 tarball,但不得声称 provenance;只有 npm 实际生成 attestation 后才能记录 provenance。
|
|
55
|
+
|
|
56
|
+
参与贡献即表示同意遵守[行为准则](CODE_OF_CONDUCT.md),并确认你有权按 MIT 许可证提交相关贡献。
|
package/GOVERNANCE.en.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
[简体中文](GOVERNANCE.md) | **English**
|
|
4
|
+
|
|
5
|
+
## Project ownership
|
|
6
|
+
|
|
7
|
+
`dsh-oidc` is initiated and hosted by [@freedomkk-qfeng](https://github.com/freedomkk-qfeng). The project remains institution-neutral: an institution's names, trademarks, service addresses, and Client IDs belong only in authorized deployment configuration and must not become protocol defaults.
|
|
8
|
+
|
|
9
|
+
## Roles
|
|
10
|
+
|
|
11
|
+
- **Maintainers** merge ordinary changes, triage issues, and manage compatibility.
|
|
12
|
+
- **Security maintainers** review authentication, authorization, credential, build, and release changes and handle private reports.
|
|
13
|
+
- **Release managers** control tags, npm publishing, release evidence, provenance when available, and rollback.
|
|
14
|
+
|
|
15
|
+
The current roster is in [`MAINTAINERS.en.md`](MAINTAINERS.en.md). One maintainer currently holds all three roles and there is no backup. Release/security-recovery backups, role separation, and a second human reviewer are future governance goals. Current releases must accurately record independent technical review, CI/regression evidence, known limitations, and the maintainer's decision.
|
|
16
|
+
|
|
17
|
+
## Decision process
|
|
18
|
+
|
|
19
|
+
- Ordinary implementation decisions use pull-request review.
|
|
20
|
+
- Public contract, trust-boundary, dependency strategy, or governance changes require an Architecture Decision Record in `docs/decisions/`.
|
|
21
|
+
- Backward-incompatible changes require migration documentation and the versioning process in `docs/compatibility.en.md`.
|
|
22
|
+
- Maintainers seek rough consensus; unresolved security and interoperability concerns block release until addressed or explicitly accepted in a documented decision.
|
|
23
|
+
|
|
24
|
+
## Review and merge
|
|
25
|
+
|
|
26
|
+
- The current maintainer approves ordinary documentation, test, and UI changes through a reviewable pull-request record.
|
|
27
|
+
- OIDC, Key Binding, Profile validation, secrets, native boundaries, workflows, dependencies, and releases require independent technical review plus CI and focused regression evidence. The maintainer explicitly accepts findings and exceptions in the pull request or release record.
|
|
28
|
+
- There is no second human maintainer today, so the project must not claim two-person approval. Add independent human approval for security-sensitive changes after the maintainer roster expands.
|
|
29
|
+
- CI must be enabled on the public remote. Required human review and branch protection should be enabled when repository permissions and the maintainer roster support them; a direct merge during the initial single-maintainer phase must retain check results and decision rationale.
|
|
30
|
+
|
|
31
|
+
## Releases
|
|
32
|
+
|
|
33
|
+
- During the initial phase, the current maintainer also acts as release manager. Tags and npm packages are created only after `docs/release-checklist.en.md` is completed and its evidence and exceptions are recorded.
|
|
34
|
+
- npm Trusted Publishing/OIDC with provenance is the preferred target process. Until a Trusted Publisher is configured, the first stable release may use the npm CLI and maintainer-confirmed browser 2FA to publish the verified frozen tarball. That path must not claim provenance or write a long-lived token into the repository, logs, or deliverables.
|
|
35
|
+
- After Trusted Publishing is configured, releases should move to protected tags and the approved workflow, and provenance is recorded only when an npm attestation actually exists.
|
|
36
|
+
- A release record includes checksums, compatibility matrix, changelog, known limitations, and rollback guidance.
|
|
37
|
+
- A compromised or unsafe release is deprecated promptly; secrets are rotated and users are notified through the security policy.
|
|
38
|
+
|
|
39
|
+
## Branding and neutrality
|
|
40
|
+
|
|
41
|
+
The project may document ECNU as a reference implementation while keeping the protocol institution-neutral. Merging another organization's example does not imply endorsement. Trademarks and logos require their owners' permission and are not granted by the MIT code license.
|
package/GOVERNANCE.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# 治理规则
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](GOVERNANCE.en.md)
|
|
4
|
+
|
|
5
|
+
## 项目所有权
|
|
6
|
+
|
|
7
|
+
`dsh-oidc` 由 [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) 发起并托管。项目保持机构中立;具体机构的名称、商标、服务地址和 Client ID 只能出现在获得授权的部署配置中,不能成为公共协议的默认值。
|
|
8
|
+
|
|
9
|
+
## 角色
|
|
10
|
+
|
|
11
|
+
- **维护者**:合并普通变更、处理 Issue 并管理兼容性。
|
|
12
|
+
- **安全维护者**:审查认证、授权、凭据、构建和发布变更,并处理私有报告。
|
|
13
|
+
- **发布经理**:控制 tag、npm 发布、发布证据、可用时的 provenance 和回滚。
|
|
14
|
+
|
|
15
|
+
维护者名单见 [`MAINTAINERS.md`](MAINTAINERS.md)。项目当前由一名维护者兼任上述角色,尚无替补。发布与安全恢复替补、多维护者权限分离和第二位人工审查是后续治理目标;当前发布必须如实记录独立技术复核、CI/回归证据、已知限制和维护者决定。
|
|
16
|
+
|
|
17
|
+
## 决策流程
|
|
18
|
+
|
|
19
|
+
- 普通实现决策通过 Pull Request 审查。
|
|
20
|
+
- 公共契约、信任边界、依赖策略或治理变更,需要在 `docs/decisions/` 中记录 ADR。
|
|
21
|
+
- 不向后兼容的变更必须提供迁移文档,并遵循[兼容性与发布策略](docs/compatibility.md)。
|
|
22
|
+
- 维护者寻求大致共识;未解决的安全和互操作问题会阻止发布,除非通过书面决策明确接受。
|
|
23
|
+
|
|
24
|
+
## 审查与合并
|
|
25
|
+
|
|
26
|
+
- 普通文档、测试和 UI 变更由当前维护者审批并保持可审查的 Pull Request 记录。
|
|
27
|
+
- OIDC、Key Binding、Profile 校验、秘密、native 边界、工作流、依赖或发布变更必须形成独立技术复核和 CI/专项回归证据,由维护者在 Pull Request 或发布记录中明确接受结论和例外。
|
|
28
|
+
- 当前没有第二位人工维护者,不得声称完成了两人审批。维护者名单扩充后,安全敏感变更应增加独立人工批准。
|
|
29
|
+
- 公开远程仓库必须启用 CI。分支保护和强制人工审查应在仓库权限与维护者配置具备条件后启用;初期单一维护者直接合并时必须留存检查结果和决定依据。
|
|
30
|
+
|
|
31
|
+
## 发布
|
|
32
|
+
|
|
33
|
+
- 初期由当前维护者兼任发布经理;只有在完成[公开发布检查表](docs/release-checklist.md)并记录证据和例外后,才能创建 tag 或发布 npm 包。
|
|
34
|
+
- npm Trusted Publishing/OIDC 和 provenance 是优先的目标流程。尚未配置 Trusted Publisher 时,首次稳定版可以由维护者使用 npm CLI 和浏览器 2FA 发布经过校验的冻结 tarball;该路径不得声称具有 provenance,也不得把长期 Token 写入仓库、日志或交付物。
|
|
35
|
+
- Trusted Publisher 配置完成后,发布应切换到受保护 tag 和批准的工作流,并以实际 npm attestation 为准记录 provenance。
|
|
36
|
+
- 发布记录包含 checksum、兼容性矩阵、Changelog、已知限制和回滚说明。
|
|
37
|
+
- 发现发布版本已被攻陷或不安全时,应迅速弃用、轮换秘密,并按安全政策通知用户。
|
|
38
|
+
|
|
39
|
+
## 品牌与中立性
|
|
40
|
+
|
|
41
|
+
项目可以记录 ECNU 参考实现,但协议必须保持机构中立。合并其他机构示例不代表背书。商标和 Logo 的使用需要权利人许可,MIT 代码许可证不授予商标权。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Maintainers
|
|
2
|
+
|
|
3
|
+
[简体中文](MAINTAINERS.md) | **English**
|
|
4
|
+
|
|
5
|
+
| Role | Primary | Backup | Approval status |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| Project maintainer | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | None yet | Initial single-maintainer phase |
|
|
8
|
+
| Security maintainer | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | None yet | Initial single-maintainer phase |
|
|
9
|
+
| Release manager | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | None yet | Initial single-maintainer phase |
|
|
10
|
+
|
|
11
|
+
The project is currently in its initial single-maintainer phase. It has no backup and does not claim a second human approval. The maintainer explicitly decides each release after recording independent technical review, CI/regression evidence, known limitations, and recovery steps. Adding a backup capable of handling private security reports and release recovery is a future governance goal; the roster and repository permissions must be updated when one is added.
|
|
12
|
+
|
|
13
|
+
Role responsibilities and review thresholds are defined in [`GOVERNANCE.en.md`](GOVERNANCE.en.md).
|
package/MAINTAINERS.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 维护者
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](MAINTAINERS.en.md)
|
|
4
|
+
|
|
5
|
+
| 角色 | 主要负责人 | 替补 | 批准状态 |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| 项目维护者 | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | 暂无 | 初期单一维护者 |
|
|
8
|
+
| 安全维护者 | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | 暂无 | 初期单一维护者 |
|
|
9
|
+
| 发布经理 | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | 暂无 | 初期单一维护者 |
|
|
10
|
+
|
|
11
|
+
项目当前处于初期单一维护者阶段,尚无替补,不声称已经完成第二位人工审批。发布由维护者在记录独立技术复核、CI/回归证据、已知限制和恢复步骤后明确决定。增加能够处理私有安全报告和发布恢复的替补,是后续治理目标;新增后应及时更新本表和仓库权限。
|
|
12
|
+
|
|
13
|
+
角色职责和审查门槛见[治理规则](GOVERNANCE.md)。
|
package/README.en.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-oidc
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> `0.2.0`, based on official DSH `0.1.5-rc.1`: identity login, managed keys, model discovery and logout remain public. Quota requests, normalization and UI belong to a separately installed institution extension. No public quota or heartbeat requests. See [account extensions](docs/account-extensions.en.md) and [server specification](docs/server-integration-contract.en.md). Consult the npm registry for publication status.
|
|
4
4
|
|
|
5
5
|
[简体中文](README.md) | **English**
|
|
6
6
|
|
|
@@ -10,12 +10,12 @@ Standards-based enterprise identity and model integration for [DeepSeek Harness]
|
|
|
10
10
|
|
|
11
11
|
1. OpenID Connect Authorization Code flow with PKCE for a public client;
|
|
12
12
|
2. a fixed enterprise **Key Binding** protocol that exchanges the authenticated OIDC access token for a revocable model runtime credential;
|
|
13
|
-
3.
|
|
14
|
-
4.
|
|
13
|
+
3. a local OpenAI-compatible Provider with optional automatic model discovery; and
|
|
14
|
+
4. safe account refresh and sign-out, with optional institution account extensions.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Shared account UI and optional bounded branding accompany these capabilities. Identity-only integration may omit resource APIs, and personal model providers remain available.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The plugin targets a single-user local client. Web is for local validation; `backend: desktop` uses a temporary loopback callback and the host browser service without a persistent WebServer. `backend: native` remains for the legacy account bridge. No backend is tied to a particular shell; see [desktop host integration](docs/desktop-host.en.md).
|
|
19
19
|
|
|
20
20
|
Integrating your own organization? Read the **[server API specification](docs/server-integration-contract.en.md)** first, then follow the **[getting-started guide](docs/getting-started.en.md)**. The first defines, with requests, responses, fields, and errors, the OIDC + PKCE, Key Binding, and model-gateway capabilities one institutional service must jointly deliver; the second covers configuration, installation, acceptance, and troubleshooting.
|
|
21
21
|
|
|
@@ -48,17 +48,17 @@ The Enterprise Profile is data only. It cannot name JavaScript modules, inject C
|
|
|
48
48
|
|
|
49
49
|
## What is included
|
|
50
50
|
|
|
51
|
-
-
|
|
51
|
+
- loopback callback `http://127.0.0.1:<actual-port>/oauth/callback`: the WebServer port for Web, a temporary random port by default for desktop;
|
|
52
52
|
- OIDC Discovery, PKCE S256, state, nonce, RS256 ID Token validation, UserInfo subject binding, refresh, and optional revocation;
|
|
53
53
|
- `userinfo.name` for display, falling back only to the required `userinfo.sub`;
|
|
54
54
|
- fixed `worker-user-center-v1` endpoints for bootstrap, provision, resolve, and renew;
|
|
55
55
|
- DSH Credential Provider storage for OIDC session material and the runtime API key;
|
|
56
56
|
- declarative provider/model catalog and bounded brand tokens;
|
|
57
|
-
-
|
|
57
|
+
- shared official model-settings, onboarding, sidebar-account and general-settings slots, with capability-aware operations across local Web and both desktop shells;
|
|
58
58
|
- a native backend adapter boundary for desktop products;
|
|
59
59
|
- a stable `enterpriseTransforms` service for capabilities such as a text-model image fallback without forking the Provider route.
|
|
60
60
|
|
|
61
|
-
Not included: an OIDC Provider, a Key Binding server, multi-user session storage, an organization directory,
|
|
61
|
+
Not included: an OIDC Provider, a Key Binding server, multi-user session storage, an organization directory, a desktop shell, or remote executable plugins.
|
|
62
62
|
|
|
63
63
|
## Branding scope
|
|
64
64
|
|
|
@@ -69,25 +69,25 @@ Not included: an OIDC Provider, a Key Binding server, multi-user session storage
|
|
|
69
69
|
- a six-digit hexadecimal `primaryColor`;
|
|
70
70
|
- `loginTitle`, `loginDescription`, and an HTTPS `supportURL`.
|
|
71
71
|
|
|
72
|
-
These values affect the document title, sidebar brand, conversation hero mark, login/confirmation surfaces, and a bounded set of DSH theme tokens. They cannot inject arbitrary CSS, SVG, scripts, or components, and they do not replace a desktop shell, updater,
|
|
72
|
+
These values affect the document title, sidebar brand, conversation hero mark, login/confirmation surfaces, and a bounded set of DSH theme tokens. They cannot inject arbitrary CSS, SVG, scripts, or components, and they do not replace a desktop shell, updater, or institution-specific business pages. See the [Enterprise Profile specification](docs/enterprise-profile.en.md#branding) for limits and security rules.
|
|
73
73
|
|
|
74
74
|
## Requirements
|
|
75
75
|
|
|
76
76
|
- Node.js 22 or newer;
|
|
77
|
-
- DeepSeek Harness `0.1.
|
|
78
|
-
- an OIDC Public Client without a Client Secret
|
|
77
|
+
- one coherent DeepSeek Harness `0.1.5-rc.1` peer set for this source candidate; historical stable `0.1.0` targets DSH `0.1.2-rc.1`;
|
|
78
|
+
- an OIDC Public Client without a Client Secret: new desktops use `http://127.0.0.1:<actual-port>/oauth/callback`, while local Web validation registers its actual fixed port;
|
|
79
79
|
- Discovery metadata with PKCE S256, RS256 ID Tokens, and `userinfo_endpoint`;
|
|
80
|
-
-
|
|
80
|
+
- an OIDC service for identity-only mode; managed models additionally require the Key Binding and model gateway in the [server contract](docs/server-integration-contract.en.md);
|
|
81
81
|
- a DSH Credential Provider appropriate for the deployment.
|
|
82
82
|
|
|
83
83
|
The current Web backend is intentionally limited to a trusted, single-user DSH process bound to `127.0.0.1`. It is not a shared public-Web session solution. See [Security model](docs/security-model.en.md).
|
|
84
84
|
|
|
85
85
|
## Install
|
|
86
86
|
|
|
87
|
-
Install the
|
|
87
|
+
Install the exact npm version in a coherent DSH `0.1.5-rc.1` host. During release preparation, if the version is not yet in the registry, use the source instructions below rather than installing an older version or suppressing peer conflicts:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
dsh plugin --profile web add @eduwork/dsh-oidc@0.
|
|
90
|
+
dsh plugin --profile web add @eduwork/dsh-oidc@0.2.0
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
For auditing, development, or testing unpublished changes, install from a local checkout instead:
|
|
@@ -100,7 +100,7 @@ npm run check
|
|
|
100
100
|
dsh plugin --profile web add .
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
The local-path form links the checkout into the DSH `web` Profile, so keep the source directory in place. Team deployments should
|
|
103
|
+
The local-path form links the checkout into the DSH `web` Profile, so keep the source directory in place. Team deployments should pin a reviewed, exact npm version and must not mix another DSH prerelease line into the same profile.
|
|
104
104
|
|
|
105
105
|
Advanced products may instead add it explicitly to their own DSH bundle patch:
|
|
106
106
|
|
|
@@ -109,10 +109,10 @@ Advanced products may instead add it explicitly to their own DSH bundle patch:
|
|
|
109
109
|
- id: enterprise-oidc
|
|
110
110
|
name: '@eduwork/dsh-oidc'
|
|
111
111
|
config:
|
|
112
|
-
profilePathEnv:
|
|
112
|
+
profilePathEnv: EDUWORK_OIDC_PROFILE
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
Set `
|
|
115
|
+
Set `EDUWORK_OIDC_PROFILE` to a trusted local JSON file. Start from [`examples/enterprise-profile.example.json`](examples/enterprise-profile.example.json) and validate it with [`schema/enterprise-profile.v1alpha1.schema.json`](schema/enterprise-profile.v1alpha1.schema.json).
|
|
116
116
|
|
|
117
117
|
Start DSH on the fixed IPv4 loopback host. The public OIDC client must register exactly:
|
|
118
118
|
|
|
@@ -120,7 +120,7 @@ Start DSH on the fixed IPv4 loopback host. The public OIDC client must register
|
|
|
120
120
|
http://127.0.0.1:3080/oauth/callback
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
This installation example uses local Web validation. Its port follows the actual DSH WebServer port; if the operator changes `3080`, registration must match. New desktops use a temporary listener and normally request an available port; see [desktop integration](docs/desktop-host.en.md). The loopback host and callback path stay fixed.
|
|
124
124
|
|
|
125
125
|
## Configuration surfaces
|
|
126
126
|
|
|
@@ -129,7 +129,7 @@ The callback host and path are not configurable. The port follows the actual DSH
|
|
|
129
129
|
| `profile` | One inline Enterprise Profile object. |
|
|
130
130
|
| `profiles` | An array of inline Enterprise Profiles. Provider IDs must also be unique. |
|
|
131
131
|
| `profilePathEnv` | Name of an environment variable containing the trusted JSON profile path. |
|
|
132
|
-
| `backend` | `web` (default)
|
|
132
|
+
| `backend` | `web` (default) for local validation, `desktop` for the shared temporary loopback/native-browser implementation, or legacy `native` for a host-provided `enterpriseAccounts` service. |
|
|
133
133
|
| `uiMode` | `standard` (shared model settings plus account/onboarding/branding), `models-only` (shared model settings only), or `external` (no plugin UI). |
|
|
134
134
|
| `web.returnPath` | Same-origin absolute path after callback; defaults to `/`. |
|
|
135
135
|
| `allowEmptyProfiles` | Allows the plugin service to start with no profile, mainly for composition tests. |
|
|
@@ -138,7 +138,7 @@ See [Enterprise Profile](docs/enterprise-profile.en.md) for every data field and
|
|
|
138
138
|
|
|
139
139
|
## Protocol summary
|
|
140
140
|
|
|
141
|
-
OIDC remains standard OIDC. The plugin does not support custom “userinfo field mapping”: `name` is the standard display claim and `sub` is the guaranteed stable fallback.
|
|
141
|
+
OIDC remains standard OIDC. The plugin does not support custom “userinfo field mapping”: `name` is the standard display claim and `sub` is the guaranteed stable fallback. Identity-only mode requires OIDC and omits both `keyBinding` and `provider`. Managed enterprise keys/models require both fields and the Key Binding/model-gateway services. See the [complete server integration contract](docs/server-integration-contract.en.md).
|
|
142
142
|
|
|
143
143
|
Given `keyBinding.baseURL = https://ai.example.edu/api/worker/v1`, the only valid operations are:
|
|
144
144
|
|
|
@@ -149,7 +149,7 @@ Given `keyBinding.baseURL = https://ai.example.edu/api/worker/v1`, the only vali
|
|
|
149
149
|
|
|
150
150
|
The profile cannot change these paths or their fields. [`protocol/openapi.yaml`](protocol/openapi.yaml) is the machine-readable contract; [Key Binding protocol](docs/key-binding-protocol.en.md) defines normative behavior, authorization, idempotency, logging, and lifecycle semantics.
|
|
151
151
|
|
|
152
|
-
Provider ID determines the runtime route
|
|
152
|
+
Provider ID determines the runtime route; the default enterprise credential reference is `EDUWORK_API_KEY`. Legacy automatic names are migrated compatibly, while independently managed references remain configurable through `keyBinding.credentialRef`. Verified identity, resource binding and a key fingerprint enforce ownership without changing the server API.
|
|
153
153
|
|
|
154
154
|
## Development
|
|
155
155
|
|
|
@@ -158,10 +158,12 @@ npm ci
|
|
|
158
158
|
npm run check
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
`npm run check` rebuilds both plugin faces
|
|
161
|
+
Development dependencies and the lockfile pin DSH `0.1.5-rc.1`, without referring to a developer’s installed desktop. `npm run check` verifies the dependency lock and selected DSH Host, Client, Provider, WebServer, credentials, and Typert contracts; rebuilds both plugin faces; runs unit/security-contract tests; validates examples and OpenAPI structure; scans publishable sources for common secrets, personal paths, non-example addresses, and ECNU service endpoints; and inspects the npm tarball.
|
|
162
162
|
|
|
163
163
|
The repository intentionally keeps Host code as native ESM under `src/host`; `scripts/build-host.mjs` copies it to `lib`. The DSH browser client is bundled as the loader-compatible `lib/client.js`.
|
|
164
164
|
|
|
165
|
+
Plugin `0.2.0` does not track the EduWork product version. Distribution assembly uses an exact npm version and integrity; source paths are for development. This version does not replace earlier frozen artifacts. See [development and release preparation](docs/development.en.md) for clean installation and validation boundaries.
|
|
166
|
+
|
|
165
167
|
## Documentation
|
|
166
168
|
|
|
167
169
|
- [Architecture and boundaries](docs/architecture.en.md)
|