sync-codex-health 拉 health/alive/endpoints(key 文件 600); e2e --from-endpoints 真调中转;余额不足单独 break;refresh 不覆盖 call 结果。
164 lines
8 KiB
Markdown
164 lines
8 KiB
Markdown
# 蛮荒 · 供应链作战室(v9)
|
||
|
||
> 定位:AI / OSINT **能力供应链** 全景——自产、外购、支付、号池、消费、出口、风险。
|
||
> 不是 FMHY 链接墙,不是单纯黑市购物清单。
|
||
|
||
## 价值链
|
||
|
||
```
|
||
支付(碎银) → 原料(接码/邮箱/代理) → 自产(密令注册机) → 号池(Codex/API)
|
||
→ 消费(接口探活) → 工程(Agent) → 出口(机场/Clash + Tor 分轨)
|
||
风险旁路:帮派(威胁) · 密室(暴露面)
|
||
外购旁路:黑市(明面 demand/实价) · 鬼市(隐渠/TG/发卡/onion 线索)
|
||
网络供应链(横切):N0–N5 见 manhuang-net-path.md(系统代理/串线/geo)
|
||
```
|
||
|
||
> **2026-07-13**:出口环已从「Tor + 公开代理 alive 大数」升级为 **机场路径优先**;
|
||
> 详情与实测 → [manhuang-net-path.md](./manhuang-net-path.md)。
|
||
> **约定**:Mac **系统代理必须 ON**(否则上不了外网);神州隔离 = Clash **rule + 生产 DIRECT**,不靠关代理。
|
||
|
||
## 导航顺序(一级)
|
||
|
||
总览 → 密令 → 黑市 → 碎银 → 接口 → Agent → 通道 → 帮派 → 密室 → (辅线)鬼市/匠人/游侠/剑客/社区/资料/数据源
|
||
|
||
## 关键数据
|
||
|
||
| 字段 | 含义 |
|
||
|------|------|
|
||
| `manhuang.chain` | **chain_v2**:六环 + `breaks[]` + `top_break` + `path_id` |
|
||
| `chain.breaks[]` | 结构化断点:`reason` / `ring` / `level` / `next` / `owner` / `sla_hint` |
|
||
| `chain.sms` / `pool_meta` | 接码单点 · 号池 burn 趋势 |
|
||
| `blackmarket.skus[].shelf` | `demand` / `market` / `anchor` / `empty` |
|
||
| `blackmarket.skus[].demand_link` | 关联 capability |
|
||
| `blackmarket.demand[].sku_ids` | 关联 SKU |
|
||
| `summary.attention_score` | **breaks + 环 err 加权**(非库存繁荣) |
|
||
| `summary.path_id` / `top_break_reason` | 出口路径 ID · 当前首要 reason |
|
||
|
||
### chain_break reason(节选)
|
||
|
||
`pool_empty` · `pool_burn_fast` · `sms_single_source` · `sms_missing` · `path_serial` · `path_sys_proxy_off` · `path_stale` · `relay_down` · `consume_all_fail` · `pay_no_rail` · `pay_msrp_only` · `tor_down`
|
||
|
||
总览驾驶舱展示 **Top break**;其余 breaks 折叠。出口 `path_id` 由 controller+mode+selected+egress 哈希(无订阅明文)。
|
||
|
||
### Board 闭环(breaks → observe)
|
||
|
||
```bash
|
||
bash scripts/manhuang/clashctl chain-breaks # 写 ~/.cache/manhuang/chain/breaks.json
|
||
bash scripts/manhuang/clashctl board --dry-run
|
||
bash scripts/manhuang/clashctl board # 真发 P-manhuang-net
|
||
```
|
||
|
||
- 源:`chain/breaks.json` + dashboard `chain.breaks` + net_path actions
|
||
- kind=`chain_break` · family=observe · crit 节流 6h / warn 12h
|
||
- `run-quote-probe.sh` 在 notify 后也会 refresh breaks 再 `actions-to-board`
|
||
|
||
### 支付轨最小真值
|
||
|
||
- `chain.pay`:礼品卡/虚拟卡/edu 的 **市价 vs 仅 MSRP**(无余额、不成交)
|
||
- GGSel `price_wme` 解析;`clashctl pay-probe`
|
||
- **面值归一**:`face_min/max` + `discount`(fixed)/ `discount_at_min|max`(multi-denom)
|
||
- multi-denom 不报单一折扣率,避免误读
|
||
- 碎银 tab 轨质检含折扣列
|
||
|
||
### 端到端 + 号池同步 + 接码策略
|
||
|
||
```bash
|
||
# 号池:scout → Mac 约定路径(含 health;endpoints 含 key → chmod 600)
|
||
bash scripts/manhuang/clashctl sync-codex --refresh-quick
|
||
|
||
# 端到端:路径 E0–E3;真实调用用 endpoints 或 env
|
||
bash scripts/manhuang/clashctl e2e
|
||
bash scripts/manhuang/clashctl e2e --call --from-endpoints # 不打印 key
|
||
|
||
# 接码单点策略
|
||
cp configs/manhuang/chain-policy.example.json ~/.config/manhuang/chain-policy.json
|
||
# sms_single_source_accepted: true → 单点不抬 warn
|
||
```
|
||
|
||
| 路径 | 内容 |
|
||
|------|------|
|
||
| `~/data/codex-tokens/health-status.json` | 额度统计(无密钥) |
|
||
| `~/data/codex-tokens/api-endpoints.json` | 中转 base+key(**600**,勿提交) |
|
||
| `~/.cache/manhuang/e2e/status.json` | 最近 e2e 结果 |
|
||
|
||
|
||
## 成功标准
|
||
|
||
1. 10 秒内看到 **Top break**(reason + next + owner),不只是哪一环红
|
||
2. Codex 全死时总览/密令/黑市同一危机叙事(`pool_empty`)
|
||
3. 接码 **单点** 显式 `sms_single_source`(禁止把 shutdown 当第二源)
|
||
4. 黑市主视野 = 需求 + 实价;锚价折叠
|
||
5. 默认进 **总览驾驶舱**(chain_v2)
|
||
|
||
## UI 增强(A–D)
|
||
|
||
| 项 | 内容 |
|
||
|----|------|
|
||
| A | `demand_probe`:上次 demand-first 时间、灰市实价命中数、挂旗状态(总览/黑市/数据源) |
|
||
| B | 全部 `actions[].tab` 可点「打开 →」 |
|
||
| C | 黑市需求货架 **仅 demand_link**;锚价默认折叠 |
|
||
| D | 密令 tab 顶部 **Codex 四步清单**(池无额时) |
|
||
|
||
## 相关脚本
|
||
|
||
完整运维闭环见 **[manhuang-handbook.md](./manhuang-handbook.md)**。
|
||
|
||
- `scripts/manhuang/run-quote-probe.sh` — 报价探针 + tab-caches + 中转探活 + 链通知
|
||
- `scripts/manhuang/probe-ai-account-quotes.py --demand-first` — 仅打供应链关键 SKU
|
||
- `scripts/manhuang/build-tab-caches.py` — 新鲜度 / handbooks / price_moves
|
||
- `scripts/manhuang/probe-named-relays.py` — **E** 具名中转 + providers.yaml 动态候选(reverse 跳过)
|
||
- `scripts/manhuang/probe-community-prices.py` — awesome 价 + OpenRouter + **5sim** + **free** + **LiteLLM MSRP**
|
||
- `scripts/manhuang/probe-changedetection.py` — ai-team CD 状态 / suggested watches
|
||
- `scripts/manhuang/quote-aggregator.py` — **本地只读 Quote API** `:8877`(含 `/v1/msrp` `/v1/free`)
|
||
- `scripts/manhuang/notify-chain.sh` — **F** 链危机 / 大价差 / 中转 down → `vm-dm konqi`(2h 节流;失败写 `~/office/konqi/inbox`)
|
||
- `scripts/manhuang/validate-channels.py` — channels.json 结构校验
|
||
- 渠道目录:`configs/manhuang/channels.json`(v2 平台+FunPay lots;**SMS-Activate=shutdown**)
|
||
- 产品类型:`configs/manhuang/product-types.json`
|
||
- 市场目录:`docs/ops/manhuang-markets-catalog.md`
|
||
- 详述:`docs/ops/manhuang-channels-and-quote-api.md`
|
||
- 全量核实:`docs/ops/manhuang-full-audit-2026-07-12.md`
|
||
- 链危机日志:`~/.cache/manhuang/chain-alerts.jsonl`(本地,不经 NATS)
|
||
- 中转状态:`~/.cache/manhuang/relays/status.json` → API 字段 `manhuang.relays`
|
||
|
||
接码主路径 **仅 5sim guest**。SMS-Activate 2025-12 官方停运,勿充值、勿当 needs_key。
|
||
|
||
## 具名中转(E)
|
||
|
||
| 配置 | 路径 |
|
||
|------|------|
|
||
| 仓库默认 | `configs/manhuang/relays.json` |
|
||
| 本地覆盖 | `~/.config/manhuang/relays.json` |
|
||
| 探针输出 | `~/.cache/manhuang/relays/status.json` |
|
||
| UI | 总览 / 密令 / 接口 · 具名中转卡 |
|
||
|
||
无 API key:HTTP 200–499 算站活着(401/403 也算 ok);>3s 标 `slow`。
|
||
|
||
## 链通知(F)
|
||
|
||
触发:`chain.crisis` / Codex 池无额 / 价差 Δ≥1 / 中转 `down`。
|
||
节流:同 `mode` 2h(`CHAIN_NOTIFY_THROTTLE_S`,戳记 `~/.cache/manhuang/.chain-notify.last`)。
|
||
通道:`vm-dm konqi` → 失败落盘 konqi inbox;**不改 NATS ACL**。
|
||
|
||
## 轮询策略
|
||
|
||
1. **launchd 每 30min** 跑 `run-quote-probe.sh`(无参智能调度):
|
||
- 存在 `.demand-probe.request` → `--demand-first --force`
|
||
- 否则 quotes 年龄 ≥ 3.5h → `--rotate --force`
|
||
- 否则 skip 报价外网;**仍跑** named-relays + notify-chain(轻量)
|
||
2. **collect 自动挂旗**:链危机 / 需求货架无 marketplace 实价 → 写 request(90min 节流)
|
||
3. 手动:`--demand-first --force` 或 `--rotate --force`;`probe-named-relays.py`;`notify-chain.sh --force`
|
||
4. 旗文件:`~/.cache/manhuang/quotes/.demand-probe.request` · 成功后 `.demand-probe.last`
|
||
|
||
## 导航(一级靠前)
|
||
|
||
总览 → 密令 → 黑市(明面)→ 鬼市(隐市/暗网)→ 碎银 → 接口 → Agent → 通道 → 帮派 → 密室 → 数据源 → 辅线…
|
||
|
||
### 黑市 vs 鬼市
|
||
|
||
| | 黑市 | 鬼市 |
|
||
|--|------|------|
|
||
| 定位 | 明面货架、可 probe 实价 | 隐渠 + 暗网层 |
|
||
| 例子 | GGSel / FunPay / Plati / **5sim** | TG/X 信号、发卡、闲鱼、论坛、Ahmia/onion |
|
||
| 数据 | `blackmarket.skus` + heishi channels | `guishi.channels` + shops + Tor |
|
||
|
||
中转备注:`geshihua` / `uiuiapi` 2026-07-12 核实 **down**(SSL);主用 openrouter/yunwu/bltcy/tokenx24。
|