feat: 接入毕昇企业登录与模型网关 - #375
Draft
SuperstructureJH wants to merge 19 commits into
Draft
Conversation
…ket (dataelement#351) Uninstalling the plugin market ran `dsh plugin remove --workspace-root dshmarket`, which edits only `dependencies` and `node_modules`. When dshmarket is installed as a generation, `desired.json` is what the next launch projects from — so prepareGenerationsForLaunch() rebuilt the market during the restart the uninstall itself triggers, and the whole operation looked like it had done nothing. Branch on the install form instead: a generation goes through uninstallGenerationPlugin() (disableGeneration + reproject), everything else keeps the existing pnpm removal. The form is read BEFORE the removal, so a generation whose disable fails reports a failure rather than a success with the pointer still in place. Not routed through removeProfilePluginCompletely(): dshmarket is a CORE_BUNDLES name and beginRemoval() refuses it by design, which is the guard that stops recovery and Safe Mode from tearing out a core bundle. Fixes dataelement#330
…rom (dataelement#352) * fix(market): install plugins from the registry the market read them from A generation install had no way to learn a registry. The boundary keeps only the package spec out of its arguments, its environment is the service's closure rather than anything the caller passes, and the staging `.npmrc` was written with no registry line — so pnpm fell back to the user's `~/.npmrc`. The market meanwhile picks WHICH version to install by reading metadata from its region's registry (Tencent's mirror in the china region). Those two registries diverge for minutes to hours after any publish, and while they do, every update fails with ERR_PNPM_NO_MATCHING_VERSION or silently resolves `@latest` to the older build and reports a stale update. Resolve the market's own registry and pin the staging workspace to it, so the half that chooses a version and the half that fetches it agree. A project `.npmrc` outranks `~/.npmrc`, and unlike `npm_config_*` it does not depend on a pnpm major still reading that env prefix. The value is inferred from the market's persisted region because dshmarket ships from npm on its own schedule and the fix cannot wait for a release that passes it in — but `--registry=` is now read from the boundary's arguments and wins, so a later market can state it outright. An already named `npm_config_registry`, and a region on the default registry, are both left alone: pinning npmjs.org over a private registry would break installs that work today. Also report pnpm's error CODE instead of the line after it. The trailing "This error happened while installing a direct dependency of <path>" also matches /error/i and, being last, displaced ERR_PNPM_NO_MATCHING_VERSION from the log — which is why this could only be diagnosed by reproducing the install by hand. Fixes dataelement#337 * fix: align plugin updates with published market behavior * test: make build approval fixture independent of Node shims * test: canonicalize Windows temporary workspace paths
# Conflicts: # package-lock.json
Adapt the feature to Harness 0.1.5-rc.2 and validate its independent Desktop composition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内置毕昇企业登录和模型网关:PKCE 浏览器授权、回调与一次性登录码、系统凭据存储、刷新和退出,以及模型列表、调用与逐模型用量。兼容 0.4.0 / 0.5.0 合同。
基于
v0.9.0@032dd37,使用 Harness0.1.5-rc.2。保留当前版本的启动与会话协议,补齐 Connection 的 WebServer 依赖。独立工作区完成 794 项测试(全部通过)、类型检查和构建;真实 Desktop Host 鉴权及已安装功能路由回归通过。现有 Windows PR CI 已加入v0.9.0触发范围,相关 26 项回归通过。真实毕昇登录、真实模型与用量联调仍待验收;Windows、正式签名和公证保持独立验收。