chore(repo): consolidate spec artifacts into specs/ and complete README coverage
- Move generated OpenAPI bundles out of dist/ into committed specs/ (specs/openapi.json, specs/openapi.raw.json); source YAML tree moves openapi/ -> specs/openapi/; schemas/workflow-schema.json joins as specs/workflow-schema.json - Update all generators/consumers: bundle-openapi, generate-raw-openapi, check-version-sync, bump-version, export-workflow-schema, packaging/embedded-openapi - Rewrite stale .env.example with current HOSE_* environment variables - Archive stale repo-local enterprise configs (superseded by ~/.config/hose-use/enterprises) out of the repo; root enterprises/ keeps only the tracked example.json plus an explanatory README - Add missing directory READMEs: approval/contact/message/task/events domains, cli/, http/, packaging/ - Fix stale domain doc links in README.domains.md and docs/modules/platform.md
This commit is contained in:
1 parent
6d532fc719
commit
a3b64d8c8d
29 files changed
+177
-28
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# HTTP Daemon 说明
|
||||
|
||||
本目录是本地常驻 HTTP API 网关:暴露 CLI 能力的 HTTP 端点与交互式 OpenAPI 文档页。属入口层,业务调用一律经 `runCli` 委托 CLI 引擎,严禁直连 `domains/*/api.ts`。
|
||||
|
||||
## 文件职责
|
||||
|
||||
- `server.ts`:`startHttpServer` 启动常驻服务(默认 `127.0.0.1:8888`,可用 `HOST` / `PORT` 覆盖)。
|
||||
- `routes.ts`:路由与安全——`isTrustedOrigin` 跨站来源校验、`checkHttpAuth` 访问令牌校验(`HOSE_HTTP_TOKEN` / `HOSE_HTTP_CORS_ORIGIN`)、`handleHttpRequest` 主分发。
|
||||
- `docs.ts`:`renderDocsHtml` 渲染交互式 OpenAPI 文档页。
|
||||
|
||||
## 安全约束
|
||||
|
||||
- 默认仅绑定回环地址;跨站网页对 `/api/cli` 的调用被 `isTrustedOrigin` 阻断。
|
||||
- 敏感字段输出经 `redactSensitiveText` 脱敏。
|
||||
Reference in new issue
Block a user