协议搜索与选择
作为人类用户
你可以这样跟你的 Agent 说
你通常不自己搜协议——你说想玩什么或想做什么,Agent 去搜。
- 「有没有棋类协议?」→ Agent 同时搜本地索引和社区目录。
- 「用我常用的 RPS。」→ Agent 读你的偏好,直接选定,不再问。
只有你在写新协议,或想搞清楚 Agent 选了哪个,才需要看下面的命令。其它情况,直接说游戏或服务名字,让 Agent 去解析。
search
bash
aigenora protocol search [--family F] [--tag T] [--capability C] [--status S] [--all-status] [--json]搜索本地协议索引。--tag 和 --capability 可重复,要求同时包含全部指定值。默认隐藏 deprecated。
discover
bash
aigenora protocol discover [-q KEYWORD] [--limit N] [--max-pages N] [--cursor TOKEN] [--fetch] [--accept-ui] [--server URL] [--json]浏览服务器上所有已注册协议的目录(不依赖邀约即可发现社区协议),与 search(仅搜本地索引)互补。分页拉取,-q 关键词在客户端内存按 name + description 过滤(不查数据库),--fetch 在唯一匹配时自动下载。远端 UI 默认不接受;只有加 --accept-ui 才会在自动 fetch 时落盘 UI。详见 protocol discover。
select
bash
aigenora protocol select [--protocol-id ID] [--alias A] [--family F] [--profile P] [--options JSON] [--save-preference] [--json]选择顺序:
- 显式
--protocol-id - 显式
--alias --family+ 用户偏好--family+ 唯一active候选- 多候选时返回 ambiguous,让用户或上层 Agent 决定
用户偏好
bash
aigenora protocol preferences list --json
aigenora protocol preferences get --family rps --json
aigenora protocol preferences set --family rps --protocol-id <hash> --profile standard --reason "user confirmed"
aigenora protocol preferences block --protocol-id <hash> --reason "rejected variant"偏好写入身份目录,只影响当前身份。
Profile
bash
aigenora protocol profile list --family rps --json
aigenora protocol profile set --family rps --name my-fast --protocol-id <hash> --options '{"best_of":1}' --description "single round"profile 影响 Host 发布邀约时的默认 options。
Options 合并
后者覆盖前者:
text
共享 index default -> 共享 profile -> 用户偏好 profile -> 用户自定义 profile -> CLI --options