Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
0cadf4b
fix(client): show the sign-out on the blank new-session page
TecFancy Aug 19, 2026
222e4ce
docs: refresh sign-out screenshots and update README (en/zh)
TecFancy Aug 19, 2026
f1c21c6
docs: add npm/github badges to README and clarify package description
TecFancy Aug 20, 2026
d8e6a64
build: align dsh ecosystem pins to rc.7 line
TecFancy Aug 20, 2026
52b82ba
build: re-resolve lockfile to a consistent caret tree
TecFancy Aug 20, 2026
16401b4
feat(client): move sign-out to sidebar footer with localized label
TecFancy Aug 20, 2026
fc2424e
feat(client): move sign-out into settings as a centered CTA
TecFancy Aug 25, 2026
10052b9
chore: merge main into development (release 0.7.2; keep settings-pane…
TecFancy Aug 25, 2026
b4d876a
docs: document CLI invocation for profile-installed plugins
TecFancy Aug 25, 2026
fb63388
feat: authenticated local proxy for the dsh configuration plane + X-D…
TecFancy Aug 26, 2026
805e9a8
refactor: move agent skills to .agents/skills
TecFancy Aug 28, 2026
0cc88eb
ci: add scenario gate runner with change-surface detection (M3)
TecFancy Aug 29, 2026
42c1c69
build: sync lockfile root entry with package.json (rc.6 pins, proxy bin)
TecFancy Aug 29, 2026
9874127
feat: make logout CTA slot order configurable via logoutOrder
TecFancy Aug 29, 2026
28fb618
feat: ship config quick-reference skill with the package + dsh-auth s…
TecFancy Aug 29, 2026
beff00a
chore: make bundled config skill user-only (disable-model-invocation)
TecFancy Aug 30, 2026
1801985
Merge remote-tracking branch 'origin/main' into development
TecFancy Aug 30, 2026
8d36ca0
Merge remote-tracking branch 'origin/development' into development
TecFancy Aug 30, 2026
0286420
refactor: restructure src into layered slices with barrel-only imports
TecFancy Aug 30, 2026
6dbd2d8
chore: port framework verify gates (bundle/slice/no-emdash/decisions)…
TecFancy Aug 30, 2026
90690aa
docs: land decision-record process with backfilled D1-D5 ADRs, sync s…
TecFancy Aug 30, 2026
8841c5d
Merge pull request #56 from TecFancy/refactor/layered-src
TecFancy Aug 30, 2026
d6c0ab0
chore: merge origin/main (v0.10.0 release) into development
TecFancy Aug 30, 2026
082c7fb
docs: make bundled config skill bilingual (en/zh)
TecFancy Aug 30, 2026
f91c6f7
docs: record branch hygiene pitfalls (delete-branch on promotion PRs,…
TecFancy Aug 30, 2026
9040228
feat: TOTP two-stage login (RFC 6238, stateless challenge cookie, rep…
TecFancy Aug 30, 2026
b120634
docs: M4 TOTP spec (en/zh), ADRs D6-D9, README zh/en, handoff and con…
TecFancy Aug 30, 2026
625b120
ci: scope GitGuardian test-fixture ignores to test files
TecFancy Aug 30, 2026
04e286f
chore: merge origin/main (post-v0.10.0 fixups) into development
TecFancy Aug 30, 2026
0300035
ci: drop GitGuardian integration (app removed; repo gates cover secre…
TecFancy Aug 30, 2026
e4a30c8
docs: add TOTP verification step screenshot to README
TecFancy Aug 30, 2026
ab62a7e
chore: merge origin/main (v0.11.0 release) into development
TecFancy Aug 30, 2026
8554b12
chore: merge origin/main (docs TOTP screenshot) into development
TecFancy Aug 30, 2026
d0df533
fix: sign TOTP challenge cookies and fail-close submit path
TecFancy Aug 30, 2026
9938087
docs: amend M4 TOTP spec, record challenge-cookie ADR and skill notes
TecFancy Aug 30, 2026
01b53ef
chore: merge origin/main (0.11.1 fix + docs) into development
TecFancy Aug 30, 2026
3fac865
docs: reorganize docs by lifecycle, add zh/en mirrors and 0.11.1 upgr…
TecFancy Aug 30, 2026
546ce41
chore: merge origin/main (docs reorganize) into development
TecFancy Aug 30, 2026
19c8431
feat: bridge dsh launch token into password login session
TecFancy Aug 31, 2026
35cb8a1
docs: add grok-4.6 review of launch-token bridge (19c8431)
TecFancy Aug 31, 2026
b7e48e5
fix: harden launch-token bridge per grok-4.6 review (F1-F6)
TecFancy Aug 31, 2026
20ccb82
docs: record launch-token bridge hardening (b7e48e5)
TecFancy Aug 31, 2026
a91f4a1
docs: sync README.zh.md with the launch-token bridge note
TecFancy Aug 31, 2026
90b62b1
docs: deployment upgrade checklist covers launch-token gate (dsh >= 0…
TecFancy Aug 31, 2026
eac51fb
chore: enforce doc bilingual pairing and size red line (docs:check)
TecFancy Aug 31, 2026
f1e74c6
docs: translate six single-language docs, add doc templates
TecFancy Aug 31, 2026
8529052
docs: fix color-table column misalignment in pr53 plan (drop redundan…
TecFancy Aug 31, 2026
9fd618a
chore: map docs:check to the hygiene scenario in run-gates
TecFancy Aug 31, 2026
b0884b8
Merge remote-tracking branch 'origin/main' into development
TecFancy Aug 31, 2026
55000b0
chore: release orchestration script (development→PR→main→npm→sync-back)
TecFancy Aug 31, 2026
72467d3
chore: make release.mjs repo-agnostic (--branch, pkg from package.json)
TecFancy Aug 31, 2026
1d08722
fix: align the client inject list with the 0.1.5 host providers
TecFancy Sep 12, 2026
0155c87
chore: drop the duplicated README section and gate duplicate headings
TecFancy Sep 12, 2026
b598bdb
test: freeze the TOTP replay assertion against window drift
TecFancy Sep 12, 2026
d0f6110
feat: revoke issued sessions when a user is disabled
TecFancy Sep 12, 2026
cc7da6c
test: add the unauthenticated entry coverage regression
TecFancy Sep 12, 2026
e01ada7
docs: correct the session persistence claim and document the new gates
TecFancy Sep 12, 2026
ef9d3ee
fix: keep the disabled-session sweep from rejecting after disposal
TecFancy Sep 12, 2026
9c29d39
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 13, 2026
8e04323
docs: align the gate docs, CI hygiene and skill list with reality
TecFancy Sep 13, 2026
d5ff32e
refactor: replace slice barrel wildcard re-exports with explicit lists
TecFancy Sep 13, 2026
42842ab
refactor: share the duplicated auth endpoint pieces in a new http layer
TecFancy Sep 13, 2026
4def764
build: drop the two unused dsh client dev dependencies
TecFancy Sep 13, 2026
96d43ae
fix: declare the dsh host requirement and take storage-domain from th…
TecFancy Sep 14, 2026
d0127e8
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 18, 2026
a326b5d
feat(login): redesigned identity-block gate, host-aware rendering and…
TecFancy Sep 22, 2026
3c86404
docs(decisions): record D14 publicHost and D15 login page redesign
TecFancy Sep 22, 2026
953683c
fix(login): clear the challenge cookie before writeHead on the reset …
TecFancy Sep 22, 2026
33f2bb7
fix(shared): harden publicHost normalisation
TecFancy Sep 22, 2026
ba4a7fb
fix(login): isolate bidi in the identity block and validate the code …
TecFancy Sep 22, 2026
0781580
test(password): feed the rewritten Host into the TOTP D14 case
TecFancy Sep 22, 2026
689436e
fix(proxy-cli): stop defaulting --target to a real public domain
TecFancy Sep 22, 2026
292d054
docs: replace the real deployment domain with dsh.example.com
TecFancy Sep 22, 2026
125a945
chore(package): sharpen the npm description and keywords
TecFancy Sep 22, 2026
7186c03
fix(proxy-cli): require --target instead of defaulting the upstream
TecFancy Sep 22, 2026
bab095f
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 22, 2026
71c8727
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 22, 2026
2ec52fe
fix(shared): retry the users-file rename on a transient Windows lock
TecFancy Sep 22, 2026
d885536
docs(skill): cover revokeSweepMs and the disable sweep in the quick r…
TecFancy Sep 22, 2026
77fb398
test(skill): lock the single-file bundled skill and its option covera…
TecFancy Sep 22, 2026
b516200
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 22, 2026
d77f054
fix(ratelimit): key login buckets on the real client address behind a…
TecFancy Sep 22, 2026
1b80774
docs(decisions): record D19 for the trusted proxy client address
TecFancy Sep 22, 2026
11b1536
docs(deploy): document clientIpHeader and trustedProxyCidrs
TecFancy Sep 22, 2026
19acde0
fix(ratelimit): harden client IP resolution (review follow-up)
TecFancy Sep 22, 2026
19fc1de
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 22, 2026
0d6202c
fix: render the login card for failed logins instead of a bare text page
TecFancy Sep 22, 2026
8c98587
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 22, 2026
0320ebb
chore: widen the declared dsh host range to 0.1.7-alpha.1
TecFancy Sep 23, 2026
6c49546
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 23, 2026
18e72f0
fix(login): render the login card for a failed token login
TecFancy Sep 23, 2026
56945b4
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 23, 2026
694ca8b
feat: self-service password change in the settings panel (#91)
TecFancy Sep 24, 2026
e9183dc
chore: merge origin/main (v0.15.0 release) into development
TecFancy Sep 24, 2026
d2fbbac
feat: admin password reset and the restricted session that follows it…
TecFancy Sep 24, 2026
4402caa
feat(client): settings panel user management block (#95)
TecFancy Sep 26, 2026
eb869f4
fix: declare dsh 0.2.x support in engines and the storage-domain peer
TecFancy Sep 29, 2026
b5eaea0
docs: retake the settings-panel screenshots the user management block…
TecFancy Sep 29, 2026
ab7b054
Merge remote-tracking branch 'origin/main' into development
TecFancy Sep 29, 2026
016667a
docs(specs): record how a batched promotion reaches the release notes
TecFancy Sep 29, 2026
957f9cc
chore(release): keep the PR number in the squash subject
TecFancy Sep 29, 2026
5b62f9b
feat(icon): give the Plugins page a shield mark (#100)
TecFancy Oct 5, 2026
193f54b
fix(proxy-cli): start the proxy when the bin is a symlink (#101)
TecFancy Oct 5, 2026
d945f28
feat(meta): show "Auth Gate" in the Plugins page, not the package nam…
TecFancy Oct 5, 2026
350d620
fix(token): bridge the dsh launch token after a token-mode sign-in (#…
TecFancy Oct 6, 2026
6464e7d
Merge remote-tracking branch 'origin/main' into development
TecFancy Oct 6, 2026
36605b4
docs: explain the market's credentials badge in both READMEs
TecFancy Oct 6, 2026
ae834e0
docs(skill): refresh the bundled config skill for 0.15.0-0.17.0
TecFancy Oct 6, 2026
8df78dd
Merge remote-tracking branch 'origin/main' into development
TecFancy Oct 6, 2026
73115dd
fix(gate): roll back guarded routes per entry on unwrap
TecFancy Oct 11, 2026
9a68500
chore: keep the session-memory buffer out of format:check
TecFancy Oct 11, 2026
76b00e0
test: give the scrypt-heavy admin hardening scenarios a 30s budget
TecFancy Oct 11, 2026
ebbd33d
Merge remote-tracking branch 'origin/main' into development
TecFancy Oct 11, 2026
80a39fd
fix(compat): floor the host corridor instead of appending alternatives
TecFancy Oct 11, 2026
78524ba
Merge origin/development into development (0.17.1 + per-entry unwrap …
TecFancy Oct 11, 2026
cb0f9c1
test(http): unit-test the shared auth endpoints
TecFancy Oct 11, 2026
1ed9fed
Merge remote-tracking branch 'origin/main' into development
TecFancy Oct 11, 2026
b136735
docs(decisions): propose D29 FSD layering for host and client
TecFancy Oct 12, 2026
a261f8e
build: empty lib before each build and move test-only code out of src
TecFancy Oct 12, 2026
8cd922d
refactor: split session endpoints and dsh home out ahead of the D29 move
TecFancy Oct 13, 2026
1416a86
refactor(host): move the host half into three FSD layers
TecFancy Oct 13, 2026
279b7dc
refactor(client): lay out the client half in FSD layers
TecFancy Oct 13, 2026
53d622e
docs(decisions): implement D29 and archive D5 and D11
TecFancy Oct 13, 2026
0b5c458
style(client): reformat imports left unformatted by the FSD move
TecFancy Oct 13, 2026
c2797f3
build: stop shipping client test declarations in lib/
TecFancy Oct 13, 2026
0eb3eed
fix(gate): bounce cross-site navigations so dsh's Strict cookie is sent
TecFancy Oct 13, 2026
90b4415
Merge remote-tracking branch 'origin/main' into claude/login-page-ref…
TecFancy Oct 13, 2026
c77ddfe
Merge branch 'development' into the D30 FSD branch
TecFancy Oct 16, 2026
b367da5
refactor(protocol): move the /auth paths into a cross-half contract
TecFancy Oct 16, 2026
fbb8641
build: add host:check contract gate
TecFancy Oct 16, 2026
d639678
refactor(protocol): share the /auth payload shapes across halves
TecFancy Oct 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .agents/skills/dsh-auth-code-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ required behavior over style; one substantiated blocker beats a list of nits.
what this wrap installed: it never restores a snapshot over route tables other plugins own
(post-wrap routes must survive, disposed routes must not come back; decisions D27).
4. **Real entry path.** Integration tests mount the real cordis/webserver/storage stack
(`src/integration.*.test.ts`). Hand-mounted fakes cannot catch a silent mount-point failure —
(`test/integration/integration.*.test.ts`). Hand-mounted fakes cannot catch a silent mount-point failure -
and silent failure means an unguarded deployment (plan §7).
5. **Enforcement.** Follow every denial path to the operation that enforces it: 302 vs 401
selection, upgrade rejection before ws negotiation, no-store headers. Exercise alternate
Expand Down
8 changes: 4 additions & 4 deletions .agents/skills/dsh-auth-pre-push/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ only checks invalidated by it.

## Select relevant evidence

- **Guard/gate/session-store behavior:** `npm run test -- src/<module>.test.ts`, or a focused
- **Guard/gate/session-store behavior:** `npm run test -- src/host/<layer>/<slice>/<segment>/<module>.test.ts`, or a focused
test name via `-t`.
- **Coverage for the affected source:**
`npm run test -- src/<module>.test.ts --coverage --coverage.include='src/<module>.ts'`.
`npm run test -- <path>/<module>.test.ts --coverage --coverage.include='<path>/<module>.ts'`.
Never lower thresholds or narrow the include to hide an uncovered affected file.
- **Mount-point behavior:** both integration files (`src/integration.guard.test.ts`,
`src/integration.session.test.ts`) — the regression net for the non-contractual seam
- **Mount-point behavior:** both integration files (`test/integration/integration.guard.test.ts`,
`test/integration/integration.session.test.ts`) - the regression net for the non-contractual seam
(plan §7).
- **Dependencies or lockfile:** `npm run lock:check`; the install must have used
`--registry=https://registry.npmjs.org/`.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- run: npm run lint
- run: npm run lint:no-emdash
- run: npm run slice:check
- run: npm run lint:fsd
- run: npm run decisions:check
- run: npm run docs:check

Expand Down Expand Up @@ -65,6 +66,7 @@ jobs:
- run: npm ci
- run: npm run build
- run: npm run bundle:check
- run: npm run host:check
- name: Verify committed lib/ matches a fresh build
run: git diff --exit-code -- lib
# dsh installs this package into a profile with `npm install` (devDeps
Expand Down
13 changes: 13 additions & 0 deletions .rsp/TechDebt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tech Debt

## `host:check` carries a copy of the dsh shell's module table

- **Where:** `scripts/check-host.mjs`, `HOST_MODULES`.
- **What:** The list of modules the dsh web shell seeds into its module table is copied by hand
from dsh `packages/client/web/src/platform.ts` (`PLATFORM_MODULES`). It was checked against dsh
commit `b2e3b2a` on 2026-10-16, and `dsh-lingualab` keeps a third copy in its own
`scripts/check-host.mjs` and `tsdown.config.ts`.
- **Why it is debt:** When the host adds or removes a seeded module, nothing here notices. A module
the host drops would still pass `host:check` and fail in the browser at runtime.
- **Way out:** Read the list from an installed dsh package, or from a contract file the host
publishes, once one of them ships it. Then delete the copy in this script and in `dsh-lingualab`.
15 changes: 13 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ tables).

## Verifying a change actually works

1. **`npm run verify`** — format check + lint + type-check + coverage tests
(80% red line) + `lock:check`. Must pass before committing.
1. **`npm run verify`** - format check + lint + layering (`slice:check`, `lint:fsd`) +
type-check + coverage tests (80% red line) + `lock:check`. Must pass before committing.
2. **`src/` edits require rebuilding `lib/`** (`npm run build`) and committing
the regenerated artifact in the same change. `lib/` is generated, never
hand-edited, and CI fails on drift (`git diff --exit-code -- lib`).
Expand Down Expand Up @@ -99,3 +99,14 @@ Versioning is owned by release-please (`.github/workflows/release.yml`):

See `README.md`. Docs live under `docs/` (plan + development conventions);
build output under `lib/`; CI parity checks under `.github/workflows/`.

Source layout follows Feature-Sliced Design (decision D30, in `docs/decisions/implemented/`):
the host half lives in `src/host/` with the lower three layers (`shared`, `entities`,
`features`) and the client half in `src/client/` with `shared`, `entities`, `features` and
`widgets` (no `app`, `index.tsx` stays at its root); both are checked by Steiger
(`npm run lint:fsd`). Entry points and wiring sit at the `src/` root. Cross-slice and
cross-segment imports go through `index.ts`, features never import each other, and the client
and host halves never import each other (`slice:check`). The `/auth/*` paths both halves share
live only in `src/protocol/` (D31), reached through `src/host/shared/protocol/` and
`src/client/shared/api/protocol.ts`; never write a route literal anywhere else. The tree is in
`docs/specs/development.md` "Structure".
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,9 @@ is in `docs/deployed/known-limitations.md`.

Built on the engineering conventions of
[dsh-plugin-framework](https://github.com/TecFancy/dsh-plugin-framework): barrel-only
cross-slice imports, the `npm run verify` gate chain, and decision records. `verify`
runs format / lint / no-emdash / slice / lock / decisions / docs / readme-parity /
type-check / coverage 80% / build / bundle; tests, build and the release flow are
cross-slice imports (Feature-Sliced Design layers, checked by Steiger), the `npm run verify` gate chain, and decision records. `verify`
runs format / lint / no-emdash / slice / fsd / lock / decisions / docs / readme-parity /
type-check / coverage 80% / build / bundle / host contract; tests, build and the release flow are
documented in `docs/specs/development.md`.

## License
Expand Down
6 changes: 3 additions & 3 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ systemd 示例:`deploy/systemd/dsh-auth-proxy.service.example`。
## 开发

本仓库遵循 [dsh-plugin-framework](https://github.com/TecFancy/dsh-plugin-framework) 的工程约定:
跨 slice 只通过 barrel 引用,以 `npm run verify` 作为门禁链,并保留决策记录(ADR)。`verify`
依次运行 format / lint / no-emdash / slice / lock / decisions / docs / readme-parity / type-check /
覆盖率 80% / build / bundle;测试、构建和发版流程见 `docs/specs/development_zh.md`。
跨 slice 只通过 barrel 引用(Feature-Sliced Design 分层,由 Steiger 检查),以 `npm run verify` 作为门禁链,并保留决策记录(ADR)。`verify`
依次运行 format / lint / no-emdash / slice / fsd / lock / decisions / docs / readme-parity / type-check /
覆盖率 80% / build / bundle / 宿主契约;测试、构建和发版流程见 `docs/specs/development_zh.md`。

## 许可证

Expand Down
45 changes: 39 additions & 6 deletions docs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@
→ [zh](decisions/implemented/2026-08-30-configurable-logout-order.zh.md) ·
[en](decisions/implemented/2026-08-30-configurable-logout-order.en.md)(回填自 v0.10.0)

## D5. src 分层 + 跨 slice 只走 barrel
## D5. src 分层 + 跨 slice 只走 barrel(已归档,被 D30 取代)

`gate/`/`session/` 核心机制层 + `features/{token,password,proxy}` + `shared/` 叶子层,
跨 slice 唯一 barrel 入口,feature 同层互禁;verify 链新增 slice/bundle/no-emdash/build 门禁。
**替代方案**:完整 FSD;保持平铺;session 作 feature slice(执行中被边界检查否决,降层);
轻量 ADR 制度(被官方实践否决)。**为什么**:层匹配依赖图,机器约束防回潮。
→ [zh](decisions/implemented/2026-08-30-layered-src-with-barrels.zh.md) ·
[en](decisions/implemented/2026-08-30-layered-src-with-barrels.en.md)(2026-08-30 实施)
目录部分已被 D30 取代(`gate/`/`session/`/`http/` 核心机制层改为 FSD 的 `src/host/` 下三层,client 半边也分层);
「跨 slice 只走 index.ts」「feature 同层互禁」「client 与 host 互不引用」三条纪律保留,改由 Steiger 与
`slice:check` 执行。
→ [zh](decisions/archived/2026-08-30-layered-src-with-barrels.zh.md) ·
[en](decisions/archived/2026-08-30-layered-src-with-barrels.en.md)(2026-08-30 实施,2026-10-13 归档)

## D6. TOTP 两段式登录采用无状态挑战 cookie

Expand Down Expand Up @@ -93,15 +96,17 @@ revokeBySubject / 登录 CSRF token / 限速与防重放持久化,M4 再评估
→ [zh](decisions/implemented/2026-08-30-totp-signed-challenge-cookie.zh.md) ·
[en](decisions/implemented/2026-08-30-totp-signed-challenge-cookie.en.md)

## D11. 认证 HTTP 端点公共件独立成 http 层
## D11. 认证 HTTP 端点公共件独立成 http 层(已归档,被 D30 取代)

token/password 重复的端点件(logout/status/兜底/Method 守卫)抽进新核心机制层
`src/http/`(与 gate、session 并列,经 barrel 引用),`shared` 保持叶子层不变。
**替代方案**:下沉 `shared`(破坏叶子约束,或得把 cookie 构造当参数注入);
塞进 `session`(methodNotAllowed 与会话无关);保持重复(改一处得记得另一处)。
**为什么**:去重只有这一条依赖方向干净的落点,slice:check 加白名单即可守护。
→ [zh](decisions/implemented/2026-09-13-http-endpoint-layer.zh.md) ·
[en](decisions/implemented/2026-09-13-http-endpoint-layer.en.md)
`src/http/` 层已被 D30 取代:与会话无关的件进 `src/host/shared/http`,`handleLogout`/`handleStatus`
进 `src/host/entities/session/api`。
→ [zh](decisions/archived/2026-09-13-http-endpoint-layer.zh.md) ·
[en](decisions/archived/2026-09-13-http-endpoint-layer.en.md)(2026-10-13 归档)

## D12. 宿主要求声明 + storage-domain 转 peer

Expand Down Expand Up @@ -412,3 +417,31 @@ gate 已放行、但请求是跨站顶层文档导航(`GET` + `Sec-Fetch-Site:
同源文档发起的导航才算同站,且重试的 `Sec-Fetch-Site` 是 `same-origin`,构造上不循环。
→ [zh](decisions/implemented/2026-10-13-cross-site-navigation-bounce.zh.md) ·
[en](decisions/implemented/2026-10-13-cross-site-navigation-bounce.en.md)

## D30. host 半边进 `src/host/` 用 FSD 下三层,client 半边用 FSD 分层

两个半边都改用 Feature-Sliced Design 分层并由 Steiger 守护(`npm run lint:fsd` 先后跑 `src/host` 与
`src/client`):host 收进 `src/host/{shared,entities,features}`(无 widgets/pages/app,入口与装配留在
`src/` 根),client 在 `src/client/` 下用 `shared`/`entities`/`features`/`widgets`(`index.tsx` 留在树根,
无 `pages`、无 `app`),integration 测试搬进 `test/integration/`。`slice:check` 缩成 Steiger 看不到的部分
(两半边互不导入、根文件只经 index.ts 进 host、导入无法解析即失败、不许有游离文件)。取代 D5 与 D11 的目录部分,
二者归档。`context.ts` 落在 `shared/api`;client 没有强迫任何改名。
**替代方案**:保持 D5 只整理测试;只改 client;host 不加 `src/host/` 外壳;host 照搬五层;ESLint
`no-restricted-paths` 分区代替 Steiger;`handleLogout`/`handleStatus` 留 `shared/http` 靠注入;integration
测试留在 `src/` 根。**为什么**:与 dsh-lingualab、dsh-plugin-framework 同一套结构,检查换成现成工具,层与依赖图
重新对齐,并顺带堵住 helper 进包、`lib/` 积累孤儿两个发布漏洞。
→ [zh](decisions/implemented/2026-10-12-fsd-host-and-client.zh.md) ·
[en](decisions/implemented/2026-10-12-fsd-host-and-client.en.md)(2026-10-13 实施)

## D31. `/auth/*` 路径与载荷形状收进跨半边契约 `src/protocol/`

路由路径、登录页原因键与由它们拼出的 URL 只在 `src/protocol/index.ts` 定义一次(纯常量与纯函数,不 import
任何东西),host 经 `src/host/shared/protocol/`、client 经 `src/client/shared/api/protocol.ts` 两个桥进入,
其余文件不再写路径字面量;`slice:check` 强制只有两个桥能引用它。端点的请求体、响应体、错误体与共用取值集合
是 `src/protocol/payloads.ts` 里的纯类型,经同样两个桥进入,取代了 client 手写的 `admin-types.ts` 镜像。
**替代方案**:放进 `host/shared`(client 要开直引例外,误引 barrel 会把 Node 代码打进 bundle);推广源码文本钉子
(只能发现、不能消除重复);两半边直引不设桥(Steiger 看到越树深层 import);保留载荷镜像靠测试兜(改名照样编译);
契约里放 zod schema(契约须零 import,zod 会进 bundle);契约里再放路由表(与按接线注册的实际集合不符)。
**为什么**:一份定义直接消除漂移的来源,契约零依赖所以两种构建都能安全包含,桥让 D30 的分层检查不受影响。
→ [zh](decisions/implemented/2026-10-16-cross-half-protocol.zh.md) ·
[en](decisions/implemented/2026-10-16-cross-half-protocol.en.md)
7 changes: 6 additions & 1 deletion docs/decisions/archived/.manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{}
{
"2026-08-30-layered-src-with-barrels.en.md": "ef4aba4601cd786e2004176b006b1a9d97bf290c93fa52c4444c7b4314c310f3",
"2026-08-30-layered-src-with-barrels.zh.md": "6848b5645e07c5d67d0411e4712c0b96fe9427df8d31fd273ad280371c13b1c3",
"2026-09-13-http-endpoint-layer.en.md": "b43379c6ed2c93f37e6718b88d57dc340bad83ecede9aead516af64cd71e7886",
"2026-09-13-http-endpoint-layer.zh.md": "65d36742ba37897314ec897ce65c0bbbd7b270e5f99653565c4ef207e7a3263e"
}
Loading
Loading