Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(browser): remove plaintext credential fallback and defer token adapters

Dashada0f536da2c
diff --git a/packages/lizi-mcps/src/browser/opencli-recipes.test.ts b/packages/lizi-mcps/src/browser/opencli-recipes.test.ts
index 37dbb2f71a..4a9aad4c90 100644
--- a/packages/lizi-mcps/src/browser/opencli-recipes.test.ts
+++ b/packages/lizi-mcps/src/browser/opencli-recipes.test.ts
@@ -14,7 +14,7 @@ import { loadRecipes, RecipeSchema, type Recipe } from "./recipe-loader.js";
import { runRecipe } from "./recipe-runner.js";
import { executeAdapter, type IPage } from '@jackwener/opencli/cindy';
import { saveBase64ToFile } from '@jackwener/opencli/utils';
-import { withRecipeHost, recipeDiagnosticPath, recipeOutputPath, readRecipeFileSync } from '@jackwener/opencli/cindy/host';
+import { withRecipeHost, recipeDiagnosticPath, recipeOutputPath, readRecipeFileSync, readSecretJSON, writeSecretJSON } from '@jackwener/opencli/cindy/host';
import { mkdtemp, mkdir, writeFile, rm, readFile, realpath, access, readdir } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import path from 'node:path';
@@ -30,6 +30,7 @@ import { resolvePayload } from '../../../opencli-vendor/clis/zhihu/write-shared.
// @ts-expect-error Pinned upstream JavaScript helpers have no declarations.
import { prepareChatGPTFilePaths } from '../../../opencli-vendor/clis/chatgpt/utils.js';
import { readFileSync, openSync } from 'node:fs';
+import { AsyncResource } from 'node:async_hooks';
// @ts-expect-error Upstream JavaScript helpers have no declarations.
import { validateLocalReferences } from '../../../opencli-vendor/clis/midjourney/utils.js';
@@ -40,6 +41,40 @@ afterEach(() => {
});
describe("bundled OpenCLI recipes", () => {
+ // #6826 credentials-and-local-storage: production broker, unit tier. Prior
+ // file tests did not cover a missing encrypted entry with a legacy file present.
+ // Only invalid fixture credentials are written under an isolated temp root.
+ it('keeps secret reads and writes in the invoking host store, including missing entries and late calls', async () => {
+ const dir = await mkdtemp(path.join(tmpdir(), 'cindy-recipe-secret-test-'));
+ const legacy = path.join(dir, 'legacy.json');
+ await writeFile(legacy, JSON.stringify({ access_token: 'invalid-legacy-fixture' }));
+ const stores = [new Map<string, string>(), new Map([['fixture', JSON.stringify({ access_token: 'invalid-host-fixture' })]])];
+ let lateRead = () => readSecretJSON('fixture', legacy);
+ let lateWrite = () => writeSecretJSON('fixture', {});
+ try {
+ expect(() => readSecretJSON('fixture', legacy)).toThrow('host credential store');
+ await Promise.all(stores.map((values, i) => withRecipeHost({
+ read: key => values.get(key) ?? null,
+ write: (key, value) => { values.set(key, value); return true; },
+ }, async () => {
+ await Promise.resolve();
+ expect(readSecretJSON('fixture', legacy)).toEqual(i ? { access_token: 'invalid-host-fixture' } : null);
+ writeSecretJSON('fixture', { host: i });
+ await Promise.resolve();
+ expect(readSecretJSON('fixture', legacy)).toEqual({ host: i });
+ lateRead = AsyncResource.bind(() => readSecretJSON('fixture', legacy));
+ lateWrite = AsyncResource.bind(() => writeSecretJSON('fixture', {}));
+ })));
+ expect(lateRead).toThrow('host credential store');
+ expect(lateWrite).toThrow('host encrypted store');
+ await withRecipeHost({ read: () => '{invalid', write: () => false }, async () => {
+ expect(() => readSecretJSON('fixture', legacy)).toThrow();
+ expect(() => writeSecretJSON('fixture', {})).toThrow('host encrypted store');
+ });
+ expect(JSON.parse(await readFile(legacy, 'utf8'))).toEqual({ access_token: 'invalid-legacy-fixture' });
+ } finally { await rm(dir, { recursive: true, force: true }); }
+ });
+
// #6826 file boundary recurrence; unit tier. Real adapter input checks must
// reject an existing absolute path without the host before browser effects.
it.each(['mercury', 'wechat-channels', 'midjourney'])('brokers %s input metadata before browser effects', async site => {
@@ -692,13 +727,15 @@ describe("bundled OpenCLI recipes", () => {
const all = await query();
expect(all.ok).toBe(true);
expect(all.recipeCount).toBe(loadRecipes().size);
- for (const id of ['opencli:zlibrary/search', 'opencli:slock/task-create', 'opencli:claude/login', 'opencli:claude/ask', 'opencli:spotify/auth', 'opencli:spotify/status', 'opencli:ones/login', 'opencli:ones/token-info', 'books-list', 'hockey-search']) {
+ for (const id of ['opencli:zlibrary/search', 'opencli:slock/task-create', 'opencli:claude/login', 'opencli:claude/ask', 'opencli:spotify/auth', 'opencli:spotify/status', 'opencli:ones/login', 'opencli:ones/token-info', 'opencli:xiaoyuzhou/history', 'opencli:paperreview/submit', 'opencli:paperreview/review', 'opencli:paperreview/feedback', 'opencli:quark/share-tree', 'opencli:quark/save', 'books-list', 'hockey-search']) {
expect(JSON.stringify(all)).not.toContain(id);
const response = await client.callTool({ name: 'call_tool', arguments: { name: 'browser', args: { action: 'recipe', recipeId: id } } });
expect(JSON.parse((response.content as Array<{ text: string }>)[0].text).ok).toBe(false);
+ if (id.startsWith('opencli:')) await expect(executeAdapter(id.slice(8), {}, {} as IPage)).rejects.toThrow('Unknown bundled adapter');
}
expect(JSON.stringify(all)).toContain('open-library-search');
expect(JSON.stringify(all)).toContain('steam-reviews');
+ expect(JSON.stringify(all)).toContain('xiaoyuzhou-podcast');
const midjourney = await query('midjourney');
expect(midjourney.recipes.find((recipe: { id: string }) => recipe.id === 'opencli:midjourney/download').parameters.kind.choices)
.toEqual(['auto', 'image', 'video-raw']);
diff --git a/packages/lizi-mcps/src/browser/recipes/api.fxtwitter.com/siteguide.json b/packages/lizi-mcps/src/browser/recipes/api.fxtwitter.com/siteguide.json
index 906c3cfdee..fc536163ee 100644
--- a/packages/lizi-mcps/src/browser/recipes/api.fxtwitter.com/siteguide.json
+++ b/packages/lizi-mcps/src/browser/recipes/api.fxtwitter.com/siteguide.json
@@ -9,7 +9,7 @@
"recipes": [
"x-tweet"
],
- "notes": "读单条 X 公开推文最省最稳的路径,直接 navigate 到 API URL 再解析 body JSON,不碰 x.com 风控。响应 {code,message,tweet:{text,author:{screen_name,name,followers},replies,retweets,likes,quotes,bookmarks,views,created_at,lang,replying_to,media:{photos[],videos[]},quote}};code 404 = 不存在/已删/私密。x-tweet 配方封装 /status/<id> 并展平常用字段。另有免登录用户资料端点 /<screen_name>(响应 {code,message,user:{screen_name,name,followers,following,tweets,likes,description,joined,...}}),无需配方、照同样姿势 navigate + 解析即可,可替代需登录的 x.com twitter-profile 配方。能力边界:只覆盖单条推文与用户资料;时间线/搜索/回复列表这个 API 做不到——需要登录态走 x.com 内部 GraphQL(见 x.com siteguide)。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。",
+ "notes": "读单条 X 公开推文最省最稳的路径,直接 navigate 到 API URL 再解析 body JSON,不碰 x.com 风控。响应 {code,message,tweet:{text,author:{screen_name,name,followers},replies,retweets,likes,quotes,bookmarks,views,created_at,lang,replying_to,media:{photos[],videos[]},quote}};code 404 = 不存在/已删/私密。x-tweet 配方封装 /status/<id> 并展平常用字段。另有免登录用户资料端点 /<screen_name>(响应 {code,message,user:{screen_name,name,followers,following,tweets,likes,description,joined,...}}),无需配方、照同样姿势 navigate + 解析即可,可替代需登录的 x.com twitter-profile 配方。能力边界:只覆盖单条推文与用户资料;时间线/搜索/回复列表这个 API 做不到——需要登录态走 x.com 内部 GraphQL(见 x.com siteguide)。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。",
"upstream": {
"repository": "https://github.com/jackwener/opencli",
"revision": "fe5f1d96aff01c32fd84f86b52af922bfe6ca93f"
diff --git a/packages/lizi-mcps/src/browser/recipes/bbc.com/siteguide.json b/packages/lizi-mcps/src/browser/recipes/bbc.com/siteguide.json
index 027dd4a431..3aa9036861 100644
--- a/packages/lizi-mcps/src/browser/recipes/bbc.com/siteguide.json
+++ b/packages/lizi-mcps/src/browser/recipes/bbc.com/siteguide.json
@@ -11,7 +11,7 @@
"recipes": [
"bbc-news-feed"
],
- "notes": "BBC 的稳定免登录读接口是官方 RSS,host 是 feeds.bbci.co.uk(不是 bbc.com)。bbc-news-feed 配方的 section 入参拼到 https://feeds.bbci.co.uk/{section}/rss.xml:全站头条用 section=news,板块用 news/world、news/technology、news/business、news/health、news/science_and_environment,体育用 sport(或 sport/football 等)。返回是 RSS XML 文本(不是 JSON),每条新闻在 <item> 里:<title> 标题、<description> 摘要、<link> 文章链接、<pubDate> 发布时间、<guid> 唯一 id。需要正文要再 navigate 到 <link>。没有公开搜索 API,只能按板块拉取后本地过滤。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。",
+ "notes": "BBC 的稳定免登录读接口是官方 RSS,host 是 feeds.bbci.co.uk(不是 bbc.com)。bbc-news-feed 配方的 section 入参拼到 https://feeds.bbci.co.uk/{section}/rss.xml:全站头条用 section=news,板块用 news/world、news/technology、news/business、news/health、news/science_and_environment,体育用 sport(或 sport/football 等)。返回是 RSS XML 文本(不是 JSON),每条新闻在 <item> 里:<title> 标题、<description> 摘要、<link> 文章链接、<pubDate> 发布时间、<guid> 唯一 id。需要正文要再 navigate 到 <link>。没有公开搜索 API,只能按板块拉取后本地过滤。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。",
"upstream": {
"repository": "https://github.com/jackwener/opencli",
"revision": "fe5f1d96aff01c32fd84f86b52af922bfe6ca93f"
diff --git a/packages/lizi-mcps/src/browser/recipes/bloomberg.com/siteguide.json b/packages/lizi-mcps/src/browser/recipes/bloomberg.com/siteguide.json
index 2e3c4efb30..3faeceb82f 100644
--- a/packages/lizi-mcps/src/browser/recipes/bloomberg.com/siteguide.json
+++ b/packages/lizi-mcps/src/browser/recipes/bloomberg.com/siteguide.json
@@ -8,7 +8,7 @@
"recipes": [
"bloomberg-feed"
],
- "notes": "只做公开 RSS 头条,不做正文:Bloomberg 文章正文在 www.bloomberg.com 上是付费墙 + 机器人验证(__NEXT_DATA__ 里的 story.body,要有效订阅会话才看得到),不在浏览器配方覆盖范围,故跳过正文抓取。\nRSS 源完全公开、纯 XML,可直接 navigate 后读 document.body.innerText 用正则切 <item>(bloomberg-feed 配方已封装,结果直接在 output(已自动解包),字段 title/summary/link/pubDate)。频道 slug→URL(bloomberg-feed 配方拼 feeds.bloomberg.com/<section>/news.rss):markets→/markets/news.rss、technology→/technology/news.rss、economics→/economics/news.rss、politics→/politics/news.rss、industries→/industries/news.rss、businessweek→/businessweek/news.rss、opinions→/bview/news.rss。综合首页是独立源 https://feeds.bloomberg.com/news.rss(URL 里没有 section 路径段),不能通过 bloomberg-feed 的 section 入参拼出——section 不要填 news(会拼成不存在的 /news/news.rss);要综合首页就直接 navigate 上面这个 rssMain URL。每个 <item> 含 title/description/link/guid/pubDate 及 media:content|media:thumbnail|enclosure 的配图 url。拿到 link 后若需正文,只能靠用户自己的 Bloomberg 订阅会话在浏览器里打开。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。",
+ "notes": "只做公开 RSS 头条,不做正文:Bloomberg 文章正文在 www.bloomberg.com 上是付费墙 + 机器人验证(__NEXT_DATA__ 里的 story.body,要有效订阅会话才看得到),不在浏览器配方覆盖范围,故跳过正文抓取。\nRSS 源完全公开、纯 XML,可直接 navigate 后读 document.body.innerText 用正则切 <item>(bloomberg-feed 配方已封装,结果直接在 output(已自动解包),字段 title/summary/link/pubDate)。频道 slug→URL(bloomberg-feed 配方拼 feeds.bloomberg.com/<section>/news.rss):markets→/markets/news.rss、technology→/technology/news.rss、economics→/economics/news.rss、politics→/politics/news.rss、industries→/industries/news.rss、businessweek→/businessweek/news.rss、opinions→/bview/news.rss。综合首页是独立源 https://feeds.bloomberg.com/news.rss(URL 里没有 section 路径段),不能通过 bloomberg-feed 的 section 入参拼出——section 不要填 news(会拼成不存在的 /news/news.rss);要综合首页就直接 navigate 上面这个 rssMain URL。每个 <item> 含 title/description/link/guid/pubDate 及 media:content|media:thumbnail|enclosure 的配图 url。拿到 link 后若需正文,只能靠用户自己的 Bloomberg 订阅会话在浏览器里打开。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。",
"upstream": {
"repository": "https://github.com/jackwener/opencli",
"revision": "fe5f1d96aff01c32fd84f86b52af922bfe6ca93f"
diff --git a/packages/lizi-mcps/src/browser/recipes/coingecko.com/siteguide.json b/packages/lizi-mcps/src/browser/recipes/coingecko.com/siteguide.json
index cd6b0a3be7..922e8fdc4c 100644
--- a/packages/lizi-mcps/src/browser/recipes/coingecko.com/siteguide.json
+++ b/packages/lizi-mcps/src/browser/recipes/coingecko.com/siteguide.json
@@ -7,7 +7,7 @@
"recipes": [
"coingecko-search"
],
- "notes": "公开搜索接口。返回 JSON {coins:[{id,name,symbol,market_cap_rank,thumb,...}], exchanges:[...], categories:[...], nfts:[...]}。无需 key(公开 demo 接口有速率限制)。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。",
+ "notes": "公开搜索接口。返回 JSON {coins:[{id,name,symbol,market_cap_rank,thumb,...}], exchanges:[...], categories:[...], nfts:[...]}。无需 key(公开 demo 接口有速率限制)。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。",
"upstream": {
"repository": "https://github.com/jackwener/opencli",
"revision": "fe5f1d96aff01c32fd84f86b52af922bfe6ca93f"
diff --git a/packages/lizi-mcps/src/browser/recipes/lobste.rs/siteguide.json b/packages/lizi-mcps/src/browser/recipes/lobste.rs/siteguide.json
index 226537ab29..e2e05949de 100644
--- a/packages/lizi-mcps/src/browser/recipes/lobste.rs/siteguide.json
+++ b/packages/lizi-mcps/src/browser/recipes/lobste.rs/siteguide.json
@@ -10,7 +10,7 @@
"recipes": [
"lobsters-feed"
],
- "notes": "lobste.rs 的稳定读接口是各 feed 的 .json:hottest/newest/active(navigate 到该 URL 再 extract body 即拿 JSON 数组)。每条故事含 {short_id,title,url,score,comment_count,comments_url,created_at,submitter_user,tags,...}。按 tag 读用 https://lobste.rs/t/{tag}.json。注意:没有可用的 search.json(返回搜索页 HTML / 易被限流),要搜关键词只能拉 feed 后本地过滤。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。",
+ "notes": "lobste.rs 的稳定读接口是各 feed 的 .json:hottest/newest/active(navigate 到该 URL 再 extract body 即拿 JSON 数组)。每条故事含 {short_id,title,url,score,comment_count,comments_url,created_at,submitter_user,tags,...}。按 tag 读用 https://lobste.rs/t/{tag}.json。注意:没有可用的 search.json(返回搜索页 HTML / 易被限流),要搜关键词只能拉 feed 后本地过滤。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。",
"upstream": {
"repository": "https://github.com/jackwener/opencli",
"revision": "fe5f1d96aff01c32fd84f86b52af922bfe6ca93f"
diff --git a/packages/lizi-mcps/src/browser/recipes/mp.weixin.qq.com/siteguide.json b/packages/lizi-mcps/src/browser/recipes/mp.weixin.qq.com/siteguide.json
index 45820cb896..667107bd90 100644
--- a/packages/lizi-mcps/src/browser/recipes/mp.weixin.qq.com/siteguide.json
+++ b/packages/lizi-mcps/src/browser/recipes/mp.weixin.qq.com/siteguide.json
@@ -8,7 +8,7 @@
"recipes": [
"wechat-article"
],
- "notes": "关键选择器:标题 #activity-name、公众号名 #js_name、作者 #js_author_name(部分文章没有)、发布时间 #publish_time(由页面内联 JS 填充,load 后可读)、正文容器 #js_content。正文图片是懒加载:真实地址在 img[data-src] 而非 src;图片域名 mmbiz.qpic.cn 有防盗链,浏览器外直接下载需带 Referer: https://mp.weixin.qq.com/。wechat-article 配方返回全文文本(超 4 万字符截断并标 truncated)与图片地址列表。能力边界:mp.weixin.qq.com 没有免登录的搜索/列表接口,「列出某公众号历史文章」做不到,文章 URL 需由用户提供(聊天分享/收藏)。失败模式:#js_content 缺失 = 链接过期(带 chksm 的临时链接有时效)、文章被删除/违规屏蔽、或频繁访问触发环境验证页——遇验证页应停下告知用户,不要反复重试。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。",
+ "notes": "关键选择器:标题 #activity-name、公众号名 #js_name、作者 #js_author_name(部分文章没有)、发布时间 #publish_time(由页面内联 JS 填充,load 后可读)、正文容器 #js_content。正文图片是懒加载:真实地址在 img[data-src] 而非 src;图片域名 mmbiz.qpic.cn 有防盗链,浏览器外直接下载需带 Referer: https://mp.weixin.qq.com/。wechat-article 配方返回全文文本(超 4 万字符截断并标 truncated)与图片地址列表。能力边界:mp.weixin.qq.com 没有免登录的搜索/列表接口,「列出某公众号历史文章」做不到,文章 URL 需由用户提供(聊天分享/收藏)。失败模式:#js_content 缺失 = 链接过期(带 chksm 的临时链接有时效)、文章被删除/违规屏蔽、或频繁访问触发环境验证页——遇验证页应停下告知用户,不要反复重试。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。",
"upstream": {
"repository": "https://github.com/jackwener/opencli",
"revision": "fe5f1d96aff01c32fd84f86b52af922bfe6ca93f"
diff --git a/packages/lizi-mcps/src/browser/recipes/www.xiaoyuzhoufm.com/siteguide.json b/packages/lizi-mcps/src/browser/recipes/www.xiaoyuzhoufm.com/siteguide.json
index 0f8995286d..40cf9f65df 100644
--- a/packages/lizi-mcps/src/browser/recipes/www.xiaoyuzhoufm.com/siteguide.json
+++ b/packages/lizi-mcps/src/browser/recipes/www.xiaoyuzhoufm.com/siteguide.json
@@ -8,7 +8,7 @@
"recipes": [
"xiaoyuzhou-podcast"
],
- "notes": "策略:页面内 __NEXT_DATA__ 读取(免登录)。小宇宙没有公开稳定的搜索接口,只能按已知 ID 读详情(ID 取自 xiaoyuzhoufm.com 的 URL 路径)。关键:不要直接 navigate 到任何 ajax/api 子域(会要鉴权头);正确姿势是 navigate 到 /podcast/<id> 或 /episode/<id> 页面,wait load 后用 evaluate 读 window.__NEXT_DATA__.props.pageProps。结构:podcast 页 pageProps.podcast = {title, author, brief(简介), subscriptionCount(订阅数), episodeCount(单集总数), latestEpisodePubDate, episodes:[{eid, title, duration(秒), playCount, pubDate}]}(SSR 内嵌最近约 15 集);episode 页 pageProps.episode = {title, podcast:{title}, duration(秒), playCount, commentCount, clapCount(点赞), pubDate}。注意:用 curl 裸抓时若 ID 失效页面会回退到 /404 且 pageProps 为空 —— 这是 ID 问题,不是接口失效;务必用有效 ID 并在真浏览器里执行。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。",
+ "notes": "策略:页面内 __NEXT_DATA__ 读取(免登录)。小宇宙没有公开稳定的搜索接口,只能按已知 ID 读详情(ID 取自 xiaoyuzhoufm.com 的 URL 路径)。关键:不要直接 navigate 到任何 ajax/api 子域(会要鉴权头);正确姿势是 navigate 到 /podcast/<id> 或 /episode/<id> 页面,wait load 后用 evaluate 读 window.__NEXT_DATA__.props.pageProps。结构:podcast 页 pageProps.podcast = {title, author, brief(简介), subscriptionCount(订阅数), episodeCount(单集总数), latestEpisodePubDate, episodes:[{eid, title, duration(秒), playCount, pubDate}]}(SSR 内嵌最近约 15 集);episode 页 pageProps.episode = {title, podcast:{title}, duration(秒), playCount, commentCount, clapCount(点赞), pubDate}。注意:用 curl 裸抓时若 ID 失效页面会回退到 /404 且 pageProps 为空 —— 这是 ID 问题,不是接口失效;务必用有效 ID 并在真浏览器里执行。\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。",
"upstream": {
"repository": "https://github.com/jackwener/opencli",
"revision": "fe5f1d96aff01c32fd84f86b52af922bfe6ca93f"
diff --git a/packages/opencli-vendor/README.md b/packages/opencli-vendor/README.md
index 64514e9465..59303377ea 100644
--- a/packages/opencli-vendor/README.md
+++ b/packages/opencli-vendor/README.md
@@ -10,15 +10,15 @@
- 170 个站点/应用,1,223 条命令(916 read、307 write)。
- 1,112 个命令模块,所有生产共享代码、JSON 和其他资源一并引入;不引入上游测试。
-- 上游快照完整保留,但默认目录独立选择:排除 Z-Library 2 条、Slock 44 条、Claude.ai 9 条、Spotify 11 条和 ONES 8 条,
- 剩余 1,149 条命令、25 个上游别名。原因记录在 [selection.json](cindy/selection.json),
+- 上游快照完整保留,但默认目录独立选择:排除 Z-Library、Slock、Claude.ai、Spotify、ONES、
+ 小宇宙适配器、PaperReview 和 Quark 共 92 条,剩余 1,131 条命令、25 个上游别名。原因记录在 [selection.json](cindy/selection.json),
同步会沿用此选择,排除条目不进入模块导入表和可执行目录。
- Cindy 原有 56 个 ID:47 个转到新版适配器,7 个保留原流程,两个爬虫练习站移至
`packages/lizi-mcps/src/browser/recipe-examples`,不再出现在默认列表。
逐项记录见 [legacy-coverage.json](cindy/legacy-coverage.json)。
- Cindy 独立增加 App Store 搜索、Google Play 搜索、TapTap 中国站游戏详情、Steam 玩家评价、
Open Library 书目查询和 Crossref 文献/DOI 查询,共 6 个配方,位于
- `packages/lizi-mcps/src/browser/cindy-recipes`。共 1,234 个可发现 ID、171 份指南;这个数包含别名和兼容入口。
+ `packages/lizi-mcps/src/browser/cindy-recipes`。共 1,216 个可发现 ID、169 份指南;这个数包含别名和兼容入口。
- 兼容入口保持输入名,输出改为新版结构化结果;用户本地覆盖层仍优先于内置层。
通过 `browser(action="siteguide")` 查询精简完整目录;传 `site`(域名或上游站点名)
@@ -36,9 +36,11 @@
释放监听和连接。导航、上传仍走 Cindy 原有校验路径;代输入后的页面读取限制仍生效。
- 通用执行器不自动重放操作。Instagram reel 移除独立 daemon 和整次发布重试。
- Claude.ai 站点不进入默认目录,Claude 订阅沿用内置 Claude Code CLI 登录与使用。
-- Spotify 暂不进入默认目录:客户端密钥的明文文件配置尚未接入宿主加密凭据库;
- 保留完整来源,不增加新的凭据配置流程。小宇宙的新令牌只写宿主加密凭据库,
- 既有配置只在显式执行时读取,不删除旧配置或新增明文令牌文件。
+- Spotify 暂不进入默认目录:客户端密钥的明文文件配置尚未接入宿主加密凭据库。
+- 小宇宙适配器暂不进入默认目录:缺少安全配置入口;原有免登录公开播客配方保留。
+ 共享凭据读取仅查宿主加密凭据库,缺失时返回空值,不回退读取或迁移旧明文文件。
+- PaperReview 与 Quark 暂不进入默认目录:现有提交/查询/反馈、分享目录/转存入口
+ 会把可复用能力令牌放入模型结果或参数。完整来源保留,不增加配置或句柄存储机制。
- ONES 暂不进入默认目录:密码参数和令牌打印不符合宿主代输入及凭据边界。
登录继续使用已有的通用代输入流程,不新增站点专用配置。
- 文章 stdout 输出改为 MCP 返回值;
diff --git a/packages/opencli-vendor/cindy/host.ts b/packages/opencli-vendor/cindy/host.ts
index 3e28396389..1d8e25feb2 100644
--- a/packages/opencli-vendor/cindy/host.ts
+++ b/packages/opencli-vendor/cindy/host.ts
@@ -154,21 +154,15 @@ export function statRecipeFileSync(file: string): ReturnType<typeof fstatSync> {
finally { closeRecipeFileSync(descriptor); }
}
-/** Legacy OpenCLI files are read only on explicit execution, never on import.
- * Refreshed tokens are written exclusively through the host's encrypted store. */
-export function readSecretJSON(key: string, legacyPath: string): unknown {
+/** Secrets only come from the host encrypted store. The legacy path argument
+ * is accepted for pinned adapter compatibility, but is never read or migrated. */
+export function readSecretJSON(key: string, _legacyPath?: string): unknown {
const host = context.getStore();
const secrets = host?.closed ? undefined : host?.secrets;
if (!secrets)
throw new Error("This recipe requires the host credential store");
const stored = secrets.read(key);
- if (stored !== null) return JSON.parse(stored);
- try {
- return JSON.parse(readFileSync(legacyPath, "utf8"));
- } catch (error) {
- if ((error as NodeJS.ErrnoException).code === "ENOENT") return null;
- throw new Error("Existing recipe credentials could not be read");
- }
+ return stored === null ? null : JSON.parse(stored);
}
export function writeSecretJSON(key: string, value: unknown): void {
diff --git a/packages/opencli-vendor/cindy/modules.js b/packages/opencli-vendor/cindy/modules.js
index 03137fed23..2a1025820f 100644
--- a/packages/opencli-vendor/cindy/modules.js
+++ b/packages/opencli-vendor/cindy/modules.js
@@ -626,9 +626,6 @@ import "../clis/osv/query.js";
import "../clis/osv/vulnerability.js";
import "../clis/packagist/package.js";
import "../clis/packagist/search.js";
-import "../clis/paperreview/feedback.js";
-import "../clis/paperreview/review.js";
-import "../clis/paperreview/submit.js";
import "../clis/pinterest/board-create.js";
import "../clis/pinterest/board-delete.js";
import "../clis/pinterest/board-pins.js";
@@ -681,14 +678,6 @@ import "../clis/pubmed/review.js";
import "../clis/pubmed/search.js";
import "../clis/pypi/downloads.js";
import "../clis/pypi/package.js";
-import "../clis/quark/auth.js";
-import "../clis/quark/ls.js";
-import "../clis/quark/mkdir.js";
-import "../clis/quark/mv.js";
-import "../clis/quark/rename.js";
-import "../clis/quark/rm.js";
-import "../clis/quark/save.js";
-import "../clis/quark/share-tree.js";
import "../clis/qwen/ask.js";
import "../clis/qwen/auth.js";
import "../clis/qwen/detail.js";
@@ -964,12 +953,6 @@ import "../clis/xiaohongshu/saved.js";
import "../clis/xiaohongshu/search.js";
import "../clis/xiaohongshu/unfollow.js";
import "../clis/xiaohongshu/user.js";
-import "../clis/xiaoyuzhou/download.js";
-import "../clis/xiaoyuzhou/episode.js";
-import "../clis/xiaoyuzhou/history.js";
-import "../clis/xiaoyuzhou/podcast-episodes.js";
-import "../clis/xiaoyuzhou/podcast.js";
-import "../clis/xiaoyuzhou/transcript.js";
import "../clis/xueqiu/auth.js";
import "../clis/xueqiu/comments.js";
import "../clis/xueqiu/earnings-date.js";
@@ -1677,9 +1660,6 @@ export const modules = {
"osv/vulnerability.js": true,
"packagist/package.js": true,
"packagist/search.js": true,
- "paperreview/feedback.js": true,
- "paperreview/review.js": true,
- "paperreview/submit.js": true,
"pinterest/board-create.js": true,
"pinterest/board-delete.js": true,
"pinterest/board-pins.js": true,
@@ -1732,14 +1712,6 @@ export const modules = {
"pubmed/search.js": true,
"pypi/downloads.js": true,
"pypi/package.js": true,
- "quark/auth.js": true,
- "quark/ls.js": true,
- "quark/mkdir.js": true,
- "quark/mv.js": true,
- "quark/rename.js": true,
- "quark/rm.js": true,
- "quark/save.js": true,
- "quark/share-tree.js": true,
"qwen/ask.js": true,
"qwen/auth.js": true,
"qwen/detail.js": true,
@@ -2015,12 +1987,6 @@ export const modules = {
"xiaohongshu/search.js": true,
"xiaohongshu/unfollow.js": true,
"xiaohongshu/user.js": true,
- "xiaoyuzhou/download.js": true,
- "xiaoyuzhou/episode.js": true,
- "xiaoyuzhou/history.js": true,
- "xiaoyuzhou/podcast-episodes.js": true,
- "xiaoyuzhou/podcast.js": true,
- "xiaoyuzhou/transcript.js": true,
"xueqiu/auth.js": true,
"xueqiu/comments.js": true,
"xueqiu/earnings-date.js": true,
diff --git a/packages/opencli-vendor/cindy/selection.json b/packages/opencli-vendor/cindy/selection.json
index c8be9738b5..cc1a0d107a 100644
--- a/packages/opencli-vendor/cindy/selection.json
+++ b/packages/opencli-vendor/cindy/selection.json
@@ -4,6 +4,9 @@
"slock": "Deferred: app.slock.ai redirects to app.raft.build; the adapter still assumes the old origin and token storage. Revalidate before inclusion.",
"claude": "Excluded: Claude subscription login and use belong to the unmodified built-in Claude Code CLI, not a Claude.ai browser adapter (credentials-and-local-storage.md).",
"spotify": "Deferred: client credentials still depend on a plaintext spotify.env file. Do not bundle until credential configuration uses the host encrypted store.",
- "ones": "Deferred: the login adapter accepts account passwords as model inputs and prints reusable bearer tokens. Login must use the existing trusted input handoff instead."
+ "ones": "Deferred: the login adapter accepts account passwords as model inputs and prints reusable bearer tokens. Login must use the existing trusted input handoff instead.",
+ "xiaoyuzhou": "Deferred: authenticated adapters require manually configured access/refresh tokens without a host secure configuration entry. Plaintext credential fallback is removed; the independent public Cindy recipe remains available.",
+ "paperreview": "Deferred: submit returns a reusable review capability token and review/feedback accept it as a model input. Keep capability credentials inside the host before inclusion.",
+ "quark": "Deferred: share-tree returns a reusable share capability stoken and save accepts it as a model input. Keep capability credentials inside the host before inclusion."
}
}
diff --git a/scripts/refresh-browser-recipe-aliases.mjs b/scripts/refresh-browser-recipe-aliases.mjs
index 50963fe7f5..471b46461b 100644
--- a/scripts/refresh-browser-recipe-aliases.mjs
+++ b/scripts/refresh-browser-recipe-aliases.mjs
@@ -76,7 +76,7 @@ for (const site of (await readdir(directory)).sort()) {
await writeFile(recipePath, JSON.stringify(recipe, null, 2) + "\n");
// These flows have no equivalent upstream contract (e.g. public podcast
// HTML vs upstream's credential-requiring mobile API). Keep them runnable.
- guide.notes = `${(guide.notes ?? "").split("\n完整目录更新时保留此 Cindy 独立配方:")[0]}\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站其他能力可通过 opencli:<站点>/<命令> 查询。`;
+ guide.notes = `${(guide.notes ?? "").split("\n完整目录更新时保留此 Cindy 独立配方:")[0]}\n完整目录更新时保留此 Cindy 独立配方:上游没有相同的接口或免登录/参数合同。本站可用能力以 siteguide 当前目录为准。`;
reviewed.push({
recipe: recipe.id,
status: "native-preserved",