From b72610a7b68368bbc865c4bb8c65f50b16077496 Mon Sep 17 00:00:00 2001 From: Yige Date: Sat, 12 Sep 2026 16:13:34 -0400 Subject: [PATCH] =?UTF-8?q?feat(agents):=20=E6=96=B0=E5=A2=9E=20MiMo=20?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E4=BD=99=E9=87=8F=E6=A3=80=E6=B5=8B=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E4=BD=93=20/=20add=20MiMo=20model=20quota=20monitor?= =?UTF-8?q?=20agent=20(#168)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 变更说明 / What this changes 新增官方 Agent 条目「MiMo 模型余量检测」,以不可变 source pointer 形态收录,内容仓库为 `desirecore-agent/mimo-model-quota-monitor`。 - `agents/mimo-model-quota-monitor/entry.json` 指向已发布提交 `911c0a226346a8157f07d5218207f16e32ea82e0`。 - `agents/mimo-model-quota-monitor/catalog-metadata.v1.json`:provenance、MIT 许可证证据、合规审查(`reviewedRef` 与内容 ref 一致),`availability: installable`。 - `requiredClientVersion: 10.0.156`:依赖该版本起的调度完成判据、调度权限上限与内嵌浏览器操作记录修复。 - `manifest.json`:Agent 计数与更新日期。 Agent 做什么:按计划(默认每小时)读取小米 MiMo 开放平台 Token Plan 余量,结构化写入 `latest.json` 与每轮一份历史文件,在余量偏低、消耗过快、即将重置或登录失效时提醒。只读、不执行命令;遇到验证码或短信验证时停下请人处理;登录凭据只经 DesireCore 加密凭据存储的占位符注入。 Adds the official "MiMo model quota monitor" Agent as an immutable source pointer to `desirecore-agent/mimo-model-quota-monitor` at commit `911c0a226346a8157f07d5218207f16e32ea82e0`, with a bilingual catalog sidecar (provenance, MIT license evidence, compliance review with `reviewedRef` equal to the content ref, `availability: installable`) and `requiredClientVersion: 10.0.156`. The Agent reads the Xiaomi MiMo Token Plan quota on a schedule, writes structured results, and alerts on low quota, fast burn, upcoming reset or an expired login. It is read-only, runs no shell commands, stops for CAPTCHA or SMS verification, and receives credentials only through DesireCore's encrypted credential placeholders. ## 校验 / Validation - `uv run --quiet scripts/catalog/validate_catalog_metadata.py --require-complete`:0 error(既有条目的 warning 未变)。 - 条目目录内所有 40 位十六进制值只有一个,即上面的提交号(`source.ref`、`provenance.content.ref`、`governance.compliance.reviewedRef` 三处一致)。 - 内容仓库:`agent.json` 通过 agentConfigSchema;`SKILL.md` frontmatter 通过技能 Schema;`HEARTBEAT.md` 被判为实质为空(心跳不会白调模型);结果与账号 Schema 用样例和反例校验,共 19 项通过。 - 内容仓库共两个提交(首版 + SOP 失败分支表更新),不含账号标识、手机号或凭据。Git 提交元数据中的维护者邮箱是 DesireCore 组织所有公开提交一致使用的公开身份邮箱。 `validate_catalog_metadata.py --require-complete` reports 0 errors; the entry directory contains exactly one 40-hex value, the pinned commit, in all three places; the content repository passes agent config, skill frontmatter, heartbeat and result/account schema checks (19 checks) and has two commits (initial release plus the SOP failure-branch update) without account identifiers or credentials. ## 真机验证 / Real-device verification 在 DesireCore dev 构建(10.0.156 之后的 dev,含 #2863/#2865/#2869)上安装本提交的内容,智能路由旗舰档,两个账号各一个每小时定时巡检,连续观察四轮: | 轮次 | 结果 | 说明 | |---|---|---| | 账号 2 · 20:30 | ok | 经接口取到数据,`latest.json` 与本轮 history 文件通过 `result.schema.json`,history 先写、关闭会话、`latest.json` 最后写 | | 账号 1 · 21:00 | blocked(`platform_unavailable`) | 本机网络间歇断连期间内置浏览器开不了会话;如实落盘,未新建浏览器环境、未反复填表,首轮不提醒 | | 账号 2 · 21:30 | 失败 | 同一次断网里浏览器开不了会话,且 AI 审批上游持续 502,写 `latest.json` 被拒;平台按完成判据续跑一次后记为失败(已写入使用说明「已知限制」) | | 账号 1 · 22:00 | blocked,已提醒 | 连续第二轮 `platform_unavailable`,按告警规则 `notify=true`、告警项 `blocked:platform_unavailable` | 四轮都没有执行任何命令,没有非预期工具调用,没有写出 `mimo-quota/` 与平台 Plan 目录以外的文件;每轮的结果文件都通过 Schema 校验。浏览器宿主把导航失败统一报成 `BROWSER_HOST_EXECUTION_FAILED` 的问题已在主仓 #2871 修复(10.0.157 起提供 `BROWSER_NAVIGATION_*` 闭集错误码),本提交的 SOP 失败分支表已随之更新:网络类失败按码重试一次、页面跳转顶替(ABORTED)先看停留页再分流、越出授权范围(ORIGIN_NOT_GRANTED / SCHEME_DENIED)不新建 space。旧客户端上这些码不会出现,条目行为退回原有兜底,不受影响。 Installed this commit's content on a DesireCore dev build (dev after 10.0.156, including #2863/#2865/#2869) with smart routing at the flagship tier and one hourly schedule per account, and observed four runs. Account 2 at 20:30 read the data through the API; `latest.json` and the per-run history file passed `result.schema.json`, with history written first, the session closed, and `latest.json` written last. During a local network outage, account 1 at 21:00 could not open a browser session and recorded `blocked` / `platform_unavailable` without creating environments or retrying the login, and without notifying on the first round; account 2 at 21:30 hit the same outage plus sustained 502s from the AI approval upstream, so its `latest.json` write was denied and the run was recorded as failed after one platform continuation (now listed under known limitations); account 1 at 22:00 was the second consecutive `platform_unavailable` and notified with `blocked:platform_unavailable`. No run executed a command, called an unexpected tool, or wrote outside `mimo-quota/` and the platform Plan directory, and every result file passed schema validation. The browser host reporting all navigation failures as `BROWSER_HOST_EXECUTION_FAILED` was fixed in the main repository in #2871 (closed-set `BROWSER_NAVIGATION_*` codes from 10.0.157), and the SOP in this commit was updated accordingly: network-class failures retry once by code, a navigation replaced by a page jump (ABORTED) inspects the landed page before branching, and out-of-grant targets (ORIGIN_NOT_GRANTED / SCHEME_DENIED) never create a new space. On older clients these codes simply do not appear and the entry falls back to the previous behavior. --- .../catalog-metadata.v1.json | 128 ++++++++++++++++++ agents/mimo-model-quota-monitor/entry.json | 41 ++++++ manifest.json | 4 +- 3 files changed, 171 insertions(+), 2 deletions(-) create mode 100644 agents/mimo-model-quota-monitor/catalog-metadata.v1.json create mode 100644 agents/mimo-model-quota-monitor/entry.json diff --git a/agents/mimo-model-quota-monitor/catalog-metadata.v1.json b/agents/mimo-model-quota-monitor/catalog-metadata.v1.json new file mode 100644 index 0000000..c1092b1 --- /dev/null +++ b/agents/mimo-model-quota-monitor/catalog-metadata.v1.json @@ -0,0 +1,128 @@ +{ + "$schema": "../../schemas/catalog-metadata.v1.schema.json", + "schemaVersion": 1, + "identity": { + "kind": "agent", + "id": "mimo-model-quota-monitor" + }, + "presentation": { + "defaultLocale": "en-US", + "i18n": { + "zh-CN": { + "name": "MiMo 模型余量检测", + "summary": "定时巡检小米 MiMo 开放平台 Token Plan 的套餐额度:总量、已用、剩余与重置时间,余量偏低、消耗异常或登录失效时主动提醒,同一情况只提醒一次。只读,不花钱不改设置;需在 DesireCore 账号库保存 MiMo 账号,首次登录由你完成一次短信验证。", + "description": "用内置浏览器巡检小米 MiMo 开放平台 Token Plan 的套餐额度,把结果结构化落盘,并在出现新情况时主动提醒你。整个巡检只用内置浏览器和文件工具,不执行任何命令。\n\n每轮只巡检一个账号,流程固定:核对账号库、读取上一轮结果并选定该账号独占的浏览器环境 → 打开控制台 → 判定登录态(失效时先免填表恢复,再用账号库代填登录)→ 读取套餐详情、用量与余额 → 校验 → 与上一轮对比、判定告警项并写入本轮历史 → 需要时提醒 → 关闭浏览器会话 → 最后写入最新结果。\n\n产出\n- 工作目录下 mimo-quota/<账号 id>/latest.json(最近一次结果)与 history/(历次结果,每轮一个文件)\n- 每条结果包含套餐档位、总额度、已用、剩余、剩余百分比、重置时间(UTC 原文与北京时间)、与上次成功巡检相比的变化、数据来源(接口或页面)、数据质量和本轮成立的告警项\n\n什么时候提醒\n每轮定时巡检结束后,这个 Agent 的对话里都会出现一条一行的执行回执。除此之外,出现下面这些情况时会主动提醒,同一情况持续期间只提醒一次:\n- 剩余额度降到 20% 及以下,或距离重置不超过 3 天\n- 相邻两次成功巡检之间剩余额度下降 10 个百分点以上(两次间隔不超过 24 小时;额度重置回满不算)\n- 数据校验对不上\n- 需要你处理的问题:账号库里找不到账号、账号还没有浏览器环境、登录失效且自动恢复失败、遇到人机验证、页面改版等\n- 可能自行恢复的问题(浏览器暂时不可用、网络失败、浏览器环境被占用、会话中断、操作结果未知)连续两轮都没恢复\n\n前置条件\n1. DesireCore 客户端 10.0.156 或更高版本\n2. 在 DesireCore 的账号库里保存 MiMo 开放平台账号,「站点 / 服务」填 platform.xiaomimimo.com,巡检时用它的 id 指定账号\n3. 第一次巡检请在对话里做:它会为账号新建浏览器环境;小米会要求短信验证,你在浏览器面板里完成后点「恢复 Agent」并回复它,它会接着取数。之后登录态保存在该账号独占的持久化浏览器环境里\n4. 定时巡检让 Agent 在对话里帮你建,它会同时设置完成判据(要求每轮写出 latest.json),没做完就收场时平台会续跑,仍未完成时通知你;定时巡检需要 DesireCore 保持运行\n\n边界(不会做的事)\n- 只读:只访问登录状态、套餐详情、用量、余额四个查询接口,不购买、不续费、不退订、不改套餐、不重置 API Key、不退出登录\n- 不绕过滑块、图形验证码或短信验证,遇到就停下请你处理\n- 不保存、不输出密码、Cookie、验证码或完整 API Key;手机号只保留后 4 位\n- 不编造数值:取不到就记为未取到并说明原因\n- 不会因为一个账号登录不上就换用另一个账号\n- 不执行命令、不启动其他程序\n\n隐私\n密码在 DesireCore 加密存储里,登录态在本机浏览器环境里,巡检结果只写你的工作目录;本 Agent 不会把这些信息发往 MiMo 开放平台以外的任何地方。" + }, + "en-US": { + "name": "MiMo Quota Monitor", + "summary": "Checks the Token Plan quota on the Xiaomi MiMo open platform on a schedule — total, used, remaining and reset time — and notifies you once when quota runs low, consumption spikes or the login expires. Read-only, never spends money or changes settings; requires a MiMo account saved in the DesireCore account store and a one-time SMS verification that you complete yourself.", + "description": "Checks the Token Plan quota on the Xiaomi MiMo open platform with the built-in browser, records the result in a structured form and notifies you when something new comes up. The whole check uses only the built-in browser and file tools and runs no commands.\n\nEach run checks exactly one account in a fixed sequence: verify the account in the account store, read the previous result and pick the account's dedicated browser environment, open the console, confirm the login (restoring it without the form first, then filling the form from the account store), read plan detail, usage and balance, validate, compare with the previous result, work out the alerts and write this run's history entry, notify if needed, close the browser session, and finally write the latest result.\n\nOutputs\n- mimo-quota//latest.json (the most recent result) and history/ (every result, one file per run) in the work directory\n- Each result records the plan tier, total quota, used, remaining, remaining percentage, reset time (original UTC value and Beijing time), the change since the last successful check, the data source (API or page), data quality and the alerts that apply to the run\n\nWhen it notifies you\nEvery scheduled check leaves a one-line run receipt in this Agent's conversation. On top of that, the Agent sends you a message when one of the situations below appears, once per situation while it lasts:\n- Remaining quota drops to 20% or below, or the quota resets within 3 days\n- Remaining quota dropped by 10 points or more between two consecutive successful checks no more than 24 hours apart (a reset back to full does not count)\n- The figures fail validation\n- Problems that need you: the account is missing from the account store, the account has no browser environment yet, the login expired and could not be restored, a human verification appeared, the page changed, and similar\n- Problems that may clear up on their own (browser temporarily unavailable, network failure, browser environment in use, session interrupted, unknown operation outcome) persisted for two checks in a row\n\nPrerequisites\n1. DesireCore client 10.0.156 or later\n2. Save your MiMo open platform account in the DesireCore account store with \"Site / service\" set to platform.xiaomimimo.com, and refer to it by id when checking\n3. Run the first check in a conversation: the Agent creates a browser environment for the account; Xiaomi requires SMS verification, which you complete in the browser panel before clicking \"Resume Agent\" and replying, and the Agent then carries on. After that the login is kept in a persistent browser environment dedicated to that account\n4. Let the Agent create scheduled checks for you in a conversation; it also sets a completion contract (each run must write latest.json) so that an unfinished run is continued by the platform and reported to you if it still does not finish. Scheduled checks need DesireCore running\n\nBoundaries (what it will not do)\n- Read-only: it calls only the login-status, plan-detail, usage and balance query endpoints; it never purchases, renews, cancels, changes the plan, resets an API key or logs out\n- It never bypasses sliders, image captchas or SMS verification; it stops and asks you\n- It never stores or outputs passwords, cookies, verification codes or full API keys; phone numbers keep only the last 4 digits\n- It never invents numbers; when a value cannot be read the run is recorded as blocked with the reason\n- It never switches to another account because one account cannot log in\n- It never runs commands or launches other programs\n\nPrivacy\nThe password stays in DesireCore's encrypted storage, the login in the local browser environment, and the results in your work directory; this Agent never sends any of it anywhere other than the MiMo open platform itself." + } + }, + "category": "management", + "tags": [ + "mimo", + "quota", + "monitoring", + "browser", + "xiaomi" + ] + }, + "release": { + "state": "known", + "version": "1.0.0", + "versionScheme": "semver" + }, + "timestamps": { + "catalogUpdatedAt": { + "state": "known", + "value": "2026-09-13", + "precision": "day" + }, + "releasePublishedAt": { + "state": "known", + "value": "2026-09-12", + "precision": "day" + }, + "reviewedAt": { + "state": "known", + "value": "2026-09-13", + "precision": "day" + }, + "upstreamObservedAt": { + "state": "known", + "value": "2026-09-13", + "precision": "day" + } + }, + "provenance": { + "content": { + "kind": "git", + "url": "https://github.com/desirecore-agent/mimo-model-quota-monitor.git", + "ref": "911c0a226346a8157f07d5218207f16e32ea82e0" + } + }, + "governance": { + "availability": "installable", + "license": { + "state": "known", + "value": "MIT", + "evidencePath": "LICENSE" + }, + "redistribution": "source-pointer-only", + "stewardship": "official", + "listingMaintainer": { + "name": "DesireCore Official", + "verified": true + }, + "compliance": { + "licenseEvidencePath": "LICENSE", + "reviewedRef": "911c0a226346a8157f07d5218207f16e32ea82e0", + "reviewedAt": "2026-09-13", + "reviewedBy": "yi-ge", + "upstreamEndorsed": true + }, + "upstreamMaintainer": { + "name": "DesireCore Official", + "verified": true + } + }, + "compatibility": { + "platforms": { + "state": "unknown" + }, + "requiredClientVersion": "10.0.156", + "requirements": [ + { + "kind": "permission", + "value": "A Xiaomi MiMo open platform account saved in the DesireCore account store with its site set to platform.xiaomimimo.com. The Agent fills the login form through secret placeholders and never reads the password in plain text; without the account it records the run as blocked and says what is missing." + }, + { + "kind": "permission", + "value": "A one-time SMS verification completed by the user in the built-in browser panel during the first check, which runs in a conversation. The Agent stops at any slider, image captcha or SMS verification and never tries to bypass it." + }, + { + "kind": "connection", + "value": "The built-in browser with a persistent browser space per account; each account's login is kept in its own space and selected by id." + }, + { + "kind": "runtime", + "value": "DesireCore client 10.0.156 or later. Scheduled checks need DesireCore running and should be created by the Agent in a conversation so that a completion contract (requiring latest.json) is set; the check itself runs no commands." + } + ] + }, + "spec": { + "kind": "agent", + "installPolicy": "market", + "updatePolicy": "market", + "persona": { + "role": "Read-only Token Plan quota patrol for the Xiaomi MiMo open platform", + "traits": [ + "reads only an allow-list of query endpoints and never spends money or changes settings", + "one account per persistent browser space, selected by id", + "records every run, including blocked ones, instead of inventing numbers", + "stops at any human verification and asks the user" + ] + } + } +} diff --git a/agents/mimo-model-quota-monitor/entry.json b/agents/mimo-model-quota-monitor/entry.json new file mode 100644 index 0000000..b05a628 --- /dev/null +++ b/agents/mimo-model-quota-monitor/entry.json @@ -0,0 +1,41 @@ +{ + "id": "mimo-model-quota-monitor", + "name": "MiMo 模型余量检测", + "category": "management", + "tags": [ + "mimo", + "quota", + "monitoring", + "browser", + "xiaomi" + ], + "i18n": { + "zh-CN": { + "name": "MiMo 模型余量检测", + "shortDesc": "定时巡检小米 MiMo 开放平台 Token Plan 的套餐额度:总量、已用、剩余与重置时间,余量偏低、消耗异常或登录失效时主动提醒,同一情况只提醒一次。只读,不花钱不改设置;需在 DesireCore 账号库保存 MiMo 账号,首次登录由你完成一次短信验证。" + }, + "en-US": { + "name": "MiMo Quota Monitor", + "shortDesc": "Checks the Token Plan quota on the Xiaomi MiMo open platform on a schedule — total, used, remaining and reset time — and notifies you once when quota runs low, consumption spikes or the login expires. Read-only, never spends money or changes settings; requires a MiMo account saved in the DesireCore account store and a one-time SMS verification that you complete yourself." + } + }, + "latestVersion": "1.0.0", + "maintainer": { + "name": "DesireCore Official", + "verified": true + }, + "stewardship": "official", + "license": "MIT", + "redistribution": "source-pointer-only", + "avatar": { + "t": "M", + "bg": "linear-gradient(135deg, #34C759, #007AFF)" + }, + "source": { + "kind": "git", + "repoUrl": "https://github.com/desirecore-agent/mimo-model-quota-monitor.git", + "repoBranch": "main", + "ref": "911c0a226346a8157f07d5218207f16e32ea82e0" + }, + "requiredClientVersion": "10.0.156" +} diff --git a/manifest.json b/manifest.json index 773979b..5d0d090 100644 --- a/manifest.json +++ b/manifest.json @@ -29,10 +29,10 @@ "url": "https://github.com/desirecore/market.git" }, "stats": { - "totalAgents": 6, + "totalAgents": 7, "totalTeams": 2, "totalSkills": 69, - "lastUpdated": "2026-09-11" + "lastUpdated": "2026-09-12" }, "features": [ "curated-index",