Skip to content

feat(site-packs): add DeepSeek Harness pack and support http origins - #825

Merged
urzeye merged 3 commits into
mainfrom
feat/deepseek-harness-sitepack
Aug 14, 2026
Merged

feat(site-packs): add DeepSeek Harness pack and support http origins#825
urzeye merged 3 commits into
mainfrom
feat/deepseek-harness-sitepack

Conversation

@urzeye

@urzeye urzeye commented Aug 14, 2026

Copy link
Copy Markdown
Owner

描述 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_BUILD via site-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:

Surface Before After
Custom origin binding dev builds only always
Local JSON import dev builds only always
Site adapter wizard dev builds only always
Re-reading installed packs dev builds only always
Registry-distributed packs dev builds only never

Registry packs staying HTTPS-only matches what registry/scripts/validate.mjs already enforces in CI, and removes the prior inconsistency where a development build would accept a registry pack carrying http matches.

site-pack-http-policy.ts degenerated into a constant once the split was made, so it and its test are removed. The wizard issue code https-required becomes unsupported-scheme (it now only rejects non-http(s) protocols), the unused sitePacksBindingHttpsRequired string is dropped, and sitePacksBindingHint is 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-flow render hooks. The CSS module class names are lightningcss build hashes and the aria-labels are localized, so neither is used.

  • 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 differ only 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 rather than only hiding the side columns, otherwise the collapsed tracks 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, so declarative themeSync cannot drive it.

3. Registry metadata (0ab2c4ac)

Raises minAppVersion to 1.2.0 for 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

  • ✨ 新功能 (New feature)

验证 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

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

Registry validation passed ✅

All SitePack and patch sources satisfy the schema, safety, ID, and match-conflict checks.

urzeye added 3 commits August 14, 2026 20:46
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
urzeye force-pushed the feat/deepseek-harness-sitepack branch from 15f922b to ecf1baf Compare August 14, 2026 12:47
@urzeye urzeye self-assigned this Aug 14, 2026
@urzeye urzeye added enhancement Feature request or functional improvement adaptation Adaptation to the new dom structure labels Aug 14, 2026
@urzeye urzeye added this to the v1.2.1 milestone Aug 14, 2026
@urzeye
urzeye merged commit 06dbf09 into main Aug 14, 2026
2 checks passed
@urzeye
urzeye deleted the feat/deepseek-harness-sitepack branch August 14, 2026 13:04
@github-project-automation github-project-automation Bot moved this from Todo to Done in Ophel Development Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adaptation Adaptation to the new dom structure enhancement Feature request or functional improvement

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant