migrate: own the HTTP domain module as an explicit package

Move the pre-migration net/http.mq.md content into this repository's package
entry, replacing the bundle-relative utf8 import with the public std:text/utf8
dependency. The module leaves the default Bundle and is consumed through the
explicit @http package import; the original domain test and its baseline
terminal value are carried over unchanged.

Refs cflmy/marqdo#9, cflmy/marqdo-ext-http#1
This commit was merged in pull request #2.
This commit is contained in:
cflmy committed 2026-11-27 00:07:52 +08:00
1 parent f2dde4234c
commit 368b33d241
8 files changed
+713 -6

No files matched your search

+35 -5
View File
@@ -1,14 +1,44 @@
# marqdo-ext-http
本仓负责HTTP、URL、SSE 与报文生命周期。当前状态为 `planned`。
本仓负责HTTP 报文编解码(显式 Package)。当前处于**标准库源码归位迁移**阶段:领域模块已迁入本仓作为显式 Package,等待父仓候选组合验收(父仓工单 [marqdo#9](https://git.cflmy.cn/cflmy/marqdo/issues/9),本仓工单 [#1](https://git.cflmy.cn/cflmy/marqdo-ext-http/issues/1))。
## 首项任务
## 现行形态:显式 Package,不进入默认 Bundle
**大改**。把现有 HTTP 迁为基于 std-net 的独立包,覆盖 URL、消息编解码、请求生命周期和 SSE。
- 入口:`index.mq.md`(`marqdo.yaml` 声明 package)。
- 消费者声明依赖并用公开 `@alias` 导入:
```yaml
# consumer/marqdo.yaml
dependencies:
http:
git: https://git.cflmy.cn/cflmy/marqdo-ext-http
rev: <精确提交>
```
```markdown
---
import:
http: "@http"
---
## @exec main
`return http.<函数>(...)`
```
- 不再以 `std:http` 提供,不保留隐藏 fallback;默认标准库 Bundle 不包含本模块。
- 测试:`scripts/test.sh` 只接受 `MARQDO_BIN` + `MARQDO_STDLIB_DIR`,用临时消费者工程经 `marqdo lock` 与 `@alias` 公开导入执行。
`index.mq.md`:原 `net/http.mq.md` 的报文/响应解析与请求构建函数,公开为 Package 入口(消费者通过 `@http` 导入)
## 边界
不进入默认 Bundle,不提供 `std:net/http`;不实现完整 HTTP Client/Server、SSE、HTTP/2(另行开发);不新增 Host 请求,底层仍使用现行通用资源/字流能力。
## 目录
- [modules/](modules/README.md) 存放对外发布的模块源码。
- [tests/](tests/README.md) 存放独立验收用的输入和断言。
- `index.mq.md`:Package 入口与唯一公开入口。
- `tests/`:迁入的领域测试源与期望。
- `scripts/`:独立验收入口。
[生态迁移台账](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/MIGRATION.md) · [开发流程](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/DEVELOPMENT.md)