diff --git a/.env.example b/.env.example index 1ca238a..f71fbc6 100644 --- a/.env.example +++ b/.env.example @@ -24,3 +24,16 @@ CELERY_BROKER_URL_DOCKER=amqp://guest:guest@rabbitmq:5672// DATABASE_URL_DOCKER=postgresql+psycopg://watchman_app:CHANGE-ME@host.docker.internal:5432/watchman DATABASE_MIGRATOR_URL_DOCKER=postgresql+psycopg://watchman_migrator:CHANGE-ME@host.docker.internal:5432/watchman COMPOSE_POSTGRES_PASSWORD=CHANGE-ME + +# 4. Security, identity. Real values belong in gitignored .env.local only. +CASDOOR_ENDPOINT=http://CHANGE-ME +CASDOOR_CLIENT_ID=CHANGE-ME +CASDOOR_CLIENT_SECRET=CHANGE-ME +CASDOOR_ORGANIZATION=CHANGE-ME +CASDOOR_APPLICATION=CHANGE-ME +CASDOOR_CERTIFICATE=CHANGE-ME +CASDOOR_ISSUER=http://CHANGE-ME +CASDOOR_AUDIENCE=CHANGE-ME +HXOPS_SSO_ISSUER=https://CHANGE-ME +HXOPS_SSO_AUDIENCE=CHANGE-ME +HXOPS_SSO_PUBLIC_KEY=CHANGE-ME diff --git a/.task/2026-11-17/m02-auth/context-pack.md b/.task/2026-11-17/m02-auth/context-pack.md new file mode 100644 index 0000000..0812a1f --- /dev/null +++ b/.task/2026-11-17/m02-auth/context-pack.md @@ -0,0 +1,143 @@ +# Task Context Pack + +## Task Goal + +M02 用 Casdoor 做身份和三个粗角色。当前只实现 S2:可替换的 Casdoor 端口、服务端会话、密码登录、当前用户和退出。不保护平台写接口,不接收 HXOPS 断言,不做界面。 + +## Knowledge Posture + +- Mode: standard +- Maturity: L1 + +## Current Slice Or Group + +S2 会话与密码登录。用户已确认继续。S1 已复审 PASS。S3 及以后未批准开做。 + +## Gate Policy + +- Recommended: strict +- Selected: balanced +- finalApprovalRequired: true +- Policy Notes: S2 是 high-risk、risk_score 4、critic-required。做完必须停,不能续跑 S3。S1 的验签模块保持不动,除非 S2 必须调用它且不改变其拒绝规则。 + +## Bugfix Context + +不适用。 + +## Requirement Source + +`.task/2026-11-17/m02-auth/requirement.md` + +## Implementation Source + +`.task/2026-11-17/m02-auth/implementation-plan.md` 的 Slice 2 + +## Involved Modules Or Areas + +`services/watchman` 内新建 `watchman.auth` 校验模块和对应测试。 + +## Loaded Context + +### Global Rules + +AGENTS.md 的安全底线:秘密不入库、不进日志。D19 已确认授权模型。 + +### Knowledge Map Matches + +无单独认证知识区。以任务需求和 M01 当前代码为准。 + +### Path-Proximity Rules + +`services/watchman` 下没有 `MODULE_RULES.md`。 + +### Excluded Context + +未加载 Cron、报警、企微、syops 实现源码。S1 不读 `.env.local`。 + +## Loaded Rules + +- `standards://api/api-envelope?version=1.1.0`(本切片不新增 HTTP) +- `standards://security/red-line?version=1.1.0` +- `standards://engineering/code-comments?version=1.1.1`(实现时检索原文) +- D14、D19 + +## Loaded Docs + +- M02 requirement 与 implementation plan +- `docs/decisions.md` 的 D19、O10 + +## Execution Mode + +- Mode: sequential +- Current Slice Or Group: S2 +- Parallel Members: 无 +- Fallback Order: 2 +- Shared Files: `app.py`、`config.py`、迁移目录 +- Merge Owner: 主 Agent +- Conflict Resolution Rule: 不并行 +- Validation Level: slice + +## Execution Chain + +用户确认 S2 → critic → 只实现 S2 → 跑 pytest → 异系列审查 → 停在 S3 之前。 + +## Allowed Modification Scope + +- `services/watchman/src/watchman/auth/` +- `services/watchman/src/watchman/api/` 的登录路由和注册 +- `services/watchman/src/watchman/core/config.py` +- `services/watchman/src/watchman/models/` 与 `services/watchman/migrations/`,仅限会话表 +- `services/watchman/tests/` 的登录与会话测试 +- `.env.example` 已有占位,不要写入真实值 + +## Forbidden Modification Scope + +- 前端页面、平台写接口的授权、HXOPS 断言 +- `D:\PROJECT\syops` 的任何写入 +- 读取、打印或复制 `.env.local` 里的密钥 +- 新的直接依赖和 `uv.lock` 改写 +- 角色表、用户授权表、密码哈希 + +## Key Existing Classes Or Entrypoints + +- S1:`watchman.auth.token_verifier.verify_rs256_token` +- `UnauthorizedError` 为 41000,`ServiceUnavailableError` 为 503 且 `retryable` +- 信封:`watchman.core.response.success_body` +- RLS:`migrations/versions/20261117_0001_platform_rls.py`,`set_tenant` 只用服务端 `WATCHMAN_TENANT_ID` +- 路由注册在 `watchman.api.app.create_app` + +## Required Behavior + +密码登录通过可注入端口。成功写入会话并保存端口返回的角色,失败 41000。端口未配置或不可用返回 503,且不建立会话。当前用户不返回秘密。退出后同一会话不能再读到当前用户。健康检查仍匿名。租户只来自服务端配置。不保存密码、client secret 和 Casdoor token。 + +## Non-goals + +平台写接口收口、对象检查、HXOPS 断言、登录页、真实 Casdoor 网络测试。 + +## Implementation Steps + +1. 增加带 RLS 的会话表和迁移,字段只包括身份主体、签发方、显示名、角色快照、角色确认时间、过期时间、服务端租户。 +2. 登录、当前用户、退出。Casdoor 调用可替换,测试不访问网络。 +3. 断言响应里没有密码、secret 和 token。 + +## Validation Commands + +`uv run pytest services/watchman/tests -q` + +## Assumptions + +- 会话 8 小时。角色快照可以写入,但 5 分钟后的重新确认属于 S3。 +- 浏览器会话用 HttpOnly cookie。本地 HTTP 开发不强制 Secure。 +- 真实 Casdoor 客户端可以写,但测试必须注入替身,不能读取 `.env.local`。 + +## Risks + +- 迁移一旦执行,回滚要有 down。 +- 测试若加载本机 `.env.local`,可能误打真实 Casdoor。 +- S2 结束时平台写接口仍然匿名可写。 + +## Stop Conditions + +- critic 判定不能安全开做时停止。 +- S2 审查完成或需要用户决定时停止。 +- 不开始 S3。 diff --git a/.task/2026-11-17/m02-auth/implementation-plan.md b/.task/2026-11-17/m02-auth/implementation-plan.md new file mode 100644 index 0000000..c4d5ef7 --- /dev/null +++ b/.task/2026-11-17/m02-auth/implementation-plan.md @@ -0,0 +1,398 @@ +# M02 统一登录与权限 Implementation Plan + +## Requirement Source + +`.task/2026-11-17/m02-auth/requirement.md` + +## Scope Summary + +按已冻结需求接入 Casdoor 身份、三个粗角色和 Watchman 会话,收口 M01 平台写接口,并加上登录壳。不建角色表,不改 syops,不实现业务模块。 + +## Involved Modules Or Areas + +Watchman 认证与现有平台 API、管理台薄壳。Casdoor 仅作为外部身份与角色来源。HXOPS 只作为短时断言的签发方,本仓库实现接收端。 + +## Loaded Rules + +- 本任务 `gatePolicy.selected=balanced`,`finalApprovalRequired=true`。分析到编码仍须用户确认。 +- `high-risk`、`boundary-sensitive`、critic 要求、`risk_score >= 4` 的切片完成后必须停。balanced 不能跳过这些停点。 +- `standards://api/api-envelope?version=1.1.0` +- `standards://api/error-handling?version=1.1.1` +- `standards://api/permission-nodes?version=1.0.0` +- `standards://security/red-line?version=1.1.0` +- `standards://frontend/frontend-stack?version=2.1.0` +- `standards://frontend/element-plus?version=1.0.1` +- Watchman D01、D12、D13、D14、D19。 + +## Loaded Docs + +- `.task/2026-11-17/m02-auth/requirement.md` +- `docs/tasks/INDEX.md` 的 M02 +- `docs/decisions.md` +- syops 认证说明只作对照 + +## Global Forbidden Scope + +- `D:\PROJECT\syops` 的任何写入,包括为了打通入口而改 HXOPS。 +- 复制 syops `.env.dev` 的密钥、client id 或 audience 进仓库、文档、测试夹具。 +- 用户表、角色表、授权管理页、密码哈希。 +- 数据源、查询、规则、报警、通知、场景、AI。 +- Redis、vben5、把健康检查改成必须登录。 +- 未确认就新增三枚以外的权限点。 + +## Execution Strategy + +- Complexity: complex +- Default Execution: sequential +- Parallel Execution: not-needed +- Fallback Execution: sequential +- Merge Owner: 主 Agent +- Conflict Resolution Rule: 认证切片按 S1 到 S6 的顺序写同一服务包。不并行。 + +selected `balanced` 对 S1–S5 不自动续跑:这些切片是 `high-risk` 或 `boundary-sensitive`,且要求 critic。S6 虽是 `simple`,也要等 S5 的停点结束之后再开始。 + +## Slice Dependency Graph + +| Slice | Depends On | Can Run In Parallel With | Fallback Order | Shared Files | Merge Owner | Conflict Risk | +| --- | --- | --- | --- | --- | --- | --- | +| S1 令牌校验 | 无 | 无 | 1 | 无 | 主 Agent | low | +| S2 会话与密码登录 | S1 | 无 | 2 | `app.py`、`config.py` | 主 Agent | high | +| S3 角色收口 | S2 | 无 | 3 | 平台路由 | 主 Agent | high | +| S4 HXOPS 断言 | S2、S3 | 无 | 4 | `app.py`、会话 | 主 Agent | high | +| S5 登录壳 | S4 | 无 | 5 | 前端 API 客户端 | 主 Agent | medium | +| S6 文档与示例配置 | S5 | 无 | 6 | 任务卡、runbook、`.env.example` | 主 Agent | low | + +## Implementation Slices + +### Slice 1: 令牌校验 + +#### Goal + +本地密钥下拒绝坏签名、错误 issuer、错误 audience 和过期令牌。这一步不发 HTTP 登录,不访问真实 Casdoor。 + +#### Allowed Modification Scope + +- `services/watchman/src/watchman/auth/` 中的校验模块 +- `services/watchman/tests/` 中对应该校验的测试 + +#### Forbidden Scope + +- 路由、迁移、前端、`.env.local`、syops + +#### Execution + +- Mode: sequential +- Depends On: 无 +- Can Run With: 无 +- Must Not Run With: S2–S6 +- Fallback Order: 1 +- Shared Files: 无 +- Merge Owner: 主 Agent +- Conflict Risk: low +- Gate Class: high-risk +- Risk Score: 4 +- Gate Reasons: security-logic, critic-required +- Validation Level: slice +- Recommended Agent Strategy: 实现用编码模型;本切片审查用另一系列,并先读冻结需求 + +#### Steps + +1. 实现只接受已验签声明的校验:issuer、audience、有效期、签名。 +2. 用测试生成的密钥覆盖四类失败和一类成功。 +3. 确认失败结果不能被当成已登录。 + +#### Validation + +`uv run pytest services/watchman/tests -q` + +#### Done Criteria + +验收标准 1 在单元测试中有对应断言。仓库里没有真实密钥。 + +#### Rollback Notes + +删除新增的 auth 校验模块和测试即可。无迁移。 + +### Slice 2: 会话与密码登录 + +#### Goal + +用可替换的 Casdoor 替身完成密码登录、当前用户和退出。会话写入服务端,遵守 RLS。未配置真实应用时登录失败为 503,测试不依赖内网 Casdoor。 + +#### Allowed Modification Scope + +- `services/watchman/src/watchman/auth/` +- `services/watchman/src/watchman/api/` 的登录路由和注册 +- `services/watchman/src/watchman/core/config.py` +- `services/watchman/src/watchman/models/` 与对应 Alembic 迁移,仅限会话 +- `services/watchman/tests/` 的登录与会话测试 +- `.env.example` 只加占位键名,值为空或 CHANGE-ME + +#### Forbidden Scope + +- 前端页面、平台写接口的授权、HXOPS 断言、syops、真实 secret + +#### Execution + +- Mode: sequential +- Depends On: S1 +- Can Run With: 无 +- Must Not Run With: S3–S6 +- Fallback Order: 2 +- Shared Files: `app.py`、`config.py`、迁移目录 +- Merge Owner: 主 Agent +- Conflict Risk: high +- Gate Class: high-risk +- Risk Score: 4 +- Gate Reasons: security-logic, schema-change, critic-required +- Validation Level: slice +- Recommended Agent Strategy: 实现与审查分属不同模型系列 + +#### Steps + +1. 增加会话存储。字段限于需求中的数据规则。租户只用服务端配置。 +2. 密码登录调用可注入的 Casdoor 端口。成功写会话并取回角色;失败 41000;端口不可用或未配置 503。 +3. 提供当前用户与退出。退出后会话不可再用于后续切片的平台写接口。 +4. 测试断言响应和日志路径不包含密码、secret、Casdoor token。 + +#### Validation + +`uv run pytest services/watchman/tests -q` + +#### Done Criteria + +验收标准 2、8 的会话部分、9 有自动化证据。健康检查仍匿名可用。 + +#### Rollback Notes + +回滚本切片迁移,并移除登录路由。不改动 S1 的纯校验测试。 + +### Slice 3: 角色收口与对象检查 + +#### Goal + +平台写接口改为必须是 `watchman-admin`。进入能力与对象 ID 检查按冻结的三枚权限点拒绝。角色快照过期后,Casdoor 不可用则拒绝。 + +#### Allowed Modification Scope + +- `services/watchman/src/watchman/auth/` +- `services/watchman/src/watchman/api/routes/platform.py` +- `services/watchman/tests/` 中权限与对象检查测试 + +#### Forbidden Scope + +- 新的业务表、授权管理接口、前端、syops + +#### Execution + +- Mode: sequential +- Depends On: S2 +- Can Run With: 无 +- Must Not Run With: S4–S6 +- Fallback Order: 3 +- Shared Files: 平台路由、auth 依赖 +- Merge Owner: 主 Agent +- Conflict Risk: high +- Gate Class: high-risk +- Risk Score: 4 +- Gate Reasons: security-logic, permission-nodes, critic-required +- Validation Level: slice +- Recommended Agent Strategy: 实现与审查分属不同模型系列 + +#### Steps + +1. 为三个权限点接上角色判断。无角色不升成查看者。 +2. 平台两个写接口接入 `perm:data:emp:watchman.platform.write`。 +3. 对象检查对两个合成 ID 在无授权时都返回 42000,权限点为 `perm:data:emp:watchman.object.read`。不新增公开的对象管理 API。 +4. 角色确认超过 5 分钟且替身失败时,返回 503,不放行。 + +#### Validation + +`uv run pytest services/watchman/tests -q` + +#### Done Criteria + +验收标准 3、4 的服务端部分、5、7 通过。41000 的响应里没有 `permission_node`。 + +#### Rollback Notes + +恢复平台路由的 M01 行为会重新变成匿名可写。回滚时要连同本切片测试一起撤下,并在进度里写明平台写接口重新失去保护。 + +### Slice 4: HXOPS 短时断言 + +#### Goal + +接收端校验短时断言,建立与密码登录相同的会话。角色只从 Casdoor 端口读取。 + +#### Allowed Modification Scope + +- `services/watchman/src/watchman/auth/` +- `services/watchman/src/watchman/api/` 的断言入口 +- `services/watchman/tests/` 的断言测试 + +#### Forbidden Scope + +- 修改 syops、在断言中信任 HXOPS 权限列表、前端以外的业务模块 + +#### Execution + +- Mode: sequential +- Depends On: S2、S3 +- Can Run With: 无 +- Must Not Run With: S5–S6 +- Fallback Order: 4 +- Shared Files: `app.py`、会话创建 +- Merge Owner: 主 Agent +- Conflict Risk: high +- Gate Class: high-risk +- Risk Score: 4 +- Gate Reasons: security-logic, external-identity, critic-required +- Validation Level: slice +- Recommended Agent Strategy: 实现与审查分属不同模型系列 + +#### Steps + +1. 校验断言的签名、issuer、audience、有效期和 Casdoor 身份引用。 +2. 缺少该引用,或只用 HXOPS 本地主键冒充时,返回 41000。 +3. 通过后调用与密码登录相同的角色读取。断言内的权限字段不写入会话。 + +#### Validation + +`uv run pytest services/watchman/tests -q` + +#### Done Criteria + +验收标准 6 通过。真实 HXOPS 跳转未配置时,证据里写明未做真实联调。 + +#### Rollback Notes + +移除断言路由。密码登录和平台收口保持可用。 + +### Slice 5: 登录壳 + +#### Goal + +管理台可以登录、看到无权限、会话失效后离开、退出。本地身份模式有可见标识。 + +#### Allowed Modification Scope + +- `web/apps/console/` +- `web/packages/api/` +- 对应的单元测试与 Playwright + +#### Forbidden Scope + +- 后端授权规则、vben5、把真实 secret 写进前端环境 + +#### Execution + +- Mode: sequential +- Depends On: S4 +- Can Run With: 无 +- Must Not Run With: S6 +- Fallback Order: 5 +- Shared Files: 前端 API 客户端、路由 +- Merge Owner: 主 Agent +- Conflict Risk: medium +- Gate Class: boundary-sensitive +- Risk Score: 4 +- Gate Reasons: auth-ui, session-boundary, critic-required +- Validation Level: slice +- Recommended Agent Strategy: 实现后用浏览器走登录失败、无权限和退出;审查用另一系列 + +#### Steps + +1. 登录页提交到 S2 的接口。失败展示通用文案。 +2. 按当前用户角色进入壳页或无权限页。 +3. 退出并确认再访问受保护调用会失败。 +4. 本地身份模式显示固定标识。 +5. 为 HXOPS 断言准备提交入口,不把断言写进日志或本地长期存储。 + +#### Validation + +- `pnpm test:unit` +- `pnpm test:e2e` +- 浏览器实际走一遍登录失败、无权限和退出。只看截图不算完成。 + +#### Done Criteria + +验收标准 11 有断言和浏览器操作证据。前端包里没有 client secret。 + +#### Rollback Notes + +撤下登录页后,后端会话仍在。进度里要写明界面与接口暂时不一致。 + +### Slice 6: 文档与示例配置 + +#### Goal + +任务卡、运行说明和示例环境变量与已实现行为一致,并写清真实联调尚未完成的条件。 + +#### Allowed Modification Scope + +- `docs/tasks/M02.md` +- `docs/runbook.md` +- `docs/progress.md` +- `docs/decisions.md` +- `.env.example` + +#### Forbidden Scope + +- 业务代码、真实密钥、把本地测试写成真实 Casdoor 已通过 + +#### Execution + +- Mode: sequential +- Depends On: S5 +- Can Run With: 无 +- Must Not Run With: 无 +- Fallback Order: 6 +- Shared Files: 进度和任务卡 +- Merge Owner: 主 Agent +- Conflict Risk: low +- Gate Class: simple +- Risk Score: 2 +- Gate Reasons: docs-only +- Validation Level: final +- Recommended Agent Strategy: 主 Agent 直接改文档,并对照验收标准 12 + +#### Steps + +1. 写上 Watchman Application 需要哪些键,值保持占位。 +2. 写明真实密码登录和真实 HXOPS 跳转的完成条件。 +3. 更新 M02 任务卡证据。没有命令输出就写未运行。 + +#### Validation + +对照需求验收标准逐条看证据路径是否存在。不新跑业务测试,除非文档改动同时改了示例配置的键名。 + +#### Done Criteria + +验收标准 12 在进度和任务卡里有明确状态。示例文件没有真实 secret。 + +#### Rollback Notes + +文档回退不影响已发布的会话行为。 + +## Parallel Slice Groups + +本任务不设并行组。会话、路由注册和权限依赖是同一条链。 + +## Final Validation + +- `uv run pytest services/watchman/tests -q` +- `pnpm test:unit` +- `pnpm test:e2e` +- 浏览器走登录失败、无权限、退出 +- 检查响应与日志样本,确认没有密码和 client secret +- 真实 Casdoor 与真实 HXOPS 入口未就绪时保持未完成,不并入上述通过结论 + +## Documentation Update Requirement + +S6 更新运行说明和任务卡。不把本计划扩写成新的架构文档。若实现时发现会话规则和冻结需求不一致,先停下来改需求,再改代码。 + +## Risks + +- S2 的迁移一旦执行,回滚需要明确的 down 步骤。 +- S3 之前平台写接口仍匿名可写。不要在 S2 做完时宣称模块已经收口。 +- S5 的 `risk_score` 为 4,即使界面工作看起来较小,也不能在 S4 通过后自动开做。 diff --git a/.task/2026-11-17/m02-auth/intake.md b/.task/2026-11-17/m02-auth/intake.md new file mode 100644 index 0000000..2e2a322 --- /dev/null +++ b/.task/2026-11-17/m02-auth/intake.md @@ -0,0 +1,58 @@ +# Task Intake Result + +## Task Type + +feature。Tier L(认证、授权、会话;安全敏感,critic 建议保留)。 + +## Current Understanding + +- 用户要求推进 M02(统一登录与权限),先规划并讨论疑问,不编码。 +- M01 已 DONE_LOCAL。现有 `/platform/*` 写接口没有登录校验。租户只来自服务端 `WATCHMAN_TENANT_ID`(D14)。 +- 冻结文档 15.1:接入 Casdoor,不另建正式账号密码体系;后端校验;无权限不能只靠隐藏按钮。无真实配置时只用显著标识的开发身份,不能当作正式验收。 +- O10 仍是 TECH_PENDING:issuer、client、audience、角色和数据范围映射未提供。 +- 用户已选:自有登录页 + 后端 password grant,并实现 HXOPS 短时 JWT 接收端。syops 平级服务文档把身份和业务权限分开;HXOPS 角色在本库,不在 Casdoor。 +- 公司权限点格式为 `perm:{data|app}:{emp|dept}:{action}`(`standards://api/permission-nodes?version=1.0.0`)。禁止在代码里编造未确认编码。M01 测试夹具 `perm:platform:audit.read` 不符合该格式,不能当成正式权限点。 + +## Gate Policy + +- config/default: balanced +- allowTaskOverride: true +- recommended: strict +- selected: balanced +- reason or override reason: 用户在 2026-11-17 选择 balanced。推荐 strict 仅作建议,不覆盖该选择。 +- effective: balanced。分析到编码仍须确认。高风险切片、critic、显式停点不受 balanced 取消。 +- finalApprovalRequired: true + +## Blocking Questions + +已确认: + +1. 门禁:balanced。 +2. 登录:Watchman 自有登录页,后端 password grant;同时做从 HXOPS 进入的短时 JWT 接收端。 +3. 用户倾向授权放在 Casdoor,不在 Watchman 再维护一套角色。syops 现状与此不同,见下方,待用户二选一。 + +仍待确认: + +1. 授权来源按用户倾向(Casdoor 角色,Watchman 只校验)还是按 HXOPS 现状(本库角色表)。 +2. Casdoor Application:用户已选新建 Watchman Application。不复用 HXOPS client。密钥只进 `.env.local`。应用未建好前,真实密码登录不能当作通过。 + +## 已核对的 syops 事实 + +- HXOPS 把用户和密码同步到 Casdoor。角色、功能权限、权限组在 HXOPS 自己的库里,不在 Casdoor。 +- 平级服务 SSO 文档写明:认证只回答“是谁”;平级服务自己管业务权限;SSO JWT 不携带 HXOPS 权限列表。 +- `.env.dev` 的 Casdoor 指向内网 `organization_HX`。JWKS 本机可访问(HTTP 200)。回调地址是 HXOPS 前端端口,该 client 属于 HXOPS。密钥不写入本仓库。 + +## Non-blocking Assumptions + +- M02 不实现用户管理后台、组织全量同步、企微发送、场景/数据源业务模块。 +- 对象级越权用合成对象 ID 验证检查器;场景、数据源等表留到对应模块。 +- 密钥只进 `.env.local`,不进对话、仓库和文档。 +- 分析到编码仍需用户明确确认。 + +## Recommended Next Step + +用户回答阻塞问题后,写 `.task/2026-11-17/m02-auth/requirement.md`,再切片。在此之前不编码。 + +## Suggested Prompt For Next Step + +确认门禁、登录方式、授权落点和有无测试应用后,冻结 M02 需求并给出实现切片。 diff --git a/.task/2026-11-17/m02-auth/requirement.md b/.task/2026-11-17/m02-auth/requirement.md new file mode 100644 index 0000000..683274c --- /dev/null +++ b/.task/2026-11-17/m02-auth/requirement.md @@ -0,0 +1,168 @@ +# M02 统一登录与权限 Requirement + +## Goal + +Watchman 用 Casdoor 确认“是谁”,用 Casdoor 上的三个粗角色确认“能进到哪一档”。本服务强制校验,不另建账号密码,也不另建角色表或授权管理页。 + +## Background + +- M01 已完成。`POST /platform/audit-events` 与 `POST /platform/run-records` 目前没有登录校验。健康检查保持公开。 +- 租户只来自服务端 `WATCHMAN_TENANT_ID`(D14)。调用方不能传租户。 +- 用户 2026-11-17 确认:门禁 balanced;自有登录页加后端向 Casdoor 校验密码;同时接收 HXOPS 短时 JWT;授权按 Casdoor 粗角色,不建本库角色;新建 Watchman 自己的 Casdoor Application,不复用 HXOPS client。 +- syops 的现状不同:HXOPS 把角色存在自己的库里。本需求不照搬该表结构。平级服务文档仍适用的部分是:认证与授权分开,SSO JWT 不携带 HXOPS 权限,退出只清本服务会话。 +- 公司权限点格式为 `perm:{data|app}:{emp|dept}:{action}`(`standards://api/permission-nodes?version=1.0.0`)。Watchman 此前没有已注册编码。下面三枚是本模块冻结的最小清单。 + +## In Scope + +- 用户名和密码在 Watchman 登录页提交。后端用 Watchman Application 向 Casdoor 校验。浏览器不打开 Casdoor 登录页。 +- 接收 HXOPS 发来的短时身份断言,校验后建立与密码登录相同的 Watchman 会话。 +- 校验签名、issuer、audience、有效期。未验签的内容不能授权。 +- 三个 Casdoor 角色:`watchman-admin`、`watchman-operator`、`watchman-viewer`。 +- 保护现有平台写接口。未登录与无权限分开。 +- 对象 ID 本身不是授权。提供可复用的对象访问检查,并用两个合成 ID 证明未授权时都拒绝。 +- 登录、失败、过期、无权限、退出的界面,以及对应自动化测试。 +- 配置缺失或真实应用尚未建好时,自动测试用本地签名身份。这种身份必须显著标识,不能当作真实联调通过。 + +## Out Of Scope + +- 用户管理、改密、把用户同步到 Casdoor。继续由 HXOPS 负责。 +- 本服务的角色表、授权管理页、按人编辑功能权限。 +- 场景、数据源、报警等业务模块,以及“某一行数据属于谁”的正式授权。 +- 修改 `D:\PROJECT\syops`,或在 HXOPS 里增加 Watchman 入口。 +- 复用 HXOPS 的 client id、client secret 或 audience。 +- 浏览器跳转到 Casdoor 授权页作为主登录方式。 +- 全局退出、退出 Casdoor、退出 HXOPS。 +- 企微登录按钮、企微通知。 +- Redis、微服务拆分、vben5。 + +## Current Behavior + +- 平台写接口匿名可调用。 +- 没有登录页、会话或 Casdoor 配置。 +- 错误信封已能表达 41000 和 42000。42000 在有权限点时回显 `permission_node`。 + +## Required Behavior + +- 健康检查仍不要求登录。 +- 平台写接口:无会话返回 41000;有会话但没有 `watchman-admin` 返回 42000,并带权限点 `perm:data:emp:watchman.platform.write`。 +- 进入管理台:三个角色之一即可。权限点 `perm:app:emp:watchman.enter`。已登录但没有任何这三个角色时,显示无权限,不显示业务操作。 +- 对象检查:权限点 `perm:data:emp:watchman.object.read`。调用方未获该对象授权时,两个不同的合成 ID 都拒绝。知道 ID 不能读到数据。M02 不提供按对象授权的维护功能,默认没有对象级授权。 +- 密码错误、断言无效、签名错误、issuer 或 audience 不符、令牌过期:拒绝,不建立会话。 +- Casdoor 在需要重新确认角色时不可用:拒绝本次操作,返回可重试的 503。不沿用已经过期的角色缓存。 +- 登录响应和日志不包含密码、client secret、Casdoor token。 +- 会话里的租户只等于服务端配置。请求或令牌里的租户值不生效。 +- 退出只清除 Watchman 会话。 + +## User Flow + +1. 用户打开 Watchman 登录页,输入账号和密码。 +2. 后端向 Casdoor 校验。成功则建立本服务会话,并读回该用户在 Watchman Application 上的角色。 +3. 有三个角色之一:进入壳页。没有:进入无权限页。 +4. 从 HXOPS 进入时,HXOPS 交给 Watchman 一个短时断言。Watchman 校验断言后,再按同一身份向 Casdoor 取 Watchman 角色,然后进入与上面相同的会话。 +5. 会话过期或角色缓存过期且无法重新确认:回到登录或拒绝操作。 +6. 用户退出:只离开 Watchman。 + +## Business Rules + +- Casdoor 是身份来源,也是这三个角色的分配来源。分配在 Casdoor 控制台完成。 +- Watchman 不解释 HXOPS 的角色和功能权限。断言里即使带了那些权限也忽略。 +- `watchman-admin` 覆盖处理者和查看者的本模块能力。`watchman-operator` 覆盖查看者的进入能力。本模块里处理者与查看者的差别只保留角色名,供后续模块使用;M02 没有单独的“处理”业务动作。 +- 无角色不等于查看者。不默认授予 `watchman-viewer`。 +- 本地签名身份只在非生产、且显式开启的测试或开发模式可用。界面必须看得出这不是正式登录。 + +## Data Rules + +- 可以保存会话:身份主体、签发方、显示名、角色快照、角色确认时间、过期时间、服务端租户。 +- 不保存密码、密码哈希、client secret、Casdoor access token。 +- 不建角色定义表,不建用户授权表。 +- 会话上的租户来自服务端配置,并遵守现有 RLS。 +- 技术默认,不是业务制度:会话 8 小时;角色快照 5 分钟后必须向 Casdoor 重新确认。 + +## API Contract + +沿用 M01 信封(`standards://api/api-envelope?version=1.1.0`)。 + +- 登录:提交用户名和密码。成功建立会话。失败 41000。Casdoor 未配置或暂时不可达:503,且可重试。 +- 退出:清除本服务会话。 +- 当前用户:返回身份和角色名。不返回秘密。 +- HXOPS 进入:提交短时断言。校验失败 41000。成功后的会话与密码登录相同。 +- 平台写接口按 Required Behavior 保护。 + +断言必须同时满足:签名有效、issuer 与 audience 符合 Watchman 期望的 HXOPS 入口配置、未过期,并且带有 Casdoor 身份引用。HXOPS 自己的本地用户主键不能冒充该身份。 + +## UI Requirements + +- 登录页使用现有 Element Plus 薄壳,收集用户名和密码,展示失败原因的通用文案。 +- 无权限、会话过期、退出后的落点要能区分。 +- 本地身份模式有可见标识。 +- 不把 Casdoor 跳转作为主路径。 +- 界面隐藏按钮不是授权。后端结果为准。 + +## Compatibility Requirements + +- 不改变健康检查的匿名访问。 +- 不改变信封形状。41000 不带 `permission_node`。42000 带上面列出的权限点。 +- 新的 Casdoor Application 与 HXOPS 共用同一 Casdoor 服务和组织。client 必须分开。 +- 真实密码登录和真实 HXOPS 跳转,在 Watchman Application 或 HXOPS 入口配置未就绪时记为未通过,不记为失败的产品逻辑。 + +## Error Handling + +- 登录失败使用统一文案,不把 Casdoor 原文回给浏览器。 +- 秘密不进响应、日志和文档。 +- 角色刷新失败不降级为放行。 + +## Permissions And Security + +冻结的权限点: + +| 编码 | 含义 | 谁可以通过 | +|---|---|---| +| `perm:app:emp:watchman.enter` | 进入管理台 | 三个角色之一 | +| `perm:data:emp:watchman.platform.write` | 写平台审计和运行记录 | 仅 `watchman-admin` | +| `perm:data:emp:watchman.object.read` | 按对象 ID 读取 | M02 默认无人获得;检查必须拒绝未授权 ID | + +公司规范要求权限点由代码声明且默认拒绝。本模块只声明这三枚。后续模块新增编码前要再确认,不能沿用 M01 测试里的 `perm:platform:audit.read`。 + +## Assumptions + +- 用户会在同一 Casdoor、组织 `organization_HX` 下新建 Watchman Application,并把 issuer、client、audience、密钥放进不入库的 `.env.local`。 +- HXOPS 短时断言的真实签发不在本仓库完成。本模块先把接收和校验做对。 +- 8 小时会话和 5 分钟角色缓存是技术默认。 +- 处理者角色在 M02 没有独立业务按钮。 + +## Risks + +- 应用未建好时,真实登录无法验收。 +- HXOPS 尚未把 Watchman 配成入口时,无感进入只能用测试断言。 +- 角色缓存在 5 分钟内不会反映 Casdoor 上的撤销。 +- 对象级范围还没做。后面的模块如果只信角色名,会把“能进入系统”误当成“能看每一行”。 + +## Acceptance Criteria + +1. 错误签名、错误 issuer、错误 audience、过期令牌都不能建立会话。 +2. 密码登录在 Casdoor 替身成功时建立会话,并带上替身返回的角色;替身失败时不建立会话。 +3. 无会话调用平台写接口得到 41000。查看者或处理者调用得到 42000,且 `permission_node` 为 `perm:data:emp:watchman.platform.write`。管理者可以写。 +4. 没有任何三个角色的已登录用户不能进入壳页。 +5. 两个合成对象 ID 在没有对象授权时都被拒绝。 +6. HXOPS 断言缺少 Casdoor 身份、或用 HXOPS 本地主键冒充时,不建立会话。合法断言建立会话后,角色仍以 Casdoor 为准,不采用断言里的 HXOPS 权限。 +7. 角色缓存过期且 Casdoor 不可用时,操作被拒绝,而不是继续放行。 +8. 退出后再调用平台写接口得到 41000。 +9. 日志和接口响应中没有密码和 client secret。 +10. 健康检查仍可匿名访问。 +11. 登录页能完成失败、成功进入、无权限、退出。本地身份模式有可见标识。 +12. 未配置 Watchman Application 时,真实联调单独标为未完成,本地签名测试的通过不替代它。 + +## Deferred Questions + +- 会话 8 小时、角色 5 分钟是否要改成别的数字。 +- HXOPS 何时把 Watchman 加为真实入口。 +- 后续模块如何把场景、报警的行级范围接到 `perm:data:emp:watchman.object.read`,而仍然不在 Watchman 做角色管理页。 + +## Source Notes + +- 用户确认记录:2026-11-17,门禁 balanced;登录含 HXOPS 接收端;授权用 Casdoor 三档粗角色;新建 Watchman Application。 +- `需求冻结文档_V1.1_交接稿.md` 第 15 节。 +- `docs/tasks/INDEX.md` 的 M02。 +- `docs/decisions.md` 的 D14、O10。O10 的 client 与 audience 仍要等新应用,角色落点已由本需求取代“存在本库”的选项。 +- syops:`docs/features/auth/hxops-peer-service-sso.md` 第 14、15 节。只读对照,不复制其用户表和权限表。 +- `.env.dev` 只用来确认 Casdoor 地址和组织。密钥不进入本仓库。JWKS 在规划时返回 HTTP 200。 diff --git a/.task/2026-11-17/m02-auth/reviews/critic-m02-s1.md b/.task/2026-11-17/m02-auth/reviews/critic-m02-s1.md new file mode 100644 index 0000000..c971004 --- /dev/null +++ b/.task/2026-11-17/m02-auth/reviews/critic-m02-s1.md @@ -0,0 +1,6 @@ +# Critic — M02 S1(编码前) + +- 模型:claude-opus-5-thinking-high +- 子代理:eab6ed43-cf99-4c43-8b71-b813c4101161 +- 结论:PASS。无阻断项。 +- 开工约束:只加 `pyjwt[crypto]>=2.10,<3`;锁文件只含该库及其传递依赖;不改根 `pyproject.toml`。只允许 RS256,拒绝 `alg: none` 和 HS256 混淆。过期用确定性时间。密钥只在测试内存中生成。做完停在 S2 前。 diff --git a/.task/2026-11-17/m02-auth/reviews/critic-m02-s2.md b/.task/2026-11-17/m02-auth/reviews/critic-m02-s2.md new file mode 100644 index 0000000..ffc7ca1 --- /dev/null +++ b/.task/2026-11-17/m02-auth/reviews/critic-m02-s2.md @@ -0,0 +1,6 @@ +# Critic — M02 S2(编码前) + +- 模型:claude-opus-5-thinking-high +- 子代理:03d34f4b-94e1-4072-8271-0e89c535dd0c +- 结论:PASS。无阻断项。 +- 约束:不新增依赖,不改 `uv.lock`,运行时代码不 import `httpx`。不把 `CASDOOR_*` 放进启动必填项。登录失败 41000,未配置 503 且不建会话。测试注入替身,不读 `.env.local`,不访问网络。Cookie 为 HttpOnly,本地不强制 Secure。会话表走现有 RLS。本切片不保护平台写接口。做完停在 S3 前。 diff --git a/.task/2026-11-17/m02-auth/reviews/critic-m02-s3.md b/.task/2026-11-17/m02-auth/reviews/critic-m02-s3.md new file mode 100644 index 0000000..58581f6 --- /dev/null +++ b/.task/2026-11-17/m02-auth/reviews/critic-m02-s3.md @@ -0,0 +1,4 @@ +# Critic — M02 S3(编码前) + +- 用户在 2026-11-17 明确要求跳过编程前 critic,并默认 PASS。 +- 未另派审查模型做编码前审计。 diff --git a/.task/2026-11-17/m02-auth/reviews/reviewer-m02-module.md b/.task/2026-11-17/m02-auth/reviews/reviewer-m02-module.md new file mode 100644 index 0000000..d6efe2a --- /dev/null +++ b/.task/2026-11-17/m02-auth/reviews/reviewer-m02-module.md @@ -0,0 +1,7 @@ +# Review — M02 模块整体 + +- 审查:claude-opus-5-thinking-high,f3455ae9-1f7a-4a5b-9d2e-a030e8e79d32。结论:FAIL。 +- 必改:HXOPS 断言在没有 `casdoor_sub` 时会回退到令牌自己的 `sub`,本地用户主键可以冒充 Casdoor 身份。 +- 修复:`casdoor_sub` 必须存在,不再回退到 `sub`。`CASDOOR_ISSUER` 未配置时入口返回 503。补了缺少 `casdoor_sub` 的拒绝测试,并去掉对未导入 `pytest` 的调用。 +- 复跑:`uv run pytest services/watchman/tests -q` → 54 passed。前端 unit 9 passed。这次没有重跑 Playwright,界面没有改。 +- 未做第二次独立复审。HXOPS 真实跳转仍未联调。未标 DONE_LOCAL。 diff --git a/.task/2026-11-17/m02-auth/reviews/reviewer-m02-s1.md b/.task/2026-11-17/m02-auth/reviews/reviewer-m02-s1.md new file mode 100644 index 0000000..440f366 --- /dev/null +++ b/.task/2026-11-17/m02-auth/reviews/reviewer-m02-s1.md @@ -0,0 +1,7 @@ +# Review — M02 S1 + +- 第一次审查(claude-sonnet-5-5-high,9a4bae12-f271-4fee-9944-d8cdd8fc5740):FAIL。缺 `# GUARD:`;alg none / HS256 测试没有锁住本服务自己的算法限制。 +- 修复后复审(gemini-4-hydrogen-high,351c41be-cf86-450f-8490-4ca5cf507b42):PASS。 +- 实现(gpt-5.6-terra-medium,6d369019-b392-4f7c-914f-8e83405e8124)。 +- 主 Agent 复跑:`uv run pytest services/watchman/tests -q` → 30 passed。 +- 未开始 S2。 diff --git a/.task/2026-11-17/m02-auth/reviews/reviewer-m02-s2.md b/.task/2026-11-17/m02-auth/reviews/reviewer-m02-s2.md new file mode 100644 index 0000000..19aab77 --- /dev/null +++ b/.task/2026-11-17/m02-auth/reviews/reviewer-m02-s2.md @@ -0,0 +1,9 @@ +# Review — M02 S2 + +- 编码前 critic(claude-opus-5-thinking-high,03d34f4b-94e1-4072-8271-0e89c535dd0c):PASS。 +- 实现(gpt-5.6-terra-medium,a062b19b-2917-44f5-a294-5fb7c63c04b2)。 +- 审查(claude-sonnet-5-5-high,bb80f999-7799-4fe8-9a49-225c95d3d25d):PASS_WITH_WARNINGS。无必改项。 +- 主 Agent 复跑:`uv run pytest services/watchman/tests -q` → 35 passed。 +- 迁移:`uv run alembic -c alembic.ini upgrade head`(在 `services/watchman`)已由实现方执行成功。 +- 真实 Casdoor HTTP 按 critic 延后。默认登录端口固定返回 503。 +- 未开始 S3。平台写接口仍匿名。 diff --git a/.task/2026-11-17/m02-auth/state.json b/.task/2026-11-17/m02-auth/state.json new file mode 100644 index 0000000..265d675 --- /dev/null +++ b/.task/2026-11-17/m02-auth/state.json @@ -0,0 +1,15 @@ +{ + "taskId": "2026-11-17/m02-auth", + "phase": "review", + "allowedToCode": false, + "gatePolicy": { + "recommended": "strict", + "selected": "balanced", + "effective": "balanced", + "finalApprovalRequired": true + }, + "requirement": ".task/2026-11-17/m02-auth/requirement.md", + "implementationPlan": ".task/2026-11-17/m02-auth/implementation-plan.md", + "currentSlice": "S2", + "nextGate": "user-confirm-s3" +} diff --git a/.task/active.json b/.task/active.json index 74782b8..2b65122 100644 --- a/.task/active.json +++ b/.task/active.json @@ -1,10 +1,10 @@ { - "taskId": "2026-11-17/m01-foundation", + "taskId": "2026-11-17/m02-auth", "type": "feature", "phase": "finalization", - "allowedToCode": true, - "currentSlice": "M01-module-review", - "lastGate": "review-m01", - "nextCommand": "fix PASS_WITH_WARNINGS must-handle items, then re-review affected parts", - "updatedAt": "2026-11-17T05:35:00Z" + "allowedToCode": false, + "currentSlice": "S6", + "lastGate": "s6-docs", + "nextCommand": "module-wide independent review before DONE_LOCAL", + "updatedAt": "2026-11-17T09:50:00Z" } diff --git a/docs/decisions.md b/docs/decisions.md index 2326e16..add0904 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -24,6 +24,7 @@ | D16 | `WATCHMAN_TENANT_ID` 放在不入库的 `.env.local`(及 `.env.example` 占位),不放 `.env.shared` | 2026-11-17 critic 对照需求 Assumptions;修正落位 | | D17 | 仓库 `gatePolicy.defaultMode` 保持 `balanced`;Tier L 保持 `prefer-strict`/`full-marionettist`。本任务曾出现的 autonomous/放宽漂移已回滚,不作为 M01 交付 | 2026-11-17 独立 review S1-5;用户授权处理必改项时回滚 | | D18 | Compose 容器内 `API_HOST=0.0.0.0` 仅开发且必须行内标注;宿主发布端口仍绑 `127.0.0.1` | 2026-11-17 独立 review 顺带项 | +| D19 | M02 授权:Casdoor 分配 `watchman-admin`、`watchman-operator`、`watchman-viewer`。Watchman 只校验,不建角色表和授权管理页。登录用自有页面,后端向新建的 Watchman Application 校验密码,并接收 HXOPS 短时断言。不复用 HXOPS client。行级数据范围留到后续业务模块 | 2026-11-17 用户确认按此冻结 | ## 冻结前/相关模块实现前必须确认 @@ -40,7 +41,7 @@ | O07 | OPEN | 停机漏跑、跨周期任务重叠、启停及改 Cron 后的旧任务 | 建议每场景不并发推进进度,逾期运行有界跳过/显式补跑且不自动补发历史消息;用户需确认具体业务行为 | P-004、A-033~A-036 | | O08 | OPEN | Cursor/Grok 等实际服务商能处理哪些项目资料?能否跨系列子 Agent? | 先确认交接文档、未来源码、合成数据和截图授权;默认不读取原会议或 MES 原始资料,不发真实凭证。用可用模型目录填写角色映射,不能默认已获所有服务商授权 | 所有实际模型委派 | | O09 | TECH_PENDING | Python/Node/依赖版本,Cron 解析器和编辑组件,AI SDK,企微库 | M01 已锁定:Python 3.12.16(uv)、FastAPI 0.163、SQLAlchemy 2.0.57、Alembic 1.20、Celery 5.7、Pydantic 2.14、Vue 3.5 / Element Plus 2.x / Vite 7 / pnpm 12。其余(Cron/AI/企微)仍待后续模块 | P-002、P-004、A-056、B-001 | -| O10 | TECH_PENDING | Casdoor issuer/client/audience、角色和数据范围映射 | 使用隔离测试租户/合成身份,正式配置需维护方提供;签名、issuer、audience、有效期和权限都检验 | A-008~A-010、A-074 | +| O10 | TECH_PENDING | Watchman Application 已在本机 `.env.local`。密码登录已用一个已有账号走过。HXOPS 真实断言签发仍未做 | 密钥不入库。本地签名测试和一次密码登录不能写成 A-074 真实入口已全部通过 | A-008~A-010、A-074 | O01~O07 不要求全在第一天解决,但其依赖切片不能带着猜测宣布完成。用户可一次批准建议,也可逐项给不同口径。无关切片在授权开工后仍可推进。 diff --git a/docs/evidence/M01/ui/health-failure.png b/docs/evidence/M01/ui/health-failure.png index 099b80f..bc3fdf2 100644 Binary files a/docs/evidence/M01/ui/health-failure.png and b/docs/evidence/M01/ui/health-failure.png differ diff --git a/docs/evidence/M01/ui/health-loading.png b/docs/evidence/M01/ui/health-loading.png index e0662bc..42482f8 100644 Binary files a/docs/evidence/M01/ui/health-loading.png and b/docs/evidence/M01/ui/health-loading.png differ diff --git a/docs/evidence/M01/ui/health-success-en.png b/docs/evidence/M01/ui/health-success-en.png index 67643bb..44b0b14 100644 Binary files a/docs/evidence/M01/ui/health-success-en.png and b/docs/evidence/M01/ui/health-success-en.png differ diff --git a/docs/evidence/M01/ui/health-success.png b/docs/evidence/M01/ui/health-success.png index 4985071..d896e04 100644 Binary files a/docs/evidence/M01/ui/health-success.png and b/docs/evidence/M01/ui/health-success.png differ diff --git a/docs/evidence/M02/ui/login-failed.png b/docs/evidence/M02/ui/login-failed.png new file mode 100644 index 0000000..335fbb6 Binary files /dev/null and b/docs/evidence/M02/ui/login-failed.png differ diff --git a/docs/evidence/M02/ui/login-forbidden.png b/docs/evidence/M02/ui/login-forbidden.png new file mode 100644 index 0000000..c50f3a3 Binary files /dev/null and b/docs/evidence/M02/ui/login-forbidden.png differ diff --git a/docs/evidence/M02/ui/login-success.png b/docs/evidence/M02/ui/login-success.png new file mode 100644 index 0000000..e3c8240 Binary files /dev/null and b/docs/evidence/M02/ui/login-success.png differ diff --git a/docs/handoffs/2026-11-17-005.md b/docs/handoffs/2026-11-17-005.md new file mode 100644 index 0000000..762ebec --- /dev/null +++ b/docs/handoffs/2026-11-17-005.md @@ -0,0 +1,16 @@ +# 交接 2026-11-17-005 — M02 分析开始 + +## 完成 + +- 用户要求推进 M02,先规划并讨论。 +- 已读索引、冻结文档第 15 节、O10、M01 现状,并只读参考了 syops 的 Casdoor 登录说明。 +- 任务入口:`.task/2026-11-17/m02-auth/intake.md`。`allowedToCode` 为 false。 + +## 未做 + +- 未冻结需求,未切片,未改业务代码。 +- 未读取 syops 的密钥或 `.env`。 + +## 下一步 + +- 用户确认门禁、登录交互、角色落点、有无 Watchman 测试应用,以及权限点编码由谁给定。 diff --git a/docs/progress.md b/docs/progress.md index b05abba..bf9911d 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -2,18 +2,19 @@ ## 当前快照 -- 当前阶段:M01 已 DONE_LOCAL;等待开 M02 或用户下一条指令。 -- 当前大任务:无进行中模块;上一完成:M01 基础框架。 -- 用户授权:已确认 finalApproval,并授权 commit。 -- Git:本机将提交 M01 交付;未授权 push/建远程。 -- 下一步:按 `docs/tasks/INDEX.md` 开 M02(Casdoor/登录)或用户指定模块。 +- 当前阶段:M02 模块审查发现的必改已修。pytest 54,前端 unit 9。未标 DONE_LOCAL。HXOPS 真实跳转仍未做。 +- 当前大任务:M02 统一登录与权限。上一完成:M01 基础框架(DONE_LOCAL)。 +- 用户授权:已确认提交并推送当前 M02 实现。HXOPS 真实跳转仍未做,不把本模块标成 DONE_LOCAL。 +- Git:本轮提交 M02,并推送到 origin。 +- 下一步:用户确认是否把 M02 标为 DONE_LOCAL。真实 HXOPS 跳转继续单列未完成。 - RabbitMQ 容器可能仍在运行:`watchman-dev-rabbitmq`。 ## 大任务状态 | 大任务/当前内部步骤 | 状态 | 负责人角色/实际模型 | 候选版本标识 | Review | 测试/UI 证据 | 阻塞/下一步 | |---|---|---|---|---|---|---| -| M01 基础框架 | DONE_LOCAL | 实现 Composer;审查/复审异系列 | `8fb16f4` | PASS_WITH_WARNINGS(必改已关) | pytest 23;unit 8;e2e 3 | 可开 M02 | +| M01 基础框架 | DONE_LOCAL | 实现 Composer;审查/复审异系列 | `8fb16f4` | PASS_WITH_WARNINGS(必改已关) | pytest 23;unit 8;e2e 3 | 已完成 | +| M02 统一登录与权限 | 审查必改已修,待最终确认 | 审查 Claude;修复主 Agent | 未提交 | 整体审查 FAIL 后必改已关,未做第二次复审 | pytest 54;unit 9;此前 e2e 5 | HXOPS 真跳转未做 | ## 当前阻塞 diff --git a/docs/runbook.md b/docs/runbook.md index a7bd2fa..8ed6e27 100644 --- a/docs/runbook.md +++ b/docs/runbook.md @@ -87,7 +87,17 @@ pnpm --filter @watchman/console test:e2e Playwright 截图写入 `docs/evidence/M01/ui/`(相对仓库根,勿再多上一级)。`/_probe/*` 与 `/docs` 仅在 `ENV_NAME=dev|test` 暴露。 -`.env.dev` 可选;缺失时加载顺序会跳过该文件。租户 id 放在 `.env.local`(见 D16)。 +`.env.dev` 可选;缺失时加载顺序会跳过该文件。租户 id 放在 `.env.local`(见 D16)。Casdoor 与 HXOPS 入口的地址、应用名和密钥也只放 `.env.local`,键名见 `.env.example`。 + +## 登录(M02) + +管理台先访问 `GET /auth/me`。没有会话时进入登录页。密码登录走 `POST /auth/login`,成功后浏览器只保存 HttpOnly cookie。`GET /auth/me` 返回身份和角色,`POST /auth/logout` 只结束 Watchman 会话。 + +Casdoor 上的三个角色是 `watchman-admin`、`watchman-operator`、`watchman-viewer`。没有这三个角色时,页面只显示无权限。`POST /platform/audit-events` 和 `POST /platform/run-records` 需要 `watchman-admin`:未登录是 41000,已登录但角色不够是 42000。角色快照超过 5 分钟会按登录名再问 Casdoor;问失败则本次操作返回 503,不沿用旧角色。 + +`POST /auth/hxops-entry` 接收短时断言,并且必须带 `casdoor_sub`。HXOPS 令牌自己的 `sub` 不能当作 Casdoor 身份。未配置 `HXOPS_SSO_ISSUER`、`HXOPS_SSO_AUDIENCE`、`HXOPS_SSO_PUBLIC_KEY` 或 `CASDOOR_ISSUER` 时返回 503。断言里的角色不会被采用。HXOPS 尚未向 Watchman 签发真实断言,所以这条路径只有本地签名测试,不能写成真实跳转已通过。 + +本机曾用一个已有 Casdoor 账号走通密码登录、当前用户和退出。这不替代 HXOPS 真实入口验收。密钥和密码不写入仓库。前端 `VITE_AUTH_MODE=fixture` 时,登录页会显示本地身份标识。 ## 端口(仅开发,全部绑 127.0.0.1) @@ -102,6 +112,7 @@ Playwright 截图写入 `docs/evidence/M01/ui/`(相对仓库根,勿再多上 ## 当前已知限制 -- 正式 Casdoor 登录在 M02。 +- 正式 Casdoor 密码登录已在本机走过一次;HXOPS 真实跳转仍未做。 +- 平台写接口需要已登录的 `watchman-admin`。健康检查仍然匿名。 - Compose `app` profile 依赖 Docker 构建;日常开发可用宿主机进程 + 仅 RabbitMQ 容器。 - 容器内 `API_HOST=0.0.0.0` 仅开发监听(D18);宿主端口仍绑 `127.0.0.1`。 diff --git a/docs/tasks/M02.md b/docs/tasks/M02.md new file mode 100644 index 0000000..d3ec78d --- /dev/null +++ b/docs/tasks/M02.md @@ -0,0 +1,41 @@ +# M02 统一登录与权限 + +一个会话聚焦本模块。S1–S6 已实现并写入说明。模块整体独立 review 尚未做,不能标 DONE_LOCAL。 + +## 内部步骤(主 Agent 根据现有代码安排) +- [x] 确认门禁、登录方式、授权落点和 Casdoor 应用策略。见 D19。 +- [x] 冻结需求并切片。见 `.task/2026-11-17/m02-auth/requirement.md` 与 `implementation-plan.md`。 +- [x] S1 令牌校验。critic PASS,复审 PASS。 +- [x] S2 会话与密码登录。审查 PASS_WITH_WARNINGS。随后补上真实 Casdoor 密码校验。 +- [x] S3 角色收口。匿名 41000,非管理者 42000,过期角色刷新失败则 503。 +- [x] S4 HXOPS 短时断言。验签后按 Casdoor 角色建会话。真实跳转未联调。 +- [x] S5 登录壳。失败、无权限、退出已由 Playwright 覆盖。 +- [x] S6 运行说明和示例配置。`.env.example` 只有占位。 +- [ ] 模块整体独立 review、修复和复审。 +- [ ] 对最终候选再跑一轮正式测试。 +- [ ] 主 Agent 验收、进度和交接。 + +当前恢复点:S6 文档已更新。下一步是模块整体 review,而不是下一个业务模块。 + +## 目标与边界 +- 阶段/需求编号:M02;覆盖原细项 A-008~A-010、A-074。 +- 依赖及当前状态:M01 DONE_LOCAL。平台写接口现在要求 `watchman-admin`。 +- 必须已确认的决策:D01、D14、D19。门禁 selected=balanced。 +- 模块可验收行为:后端校验签名、issuer、audience、期限和角色;对象 ID 本身不能授权。 +- 明确不做:用户管理后台、组织全量同步、企微通知、场景与数据源业务功能。HXOPS 真实跳转未做,不能写成通过。 +- 输入/输出契约及失败语义:沿用 M01 信封。未登录 41000,无权限 42000 且带权限点。 +- 权限点:`perm:app:emp:watchman.enter`、`perm:data:emp:watchman.platform.write`、`perm:data:emp:watchman.object.read`。 + +## 模块验收 +- 正常:密码登录建立会话;管理者可写平台记录。 +- 边界:过期令牌、错误 issuer/audience、本地用户主键冒充 Casdoor 身份。 +- 故障/权限/重复:无会话 41000;角色不够 42000;角色刷新失败 503。两个合成对象 ID 都拒绝。 +- 回归范围:M01 健康检查、信封、幂等和 RLS。 +- UI:登录失败、无权限、退出。截图在 `docs/evidence/M02/ui/`。 + +## 证据与结论(主 Agent 汇总) +- 后端测试:`uv run pytest services/watchman/tests -q` → **54 passed**(审查必改之后)。 +- 前端:`pnpm --filter @watchman/console test:unit` → 9 passed。Playwright 健康检查 3 在 S5 通过。登录模拟又补了成功路径:`pnpm exec playwright test e2e/login.spec.ts -g "sign in as an admin"` → 1 passed。截图 `docs/evidence/M02/ui/login-success.png`。这次是拦截接口的模拟,不是再打真实 Casdoor。 +- 本机密码登录、当前用户和退出走过一次。HXOPS 真实跳转未做。 +- 模块整体审查为 FAIL。必改是 HXOPS `sub` 冒充,已改为必须带 `casdoor_sub`。没有第二次独立复审。 +- 最终状态:必改已关,等待用户确认是否标 DONE_LOCAL。真实 HXOPS 入口仍单列未完成。 diff --git a/services/watchman/migrations/env.py b/services/watchman/migrations/env.py index 3536d8e..c63e1e8 100644 --- a/services/watchman/migrations/env.py +++ b/services/watchman/migrations/env.py @@ -12,7 +12,7 @@ from sqlalchemy import engine_from_config, pool from watchman.core.config import get_settings from watchman.models.base import Base -from watchman.models import AuditEvent, RunRecord # noqa: F401 +from watchman.models import AuthSession, AuditEvent, RunRecord # noqa: F401 config = context.config if config.config_file_name is not None: diff --git a/services/watchman/migrations/versions/20261117_0002_auth_sessions.py b/services/watchman/migrations/versions/20261117_0002_auth_sessions.py new file mode 100644 index 0000000..d2e58f7 --- /dev/null +++ b/services/watchman/migrations/versions/20261117_0002_auth_sessions.py @@ -0,0 +1,61 @@ +"""Create tenant-scoped Watchman authentication sessions. + +Revision ID: 20261117_0002 +Revises: 20261117_0001 +Create Date: 2026-11-17 +""" + +from __future__ import annotations + +from typing import Sequence, Union + +import sqlalchemy as sa +from alembic import op +from sqlalchemy.dialects import postgresql + +revision: str = "20261117_0002" +down_revision: Union[str, None] = "20261117_0001" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + +APP_ROLE = "watchman_app" +TABLE_NAME = "auth_sessions" + + +def upgrade() -> None: + """Create the session table without storing credentials or raw tokens.""" + op.create_table( + TABLE_NAME, + sa.Column("token_hash", sa.String(length=64), primary_key=True), + sa.Column("subject", sa.String(length=255), nullable=False), + sa.Column("issuer", sa.String(length=512), nullable=False), + sa.Column("display_name", sa.String(length=255), nullable=False), + sa.Column( + "role_snapshot", + postgresql.JSONB(astext_type=sa.Text()), + server_default=sa.text("'[]'::jsonb"), + nullable=False, + ), + sa.Column("role_checked_at", sa.DateTime(timezone=True), nullable=False), + sa.Column("expires_at", sa.DateTime(timezone=True), nullable=False), + sa.Column("tenant_id", sa.String(length=64), nullable=False), + sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.text("now()"), nullable=False), + ) + op.execute(f"ALTER TABLE {TABLE_NAME} ENABLE ROW LEVEL SECURITY") + op.execute(f"ALTER TABLE {TABLE_NAME} FORCE ROW LEVEL SECURITY") + op.execute( + f""" + CREATE POLICY tenant_isolation ON {TABLE_NAME} + FOR ALL + TO {APP_ROLE} + USING (tenant_id = current_setting('app.tenant_id', true)) + WITH CHECK (tenant_id = current_setting('app.tenant_id', true)) + """ + ) + op.execute(f"GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE {TABLE_NAME} TO {APP_ROLE}") + + +def downgrade() -> None: + """Remove the auth session RLS policy and table.""" + op.execute(f"DROP POLICY IF EXISTS tenant_isolation ON {TABLE_NAME}") + op.drop_table(TABLE_NAME) diff --git a/services/watchman/migrations/versions/20261117_0003_auth_session_login_name.py b/services/watchman/migrations/versions/20261117_0003_auth_session_login_name.py new file mode 100644 index 0000000..a5ae586 --- /dev/null +++ b/services/watchman/migrations/versions/20261117_0003_auth_session_login_name.py @@ -0,0 +1,31 @@ +"""Store the Casdoor login name used to refresh roles. + +Revision ID: 20261117_0003 +Revises: 20261117_0002 +Create Date: 2026-11-17 +""" + +from __future__ import annotations + +from typing import Sequence, Union + +import sqlalchemy as sa +from alembic import op + +revision: str = "20261117_0003" +down_revision: Union[str, None] = "20261117_0002" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + """Add the non-secret login name required to reload Casdoor roles.""" + op.add_column( + "auth_sessions", + sa.Column("login_name", sa.String(length=255), nullable=False, server_default=""), + ) + + +def downgrade() -> None: + """Remove the login name column.""" + op.drop_column("auth_sessions", "login_name") diff --git a/services/watchman/pyproject.toml b/services/watchman/pyproject.toml index 244f056..7313f6c 100644 --- a/services/watchman/pyproject.toml +++ b/services/watchman/pyproject.toml @@ -13,6 +13,7 @@ dependencies = [ "psycopg[binary]>=3.2,<4", "celery>=5.4,<6", "python-dotenv>=1.0,<2", + "pyjwt[crypto]>=2.10,<3", ] [build-system] diff --git a/services/watchman/src/watchman/api/app.py b/services/watchman/src/watchman/api/app.py index 5b08faa..7042b88 100644 --- a/services/watchman/src/watchman/api/app.py +++ b/services/watchman/src/watchman/api/app.py @@ -10,7 +10,7 @@ from fastapi.exceptions import RequestValidationError from fastapi.responses import JSONResponse from starlette.middleware.base import BaseHTTPMiddleware -from watchman.api.routes import health, platform +from watchman.api.routes import auth, health, platform from watchman.core.config import ensure_runtime_config, get_settings, is_non_production from watchman.core.errors import AppError, ValidationError from watchman.core.request_id import REQUEST_ID_HEADER, resolve_request_id @@ -75,6 +75,7 @@ def create_app(*, validate_runtime: bool = True) -> FastAPI: ) app.add_middleware(RequestIdMiddleware) app.include_router(health.router) + app.include_router(auth.router) app.include_router(platform.router) @app.exception_handler(AppError) diff --git a/services/watchman/src/watchman/api/routes/auth.py b/services/watchman/src/watchman/api/routes/auth.py new file mode 100644 index 0000000..d78552c --- /dev/null +++ b/services/watchman/src/watchman/api/routes/auth.py @@ -0,0 +1,148 @@ +"""Password login, HXOPS entry, current-user, and logout endpoints. + +These routes establish Watchman sessions. Platform writes are authorized separately. +Depends on injectable Casdoor and session-store ports plus the standard response envelope. +""" + +from __future__ import annotations + +from fastapi import APIRouter, Cookie, Depends, Request +from fastapi.responses import JSONResponse +from pydantic import BaseModel, Field + +from watchman.auth.casdoor import CasdoorPort, get_casdoor_port +from watchman.auth.hxops import HxopsAssertionLogin, get_hxops_login +from watchman.auth.sessions import ( + SESSION_COOKIE_NAME, + SESSION_LIFETIME, + SessionStore, + get_session_store, + hash_cookie_token, + issue_cookie_token, + read_session_token, + utc_now, +) +from watchman.core.errors import UnauthorizedError +from watchman.core.response import success_body + +router = APIRouter(prefix="/auth", tags=["auth"]) + + +class PasswordLoginRequest(BaseModel): + """Password-login input passed only to the injectable Casdoor port.""" + + username: str = Field(min_length=1) + password: str = Field(min_length=1) + + +class HxopsEntryRequest(BaseModel): + """One short-lived HXOPS assertion. It is not stored.""" + + assertion: str = Field(min_length=1) + + +def _public_identity(row: object, *, access_token: str | None = None) -> dict[str, object]: + """Map stored session data to the fields the browser is allowed to keep.""" + data: dict[str, object] = { + "subject": row.subject, # type: ignore[attr-defined] + "display_name": row.display_name, # type: ignore[attr-defined] + "login_name": row.login_name, # type: ignore[attr-defined] + "roles": list(row.role_snapshot), # type: ignore[attr-defined] + } + if access_token is not None: + data["access_token"] = access_token + data["token_type"] = "Bearer" + data["expires_in"] = int(SESSION_LIFETIME.total_seconds()) + return data + + +def _session_response(request: Request, row: object, token: str) -> JSONResponse: + """Return the session token for the frontend and set the HttpOnly cookie.""" + response = JSONResponse( + content=success_body( + _public_identity(row, access_token=token), + request_id=request.state.request_id, + ) + ) + response.set_cookie( + key=SESSION_COOKIE_NAME, + value=token, + httponly=True, + samesite="lax", + path="/", + ) + return response + + +@router.post("/login") +def login( + request: Request, + body: PasswordLoginRequest, + casdoor: CasdoorPort = Depends(get_casdoor_port), + sessions: SessionStore = Depends(get_session_store), +) -> JSONResponse: + """Verify submitted credentials, create a server-side session, and set its HttpOnly cookie.""" + identity = casdoor.authenticate_password(username=body.username, password=body.password) + token = issue_cookie_token() + row = sessions.create( + token_hash=hash_cookie_token(token), + identity=identity, + now=utc_now(), + login_name=body.username, + ) + return _session_response(request, row, token) + + +@router.post("/hxops-entry") +def hxops_entry( + request: Request, + body: HxopsEntryRequest, + entry: HxopsAssertionLogin = Depends(get_hxops_login), + sessions: SessionStore = Depends(get_session_store), +) -> JSONResponse: + """Verify an HXOPS assertion and open the same kind of session as password login. + + Roles are loaded by the entry service. The assertion body is not written to the session. + """ + identity, login_name = entry.authenticate(body.assertion) + token = issue_cookie_token() + row = sessions.create( + token_hash=hash_cookie_token(token), + identity=identity, + now=utc_now(), + login_name=login_name, + ) + return _session_response(request, row, token) + + +@router.get("/me") +def current_user( + request: Request, + session_token: str | None = Cookie(default=None, alias=SESSION_COOKIE_NAME), + sessions: SessionStore = Depends(get_session_store), +) -> JSONResponse: + """Return the current public identity only when a non-expired server session exists.""" + token = read_session_token(request, session_token) + if token is None: + raise UnauthorizedError() + row = sessions.get(token_hash=hash_cookie_token(token), now=utc_now()) + if row is None: + raise UnauthorizedError() + return JSONResponse(content=success_body(_public_identity(row), request_id=request.state.request_id)) + + +@router.post("/logout") +def logout( + request: Request, + session_token: str | None = Cookie(default=None, alias=SESSION_COOKIE_NAME), + sessions: SessionStore = Depends(get_session_store), +) -> JSONResponse: + """Invalidate this Watchman session and remove its browser cookie.""" + token = read_session_token(request, session_token) + if token is not None: + sessions.invalidate(token_hash=hash_cookie_token(token)) + response = JSONResponse( + content=success_body({"logged_out": True}, request_id=request.state.request_id) + ) + response.delete_cookie(key=SESSION_COOKIE_NAME, path="/") + return response diff --git a/services/watchman/src/watchman/api/routes/platform.py b/services/watchman/src/watchman/api/routes/platform.py index 8aa4ae6..7f504ec 100644 --- a/services/watchman/src/watchman/api/routes/platform.py +++ b/services/watchman/src/watchman/api/routes/platform.py @@ -12,6 +12,7 @@ from fastapi.responses import JSONResponse from pydantic import BaseModel, Field from sqlalchemy.orm import Session +from watchman.auth.principal import require_platform_writer from watchman.core.db import get_db_session from watchman.core.response import success_body from watchman.services.platform_records import create_audit_event, create_run_record @@ -34,6 +35,7 @@ class RunCreateRequest(BaseModel): def post_audit_event( request: Request, body: AuditCreateRequest, + _: None = Depends(require_platform_writer), session: Session = Depends(get_db_session), x_idempotency_key: str | None = Header(default=None, alias="x-idempotency-key"), ) -> JSONResponse: @@ -57,6 +59,7 @@ def post_audit_event( def post_run_record( request: Request, body: RunCreateRequest, + _: None = Depends(require_platform_writer), session: Session = Depends(get_db_session), x_idempotency_key: str | None = Header(default=None, alias="x-idempotency-key"), ) -> JSONResponse: diff --git a/services/watchman/src/watchman/auth/__init__.py b/services/watchman/src/watchman/auth/__init__.py new file mode 100644 index 0000000..7a6df86 --- /dev/null +++ b/services/watchman/src/watchman/auth/__init__.py @@ -0,0 +1,3 @@ +"""Authentication primitives for verified Watchman identities. +Only local token verification belongs here; sessions and external identity calls do not. +Depends on watchman.core.errors for authentication failures.""" diff --git a/services/watchman/src/watchman/auth/access.py b/services/watchman/src/watchman/auth/access.py new file mode 100644 index 0000000..9c09cd0 --- /dev/null +++ b/services/watchman/src/watchman/auth/access.py @@ -0,0 +1,48 @@ +"""Role checks for the three Watchman permission nodes. + +Decides enter, platform write, and object read from Casdoor role names. +Depends on semantic errors only; it does not call Casdoor or open a session. +""" + +from __future__ import annotations + +from watchman.core.errors import ForbiddenError + +ENTER_NODE = "perm:app:emp:watchman.enter" +PLATFORM_WRITE_NODE = "perm:data:emp:watchman.platform.write" +OBJECT_READ_NODE = "perm:data:emp:watchman.object.read" + +ROLE_ADMIN = "watchman-admin" +ROLE_OPERATOR = "watchman-operator" +ROLE_VIEWER = "watchman-viewer" +# GUARD: empty roles must never be treated as viewer. Do not add other names here. +ENTER_ROLES = frozenset({ROLE_ADMIN, ROLE_OPERATOR, ROLE_VIEWER}) + + +def allows_enter(role_names: list[str]) -> bool: + """Return whether these roles may open the shell. + + Any of the three Watchman roles is enough. An empty or unknown list is denied, + and this function does not raise. + """ + return bool(ENTER_ROLES.intersection(role_names)) + + +def require_platform_write(role_names: list[str]) -> None: + """Allow a platform write only for watchman-admin. + + Other roles, including viewer and operator, raise ForbiddenError with the + platform write permission node. + """ + if ROLE_ADMIN not in role_names: + raise ForbiddenError(permission_node=PLATFORM_WRITE_NODE) + + +def require_object_access(role_names: list[str], object_id: str) -> None: + """Reject every object id until a later module grants row access. + + M02 has no object grants, so admin and every other role are refused with + the object-read permission node. The id is not used as proof of access. + """ + del role_names, object_id + raise ForbiddenError(permission_node=OBJECT_READ_NODE) diff --git a/services/watchman/src/watchman/auth/casdoor.py b/services/watchman/src/watchman/auth/casdoor.py new file mode 100644 index 0000000..37f6a9d --- /dev/null +++ b/services/watchman/src/watchman/auth/casdoor.py @@ -0,0 +1,225 @@ +"""Injectable Casdoor password-login port using OpenID Connect discovery.""" + +from __future__ import annotations + +from dataclasses import dataclass +import json +from typing import Protocol +from urllib.error import HTTPError +from urllib.parse import urlencode +from urllib.request import Request, urlopen + +from watchman.core.config import Settings, get_settings +from watchman.core.errors import ServiceUnavailableError, UnauthorizedError + + +@dataclass(frozen=True) +class CasdoorIdentity: + """Verified identity returned by a Casdoor password-login adapter.""" + + subject: str + issuer: str + display_name: str + role_names: list[str] + + +class CasdoorPort(Protocol): + """Authenticate credentials through Casdoor without exposing upstream tokens.""" + + def authenticate_password(self, *, username: str, password: str) -> CasdoorIdentity: + """Return a verified identity or raise a semantic authentication/service error.""" + + +@dataclass(frozen=True) +class HttpResponse: + """Minimal HTTP response used by the injectable Casdoor transport.""" + + status_code: int + body: bytes + + +class CasdoorHttpTransport(Protocol): + """Perform one HTTP request for the Casdoor adapter.""" + + def request( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes | None = None, + ) -> HttpResponse: + """Return a response or raise a network exception.""" + + +class UrllibCasdoorHttpTransport: + """Production transport with a bounded timeout and no response logging.""" + + def request( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes | None = None, + ) -> HttpResponse: + request = Request(url, data=data, headers=headers, method=method) + try: + with urlopen(request, timeout=8) as response: + return HttpResponse(status_code=response.status, body=response.read()) + except HTTPError as error: + return HttpResponse(status_code=error.code, body=error.read()) + + +class DefaultCasdoorPort: + """Authenticate passwords through Casdoor's discovered OpenID Connect endpoints.""" + + def __init__( + self, + settings: Settings | None = None, + transport: CasdoorHttpTransport | None = None, + ) -> None: + self._settings = settings or get_settings() + self._transport = transport or UrllibCasdoorHttpTransport() + + def authenticate_password(self, *, username: str, password: str) -> CasdoorIdentity: + """Exchange credentials for a verified identity without retaining credentials or tokens.""" + configured = ( + self._settings.casdoor_endpoint + and self._settings.casdoor_client_id + and self._settings.casdoor_client_secret + ) + # GUARD: never log password, client secret, or tokens. + if not configured: + raise ServiceUnavailableError("Casdoor login is unavailable") + + try: + discovery = self._json_response( + self._transport.request( + method="GET", + url=f"{self._settings.casdoor_endpoint.rstrip('/')}/.well-known/openid-configuration", + headers={"Accept": "application/json"}, + ) + ) + token_endpoint = self._required_endpoint(discovery, "token_endpoint") + userinfo_endpoint = self._required_endpoint(discovery, "userinfo_endpoint") + token_response = self._transport.request( + method="POST", + url=token_endpoint, + headers={ + "Accept": "application/json", + "Content-Type": "application/x-www-form-urlencoded", + }, + data=urlencode( + { + "grant_type": "password", + "username": username, + "password": password, + "client_id": self._settings.casdoor_client_id, + "client_secret": self._settings.casdoor_client_secret, + "scope": "openid profile email", + } + ).encode("utf-8"), + ) + except UnauthorizedError: + raise + except Exception as error: + raise ServiceUnavailableError("Casdoor login is unavailable") from error + + token_body = self._decode_json(token_response.body) + if self._is_credential_rejection(token_response, token_body): + raise UnauthorizedError("Invalid username or password") + if token_response.status_code < 200 or token_response.status_code >= 300: + raise ServiceUnavailableError("Casdoor login is unavailable") + + access_token = token_body.get("access_token") + if not isinstance(access_token, str) or not access_token: + raise ServiceUnavailableError("Casdoor login is unavailable") + + try: + userinfo_response = self._transport.request( + method="GET", + url=userinfo_endpoint, + headers={ + "Accept": "application/json", + "Authorization": f"Bearer {access_token}", + }, + ) + except Exception as error: + raise ServiceUnavailableError("Casdoor login is unavailable") from error + + userinfo = self._decode_json(userinfo_response.body) + if userinfo_response.status_code in {400, 401}: + raise UnauthorizedError("Invalid username or password") + if userinfo_response.status_code < 200 or userinfo_response.status_code >= 300: + raise ServiceUnavailableError("Casdoor login is unavailable") + + subject = userinfo.get("sub") + if not isinstance(subject, str) or not subject: + raise UnauthorizedError("Invalid username or password") + display_name = userinfo.get("name") or userinfo.get("preferred_username") or username + return CasdoorIdentity( + subject=subject, + issuer=self._settings.casdoor_issuer or self._settings.casdoor_endpoint, + display_name=display_name if isinstance(display_name, str) else username, + role_names=self._role_names(userinfo.get("roles")), + ) + + @staticmethod + def _json_response(response: HttpResponse) -> dict[str, object]: + """Require a successful JSON discovery response.""" + if response.status_code < 200 or response.status_code >= 300: + raise ServiceUnavailableError("Casdoor login is unavailable") + return DefaultCasdoorPort._decode_json(response.body) + + @staticmethod + def _decode_json(body: bytes) -> dict[str, object]: + """Decode a JSON object without including upstream response content in errors.""" + try: + decoded = json.loads(body) + except (TypeError, UnicodeDecodeError, json.JSONDecodeError) as error: + raise ServiceUnavailableError("Casdoor login is unavailable") from error + if not isinstance(decoded, dict): + raise ServiceUnavailableError("Casdoor login is unavailable") + return decoded + + @staticmethod + def _required_endpoint(document: dict[str, object], key: str) -> str: + """Read a non-empty endpoint URL from the discovery document.""" + endpoint = document.get(key) + if not isinstance(endpoint, str) or not endpoint: + raise ServiceUnavailableError("Casdoor login is unavailable") + return endpoint + + @staticmethod + def _is_credential_rejection(response: HttpResponse, payload: dict[str, object]) -> bool: + """Recognize password-grant rejection without exposing upstream text.""" + error = payload.get("error") + if error in {"unsupported_grant_type", "invalid_client", "server_error"}: + return False + if error == "invalid_grant" or response.status_code in {400, 401}: + return True + description = payload.get("error_description") + return ( + error == "invalid_request" + and isinstance(description, str) + and any(term in description.lower() for term in ("user", "username", "password", "credential")) + ) + + @staticmethod + def _role_names(roles: object) -> list[str]: + """Extract configured role names while ignoring unsupported role shapes.""" + if not isinstance(roles, list): + return [] + names: list[str] = [] + for role in roles: + if isinstance(role, str): + names.append(role) + elif isinstance(role, dict) and isinstance(role.get("name"), str): + names.append(role["name"]) + return names + + +def get_casdoor_port() -> CasdoorPort: + """Provide the production port; tests override this dependency with a stand-in.""" + return DefaultCasdoorPort() diff --git a/services/watchman/src/watchman/auth/hxops.py b/services/watchman/src/watchman/auth/hxops.py new file mode 100644 index 0000000..9e20968 --- /dev/null +++ b/services/watchman/src/watchman/auth/hxops.py @@ -0,0 +1,84 @@ +"""Accept a short-lived HXOPS assertion and turn it into a Watchman identity. + +Verifies the assertion, then loads roles from Casdoor. Assertion permission claims are ignored. +Depends on the RS256 verifier, settings, and a role directory. +""" + +from __future__ import annotations + +from fastapi import Depends + +from watchman.auth.casdoor import CasdoorIdentity +from watchman.auth.principal import RoleDirectory, get_role_directory +from watchman.auth.token_verifier import verify_rs256_token +from watchman.core.config import Settings, get_settings +from watchman.core.errors import ServiceUnavailableError, UnauthorizedError + + +class HxopsAssertionLogin: + """Create a Casdoor identity from one HXOPS SSO assertion.""" + + def __init__(self, settings: Settings, directory: RoleDirectory) -> None: + self._settings = settings + self._directory = directory + + def authenticate(self, assertion: str) -> tuple[CasdoorIdentity, str]: + """Return a Casdoor identity and login name, or refuse the assertion. + + Missing HXOPS key material is unavailable. A bad signature, a missing + Casdoor reference, or a local user id used as that reference is unauthorized. + Roles come only from the directory. Directory failure does not create an identity. + """ + settings = self._settings + if not (settings.hxops_sso_issuer and settings.hxops_sso_audience and settings.hxops_sso_public_key): + raise ServiceUnavailableError("HXOPS entry is unavailable") + claims = verify_rs256_token( + assertion, + public_key=settings.hxops_sso_public_key, + issuer=settings.hxops_sso_issuer, + audience=settings.hxops_sso_audience, + ) + subject, issuer = _casdoor_reference(claims, expected_issuer=settings.casdoor_issuer) + login_name = _login_name(claims) + # GUARD: never copy roles, permissions, or tokens from the assertion. + roles = self._directory.lookup_roles(login_name=login_name) + display_name = claims.get("name") or claims.get("preferred_username") or login_name + if not isinstance(display_name, str) or not display_name: + display_name = login_name + identity = CasdoorIdentity( + subject=subject, + issuer=issuer, + display_name=display_name, + role_names=list(roles), + ) + return identity, login_name + + +def _casdoor_reference(claims: dict[str, object], *, expected_issuer: str) -> tuple[str, str]: + """Read the explicit Casdoor subject. The HXOPS token subject is not that identity.""" + if not expected_issuer: + raise ServiceUnavailableError("HXOPS entry is unavailable") + issuer = claims.get("identity_issuer") or claims.get("casdoor_iss") + if not isinstance(issuer, str) or issuer != expected_issuer: + raise UnauthorizedError() + subject = claims.get("casdoor_sub") + if not isinstance(subject, str) or not subject: + raise UnauthorizedError() + local_id = claims.get("user_id") + if local_id is not None and str(local_id) == subject: + raise UnauthorizedError() + return subject, issuer + + +def _login_name(claims: dict[str, object]) -> str: + """Choose the Casdoor login name used for a later role refresh.""" + for key in ("preferred_username", "employee_id"): + value = claims.get(key) + if isinstance(value, str) and value: + return value + raise UnauthorizedError() + + +def get_hxops_login(directory: RoleDirectory = Depends(get_role_directory)) -> HxopsAssertionLogin: + """Provide HXOPS entry from server settings. Tests replace this dependency.""" + return HxopsAssertionLogin(get_settings(), directory) diff --git a/services/watchman/src/watchman/auth/principal.py b/services/watchman/src/watchman/auth/principal.py new file mode 100644 index 0000000..761ccac --- /dev/null +++ b/services/watchman/src/watchman/auth/principal.py @@ -0,0 +1,119 @@ +"""Reload Casdoor roles for a login name without keeping a user token. + +Uses the application client to read one user. Tests replace the transport. +Depends on settings and the shared HTTP transport used by password login. +""" + +from __future__ import annotations + +import base64 +from datetime import timedelta +from typing import Protocol +from urllib.parse import quote + +from fastapi import Cookie, Depends, Request + +from watchman.auth.casdoor import DefaultCasdoorPort, UrllibCasdoorHttpTransport +from watchman.auth.access import require_platform_write +from watchman.auth.sessions import ( + SESSION_COOKIE_NAME, + SessionStore, + get_session_store, + hash_cookie_token, + read_session_token, + utc_now, +) +from watchman.core.config import Settings, get_settings +from watchman.core.errors import ServiceUnavailableError, UnauthorizedError + + +class RoleDirectory(Protocol): + """Fetch the current role names for a Casdoor login name.""" + + def lookup_roles(self, *, login_name: str) -> list[str]: + """Return role names or raise ServiceUnavailableError. Never returns a token.""" + + +class CasdoorRoleDirectory: + """Read roles from Casdoor get-user using the application client.""" + + def __init__( + self, + settings: Settings | None = None, + transport: UrllibCasdoorHttpTransport | None = None, + ) -> None: + self._settings = settings or get_settings() + self._transport = transport or UrllibCasdoorHttpTransport() + + def lookup_roles(self, *, login_name: str) -> list[str]: + """Load role names for organization/login_name. + + Missing configuration, an empty login name, or a failed response raises + ServiceUnavailableError and does not include credentials in the message. + """ + settings = self._settings + # GUARD: never log the client secret or the Authorization header. + if not ( + settings.casdoor_endpoint + and settings.casdoor_client_id + and settings.casdoor_client_secret + and settings.casdoor_organization + and login_name + ): + raise ServiceUnavailableError("Casdoor login is unavailable") + user_id = f"{quote(settings.casdoor_organization, safe='')}/{quote(login_name, safe='')}" + url = f"{settings.casdoor_endpoint.rstrip('/')}/api/get-user?id={user_id}" + basic = base64.b64encode( + f"{settings.casdoor_client_id}:{settings.casdoor_client_secret}".encode() + ).decode("ascii") + try: + response = self._transport.request( + method="GET", + url=url, + headers={"Accept": "application/json", "Authorization": f"Basic {basic}"}, + ) + except Exception as error: + raise ServiceUnavailableError("Casdoor login is unavailable") from error + if response.status_code < 200 or response.status_code >= 300: + raise ServiceUnavailableError("Casdoor login is unavailable") + payload = DefaultCasdoorPort._decode_json(response.body) + if payload.get("status") == "error": + raise ServiceUnavailableError("Casdoor login is unavailable") + data = payload.get("data") + if not isinstance(data, dict): + raise ServiceUnavailableError("Casdoor login is unavailable") + return DefaultCasdoorPort._role_names(data.get("roles")) + + +def get_role_directory() -> RoleDirectory: + """Provide the production role lookup; tests override this dependency.""" + return CasdoorRoleDirectory() + + +ROLE_FRESHNESS = timedelta(minutes=5) + + +def require_platform_writer( + request: Request, + session_token: str | None = Cookie(default=None, alias=SESSION_COOKIE_NAME), + sessions: SessionStore = Depends(get_session_store), + directory: RoleDirectory = Depends(get_role_directory), +) -> None: + """Reject a platform write unless a fresh watchman-admin session is present. + + A missing or expired session is 41000. A stale role snapshot is reloaded from + Casdoor; if that reload fails the write is refused with 503 and the old + roles are not used. Any other role is 42000. + """ + token = read_session_token(request, session_token) + if token is None: + raise UnauthorizedError() + now = utc_now() + row = sessions.get(token_hash=hash_cookie_token(token), now=now) + if row is None: + raise UnauthorizedError() + roles = list(row.role_snapshot) + if now - row.role_checked_at >= ROLE_FRESHNESS: + roles = directory.lookup_roles(login_name=row.login_name) + sessions.update_roles(token_hash=row.token_hash, role_names=roles, now=now) + require_platform_write(roles) diff --git a/services/watchman/src/watchman/auth/sessions.py b/services/watchman/src/watchman/auth/sessions.py new file mode 100644 index 0000000..7c80f38 --- /dev/null +++ b/services/watchman/src/watchman/auth/sessions.py @@ -0,0 +1,141 @@ +"""Session creation, lookup, and revocation for authenticated browsers. + +Persists only token hashes and public identity snapshots through tenant-scoped SQLAlchemy sessions. +Depends on the auth-session model and server-side Watchman settings. +""" + +from __future__ import annotations + +import hashlib +import secrets +from datetime import datetime, timedelta, timezone +from typing import Protocol + +from fastapi import Depends, Request +from sqlalchemy import delete, select +from sqlalchemy.orm import Session + +from watchman.auth.casdoor import CasdoorIdentity +from watchman.core.config import get_settings +from watchman.core.db import get_db_session +from watchman.models.auth_session import AuthSession + +SESSION_LIFETIME = timedelta(hours=8) +SESSION_COOKIE_NAME = "watchman_session" + + +class SessionStore(Protocol): + """Persist and retrieve browser sessions without exposing their raw cookie token.""" + + def create( + self, + *, + token_hash: str, + identity: CasdoorIdentity, + now: datetime, + login_name: str, + ) -> AuthSession: + """Store one identity snapshot and return its new session record.""" + + def get(self, *, token_hash: str, now: datetime) -> AuthSession | None: + """Return a live session or remove and hide an expired session.""" + + def invalidate(self, *, token_hash: str) -> None: + """Invalidate a browser session identified by its hashed cookie token.""" + + def update_roles(self, *, token_hash: str, role_names: list[str], now: datetime) -> None: + """Replace a live session's role snapshot after a successful Casdoor refresh.""" + + +class SqlAlchemySessionStore: + """Tenant-scoped session store backed by the application database session.""" + + def __init__(self, session: Session) -> None: + self._session = session + + def create( + self, + *, + token_hash: str, + identity: CasdoorIdentity, + now: datetime, + login_name: str, + ) -> AuthSession: + """Save a server-owned session using only the configured tenant identity.""" + row = AuthSession( + token_hash=token_hash, + subject=identity.subject, + issuer=identity.issuer, + display_name=identity.display_name, + login_name=login_name, + role_snapshot=list(identity.role_names), + role_checked_at=now, + expires_at=now + SESSION_LIFETIME, + tenant_id=get_settings().tenant_id, + ) + self._session.add(row) + self._session.commit() + return row + + def get(self, *, token_hash: str, now: datetime) -> AuthSession | None: + """Read a live session and remove stale rows so expiry cannot be reused.""" + row = self._session.scalar( + select(AuthSession).where( + AuthSession.token_hash == token_hash, + AuthSession.expires_at > now, + ) + ) + if row is not None: + return row + self._session.execute( + delete(AuthSession).where( + AuthSession.token_hash == token_hash, + AuthSession.expires_at <= now, + ) + ) + self._session.commit() + return None + + def update_roles(self, *, token_hash: str, role_names: list[str], now: datetime) -> None: + """Persist a refreshed role snapshot without changing who the session belongs to.""" + row = self._session.scalar(select(AuthSession).where(AuthSession.token_hash == token_hash)) + if row is None: + return + row.role_snapshot = list(role_names) + row.role_checked_at = now + self._session.commit() + + def invalidate(self, *, token_hash: str) -> None: + """Delete the row so logout takes effect before the cookie itself expires.""" + self._session.execute(delete(AuthSession).where(AuthSession.token_hash == token_hash)) + self._session.commit() + + +def get_session_store(session: Session = Depends(get_db_session)) -> SessionStore: + """Provide the tenant-scoped SQLAlchemy store; tests replace this dependency.""" + return SqlAlchemySessionStore(session) + + +def issue_cookie_token() -> str: + """Return an unguessable token that is sent only in the HttpOnly cookie.""" + return secrets.token_urlsafe(32) + + +def hash_cookie_token(token: str) -> str: + """Hash a raw browser token before it is used as a database lookup key.""" + return hashlib.sha256(token.encode("utf-8")).hexdigest() + + +def read_session_token(request: Request, cookie_token: str | None) -> str | None: + """Prefer the bearer token the browser stored, and fall back to the cookie.""" + authorization = request.headers.get("authorization", "") + if authorization.lower().startswith("bearer "): + token = authorization[7:].strip() + if token: + return token + return cookie_token + + +def utc_now() -> datetime: + """Return the current timezone-aware UTC instant for session expiry checks.""" + return datetime.now(timezone.utc) diff --git a/services/watchman/src/watchman/auth/token_verifier.py b/services/watchman/src/watchman/auth/token_verifier.py new file mode 100644 index 0000000..819a18a --- /dev/null +++ b/services/watchman/src/watchman/auth/token_verifier.py @@ -0,0 +1,63 @@ +"""Verify signed JWT identity assertions with local public keys. +Only validates tokens; session creation and Casdoor communication remain outside this module. +Depends on PyJWT and watchman.core.errors.UnauthorizedError.""" + +from __future__ import annotations + +from collections.abc import Mapping +from datetime import datetime, timezone +from typing import Any + +import jwt + +from watchman.core.errors import UnauthorizedError + + +def verify_rs256_token( + token: str, + *, + public_key: str, + issuer: str, + audience: str, + now: datetime | None = None, +) -> dict[str, Any]: + """Return claims only after local signature and identity checks succeed. + + Inputs are an RS256 token, trusted public key, expected issuer/audience, and optional UTC clock; + invalid signatures, algorithms, claims, or expiry raise UnauthorizedError without exposing details. + """ + current_time = now or datetime.now(timezone.utc) + if current_time.tzinfo is None or current_time.utcoffset() is None: + raise ValueError("now must be timezone-aware") + + try: + header = jwt.get_unverified_header(token) + if header.get("alg") != "RS256": + raise UnauthorizedError() + claims = jwt.decode( + token, + public_key, + # GUARD: RS256 only; never include none or HS*. + algorithms=["RS256"], + audience=audience, + issuer=issuer, + options={"require": ["exp"], "verify_exp": False}, + ) + _verify_expiration(claims, now=current_time) + except (jwt.PyJWTError, TypeError, ValueError): + raise UnauthorizedError() from None + + return dict(claims) + + +def _verify_expiration(claims: Mapping[str, Any], *, now: datetime) -> None: + """Reject expired or malformed expiry claims using the injected deterministic clock. + + Input is a signature-verified claim mapping and UTC clock; returns only for a future numeric expiry; + malformed, missing, or expired values raise ValueError for the public verifier to map to UnauthorizedError. + """ + expires_at = claims["exp"] + if isinstance(expires_at, bool) or not isinstance(expires_at, int | float): + raise ValueError("exp must be a numeric date") + if expires_at <= now.timestamp(): + raise ValueError("token has expired") diff --git a/services/watchman/src/watchman/core/config.py b/services/watchman/src/watchman/core/config.py index c284229..c534b06 100644 --- a/services/watchman/src/watchman/core/config.py +++ b/services/watchman/src/watchman/core/config.py @@ -103,6 +103,14 @@ class Settings(BaseSettings): default="amqp://guest:CHANGE-ME@127.0.0.1:56729//", alias="CELERY_BROKER_URL", ) + casdoor_endpoint: str = Field(default="", alias="CASDOOR_ENDPOINT") + casdoor_issuer: str = Field(default="", alias="CASDOOR_ISSUER") + casdoor_client_id: str = Field(default="", alias="CASDOOR_CLIENT_ID") + casdoor_client_secret: str = Field(default="", alias="CASDOOR_CLIENT_SECRET") + casdoor_organization: str = Field(default="", alias="CASDOOR_ORGANIZATION") + hxops_sso_issuer: str = Field(default="", alias="HXOPS_SSO_ISSUER") + hxops_sso_audience: str = Field(default="", alias="HXOPS_SSO_AUDIENCE") + hxops_sso_public_key: str = Field(default="", alias="HXOPS_SSO_PUBLIC_KEY") def _settings_from_env_map(env: dict[str, str]) -> Settings: @@ -125,6 +133,14 @@ def _settings_from_env_map(env: dict[str, str]) -> Settings: "CELERY_BROKER_URL", "amqp://guest:CHANGE-ME@127.0.0.1:56729//", ), + casdoor_endpoint=env.get("CASDOOR_ENDPOINT", ""), + casdoor_issuer=env.get("CASDOOR_ISSUER", ""), + casdoor_client_id=env.get("CASDOOR_CLIENT_ID", ""), + casdoor_client_secret=env.get("CASDOOR_CLIENT_SECRET", ""), + casdoor_organization=env.get("CASDOOR_ORGANIZATION", ""), + hxops_sso_issuer=env.get("HXOPS_SSO_ISSUER", ""), + hxops_sso_audience=env.get("HXOPS_SSO_AUDIENCE", ""), + hxops_sso_public_key=env.get("HXOPS_SSO_PUBLIC_KEY", ""), ) diff --git a/services/watchman/src/watchman/models/__init__.py b/services/watchman/src/watchman/models/__init__.py index bef5ded..722ad41 100644 --- a/services/watchman/src/watchman/models/__init__.py +++ b/services/watchman/src/watchman/models/__init__.py @@ -1,5 +1,6 @@ """SQLAlchemy models for the Watchman service package.""" +from watchman.models.auth_session import AuthSession from watchman.models.platform import AuditEvent, RunRecord -__all__ = ["AuditEvent", "RunRecord"] +__all__ = ["AuthSession", "AuditEvent", "RunRecord"] diff --git a/services/watchman/src/watchman/models/auth_session.py b/services/watchman/src/watchman/models/auth_session.py new file mode 100644 index 0000000..e400ddb --- /dev/null +++ b/services/watchman/src/watchman/models/auth_session.py @@ -0,0 +1,40 @@ +"""Server-side authentication session persistence. + +Stores only public identity snapshots and a hash of the browser token; it never stores credentials. +Depends on SQLAlchemy and the shared Watchman declarative base. +""" + +from __future__ import annotations + +from datetime import datetime + +from sqlalchemy import DateTime, String, func, text +from sqlalchemy.dialects.postgresql import JSONB +from sqlalchemy.orm import Mapped, mapped_column + +from watchman.models.base import Base + + +class AuthSession(Base): + """A tenant-scoped browser session with an opaque, hashed lookup token.""" + + __tablename__ = "auth_sessions" + + token_hash: Mapped[str] = mapped_column(String(64), primary_key=True) + subject: Mapped[str] = mapped_column(String(255), nullable=False) + issuer: Mapped[str] = mapped_column(String(512), nullable=False) + display_name: Mapped[str] = mapped_column(String(255), nullable=False) + login_name: Mapped[str] = mapped_column(String(255), nullable=False, server_default="") + role_snapshot: Mapped[list[str]] = mapped_column( + JSONB, + nullable=False, + server_default=text("'[]'::jsonb"), + ) + role_checked_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False) + expires_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False) + tenant_id: Mapped[str] = mapped_column(String(64), nullable=False) + created_at: Mapped[datetime] = mapped_column( + DateTime(timezone=True), + nullable=False, + server_default=func.now(), + ) diff --git a/services/watchman/tests/test_auth_sessions.py b/services/watchman/tests/test_auth_sessions.py new file mode 100644 index 0000000..da89b90 --- /dev/null +++ b/services/watchman/tests/test_auth_sessions.py @@ -0,0 +1,364 @@ +"""Acceptance tests for M02 S2 password sessions without external Casdoor calls. + +Uses injected in-memory ports so API tests do not require a network or local PostgreSQL. +Depends on FastAPI dependency overrides and public authentication interfaces. +""" + +from __future__ import annotations + +import logging +from dataclasses import dataclass +from datetime import datetime, timedelta + +import pytest +from fastapi.testclient import TestClient + +from watchman.api.app import create_app +from watchman.auth.casdoor import CasdoorIdentity, DefaultCasdoorPort, HttpResponse, get_casdoor_port +from watchman.auth.sessions import SESSION_LIFETIME, SessionStore, get_session_store +from watchman.core.config import Settings +from watchman.core.errors import ServiceUnavailableError, UnauthorizedError + +FAKE_PASSWORD = "fixed-fake-password" +FAKE_ACCESS_TOKEN = "fixed-fake-access-token" + + +@dataclass +class StoredSession: + """Minimal stored-session shape used by the in-memory API-test port.""" + + token_hash: str + subject: str + issuer: str + display_name: str + login_name: str + role_snapshot: list[str] + role_checked_at: datetime + expires_at: datetime + + +class InMemorySessionStore: + """Test-only session store preserving the production port contract.""" + + def __init__(self) -> None: + self.rows: dict[str, StoredSession] = {} + + def create( + self, + *, + token_hash: str, + identity: CasdoorIdentity, + now: datetime, + login_name: str, + ) -> StoredSession: + row = StoredSession( + token_hash=token_hash, + subject=identity.subject, + issuer=identity.issuer, + display_name=identity.display_name, + login_name=login_name, + role_snapshot=list(identity.role_names), + role_checked_at=now, + expires_at=now + SESSION_LIFETIME, + ) + self.rows[token_hash] = row + return row + + def get(self, *, token_hash: str, now: datetime) -> StoredSession | None: + row = self.rows.get(token_hash) + if row is not None and row.expires_at > now: + return row + self.rows.pop(token_hash, None) + return None + + def invalidate(self, *, token_hash: str) -> None: + self.rows.pop(token_hash, None) + + def update_roles(self, *, token_hash: str, role_names: list[str], now: datetime) -> None: + row = self.rows.get(token_hash) + if row is None: + return + row.role_snapshot = list(role_names) + row.role_checked_at = now + + +class AcceptingCasdoor: + """Stand-in that returns only safe identity values and never contacts Casdoor.""" + + def authenticate_password(self, *, username: str, password: str) -> CasdoorIdentity: + if password != FAKE_PASSWORD: + raise UnauthorizedError() + return CasdoorIdentity( + subject="casdoor-subject-1", + issuer="https://casdoor.test", + display_name="Test Operator", + role_names=["watchman-operator", "watchman-viewer"], + ) + + +class RejectingCasdoor: + """Stand-in for generic upstream credential rejection.""" + + def authenticate_password(self, *, username: str, password: str) -> CasdoorIdentity: + raise UnauthorizedError() + + +class FakeCasdoorTransport: + """Queue controlled HTTP results so Casdoor adapter tests never use the network.""" + + def __init__(self, responses: list[HttpResponse | Exception]) -> None: + self._responses = iter(responses) + self.calls: list[tuple[str, str, dict[str, str], bytes | None]] = [] + + def request( + self, + *, + method: str, + url: str, + headers: dict[str, str], + data: bytes | None = None, + ) -> HttpResponse: + self.calls.append((method, url, headers, data)) + result = next(self._responses) + if isinstance(result, Exception): + raise result + return result + + +@pytest.fixture() +def auth_client() -> tuple[TestClient, InMemorySessionStore]: + """Return a client with only local stand-ins, avoiding database and network access.""" + app = create_app(validate_runtime=False) + store = InMemorySessionStore() + app.dependency_overrides[get_casdoor_port] = lambda: AcceptingCasdoor() + app.dependency_overrides[get_session_store] = lambda: store + with TestClient(app) as client: + yield client, store + + +def test_password_login_creates_session_returns_roles_and_hides_password( + auth_client: tuple[TestClient, InMemorySessionStore], + caplog: pytest.LogCaptureFixture, +) -> None: + """Successful injected login must create a session without leaking the submitted password.""" + client, store = auth_client + caplog.set_level(logging.DEBUG) + + response = client.post( + "/auth/login", + json={"username": "operator", "password": FAKE_PASSWORD}, + ) + + assert response.status_code == 200 + body = response.json() + assert body["success"] is True + assert body["data"]["subject"] == "casdoor-subject-1" + assert body["data"]["display_name"] == "Test Operator" + assert body["data"]["login_name"] == "operator" + assert body["data"]["roles"] == ["watchman-operator", "watchman-viewer"] + assert body["data"]["token_type"] == "Bearer" + assert body["data"]["expires_in"] == 8 * 60 * 60 + assert body["data"]["access_token"] + assert FAKE_PASSWORD not in body["data"]["access_token"] + assert len(store.rows) == 1 + assert FAKE_PASSWORD not in response.text + assert FAKE_PASSWORD not in caplog.text + cookie = response.headers["set-cookie"].lower() + assert "httponly" in cookie + assert "samesite=lax" in cookie + assert "path=/" in cookie + assert "secure" not in cookie + + +def test_bearer_token_reads_current_user_without_cookie( + auth_client: tuple[TestClient, InMemorySessionStore], +) -> None: + """The access token returned to the browser can authorize a later request.""" + client, _store = auth_client + login = client.post("/auth/login", json={"username": "operator", "password": FAKE_PASSWORD}) + token = login.json()["data"]["access_token"] + bare = TestClient(client.app) + response = bare.get("/auth/me", headers={"Authorization": f"Bearer {token}"}) + assert response.status_code == 200 + assert response.json()["data"]["subject"] == "casdoor-subject-1" + assert "access_token" not in response.json()["data"] + + +def test_rejected_login_is_unauthorized_and_creates_no_session() -> None: + """Casdoor credential rejection must map to 41000 without persisting a session.""" + app = create_app(validate_runtime=False) + store = InMemorySessionStore() + app.dependency_overrides[get_casdoor_port] = lambda: RejectingCasdoor() + app.dependency_overrides[get_session_store] = lambda: store + + with TestClient(app, raise_server_exceptions=False) as client: + response = client.post("/auth/login", json={"username": "operator", "password": FAKE_PASSWORD}) + + assert response.status_code == 401 + assert response.json()["error"]["code"] == 41000 + assert len(store.rows) == 0 + + +def test_unconfigured_default_port_returns_retryable_503_without_session() -> None: + """Incomplete Casdoor settings must fail closed before session creation.""" + app = create_app(validate_runtime=False) + store = InMemorySessionStore() + incomplete_settings = Settings( + casdoor_endpoint="", + casdoor_client_id="", + casdoor_client_secret="", + ) + app.dependency_overrides[get_casdoor_port] = lambda: DefaultCasdoorPort(incomplete_settings) + app.dependency_overrides[get_session_store] = lambda: store + + with TestClient(app, raise_server_exceptions=False) as client: + response = client.post("/auth/login", json={"username": "operator", "password": FAKE_PASSWORD}) + + assert response.status_code == 503 + assert response.json()["error"]["code"] == 50000 + assert response.json()["error"]["retryable"] is True + assert len(store.rows) == 0 + + +def test_default_port_password_grant_returns_safe_identity_and_roles() -> None: + """A discovered password grant returns userinfo roles without retaining credentials.""" + transport = FakeCasdoorTransport( + [ + HttpResponse( + 200, + b'{"token_endpoint":"https://casdoor.test/token","userinfo_endpoint":"https://casdoor.test/userinfo"}', + ), + HttpResponse(200, b'{"access_token":"fixed-fake-access-token"}'), + HttpResponse(200, b'{"sub":"employee-1","name":"Employee","roles":["watchman-admin"]}'), + ] + ) + port = DefaultCasdoorPort( + Settings( + casdoor_endpoint="https://casdoor.test/", + casdoor_issuer="https://issuer.casdoor.test", + casdoor_client_id="test-client", + casdoor_client_secret="test-secret", + ), + transport, + ) + + identity = port.authenticate_password(username="employee-1", password=FAKE_PASSWORD) + + assert identity == CasdoorIdentity( + subject="employee-1", + issuer="https://issuer.casdoor.test", + display_name="Employee", + role_names=["watchman-admin"], + ) + assert FAKE_PASSWORD not in repr(identity) + assert FAKE_ACCESS_TOKEN not in repr(identity) + assert [call[0] for call in transport.calls] == ["GET", "POST", "GET"] + assert transport.calls[0][1] == "https://casdoor.test/.well-known/openid-configuration" + assert b"grant_type=password" in transport.calls[1][3] + assert transport.calls[2][2]["Authorization"] == f"Bearer {FAKE_ACCESS_TOKEN}" + + +def test_default_port_invalid_grant_is_unauthorized() -> None: + """Casdoor invalid_grant is a generic credential rejection.""" + transport = FakeCasdoorTransport( + [ + HttpResponse( + 200, + b'{"token_endpoint":"https://casdoor.test/token","userinfo_endpoint":"https://casdoor.test/userinfo"}', + ), + HttpResponse(400, b'{"error":"invalid_grant","error_description":"upstream secret detail"}'), + ] + ) + port = DefaultCasdoorPort( + Settings( + casdoor_endpoint="https://casdoor.test", + casdoor_client_id="test-client", + casdoor_client_secret="test-secret", + ), + transport, + ) + + with pytest.raises(UnauthorizedError, match="Invalid username or password"): + port.authenticate_password(username="employee-1", password=FAKE_PASSWORD) + + +def test_default_port_unsupported_grant_is_unavailable() -> None: + """A disabled grant type is a configuration failure, not a wrong password.""" + transport = FakeCasdoorTransport( + [ + HttpResponse( + 200, + b'{"token_endpoint":"https://casdoor.test/token","userinfo_endpoint":"https://casdoor.test/userinfo"}', + ), + HttpResponse(400, b'{"error":"unsupported_grant_type"}'), + ] + ) + port = DefaultCasdoorPort( + Settings( + casdoor_endpoint="https://casdoor.test", + casdoor_client_id="test-client", + casdoor_client_secret="test-secret", + ), + transport, + ) + + with pytest.raises(ServiceUnavailableError): + port.authenticate_password(username="employee-1", password=FAKE_PASSWORD) + + +def test_default_port_transport_failure_is_retryable() -> None: + """Network failures are mapped to the retryable integration error.""" + transport = FakeCasdoorTransport([OSError("network unavailable")]) + port = DefaultCasdoorPort( + Settings( + casdoor_endpoint="https://casdoor.test", + casdoor_client_id="test-client", + casdoor_client_secret="test-secret", + ), + transport, + ) + + with pytest.raises(ServiceUnavailableError): + port.authenticate_password(username="employee-1", password=FAKE_PASSWORD) + + +def test_unconfigured_default_port_does_not_call_transport() -> None: + """Missing Casdoor configuration fails before the injected transport is used.""" + transport = FakeCasdoorTransport([]) + port = DefaultCasdoorPort(Settings(), transport) + + with pytest.raises(ServiceUnavailableError): + port.authenticate_password(username="employee-1", password=FAKE_PASSWORD) + + assert transport.calls == [] + + +def test_logout_invalidates_session_and_me_then_returns_41000( + auth_client: tuple[TestClient, InMemorySessionStore], +) -> None: + """Logout must remove the server-side session before a later current-user request.""" + client, _store = auth_client + assert client.post("/auth/login", json={"username": "operator", "password": FAKE_PASSWORD}).status_code == 200 + assert client.get("/auth/me").status_code == 200 + + logout = client.post("/auth/logout") + assert logout.status_code == 200 + assert "max-age=0" in logout.headers["set-cookie"].lower() + + me = client.get("/auth/me") + assert me.status_code == 401 + assert me.json()["error"]["code"] == 41000 + + +def test_health_remains_anonymous_and_missing_login_fields_are_40000() -> None: + """The auth router must not introduce a global auth requirement or bypass validation envelopes.""" + app = create_app(validate_runtime=False) + app.dependency_overrides[get_casdoor_port] = lambda: AcceptingCasdoor() + app.dependency_overrides[get_session_store] = lambda: InMemorySessionStore() + + with TestClient(app) as client: + assert client.get("/health").status_code == 200 + response = client.post("/auth/login", json={"username": "operator"}) + + assert response.status_code == 400 + assert response.json()["error"]["code"] == 40000 diff --git a/services/watchman/tests/test_hxops_entry.py b/services/watchman/tests/test_hxops_entry.py new file mode 100644 index 0000000..377b516 --- /dev/null +++ b/services/watchman/tests/test_hxops_entry.py @@ -0,0 +1,221 @@ +"""HXOPS assertion entry tests. + +Uses an in-memory session and a scripted role directory. No network and no .env.local. +""" + +from __future__ import annotations + +from datetime import datetime, timedelta, timezone + +import jwt +from cryptography.hazmat.primitives import serialization +from cryptography.hazmat.primitives.asymmetric import rsa +from fastapi.testclient import TestClient + +from watchman.api.app import create_app +from watchman.auth.casdoor import CasdoorIdentity +from watchman.auth.hxops import HxopsAssertionLogin, get_hxops_login +from watchman.auth.sessions import SESSION_LIFETIME, get_session_store +from watchman.core.config import Settings +from watchman.core.errors import ServiceUnavailableError + +ISSUER = "https://hxops.test" +AUDIENCE = "watchman" +CASDOOR_ISSUER = "https://casdoor.test" +NOW = datetime(2030, 1, 1, tzinfo=timezone.utc) + + +class MemoryStore: + """Small session stand-in for the assertion route.""" + + def __init__(self) -> None: + self.rows: dict[str, object] = {} + + def create(self, *, token_hash: str, identity: CasdoorIdentity, now: datetime, login_name: str) -> object: + row = type( + "Row", + (), + { + "subject": identity.subject, + "display_name": identity.display_name, + "role_snapshot": list(identity.role_names), + "login_name": login_name, + "expires_at": now + SESSION_LIFETIME, + }, + )() + self.rows[token_hash] = row + return row + + def get(self, *, token_hash: str, now: datetime) -> object | None: + row = self.rows.get(token_hash) + if row is not None and row.expires_at > now: + return row + return None + + def invalidate(self, *, token_hash: str) -> None: + self.rows.pop(token_hash, None) + + def update_roles(self, *, token_hash: str, role_names: list[str], now: datetime) -> None: + del token_hash, role_names, now + + +class Directory: + def __init__(self, roles: list[str] | None = None, fail: bool = False) -> None: + self.roles = roles or ["watchman-viewer"] + self.fail = fail + self.login_name = "" + + def lookup_roles(self, *, login_name: str) -> list[str]: + if self.fail: + raise ServiceUnavailableError("Casdoor login is unavailable") + self.login_name = login_name + return list(self.roles) + + +def _keys() -> tuple[rsa.RSAPrivateKey, str]: + private_key = rsa.generate_private_key(public_exponent=65537, key_size=2048) + public_pem = private_key.public_key().public_bytes( + encoding=serialization.Encoding.PEM, + format=serialization.PublicFormat.SubjectPublicKeyInfo, + ).decode() + return private_key, public_pem + + +def _settings(public_pem: str) -> Settings: + return Settings( + hxops_sso_issuer=ISSUER, + hxops_sso_audience=AUDIENCE, + hxops_sso_public_key=public_pem, + casdoor_issuer=CASDOOR_ISSUER, + ) + + +def _token(private_key: rsa.RSAPrivateKey, **overrides: object) -> str: + claims: dict[str, object] = { + "iss": ISSUER, + "aud": AUDIENCE, + "sub": "1001", + "casdoor_sub": "casdoor-subject-1", + "identity_issuer": CASDOOR_ISSUER, + "preferred_username": "26110002", + "name": "Worker", + "user_id": 1001, + "roles": ["watchman-admin"], + "exp": int((NOW + timedelta(seconds=60)).timestamp()), + } + claims.update(overrides) + return jwt.encode(claims, private_key, algorithm="RS256") + + +def _client(entry: HxopsAssertionLogin, store: MemoryStore) -> TestClient: + app = create_app(validate_runtime=False) + app.dependency_overrides[get_hxops_login] = lambda: entry + app.dependency_overrides[get_session_store] = lambda: store + return TestClient(app) + + +def test_valid_assertion_uses_directory_roles_not_assertion_roles() -> None: + """A signed assertion opens a session, and Casdoor roles replace assertion roles.""" + private_key, public_pem = _keys() + directory = Directory(["watchman-viewer"]) + store = MemoryStore() + entry = HxopsAssertionLogin(_settings(public_pem), directory) + client = _client(entry, store) + + response = client.post("/auth/hxops-entry", json={"assertion": _token(private_key)}) + + assert response.status_code == 200 + assert response.json()["data"]["roles"] == ["watchman-viewer"] + assert response.json()["data"]["subject"] == "casdoor-subject-1" + assert directory.login_name == "26110002" + assert len(store.rows) == 1 + assert "watchman-admin" not in response.text + + +def test_local_user_id_cannot_impersonate_casdoor_subject() -> None: + """Using the HXOPS primary key as the Casdoor subject does not create a session.""" + private_key, public_pem = _keys() + store = MemoryStore() + entry = HxopsAssertionLogin(_settings(public_pem), Directory()) + client = _client(entry, store) + + response = client.post( + "/auth/hxops-entry", + json={"assertion": _token(private_key, casdoor_sub="1001")}, + ) + + assert response.status_code == 401 + assert response.json()["error"]["code"] == 41000 + assert len(store.rows) == 0 + + +def test_hxops_subject_without_casdoor_sub_is_unauthorized() -> None: + """The HXOPS token subject is not accepted when casdoor_sub is absent.""" + private_key, public_pem = _keys() + store = MemoryStore() + entry = HxopsAssertionLogin(_settings(public_pem), Directory()) + client = _client(entry, store) + + response = client.post( + "/auth/hxops-entry", + json={"assertion": _token(private_key, sub="1001", casdoor_sub="", user_id=None)}, + ) + + assert response.status_code == 401 + assert response.json()["error"]["code"] == 41000 + assert len(store.rows) == 0 + + +def test_missing_casdoor_reference_is_unauthorized() -> None: + """An assertion without a Casdoor issuer reference is rejected.""" + private_key, public_pem = _keys() + store = MemoryStore() + entry = HxopsAssertionLogin(_settings(public_pem), Directory()) + client = _client(entry, store) + token = _token(private_key, identity_issuer="", casdoor_iss="") + + response = client.post("/auth/hxops-entry", json={"assertion": token}) + + assert response.status_code == 401 + assert len(store.rows) == 0 + + +def test_bad_signature_creates_no_session() -> None: + """A token signed by another key cannot enter.""" + _, public_pem = _keys() + other, _ = _keys() + store = MemoryStore() + entry = HxopsAssertionLogin(_settings(public_pem), Directory()) + client = _client(entry, store) + + response = client.post("/auth/hxops-entry", json={"assertion": _token(other)}) + + assert response.status_code == 401 + assert len(store.rows) == 0 + + +def test_directory_failure_creates_no_session() -> None: + """If Casdoor cannot supply roles, the assertion does not become a session.""" + private_key, public_pem = _keys() + store = MemoryStore() + entry = HxopsAssertionLogin(_settings(public_pem), Directory(fail=True)) + client = _client(entry, store) + + response = client.post("/auth/hxops-entry", json={"assertion": _token(private_key)}) + + assert response.status_code == 503 + assert response.json()["error"]["retryable"] is True + assert len(store.rows) == 0 + + +def test_unconfigured_hxops_entry_is_unavailable() -> None: + """Missing HXOPS key material fails before role lookup.""" + directory = Directory() + entry = HxopsAssertionLogin(Settings(), directory) + try: + entry.authenticate("not-a-token") + except ServiceUnavailableError: + pass + else: + raise AssertionError("unconfigured entry did not fail") + assert directory.login_name == "" diff --git a/services/watchman/tests/test_idempotency.py b/services/watchman/tests/test_idempotency.py index 489dce8..9fab68f 100644 --- a/services/watchman/tests/test_idempotency.py +++ b/services/watchman/tests/test_idempotency.py @@ -5,14 +5,18 @@ from __future__ import annotations import uuid from concurrent.futures import ThreadPoolExecutor +from datetime import datetime, timedelta, timezone + from fastapi.testclient import TestClient from sqlalchemy import create_engine, text from watchman.api.app import create_app +from watchman.auth.sessions import SESSION_COOKIE_NAME, hash_cookie_token, issue_cookie_token from watchman.core.config import get_settings, reload_settings from sqlalchemy.orm import Session from watchman.core.db import get_session_factory, reset_engine, set_tenant +from watchman.models.auth_session import AuthSession from watchman.models.platform import AuditEvent from watchman.services import platform_records from sqlalchemy import select @@ -34,10 +38,45 @@ def _count_for_key(table: str, key: str) -> int: return int(value) +def _admin_token() -> str: + """Insert a fresh admin session and return the raw cookie token.""" + token = issue_cookie_token() + now = datetime.now(timezone.utc) + settings = get_settings() + factory = get_session_factory() + session = factory() + try: + set_tenant(session, settings.tenant_id) + session.add( + AuthSession( + token_hash=hash_cookie_token(token), + subject="idem-admin", + issuer="https://casdoor.test", + display_name="Idem Admin", + login_name="idem-admin", + role_snapshot=["watchman-admin"], + role_checked_at=now, + expires_at=now + timedelta(hours=1), + tenant_id=settings.tenant_id, + ) + ) + session.commit() + finally: + session.close() + return token + + +def _admin_client() -> TestClient: + """Return an API client that already carries a fresh admin session.""" + client = TestClient(create_app()) + client.cookies.set(SESSION_COOKIE_NAME, _admin_token()) + return client + + def test_duplicate_idempotency_key_returns_same_audit() -> None: reload_settings() reset_engine() - client = TestClient(create_app()) + client = _admin_client() key = f"idem-audit-{uuid.uuid4().hex}" headers = {"x-idempotency-key": key, "X-Request-Id": "req-idem-1"} body = {"action": "idem-test", "payload": {"n": 1}} @@ -52,7 +91,7 @@ def test_duplicate_idempotency_key_returns_same_audit() -> None: def test_duplicate_idempotency_key_returns_same_run_record() -> None: reload_settings() reset_engine() - client = TestClient(create_app()) + client = _admin_client() key = f"idem-run-{uuid.uuid4().hex}" headers = {"x-idempotency-key": key, "X-Request-Id": "req-idem-2"} body = {"kind": "idem-test", "status": "ok", "detail": {"n": 1}} @@ -67,7 +106,7 @@ def test_duplicate_idempotency_key_returns_same_run_record() -> None: def test_missing_idempotency_key_is_40000() -> None: reload_settings() reset_engine() - client = TestClient(create_app()) + client = _admin_client() response = client.post("/platform/audit-events", json={"action": "no-key", "payload": {}}) assert response.status_code == 400 assert response.json()["error"]["code"] == 40000 @@ -79,8 +118,11 @@ def test_concurrent_duplicate_audit_returns_same_id() -> None: key = f"idem-race-{uuid.uuid4().hex}" body = {"action": "race", "payload": {}} + token = _admin_token() + def _post() -> str: client = TestClient(create_app()) + client.cookies.set(SESSION_COOKIE_NAME, token) response = client.post( "/platform/audit-events", json=body, @@ -99,7 +141,7 @@ def test_caller_tenant_id_is_ignored() -> None: reload_settings() reset_engine() settings = get_settings() - client = TestClient(create_app()) + client = _admin_client() key = f"tenant-inject-{uuid.uuid4().hex}" response = client.post( "/platform/audit-events", diff --git a/services/watchman/tests/test_platform_access.py b/services/watchman/tests/test_platform_access.py new file mode 100644 index 0000000..94913b0 --- /dev/null +++ b/services/watchman/tests/test_platform_access.py @@ -0,0 +1,191 @@ +"""Platform write authorization and object-access checks. + +Covers anonymous denial, role denial, admin allowance, and stale role refresh. +Depends on a local Postgres session row and an injected role directory. +""" + +from __future__ import annotations + +import uuid +from datetime import datetime, timedelta, timezone + +from fastapi.testclient import TestClient + +from watchman.api.app import create_app +from watchman.auth.access import ( + OBJECT_READ_NODE, + PLATFORM_WRITE_NODE, + allows_enter, + require_object_access, +) +from watchman.auth.casdoor import HttpResponse +from watchman.auth.principal import CasdoorRoleDirectory, get_role_directory +from watchman.auth.sessions import SESSION_COOKIE_NAME, hash_cookie_token, issue_cookie_token +from watchman.core.config import Settings, get_settings, reload_settings +from watchman.core.db import get_session_factory, reset_engine, set_tenant +from watchman.core.errors import ForbiddenError, ServiceUnavailableError +from watchman.models.auth_session import AuthSession + + +def _seed(roles: list[str], *, age: timedelta = timedelta(0), login_name: str = "worker") -> str: + """Insert one session and return its raw cookie token.""" + token = issue_cookie_token() + now = datetime.now(timezone.utc) + settings = get_settings() + session = get_session_factory()() + try: + set_tenant(session, settings.tenant_id) + session.add( + AuthSession( + token_hash=hash_cookie_token(token), + subject=f"subject-{uuid.uuid4().hex}", + issuer="https://casdoor.test", + display_name="Worker", + login_name=login_name, + role_snapshot=list(roles), + role_checked_at=now - age, + expires_at=now + timedelta(hours=1), + tenant_id=settings.tenant_id, + ) + ) + session.commit() + finally: + session.close() + return token + + +def _client(token: str | None, directory: object | None = None) -> TestClient: + """Build a client, optionally replacing Casdoor role lookup.""" + reload_settings() + reset_engine() + app = create_app() + if directory is not None: + app.dependency_overrides[get_role_directory] = lambda: directory + client = TestClient(app) + if token is not None: + client.cookies.set(SESSION_COOKIE_NAME, token) + return client + + +def test_anonymous_platform_write_is_401_without_permission_node() -> None: + """A missing session is unauthorized and must not name a permission node.""" + client = _client(None) + response = client.post( + "/platform/audit-events", + json={"action": "hidden", "payload": {}}, + headers={"x-idempotency-key": f"anon-{uuid.uuid4().hex}"}, + ) + assert response.status_code == 401 + error = response.json()["error"] + assert error["code"] == 41000 + assert "permission_node" not in error + + +def test_viewer_platform_write_is_forbidden() -> None: + """A viewer session cannot create an audit event.""" + client = _client(_seed(["watchman-viewer"])) + response = client.post( + "/platform/audit-events", + json={"action": "hidden", "payload": {}}, + headers={"x-idempotency-key": f"viewer-{uuid.uuid4().hex}"}, + ) + assert response.status_code == 403 + assert response.json()["error"]["permission_node"] == PLATFORM_WRITE_NODE + + +def test_admin_platform_write_is_allowed() -> None: + """A fresh admin session can create a run record.""" + client = _client(_seed(["watchman-admin"])) + response = client.post( + "/platform/run-records", + json={"kind": "check", "status": "ok", "detail": {}}, + headers={"x-idempotency-key": f"admin-{uuid.uuid4().hex}"}, + ) + assert response.status_code == 200 + assert response.json()["success"] is True + + +def test_stale_roles_fail_closed_when_directory_is_down() -> None: + """An expired role snapshot is not reused when Casdoor cannot be asked.""" + + class DownDirectory: + def lookup_roles(self, *, login_name: str) -> list[str]: + raise ServiceUnavailableError("Casdoor login is unavailable") + + client = _client(_seed(["watchman-admin"], age=timedelta(minutes=6)), DownDirectory()) + response = client.post( + "/platform/audit-events", + json={"action": "stale", "payload": {}}, + headers={"x-idempotency-key": f"stale-{uuid.uuid4().hex}"}, + ) + assert response.status_code == 503 + assert response.json()["error"]["retryable"] is True + + +def test_stale_roles_refresh_before_write() -> None: + """A successful refresh replaces the snapshot and then allows the admin write.""" + + class AdminDirectory: + def lookup_roles(self, *, login_name: str) -> list[str]: + assert login_name == "worker" + return ["watchman-admin"] + + client = _client(_seed(["watchman-viewer"], age=timedelta(minutes=6)), AdminDirectory()) + response = client.post( + "/platform/audit-events", + json={"action": "refreshed", "payload": {}}, + headers={"x-idempotency-key": f"refresh-{uuid.uuid4().hex}"}, + ) + assert response.status_code == 200 + + +def test_enter_and_object_rules() -> None: + """Enter allows only the three roles. Object ids never authorize themselves.""" + assert allows_enter(["watchman-admin"]) + assert allows_enter(["watchman-operator"]) + assert allows_enter(["watchman-viewer"]) + assert not allows_enter([]) + assert not allows_enter(["someone-else"]) + for object_id in ("object-a", "object-b"): + try: + require_object_access(["watchman-admin"], object_id) + except ForbiddenError as exc: + assert exc.permission_node == OBJECT_READ_NODE + else: + raise AssertionError(object_id) + + +class _ScriptedTransport: + def __init__(self, response: HttpResponse) -> None: + self.response = response + self.calls = 0 + + def request(self, *, method: str, url: str, headers: dict[str, str], data: bytes | None = None) -> HttpResponse: + self.calls += 1 + return self.response + + +def test_role_directory_reads_names_without_calling_when_unconfigured() -> None: + """Role lookup parses Casdoor role names and does not run without configuration.""" + transport = _ScriptedTransport( + HttpResponse(200, b'{"status":"ok","data":{"roles":[{"name":"watchman-admin"}]}}') + ) + directory = CasdoorRoleDirectory( + Settings( + casdoor_endpoint="https://casdoor.test", + casdoor_client_id="client", + casdoor_client_secret="secret", + casdoor_organization="organization_HX", + ), + transport, + ) + assert directory.lookup_roles(login_name="worker") == ["watchman-admin"] + assert transport.calls == 1 + bare = CasdoorRoleDirectory(Settings(), transport) + try: + bare.lookup_roles(login_name="worker") + except ServiceUnavailableError: + pass + else: + raise AssertionError("unconfigured lookup called the transport") + assert transport.calls == 1 diff --git a/services/watchman/tests/test_token_verifier.py b/services/watchman/tests/test_token_verifier.py new file mode 100644 index 0000000..c3df5eb --- /dev/null +++ b/services/watchman/tests/test_token_verifier.py @@ -0,0 +1,205 @@ +"""Acceptance tests for local RS256 JWT verification. +Locks requirement criterion 1 without HTTP routes, sessions, or external identity providers. +Depends on in-memory RSA keys, PyJWT, and the Watchman verifier.""" + +from __future__ import annotations + +import base64 +from datetime import datetime, timedelta, timezone +import hashlib +import hmac +import json +from typing import Any + +import jwt +import pytest +from cryptography.hazmat.primitives import serialization +from cryptography.hazmat.primitives.asymmetric import rsa + +from watchman.auth.token_verifier import verify_rs256_token +from watchman.core.errors import UnauthorizedError + +ISSUER = "https://issuer.test/watchman" +AUDIENCE = "watchman-test" +NOW = datetime(2030, 1, 1, tzinfo=timezone.utc) + + +@pytest.fixture +def rsa_keys() -> tuple[rsa.RSAPrivateKey, str, bytes]: + """Create test-only RSA material without persisting any key data. + + Returns private signing material plus PEM and DER public representations for local verification; + key generation failures fail the test process before any token assertion can run. + """ + private_key = rsa.generate_private_key(public_exponent=65537, key_size=2048) + public_key = private_key.public_key() + public_pem = public_key.public_bytes( + encoding=serialization.Encoding.PEM, + format=serialization.PublicFormat.SubjectPublicKeyInfo, + ).decode() + public_der = public_key.public_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PublicFormat.SubjectPublicKeyInfo, + ) + return private_key, public_pem, public_der + + +def _claims(**overrides: Any) -> dict[str, Any]: + """Build signed-token claims that satisfy the local verifier's expected identity contract. + + Optional overrides replace the default issuer, audience, or expiry values; callers use them to create + a specific rejection case while retaining a valid claim shape. + """ + claims: dict[str, Any] = { + "sub": "test-subject", + "iss": ISSUER, + "aud": AUDIENCE, + "exp": int((NOW + timedelta(minutes=5)).timestamp()), + } + claims.update(overrides) + return claims + + +def _signed_token(private_key: rsa.RSAPrivateKey, **overrides: Any) -> str: + """Sign a valid baseline claim set so each test isolates one acceptance condition. + + Input is in-memory RSA material and optional claim replacements; signing failures surface to the test + rather than being confused with the verifier's unauthorized result. + """ + return jwt.encode(_claims(**overrides), private_key, algorithm="RS256") + + +def test_verifier_returns_claims_after_valid_rs256_signature_and_checks( + rsa_keys: tuple[rsa.RSAPrivateKey, str, bytes], +) -> None: + """Locks acceptance criterion 1's required success case after all verification checks pass.""" + private_key, public_pem, _ = rsa_keys + + claims = verify_rs256_token( + _signed_token(private_key), + public_key=public_pem, + issuer=ISSUER, + audience=AUDIENCE, + now=NOW, + ) + + assert claims["sub"] == "test-subject" + + +def test_verifier_rejects_invalid_signature( + rsa_keys: tuple[rsa.RSAPrivateKey, str, bytes], +) -> None: + """Locks acceptance criterion 1: a token signed by another key cannot authenticate.""" + _, public_pem, _ = rsa_keys + other_private_key = rsa.generate_private_key(public_exponent=65537, key_size=2048) + + with pytest.raises(UnauthorizedError): + verify_rs256_token( + _signed_token(other_private_key), + public_key=public_pem, + issuer=ISSUER, + audience=AUDIENCE, + now=NOW, + ) + + +def test_verifier_rejects_wrong_issuer( + rsa_keys: tuple[rsa.RSAPrivateKey, str, bytes], +) -> None: + """Locks acceptance criterion 1: a signed token from another issuer cannot authenticate.""" + private_key, public_pem, _ = rsa_keys + + with pytest.raises(UnauthorizedError): + verify_rs256_token( + _signed_token(private_key, iss="https://issuer.test/other"), + public_key=public_pem, + issuer=ISSUER, + audience=AUDIENCE, + now=NOW, + ) + + +def test_verifier_rejects_wrong_audience( + rsa_keys: tuple[rsa.RSAPrivateKey, str, bytes], +) -> None: + """Locks acceptance criterion 1: a signed token for another audience cannot authenticate.""" + private_key, public_pem, _ = rsa_keys + + with pytest.raises(UnauthorizedError): + verify_rs256_token( + _signed_token(private_key, aud="another-service"), + public_key=public_pem, + issuer=ISSUER, + audience=AUDIENCE, + now=NOW, + ) + + +def test_verifier_rejects_clearly_expired_token( + rsa_keys: tuple[rsa.RSAPrivateKey, str, bytes], +) -> None: + """Locks acceptance criterion 1: deterministic expiry before now cannot authenticate.""" + private_key, public_pem, _ = rsa_keys + + with pytest.raises(UnauthorizedError): + verify_rs256_token( + _signed_token(private_key, exp=int((NOW - timedelta(days=1)).timestamp())), + public_key=public_pem, + issuer=ISSUER, + audience=AUDIENCE, + now=NOW, + ) + + +def test_verifier_rejects_unsigned_none_algorithm_token( + rsa_keys: tuple[rsa.RSAPrivateKey, str, bytes], + monkeypatch: pytest.MonkeyPatch, +) -> None: + """Locks the explicit S1 algorithm policy: unsigned alg none tokens cannot authenticate.""" + _, public_pem, _ = rsa_keys + token = jwt.encode(_claims(), key=None, algorithm="none") + monkeypatch.setattr( + jwt, + "decode", + lambda *args, **kwargs: pytest.fail("jwt.decode must not process alg none tokens"), + ) + + with pytest.raises(UnauthorizedError): + verify_rs256_token( + token, + public_key=public_pem, + issuer=ISSUER, + audience=AUDIENCE, + now=NOW, + ) + + +def test_verifier_rejects_hs256_public_key_confusion( + rsa_keys: tuple[rsa.RSAPrivateKey, str, bytes], + monkeypatch: pytest.MonkeyPatch, +) -> None: + """Locks the explicit S1 algorithm policy: public-key-as-HMAC tokens cannot authenticate.""" + _, public_pem, public_der = rsa_keys + encoded_header = base64.urlsafe_b64encode( + json.dumps({"alg": "HS256", "typ": "JWT"}, separators=(",", ":")).encode() + ).rstrip(b"=") + encoded_claims = base64.urlsafe_b64encode( + json.dumps(_claims(), separators=(",", ":")).encode() + ).rstrip(b"=") + signing_input = encoded_header + b"." + encoded_claims + signature = hmac.new(public_der, signing_input, hashlib.sha256).digest() + token = f"{signing_input.decode()}.{base64.urlsafe_b64encode(signature).rstrip(b'=').decode()}" + monkeypatch.setattr( + jwt, + "decode", + lambda *args, **kwargs: pytest.fail("jwt.decode must not process HS256 tokens"), + ) + + with pytest.raises(UnauthorizedError): + verify_rs256_token( + token, + public_key=public_pem, + issuer=ISSUER, + audience=AUDIENCE, + now=NOW, + ) diff --git a/uv.lock b/uv.lock index be648a9..ba29a0b 100644 --- a/uv.lock +++ b/uv.lock @@ -11,73 +11,73 @@ members = [ [[package]] name = "alembic" version = "1.20.1" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mako" }, { name = "sqlalchemy" }, { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/93/1c/00909e0fbebad2121d916fdcab044cae988146680e9ee4387ba25fef8747/alembic-1.20.1.tar.gz", hash = "sha256:83490def1f723413db5096591f7609ac52544805be93849170088ed04f5a2e0b" } +sdist = { url = "https://files.pythonhosted.org/packages/93/1c/00909e0fbebad2121d916fdcab044cae988146680e9ee4387ba25fef8747/alembic-1.20.1.tar.gz", hash = "sha256:83490def1f723413db5096591f7609ac52544805be93849170088ed04f5a2e0b", size = 2103576, upload-time = "2026-10-22T03:24:35.93Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/11/3c/8740f5b4e1bd57333e4f84265b9b6363da4f7cf70f5622dd1e2fde7a0bd5/alembic-1.20.1-py3-none-any.whl", hash = "sha256:9970712cfb81ea26c8658d378aaa5b8f6ff9146e5bb111d70497c164016cf598" }, + { url = "https://files.pythonhosted.org/packages/11/3c/8740f5b4e1bd57333e4f84265b9b6363da4f7cf70f5622dd1e2fde7a0bd5/alembic-1.20.1-py3-none-any.whl", hash = "sha256:9970712cfb81ea26c8658d378aaa5b8f6ff9146e5bb111d70497c164016cf598", size = 270355, upload-time = "2026-10-22T03:24:37.667Z" }, ] [[package]] name = "amqp" version = "5.4.2" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "vine" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/4b/46/64c69cdd9705a5b312920cf76c3cb7c2c4718ffeafbfbcf87a842890765e/amqp-5.4.2.tar.gz", hash = "sha256:9362660c4a31150cf18e78cae2ce8aa1e929fc6c6739e69f6dd5dbea9c3edc82" } +sdist = { url = "https://files.pythonhosted.org/packages/4b/46/64c69cdd9705a5b312920cf76c3cb7c2c4718ffeafbfbcf87a842890765e/amqp-5.4.2.tar.gz", hash = "sha256:9362660c4a31150cf18e78cae2ce8aa1e929fc6c6739e69f6dd5dbea9c3edc82", size = 133663, upload-time = "2026-11-02T10:34:18.483Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/e1/1d/2da3a059d2736e2ad8104762f93ad2145b6b0586aaa6be5290bab5d96c68/amqp-5.4.2-py3-none-any.whl", hash = "sha256:e6e756b15c89c86818b48a4947a424706238afbf67d457428d3269bc4590db9e" }, + { url = "https://files.pythonhosted.org/packages/e1/1d/2da3a059d2736e2ad8104762f93ad2145b6b0586aaa6be5290bab5d96c68/amqp-5.4.2-py3-none-any.whl", hash = "sha256:e6e756b15c89c86818b48a4947a424706238afbf67d457428d3269bc4590db9e", size = 51956, upload-time = "2026-11-02T10:34:16.66Z" }, ] [[package]] name = "annotated-doc" version = "0.0.6" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/0f/6e/a61e86e43bb6039b31a33a8f5fba76fe1cdacf3661e7b9756d4ff1b28cdc/annotated_doc-0.0.6.tar.gz", hash = "sha256:7969bb69912085b2285849c0dcac0b4b374fd180c13cf10a87f284ffcf347bbf" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/6e/a61e86e43bb6039b31a33a8f5fba76fe1cdacf3661e7b9756d4ff1b28cdc/annotated_doc-0.0.6.tar.gz", hash = "sha256:7969bb69912085b2285849c0dcac0b4b374fd180c13cf10a87f284ffcf347bbf", size = 10767, upload-time = "2026-11-10T18:17:11.28Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/cd/f5/3dd85d583e55be76cd02b1fc9bbec771b12d63124b01661d9535ccf8721f/annotated_doc-0.0.6-py3-none-any.whl", hash = "sha256:361ca0950cc7082f53fa69e9328409f40a62c61e57e0a47e1825a08078a58a53" }, + { url = "https://files.pythonhosted.org/packages/cd/f5/3dd85d583e55be76cd02b1fc9bbec771b12d63124b01661d9535ccf8721f/annotated_doc-0.0.6-py3-none-any.whl", hash = "sha256:361ca0950cc7082f53fa69e9328409f40a62c61e57e0a47e1825a08078a58a53", size = 5293, upload-time = "2026-11-10T18:17:10.249Z" }, ] [[package]] name = "annotated-types" version = "0.8.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7", size = 15893, upload-time = "2026-07-23T20:16:13.995Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0" }, + { url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", size = 13427, upload-time = "2026-07-23T20:16:12.938Z" }, ] [[package]] name = "anyio" version = "4.16.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/a1/98/7e457a3b014976887a050561955c0b76e1e7e2d6e27b78ecef2ef80518f2/anyio-4.16.0.tar.gz", hash = "sha256:59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/98/7e457a3b014976887a050561955c0b76e1e7e2d6e27b78ecef2ef80518f2/anyio-4.16.0.tar.gz", hash = "sha256:59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb", size = 310971, upload-time = "2026-11-01T11:20:07.282Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/a9/16/7757fb84c819accc7d7e9af5291b261e4abb8627ee040f99e7d35ef2457a/anyio-4.16.0-py3-none-any.whl", hash = "sha256:c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026" }, + { url = "https://files.pythonhosted.org/packages/a9/16/7757fb84c819accc7d7e9af5291b261e4abb8627ee040f99e7d35ef2457a/anyio-4.16.0-py3-none-any.whl", hash = "sha256:c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026", size = 134521, upload-time = "2026-11-01T11:20:05.59Z" }, ] [[package]] name = "billiard" version = "4.3.2" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/96/ba/4ee8c6d14b3e9b5ce89b5b070f1352e6cadefde3f6bc36afcfee5e7158a2/billiard-4.3.2.tar.gz", hash = "sha256:9eb83c99b1cf7acb1fed86c1dfd477157000a1a2c0108005c1e5837b55d2acba" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/ba/4ee8c6d14b3e9b5ce89b5b070f1352e6cadefde3f6bc36afcfee5e7158a2/billiard-4.3.2.tar.gz", hash = "sha256:9eb83c99b1cf7acb1fed86c1dfd477157000a1a2c0108005c1e5837b55d2acba", size = 169668, upload-time = "2026-11-02T09:12:45.346Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/21/05/3d445479b3f7e4ae0901cdf2c45f561b436d1a5b8ed1c5c97e260152ae50/billiard-4.3.2-py3-none-any.whl", hash = "sha256:37735a7b4117aafa73532b3b493db4c02fb85c0e69d5f3447f113fd30ff27872" }, + { url = "https://files.pythonhosted.org/packages/21/05/3d445479b3f7e4ae0901cdf2c45f561b436d1a5b8ed1c5c97e260152ae50/billiard-4.3.2-py3-none-any.whl", hash = "sha256:37735a7b4117aafa73532b3b493db4c02fb85c0e69d5f3447f113fd30ff27872", size = 90632, upload-time = "2026-11-02T09:12:43.707Z" }, ] [[package]] name = "celery" version = "5.7.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "billiard" }, { name = "click" }, @@ -89,80 +89,153 @@ dependencies = [ { name = "tzlocal" }, { name = "vine" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/ef/f7/166bfd22cbd0dd4f77715ddd207881c1332cd1f304d79b1a123aff7cdf10/celery-5.7.0.tar.gz", hash = "sha256:6a5dfcf6662287204f009a02002b9e66c83d4105e47ebabdc7079108772fc6f0" } +sdist = { url = "https://files.pythonhosted.org/packages/ef/f7/166bfd22cbd0dd4f77715ddd207881c1332cd1f304d79b1a123aff7cdf10/celery-5.7.0.tar.gz", hash = "sha256:6a5dfcf6662287204f009a02002b9e66c83d4105e47ebabdc7079108772fc6f0", size = 2075113, upload-time = "2026-11-05T15:14:24.027Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/e9/cf/cd7fcb9d8f5a21fa420ddf19ee96969e36820182275a731abdf4260ed86a/celery-5.7.0-py3-none-any.whl", hash = "sha256:18310a9c919f9029e4735367484d93e6a25cdfd30afdc474622cc263d9b35f6e" }, + { url = "https://files.pythonhosted.org/packages/e9/cf/cd7fcb9d8f5a21fa420ddf19ee96969e36820182275a731abdf4260ed86a/celery-5.7.0-py3-none-any.whl", hash = "sha256:18310a9c919f9029e4735367484d93e6a25cdfd30afdc474622cc263d9b35f6e", size = 519594, upload-time = "2026-11-05T15:14:17.649Z" }, ] [[package]] name = "certifi" version = "2026.10.23" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/fd/11/b524cbd9bbdaca58608e4cf4053fd463417549e1959fa8d3aa18319f9555/certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fd/11/b524cbd9bbdaca58608e4cf4053fd463417549e1959fa8d3aa18319f9555/certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd", size = 136225, upload-time = "2026-10-23T11:36:16.478Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/32/d1/a3652fe2c19134d0d15922177821d863cbd7e842d53a21bbe7e8e3a1b5ac/certifi-2026.10.23-py3-none-any.whl", hash = "sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1" }, + { url = "https://files.pythonhosted.org/packages/32/d1/a3652fe2c19134d0d15922177821d863cbd7e842d53a21bbe7e8e3a1b5ac/certifi-2026.10.23-py3-none-any.whl", hash = "sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1", size = 135082, upload-time = "2026-10-23T11:36:14.763Z" }, +] + +[[package]] +name = "cffi" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/69/43965eccfdead3b9220015fd1320e117be8c6ed01a62ffab76eeb752f5d5/cffi-2.1.1-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0", size = 184821, upload-time = "2026-08-03T21:19:44.887Z" }, + { url = "https://files.pythonhosted.org/packages/54/7d/16e5a096677b5e313ca80cd5e5170efa3ea44624a82bb111925522da64b1/cffi-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf", size = 184719, upload-time = "2026-08-03T21:19:46.129Z" }, + { url = "https://files.pythonhosted.org/packages/56/e6/8941622732edec876dd17d0453dce07317ae96db34f2ec1436c9d3785986/cffi-2.1.1-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a", size = 214799, upload-time = "2026-08-03T21:19:47.218Z" }, + { url = "https://files.pythonhosted.org/packages/44/de/f98430906df1545ffde0d543dd124a7a439bc2cd32b36b9c53f805df7333/cffi-2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890", size = 222389, upload-time = "2026-08-03T21:19:48.331Z" }, + { url = "https://files.pythonhosted.org/packages/6a/5b/717f1526b9957b34456313c31645c5b82b8fb5c3fe9e4752999be7128bfc/cffi-2.1.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50", size = 210249, upload-time = "2026-08-03T21:19:49.543Z" }, + { url = "https://files.pythonhosted.org/packages/64/b3/f8aa4f3e34986c7e4ec45072d1b1b9dd295b6b18007b45518d79726dd725/cffi-2.1.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e", size = 208775, upload-time = "2026-08-03T21:19:50.918Z" }, + { url = "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf", size = 221822, upload-time = "2026-08-03T21:19:52.054Z" }, + { url = "https://files.pythonhosted.org/packages/a0/d2/6cd24ae3be000a634109c247d1475d62e5616d0dc78c82770942ec384248/cffi-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517", size = 225232, upload-time = "2026-08-03T21:19:53.109Z" }, + { url = "https://files.pythonhosted.org/packages/cb/52/3fa190537004dd7f0ab860a6dc7c0175b8667f68d1e618a46f5498d30250/cffi-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735", size = 223597, upload-time = "2026-08-03T21:19:54.515Z" }, + { url = "https://files.pythonhosted.org/packages/80/fb/0bb75b7039588c074b37ae99f40d9bfddf990ecb2fbc346ebccd2e56b9be/cffi-2.1.1-cp312-cp312-win32.whl", hash = "sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e", size = 175292, upload-time = "2026-08-03T21:19:55.566Z" }, + { url = "https://files.pythonhosted.org/packages/d9/79/615cc094e2fb508cade7de88d3b4f6c4ec2bab695c97bce9153dc65aadf5/cffi-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a", size = 185919, upload-time = "2026-08-03T21:19:56.89Z" }, + { url = "https://files.pythonhosted.org/packages/70/c6/d0ea84713fe46b243a436a18fcd47d639732747e21635c8a27191b06dc30/cffi-2.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80", size = 180093, upload-time = "2026-08-03T21:19:58.155Z" }, ] [[package]] name = "click" version = "8.5.1" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/45/37/edbf1b0707709013c0cf2e8317e03d97ed29bf4cac709fe328904ae92a38/click-8.5.1.tar.gz", hash = "sha256:9bbfada76703fd1d784b83eea012e3e8c6a001a876543ef104fa56aaaeb072b4" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/37/edbf1b0707709013c0cf2e8317e03d97ed29bf4cac709fe328904ae92a38/click-8.5.1.tar.gz", hash = "sha256:9bbfada76703fd1d784b83eea012e3e8c6a001a876543ef104fa56aaaeb072b4", size = 399151, upload-time = "2026-11-06T17:37:01.021Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/31/7d/164b7ffc8624fe9efb4221bf9af485d5c1e41b9ae118045d2b6dc5457d8b/click-8.5.1-py3-none-any.whl", hash = "sha256:8bb5376d2006950386f8c6427613334a2acadc5f559cb80e638d00b4df957e37" }, + { url = "https://files.pythonhosted.org/packages/31/7d/164b7ffc8624fe9efb4221bf9af485d5c1e41b9ae118045d2b6dc5457d8b/click-8.5.1-py3-none-any.whl", hash = "sha256:8bb5376d2006950386f8c6427613334a2acadc5f559cb80e638d00b4df957e37", size = 126163, upload-time = "2026-11-06T17:36:59.287Z" }, ] [[package]] name = "click-didyoumean" version = "0.3.1" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/30/ce/217289b77c590ea1e7c24242d9ddd6e249e52c795ff10fac2c50062c48cb/click_didyoumean-0.3.1.tar.gz", hash = "sha256:4f82fdff0dbe64ef8ab2279bd6aa3f6a99c3b28c05aa09cbfc07c9d7fbb5a463" } +sdist = { url = "https://files.pythonhosted.org/packages/30/ce/217289b77c590ea1e7c24242d9ddd6e249e52c795ff10fac2c50062c48cb/click_didyoumean-0.3.1.tar.gz", hash = "sha256:4f82fdff0dbe64ef8ab2279bd6aa3f6a99c3b28c05aa09cbfc07c9d7fbb5a463", size = 3089, upload-time = "2024-03-24T08:22:07.499Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/1b/5b/974430b5ffdb7a4f1941d13d83c64a0395114503cc357c6b9ae4ce5047ed/click_didyoumean-0.3.1-py3-none-any.whl", hash = "sha256:5c4bb6007cfea5f2fd6583a2fb6701a22a41eb98957e63d0fac41c10e7c3117c" }, + { url = "https://files.pythonhosted.org/packages/1b/5b/974430b5ffdb7a4f1941d13d83c64a0395114503cc357c6b9ae4ce5047ed/click_didyoumean-0.3.1-py3-none-any.whl", hash = "sha256:5c4bb6007cfea5f2fd6583a2fb6701a22a41eb98957e63d0fac41c10e7c3117c", size = 3631, upload-time = "2024-03-24T08:22:06.356Z" }, ] [[package]] name = "click-plugins" version = "1.1.1.2" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz", hash = "sha256:d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261" } +sdist = { url = "https://files.pythonhosted.org/packages/c3/a4/34847b59150da33690a36da3681d6bbc2ec14ee9a846bc30a6746e5984e4/click_plugins-1.1.1.2.tar.gz", hash = "sha256:d7af3984a99d243c131aa1a828331e7630f4a88a9741fd05c927b204bcf92261", size = 8343, upload-time = "2025-06-25T00:47:37.555Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/3d/9a/2abecb28ae875e39c8cad711eb1186d8d14eab564705325e77e4e6ab9ae5/click_plugins-1.1.1.2-py2.py3-none-any.whl", hash = "sha256:008d65743833ffc1f5417bf0e78e8d2c23aab04d9745ba817bd3e71b0feb6aa6" }, + { url = "https://files.pythonhosted.org/packages/3d/9a/2abecb28ae875e39c8cad711eb1186d8d14eab564705325e77e4e6ab9ae5/click_plugins-1.1.1.2-py2.py3-none-any.whl", hash = "sha256:008d65743833ffc1f5417bf0e78e8d2c23aab04d9745ba817bd3e71b0feb6aa6", size = 11051, upload-time = "2025-06-25T00:47:36.731Z" }, ] [[package]] name = "click-repl" version = "0.4.1" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, { name = "prompt-toolkit" }, { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/28/50/bea78619ff1fc0fbd61882f64a1302a8abb2ea0b3db92907042d0e362df2/click_repl-0.4.1.tar.gz", hash = "sha256:c32a1cf6f95e5bd6e92076f81ce24eafd33f2f0ffb0135887e335b8e446d1c0b" } +sdist = { url = "https://files.pythonhosted.org/packages/28/50/bea78619ff1fc0fbd61882f64a1302a8abb2ea0b3db92907042d0e362df2/click_repl-0.4.1.tar.gz", hash = "sha256:c32a1cf6f95e5bd6e92076f81ce24eafd33f2f0ffb0135887e335b8e446d1c0b", size = 16403, upload-time = "2026-10-05T06:01:57.607Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/a4/f6/12dc0f2e0159c2b416818b7fedcda15b520043773364a81d7389809a5af5/click_repl-0.4.1-py3-none-any.whl", hash = "sha256:5cb10881d4c5ebaa8695eceb69911af3062ee78342812b713564b17aad333eb5" }, + { url = "https://files.pythonhosted.org/packages/a4/f6/12dc0f2e0159c2b416818b7fedcda15b520043773364a81d7389809a5af5/click_repl-0.4.1-py3-none-any.whl", hash = "sha256:5cb10881d4c5ebaa8695eceb69911af3062ee78342812b713564b17aad333eb5", size = 14988, upload-time = "2026-10-05T06:01:55.611Z" }, ] [[package]] name = "colorama" version = "0.4.6" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" }, + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "cryptography" +version = "50.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9d/af/182eb91b0df3fe75c4d9f26fe70684569566745f6ba7e5c9c73a862c5252/cryptography-50.0.2.tar.gz", hash = "sha256:7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b04060e00d5", size = 880623, upload-time = "2026-09-30T15:30:04.884Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/56/d194340cc4a57535e82e1bee9e89667ac4b7c13b5d3f59686deae3094dd5/cryptography-50.0.2-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:fa8f5efb344d6908a1ce62f4a24e2e5780f825d6f53f5f50ec5ffacac72936cb", size = 3914904, upload-time = "2026-09-30T14:43:44.339Z" }, + { url = "https://files.pythonhosted.org/packages/d9/69/c9bd862c3bf43d6399c433caf002df16e2dffd4be49bdf515cda38038711/cryptography-50.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:79def8d059362e7831389ed3be0ecdf58a89386e1271e35dd9f5af84e81bffd0", size = 4731146, upload-time = "2026-09-30T14:43:47.113Z" }, + { url = "https://files.pythonhosted.org/packages/21/69/64cef1f702bf6657e0cc186ed1a2891d50d29fb41586b254e1c07adea261/cryptography-50.0.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2", size = 4719841, upload-time = "2026-09-30T14:43:49.01Z" }, + { url = "https://files.pythonhosted.org/packages/38/6b/61a3f8d8c5e1e49a6cddccafc4015cc1c0021360ab0acb4080e7a423644a/cryptography-50.0.2-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f9f6143a8c75945eb960d9eb98905a441394abfa24afaae239d514ffb2586480", size = 4738340, upload-time = "2026-09-30T14:43:50.932Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2e/7212ca32fd43dc91f2f41db20160b268098874b4c9a0e7be94d6835f5b2e/cryptography-50.0.2-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:a582ab2ae1d34f67112cadc86702774c9ea4374df6bca6afe672817203c99134", size = 5367029, upload-time = "2026-09-30T14:43:52.911Z" }, + { url = "https://files.pythonhosted.org/packages/1a/f1/b474e930c4d910328780e3940da76f5aa5cbc48ce1fc14e44d239d9ea9db/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", size = 4753050, upload-time = "2026-09-30T14:43:55.272Z" }, + { url = "https://files.pythonhosted.org/packages/7c/52/9af10e80ac16b0fcc2123f9cbd5e7afbd0fd5075bb7a607c592258a39cda/cryptography-50.0.2-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:ac9ed99d81760c62fe89d5f0815cdfa1ba9a35141cf30f1c2d044f04b4803d2e", size = 4376724, upload-time = "2026-09-30T14:43:57.24Z" }, + { url = "https://files.pythonhosted.org/packages/71/37/6202e488cc1eb625ea110c292c6bda92823176e023f427d8d5660ce8d632/cryptography-50.0.2-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:87e9ce85beb6b328ba370cc6e6aea483c92617b4c95b1d33a49297eb662bfb04", size = 4737859, upload-time = "2026-09-30T14:43:59.541Z" }, + { url = "https://files.pythonhosted.org/packages/8f/30/e86d7d518489b0ae2497091a35287abcb1a2ce4037837a34afbe9b1d6964/cryptography-50.0.2-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:f265528741e048bce55c3463ed721fb0aa45a5888d8add8cfeccb3035451bbdc", size = 5324103, upload-time = "2026-09-30T14:44:01.901Z" }, + { url = "https://files.pythonhosted.org/packages/d3/69/2c833a049475e0a3444e94c7d0aca0aa51d166374a449b09e92ac98138de/cryptography-50.0.2-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9dab55f57c74c3cad24c323bacbbd04be4705ba6eb0d92e920b1fc4837ed5079", size = 4752576, upload-time = "2026-09-30T14:44:04.545Z" }, + { url = "https://files.pythonhosted.org/packages/6c/5d/906970b83bbfc1f5bbfb677a143c181f2801f23b6a7204a3b47c42c97e65/cryptography-50.0.2-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:25784ce8b9621c90c643efb9e1e2162ab3b0224cae446ad5e70e7fcb1ce18b51", size = 4870819, upload-time = "2026-09-30T14:44:06.884Z" }, + { url = "https://files.pythonhosted.org/packages/68/e3/f2298d3bb55e0c4a91841ec4d01b3f020ba8c5fbf15ccdcc6dcf03f97025/cryptography-50.0.2-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:85d0d9a31b9098e98534226d5686b47264b95e62ce459dc2e62fdfc809f9fe93", size = 5030152, upload-time = "2026-09-30T14:44:09.443Z" }, + { url = "https://files.pythonhosted.org/packages/9a/4f/adfc442765721292fff86d314ce385d3249d22db42295c0dd057727b60f3/cryptography-50.0.2-cp311-abi3-win_amd64.whl", hash = "sha256:7afa5a6602a9f29af1f3a2965f831bae7c9d5d597b7cbb716d41ab3b7d89879c", size = 3824692, upload-time = "2026-09-30T14:44:11.671Z" }, + { url = "https://files.pythonhosted.org/packages/2d/49/93f6a6e7a87c9aa68d44d3e1cdb5fe8f60c90d5d2f46acae9a56892816b8/cryptography-50.0.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:edc3342adf8f697fc5f59c887a304356f147b397809440ed64e2fa6af2f50f37", size = 4133708, upload-time = "2026-09-30T14:44:41.807Z" }, + { url = "https://files.pythonhosted.org/packages/8c/75/32ac2a56243d778805c16ca6a32b8f74fb757df7e28d7ecb560afafb59cf/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d370b8d1dfcdf7130178137f6fbee6140774a1acc6cacefc4b42643ec11d0a3a", size = 4956267, upload-time = "2026-09-30T14:44:43.693Z" }, + { url = "https://files.pythonhosted.org/packages/aa/a4/2c8d734e43d97f0842ee9f1b7b4bfb3d0cf5e19edebf43c2afe6675c2320/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f2f9bd7f90c64fe89253f0a2c05e3c4856072660429ce8831b4235bf29403a67", size = 4966465, upload-time = "2026-09-30T14:44:45.769Z" }, + { url = "https://files.pythonhosted.org/packages/c2/58/ee288c829a6f41f6235ae9dd33d82fd19b45442b65b4c8a3da36963d9f7a/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl", hash = "sha256:e275096ea1e60cc595cda2836fd4a6c725d1125108b868be17f53684d164e2cc", size = 4959356, upload-time = "2026-09-30T14:44:48.211Z" }, + { url = "https://files.pythonhosted.org/packages/92/20/9ded6d51ddd9897f6b6e81fb9ebea7951d7cc5d6c890b0ed8abf77a51a80/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_ppc64le.whl", hash = "sha256:b13478603dcd0a2479ff8e87e2c19a7d525734686fe3c49542472293a204212d", size = 5548822, upload-time = "2026-09-30T14:44:50.86Z" }, + { url = "https://files.pythonhosted.org/packages/02/a8/8df951850d6b31d2a00218f19e2b3f999523437ed7a819df7fa427942fca/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl", hash = "sha256:58a0c478eeca76fe5e07993c5a0703def34a6dc6a0cda4f5564639b33112ffe7", size = 5001199, upload-time = "2026-09-30T14:44:53.379Z" }, + { url = "https://files.pythonhosted.org/packages/8b/f9/36b3022218ce75b7cdf068fb95f809f9bd0d820e4955ef43b90c255cc7ac/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_31_armv7l.whl", hash = "sha256:d38cdff612d06fa6a32840d5e1b1f7a27cee4a349aa9085d94a67789d6bfd408", size = 4629333, upload-time = "2026-09-30T14:44:55.635Z" }, + { url = "https://files.pythonhosted.org/packages/8c/72/20f99a219f6af47cdd1cbd978c243b92d71496e168a746138af44ded4f29/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_aarch64.whl", hash = "sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b", size = 4958822, upload-time = "2026-09-30T14:44:59.639Z" }, + { url = "https://files.pythonhosted.org/packages/f2/20/196f112617fb08eb4d608a2a6c422373d46f9cc2857f38fc0667033c0899/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_ppc64le.whl", hash = "sha256:cbc8738fd8526d80f35cb3a40d41f41a2e7030bb3b18b09a6778ef63d291c2fd", size = 5506351, upload-time = "2026-09-30T14:45:02.267Z" }, + { url = "https://files.pythonhosted.org/packages/24/95/83378121ef3eaaaf71d4b781577ff794acb39b9e1b87a3f156898c8497ed/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_x86_64.whl", hash = "sha256:e105ab60406787da31fccc883fc0f733af1efd78f0136a4599692c4083a73d0c", size = 5000859, upload-time = "2026-09-30T14:45:05.009Z" }, + { url = "https://files.pythonhosted.org/packages/22/f7/70fd7ae4d1dbfa7ba29b02e1b9068771519a86027756510b700ce81086a8/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6f8700550aa1474a91e5dc07049c46f98b423b5b1ddd0483e0b51362eeeaf5be", size = 5092151, upload-time = "2026-09-30T15:29:15.932Z" }, + { url = "https://files.pythonhosted.org/packages/d4/be/688367b74de86984bd58d8efacfc7c9e68b89a6a22ced0fb4f38db50254a/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:c71be1cbfa5cd9a41ee452acf1eccd82b2c05950358b106ec8ceb83411d1a020", size = 5286120, upload-time = "2026-09-30T15:29:18.309Z" }, + { url = "https://files.pythonhosted.org/packages/39/d1/55f8a3f2ef5d1529e16835ef10cf0fe3d559ce237b46dddc440c0bba3649/cryptography-50.0.2-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:c423ab384a46c4dff7217b2ea5ba2e11cffdeab6441acd04cf65a369caf0366c", size = 4111557, upload-time = "2026-09-30T15:29:20.155Z" }, + { url = "https://files.pythonhosted.org/packages/23/ad/ac987755d00e1e64273760228d2635ae38dae2be83e3c6e0d3289d91dec3/cryptography-50.0.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:0ec5f09541743261e66e291b4a0cbf0fb2997aeaab6d9e9c740b9dba1b58d1c2", size = 3943588, upload-time = "2026-09-30T15:29:22.265Z" }, + { url = "https://files.pythonhosted.org/packages/d5/8d/6d585339bedf85d45044c85d8412dac53f2bb6f918e8b7777efba1787844/cryptography-50.0.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c5e67125c7dca78d199ec4e116aa93dbb83494808ecbb8211a2cb09b1bf41dbd", size = 4756166, upload-time = "2026-09-30T15:29:24.58Z" }, + { url = "https://files.pythonhosted.org/packages/bf/f1/1c1f6874e8550cfddd4b688ceb38cefb6ed15ceed224d56f133f3d88c214/cryptography-50.0.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ee247f5c245c9a2fe7c8e2214e295918838e44e00a45a6718451e4004219e767", size = 4749145, upload-time = "2026-09-30T15:29:26.807Z" }, + { url = "https://files.pythonhosted.org/packages/c1/63/61b15dc1a8de03fe0adbe3fd7608b3ad5c73bf50993bbcb1faaa930afe33/cryptography-50.0.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dfe9763530994147d9af1def057a5b9658b00e8f8fe8743d144d1e0911c2e454", size = 4763638, upload-time = "2026-09-30T15:29:28.588Z" }, + { url = "https://files.pythonhosted.org/packages/fc/35/b345bdfa40c9126df1a9d33236aa98418367931b8725f84fc3ae2b98dc59/cryptography-50.0.2-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:58ddb5a8e3179d12f19e4ea34d2d32e9d63a4baa142c875c1eb59f41b7243acd", size = 5382217, upload-time = "2026-09-30T15:29:30.589Z" }, + { url = "https://files.pythonhosted.org/packages/4f/87/ef344a9e616871f2519c22d6afcda79ddd5d35e9592d95eb6e677608d055/cryptography-50.0.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f21e8a22c8605750c7af886bab299a363721264061b4ac0a30efb73cfd58efc5", size = 4781387, upload-time = "2026-09-30T15:29:32.605Z" }, + { url = "https://files.pythonhosted.org/packages/90/5b/f2fdb13cd0b96f6f932c8627bb292a45f11c64d21620a8e120aee9a3b848/cryptography-50.0.2-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:9c8402a82ea0dc4ceeab793db05f0fafa8ca139ca34fcde5df0f596103c74107", size = 4403790, upload-time = "2026-09-30T15:29:34.374Z" }, + { url = "https://files.pythonhosted.org/packages/bc/ce/7e4f662b1e3c393513569e402cfc85ac7da0bd3d5435e122a3140219eb2d/cryptography-50.0.2-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:0ddc924c04591c2811ca024d62ecad4f7f6f08af8939c211438f48a16bd23602", size = 4764319, upload-time = "2026-09-30T15:29:36.149Z" }, + { url = "https://files.pythonhosted.org/packages/3c/3f/86ff33ce34cc0de6847fb96e035a1a760d81652e38643f617c02ad32ef7a/cryptography-50.0.2-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:a6557e5f38e065ca9fbdaf7cfc7435ecb1d113aa81a022d1b51921ee7432e227", size = 5338560, upload-time = "2026-09-30T15:29:39.053Z" }, + { url = "https://files.pythonhosted.org/packages/40/cf/6b5c8e2fd9202d98988ab7cb5cc5c991704c4ad55f492ff408e4969f83f1/cryptography-50.0.2-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:1981f1db4630889b9ef7803fadef12b056f428cb6b85c27ba57b774793b6093c", size = 4780973, upload-time = "2026-09-30T15:29:41.251Z" }, + { url = "https://files.pythonhosted.org/packages/10/bf/8d6ebc7dded797bd0f0160d52188021211f011a2b164ef0ae1dac4587465/cryptography-50.0.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:7a8701d6b584d76e909e3d305b7d126b41439876a5aaf76cddc67fc230eafa2e", size = 4897738, upload-time = "2026-09-30T15:29:43.106Z" }, + { url = "https://files.pythonhosted.org/packages/d4/aa/f3f6e0de7e6253b8baa8b2d8fb9d50924fa75cee3d4624bd4bc1208ee923/cryptography-50.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce47f66801c20ec6c6632453bb5960fe38939e9306970b48b3a5a26de7745d94", size = 5058280, upload-time = "2026-09-30T15:29:44.827Z" }, + { url = "https://files.pythonhosted.org/packages/f6/b6/a1faf3a27ae9405fb34b1713cc73b2d8a26b04d5c561578fa2e6ef3e5bb9/cryptography-50.0.2-cp39-abi3-win_amd64.whl", hash = "sha256:4e81d95e5bafc2d6e34e4bed780e53e4d5b9a2f928573428aa4d35fbec1eb0de", size = 3854095, upload-time = "2026-09-30T15:29:46.782Z" }, ] [[package]] name = "fastapi" version = "0.163.1" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-doc" }, { name = "anyio" }, @@ -172,205 +245,205 @@ dependencies = [ { name = "typing-extensions" }, { name = "typing-inspection" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/a4/62/19000d0f3699cacaeffe8a3c4cc7046d87aac3291163ffeb2ef08b82d859/fastapi-0.163.1.tar.gz", hash = "sha256:3d364b02a68b67292e833ff2dfed3b8dc3aeadf73e271c15316c6c166668792f" } +sdist = { url = "https://files.pythonhosted.org/packages/a4/62/19000d0f3699cacaeffe8a3c4cc7046d87aac3291163ffeb2ef08b82d859/fastapi-0.163.1.tar.gz", hash = "sha256:3d364b02a68b67292e833ff2dfed3b8dc3aeadf73e271c15316c6c166668792f", size = 544796, upload-time = "2026-11-15T09:51:31.271Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/20/b6/2424da1e40825d3fc54539621811f34e21472499677c9490e4967270e38e/fastapi-0.163.1-py3-none-any.whl", hash = "sha256:68f2d8050f5c3583121c0d203046cc7def5c16a7d6c43a0e7707a8ea610fe2d3" }, + { url = "https://files.pythonhosted.org/packages/20/b6/2424da1e40825d3fc54539621811f34e21472499677c9490e4967270e38e/fastapi-0.163.1-py3-none-any.whl", hash = "sha256:68f2d8050f5c3583121c0d203046cc7def5c16a7d6c43a0e7707a8ea610fe2d3", size = 154541, upload-time = "2026-11-15T09:51:29.726Z" }, ] [[package]] name = "greenlet" version = "3.5.6" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/3e/6e/0091f175ccd02b02bc8811bbcbcc6ac2e980be116e3b2f7a736ca322bf84/greenlet-3.5.6.tar.gz", hash = "sha256:8e67c43bdfc88d5fee6db0d3e40175b362fc95fb85f0412d233b9b203c53a575" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3e/6e/0091f175ccd02b02bc8811bbcbcc6ac2e980be116e3b2f7a736ca322bf84/greenlet-3.5.6.tar.gz", hash = "sha256:8e67c43bdfc88d5fee6db0d3e40175b362fc95fb85f0412d233b9b203c53a575", size = 207653, upload-time = "2026-09-14T15:42:51.806Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/72/18/3fc6d951466ae9a2a688edcddde3b2e388da0a8244e0caf7117bbeb0eb95/greenlet-3.5.6-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:a5876d0a60355af98d535c47f6cd6eb0f8a432396dab26845d380b92f8412422" }, - { url = "https://mirrors.aliyun.com/pypi/packages/27/89/366d2af5061eeefa5012f510d95a99c8620dcc457609838db4d538820318/greenlet-3.5.6-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e85880b538e59a59f55117b81f208a6660ad5ac328aad9305f812d9b8bc67a0f" }, - { url = "https://mirrors.aliyun.com/pypi/packages/54/1c/07f133f865fd58ae593dd2bbec3144acaee9b04ffe2eb48c6e121747ceef/greenlet-3.5.6-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f0ba7c2a329d650628f4c8572fd1db29f0a59dd70a3e3e0710dcf18a35cce9d8" }, - { url = "https://mirrors.aliyun.com/pypi/packages/66/6a/1594f3869c57c149abdb380492529e04d4c0229b5e4d79572c5bd0aaa673/greenlet-3.5.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:975736b002ed080d124cf81a79cb7e05cb26d6b3f5c7a7b651c0fcce70353aa1" }, - { url = "https://mirrors.aliyun.com/pypi/packages/a2/f5/33e5c9e48178b9259fd000f8f45caa4a65036f65d3d0c06a602f570f025d/greenlet-3.5.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0616b8f878098c5681fd8f0dc92d887551717402342a70f0abcbfea5f5ad8a44" }, - { url = "https://mirrors.aliyun.com/pypi/packages/ef/31/9b4e140bc24d0ad7927ebd651f5608b0acc2334d061748c3b6ad19085cfa/greenlet-3.5.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3dbb4596a6a4e5d47121a33ff20533a81e60f302d9e67b69909a8bc21a43f0a7" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c3/71/d79f1791f824f8ff15c2978746640467ae932a2365e0201069f7f272395f/greenlet-3.5.6-cp312-cp312-win_amd64.whl", hash = "sha256:7ac4abb3877c43af320392c664774eef6fa2cc063c79a55fc02d844a3cbe7395" }, - { url = "https://mirrors.aliyun.com/pypi/packages/63/af/42aca4d56e8cb321912203069d8d34734cb288222f10ad2ae102718cc577/greenlet-3.5.6-cp312-cp312-win_arm64.whl", hash = "sha256:301102a49120b095e72a7838792b41233975fc1c155daec6d98f81c00c9280e0" }, + { url = "https://files.pythonhosted.org/packages/72/18/3fc6d951466ae9a2a688edcddde3b2e388da0a8244e0caf7117bbeb0eb95/greenlet-3.5.6-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:a5876d0a60355af98d535c47f6cd6eb0f8a432396dab26845d380b92f8412422", size = 295668, upload-time = "2026-09-14T14:22:33.241Z" }, + { url = "https://files.pythonhosted.org/packages/27/89/366d2af5061eeefa5012f510d95a99c8620dcc457609838db4d538820318/greenlet-3.5.6-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e85880b538e59a59f55117b81f208a6660ad5ac328aad9305f812d9b8bc67a0f", size = 611700, upload-time = "2026-09-14T15:12:01.962Z" }, + { url = "https://files.pythonhosted.org/packages/54/1c/07f133f865fd58ae593dd2bbec3144acaee9b04ffe2eb48c6e121747ceef/greenlet-3.5.6-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f0ba7c2a329d650628f4c8572fd1db29f0a59dd70a3e3e0710dcf18a35cce9d8", size = 624223, upload-time = "2026-09-14T15:20:42.459Z" }, + { url = "https://files.pythonhosted.org/packages/66/6a/1594f3869c57c149abdb380492529e04d4c0229b5e4d79572c5bd0aaa673/greenlet-3.5.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:975736b002ed080d124cf81a79cb7e05cb26d6b3f5c7a7b651c0fcce70353aa1", size = 621404, upload-time = "2026-09-14T14:35:59.027Z" }, + { url = "https://files.pythonhosted.org/packages/a2/f5/33e5c9e48178b9259fd000f8f45caa4a65036f65d3d0c06a602f570f025d/greenlet-3.5.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0616b8f878098c5681fd8f0dc92d887551717402342a70f0abcbfea5f5ad8a44", size = 1584998, upload-time = "2026-09-14T15:10:06.653Z" }, + { url = "https://files.pythonhosted.org/packages/ef/31/9b4e140bc24d0ad7927ebd651f5608b0acc2334d061748c3b6ad19085cfa/greenlet-3.5.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3dbb4596a6a4e5d47121a33ff20533a81e60f302d9e67b69909a8bc21a43f0a7", size = 1647568, upload-time = "2026-09-14T14:35:49.787Z" }, + { url = "https://files.pythonhosted.org/packages/c3/71/d79f1791f824f8ff15c2978746640467ae932a2365e0201069f7f272395f/greenlet-3.5.6-cp312-cp312-win_amd64.whl", hash = "sha256:7ac4abb3877c43af320392c664774eef6fa2cc063c79a55fc02d844a3cbe7395", size = 324203, upload-time = "2026-09-14T14:22:54.504Z" }, + { url = "https://files.pythonhosted.org/packages/63/af/42aca4d56e8cb321912203069d8d34734cb288222f10ad2ae102718cc577/greenlet-3.5.6-cp312-cp312-win_arm64.whl", hash = "sha256:301102a49120b095e72a7838792b41233975fc1c155daec6d98f81c00c9280e0", size = 308310, upload-time = "2026-09-14T14:24:03.008Z" }, ] [[package]] name = "h11" version = "0.16.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86" }, + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, ] [[package]] name = "httpcore" version = "1.0.9" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "certifi" }, { name = "h11" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" } +sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55" }, + { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, ] [[package]] name = "httptools" version = "0.9.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/3a/ec/deed52912ab7ca6c0b12859330c571c60c61d7267b341b28951fcbf13694/httptools-0.9.0.tar.gz", hash = "sha256:d484ebb7e3a3f3597b0f645fbd1b85633674ca808c1f5ba11c2caf7c66f5c8b6" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/ec/deed52912ab7ca6c0b12859330c571c60c61d7267b341b28951fcbf13694/httptools-0.9.0.tar.gz", hash = "sha256:d484ebb7e3a3f3597b0f645fbd1b85633674ca808c1f5ba11c2caf7c66f5c8b6", size = 282523, upload-time = "2026-10-09T19:57:04.301Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/da/ed/0916b8b7ebd1deeaf22acba71b68c57b4b6b69aa1918f3812dea208b4276/httptools-0.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f9ccc9884241efceb4547a92955d128574c864681f11b7ea3ecbde295fafbe8b" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c2/0b/9b6de4a01a563a904d0826c9069c824b330e1816df26c9bdf93f60b50857/httptools-0.9.0-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:45b3002392948dcf578029c89f6318e1289a993a1a5ec38a4161560fab60f811" }, - { url = "https://mirrors.aliyun.com/pypi/packages/85/3f/642113e9882f53158ecddf58003d25f18ded2c210ed23bf6eb663d4d51c3/httptools-0.9.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:3e3201fe4d46e0d15d7ff9fafc94a605da9eb82d2c5b9837f0368acb325481f1" }, - { url = "https://mirrors.aliyun.com/pypi/packages/95/4c/3ecc59c99c28652d8d08d9b5be65770a14d2cadc616dad94224cee2b0e7e/httptools-0.9.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:58a1b0ec4cbb930e69669f9771715b2c7898d3cdf064d9811f7a66afef96b544" }, - { url = "https://mirrors.aliyun.com/pypi/packages/43/ce/21f5b2759590b7054e38d3b704a3c6b853c3395c370b3d6f16c45aea0fc0/httptools-0.9.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4c58dc91aefb31adad500aa68054334f429b840b36dd29e34e834101044cb2ef" }, - { url = "https://mirrors.aliyun.com/pypi/packages/52/c3/7c523aa8d0fa7a57010a3e1bbdebc209585009076465f3d1ae6a3f54b814/httptools-0.9.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6b900073e7b8481ef1aaf4f6c1789d210a1db01a9da8789821578cfeb4c2d540" }, - { url = "https://mirrors.aliyun.com/pypi/packages/94/e2/d90d60002692b8afcbc06fb49ca3a4365b32abed6c40fb2b612c67721a00/httptools-0.9.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6c12d0393a903b58bc5f5a7406d6c5290acfb8284290d68547ce620c06f7d133" }, - { url = "https://mirrors.aliyun.com/pypi/packages/46/c0/19172874cde0344a20c85877a0b2d0dcfca31111729ad8a79e8b4ac4e207/httptools-0.9.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:29b0d823e3c1e7cd1093a5dc889245db693ef13ada624cd66e2262421ef38867" }, - { url = "https://mirrors.aliyun.com/pypi/packages/1b/b8/02ea7910f69e5371986b025fb3b410592106df54e977a5732fd1d95917b5/httptools-0.9.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:6ebd39ee26db460cfe5ab8b71a15d1149b289139a0d3981522757d6af620887e" }, - { url = "https://mirrors.aliyun.com/pypi/packages/de/97/f05eac916d44cbbfe43668a6a40ab93e7fd8f94d5120d1ce2d8e55c69871/httptools-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4efbee349138a3fee7a4cc3a95abd2d499fae70dd5bff9fed9138d6f570f4283" }, - { url = "https://mirrors.aliyun.com/pypi/packages/b6/e9/9435dfcb7f1a1d6ebdc79a902164dfca70e33774c80bb60d25c630c31ef1/httptools-0.9.0-cp312-cp312-win32.whl", hash = "sha256:36fac804b8cfd6b935ae64f71349f833d2b6298404626d017a2c57bb942bc643" }, - { url = "https://mirrors.aliyun.com/pypi/packages/8b/69/813f1bf90be507d4166c437be1a413574d0e0abf36e2fec10c266661b0ee/httptools-0.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:7e32b83bd8c2f8b6fa726ef34e63e21c4d7eddc277d40d4ef7245ea3ed28e5b6" }, - { url = "https://mirrors.aliyun.com/pypi/packages/ae/e0/1d29e328c4cafe843403341e1455e0aec18b0e6910fbb14f12b36b563f19/httptools-0.9.0-cp312-cp312-win_arm64.whl", hash = "sha256:813a32f94991b9627795528053c73a57d2ce3eb98ede89f0e1c7a31095938e81" }, + { url = "https://files.pythonhosted.org/packages/da/ed/0916b8b7ebd1deeaf22acba71b68c57b4b6b69aa1918f3812dea208b4276/httptools-0.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f9ccc9884241efceb4547a92955d128574c864681f11b7ea3ecbde295fafbe8b", size = 119039, upload-time = "2026-10-09T19:54:32.556Z" }, + { url = "https://files.pythonhosted.org/packages/c2/0b/9b6de4a01a563a904d0826c9069c824b330e1816df26c9bdf93f60b50857/httptools-0.9.0-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:45b3002392948dcf578029c89f6318e1289a993a1a5ec38a4161560fab60f811", size = 115051, upload-time = "2026-10-09T19:54:33.908Z" }, + { url = "https://files.pythonhosted.org/packages/85/3f/642113e9882f53158ecddf58003d25f18ded2c210ed23bf6eb663d4d51c3/httptools-0.9.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:3e3201fe4d46e0d15d7ff9fafc94a605da9eb82d2c5b9837f0368acb325481f1", size = 552848, upload-time = "2026-10-09T19:54:35.434Z" }, + { url = "https://files.pythonhosted.org/packages/95/4c/3ecc59c99c28652d8d08d9b5be65770a14d2cadc616dad94224cee2b0e7e/httptools-0.9.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:58a1b0ec4cbb930e69669f9771715b2c7898d3cdf064d9811f7a66afef96b544", size = 549181, upload-time = "2026-10-09T19:54:37.099Z" }, + { url = "https://files.pythonhosted.org/packages/43/ce/21f5b2759590b7054e38d3b704a3c6b853c3395c370b3d6f16c45aea0fc0/httptools-0.9.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4c58dc91aefb31adad500aa68054334f429b840b36dd29e34e834101044cb2ef", size = 569121, upload-time = "2026-10-09T19:54:38.772Z" }, + { url = "https://files.pythonhosted.org/packages/52/c3/7c523aa8d0fa7a57010a3e1bbdebc209585009076465f3d1ae6a3f54b814/httptools-0.9.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6b900073e7b8481ef1aaf4f6c1789d210a1db01a9da8789821578cfeb4c2d540", size = 487649, upload-time = "2026-10-09T19:54:40.398Z" }, + { url = "https://files.pythonhosted.org/packages/94/e2/d90d60002692b8afcbc06fb49ca3a4365b32abed6c40fb2b612c67721a00/httptools-0.9.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6c12d0393a903b58bc5f5a7406d6c5290acfb8284290d68547ce620c06f7d133", size = 529583, upload-time = "2026-10-09T19:54:42.296Z" }, + { url = "https://files.pythonhosted.org/packages/46/c0/19172874cde0344a20c85877a0b2d0dcfca31111729ad8a79e8b4ac4e207/httptools-0.9.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:29b0d823e3c1e7cd1093a5dc889245db693ef13ada624cd66e2262421ef38867", size = 552414, upload-time = "2026-10-09T19:54:44.19Z" }, + { url = "https://files.pythonhosted.org/packages/1b/b8/02ea7910f69e5371986b025fb3b410592106df54e977a5732fd1d95917b5/httptools-0.9.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:6ebd39ee26db460cfe5ab8b71a15d1149b289139a0d3981522757d6af620887e", size = 482400, upload-time = "2026-10-09T19:54:46.064Z" }, + { url = "https://files.pythonhosted.org/packages/de/97/f05eac916d44cbbfe43668a6a40ab93e7fd8f94d5120d1ce2d8e55c69871/httptools-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4efbee349138a3fee7a4cc3a95abd2d499fae70dd5bff9fed9138d6f570f4283", size = 536148, upload-time = "2026-10-09T19:54:47.695Z" }, + { url = "https://files.pythonhosted.org/packages/b6/e9/9435dfcb7f1a1d6ebdc79a902164dfca70e33774c80bb60d25c630c31ef1/httptools-0.9.0-cp312-cp312-win32.whl", hash = "sha256:36fac804b8cfd6b935ae64f71349f833d2b6298404626d017a2c57bb942bc643", size = 86274, upload-time = "2026-10-09T19:54:49.1Z" }, + { url = "https://files.pythonhosted.org/packages/8b/69/813f1bf90be507d4166c437be1a413574d0e0abf36e2fec10c266661b0ee/httptools-0.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:7e32b83bd8c2f8b6fa726ef34e63e21c4d7eddc277d40d4ef7245ea3ed28e5b6", size = 92446, upload-time = "2026-10-09T19:54:50.498Z" }, + { url = "https://files.pythonhosted.org/packages/ae/e0/1d29e328c4cafe843403341e1455e0aec18b0e6910fbb14f12b36b563f19/httptools-0.9.0-cp312-cp312-win_arm64.whl", hash = "sha256:813a32f94991b9627795528053c73a57d2ce3eb98ede89f0e1c7a31095938e81", size = 88676, upload-time = "2026-10-09T19:54:51.844Z" }, ] [[package]] name = "httpx" version = "0.28.1" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, { name = "certifi" }, { name = "httpcore" }, { name = "idna" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" } +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad" }, + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, ] [[package]] name = "idna" version = "3.20" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c" }, + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, ] [[package]] name = "iniconfig" version = "2.3.1" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209, upload-time = "2026-10-06T22:48:38.076Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7" }, + { url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552, upload-time = "2026-10-06T22:48:36.959Z" }, ] [[package]] name = "kombu" version = "5.7.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "amqp" }, { name = "tzdata", marker = "sys_platform == 'win32'" }, { name = "vine" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/57/31/3e632ebce43c684dcc6eead4660b33307e6153be87e33c14e1ed9875deff/kombu-5.7.0.tar.gz", hash = "sha256:31e62fdfd2381caa3422f8e02b84a491d9a2180ddda74507b57f4cb1e1c2c2c9" } +sdist = { url = "https://files.pythonhosted.org/packages/57/31/3e632ebce43c684dcc6eead4660b33307e6153be87e33c14e1ed9875deff/kombu-5.7.0.tar.gz", hash = "sha256:31e62fdfd2381caa3422f8e02b84a491d9a2180ddda74507b57f4cb1e1c2c2c9", size = 627051, upload-time = "2026-11-03T05:58:33.446Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/84/20/f73d8e0bff9708b0f2337220be1b5d7ebd738bc3a89b63cf44d257157014/kombu-5.7.0-py3-none-any.whl", hash = "sha256:dede73bff4c89175be382c4203d2f167cf7017c384396ec75c36a1b5678f1587" }, + { url = "https://files.pythonhosted.org/packages/84/20/f73d8e0bff9708b0f2337220be1b5d7ebd738bc3a89b63cf44d257157014/kombu-5.7.0-py3-none-any.whl", hash = "sha256:dede73bff4c89175be382c4203d2f167cf7017c384396ec75c36a1b5678f1587", size = 266635, upload-time = "2026-11-03T05:58:31.475Z" }, ] [[package]] name = "mako" version = "1.4.3" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/5a/09/e07c4b5579a79f4b16f8d4f29f6c54514ac787c4ad506b8c4f28a0e6b0bf/mako-1.4.3.tar.gz", hash = "sha256:cd6537fe88d5fec315c55c2f8529bc4ce7a9a352ad7db3eeaa6a66e2dd4ec37a" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/09/e07c4b5579a79f4b16f8d4f29f6c54514ac787c4ad506b8c4f28a0e6b0bf/mako-1.4.3.tar.gz", hash = "sha256:cd6537fe88d5fec315c55c2f8529bc4ce7a9a352ad7db3eeaa6a66e2dd4ec37a", size = 412799, upload-time = "2026-09-22T20:54:31.509Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/6d/a0/053d6af3e8f871e0073b4a36732d9e65be77a72e5434c31b94f6af78a6bb/mako-1.4.3-py3-none-any.whl", hash = "sha256:723296007c870bfd6b3f0c3230dba7198096e5269297ebf5e4eff9e7ffa39d4f" }, + { url = "https://files.pythonhosted.org/packages/6d/a0/053d6af3e8f871e0073b4a36732d9e65be77a72e5434c31b94f6af78a6bb/mako-1.4.3-py3-none-any.whl", hash = "sha256:723296007c870bfd6b3f0c3230dba7198096e5269297ebf5e4eff9e7ffa39d4f", size = 80164, upload-time = "2026-09-22T20:54:33.128Z" }, ] [[package]] name = "markupsafe" version = "3.0.4" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/81/09/4c59d56b8461ae8eb0d8ba34bb25b7e618547044679d58a82ef9b2479fc1/markupsafe-3.0.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6" }, - { url = "https://mirrors.aliyun.com/pypi/packages/a2/f0/d6613774d86fbf6d145751d43c59875e47a6f9f17daee0aef173bd36d90e/markupsafe-3.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f" }, - { url = "https://mirrors.aliyun.com/pypi/packages/0d/f2/8f18e0b806eb13c1f8d07d917a720831ead54253a6dec011fbc78098a6f8/markupsafe-3.0.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b" }, - { url = "https://mirrors.aliyun.com/pypi/packages/60/ce/fa07dbe8a5675558fa36dea033e19995bc783de2dec5f540ccb9030b06aa/markupsafe-3.0.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df" }, - { url = "https://mirrors.aliyun.com/pypi/packages/85/40/be87c01f3868ec217f8a2015089d71c22c8c5a75324822e5ed1cdd87210d/markupsafe-3.0.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c" }, - { url = "https://mirrors.aliyun.com/pypi/packages/4f/a7/aeedb5140afa41fc74c225e9184ab96723a6e873b6ee1c9fede7283456d8/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c3/fc/e91352bb08c6a59da3ef0909d457bf95a5f5908fbf151b30a06d9dbcfbb4/markupsafe-3.0.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77" }, - { url = "https://mirrors.aliyun.com/pypi/packages/5d/f8/bffee5e7d2a3deb59748a797650a48af7e672025cf641a79344a771ad106/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c" }, - { url = "https://mirrors.aliyun.com/pypi/packages/ed/59/b853d6628ecb4d658e1d637224846d5e9bb4adf4f8df97f3be9f29dce2ec/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749" }, - { url = "https://mirrors.aliyun.com/pypi/packages/09/b2/1506df394f0f075797c418d0301498f49e43be194e3ffcb49e6fe6ccf022/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c7/81/5ed69cda630ac69ef60d06c09ba5a7f84ff66a2e28cf986fd5614ab3c6e6/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786" }, - { url = "https://mirrors.aliyun.com/pypi/packages/0c/fe/fb1e79be0fea60aa32602ebefc9c35a82bb42b4df157285ab7dfec12341a/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c8/52/7632a53360671a9b750cdbabaf9cdd89f18b42248b8e4cb42c0b0296e459/markupsafe-3.0.4-cp312-cp312-win32.whl", hash = "sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237" }, - { url = "https://mirrors.aliyun.com/pypi/packages/3f/bf/62495e180b7000aaf30000fff849e933f74264638057176cf46852500adc/markupsafe-3.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c5/8e/4c24208776a65878d656996945aacfbfe010d3720d1a98fc0eb8491fc03b/markupsafe-3.0.4-cp312-cp312-win_arm64.whl", hash = "sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9" }, + { url = "https://files.pythonhosted.org/packages/81/09/4c59d56b8461ae8eb0d8ba34bb25b7e618547044679d58a82ef9b2479fc1/markupsafe-3.0.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6", size = 11658, upload-time = "2026-10-02T23:04:51.876Z" }, + { url = "https://files.pythonhosted.org/packages/a2/f0/d6613774d86fbf6d145751d43c59875e47a6f9f17daee0aef173bd36d90e/markupsafe-3.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f", size = 12050, upload-time = "2026-10-02T23:04:52.931Z" }, + { url = "https://files.pythonhosted.org/packages/0d/f2/8f18e0b806eb13c1f8d07d917a720831ead54253a6dec011fbc78098a6f8/markupsafe-3.0.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b", size = 24363, upload-time = "2026-10-02T23:04:53.895Z" }, + { url = "https://files.pythonhosted.org/packages/60/ce/fa07dbe8a5675558fa36dea033e19995bc783de2dec5f540ccb9030b06aa/markupsafe-3.0.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df", size = 28525, upload-time = "2026-10-02T23:04:54.905Z" }, + { url = "https://files.pythonhosted.org/packages/85/40/be87c01f3868ec217f8a2015089d71c22c8c5a75324822e5ed1cdd87210d/markupsafe-3.0.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c", size = 24733, upload-time = "2026-10-02T23:04:56.229Z" }, + { url = "https://files.pythonhosted.org/packages/4f/a7/aeedb5140afa41fc74c225e9184ab96723a6e873b6ee1c9fede7283456d8/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581", size = 22985, upload-time = "2026-10-02T23:04:57.521Z" }, + { url = "https://files.pythonhosted.org/packages/c3/fc/e91352bb08c6a59da3ef0909d457bf95a5f5908fbf151b30a06d9dbcfbb4/markupsafe-3.0.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77", size = 22001, upload-time = "2026-10-02T23:04:58.597Z" }, + { url = "https://files.pythonhosted.org/packages/5d/f8/bffee5e7d2a3deb59748a797650a48af7e672025cf641a79344a771ad106/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c", size = 23793, upload-time = "2026-10-02T23:04:59.686Z" }, + { url = "https://files.pythonhosted.org/packages/ed/59/b853d6628ecb4d658e1d637224846d5e9bb4adf4f8df97f3be9f29dce2ec/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749", size = 22640, upload-time = "2026-10-02T23:05:00.768Z" }, + { url = "https://files.pythonhosted.org/packages/09/b2/1506df394f0f075797c418d0301498f49e43be194e3ffcb49e6fe6ccf022/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed", size = 24074, upload-time = "2026-10-02T23:05:01.813Z" }, + { url = "https://files.pythonhosted.org/packages/c7/81/5ed69cda630ac69ef60d06c09ba5a7f84ff66a2e28cf986fd5614ab3c6e6/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786", size = 21563, upload-time = "2026-10-02T23:05:03.239Z" }, + { url = "https://files.pythonhosted.org/packages/0c/fe/fb1e79be0fea60aa32602ebefc9c35a82bb42b4df157285ab7dfec12341a/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e", size = 23048, upload-time = "2026-10-02T23:05:04.479Z" }, + { url = "https://files.pythonhosted.org/packages/c8/52/7632a53360671a9b750cdbabaf9cdd89f18b42248b8e4cb42c0b0296e459/markupsafe-3.0.4-cp312-cp312-win32.whl", hash = "sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237", size = 14108, upload-time = "2026-10-02T23:05:05.513Z" }, + { url = "https://files.pythonhosted.org/packages/3f/bf/62495e180b7000aaf30000fff849e933f74264638057176cf46852500adc/markupsafe-3.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7", size = 14303, upload-time = "2026-10-02T23:05:06.538Z" }, + { url = "https://files.pythonhosted.org/packages/c5/8e/4c24208776a65878d656996945aacfbfe010d3720d1a98fc0eb8491fc03b/markupsafe-3.0.4-cp312-cp312-win_arm64.whl", hash = "sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9", size = 14174, upload-time = "2026-10-02T23:05:07.617Z" }, ] [[package]] name = "opentelemetry-api" version = "1.45.2" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/19/14/cf3a6b6448849656e1e5f4e2101f3988dc6789724050096aba1bc5ccf592/opentelemetry_api-1.45.2.tar.gz", hash = "sha256:d7b0008e21e5fd61cbe7a7f34ca3b6905a78ab677d9bc395e299359c75cda6b4" } +sdist = { url = "https://files.pythonhosted.org/packages/19/14/cf3a6b6448849656e1e5f4e2101f3988dc6789724050096aba1bc5ccf592/opentelemetry_api-1.45.2.tar.gz", hash = "sha256:d7b0008e21e5fd61cbe7a7f34ca3b6905a78ab677d9bc395e299359c75cda6b4", size = 73277, upload-time = "2026-10-29T17:29:37.888Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/a9/2d/610db864d7513158cebb8f36cc88e67e73bd6c7aa1905ef18d89e1281c81/opentelemetry_api-1.45.2-py3-none-any.whl", hash = "sha256:2cbd737377e710ee740d261c94e93fa0f08e6d037c18f17513cc0a2d94479a34" }, + { url = "https://files.pythonhosted.org/packages/a9/2d/610db864d7513158cebb8f36cc88e67e73bd6c7aa1905ef18d89e1281c81/opentelemetry_api-1.45.2-py3-none-any.whl", hash = "sha256:2cbd737377e710ee740d261c94e93fa0f08e6d037c18f17513cc0a2d94479a34", size = 60335, upload-time = "2026-10-29T17:29:06.955Z" }, ] [[package]] name = "packaging" version = "26.3" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c" }, + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, ] [[package]] name = "pluggy" version = "1.7.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/bf/db/7fc19e6f2dc92a966727031389fc2e08b558f0f25eb7403c1119ad4713cd/pluggy-1.7.0.tar.gz", hash = "sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bf/db/7fc19e6f2dc92a966727031389fc2e08b558f0f25eb7403c1119ad4713cd/pluggy-1.7.0.tar.gz", hash = "sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8", size = 123304, upload-time = "2026-10-15T09:50:58.343Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/40/9e/2b38731e0fc536806f16490e1a12d7f0dc2a1235aa8cc07bcc75416a7daa/pluggy-1.7.0-py3-none-any.whl", hash = "sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec" }, + { url = "https://files.pythonhosted.org/packages/40/9e/2b38731e0fc536806f16490e1a12d7f0dc2a1235aa8cc07bcc75416a7daa/pluggy-1.7.0-py3-none-any.whl", hash = "sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec", size = 27082, upload-time = "2026-10-15T09:50:56.808Z" }, ] [[package]] name = "prompt-toolkit" version = "3.0.53" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "wcwidth" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/7d/ea/39b988c938f75cb75d7045b5c69f8bfed47ee2152c8837fb403de29d6fb8/prompt_toolkit-3.0.53.tar.gz", hash = "sha256:9ec8a0ad96d5c56148b3f914aa79c1564c3fde5d2e6b876e7bc327e353cf8fa6" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/ea/39b988c938f75cb75d7045b5c69f8bfed47ee2152c8837fb403de29d6fb8/prompt_toolkit-3.0.53.tar.gz", hash = "sha256:9ec8a0ad96d5c56148b3f914aa79c1564c3fde5d2e6b876e7bc327e353cf8fa6", size = 435492, upload-time = "2026-07-26T20:56:14.758Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/54/6f/84908cad2d6aa5144abcf7b42709fe4fdb459bc640ec7ac5786e7693dabc/prompt_toolkit-3.0.53-py3-none-any.whl", hash = "sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2" }, + { url = "https://files.pythonhosted.org/packages/54/6f/84908cad2d6aa5144abcf7b42709fe4fdb459bc640ec7ac5786e7693dabc/prompt_toolkit-3.0.53-py3-none-any.whl", hash = "sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2", size = 392288, upload-time = "2026-07-26T20:56:12.512Z" }, ] [[package]] name = "psycopg" version = "3.3.9" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, { name = "tzdata", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/b4/74/ff710399dfa9fe9b546c2f5a05ea2f9b9d1dc2145c0b59e53a3fa2013679/psycopg-3.3.9.tar.gz", hash = "sha256:87c1d85c3e0e88e811d3c0b3808f947bd967c6faf34af6cd86fd021f77793d6c" } +sdist = { url = "https://files.pythonhosted.org/packages/b4/74/ff710399dfa9fe9b546c2f5a05ea2f9b9d1dc2145c0b59e53a3fa2013679/psycopg-3.3.9.tar.gz", hash = "sha256:87c1d85c3e0e88e811d3c0b3808f947bd967c6faf34af6cd86fd021f77793d6c", size = 171122, upload-time = "2026-11-12T09:04:06.548Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/52/5d/a7957d1b5484f8e5094a15b1a400929324f978b670bd4a95179e1a012ec2/psycopg-3.3.9-py3-none-any.whl", hash = "sha256:d2d7d04a1ce6dab4f5b27316bea3b52585cafa2f2d631e5b09dd69823f5c26f6" }, + { url = "https://files.pythonhosted.org/packages/52/5d/a7957d1b5484f8e5094a15b1a400929324f978b670bd4a95179e1a012ec2/psycopg-3.3.9-py3-none-any.whl", hash = "sha256:d2d7d04a1ce6dab4f5b27316bea3b52585cafa2f2d631e5b09dd69823f5c26f6", size = 219041, upload-time = "2026-11-12T08:58:18.454Z" }, ] [package.optional-dependencies] @@ -381,94 +454,117 @@ binary = [ [[package]] name = "psycopg-binary" version = "3.3.9" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/6e/0c/7fc92c3135ce195bb86052d18f9ef5f64b1592d8f3a5f1d90e9b49c72448/psycopg_binary-3.3.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fcdb76adaab57fdd5b789b13b20699bffaf17000a4bbc0527327581cfdd55e3d" }, - { url = "https://mirrors.aliyun.com/pypi/packages/f0/a4/e62d11a85fc1a3a49f95b308bd5e2299dfc11125ef87043f6dfc29297d0c/psycopg_binary-3.3.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:08689018e9169ca8e6769f5b3f2ce748442bda95b5f1ec260995a8ff63e6d6a4" }, - { url = "https://mirrors.aliyun.com/pypi/packages/4a/89/d9ca02dfe30a6dc51e7796617dd69cc5c2e66bcc89ced44df4f4a3b5e402/psycopg_binary-3.3.9-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e7e2e3543ac17cf5bb3eaf738606fc52bcedf993500b9fc8c55a4475a3731ef9" }, - { url = "https://mirrors.aliyun.com/pypi/packages/4d/aa/f1b6e1cd71aeafa78ab33875adf0339818fe014cde197a1c0c7c419dd0b0/psycopg_binary-3.3.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a99f0b9a19ed7a56bf5d6776456b8f15f5364db8853b0f5d184db394a45c391d" }, - { url = "https://mirrors.aliyun.com/pypi/packages/ae/fe/9e967bfacdda0fef48fee1d869b13de016d82d846a805745b0985ac94a5b/psycopg_binary-3.3.9-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b081348d8992af26e9b252f04876c286428418a6b7845d8d4caae2044b259668" }, - { url = "https://mirrors.aliyun.com/pypi/packages/cb/b3/c6a9f0bca0fdb06cf408235b698710f400a1d6376ab77e5fec887115aaa5/psycopg_binary-3.3.9-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:66b20619acbd434e4e46d734a915768a1192db09754c2ad041d391d72f30e5eb" }, - { url = "https://mirrors.aliyun.com/pypi/packages/61/24/0443e50d382d3f6dcc03530560e02a02646af6bd8fcbd5a60add68c80208/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b7c4b2039d82f635311e41e7d392ff1bddd94a2447f9668c6531489cc86a8ce2" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c5/18/e576c5f50f4751ad9f1770134ad57ef216d00e5d79caa1c5b091f41275dc/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3efe96cd98081b755ee3b0a50f2d35d9af55cb1ba462440a41048b9e7c6b9caa" }, - { url = "https://mirrors.aliyun.com/pypi/packages/cb/c6/434e01b19af141540147427675c116b2205ea58e3ec99e26431edf2d0714/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:80ce081d2512ced75f1ca08ff80257a1288a3555079c5fa622164a0f9ed6533a" }, - { url = "https://mirrors.aliyun.com/pypi/packages/eb/84/0ea715e106cc80a89aca36e34dd6685fa1ee75da9546d41a1d87356efb9f/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:30a95cb2b00b94b4ec4fd5d41de047598c60e0db26fd43bd9154152cc380b282" }, - { url = "https://mirrors.aliyun.com/pypi/packages/81/a7/afe5fe01b4100454ea6543ac84c8b38a3713d6f27790253798ba50f2ef2a/psycopg_binary-3.3.9-cp312-cp312-win_amd64.whl", hash = "sha256:1ce1a6f04211626ca1a3deadee560235e8686e3888fb18f78d2be3e83bceabc4" }, + { url = "https://files.pythonhosted.org/packages/6e/0c/7fc92c3135ce195bb86052d18f9ef5f64b1592d8f3a5f1d90e9b49c72448/psycopg_binary-3.3.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fcdb76adaab57fdd5b789b13b20699bffaf17000a4bbc0527327581cfdd55e3d", size = 4048935, upload-time = "2026-11-12T09:00:08.958Z" }, + { url = "https://files.pythonhosted.org/packages/f0/a4/e62d11a85fc1a3a49f95b308bd5e2299dfc11125ef87043f6dfc29297d0c/psycopg_binary-3.3.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:08689018e9169ca8e6769f5b3f2ce748442bda95b5f1ec260995a8ff63e6d6a4", size = 4111565, upload-time = "2026-11-12T09:00:14.788Z" }, + { url = "https://files.pythonhosted.org/packages/4a/89/d9ca02dfe30a6dc51e7796617dd69cc5c2e66bcc89ced44df4f4a3b5e402/psycopg_binary-3.3.9-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e7e2e3543ac17cf5bb3eaf738606fc52bcedf993500b9fc8c55a4475a3731ef9", size = 4207484, upload-time = "2026-11-12T09:00:23.781Z" }, + { url = "https://files.pythonhosted.org/packages/4d/aa/f1b6e1cd71aeafa78ab33875adf0339818fe014cde197a1c0c7c419dd0b0/psycopg_binary-3.3.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a99f0b9a19ed7a56bf5d6776456b8f15f5364db8853b0f5d184db394a45c391d", size = 3913036, upload-time = "2026-11-12T09:00:30.144Z" }, + { url = "https://files.pythonhosted.org/packages/ae/fe/9e967bfacdda0fef48fee1d869b13de016d82d846a805745b0985ac94a5b/psycopg_binary-3.3.9-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b081348d8992af26e9b252f04876c286428418a6b7845d8d4caae2044b259668", size = 4132657, upload-time = "2026-11-12T09:00:34.401Z" }, + { url = "https://files.pythonhosted.org/packages/cb/b3/c6a9f0bca0fdb06cf408235b698710f400a1d6376ab77e5fec887115aaa5/psycopg_binary-3.3.9-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:66b20619acbd434e4e46d734a915768a1192db09754c2ad041d391d72f30e5eb", size = 3545187, upload-time = "2026-11-12T09:00:38.595Z" }, + { url = "https://files.pythonhosted.org/packages/61/24/0443e50d382d3f6dcc03530560e02a02646af6bd8fcbd5a60add68c80208/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b7c4b2039d82f635311e41e7d392ff1bddd94a2447f9668c6531489cc86a8ce2", size = 3897551, upload-time = "2026-11-12T09:00:43.769Z" }, + { url = "https://files.pythonhosted.org/packages/c5/18/e576c5f50f4751ad9f1770134ad57ef216d00e5d79caa1c5b091f41275dc/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3efe96cd98081b755ee3b0a50f2d35d9af55cb1ba462440a41048b9e7c6b9caa", size = 3577016, upload-time = "2026-11-12T09:00:49.375Z" }, + { url = "https://files.pythonhosted.org/packages/cb/c6/434e01b19af141540147427675c116b2205ea58e3ec99e26431edf2d0714/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:80ce081d2512ced75f1ca08ff80257a1288a3555079c5fa622164a0f9ed6533a", size = 3305336, upload-time = "2026-11-12T09:00:55.531Z" }, + { url = "https://files.pythonhosted.org/packages/eb/84/0ea715e106cc80a89aca36e34dd6685fa1ee75da9546d41a1d87356efb9f/psycopg_binary-3.3.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:30a95cb2b00b94b4ec4fd5d41de047598c60e0db26fd43bd9154152cc380b282", size = 3620366, upload-time = "2026-11-12T09:01:01.033Z" }, + { url = "https://files.pythonhosted.org/packages/81/a7/afe5fe01b4100454ea6543ac84c8b38a3713d6f27790253798ba50f2ef2a/psycopg_binary-3.3.9-cp312-cp312-win_amd64.whl", hash = "sha256:1ce1a6f04211626ca1a3deadee560235e8686e3888fb18f78d2be3e83bceabc4", size = 2907832, upload-time = "2026-11-12T09:01:04.735Z" }, +] + +[[package]] +name = "pycparser" +version = "3.12" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cb/27/eeb9f307bf07060f3d9f9aa0fb8c15b01bdfded0a941e4b2719c7f94cacd/pycparser-3.12.tar.gz", hash = "sha256:f03387877eab82ce01bbdfd0ba7252ee55a90b1c708d5129e2ce915475cf1db6", size = 158785, upload-time = "2026-10-22T13:40:03.56Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b6/ae/315bbeee126a769cbde43cf4908acb4b40408d8bf8bbf334dd7368d8dadf/pycparser-3.12-py3-none-any.whl", hash = "sha256:a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e", size = 62600, upload-time = "2026-10-22T13:40:02.021Z" }, ] [[package]] name = "pydantic" version = "2.14.3" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-types" }, { name = "pydantic-core" }, { name = "typing-extensions" }, { name = "typing-inspection" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/b4/fc/1203d011145c98ddce3cd2f505bb54375ef8d43223053df6bfcf3c746f46/pydantic-2.14.3.tar.gz", hash = "sha256:1054f237f4d4733e5a30e1e2333bd33a2004ab9ab1510bd053a9a31bb48e232d" } +sdist = { url = "https://files.pythonhosted.org/packages/b4/fc/1203d011145c98ddce3cd2f505bb54375ef8d43223053df6bfcf3c746f46/pydantic-2.14.3.tar.gz", hash = "sha256:1054f237f4d4733e5a30e1e2333bd33a2004ab9ab1510bd053a9a31bb48e232d", size = 925636, upload-time = "2026-11-05T09:17:04.686Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/72/b8/b864503789ef5c58597d2a7b4adbee62c26440ab1e682581fc6838df8947/pydantic-2.14.3-py3-none-any.whl", hash = "sha256:3f7b347782ab7e4cf4c798496ae3a82787d9f21ec12676a9c564355eeef8daa8" }, + { url = "https://files.pythonhosted.org/packages/72/b8/b864503789ef5c58597d2a7b4adbee62c26440ab1e682581fc6838df8947/pydantic-2.14.3-py3-none-any.whl", hash = "sha256:3f7b347782ab7e4cf4c798496ae3a82787d9f21ec12676a9c564355eeef8daa8", size = 494071, upload-time = "2026-11-05T09:17:02.426Z" }, ] [[package]] name = "pydantic-core" version = "2.50.4" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/9c/0f/34f9ce4ba701dd0b815033ef94d99b56f66200e578ee6052aa3ac26f064e/pydantic_core-2.50.4.tar.gz", hash = "sha256:aead3b74b68396bf0feab5d57e050b730ded7df55853c1e048a87e00aaf033c6" } +sdist = { url = "https://files.pythonhosted.org/packages/9c/0f/34f9ce4ba701dd0b815033ef94d99b56f66200e578ee6052aa3ac26f064e/pydantic_core-2.50.4.tar.gz", hash = "sha256:aead3b74b68396bf0feab5d57e050b730ded7df55853c1e048a87e00aaf033c6", size = 522249, upload-time = "2026-11-05T09:15:26.774Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/10/bf/d1f6b81709538f831ebe1c42f50fb89db3dfda06f9e9b1ea24e90fc69209/pydantic_core-2.50.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:32a991aebd165f227b7c7c60bb9d66c2c7de9c24308552da264c9938fde0f8d6" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c1/39/6618e541658d5a687a8d4962fc304350073a8f322bc4c62e8ed4c2d514d6/pydantic_core-2.50.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e20cbde2b6deb33a51d08cd168454dd9044ec7d4474056f4d98d63f51578783" }, - { url = "https://mirrors.aliyun.com/pypi/packages/d9/54/1c941fffa4e14bfc9ab0cd4977075f0e03201447856130d08a33cd45e47b/pydantic_core-2.50.4-cp312-cp312-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:8cceae48ae7f94990c2f4e36291e9ec9868735e8b0f19e4489a17b0422338466" }, - { url = "https://mirrors.aliyun.com/pypi/packages/61/a0/8028ef3e014be522ce43060aeac82a5be2288215e660866f5e6260acc123/pydantic_core-2.50.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:16902a147b3da4840612164a5e67947104d63e978f7a57c395877a5e26690b9c" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c3/f2/b98bb73b1734ec4e42e786a766abc24f3c89620a0ddbaf8aa14e4b4c628c/pydantic_core-2.50.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:d6e3485a5e5c01fb5339c1ee3d4b9e21e2135a2a9d44caafb71acd994487ee7c" }, - { url = "https://mirrors.aliyun.com/pypi/packages/f1/d1/7a7142786781400143e8806633fe5b65e2d407c311041fc9494490f05b18/pydantic_core-2.50.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:629eae995185540406e3635df5d5cf1d44f19ea240840b835d3f44541ff694d8" }, - { url = "https://mirrors.aliyun.com/pypi/packages/b5/34/cf710ca48d4498b04a3ea605d45892675dc2b14a94a25121a8d03f56d3e9/pydantic_core-2.50.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:41b2cd8b29dbb5a4c9828a70f50d1abfc92011115c813213d3a91205c6f731b3" }, - { url = "https://mirrors.aliyun.com/pypi/packages/91/23/e0c6e3cd09a0ac809953fea698c816b9f03bf0b35b6820c9553e4f5d85a8/pydantic_core-2.50.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c81d98e27d9d9261909dcccab1ba5d6ea1c98b0bb9470e368604614fd1d36ddd" }, - { url = "https://mirrors.aliyun.com/pypi/packages/f9/00/292a0ed96d5d2d6edb49468ef481336e5b7e54f13435d73b7c912c891c23/pydantic_core-2.50.4-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:ca83a32b2b41653d89f09a3d22b770bca96da72273bef8f7a68136bdd1e8b823" }, - { url = "https://mirrors.aliyun.com/pypi/packages/f8/36/d4690faf8c082eacf7754e52ab6bebe1bc73b167272e28699c00480ee908/pydantic_core-2.50.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:817953730e4a73a09008b010c4a42396cefe799616a22df2ac21d3927b3080cf" }, - { url = "https://mirrors.aliyun.com/pypi/packages/21/17/b180af6d17cf6c8e0d3d2661fc501a4a40959744ca4947d6ad0db81b1416/pydantic_core-2.50.4-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:664e74848c2f5fc27db8505fe24e1ecd3ac669412913bf73d176916f86cc08e2" }, - { url = "https://mirrors.aliyun.com/pypi/packages/6e/bb/7e44d4ac6e1292f1859384c688713045bdf5448e0635c49c003d2be3bb6c/pydantic_core-2.50.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:219114f8dcdcbe4720d82ef016b1287ce5a0a67d7c69ca61524eb72e82aac344" }, - { url = "https://mirrors.aliyun.com/pypi/packages/d8/84/5101f35294579c4bef7dc32fd4f097d91eedac2e195894266bdabc1e6dfd/pydantic_core-2.50.4-cp312-cp312-win32.whl", hash = "sha256:67f7cc397e1d5556a801d1cba74de0d27d827eb242e6c036c0ca273c745414f1" }, - { url = "https://mirrors.aliyun.com/pypi/packages/82/88/d438a8fcf3738e9ff2670f724047ca3893ec899bcd5cdfc077a2aab133c6/pydantic_core-2.50.4-cp312-cp312-win_amd64.whl", hash = "sha256:ea2f61b0bc12f3592288503961b764579dea0658852d96a0b3d823614d808821" }, - { url = "https://mirrors.aliyun.com/pypi/packages/77/d4/4a0c73dc3ef9e50b122b8c3527afcded15a44838f1c9668d2d4b72cc09f0/pydantic_core-2.50.4-cp312-cp312-win_arm64.whl", hash = "sha256:32d6dda86383645ec428ea64dfc277036f5cbc60a72238eab28b91a3fdb9a113" }, - { url = "https://mirrors.aliyun.com/pypi/packages/9a/18/2f6a25e9104d5af713d16671711927601da1f0db74e785be67bd590385c9/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:c04e9d920e2674f54651fd260a15c5d2843526c73d5242ee4311325ddc9573b3" }, - { url = "https://mirrors.aliyun.com/pypi/packages/4c/1b/ba8b721af10a7659e7fbbef320ff8eb55462557a72607858af5a9bd22cb1/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:5bc1811ef2b4d4ba63e8e452f6e332b6374bd1d2cbbfdf66826c8cb1f71dd10d" }, - { url = "https://mirrors.aliyun.com/pypi/packages/48/42/3f8638e7d90bdd9a7c7f3e5084723af59e7f43f15a292e242d35624073ce/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0b059a7968b1911be5a2d9a8234827ab0bef9d1e465d4b42da525894143550e8" }, - { url = "https://mirrors.aliyun.com/pypi/packages/e0/8d/4bfbacaf191f7939893d165e18eb301731fa3366c59a6e57336c4f168fbd/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bee28aab5a580eec673f7b68dfa8dece3dd37bd207ef8d22fafe23a8e9837296" }, + { url = "https://files.pythonhosted.org/packages/10/bf/d1f6b81709538f831ebe1c42f50fb89db3dfda06f9e9b1ea24e90fc69209/pydantic_core-2.50.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:32a991aebd165f227b7c7c60bb9d66c2c7de9c24308552da264c9938fde0f8d6", size = 2231444, upload-time = "2026-11-05T09:12:06.969Z" }, + { url = "https://files.pythonhosted.org/packages/c1/39/6618e541658d5a687a8d4962fc304350073a8f322bc4c62e8ed4c2d514d6/pydantic_core-2.50.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e20cbde2b6deb33a51d08cd168454dd9044ec7d4474056f4d98d63f51578783", size = 2108048, upload-time = "2026-11-05T09:12:08.85Z" }, + { url = "https://files.pythonhosted.org/packages/d9/54/1c941fffa4e14bfc9ab0cd4977075f0e03201447856130d08a33cd45e47b/pydantic_core-2.50.4-cp312-cp312-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:8cceae48ae7f94990c2f4e36291e9ec9868735e8b0f19e4489a17b0422338466", size = 2256866, upload-time = "2026-11-05T09:12:10.495Z" }, + { url = "https://files.pythonhosted.org/packages/61/a0/8028ef3e014be522ce43060aeac82a5be2288215e660866f5e6260acc123/pydantic_core-2.50.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:16902a147b3da4840612164a5e67947104d63e978f7a57c395877a5e26690b9c", size = 2125682, upload-time = "2026-11-05T09:12:12.278Z" }, + { url = "https://files.pythonhosted.org/packages/c3/f2/b98bb73b1734ec4e42e786a766abc24f3c89620a0ddbaf8aa14e4b4c628c/pydantic_core-2.50.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:d6e3485a5e5c01fb5339c1ee3d4b9e21e2135a2a9d44caafb71acd994487ee7c", size = 2197108, upload-time = "2026-11-05T09:12:13.873Z" }, + { url = "https://files.pythonhosted.org/packages/f1/d1/7a7142786781400143e8806633fe5b65e2d407c311041fc9494490f05b18/pydantic_core-2.50.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:629eae995185540406e3635df5d5cf1d44f19ea240840b835d3f44541ff694d8", size = 2380521, upload-time = "2026-11-05T09:12:15.539Z" }, + { url = "https://files.pythonhosted.org/packages/b5/34/cf710ca48d4498b04a3ea605d45892675dc2b14a94a25121a8d03f56d3e9/pydantic_core-2.50.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:41b2cd8b29dbb5a4c9828a70f50d1abfc92011115c813213d3a91205c6f731b3", size = 2457436, upload-time = "2026-11-05T09:12:17.447Z" }, + { url = "https://files.pythonhosted.org/packages/91/23/e0c6e3cd09a0ac809953fea698c816b9f03bf0b35b6820c9553e4f5d85a8/pydantic_core-2.50.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c81d98e27d9d9261909dcccab1ba5d6ea1c98b0bb9470e368604614fd1d36ddd", size = 2261727, upload-time = "2026-11-05T09:12:19.097Z" }, + { url = "https://files.pythonhosted.org/packages/f9/00/292a0ed96d5d2d6edb49468ef481336e5b7e54f13435d73b7c912c891c23/pydantic_core-2.50.4-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:ca83a32b2b41653d89f09a3d22b770bca96da72273bef8f7a68136bdd1e8b823", size = 2262071, upload-time = "2026-11-05T09:12:20.78Z" }, + { url = "https://files.pythonhosted.org/packages/f8/36/d4690faf8c082eacf7754e52ab6bebe1bc73b167272e28699c00480ee908/pydantic_core-2.50.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:817953730e4a73a09008b010c4a42396cefe799616a22df2ac21d3927b3080cf", size = 2298931, upload-time = "2026-11-05T09:12:22.614Z" }, + { url = "https://files.pythonhosted.org/packages/21/17/b180af6d17cf6c8e0d3d2661fc501a4a40959744ca4947d6ad0db81b1416/pydantic_core-2.50.4-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:664e74848c2f5fc27db8505fe24e1ecd3ac669412913bf73d176916f86cc08e2", size = 2474285, upload-time = "2026-11-05T09:12:24.842Z" }, + { url = "https://files.pythonhosted.org/packages/6e/bb/7e44d4ac6e1292f1859384c688713045bdf5448e0635c49c003d2be3bb6c/pydantic_core-2.50.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:219114f8dcdcbe4720d82ef016b1287ce5a0a67d7c69ca61524eb72e82aac344", size = 2498172, upload-time = "2026-11-05T09:12:26.434Z" }, + { url = "https://files.pythonhosted.org/packages/d8/84/5101f35294579c4bef7dc32fd4f097d91eedac2e195894266bdabc1e6dfd/pydantic_core-2.50.4-cp312-cp312-win32.whl", hash = "sha256:67f7cc397e1d5556a801d1cba74de0d27d827eb242e6c036c0ca273c745414f1", size = 2119592, upload-time = "2026-11-05T09:12:27.971Z" }, + { url = "https://files.pythonhosted.org/packages/82/88/d438a8fcf3738e9ff2670f724047ca3893ec899bcd5cdfc077a2aab133c6/pydantic_core-2.50.4-cp312-cp312-win_amd64.whl", hash = "sha256:ea2f61b0bc12f3592288503961b764579dea0658852d96a0b3d823614d808821", size = 2264064, upload-time = "2026-11-05T09:12:29.538Z" }, + { url = "https://files.pythonhosted.org/packages/77/d4/4a0c73dc3ef9e50b122b8c3527afcded15a44838f1c9668d2d4b72cc09f0/pydantic_core-2.50.4-cp312-cp312-win_arm64.whl", hash = "sha256:32d6dda86383645ec428ea64dfc277036f5cbc60a72238eab28b91a3fdb9a113", size = 2167792, upload-time = "2026-11-05T09:12:31.103Z" }, + { url = "https://files.pythonhosted.org/packages/9a/18/2f6a25e9104d5af713d16671711927601da1f0db74e785be67bd590385c9/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:c04e9d920e2674f54651fd260a15c5d2843526c73d5242ee4311325ddc9573b3", size = 2212591, upload-time = "2026-11-05T09:14:56.262Z" }, + { url = "https://files.pythonhosted.org/packages/4c/1b/ba8b721af10a7659e7fbbef320ff8eb55462557a72607858af5a9bd22cb1/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:5bc1811ef2b4d4ba63e8e452f6e332b6374bd1d2cbbfdf66826c8cb1f71dd10d", size = 2048167, upload-time = "2026-11-05T09:14:57.681Z" }, + { url = "https://files.pythonhosted.org/packages/48/42/3f8638e7d90bdd9a7c7f3e5084723af59e7f43f15a292e242d35624073ce/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0b059a7968b1911be5a2d9a8234827ab0bef9d1e465d4b42da525894143550e8", size = 2119548, upload-time = "2026-11-05T09:14:59.317Z" }, + { url = "https://files.pythonhosted.org/packages/e0/8d/4bfbacaf191f7939893d165e18eb301731fa3366c59a6e57336c4f168fbd/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bee28aab5a580eec673f7b68dfa8dece3dd37bd207ef8d22fafe23a8e9837296", size = 2279952, upload-time = "2026-11-05T09:15:00.907Z" }, ] [[package]] name = "pydantic-settings" version = "2.16.3" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pydantic" }, { name = "python-dotenv" }, { name = "typing-extensions" }, { name = "typing-inspection" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/59/28/227c843eedd29bd78e132e5aafa420d83154b10465c312f9c21ff2eaf77d/pydantic_settings-2.16.3.tar.gz", hash = "sha256:10e36f616623ebb586c05ca3d3cd22927146869db413d4f14c20c514442a1337" } +sdist = { url = "https://files.pythonhosted.org/packages/59/28/227c843eedd29bd78e132e5aafa420d83154b10465c312f9c21ff2eaf77d/pydantic_settings-2.16.3.tar.gz", hash = "sha256:10e36f616623ebb586c05ca3d3cd22927146869db413d4f14c20c514442a1337", size = 311716, upload-time = "2026-11-13T11:18:30.102Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/4c/26/3e68379ca313b6aa58e11fbd8b28d5c6f1b9f4428d70222ba021a76797ec/pydantic_settings-2.16.3-py3-none-any.whl", hash = "sha256:d1db16a2d34006323a1b42c0640898da58adfbad7ec30baaa9e2b18aafc08999" }, + { url = "https://files.pythonhosted.org/packages/4c/26/3e68379ca313b6aa58e11fbd8b28d5c6f1b9f4428d70222ba021a76797ec/pydantic_settings-2.16.3-py3-none-any.whl", hash = "sha256:d1db16a2d34006323a1b42c0640898da58adfbad7ec30baaa9e2b18aafc08999", size = 82679, upload-time = "2026-11-13T11:18:28.73Z" }, ] [[package]] name = "pygments" version = "2.21.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9" }, + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, +] + +[[package]] +name = "pyjwt" +version = "2.15.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/ea/5194e52748b0da83d71e082d75496eaec6e58f419f5e184786ded517e6a9/pyjwt-2.15.1.tar.gz", hash = "sha256:4f259e80cdfb6b3fc18a7de51fd1ef9ec79652f25019bae68975ca2468a34df8", size = 121252, upload-time = "2026-09-28T18:40:42.598Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/50/ca/44de4e75f8aadc457f0634be3b542815078ded46dca30efb960edeecad6e/pyjwt-2.15.1-py3-none-any.whl", hash = "sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193", size = 33860, upload-time = "2026-09-28T18:40:41.429Z" }, +] + +[package.optional-dependencies] +crypto = [ + { name = "cryptography" }, ] [[package]] name = "pytest" version = "8.4.2" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, { name = "iniconfig" }, @@ -476,145 +572,145 @@ dependencies = [ { name = "pluggy" }, { name = "pygments" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01" } +sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79" }, + { url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" }, ] [[package]] name = "python-dateutil" version = "2.9.0.post0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "six" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" } +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" }, + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, ] [[package]] name = "python-dotenv" version = "1.2.4" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/74/26/2fbeedb218a787a5eea551c7532cac4e009f83d689dd2faa0d0353473f86/python_dotenv-1.2.4.tar.gz", hash = "sha256:f0d53e69935a851c0dcc78f3ab7aaccd8cabef0b92382b576b824212902873c0" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/74/26/2fbeedb218a787a5eea551c7532cac4e009f83d689dd2faa0d0353473f86/python_dotenv-1.2.4.tar.gz", hash = "sha256:f0d53e69935a851c0dcc78f3ab7aaccd8cabef0b92382b576b824212902873c0", size = 60824, upload-time = "2026-10-01T05:36:10Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", hash = "sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc" }, + { url = "https://files.pythonhosted.org/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", hash = "sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", size = 23266, upload-time = "2026-10-01T05:36:08.633Z" }, ] [[package]] name = "pyyaml" version = "6.0.3" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196" }, - { url = "https://mirrors.aliyun.com/pypi/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0" }, - { url = "https://mirrors.aliyun.com/pypi/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28" }, - { url = "https://mirrors.aliyun.com/pypi/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c" }, - { url = "https://mirrors.aliyun.com/pypi/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc" }, - { url = "https://mirrors.aliyun.com/pypi/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e" }, - { url = "https://mirrors.aliyun.com/pypi/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea" }, - { url = "https://mirrors.aliyun.com/pypi/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5" }, - { url = "https://mirrors.aliyun.com/pypi/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b" }, - { url = "https://mirrors.aliyun.com/pypi/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, ] [[package]] name = "six" version = "1.17.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274" }, + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, ] [[package]] name = "sqlalchemy" version = "2.0.57" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" }, { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/19/df/7611a37edc4cfa118c364a7f5dec4889ad0e9f84638a789bbf864c5f7a63/sqlalchemy-2.0.57.tar.gz", hash = "sha256:892e0edd06b8ca2a8a3f9107611047914fd82ccd03735efd706d12aa4da1b773" } +sdist = { url = "https://files.pythonhosted.org/packages/19/df/7611a37edc4cfa118c364a7f5dec4889ad0e9f84638a789bbf864c5f7a63/sqlalchemy-2.0.57.tar.gz", hash = "sha256:892e0edd06b8ca2a8a3f9107611047914fd82ccd03735efd706d12aa4da1b773", size = 10018207, upload-time = "2026-11-04T00:58:47.151Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/68/78/27f8b0f5c59006f98875b3166347615a2aaf196ccd9a400d6a95f56e0364/sqlalchemy-2.0.57-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e33889a6f292db9ed2278d5562717c96432651ec558417a7acf17d9549fd6935" }, - { url = "https://mirrors.aliyun.com/pypi/packages/41/f3/702ae27c52acfaeb6dde5ef1a49a8fa1793e28834fe77be7c3a4cb7abfb5/sqlalchemy-2.0.57-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:75135c4c54be953730e41203f38ced685b60dfb16d61a7d4d9a7ab8d87ced6f1" }, - { url = "https://mirrors.aliyun.com/pypi/packages/df/2b/6722fc370f7cbc75fd6df6ba3d870ab4ee40a02c4875162e2bcfe4a5ad83/sqlalchemy-2.0.57-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4ff9f7dda4d136bfd7fab44384ef7e3135c9826da815d6248f713d0035a6274b" }, - { url = "https://mirrors.aliyun.com/pypi/packages/8e/9d/4ff40e4d17c36c6b8d328ddefc66abe0b5f3b4d257a61d430a6dcded4ab5/sqlalchemy-2.0.57-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e8d67fa9935021bdccd02d313a1b5ce92531f679b0e70ea7b9f5d651fab7f742" }, - { url = "https://mirrors.aliyun.com/pypi/packages/fc/39/6bc26429849cc799ae5a5c9c8657491eff777f50a5e38e91626d79984d68/sqlalchemy-2.0.57-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d55ea24654f8d982c5aabd6e6779eac3ed15f420f629761c4eb627399e9d8cec" }, - { url = "https://mirrors.aliyun.com/pypi/packages/6b/b4/5c67a4c220c84ac9923bea8035e1ad6e0982191ddf56008228ad30edc974/sqlalchemy-2.0.57-cp312-cp312-win32.whl", hash = "sha256:ffaedafb38901bc72efcaf9fdf57bc363be24bd67a8bce8e3afe4ec75bc82833" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c9/72/406430db968b16104bb4132fc6394d279e1e96b36994200879f76eb8da52/sqlalchemy-2.0.57-cp312-cp312-win_amd64.whl", hash = "sha256:4972e01af81b72b78e335735eddf9d4ef8980eca1e8364552715991a454eea97" }, - { url = "https://mirrors.aliyun.com/pypi/packages/fd/0e/ed54ed17987f65115360b124ab943d955c04906fd589411627805afe7b57/sqlalchemy-2.0.57-py3-none-any.whl", hash = "sha256:e31639a78045134a39e14f287b647fd9537cdd71978ea9c11bf7d905d70e473d" }, + { url = "https://files.pythonhosted.org/packages/68/78/27f8b0f5c59006f98875b3166347615a2aaf196ccd9a400d6a95f56e0364/sqlalchemy-2.0.57-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e33889a6f292db9ed2278d5562717c96432651ec558417a7acf17d9549fd6935", size = 2197129, upload-time = "2026-11-04T01:05:44.509Z" }, + { url = "https://files.pythonhosted.org/packages/41/f3/702ae27c52acfaeb6dde5ef1a49a8fa1793e28834fe77be7c3a4cb7abfb5/sqlalchemy-2.0.57-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:75135c4c54be953730e41203f38ced685b60dfb16d61a7d4d9a7ab8d87ced6f1", size = 3461341, upload-time = "2026-11-04T01:57:50.242Z" }, + { url = "https://files.pythonhosted.org/packages/df/2b/6722fc370f7cbc75fd6df6ba3d870ab4ee40a02c4875162e2bcfe4a5ad83/sqlalchemy-2.0.57-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4ff9f7dda4d136bfd7fab44384ef7e3135c9826da815d6248f713d0035a6274b", size = 3478029, upload-time = "2026-11-04T01:12:47.545Z" }, + { url = "https://files.pythonhosted.org/packages/8e/9d/4ff40e4d17c36c6b8d328ddefc66abe0b5f3b4d257a61d430a6dcded4ab5/sqlalchemy-2.0.57-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e8d67fa9935021bdccd02d313a1b5ce92531f679b0e70ea7b9f5d651fab7f742", size = 3412804, upload-time = "2026-11-04T01:57:52.379Z" }, + { url = "https://files.pythonhosted.org/packages/fc/39/6bc26429849cc799ae5a5c9c8657491eff777f50a5e38e91626d79984d68/sqlalchemy-2.0.57-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d55ea24654f8d982c5aabd6e6779eac3ed15f420f629761c4eb627399e9d8cec", size = 3444039, upload-time = "2026-11-04T01:12:50.017Z" }, + { url = "https://files.pythonhosted.org/packages/6b/b4/5c67a4c220c84ac9923bea8035e1ad6e0982191ddf56008228ad30edc974/sqlalchemy-2.0.57-cp312-cp312-win32.whl", hash = "sha256:ffaedafb38901bc72efcaf9fdf57bc363be24bd67a8bce8e3afe4ec75bc82833", size = 2150331, upload-time = "2026-11-04T01:32:28.689Z" }, + { url = "https://files.pythonhosted.org/packages/c9/72/406430db968b16104bb4132fc6394d279e1e96b36994200879f76eb8da52/sqlalchemy-2.0.57-cp312-cp312-win_amd64.whl", hash = "sha256:4972e01af81b72b78e335735eddf9d4ef8980eca1e8364552715991a454eea97", size = 2179710, upload-time = "2026-11-04T01:32:30.265Z" }, + { url = "https://files.pythonhosted.org/packages/fd/0e/ed54ed17987f65115360b124ab943d955c04906fd589411627805afe7b57/sqlalchemy-2.0.57-py3-none-any.whl", hash = "sha256:e31639a78045134a39e14f287b647fd9537cdd71978ea9c11bf7d905d70e473d", size = 1967625, upload-time = "2026-11-04T00:59:28.703Z" }, ] [[package]] name = "starlette" version = "1.10.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/48/bb/3d8757f21e9a53d9035c9eb039a777047139a16bfdbedfc7a58241c3d914/starlette-1.10.0.tar.gz", hash = "sha256:b8399098d4c1e3522734f7235dc79b1fc967f96cf139c81e0fa30479e0685f9b" } +sdist = { url = "https://files.pythonhosted.org/packages/48/bb/3d8757f21e9a53d9035c9eb039a777047139a16bfdbedfc7a58241c3d914/starlette-1.10.0.tar.gz", hash = "sha256:b8399098d4c1e3522734f7235dc79b1fc967f96cf139c81e0fa30479e0685f9b", size = 2734356, upload-time = "2026-10-24T15:04:12.342Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/88/2e/947cfe02def9371c07cd5bf5b6b61c829e9aecb9904db02a66cfafbc1eec/starlette-1.10.0-py3-none-any.whl", hash = "sha256:478c0ab3b4ced6e82719849c118fa406f0278a3499c1a898cd15cd31bdc38ce4" }, + { url = "https://files.pythonhosted.org/packages/88/2e/947cfe02def9371c07cd5bf5b6b61c829e9aecb9904db02a66cfafbc1eec/starlette-1.10.0-py3-none-any.whl", hash = "sha256:478c0ab3b4ced6e82719849c118fa406f0278a3499c1a898cd15cd31bdc38ce4", size = 80571, upload-time = "2026-10-24T15:04:10.371Z" }, ] [[package]] name = "typing-extensions" version = "4.16.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8" }, + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, ] [[package]] name = "typing-inspection" version = "0.4.5" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/ff/50/0195198eb1d75bab716bb0a813abea4cc394bfa17a92a189f021a34859af/typing_inspection-0.4.5.tar.gz", hash = "sha256:7f16c411e7930dc79596d42ab44672a3fe5f60eb34b781a1647e7872363120c7" } +sdist = { url = "https://files.pythonhosted.org/packages/ff/50/0195198eb1d75bab716bb0a813abea4cc394bfa17a92a189f021a34859af/typing_inspection-0.4.5.tar.gz", hash = "sha256:7f16c411e7930dc79596d42ab44672a3fe5f60eb34b781a1647e7872363120c7", size = 81194, upload-time = "2026-11-04T14:13:23.774Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/de/0c/ea2544850a7c135e15033a5c7a8e7211136184b7ae63e2239d557c2b3019/typing_inspection-0.4.5-py3-none-any.whl", hash = "sha256:bc210535442b39e1bf2805e0c7a17dfd6a4ace760c84c7f7d16245d23a6b1c39" }, + { url = "https://files.pythonhosted.org/packages/de/0c/ea2544850a7c135e15033a5c7a8e7211136184b7ae63e2239d557c2b3019/typing_inspection-0.4.5-py3-none-any.whl", hash = "sha256:bc210535442b39e1bf2805e0c7a17dfd6a4ace760c84c7f7d16245d23a6b1c39", size = 14874, upload-time = "2026-11-04T14:13:22.616Z" }, ] [[package]] name = "tzdata" version = "2026.6" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/7a/29/6a1391d31cd00ff9e927215a224a880e1e84e826b64ba80a499e51c074d8/tzdata-2026.6.tar.gz", hash = "sha256:85d2cd9c09f81f0bb29db27759fc83af4f1e620efb814f8c5bf8b4cc4feece6d" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7a/29/6a1391d31cd00ff9e927215a224a880e1e84e826b64ba80a499e51c074d8/tzdata-2026.6.tar.gz", hash = "sha256:85d2cd9c09f81f0bb29db27759fc83af4f1e620efb814f8c5bf8b4cc4feece6d", size = 201017, upload-time = "2026-10-28T09:57:09.137Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/0a/66/9a06c2227fedfd4919f0eaaa8b94377d9730882a7e4f95823c9a331ab5e1/tzdata-2026.6-py2.py3-none-any.whl", hash = "sha256:0a10eec6e13ef16b627fabed9a5f2ba61a62b1c67f327305f4e7e412a70b4aec" }, + { url = "https://files.pythonhosted.org/packages/0a/66/9a06c2227fedfd4919f0eaaa8b94377d9730882a7e4f95823c9a331ab5e1/tzdata-2026.6-py2.py3-none-any.whl", hash = "sha256:0a10eec6e13ef16b627fabed9a5f2ba61a62b1c67f327305f4e7e412a70b4aec", size = 348210, upload-time = "2026-10-28T09:57:07.276Z" }, ] [[package]] name = "tzlocal" version = "5.4.5" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "tzdata", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/d8/89/2bd035df331499589fc92e59375c17c6cea6a500453b2c5f6a6ec9572825/tzlocal-5.4.5.tar.gz", hash = "sha256:ba976898bad27945178c9ca25c222c19e322b30c10342b9f40b46714f70d2d5f" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/89/2bd035df331499589fc92e59375c17c6cea6a500453b2c5f6a6ec9572825/tzlocal-5.4.5.tar.gz", hash = "sha256:ba976898bad27945178c9ca25c222c19e322b30c10342b9f40b46714f70d2d5f", size = 31483, upload-time = "2026-10-22T09:09:26.38Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/7b/c1/9be4e1a8a30db8729a86628073910e56f85aaf8a659e053f376a2e6ea5a8/tzlocal-5.4.5-py3-none-any.whl", hash = "sha256:ecab534f6d65d9deb4c4ea52c121ab6dd5958e9b878e71dcb102578269752454" }, + { url = "https://files.pythonhosted.org/packages/7b/c1/9be4e1a8a30db8729a86628073910e56f85aaf8a659e053f376a2e6ea5a8/tzlocal-5.4.5-py3-none-any.whl", hash = "sha256:ecab534f6d65d9deb4c4ea52c121ab6dd5958e9b878e71dcb102578269752454", size = 18215, upload-time = "2026-10-22T09:09:24.447Z" }, ] [[package]] name = "uvicorn" version = "0.54.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, { name = "h11" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/da/34/30e9280707135d2cfc589dfff3cb796bd07a3aeb1a3e415ba09dd89d7bb4/uvicorn-0.54.0.tar.gz", hash = "sha256:a2e33cbfaa0306f8e6b0c13e0cb89d7d7a2da3e62b90c66e18c33d9807b28620" } +sdist = { url = "https://files.pythonhosted.org/packages/da/34/30e9280707135d2cfc589dfff3cb796bd07a3aeb1a3e415ba09dd89d7bb4/uvicorn-0.54.0.tar.gz", hash = "sha256:a2e33cbfaa0306f8e6b0c13e0cb89d7d7a2da3e62b90c66e18c33d9807b28620", size = 112283, upload-time = "2026-09-25T06:52:37.601Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/38/0c/b54a4fdd7f90a3af8b02ebc9ce6712c2c208b7926a2f7bad95c33ebbe943/uvicorn-0.54.0-py3-none-any.whl", hash = "sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf" }, + { url = "https://files.pythonhosted.org/packages/38/0c/b54a4fdd7f90a3af8b02ebc9ce6712c2c208b7926a2f7bad95c33ebbe943/uvicorn-0.54.0-py3-none-any.whl", hash = "sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf", size = 87427, upload-time = "2026-09-25T06:52:35.829Z" }, ] [package.optional-dependencies] @@ -630,49 +726,49 @@ standard = [ [[package]] name = "uvloop" version = "0.23.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/fa/42/02c739ce85fb2ee8d99212c61417da8140c6b87e9d97c430bea520d76044/uvloop-0.23.0.tar.gz", hash = "sha256:28d160f51ab4da3b187063652e643dea6831072add4adc1e6d62afbe73b6be27" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fa/42/02c739ce85fb2ee8d99212c61417da8140c6b87e9d97c430bea520d76044/uvloop-0.23.0.tar.gz", hash = "sha256:28d160f51ab4da3b187063652e643dea6831072add4adc1e6d62afbe73b6be27", size = 2559185, upload-time = "2026-10-01T03:17:04.4Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/05/98/04e766a6de99e6f7f955ecb7829e8d5a557de3427cb85be2236de54dda0c/uvloop-0.23.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:93935ab27b6eaef4c3e5489aebc84284f0644592f7ab516df60ee1b27eaf5eb3" }, - { url = "https://mirrors.aliyun.com/pypi/packages/33/8a/499e7b863a848ede009539bce39806b66205da5f8779354228e785601144/uvloop-0.23.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4448e9124537620f9c25d004c227bb5104440b58955c19bbd312d910af919a63" }, - { url = "https://mirrors.aliyun.com/pypi/packages/3d/95/a880f8ce3b87ac5b307c354e8ee480be4658d24bf01f87921d57e3530b4a/uvloop-0.23.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f7548ede3ee908cfabc0d068106e303a9a2d811af959cdf6ab85676344cedcda" }, - { url = "https://mirrors.aliyun.com/pypi/packages/51/27/c1d2f9fa977f8f42ea294604166df10e0027e6dc6cd17f85ede386c9bf36/uvloop-0.23.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:090865d8ce7a03986755a3ce711b7dd0d4b44eb14ab74368b717f3fad1180208" }, - { url = "https://mirrors.aliyun.com/pypi/packages/42/dd/2cb6a2c8a30ca55c07a882dd4ae4ceae0fa7d8c15b25b3b7cb9a4b6cf4ca/uvloop-0.23.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:bd6f2f81c7b9da99d301c0b16b82044e76fe887086e42e1590ecf520b94dbdac" }, - { url = "https://mirrors.aliyun.com/pypi/packages/f4/52/29989cbaa4022dc4ef35c1dd60a4ab989e4c2065f341ed483ae71d2bd950/uvloop-0.23.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a6ac96da66c35bf789bdcde78a88dc7d56b7907d8379648c54adc1c61594575d" }, + { url = "https://files.pythonhosted.org/packages/05/98/04e766a6de99e6f7f955ecb7829e8d5a557de3427cb85be2236de54dda0c/uvloop-0.23.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:93935ab27b6eaef4c3e5489aebc84284f0644592f7ab516df60ee1b27eaf5eb3", size = 1393055, upload-time = "2026-10-01T03:15:42.526Z" }, + { url = "https://files.pythonhosted.org/packages/33/8a/499e7b863a848ede009539bce39806b66205da5f8779354228e785601144/uvloop-0.23.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4448e9124537620f9c25d004c227bb5104440b58955c19bbd312d910af919a63", size = 768909, upload-time = "2026-10-01T03:15:43.974Z" }, + { url = "https://files.pythonhosted.org/packages/3d/95/a880f8ce3b87ac5b307c354e8ee480be4658d24bf01f87921d57e3530b4a/uvloop-0.23.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f7548ede3ee908cfabc0d068106e303a9a2d811af959cdf6ab85676344cedcda", size = 4419106, upload-time = "2026-10-01T03:15:45.551Z" }, + { url = "https://files.pythonhosted.org/packages/51/27/c1d2f9fa977f8f42ea294604166df10e0027e6dc6cd17f85ede386c9bf36/uvloop-0.23.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:090865d8ce7a03986755a3ce711b7dd0d4b44eb14ab74368b717f3fad1180208", size = 4532597, upload-time = "2026-10-01T03:15:47.258Z" }, + { url = "https://files.pythonhosted.org/packages/42/dd/2cb6a2c8a30ca55c07a882dd4ae4ceae0fa7d8c15b25b3b7cb9a4b6cf4ca/uvloop-0.23.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:bd6f2f81c7b9da99d301c0b16b82044e76fe887086e42e1590ecf520b94dbdac", size = 4230048, upload-time = "2026-10-01T03:15:49.119Z" }, + { url = "https://files.pythonhosted.org/packages/f4/52/29989cbaa4022dc4ef35c1dd60a4ab989e4c2065f341ed483ae71d2bd950/uvloop-0.23.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a6ac96da66c35bf789bdcde78a88dc7d56b7907d8379648c54adc1c61594575d", size = 4394152, upload-time = "2026-10-01T03:15:50.829Z" }, ] [[package]] name = "vine" version = "5.1.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/bd/e4/d07b5f29d283596b9727dd5275ccbceb63c44a1a82aa9e4bfd20426762ac/vine-5.1.0.tar.gz", hash = "sha256:8b62e981d35c41049211cf62a0a1242d8c1ee9bd15bb196ce38aefd6799e61e0" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bd/e4/d07b5f29d283596b9727dd5275ccbceb63c44a1a82aa9e4bfd20426762ac/vine-5.1.0.tar.gz", hash = "sha256:8b62e981d35c41049211cf62a0a1242d8c1ee9bd15bb196ce38aefd6799e61e0", size = 48980, upload-time = "2023-11-05T08:46:53.857Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/03/ff/7c0c86c43b3cbb927e0ccc0255cb4057ceba4799cd44ae95174ce8e8b5b2/vine-5.1.0-py3-none-any.whl", hash = "sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc" }, + { url = "https://files.pythonhosted.org/packages/03/ff/7c0c86c43b3cbb927e0ccc0255cb4057ceba4799cd44ae95174ce8e8b5b2/vine-5.1.0-py3-none-any.whl", hash = "sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc", size = 9636, upload-time = "2023-11-05T08:46:51.205Z" }, ] [[package]] name = "watchfiles" version = "1.3.0" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, ] -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/b3/68/e6aa0b77d217b31f8f486ec0cdfe5e00e6e38dc0be657e7d85819b9faf0a/watchfiles-1.3.0.tar.gz", hash = "sha256:99aee4a07847c06820765fd7b1b49ceac4f3f711ccb7d104655a33231de1c207" } +sdist = { url = "https://files.pythonhosted.org/packages/b3/68/e6aa0b77d217b31f8f486ec0cdfe5e00e6e38dc0be657e7d85819b9faf0a/watchfiles-1.3.0.tar.gz", hash = "sha256:99aee4a07847c06820765fd7b1b49ceac4f3f711ccb7d104655a33231de1c207", size = 108119, upload-time = "2026-09-21T09:08:55.664Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/68/fa/c0b840d5d8bafe640925408ce11095948c8945bb61be1e67d0ab629b872a/watchfiles-1.3.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:000b9688fc8133037a8b075c8ebf98f32844ff8964dda61e85c1db547dafc441" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c7/8a/894799b485fe9473ad10422a0d9668e53fb78e3a2b5cc6061159572844ad/watchfiles-1.3.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:bbc1198edfdc90fda0600f825aa94150f428dfcbf8138746f55998e0e660d64c" }, - { url = "https://mirrors.aliyun.com/pypi/packages/5a/61/f277cd5ead05f5d37b98b41fbdd0c943ee0c04d49738f62e902cb291cf43/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4af9c464d410e8c44b58ddf1cbec7c3a02c1cb2c6c80df9c74659ba2fbda0ab5" }, - { url = "https://mirrors.aliyun.com/pypi/packages/46/66/ea4c01382975e53b1ac1b0a0ea1b353416b8127fb6e04f5c1c313119aab6/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb94e40b9a0db19636b5e3fed0a9803452ecc7381df13b385272abb779ee83ca" }, - { url = "https://mirrors.aliyun.com/pypi/packages/31/c3/1a501b597817096c9831c255f6270c124ce0e2faeb74124be24dcc93b86d/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7398930a2b76b9dc67a4e6b8bfc7baf30946892a86f417a3920c07bdd6febc30" }, - { url = "https://mirrors.aliyun.com/pypi/packages/5a/16/77352d05e152c7786a016e9f1decdb4507e8aa5bcf3343c72142a0413d14/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:025b108f2d5cc2799cb941f79380df3e8b22bfb589c218e801767fe78d598c95" }, - { url = "https://mirrors.aliyun.com/pypi/packages/95/fe/81001c55b24466fe9911135e50269fd3a29f43e446627a92adfab54553b6/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:be9ef3cd403d756a304a0a08a112163c63da7ec72c8c9d083c98818291ff8f29" }, - { url = "https://mirrors.aliyun.com/pypi/packages/8a/cf/e3ad894ed5909a7c44b0707e89bc25d19a3d78b3a7aec846119443b6ae56/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1" }, - { url = "https://mirrors.aliyun.com/pypi/packages/7f/f5/2f106829e6e2bc91ad74614730f6df484202b9a4d20d927dbf2f08d37d44/watchfiles-1.3.0-cp310-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:d36c72fcdc08f143d87316a4c4c3b064e340da2c7383d39803950740ed418935" }, - { url = "https://mirrors.aliyun.com/pypi/packages/15/37/2741ab776b978669c1f3bba1e573f1a184f727ab8b4d3a6d9c61090800ed/watchfiles-1.3.0-cp310-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:f0c9865240e065a2247f4b5248528ae3d01e0e8ae071462c250c884dc16e3ee3" }, - { url = "https://mirrors.aliyun.com/pypi/packages/48/64/db4a4684275fe9b696ee5118c194705c1423b3d42181c3f8ee70194d5c73/watchfiles-1.3.0-cp310-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:380f513d26cc2e598266b88d66456e07d67ef4be8f0f435a1154d9c44b43d509" }, - { url = "https://mirrors.aliyun.com/pypi/packages/52/80/95ddb24f6a2f595c031c24432ab7b8aa7d6d1ada0c6d63a552166e06e8d1/watchfiles-1.3.0-cp310-abi3-win32.whl", hash = "sha256:509d9f74d2bec5c1f4cd868ddcfe0c9601f7ea53066dfcb19d8ede742c4de661" }, - { url = "https://mirrors.aliyun.com/pypi/packages/48/a1/1c4a1b3c8030cd03206232612be8a6e8799093490c220b0fcb935d02b75a/watchfiles-1.3.0-cp310-abi3-win_amd64.whl", hash = "sha256:1acabde19b67e673274e89a04d613b7fb1f122e2c4b8ec9a581e59c149264b61" }, - { url = "https://mirrors.aliyun.com/pypi/packages/82/e0/d2db577c632d26d08078c4390dd870b8555c4e558df25d22270f0166c71f/watchfiles-1.3.0-cp310-abi3-win_arm64.whl", hash = "sha256:d978cc1dd7ba44f5590d7de74f7a9c8be7262d9e469c2c0efb8bbfc2574321dc" }, + { url = "https://files.pythonhosted.org/packages/68/fa/c0b840d5d8bafe640925408ce11095948c8945bb61be1e67d0ab629b872a/watchfiles-1.3.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:000b9688fc8133037a8b075c8ebf98f32844ff8964dda61e85c1db547dafc441", size = 399703, upload-time = "2026-09-21T09:08:13.518Z" }, + { url = "https://files.pythonhosted.org/packages/c7/8a/894799b485fe9473ad10422a0d9668e53fb78e3a2b5cc6061159572844ad/watchfiles-1.3.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:bbc1198edfdc90fda0600f825aa94150f428dfcbf8138746f55998e0e660d64c", size = 397647, upload-time = "2026-09-21T09:08:15.16Z" }, + { url = "https://files.pythonhosted.org/packages/5a/61/f277cd5ead05f5d37b98b41fbdd0c943ee0c04d49738f62e902cb291cf43/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4af9c464d410e8c44b58ddf1cbec7c3a02c1cb2c6c80df9c74659ba2fbda0ab5", size = 454994, upload-time = "2026-09-21T09:08:16.587Z" }, + { url = "https://files.pythonhosted.org/packages/46/66/ea4c01382975e53b1ac1b0a0ea1b353416b8127fb6e04f5c1c313119aab6/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb94e40b9a0db19636b5e3fed0a9803452ecc7381df13b385272abb779ee83ca", size = 460105, upload-time = "2026-09-21T09:08:17.961Z" }, + { url = "https://files.pythonhosted.org/packages/31/c3/1a501b597817096c9831c255f6270c124ce0e2faeb74124be24dcc93b86d/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7398930a2b76b9dc67a4e6b8bfc7baf30946892a86f417a3920c07bdd6febc30", size = 493761, upload-time = "2026-09-21T09:08:19.327Z" }, + { url = "https://files.pythonhosted.org/packages/5a/16/77352d05e152c7786a016e9f1decdb4507e8aa5bcf3343c72142a0413d14/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:025b108f2d5cc2799cb941f79380df3e8b22bfb589c218e801767fe78d598c95", size = 577500, upload-time = "2026-09-21T09:08:20.723Z" }, + { url = "https://files.pythonhosted.org/packages/95/fe/81001c55b24466fe9911135e50269fd3a29f43e446627a92adfab54553b6/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:be9ef3cd403d756a304a0a08a112163c63da7ec72c8c9d083c98818291ff8f29", size = 469209, upload-time = "2026-09-21T09:08:22.346Z" }, + { url = "https://files.pythonhosted.org/packages/8a/cf/e3ad894ed5909a7c44b0707e89bc25d19a3d78b3a7aec846119443b6ae56/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1", size = 458353, upload-time = "2026-09-21T09:08:23.7Z" }, + { url = "https://files.pythonhosted.org/packages/7f/f5/2f106829e6e2bc91ad74614730f6df484202b9a4d20d927dbf2f08d37d44/watchfiles-1.3.0-cp310-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:d36c72fcdc08f143d87316a4c4c3b064e340da2c7383d39803950740ed418935", size = 468707, upload-time = "2026-09-21T09:08:25.167Z" }, + { url = "https://files.pythonhosted.org/packages/15/37/2741ab776b978669c1f3bba1e573f1a184f727ab8b4d3a6d9c61090800ed/watchfiles-1.3.0-cp310-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:f0c9865240e065a2247f4b5248528ae3d01e0e8ae071462c250c884dc16e3ee3", size = 632510, upload-time = "2026-09-21T09:08:26.532Z" }, + { url = "https://files.pythonhosted.org/packages/48/64/db4a4684275fe9b696ee5118c194705c1423b3d42181c3f8ee70194d5c73/watchfiles-1.3.0-cp310-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:380f513d26cc2e598266b88d66456e07d67ef4be8f0f435a1154d9c44b43d509", size = 661723, upload-time = "2026-09-21T09:08:28.004Z" }, + { url = "https://files.pythonhosted.org/packages/52/80/95ddb24f6a2f595c031c24432ab7b8aa7d6d1ada0c6d63a552166e06e8d1/watchfiles-1.3.0-cp310-abi3-win32.whl", hash = "sha256:509d9f74d2bec5c1f4cd868ddcfe0c9601f7ea53066dfcb19d8ede742c4de661", size = 277761, upload-time = "2026-09-21T09:08:29.335Z" }, + { url = "https://files.pythonhosted.org/packages/48/a1/1c4a1b3c8030cd03206232612be8a6e8799093490c220b0fcb935d02b75a/watchfiles-1.3.0-cp310-abi3-win_amd64.whl", hash = "sha256:1acabde19b67e673274e89a04d613b7fb1f122e2c4b8ec9a581e59c149264b61", size = 290643, upload-time = "2026-09-21T09:08:30.45Z" }, + { url = "https://files.pythonhosted.org/packages/82/e0/d2db577c632d26d08078c4390dd870b8555c4e558df25d22270f0166c71f/watchfiles-1.3.0-cp310-abi3-win_arm64.whl", hash = "sha256:d978cc1dd7ba44f5590d7de74f7a9c8be7262d9e469c2c0efb8bbfc2574321dc", size = 285510, upload-time = "2026-09-21T09:08:31.561Z" }, ] [[package]] @@ -686,6 +782,7 @@ dependencies = [ { name = "psycopg", extra = ["binary"] }, { name = "pydantic" }, { name = "pydantic-settings" }, + { name = "pyjwt", extra = ["crypto"] }, { name = "python-dotenv" }, { name = "sqlalchemy" }, { name = "uvicorn", extra = ["standard"] }, @@ -699,6 +796,7 @@ requires-dist = [ { name = "psycopg", extras = ["binary"], specifier = ">=3.2,<4" }, { name = "pydantic", specifier = ">=2.10,<3" }, { name = "pydantic-settings", specifier = ">=2.6,<3" }, + { name = "pyjwt", extras = ["crypto"], specifier = ">=2.10,<3" }, { name = "python-dotenv", specifier = ">=1.0,<2" }, { name = "sqlalchemy", specifier = ">=2.0.36,<2.1" }, { name = "uvicorn", extras = ["standard"], specifier = ">=0.32,<1" }, @@ -728,54 +826,54 @@ dev = [ [[package]] name = "wcwidth" version = "0.9.4" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/ea/01/e5ac23733628a6bbb91913a765fcf55ee8070d8d991bc88fdaaf805052c7/wcwidth-0.9.4.tar.gz", hash = "sha256:fd8d57d3cdfe570e3265c8fab1885c24e34ef40889c0759c0c304a19e9835954" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ea/01/e5ac23733628a6bbb91913a765fcf55ee8070d8d991bc88fdaaf805052c7/wcwidth-0.9.4.tar.gz", hash = "sha256:fd8d57d3cdfe570e3265c8fab1885c24e34ef40889c0759c0c304a19e9835954", size = 970051, upload-time = "2026-10-24T18:11:44.954Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/bf/b8/d251589a100250b71a7b8e83fedfcabfd8bd60e78cd1e3329372f63bcc93/wcwidth-0.9.4-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b7969c9aa258d536df54c8ac8af5cad0c74a6268c9972e1fb60a5f29feffb66d" }, - { url = "https://mirrors.aliyun.com/pypi/packages/04/e9/dfdca30ca36c472de3e260406dee29fc108499ec590c63b3fe279887ee9d/wcwidth-0.9.4-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:f279f32c8e206a9092fa350e53ca0c2bd8072e45b1c9fd31bb6d476b59b591c4" }, - { url = "https://mirrors.aliyun.com/pypi/packages/5d/b6/d7416f38054a107d2fb17c2b73b68723c6c334f69c4e29545fb9e6df81eb/wcwidth-0.9.4-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:a1526cd25c6420e5153bb7d764c7509e692215ee3ad9b725db1ad665d47eae09" }, - { url = "https://mirrors.aliyun.com/pypi/packages/7d/5b/42bdf9a4b0e4f9126584af2ec73642de495f3bd8add907430f13c3bb98d2/wcwidth-0.9.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:093469e01d881bff3db93ff3f56c364dc87c441ea01f9f41c22de0c0bdf5c6ef" }, - { url = "https://mirrors.aliyun.com/pypi/packages/fa/e8/0485850748dfdba9443f4151c7b2442cfa4987ba6cd871038eb5d6b8eca9/wcwidth-0.9.4-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b185c8b927b23af2721be1783499d1cfa5c028b098b0858951b4ae224477f1c2" }, - { url = "https://mirrors.aliyun.com/pypi/packages/e9/11/dd3d0379c6094524df6585b76ae3d9727161ff29c003177e3661c36437c1/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:17619066f95c10f44d7ae08ee456602456bc66cc9d5e91966ec73d799acebc5f" }, - { url = "https://mirrors.aliyun.com/pypi/packages/3c/48/1b5299983d9ec084be897162b7cc6014622dfe62847224fa3272b6d79ea5/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:b52f265a694dda6b3ad9050c8bd89158ad519109ef7c5eb110b906cc49f25763" }, - { url = "https://mirrors.aliyun.com/pypi/packages/7a/be/e3097d859b075344a7be57774a58d468eafb0ca88e02aad93eb31d69f6ba/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d8905f1390d828d745fdd1904374c90386d902d3cfa9ee88e9875099f75a4e17" }, - { url = "https://mirrors.aliyun.com/pypi/packages/5e/cd/739710c8cf0de461239db5bb6ee678c9a33d30aaa22beff55cc356781818/wcwidth-0.9.4-cp310-abi3-win32.whl", hash = "sha256:4831662c396dd4c59a016ec53c0ac96738006d653a00482777d9a2e2ea323d62" }, - { url = "https://mirrors.aliyun.com/pypi/packages/d6/f1/c123f902bc2ff9e9c2ab66241b8872204df87cbb18ecdf035e120860fedc/wcwidth-0.9.4-cp310-abi3-win_amd64.whl", hash = "sha256:f28d77153303450ee13ebbe888297e75cf532c754555b6cabafc9bdda16c421c" }, - { url = "https://mirrors.aliyun.com/pypi/packages/4b/88/1cb5ddaf5510b918e01aa95fc4b68df91dead784b63e4931037c5673e85f/wcwidth-0.9.4-cp310-abi3-win_arm64.whl", hash = "sha256:2b58fc8cf2de1bf9cdb68b8beaa5be198742414a7c8cd97aa51ec039783ffa49" }, - { url = "https://mirrors.aliyun.com/pypi/packages/6f/0c/309b1813b230d1dbbd6f2c2ab2bb21ef68992358977605d9ef289bbfedcc/wcwidth-0.9.4-py3-none-any.whl", hash = "sha256:901eace6d2dd25ebb917d0ce5db18e5c537e1504c905cf32f0d006c12098b05d" }, + { url = "https://files.pythonhosted.org/packages/bf/b8/d251589a100250b71a7b8e83fedfcabfd8bd60e78cd1e3329372f63bcc93/wcwidth-0.9.4-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b7969c9aa258d536df54c8ac8af5cad0c74a6268c9972e1fb60a5f29feffb66d", size = 612952, upload-time = "2026-10-24T18:10:55.925Z" }, + { url = "https://files.pythonhosted.org/packages/04/e9/dfdca30ca36c472de3e260406dee29fc108499ec590c63b3fe279887ee9d/wcwidth-0.9.4-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:f279f32c8e206a9092fa350e53ca0c2bd8072e45b1c9fd31bb6d476b59b591c4", size = 618904, upload-time = "2026-10-24T18:11:02.008Z" }, + { url = "https://files.pythonhosted.org/packages/5d/b6/d7416f38054a107d2fb17c2b73b68723c6c334f69c4e29545fb9e6df81eb/wcwidth-0.9.4-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:a1526cd25c6420e5153bb7d764c7509e692215ee3ad9b725db1ad665d47eae09", size = 778780, upload-time = "2026-10-24T18:11:17.299Z" }, + { url = "https://files.pythonhosted.org/packages/7d/5b/42bdf9a4b0e4f9126584af2ec73642de495f3bd8add907430f13c3bb98d2/wcwidth-0.9.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:093469e01d881bff3db93ff3f56c364dc87c441ea01f9f41c22de0c0bdf5c6ef", size = 789012, upload-time = "2026-10-24T18:11:07.829Z" }, + { url = "https://files.pythonhosted.org/packages/fa/e8/0485850748dfdba9443f4151c7b2442cfa4987ba6cd871038eb5d6b8eca9/wcwidth-0.9.4-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b185c8b927b23af2721be1783499d1cfa5c028b098b0858951b4ae224477f1c2", size = 785946, upload-time = "2026-10-24T18:11:18.748Z" }, + { url = "https://files.pythonhosted.org/packages/e9/11/dd3d0379c6094524df6585b76ae3d9727161ff29c003177e3661c36437c1/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:17619066f95c10f44d7ae08ee456602456bc66cc9d5e91966ec73d799acebc5f", size = 795348, upload-time = "2026-10-24T18:11:09.931Z" }, + { url = "https://files.pythonhosted.org/packages/3c/48/1b5299983d9ec084be897162b7cc6014622dfe62847224fa3272b6d79ea5/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:b52f265a694dda6b3ad9050c8bd89158ad519109ef7c5eb110b906cc49f25763", size = 793420, upload-time = "2026-10-24T18:11:20.551Z" }, + { url = "https://files.pythonhosted.org/packages/7a/be/e3097d859b075344a7be57774a58d468eafb0ca88e02aad93eb31d69f6ba/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d8905f1390d828d745fdd1904374c90386d902d3cfa9ee88e9875099f75a4e17", size = 796192, upload-time = "2026-10-24T18:11:22.552Z" }, + { url = "https://files.pythonhosted.org/packages/5e/cd/739710c8cf0de461239db5bb6ee678c9a33d30aaa22beff55cc356781818/wcwidth-0.9.4-cp310-abi3-win32.whl", hash = "sha256:4831662c396dd4c59a016ec53c0ac96738006d653a00482777d9a2e2ea323d62", size = 593229, upload-time = "2026-10-24T18:11:35.609Z" }, + { url = "https://files.pythonhosted.org/packages/d6/f1/c123f902bc2ff9e9c2ab66241b8872204df87cbb18ecdf035e120860fedc/wcwidth-0.9.4-cp310-abi3-win_amd64.whl", hash = "sha256:f28d77153303450ee13ebbe888297e75cf532c754555b6cabafc9bdda16c421c", size = 597780, upload-time = "2026-10-24T18:11:36.952Z" }, + { url = "https://files.pythonhosted.org/packages/4b/88/1cb5ddaf5510b918e01aa95fc4b68df91dead784b63e4931037c5673e85f/wcwidth-0.9.4-cp310-abi3-win_arm64.whl", hash = "sha256:2b58fc8cf2de1bf9cdb68b8beaa5be198742414a7c8cd97aa51ec039783ffa49", size = 598786, upload-time = "2026-10-24T18:11:30.886Z" }, + { url = "https://files.pythonhosted.org/packages/6f/0c/309b1813b230d1dbbd6f2c2ab2bb21ef68992358977605d9ef289bbfedcc/wcwidth-0.9.4-py3-none-any.whl", hash = "sha256:901eace6d2dd25ebb917d0ce5db18e5c537e1504c905cf32f0d006c12098b05d", size = 301806, upload-time = "2026-10-24T18:10:52.651Z" }, ] [[package]] name = "websockets" version = "17.4" -source = { registry = "https://mirrors.aliyun.com/pypi/simple" } -sdist = { url = "https://mirrors.aliyun.com/pypi/packages/75/79/590c5f0cc7d1661195aeefccb0e342b79f4c77d368d526d028821a390332/websockets-17.4.tar.gz", hash = "sha256:09d3939b70df0c8ad2da145ebd50978bccaee1d565e838b0e7921a34d38571eb" } +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/75/79/590c5f0cc7d1661195aeefccb0e342b79f4c77d368d526d028821a390332/websockets-17.4.tar.gz", hash = "sha256:09d3939b70df0c8ad2da145ebd50978bccaee1d565e838b0e7921a34d38571eb", size = 191391, upload-time = "2026-10-30T15:10:35.873Z" } wheels = [ - { url = "https://mirrors.aliyun.com/pypi/packages/af/71/b020221345ea6c012dcf7496827a48a744b58696470b2b07fef95a32905a/websockets-17.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3d512e3a6c528c42ce220ed9c3caff83c6fdcd98a1b98249f08ccfc66ad111b1" }, - { url = "https://mirrors.aliyun.com/pypi/packages/8e/84/1c372ae7c032021a84e5c9e9b76b0dddefb354e9b4af783a97efd4d80ab3/websockets-17.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7390e060f830b3d132f484b21ac2783a2d227b682ef62bb8146e1c1b4ca0e45a" }, - { url = "https://mirrors.aliyun.com/pypi/packages/74/b6/cff249107473f149c6c916a49cba967379fa63b0a7d2dce6896d6848f0a3/websockets-17.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bcad49104711f88b2b7c3ba166de172857d837248205e541b044a552558fecc3" }, - { url = "https://mirrors.aliyun.com/pypi/packages/77/5d/aff8ecbf1c55c4d96f6dacc46a52102895f58b85bb284c8d325aaf31606a/websockets-17.4-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cf99debb17227a50620aee16647bb33a0387f5fa5418d628666c0f05745e0d2a" }, - { url = "https://mirrors.aliyun.com/pypi/packages/cb/18/6229d6583031ca81d092a0cd887a13a57b402fb555acc323d39b45967eb7/websockets-17.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9ae1429ee9e52b139167ed0169757806a27ed7307e942e8c62037a9184e9843b" }, - { url = "https://mirrors.aliyun.com/pypi/packages/b8/61/7aba018fd53873e792a25afe1f4c005518133477b727d7455f2f7550c425/websockets-17.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51adfc30f467077293a6695d8149bcef501c0728386f3a491054f835dadb60b2" }, - { url = "https://mirrors.aliyun.com/pypi/packages/fb/66/37b207df9cdacaa017aa4487f3a9f2fcd668f6f7cfbafdac5b95ea258ee0/websockets-17.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c564d1e6531611bf87078c28780456ecc75459dcca189629fff2fe7c020d8e67" }, - { url = "https://mirrors.aliyun.com/pypi/packages/ad/f6/87507e11fbae53817a435945273953b5b020589e309fac4fd60527ee5999/websockets-17.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4c792e6cce24d08f92199d907785c9e64f74c357deeed3dbaf7d699ed5930b64" }, - { url = "https://mirrors.aliyun.com/pypi/packages/2f/3d/90a04f0aa989b68fbd2efcd38237420afe2abe5a1cab0b5d7c2aa4f0dbb6/websockets-17.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c44776f82b04e623eb9e1b81fcd17ac6e9808ae1ba5cdf8edce1f7c869a95a9b" }, - { url = "https://mirrors.aliyun.com/pypi/packages/ad/3e/50952af22b8e3e2d03f7e83f0e335851c6b484c3fd88586626fb1c2a34b3/websockets-17.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4d2636a5b61c69e32db0e74b57073dd4a66f1ad195e9398c5f01bba41090deea" }, - { url = "https://mirrors.aliyun.com/pypi/packages/c4/73/2a4a5d9c6bca1127f24af7bf08f406a69052d7f341bc81f08d9e8eb446b4/websockets-17.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cfbbba4597f19ad717f79fd3f2a67ae7efae647bd6a61e14554e1b5ad242a5bf" }, - { url = "https://mirrors.aliyun.com/pypi/packages/68/de/90d96a579839bfe541ef214315df81d2bd519d952847c303328518ffdd02/websockets-17.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c7b996c02de5e032cb63dc65482b73693b7ecaa586654126be2749ddea239c40" }, - { url = "https://mirrors.aliyun.com/pypi/packages/91/17/12c15ed446d842e40918cd16e79b56ee4422d6fbf210258cb8882f50bbd5/websockets-17.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a920e99155d75d1b1c08172da8aaa7200e7b30871fb628d1631d7891a333e30e" }, - { url = "https://mirrors.aliyun.com/pypi/packages/9d/73/cb4c927e806a73a0377696e031ef3c0db409028cdb2373f96ee863e8df8e/websockets-17.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8c00c5c49f80a588a2c4f99d519d2abed4ce26cdca11273041bc8b7e60af60de" }, - { url = "https://mirrors.aliyun.com/pypi/packages/33/b3/e682b3ea069933044f4bf4809eea0cd83e3a5bdbdff601d1777a9ae90795/websockets-17.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:52c31d123f5adf14dec694c2a4036bf42c523df7cefc641d31cd05653de56e49" }, - { url = "https://mirrors.aliyun.com/pypi/packages/2d/e9/d039757260705e5a265a31c9fff36b0d4567b842ce2b54e5d14369f200bd/websockets-17.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d0acd8191c0e5a61d1c27bfa33b6ec8431982299f5d71c02129aa4f16f182ad0" }, - { url = "https://mirrors.aliyun.com/pypi/packages/db/e7/cb9907fac6f9b28f93beded6efda2953960cd02b633d432acf3451590859/websockets-17.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2a9cb5bbfc33b4ebd3c8d3714d6e09805437f60a14977774e4bd11b5ace46c23" }, - { url = "https://mirrors.aliyun.com/pypi/packages/39/99/85f6f4dd104a5d9a33a1ef272f501d0f2e8527ddf66be1b383d51f90ce56/websockets-17.4-cp312-cp312-win32.whl", hash = "sha256:c63c0d7832956d5f3bb77888b93c854569d13f806289ff75c43926d25c6e5fd2" }, - { url = "https://mirrors.aliyun.com/pypi/packages/59/31/d1636ba67ee9232a60033d90483e48686aa3856014e59110f29015f97bd2/websockets-17.4-cp312-cp312-win_amd64.whl", hash = "sha256:dde9cd67f18803949ebf96de8aba12b8ec5ee3115e34c75a2db85a3b0a6c20d5" }, - { url = "https://mirrors.aliyun.com/pypi/packages/23/aa/e3859d52188f041a5a05c9f3ac005a9c829723f521f0fe60e2c5f9c93bb9/websockets-17.4-cp312-cp312-win_arm64.whl", hash = "sha256:c634053459278cf31fb404ddb5ecd38124e4609e8b609166da621edc2d5796db" }, - { url = "https://mirrors.aliyun.com/pypi/packages/e9/a3/d8fbc72c5c0e78905caf2d6dcf806e532451e3f48e2a09a8ebe1de9ad412/websockets-17.4-pp312-pypy312_pp80-macosx_10_15_x86_64.whl", hash = "sha256:c7f66a53e9b7ec831abb15e3d9b6cee8f52d6a24cd0a374786bf46c3ec218bc6" }, - { url = "https://mirrors.aliyun.com/pypi/packages/d3/de/1bf313cd0f4662df4884a7602932cd13347090e59dd6047865eee2bb5aa5/websockets-17.4-pp312-pypy312_pp80-macosx_11_0_arm64.whl", hash = "sha256:4fb2db1f649b6464711846b5bb9c1611bd906ce939d9460cbd1fa419552cd6c3" }, - { url = "https://mirrors.aliyun.com/pypi/packages/30/e2/7912bd417511b54907853bd495aef2daee111062dbafd43d133a3f7253a7/websockets-17.4-pp312-pypy312_pp80-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:32110d954d9d0e51f36edb0396673bf4d35193a0a80ba7013bf7f7d58a33ca07" }, - { url = "https://mirrors.aliyun.com/pypi/packages/56/6f/2e8d5610f6184a2e1720bf8ce256402ed99ad30ea87c461fba5bc4d651d9/websockets-17.4-pp312-pypy312_pp80-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:88ba8a439b2bad97bb69c38db5bf0ec16a061ee834cf0f244089186ee803e899" }, - { url = "https://mirrors.aliyun.com/pypi/packages/29/3a/a05bc57eadcd7e8e072d917888128e6d22e1203984afb21a8da3198982fe/websockets-17.4-pp312-pypy312_pp80-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:868744c68e9342768888c7326604da2228c19bb6946aa46b5f9e1ac32ea8d40b" }, - { url = "https://mirrors.aliyun.com/pypi/packages/b2/49/eed86bfb8863093a82cbaa52c9159be1ce2374d5ace6fe1f8e8031567e7d/websockets-17.4-pp312-pypy312_pp80-win_amd64.whl", hash = "sha256:829bcaa90be8737c132d9515d6a466e8528e3b3d050d3f3466f36ea94d3beb48" }, - { url = "https://mirrors.aliyun.com/pypi/packages/eb/27/9db924cb0dbf22eade78d98fbae77790f9bf6bc729e6ab29aef9d68e4156/websockets-17.4-py3-none-any.whl", hash = "sha256:c6bd2c9781915592b209160d0f017d4c7c82ad53075e6b0c24d2a89299e7f9e9" }, + { url = "https://files.pythonhosted.org/packages/af/71/b020221345ea6c012dcf7496827a48a744b58696470b2b07fef95a32905a/websockets-17.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3d512e3a6c528c42ce220ed9c3caff83c6fdcd98a1b98249f08ccfc66ad111b1", size = 218779, upload-time = "2026-10-30T15:07:11.522Z" }, + { url = "https://files.pythonhosted.org/packages/8e/84/1c372ae7c032021a84e5c9e9b76b0dddefb354e9b4af783a97efd4d80ab3/websockets-17.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7390e060f830b3d132f484b21ac2783a2d227b682ef62bb8146e1c1b4ca0e45a", size = 216457, upload-time = "2026-10-30T15:07:13Z" }, + { url = "https://files.pythonhosted.org/packages/74/b6/cff249107473f149c6c916a49cba967379fa63b0a7d2dce6896d6848f0a3/websockets-17.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bcad49104711f88b2b7c3ba166de172857d837248205e541b044a552558fecc3", size = 216726, upload-time = "2026-10-30T15:07:14.468Z" }, + { url = "https://files.pythonhosted.org/packages/77/5d/aff8ecbf1c55c4d96f6dacc46a52102895f58b85bb284c8d325aaf31606a/websockets-17.4-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cf99debb17227a50620aee16647bb33a0387f5fa5418d628666c0f05745e0d2a", size = 226043, upload-time = "2026-10-30T15:07:15.937Z" }, + { url = "https://files.pythonhosted.org/packages/cb/18/6229d6583031ca81d092a0cd887a13a57b402fb555acc323d39b45967eb7/websockets-17.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9ae1429ee9e52b139167ed0169757806a27ed7307e942e8c62037a9184e9843b", size = 226321, upload-time = "2026-10-30T15:07:17.563Z" }, + { url = "https://files.pythonhosted.org/packages/b8/61/7aba018fd53873e792a25afe1f4c005518133477b727d7455f2f7550c425/websockets-17.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51adfc30f467077293a6695d8149bcef501c0728386f3a491054f835dadb60b2", size = 227559, upload-time = "2026-10-30T15:07:18.998Z" }, + { url = "https://files.pythonhosted.org/packages/fb/66/37b207df9cdacaa017aa4487f3a9f2fcd668f6f7cfbafdac5b95ea258ee0/websockets-17.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c564d1e6531611bf87078c28780456ecc75459dcca189629fff2fe7c020d8e67", size = 230386, upload-time = "2026-10-30T15:07:20.431Z" }, + { url = "https://files.pythonhosted.org/packages/ad/f6/87507e11fbae53817a435945273953b5b020589e309fac4fd60527ee5999/websockets-17.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4c792e6cce24d08f92199d907785c9e64f74c357deeed3dbaf7d699ed5930b64", size = 228193, upload-time = "2026-10-30T15:07:22.112Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3d/90a04f0aa989b68fbd2efcd38237420afe2abe5a1cab0b5d7c2aa4f0dbb6/websockets-17.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c44776f82b04e623eb9e1b81fcd17ac6e9808ae1ba5cdf8edce1f7c869a95a9b", size = 226952, upload-time = "2026-10-30T15:07:23.643Z" }, + { url = "https://files.pythonhosted.org/packages/ad/3e/50952af22b8e3e2d03f7e83f0e335851c6b484c3fd88586626fb1c2a34b3/websockets-17.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4d2636a5b61c69e32db0e74b57073dd4a66f1ad195e9398c5f01bba41090deea", size = 224183, upload-time = "2026-10-30T15:07:25.507Z" }, + { url = "https://files.pythonhosted.org/packages/c4/73/2a4a5d9c6bca1127f24af7bf08f406a69052d7f341bc81f08d9e8eb446b4/websockets-17.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cfbbba4597f19ad717f79fd3f2a67ae7efae647bd6a61e14554e1b5ad242a5bf", size = 226991, upload-time = "2026-10-30T15:07:27.355Z" }, + { url = "https://files.pythonhosted.org/packages/68/de/90d96a579839bfe541ef214315df81d2bd519d952847c303328518ffdd02/websockets-17.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c7b996c02de5e032cb63dc65482b73693b7ecaa586654126be2749ddea239c40", size = 225600, upload-time = "2026-10-30T15:07:28.973Z" }, + { url = "https://files.pythonhosted.org/packages/91/17/12c15ed446d842e40918cd16e79b56ee4422d6fbf210258cb8882f50bbd5/websockets-17.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a920e99155d75d1b1c08172da8aaa7200e7b30871fb628d1631d7891a333e30e", size = 226366, upload-time = "2026-10-30T15:07:30.472Z" }, + { url = "https://files.pythonhosted.org/packages/9d/73/cb4c927e806a73a0377696e031ef3c0db409028cdb2373f96ee863e8df8e/websockets-17.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8c00c5c49f80a588a2c4f99d519d2abed4ce26cdca11273041bc8b7e60af60de", size = 227470, upload-time = "2026-10-30T15:07:32.122Z" }, + { url = "https://files.pythonhosted.org/packages/33/b3/e682b3ea069933044f4bf4809eea0cd83e3a5bdbdff601d1777a9ae90795/websockets-17.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:52c31d123f5adf14dec694c2a4036bf42c523df7cefc641d31cd05653de56e49", size = 225026, upload-time = "2026-10-30T15:07:33.544Z" }, + { url = "https://files.pythonhosted.org/packages/2d/e9/d039757260705e5a265a31c9fff36b0d4567b842ce2b54e5d14369f200bd/websockets-17.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d0acd8191c0e5a61d1c27bfa33b6ec8431982299f5d71c02129aa4f16f182ad0", size = 226007, upload-time = "2026-10-30T15:07:34.954Z" }, + { url = "https://files.pythonhosted.org/packages/db/e7/cb9907fac6f9b28f93beded6efda2953960cd02b633d432acf3451590859/websockets-17.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2a9cb5bbfc33b4ebd3c8d3714d6e09805437f60a14977774e4bd11b5ace46c23", size = 226286, upload-time = "2026-10-30T15:07:36.292Z" }, + { url = "https://files.pythonhosted.org/packages/39/99/85f6f4dd104a5d9a33a1ef272f501d0f2e8527ddf66be1b383d51f90ce56/websockets-17.4-cp312-cp312-win32.whl", hash = "sha256:c63c0d7832956d5f3bb77888b93c854569d13f806289ff75c43926d25c6e5fd2", size = 219256, upload-time = "2026-10-30T15:07:37.686Z" }, + { url = "https://files.pythonhosted.org/packages/59/31/d1636ba67ee9232a60033d90483e48686aa3856014e59110f29015f97bd2/websockets-17.4-cp312-cp312-win_amd64.whl", hash = "sha256:dde9cd67f18803949ebf96de8aba12b8ec5ee3115e34c75a2db85a3b0a6c20d5", size = 219561, upload-time = "2026-10-30T15:07:39.19Z" }, + { url = "https://files.pythonhosted.org/packages/23/aa/e3859d52188f041a5a05c9f3ac005a9c829723f521f0fe60e2c5f9c93bb9/websockets-17.4-cp312-cp312-win_arm64.whl", hash = "sha256:c634053459278cf31fb404ddb5ecd38124e4609e8b609166da621edc2d5796db", size = 219487, upload-time = "2026-10-30T15:07:41.161Z" }, + { url = "https://files.pythonhosted.org/packages/e9/a3/d8fbc72c5c0e78905caf2d6dcf806e532451e3f48e2a09a8ebe1de9ad412/websockets-17.4-pp312-pypy312_pp80-macosx_10_15_x86_64.whl", hash = "sha256:c7f66a53e9b7ec831abb15e3d9b6cee8f52d6a24cd0a374786bf46c3ec218bc6", size = 216397, upload-time = "2026-10-30T15:10:25.255Z" }, + { url = "https://files.pythonhosted.org/packages/d3/de/1bf313cd0f4662df4884a7602932cd13347090e59dd6047865eee2bb5aa5/websockets-17.4-pp312-pypy312_pp80-macosx_11_0_arm64.whl", hash = "sha256:4fb2db1f649b6464711846b5bb9c1611bd906ce939d9460cbd1fa419552cd6c3", size = 216664, upload-time = "2026-10-30T15:10:27.016Z" }, + { url = "https://files.pythonhosted.org/packages/30/e2/7912bd417511b54907853bd495aef2daee111062dbafd43d133a3f7253a7/websockets-17.4-pp312-pypy312_pp80-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:32110d954d9d0e51f36edb0396673bf4d35193a0a80ba7013bf7f7d58a33ca07", size = 217603, upload-time = "2026-10-30T15:10:28.475Z" }, + { url = "https://files.pythonhosted.org/packages/56/6f/2e8d5610f6184a2e1720bf8ce256402ed99ad30ea87c461fba5bc4d651d9/websockets-17.4-pp312-pypy312_pp80-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:88ba8a439b2bad97bb69c38db5bf0ec16a061ee834cf0f244089186ee803e899", size = 217489, upload-time = "2026-10-30T15:10:29.999Z" }, + { url = "https://files.pythonhosted.org/packages/29/3a/a05bc57eadcd7e8e072d917888128e6d22e1203984afb21a8da3198982fe/websockets-17.4-pp312-pypy312_pp80-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:868744c68e9342768888c7326604da2228c19bb6946aa46b5f9e1ac32ea8d40b", size = 218356, upload-time = "2026-10-30T15:10:31.432Z" }, + { url = "https://files.pythonhosted.org/packages/b2/49/eed86bfb8863093a82cbaa52c9159be1ce2374d5ace6fe1f8e8031567e7d/websockets-17.4-pp312-pypy312_pp80-win_amd64.whl", hash = "sha256:829bcaa90be8737c132d9515d6a466e8528e3b3d050d3f3466f36ea94d3beb48", size = 306838, upload-time = "2026-10-30T15:10:32.954Z" }, + { url = "https://files.pythonhosted.org/packages/eb/27/9db924cb0dbf22eade78d98fbae77790f9bf6bc729e6ab29aef9d68e4156/websockets-17.4-py3-none-any.whl", hash = "sha256:c6bd2c9781915592b209160d0f017d4c7c82ad53075e6b0c24d2a89299e7f9e9", size = 212900, upload-time = "2026-10-30T15:10:34.482Z" }, ] diff --git a/web/apps/console/e2e/health.spec.ts b/web/apps/console/e2e/health.spec.ts index 92d8bed..f023cc4 100644 --- a/web/apps/console/e2e/health.spec.ts +++ b/web/apps/console/e2e/health.spec.ts @@ -7,8 +7,23 @@ const evidenceDir = path.resolve( "../../../../docs/evidence/M01/ui", ); +async function signedInAdmin(page: import("@playwright/test").Page) { + await page.route("**/auth/me", async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/json", + body: JSON.stringify({ + success: true, + data: { subject: "admin-1", display_name: "Admin", roles: ["watchman-admin"] }, + request_id: "pw-me", + }), + }); + }); +} + test.describe("health three states", () => { test("loading then success", async ({ page }) => { + await signedInAdmin(page); await page.route("**/health", async (route) => { await new Promise((resolve) => setTimeout(resolve, 800)); await route.fulfill({ @@ -38,6 +53,7 @@ test.describe("health three states", () => { }); test("failure state", async ({ page }) => { + await signedInAdmin(page); await page.route("**/health", async (route) => { await route.fulfill({ status: 500, @@ -66,6 +82,7 @@ test.describe("health three states", () => { }); test("english locale via query override is readable", async ({ page }) => { + await signedInAdmin(page); await page.addInitScript(() => { window.localStorage.setItem("watchman.lang", "en"); }); diff --git a/web/apps/console/e2e/login.spec.ts b/web/apps/console/e2e/login.spec.ts new file mode 100644 index 0000000..5a1e9c5 --- /dev/null +++ b/web/apps/console/e2e/login.spec.ts @@ -0,0 +1,124 @@ +import { expect, test } from "@playwright/test"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const evidenceDir = path.resolve( + path.dirname(fileURLToPath(import.meta.url)), + "../../../../docs/evidence/M02/ui", +); + +function envelope(data: unknown) { + return JSON.stringify({ success: true, data, request_id: "pw-login" }); +} + +test.describe("login shell", () => { + test("sign in as an admin, see the shell, then sign out", async ({ page }) => { + await page.route("**/auth/me", async (route) => { + await route.fulfill({ + status: 401, + contentType: "application/json", + body: JSON.stringify({ + success: false, + error: { code: 41000, message: "Unauthorized", details: {}, retryable: false }, + request_id: "pw-anon", + }), + }); + }); + await page.route("**/auth/login", async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/json", + body: envelope({ + subject: "casdoor-subject-1", + display_name: "高昊宇", + roles: ["watchman-admin"], + }), + }); + }); + await page.route("**/health", async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/json", + body: envelope({ status: "ok", app: "watchman", version: "0.1.0" }), + }); + }); + await page.route("**/auth/logout", async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/json", + body: envelope({ logged_out: true }), + }); + }); + + await page.goto("/"); + await expect(page.getByTestId("login-submit")).toBeVisible(); + await page.getByTestId("login-username").locator("input").fill("26110002"); + await page.getByTestId("login-password").locator("input").fill("simulated-password"); + await page.getByTestId("login-submit").click(); + + await expect(page.getByTestId("shell-welcome")).toContainText("已登录:高昊宇"); + await expect(page.getByTestId("health-success")).toBeVisible(); + await expect(page.getByTestId("health-tag")).toContainText("健康检查成功"); + await page.screenshot({ path: path.join(evidenceDir, "login-success.png"), fullPage: true }); + + await page.getByTestId("logout").click(); + await expect(page.getByTestId("login-submit")).toBeVisible(); + await expect(page.getByTestId("shell-welcome")).toHaveCount(0); + }); + + test("failed sign-in stays on the form", async ({ page }) => { + await page.route("**/auth/me", async (route) => { + await route.fulfill({ + status: 401, + contentType: "application/json", + body: JSON.stringify({ + success: false, + error: { code: 41000, message: "Unauthorized", details: {}, retryable: false }, + request_id: "pw-anon", + }), + }); + }); + await page.route("**/auth/login", async (route) => { + await route.fulfill({ + status: 401, + contentType: "application/json", + body: JSON.stringify({ + success: false, + error: { code: 41000, message: "Invalid username or password", details: {}, retryable: false }, + request_id: "pw-bad", + }), + }); + }); + + await page.goto("/"); + await expect(page.getByTestId("login-submit")).toBeVisible(); + await page.getByTestId("login-username").locator("input").fill("26110002"); + await page.getByTestId("login-password").locator("input").fill("wrong-password"); + await page.getByTestId("login-submit").click(); + await expect(page.getByTestId("login-error")).toContainText("登录失败"); + await page.screenshot({ path: path.join(evidenceDir, "login-failed.png"), fullPage: true }); + }); + + test("a session without a Watchman role can sign out", async ({ page }) => { + await page.route("**/auth/me", async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/json", + body: envelope({ subject: "user-1", display_name: "No Role", roles: [] }), + }); + }); + await page.route("**/auth/logout", async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/json", + body: envelope({ logged_out: true }), + }); + }); + + await page.goto("/"); + await expect(page.getByTestId("forbidden")).toBeVisible(); + await page.screenshot({ path: path.join(evidenceDir, "login-forbidden.png"), fullPage: true }); + await page.getByTestId("logout").click(); + await expect(page.getByTestId("login-submit")).toBeVisible(); + }); +}); diff --git a/web/apps/console/locales/en/common.json b/web/apps/console/locales/en/common.json index a2a322d..a3bdfe1 100644 --- a/web/apps/console/locales/en/common.json +++ b/web/apps/console/locales/en/common.json @@ -1,5 +1,31 @@ { "appName": "Watchman", + "login": { + "title": "Sign in to Watchman", + "subtitle": "Use your company account to open the alert platform", + "eyebrow": "WATCHMAN · EARLY WARNING", + "heroEm": "visible", + "heroBefore": "Make exceptions ", + "submitting": "Signing in", + "account": "Account", + "accountPlaceholder": "Employee ID", + "passwordPlaceholder": "Password", + "cardTitle": "Sign in", + "theme": "Toggle theme", + "footer": "© 2026 和信精密 · HEXIN PRECISION", + "username": "Username", + "password": "Password", + "submit": "Sign in", + "failed": "Sign-in failed. Check the account and password.", + "unavailable": "Sign-in is temporarily unavailable. Try again shortly.", + "logout": "Sign out", + "forbiddenTitle": "No access", + "forbiddenBody": "This account is signed in, but it does not have a Watchman view, operate, or admin role.", + "fixture": "Local identity mode. This is not a production sign-in." + }, + "shell": { + "welcome": "Signed in: {name}" + }, "health": { "loading": "Checking health", "success": "Health check succeeded", diff --git a/web/apps/console/locales/th/common.json b/web/apps/console/locales/th/common.json index 18cb759..3bad15d 100644 --- a/web/apps/console/locales/th/common.json +++ b/web/apps/console/locales/th/common.json @@ -1,5 +1,31 @@ { "appName": "Watchman", + "login": { + "title": "เข้าสู่ Watchman", + "subtitle": "ใช้บัญชีบริษัทเพื่อเข้าสู่แพลตฟอร์มแจ้งเตือน", + "eyebrow": "WATCHMAN · EARLY WARNING", + "heroEm": "เห็นได้", + "heroBefore": "ทำให้ความผิดปกติ", + "submitting": "กำลังเข้าสู่ระบบ", + "account": "บัญชี", + "accountPlaceholder": "รหัสพนักงาน", + "passwordPlaceholder": "รหัสผ่าน", + "cardTitle": "เข้าสู่ระบบ", + "theme": "สลับธีม", + "footer": "© 2026 和信精密 · HEXIN PRECISION", + "username": "ชื่อผู้ใช้", + "password": "รหัสผ่าน", + "submit": "เข้าสู่ระบบ", + "failed": "เข้าสู่ระบบไม่สำเร็จ โปรดตรวจสอบบัญชีและรหัสผ่าน", + "unavailable": "บริการเข้าสู่ระบบไม่พร้อมชั่วคราว โปรดลองอีกครั้ง", + "logout": "ออกจากระบบ", + "forbiddenTitle": "ไม่มีสิทธิ์เข้าใช้", + "forbiddenBody": "บัญชีนี้เข้าสู่ระบบแล้ว แต่ไม่มีบทบาทดู ดำเนินการ หรือผู้ดูแลของ Watchman", + "fixture": "โหมดตัวตนภายในเครื่อง ไม่ใช่การเข้าสู่ระบบจริง" + }, + "shell": { + "welcome": "เข้าสู่ระบบแล้ว: {name}" + }, "health": { "loading": "กำลังตรวจสอบสถานะ", "success": "ตรวจสอบสถานะสำเร็จ", diff --git a/web/apps/console/locales/zh-CN/common.json b/web/apps/console/locales/zh-CN/common.json index f6bc8c2..e5ece62 100644 --- a/web/apps/console/locales/zh-CN/common.json +++ b/web/apps/console/locales/zh-CN/common.json @@ -1,5 +1,32 @@ { "appName": "Watchman", + "login": { + "title": "登录 Watchman", + "subtitle": "使用公司账号进入预警平台", + "eyebrow": "WATCHMAN · EARLY WARNING", + "hero": "让异常{em}被看见{/em}", + "heroEm": "被看见", + "heroBefore": "让异常", + "submitting": "登录中", + "account": "账号", + "accountPlaceholder": "工号 / 域账号", + "passwordPlaceholder": "请输入密码", + "cardTitle": "登录账户", + "theme": "切换昼夜", + "footer": "© 2026 和信精密 · HEXIN PRECISION", + "username": "用户名", + "password": "密码", + "submit": "登录", + "failed": "登录失败,请检查账号和密码", + "unavailable": "登录服务暂不可用,请稍后再试", + "logout": "退出", + "forbiddenTitle": "没有访问权限", + "forbiddenBody": "当前账号已登录,但没有 Watchman 的查看、处理或管理角色。", + "fixture": "本地身份模式,不能当作正式登录" + }, + "shell": { + "welcome": "已登录:{name}" + }, "health": { "loading": "健康检查加载中", "success": "健康检查成功", diff --git a/web/apps/console/locales/zh-TW/common.json b/web/apps/console/locales/zh-TW/common.json index d31539e..8ace80a 100644 --- a/web/apps/console/locales/zh-TW/common.json +++ b/web/apps/console/locales/zh-TW/common.json @@ -1,5 +1,31 @@ { "appName": "Watchman", + "login": { + "title": "登入 Watchman", + "subtitle": "使用公司帳號進入預警平台", + "eyebrow": "WATCHMAN · EARLY WARNING", + "heroEm": "被看見", + "heroBefore": "讓異常", + "submitting": "登入中", + "account": "帳號", + "accountPlaceholder": "工號 / 網域帳號", + "passwordPlaceholder": "請輸入密碼", + "cardTitle": "登入帳戶", + "theme": "切換晝夜", + "footer": "© 2026 和信精密 · HEXIN PRECISION", + "username": "使用者名稱", + "password": "密碼", + "submit": "登入", + "failed": "登入失敗,請檢查帳號和密碼", + "unavailable": "登入服務暫不可用,請稍後再試", + "logout": "登出", + "forbiddenTitle": "沒有存取權限", + "forbiddenBody": "目前帳號已登入,但沒有 Watchman 的查看、處理或管理角色。", + "fixture": "本地身分模式,不能當作正式登入" + }, + "shell": { + "welcome": "已登入:{name}" + }, "health": { "loading": "健康檢查載入中", "success": "健康檢查成功", diff --git a/web/apps/console/src/App.spec.ts b/web/apps/console/src/App.spec.ts index 317ef59..1305e44 100644 --- a/web/apps/console/src/App.spec.ts +++ b/web/apps/console/src/App.spec.ts @@ -1,4 +1,5 @@ import { flushPromises, mount } from "@vue/test-utils"; +import { createPinia } from "pinia"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { createI18n } from "vue-i18n"; import { BusinessError } from "@watchman/api"; @@ -18,6 +19,21 @@ import { requestJson } from "@watchman/api"; const mockedRequestJson = vi.mocked(requestJson); +const adminSession = { + subject: "admin-1", + display_name: "Admin", + roles: ["watchman-admin"], +}; + +function mockSessionThenHealth(health: () => Promise | unknown) { + mockedRequestJson.mockImplementation((input: string) => { + if (String(input).includes("/auth/me")) { + return Promise.resolve(adminSession); + } + return Promise.resolve(health()); + }); +} + function mountApp(locale = "zh-CN") { const i18n = createI18n({ legacy: false, @@ -31,7 +47,7 @@ function mountApp(locale = "zh-CN") { }); return mount(App, { global: { - plugins: [i18n], + plugins: [i18n, createPinia()], stubs: { ElConfigProvider: { template: "
" }, ElCard: { @@ -54,29 +70,33 @@ function mountApp(locale = "zh-CN") { describe("App health three states", () => { beforeEach(() => { + sessionStorage.clear(); mockedRequestJson.mockReset(); }); - it("shows loading before the request settles", async () => { - let resolveRequest: (value: unknown) => void = () => undefined; - mockedRequestJson.mockImplementation( - () => - new Promise((resolve) => { - resolveRequest = resolve; - }), - ); + it("shows loading before the health request settles", async () => { + let resolveHealth: (value: unknown) => void = () => undefined; + mockedRequestJson.mockImplementation((input: string) => { + if (String(input).includes("/auth/me")) { + return Promise.resolve(adminSession); + } + return new Promise((resolve) => { + resolveHealth = resolve; + }); + }); const wrapper = mountApp(); + await flushPromises(); expect(wrapper.get("[data-testid=health-loading]").text()).toContain("健康检查加载中"); - resolveRequest({ status: "ok", app: "watchman", version: "0.1.0" }); + resolveHealth({ status: "ok", app: "watchman", version: "0.1.0" }); await flushPromises(); }); it("shows success after a healthy response", async () => { - mockedRequestJson.mockResolvedValue({ + mockSessionThenHealth(() => ({ status: "ok", app: "watchman", version: "0.1.0", - }); + })); const wrapper = mountApp(); await flushPromises(); expect(wrapper.get("[data-testid=health-tag]").text()).toContain("健康检查成功"); @@ -84,14 +104,19 @@ describe("App health three states", () => { }); it("shows failure after a BusinessError", async () => { - mockedRequestJson.mockRejectedValue( - new BusinessError({ - code: 50000, - message: "Internal server error", - status: 500, - requestId: "req-fail", - }), - ); + mockedRequestJson.mockImplementation((input: string) => { + if (String(input).includes("/auth/me")) { + return Promise.resolve(adminSession); + } + return Promise.reject( + new BusinessError({ + code: 50000, + message: "Internal server error", + status: 500, + requestId: "req-fail", + }), + ); + }); const wrapper = mountApp(); await flushPromises(); expect(wrapper.get("[data-testid=health-tag]").text()).toContain("健康检查失败"); @@ -99,25 +124,36 @@ describe("App health three states", () => { }); it("falls back to zh-CN when locale messages are missing", async () => { - mockedRequestJson.mockResolvedValue({ + mockSessionThenHealth(() => ({ status: "ok", app: "watchman", version: "0.1.0", - }); + })); const wrapper = mountApp("th"); await flushPromises(); expect(wrapper.get("[data-testid=health-tag]").text()).toContain("健康检查成功"); }); it("shows english health copy when locale is en", async () => { - mockedRequestJson.mockResolvedValue({ + mockSessionThenHealth(() => ({ status: "ok", app: "watchman", version: "0.1.0", - }); + })); const wrapper = mountApp("en"); await flushPromises(); expect(wrapper.get("[data-testid=health-tag]").text()).toContain("Health check succeeded"); expect(wrapper.get("[data-testid=health-success]").text()).toContain("Service available"); }); + + it("shows the no-access screen when the session has no Watchman role", async () => { + mockedRequestJson.mockResolvedValue({ + subject: "user-1", + display_name: "No Role", + roles: [], + }); + const wrapper = mountApp(); + await flushPromises(); + expect(wrapper.text()).toContain("没有访问权限"); + }); }); diff --git a/web/apps/console/src/App.vue b/web/apps/console/src/App.vue index 3f18951..edbece5 100644 --- a/web/apps/console/src/App.vue +++ b/web/apps/console/src/App.vue @@ -1,18 +1,22 @@