feat(site-packs): add DeepSeek Harness pack and support http origins - #825
Merged
Conversation
Registry validation passed ✅All SitePack and patch sources satisfy the schema, safety, ID, and match-conflict checks. |
Self-hosted AI instances are commonly served over plain HTTP, but the production build refused every http:// surface: the site adapter wizard, local JSON import and custom origin binding all went through an IS_DEVELOPMENT_BUILD gate. Split the policy along the trust boundary instead of keeping one flag: - User-initiated surfaces (origin binding, local import, wizard, and re-reading installed records) now accept http:// in every build. - Registry-distributed packs stay HTTPS-only, matching what registry/scripts/validate.mjs already enforces in CI. This also removes the previous inconsistency where development builds accepted registry packs carrying http matches. The lower layers already handled http (match pattern parsing, origin canonicalization, optional_host_permissions, userscript match coverage), so site-pack-http-policy.ts degenerated into a constant and is removed together with its test. Rename the wizard issue code https-required to unsupported-scheme since it now only rejects non-http(s) protocols, drop the unused sitePacksBindingHttpsRequired string, and reword sitePacksBindingHint across all 11 locales.
Declarative pack for self-hosted DeepSeek Harness instances covering outline, basic export, generation detect/stop, chat width, Zen Mode, prompt insertion and reading history. Selectors rely only on the stable data-slot / data-chat-flow render hooks; the CSS module class names are lightningcss build hashes and the aria-labels are localized, so neither is used. Notable choices: - matches is empty. Self-hosted instances are activated through a user-created origin binding, same as LibreChat and LobeChat. - Send and stop share one class and only differ by icon, so the buttons are told apart by their SVG path/rect. - Width sets --dsh-chat-content-width on the conversation root. The composer max width derives from that variable, so chat column, composer and stats line resize together. - One user turn expands into many assistant-step and tool-call flow items, so export needs turnSelector to keep DOM order; pairing by index would misalign the transcript. Tool calls stay out of the export. - Zen Mode overrides the AppFrame inline grid-template-columns instead of only hiding the side columns, otherwise the collapsed tracks would leave empty gutters. conversation-list, new-chat, model-lock and theme sync are not declared: the first three have no counterpart in the captured DOM, and the theme preference lives in server-side settings rather than localStorage.
Aligns the five shipped packs with the current app version. This change was already present in the working tree and is committed separately so it can be reviewed or dropped independently of the DeepSeek Harness work.
urzeye
force-pushed
the
feat/deepseek-harness-sitepack
branch
from
August 14, 2026 12:47
15f922b to
ecf1baf
Compare
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.
描述 Description
Adds a declarative site pack for self-hosted DeepSeek Harness instances, and lifts the production HTTPS-only restriction that made such instances impossible to bind in the first place.
1. HTTP origin support (
b410987b)Self-hosted AI instances are commonly served over plain HTTP, but every http:// surface was gated behind
IS_DEVELOPMENT_BUILDviasite-pack-http-policy.ts.The lower layers already handled http — match pattern parsing, origin canonicalization,
optional_host_permissions, userscript match coverage — so only the policy flag stood in the way. Rather than flipping it globally, the policy is split along the trust boundary:Registry packs staying HTTPS-only matches what
registry/scripts/validate.mjsalready enforces in CI, and removes the prior inconsistency where a development build would accept a registry pack carrying http matches.site-pack-http-policy.tsdegenerated into a constant once the split was made, so it and its test are removed. The wizard issue codehttps-requiredbecomesunsupported-scheme(it now only rejects non-http(s) protocols), the unusedsitePacksBindingHttpsRequiredstring is dropped, andsitePacksBindingHintis reworded — all synced across the 11 locales.2. DeepSeek Harness site pack (
59ba8ada)registry/sites/deepseek-harness.json— outline, outline-user-queries, export-basic, generation-detect, stop-generation, width, zen, prompt-insert, reading-history.Selectors rely only on the stable
data-slot/data-chat-flowrender hooks. The CSS module class names are lightningcss build hashes and thearia-labels are localized, so neither is used.matchesis empty — self-hosted instances are activated through a user-created origin binding, same as LibreChat and LobeChat.path/rect.--dsh-chat-content-widthon the conversation root; the composer max width derives from that variable, so chat column, composer and stats line resize together.assistant-stepandtool-callflow items, so export needsturnSelectorto keep DOM order — pairing by index would misalign the transcript. Tool calls stay out of the export.grid-template-columnsrather than only hiding the side columns, otherwise the collapsed tracks leave empty gutters.conversation-list,new-chat,model-lockand theme sync are not declared: the first three have no counterpart in the captured DOM, and the theme preference lives in server-side settings rather than localStorage, so declarativethemeSynccannot drive it.3. Registry metadata (
0ab2c4ac)Raises
minAppVersionto1.2.0for the five already-shipped packs. This change was already present in the working tree; it is committed separately so it can be reviewed or dropped independently of the rest.变更类型 Type of change
验证 Verification
pnpm registry:validate(6 packs) ·pnpm format:check·pnpm lint:check(0 errors) ·pnpm typecheck·pnpm test(283 passed) ·pnpm build·pnpm build:userscript— all pass.Not verified at runtime. The pack was authored against a captured DOM fragment plus the upstream
@deepseek-ai/dsh-client-ui-*package sources; it has not been exercised against a live DeepSeek Harness instance. The Zen Mode rule is the weakest link — the AppFrame structure comes from the package source, since the capture only contained the center column.关联 Issue Related Issues
#799