Skip to content

feat: 接入毕昇企业登录与模型网关 - #375

Draft
SuperstructureJH wants to merge 19 commits into
dataelement:v0.9.0from
SuperstructureJH:codex/dsh-gateway-auth
Draft

feat: 接入毕昇企业登录与模型网关#375
SuperstructureJH wants to merge 19 commits into
dataelement:v0.9.0from
SuperstructureJH:codex/dsh-gateway-auth

Conversation

@SuperstructureJH

@SuperstructureJH SuperstructureJH commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

内置毕昇企业登录和模型网关:PKCE 浏览器授权、回调与一次性登录码、系统凭据存储、刷新和退出,以及模型列表、调用与逐模型用量。兼容 0.4.0 / 0.5.0 合同。

基于 v0.9.0@032dd37,使用 Harness 0.1.5-rc.2。保留当前版本的启动与会话协议,补齐 Connection 的 WebServer 依赖。独立工作区完成 794 项测试(全部通过)、类型检查和构建;真实 Desktop Host 鉴权及已安装功能路由回归通过。现有 Windows PR CI 已加入 v0.9.0 触发范围,相关 26 项回归通过。

真实毕昇登录、真实模型与用量联调仍待验收;Windows、正式签名和公证保持独立验收。

yaojin3616 and others added 18 commits September 10, 2026 17:34
…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
Adapt the feature to Harness 0.1.5-rc.2 and validate its independent Desktop composition.
@SuperstructureJH
SuperstructureJH changed the base branch from main to v0.9.0 September 11, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants