@huyuan-ai/cli 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/UPGRADE.md +23 -0
- package/dist/cli/program.js +2 -2
- package/dist/cli/program.js.map +1 -1
- package/dist/constants.d.ts +15 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +32 -10
- package/dist/constants.js.map +1 -1
- package/dist/core/gateway-token.d.ts +5 -0
- package/dist/core/gateway-token.d.ts.map +1 -0
- package/dist/core/gateway-token.js +53 -0
- package/dist/core/gateway-token.js.map +1 -0
- package/dist/core/huyuan-skill.d.ts +5 -0
- package/dist/core/huyuan-skill.d.ts.map +1 -0
- package/dist/core/huyuan-skill.js +80 -0
- package/dist/core/huyuan-skill.js.map +1 -0
- package/dist/core/install.d.ts.map +1 -1
- package/dist/core/install.js +4 -47
- package/dist/core/install.js.map +1 -1
- package/dist/core/skills-hub.d.ts +22 -0
- package/dist/core/skills-hub.d.ts.map +1 -0
- package/dist/core/skills-hub.js +131 -0
- package/dist/core/skills-hub.js.map +1 -0
- package/dist/integrations/opencli/bootstrap.js +2 -2
- package/dist/integrations/opencli/bootstrap.js.map +1 -1
- package/dist/integrations/opencli/commands/doubao-ask-with-citations.js +1 -1
- package/dist/integrations/opencli/commands/doubao-ask-with-citations.js.map +1 -1
- package/dist/integrations/opencli/execute-registry-command.js +3 -3
- package/dist/integrations/opencli/execute-registry-command.js.map +1 -1
- package/dist/sites/huyuan-skill/check.d.ts +2 -0
- package/dist/sites/huyuan-skill/check.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/check.js +103 -0
- package/dist/sites/huyuan-skill/check.js.map +1 -0
- package/dist/sites/huyuan-skill/install-from-hub.d.ts +3 -0
- package/dist/sites/huyuan-skill/install-from-hub.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/install-from-hub.js +60 -0
- package/dist/sites/huyuan-skill/install-from-hub.js.map +1 -0
- package/dist/sites/huyuan-skill/list.d.ts +2 -0
- package/dist/sites/huyuan-skill/list.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/list.js +44 -0
- package/dist/sites/huyuan-skill/list.js.map +1 -0
- package/dist/sites/huyuan-skill/register.d.ts +4 -0
- package/dist/sites/huyuan-skill/register.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/register.js +69 -0
- package/dist/sites/huyuan-skill/register.js.map +1 -0
- package/dist/sites/huyuan-skill/search.d.ts +2 -0
- package/dist/sites/huyuan-skill/search.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/search.js +45 -0
- package/dist/sites/huyuan-skill/search.js.map +1 -0
- package/dist/sites/huyuan-skill/skill-md-version.d.ts +11 -0
- package/dist/sites/huyuan-skill/skill-md-version.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/skill-md-version.js +74 -0
- package/dist/sites/huyuan-skill/skill-md-version.js.map +1 -0
- package/dist/sites/huyuan-skill/skills-hub.d.ts +24 -0
- package/dist/sites/huyuan-skill/skills-hub.d.ts.map +1 -0
- package/dist/sites/huyuan-skill/skills-hub.js +131 -0
- package/dist/sites/huyuan-skill/skills-hub.js.map +1 -0
- package/dist/utils/install-root.d.ts +5 -0
- package/dist/utils/install-root.d.ts.map +1 -0
- package/dist/utils/install-root.js +13 -0
- package/dist/utils/install-root.js.map +1 -0
- package/package.json +5 -3
- package/vendor/opencli/dist/cli-manifest.json +546 -2
- package/vendor/opencli/dist/clis/1688/item.js +3 -3
- package/vendor/opencli/dist/clis/1688/search.js +2 -2
- package/vendor/opencli/dist/clis/1688/shared.d.ts +1 -1
- package/vendor/opencli/dist/clis/1688/shared.js +1 -1
- package/vendor/opencli/dist/clis/1688/store.js +2 -2
- package/vendor/opencli/dist/clis/36kr/article.js +2 -2
- package/vendor/opencli/dist/clis/36kr/hot.js +12 -6
- package/vendor/opencli/dist/clis/36kr/news.js +1 -1
- package/vendor/opencli/dist/clis/36kr/search.js +12 -6
- package/vendor/opencli/dist/clis/_shared/desktop-commands.d.ts +5 -5
- package/vendor/opencli/dist/clis/_shared/desktop-commands.js +1 -1
- package/vendor/opencli/dist/clis/amazon/bestsellers.js +1 -1
- package/vendor/opencli/dist/clis/amazon/discussion.js +2 -2
- package/vendor/opencli/dist/clis/amazon/movers-shakers.js +1 -1
- package/vendor/opencli/dist/clis/amazon/new-releases.js +1 -1
- package/vendor/opencli/dist/clis/amazon/offer.js +2 -2
- package/vendor/opencli/dist/clis/amazon/product.js +2 -2
- package/vendor/opencli/dist/clis/amazon/rankings.d.ts +1 -1
- package/vendor/opencli/dist/clis/amazon/rankings.js +2 -2
- package/vendor/opencli/dist/clis/amazon/search.js +2 -2
- package/vendor/opencli/dist/clis/amazon/shared.d.ts +1 -1
- package/vendor/opencli/dist/clis/amazon/shared.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/dump.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/extract-code.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/extract-code.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/model.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/new.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/read.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/send.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/serve.js +3 -3
- package/vendor/opencli/dist/clis/antigravity/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/status.js +1 -1
- package/vendor/opencli/dist/clis/antigravity/watch.d.ts +1 -1
- package/vendor/opencli/dist/clis/antigravity/watch.js +1 -1
- package/vendor/opencli/dist/clis/apple-podcasts/commands.test.js +1 -1
- package/vendor/opencli/dist/clis/apple-podcasts/episodes.js +2 -2
- package/vendor/opencli/dist/clis/apple-podcasts/search.js +2 -2
- package/vendor/opencli/dist/clis/apple-podcasts/top.js +2 -2
- package/vendor/opencli/dist/clis/apple-podcasts/utils.js +1 -1
- package/vendor/opencli/dist/clis/arxiv/paper.js +2 -2
- package/vendor/opencli/dist/clis/arxiv/search.js +2 -2
- package/vendor/opencli/dist/clis/arxiv/utils.js +1 -1
- package/vendor/opencli/dist/clis/band/bands.js +2 -2
- package/vendor/opencli/dist/clis/band/mentions.js +2 -2
- package/vendor/opencli/dist/clis/band/post.js +4 -4
- package/vendor/opencli/dist/clis/band/posts.js +2 -2
- package/vendor/opencli/dist/clis/barchart/flow.js +1 -1
- package/vendor/opencli/dist/clis/barchart/greeks.js +1 -1
- package/vendor/opencli/dist/clis/barchart/options.js +1 -1
- package/vendor/opencli/dist/clis/barchart/quote.js +1 -1
- package/vendor/opencli/dist/clis/bbc/news.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/comments.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/comments.test.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/download.js +3 -3
- package/vendor/opencli/dist/clis/bilibili/dynamic.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/dynamic.test.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/favorite.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/feed.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/following.js +2 -2
- package/vendor/opencli/dist/clis/bilibili/history.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/me.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/ranking.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/search.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/subtitle.js +2 -2
- package/vendor/opencli/dist/clis/bilibili/subtitle.test.js +2 -2
- package/vendor/opencli/dist/clis/bilibili/user-videos.js +1 -1
- package/vendor/opencli/dist/clis/bilibili/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/bilibili/utils.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/businessweek.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/economics.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/feeds.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/industries.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/main.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/markets.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/news.js +2 -2
- package/vendor/opencli/dist/clis/bloomberg/opinions.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/politics.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/tech.js +1 -1
- package/vendor/opencli/dist/clis/bloomberg/utils.js +1 -1
- package/vendor/opencli/dist/clis/boss/batchgreet.js +1 -1
- package/vendor/opencli/dist/clis/boss/chatlist.js +1 -1
- package/vendor/opencli/dist/clis/boss/chatmsg.js +1 -1
- package/vendor/opencli/dist/clis/boss/detail.js +1 -1
- package/vendor/opencli/dist/clis/boss/exchange.js +1 -1
- package/vendor/opencli/dist/clis/boss/greet.js +1 -1
- package/vendor/opencli/dist/clis/boss/invite.js +1 -1
- package/vendor/opencli/dist/clis/boss/joblist.js +1 -1
- package/vendor/opencli/dist/clis/boss/mark.js +2 -2
- package/vendor/opencli/dist/clis/boss/recommend.js +1 -1
- package/vendor/opencli/dist/clis/boss/resume.js +1 -1
- package/vendor/opencli/dist/clis/boss/search.js +1 -1
- package/vendor/opencli/dist/clis/boss/send.js +2 -2
- package/vendor/opencli/dist/clis/boss/stats.js +1 -1
- package/vendor/opencli/dist/clis/boss/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/chaoxing/assignments.js +2 -2
- package/vendor/opencli/dist/clis/chaoxing/exams.js +1 -1
- package/vendor/opencli/dist/clis/chaoxing/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/ask.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/model.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/new.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/read.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/send.js +2 -2
- package/vendor/opencli/dist/clis/chatgpt/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatgpt/status.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/ask.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/export.js +1 -1
- package/vendor/opencli/dist/clis/chatwise/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/history.js +1 -1
- package/vendor/opencli/dist/clis/chatwise/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/model.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/read.js +1 -1
- package/vendor/opencli/dist/clis/chatwise/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/chatwise/send.js +2 -2
- package/vendor/opencli/dist/clis/chatwise/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/ask.js +2 -2
- package/vendor/opencli/dist/clis/codex/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/export.js +1 -1
- package/vendor/opencli/dist/clis/codex/extract-diff.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/extract-diff.js +1 -1
- package/vendor/opencli/dist/clis/codex/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/history.js +1 -1
- package/vendor/opencli/dist/clis/codex/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/model.js +1 -1
- package/vendor/opencli/dist/clis/codex/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/read.js +1 -1
- package/vendor/opencli/dist/clis/codex/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/codex/send.js +2 -2
- package/vendor/opencli/dist/clis/codex/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/coupang/add-to-cart.js +1 -1
- package/vendor/opencli/dist/clis/coupang/search.js +1 -1
- package/vendor/opencli/dist/clis/ctrip/search.js +2 -2
- package/vendor/opencli/dist/clis/ctrip/search.test.js +1 -1
- package/vendor/opencli/dist/clis/cursor/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/ask.js +2 -2
- package/vendor/opencli/dist/clis/cursor/composer.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/composer.js +2 -2
- package/vendor/opencli/dist/clis/cursor/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/export.js +1 -1
- package/vendor/opencli/dist/clis/cursor/extract-code.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/extract-code.js +1 -1
- package/vendor/opencli/dist/clis/cursor/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/history.js +1 -1
- package/vendor/opencli/dist/clis/cursor/model.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/model.js +1 -1
- package/vendor/opencli/dist/clis/cursor/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/read.js +2 -2
- package/vendor/opencli/dist/clis/cursor/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/cursor/send.js +2 -2
- package/vendor/opencli/dist/clis/cursor/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/channels.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/channels.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/members.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/members.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/read.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/search.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/search.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/send.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/servers.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/servers.js +1 -1
- package/vendor/opencli/dist/clis/discord-app/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/discord-app/status.js +1 -1
- package/vendor/opencli/dist/clis/douban/book-hot.js +1 -1
- package/vendor/opencli/dist/clis/douban/download.js +4 -4
- package/vendor/opencli/dist/clis/douban/download.test.js +3 -3
- package/vendor/opencli/dist/clis/douban/marks.js +1 -1
- package/vendor/opencli/dist/clis/douban/movie-hot.js +1 -1
- package/vendor/opencli/dist/clis/douban/photos.js +1 -1
- package/vendor/opencli/dist/clis/douban/reviews.js +1 -1
- package/vendor/opencli/dist/clis/douban/search.js +1 -1
- package/vendor/opencli/dist/clis/douban/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/douban/utils.js +1 -1
- package/vendor/opencli/dist/clis/doubao/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/ask.js +1 -1
- package/vendor/opencli/dist/clis/doubao/detail.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/detail.js +1 -1
- package/vendor/opencli/dist/clis/doubao/detail.test.js +1 -1
- package/vendor/opencli/dist/clis/doubao/history.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/history.js +1 -1
- package/vendor/opencli/dist/clis/doubao/history.test.js +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-summary.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-summary.js +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-transcript.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/meeting-transcript.js +1 -1
- package/vendor/opencli/dist/clis/doubao/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/new.js +1 -1
- package/vendor/opencli/dist/clis/doubao/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/read.js +1 -1
- package/vendor/opencli/dist/clis/doubao/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/send.js +1 -1
- package/vendor/opencli/dist/clis/doubao/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao/status.js +1 -1
- package/vendor/opencli/dist/clis/doubao/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/ask.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/dump.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/dump.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/new.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/read.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/screenshot.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/screenshot.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/send.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/send.js +1 -1
- package/vendor/opencli/dist/clis/doubao-app/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/doubao-app/status.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/browser-fetch.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/imagex-upload.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/public-api.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/sts2.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload-short-read.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/tos-upload.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.d.ts +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.js +1 -1
- package/vendor/opencli/dist/clis/douyin/_shared/transcode.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/activities.js +1 -1
- package/vendor/opencli/dist/clis/douyin/activities.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/collections.js +1 -1
- package/vendor/opencli/dist/clis/douyin/collections.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/delete.js +1 -1
- package/vendor/opencli/dist/clis/douyin/delete.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/draft.js +2 -2
- package/vendor/opencli/dist/clis/douyin/draft.test.js +2 -2
- package/vendor/opencli/dist/clis/douyin/drafts.js +1 -1
- package/vendor/opencli/dist/clis/douyin/drafts.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/hashtag.js +2 -2
- package/vendor/opencli/dist/clis/douyin/hashtag.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/location.js +1 -1
- package/vendor/opencli/dist/clis/douyin/location.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/profile.js +2 -2
- package/vendor/opencli/dist/clis/douyin/profile.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/publish.js +2 -2
- package/vendor/opencli/dist/clis/douyin/publish.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/stats.js +1 -1
- package/vendor/opencli/dist/clis/douyin/stats.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/update.js +2 -2
- package/vendor/opencli/dist/clis/douyin/update.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/user-videos.js +1 -1
- package/vendor/opencli/dist/clis/douyin/user-videos.test.js +1 -1
- package/vendor/opencli/dist/clis/douyin/videos.js +1 -1
- package/vendor/opencli/dist/clis/douyin/videos.test.js +1 -1
- package/vendor/opencli/dist/clis/facebook/search.test.js +1 -1
- package/vendor/opencli/dist/clis/gemini/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/gemini/ask.js +1 -1
- package/vendor/opencli/dist/clis/gemini/deep-research-result.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/deep-research-result.js +91 -0
- package/vendor/opencli/dist/clis/gemini/deep-research-result.test.js +154 -0
- package/vendor/opencli/dist/clis/gemini/deep-research.d.ts +1 -0
- package/vendor/opencli/dist/clis/gemini/deep-research.js +98 -0
- package/vendor/opencli/dist/clis/gemini/deep-research.test.js +184 -0
- package/vendor/opencli/dist/clis/gemini/image.d.ts +1 -1
- package/vendor/opencli/dist/clis/gemini/image.js +2 -2
- package/vendor/opencli/dist/clis/gemini/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/gemini/new.js +1 -1
- package/vendor/opencli/dist/clis/gemini/reply-state.test.js +30 -0
- package/vendor/opencli/dist/clis/gemini/utils.d.ts +30 -1
- package/vendor/opencli/dist/clis/gemini/utils.js +1014 -2
- package/vendor/opencli/dist/clis/gemini/utils.test.js +21 -1
- package/vendor/opencli/dist/clis/google/news.js +2 -2
- package/vendor/opencli/dist/clis/google/search.js +2 -2
- package/vendor/opencli/dist/clis/google/suggest.js +2 -2
- package/vendor/opencli/dist/clis/google/trends.js +2 -2
- package/vendor/opencli/dist/clis/grok/ask.d.ts +2 -2
- package/vendor/opencli/dist/clis/grok/ask.js +1 -1
- package/vendor/opencli/dist/clis/hf/top.js +2 -2
- package/vendor/opencli/dist/clis/hupu/detail.js +1 -1
- package/vendor/opencli/dist/clis/hupu/like.js +2 -2
- package/vendor/opencli/dist/clis/hupu/mentions.js +159 -0
- package/vendor/opencli/dist/clis/hupu/reply.js +2 -2
- package/vendor/opencli/dist/clis/hupu/search.js +1 -1
- package/vendor/opencli/dist/clis/hupu/unlike.js +2 -2
- package/vendor/opencli/dist/clis/hupu/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/hupu/utils.js +1 -1
- package/vendor/opencli/dist/clis/imdb/person.js +2 -2
- package/vendor/opencli/dist/clis/imdb/reviews.js +2 -2
- package/vendor/opencli/dist/clis/imdb/search.js +2 -2
- package/vendor/opencli/dist/clis/imdb/title.js +2 -2
- package/vendor/opencli/dist/clis/imdb/top.js +2 -2
- package/vendor/opencli/dist/clis/imdb/trending.js +2 -2
- package/vendor/opencli/dist/clis/imdb/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/imdb/utils.js +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.d.ts +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/private-publish.js +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/protocol-capture.d.ts +1 -1
- package/vendor/opencli/dist/clis/instagram/_shared/runtime-info.d.ts +1 -1
- package/vendor/opencli/dist/clis/instagram/download.js +3 -3
- package/vendor/opencli/dist/clis/instagram/download.test.js +4 -4
- package/vendor/opencli/dist/clis/instagram/note.js +2 -2
- package/vendor/opencli/dist/clis/instagram/note.test.js +2 -2
- package/vendor/opencli/dist/clis/instagram/post.js +2 -2
- package/vendor/opencli/dist/clis/instagram/post.test.js +2 -2
- package/vendor/opencli/dist/clis/instagram/reel.js +3 -3
- package/vendor/opencli/dist/clis/instagram/reel.test.js +2 -2
- package/vendor/opencli/dist/clis/instagram/story.js +2 -2
- package/vendor/opencli/dist/clis/instagram/story.test.js +2 -2
- package/vendor/opencli/dist/clis/jd/item.js +1 -1
- package/vendor/opencli/dist/clis/jd/item.test.js +1 -1
- package/vendor/opencli/dist/clis/jike/comment.js +1 -1
- package/vendor/opencli/dist/clis/jike/create.js +1 -1
- package/vendor/opencli/dist/clis/jike/feed.js +1 -1
- package/vendor/opencli/dist/clis/jike/like.js +1 -1
- package/vendor/opencli/dist/clis/jike/notifications.js +1 -1
- package/vendor/opencli/dist/clis/jike/repost.js +1 -1
- package/vendor/opencli/dist/clis/jike/search.js +1 -1
- package/vendor/opencli/dist/clis/lesswrong/_helpers.d.ts +15 -0
- package/vendor/opencli/dist/clis/lesswrong/_helpers.js +75 -0
- package/vendor/opencli/dist/clis/lesswrong/comments.js +64 -0
- package/vendor/opencli/dist/clis/lesswrong/curated.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/frontpage.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/new.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/read.js +45 -0
- package/vendor/opencli/dist/clis/lesswrong/sequences.js +27 -0
- package/vendor/opencli/dist/clis/lesswrong/shortform.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/tag.js +45 -0
- package/vendor/opencli/dist/clis/lesswrong/tags.js +27 -0
- package/vendor/opencli/dist/clis/lesswrong/top-month.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/top-week.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/top-year.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/top.js +30 -0
- package/vendor/opencli/dist/clis/lesswrong/user-posts.js +41 -0
- package/vendor/opencli/dist/clis/lesswrong/user.js +44 -0
- package/vendor/opencli/dist/clis/linkedin/search.js +2 -2
- package/vendor/opencli/dist/clis/linkedin/timeline.js +2 -2
- package/vendor/opencli/dist/clis/linkedin/timeline.test.js +1 -1
- package/vendor/opencli/dist/clis/linux-do/category.js +1 -1
- package/vendor/opencli/dist/clis/linux-do/feed.d.ts +2 -2
- package/vendor/opencli/dist/clis/linux-do/feed.js +2 -2
- package/vendor/opencli/dist/clis/linux-do/hot.js +1 -1
- package/vendor/opencli/dist/clis/linux-do/latest.js +1 -1
- package/vendor/opencli/dist/clis/medium/feed.js +1 -1
- package/vendor/opencli/dist/clis/medium/search.js +1 -1
- package/vendor/opencli/dist/clis/medium/user.js +1 -1
- package/vendor/opencli/dist/clis/medium/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/medium/utils.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/compat.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/current.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/get.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/history.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/history.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/list.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/note-list.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/note-list.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/notes-get.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/notes-get.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/open.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/open.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/rpc.d.ts +1 -1
- package/vendor/opencli/dist/clis/notebooklm/rpc.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/rpc.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/source-fulltext.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-get.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/source-get.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-guide.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/source-guide.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/source-list.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/status.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/summary.js +2 -2
- package/vendor/opencli/dist/clis/notebooklm/summary.test.js +1 -1
- package/vendor/opencli/dist/clis/notebooklm/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/notebooklm/utils.js +1 -1
- package/vendor/opencli/dist/clis/notion/export.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/export.js +1 -1
- package/vendor/opencli/dist/clis/notion/favorites.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/favorites.js +1 -1
- package/vendor/opencli/dist/clis/notion/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/new.js +1 -1
- package/vendor/opencli/dist/clis/notion/read.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/read.js +1 -1
- package/vendor/opencli/dist/clis/notion/search.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/search.js +1 -1
- package/vendor/opencli/dist/clis/notion/sidebar.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/sidebar.js +1 -1
- package/vendor/opencli/dist/clis/notion/status.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/status.js +1 -1
- package/vendor/opencli/dist/clis/notion/write.d.ts +1 -1
- package/vendor/opencli/dist/clis/notion/write.js +1 -1
- package/vendor/opencli/dist/clis/ones/common.d.ts +1 -1
- package/vendor/opencli/dist/clis/ones/common.js +1 -1
- package/vendor/opencli/dist/clis/ones/enrich-tasks.d.ts +1 -1
- package/vendor/opencli/dist/clis/ones/login.js +2 -2
- package/vendor/opencli/dist/clis/ones/logout.js +1 -1
- package/vendor/opencli/dist/clis/ones/me.js +2 -2
- package/vendor/opencli/dist/clis/ones/my-tasks.js +2 -2
- package/vendor/opencli/dist/clis/ones/resolve-labels.d.ts +1 -1
- package/vendor/opencli/dist/clis/ones/task-helpers.js +1 -1
- package/vendor/opencli/dist/clis/ones/task.js +2 -2
- package/vendor/opencli/dist/clis/ones/tasks.js +2 -2
- package/vendor/opencli/dist/clis/ones/token-info.js +2 -2
- package/vendor/opencli/dist/clis/ones/worklog.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/commands.test.js +1 -1
- package/vendor/opencli/dist/clis/paperreview/feedback.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/review.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/submit.js +2 -2
- package/vendor/opencli/dist/clis/paperreview/utils.js +1 -1
- package/vendor/opencli/dist/clis/paperreview/utils.test.js +1 -1
- package/vendor/opencli/dist/clis/pixiv/download.js +4 -4
- package/vendor/opencli/dist/clis/pixiv/download.test.js +3 -3
- package/vendor/opencli/dist/clis/pixiv/illusts.js +2 -2
- package/vendor/opencli/dist/clis/pixiv/illusts.test.js +2 -2
- package/vendor/opencli/dist/clis/pixiv/search.js +1 -1
- package/vendor/opencli/dist/clis/pixiv/search.test.js +2 -2
- package/vendor/opencli/dist/clis/pixiv/test-utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/pixiv/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/pixiv/utils.js +1 -1
- package/vendor/opencli/dist/clis/producthunt/browse.js +2 -2
- package/vendor/opencli/dist/clis/producthunt/hot.js +2 -2
- package/vendor/opencli/dist/clis/producthunt/posts.js +1 -1
- package/vendor/opencli/dist/clis/producthunt/today.js +1 -1
- package/vendor/opencli/dist/clis/reddit/comment.js +2 -2
- package/vendor/opencli/dist/clis/reddit/read.js +2 -2
- package/vendor/opencli/dist/clis/reddit/read.test.js +1 -1
- package/vendor/opencli/dist/clis/reddit/save.js +2 -2
- package/vendor/opencli/dist/clis/reddit/saved.js +2 -2
- package/vendor/opencli/dist/clis/reddit/subscribe.js +2 -2
- package/vendor/opencli/dist/clis/reddit/upvote.js +2 -2
- package/vendor/opencli/dist/clis/reddit/upvoted.js +2 -2
- package/vendor/opencli/dist/clis/reuters/search.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/article.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/hot.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/search.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/user.js +1 -1
- package/vendor/opencli/dist/clis/sinablog/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/sinafinance/news.js +2 -2
- package/vendor/opencli/dist/clis/sinafinance/rolling-news.js +1 -1
- package/vendor/opencli/dist/clis/sinafinance/stock-rank.js +1 -1
- package/vendor/opencli/dist/clis/sinafinance/stock.js +2 -2
- package/vendor/opencli/dist/clis/smzdm/search.js +1 -1
- package/vendor/opencli/dist/clis/spotify/spotify.js +2 -2
- package/vendor/opencli/dist/clis/spotify/utils.js +1 -1
- package/vendor/opencli/dist/clis/substack/feed.js +1 -1
- package/vendor/opencli/dist/clis/substack/publication.js +1 -1
- package/vendor/opencli/dist/clis/substack/search.js +2 -2
- package/vendor/opencli/dist/clis/substack/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/substack/utils.js +1 -1
- package/vendor/opencli/dist/clis/tieba/commands.test.js +1 -1
- package/vendor/opencli/dist/clis/tieba/hot.js +2 -2
- package/vendor/opencli/dist/clis/tieba/posts.js +2 -2
- package/vendor/opencli/dist/clis/tieba/read.js +2 -2
- package/vendor/opencli/dist/clis/tieba/search.js +2 -2
- package/vendor/opencli/dist/clis/twitter/accept.js +2 -2
- package/vendor/opencli/dist/clis/twitter/article.js +2 -2
- package/vendor/opencli/dist/clis/twitter/block.js +2 -2
- package/vendor/opencli/dist/clis/twitter/bookmark.js +2 -2
- package/vendor/opencli/dist/clis/twitter/bookmarks.js +2 -2
- package/vendor/opencli/dist/clis/twitter/delete.d.ts +6 -0
- package/vendor/opencli/dist/clis/twitter/delete.js +82 -47
- package/vendor/opencli/dist/clis/twitter/delete.test.d.ts +1 -0
- package/vendor/opencli/dist/clis/twitter/delete.test.js +73 -0
- package/vendor/opencli/dist/clis/twitter/download.js +3 -3
- package/vendor/opencli/dist/clis/twitter/follow.js +2 -2
- package/vendor/opencli/dist/clis/twitter/followers.js +2 -2
- package/vendor/opencli/dist/clis/twitter/following.js +2 -2
- package/vendor/opencli/dist/clis/twitter/hide-reply.js +2 -2
- package/vendor/opencli/dist/clis/twitter/like.js +2 -2
- package/vendor/opencli/dist/clis/twitter/likes.js +2 -2
- package/vendor/opencli/dist/clis/twitter/notifications.js +2 -2
- package/vendor/opencli/dist/clis/twitter/post.js +2 -2
- package/vendor/opencli/dist/clis/twitter/post.test.js +1 -1
- package/vendor/opencli/dist/clis/twitter/profile.js +2 -2
- package/vendor/opencli/dist/clis/twitter/reply-dm.js +2 -2
- package/vendor/opencli/dist/clis/twitter/reply.js +2 -2
- package/vendor/opencli/dist/clis/twitter/reply.test.js +1 -1
- package/vendor/opencli/dist/clis/twitter/search.js +2 -2
- package/vendor/opencli/dist/clis/twitter/search.test.js +1 -1
- package/vendor/opencli/dist/clis/twitter/shared.d.ts +1 -1
- package/vendor/opencli/dist/clis/twitter/thread.js +2 -2
- package/vendor/opencli/dist/clis/twitter/timeline.js +2 -2
- package/vendor/opencli/dist/clis/twitter/trending.js +2 -2
- package/vendor/opencli/dist/clis/twitter/unblock.js +2 -2
- package/vendor/opencli/dist/clis/twitter/unbookmark.js +2 -2
- package/vendor/opencli/dist/clis/twitter/unfollow.js +2 -2
- package/vendor/opencli/dist/clis/v2ex/daily.js +2 -2
- package/vendor/opencli/dist/clis/v2ex/me.js +2 -2
- package/vendor/opencli/dist/clis/v2ex/notifications.js +2 -2
- package/vendor/opencli/dist/clis/web/read.js +2 -2
- package/vendor/opencli/dist/clis/weibo/comments.js +1 -1
- package/vendor/opencli/dist/clis/weibo/feed.js +1 -1
- package/vendor/opencli/dist/clis/weibo/hot.js +1 -1
- package/vendor/opencli/dist/clis/weibo/me.js +2 -2
- package/vendor/opencli/dist/clis/weibo/post.js +2 -2
- package/vendor/opencli/dist/clis/weibo/search.js +2 -2
- package/vendor/opencli/dist/clis/weibo/user.js +2 -2
- package/vendor/opencli/dist/clis/weibo/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/weibo/utils.js +1 -1
- package/vendor/opencli/dist/clis/weixin/download.js +2 -2
- package/vendor/opencli/dist/clis/weread/book.js +2 -2
- package/vendor/opencli/dist/clis/weread/commands.test.js +2 -2
- package/vendor/opencli/dist/clis/weread/highlights.js +1 -1
- package/vendor/opencli/dist/clis/weread/notebooks.js +1 -1
- package/vendor/opencli/dist/clis/weread/notes.js +1 -1
- package/vendor/opencli/dist/clis/weread/private-api-regression.test.js +2 -2
- package/vendor/opencli/dist/clis/weread/ranking.js +1 -1
- package/vendor/opencli/dist/clis/weread/search-regression.test.js +1 -1
- package/vendor/opencli/dist/clis/weread/search.js +1 -1
- package/vendor/opencli/dist/clis/weread/shelf.js +3 -3
- package/vendor/opencli/dist/clis/weread/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/weread/utils.js +1 -1
- package/vendor/opencli/dist/clis/wikipedia/random.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/search.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/summary.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/trending.js +2 -2
- package/vendor/opencli/dist/clis/wikipedia/utils.js +1 -1
- package/vendor/opencli/dist/clis/xianyu/chat.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/item.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/item.test.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/search.js +2 -2
- package/vendor/opencli/dist/clis/xianyu/utils.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/comments.js +2 -2
- package/vendor/opencli/dist/clis/xiaohongshu/comments.test.js +3 -3
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.d.ts +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-note-detail.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes-summary.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.d.ts +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-notes.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-profile.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/creator-stats.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/download.js +3 -3
- package/vendor/opencli/dist/clis/xiaohongshu/download.test.js +3 -3
- package/vendor/opencli/dist/clis/xiaohongshu/note-helpers.d.ts +2 -2
- package/vendor/opencli/dist/clis/xiaohongshu/note-helpers.js +5 -3
- package/vendor/opencli/dist/clis/xiaohongshu/note.d.ts +4 -0
- package/vendor/opencli/dist/clis/xiaohongshu/note.js +10 -12
- package/vendor/opencli/dist/clis/xiaohongshu/note.test.js +6 -6
- package/vendor/opencli/dist/clis/xiaohongshu/publish.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/publish.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/search.js +2 -2
- package/vendor/opencli/dist/clis/xiaohongshu/search.test.js +1 -1
- package/vendor/opencli/dist/clis/xiaohongshu/user.js +1 -1
- package/vendor/opencli/dist/clis/xiaoyuzhou/episode.js +2 -2
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast-episodes.js +2 -2
- package/vendor/opencli/dist/clis/xiaoyuzhou/podcast.js +2 -2
- package/vendor/opencli/dist/clis/xiaoyuzhou/utils.js +1 -1
- package/vendor/opencli/dist/clis/xueqiu/comments.d.ts +1 -1
- package/vendor/opencli/dist/clis/xueqiu/comments.js +4 -4
- package/vendor/opencli/dist/clis/xueqiu/comments.test.js +3 -3
- package/vendor/opencli/dist/clis/xueqiu/danjuan-utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/xueqiu/fund-holdings.js +1 -1
- package/vendor/opencli/dist/clis/xueqiu/fund-snapshot.js +1 -1
- package/vendor/opencli/dist/clis/yahoo-finance/quote.js +1 -1
- package/vendor/opencli/dist/clis/yollomi/background.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/edit.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/face-swap.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/generate.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/models.js +1 -1
- package/vendor/opencli/dist/clis/yollomi/object-remover.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/remove-bg.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/restore.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/try-on.js +4 -4
- package/vendor/opencli/dist/clis/yollomi/upload.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/upscale.js +5 -5
- package/vendor/opencli/dist/clis/yollomi/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/yollomi/utils.js +1 -1
- package/vendor/opencli/dist/clis/yollomi/video.js +5 -5
- package/vendor/opencli/dist/clis/youtube/channel.js +2 -2
- package/vendor/opencli/dist/clis/youtube/comments.js +2 -2
- package/vendor/opencli/dist/clis/youtube/search.js +1 -1
- package/vendor/opencli/dist/clis/youtube/transcript.js +2 -2
- package/vendor/opencli/dist/clis/youtube/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/youtube/video.js +2 -2
- package/vendor/opencli/dist/clis/yuanbao/ask.d.ts +1 -1
- package/vendor/opencli/dist/clis/yuanbao/ask.js +36 -53
- package/vendor/opencli/dist/clis/yuanbao/ask.test.js +1 -1
- package/vendor/opencli/dist/clis/yuanbao/new.d.ts +1 -1
- package/vendor/opencli/dist/clis/yuanbao/new.js +1 -1
- package/vendor/opencli/dist/clis/yuanbao/new.test.js +1 -1
- package/vendor/opencli/dist/clis/yuanbao/shared.d.ts +2 -2
- package/vendor/opencli/dist/clis/yuanbao/shared.js +1 -1
- package/vendor/opencli/dist/clis/zhihu/download.js +2 -2
- package/vendor/opencli/dist/clis/zhihu/question.js +2 -2
- package/vendor/opencli/dist/clis/zhihu/question.test.js +2 -2
- package/vendor/opencli/dist/clis/zsxq/dynamics.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/groups.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/search.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/search.test.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/topic.js +2 -2
- package/vendor/opencli/dist/clis/zsxq/topic.test.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/topics.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/topics.test.js +1 -1
- package/vendor/opencli/dist/clis/zsxq/utils.d.ts +1 -1
- package/vendor/opencli/dist/clis/zsxq/utils.js +1 -1
- package/vendor/opencli/dist/{build-manifest.js → src/build-manifest.js} +5 -4
- package/vendor/opencli/dist/{cascade.js → src/cascade.js} +16 -31
- package/vendor/opencli/dist/src/cli.d.ts +22 -0
- package/vendor/opencli/dist/{cli.js → src/cli.js} +78 -8
- package/vendor/opencli/dist/{cli.test.js → src/cli.test.js} +84 -1
- package/vendor/opencli/dist/{commanderAdapter.d.ts → src/commanderAdapter.d.ts} +1 -0
- package/vendor/opencli/dist/{commanderAdapter.js → src/commanderAdapter.js} +26 -46
- package/vendor/opencli/dist/src/diagnostic.d.ts +38 -0
- package/vendor/opencli/dist/src/diagnostic.js +71 -0
- package/vendor/opencli/dist/src/diagnostic.test.d.ts +1 -0
- package/vendor/opencli/dist/src/diagnostic.test.js +84 -0
- package/vendor/opencli/dist/{discovery.d.ts → src/discovery.d.ts} +11 -2
- package/vendor/opencli/dist/{discovery.js → src/discovery.js} +71 -37
- package/vendor/opencli/dist/src/doctor.test.d.ts +1 -0
- package/vendor/opencli/dist/src/download/index.test.d.ts +1 -0
- package/vendor/opencli/dist/src/electron-apps.test.d.ts +1 -0
- package/vendor/opencli/dist/src/engine.test.d.ts +1 -0
- package/vendor/opencli/dist/{engine.test.js → src/engine.test.js} +6 -5
- package/vendor/opencli/dist/src/errors.test.d.ts +1 -0
- package/vendor/opencli/dist/{execution.js → src/execution.js} +25 -4
- package/vendor/opencli/dist/src/execution.test.d.ts +1 -0
- package/vendor/opencli/dist/src/extension-manifest-regression.test.d.ts +1 -0
- package/vendor/opencli/dist/src/external.test.d.ts +1 -0
- package/vendor/opencli/dist/{interceptor.d.ts → src/interceptor.d.ts} +2 -0
- package/vendor/opencli/dist/{interceptor.js → src/interceptor.js} +3 -6
- package/vendor/opencli/dist/src/launcher.test.d.ts +1 -0
- package/vendor/opencli/dist/{logger.d.ts → src/logger.d.ts} +4 -0
- package/vendor/opencli/dist/{logger.js → src/logger.js} +8 -0
- package/vendor/opencli/dist/{main.js → src/main.js} +3 -2
- package/vendor/opencli/dist/src/node-network.test.d.ts +1 -0
- package/vendor/opencli/dist/src/output.test.d.ts +1 -0
- package/vendor/opencli/dist/src/package-exports.test.d.ts +1 -0
- package/vendor/opencli/dist/src/package-exports.test.js +112 -0
- package/vendor/opencli/dist/src/pipeline/steps/download.test.d.ts +1 -0
- package/vendor/opencli/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
- package/vendor/opencli/dist/{record.js → src/record.js} +1 -1
- package/vendor/opencli/dist/src/record.test.d.ts +1 -0
- package/vendor/opencli/dist/{registry-api.d.ts → src/registry-api.d.ts} +1 -1
- package/vendor/opencli/dist/src/runtime-detect.test.d.ts +1 -0
- package/vendor/opencli/dist/src/serialization.test.d.ts +1 -0
- package/vendor/opencli/dist/{synthesize.d.ts → src/synthesize.d.ts} +0 -4
- package/vendor/opencli/dist/{synthesize.js → src/synthesize.js} +4 -15
- package/vendor/opencli/dist/src/tui.test.d.ts +1 -0
- package/vendor/opencli/dist/{utils.d.ts → src/utils.d.ts} +3 -0
- package/vendor/opencli/dist/{utils.js → src/utils.js} +22 -0
- package/vendor/opencli/dist/{version.js → src/version.js} +7 -1
- package/vendor/opencli/dist/src/weixin-download.test.d.ts +1 -0
- package/vendor/opencli/dist/{weixin-download.test.js → src/weixin-download.test.js} +1 -1
- package/vendor/opencli/dist/cli.d.ts +0 -9
- /package/vendor/opencli/dist/{browser.test.d.ts → clis/gemini/deep-research-result.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/cdp.test.d.ts → clis/gemini/deep-research.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/daemon-client.test.d.ts → clis/hupu/mentions.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/dom-helpers.test.d.ts → clis/lesswrong/comments.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/page.test.d.ts → clis/lesswrong/curated.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser/stealth.test.d.ts → clis/lesswrong/frontpage.d.ts} +0 -0
- /package/vendor/opencli/dist/{build-manifest.test.d.ts → clis/lesswrong/new.d.ts} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.test.d.ts → clis/lesswrong/read.d.ts} +0 -0
- /package/vendor/opencli/dist/{cli.test.d.ts → clis/lesswrong/sequences.d.ts} +0 -0
- /package/vendor/opencli/dist/{commanderAdapter.test.d.ts → clis/lesswrong/shortform.d.ts} +0 -0
- /package/vendor/opencli/dist/{commands/daemon.test.d.ts → clis/lesswrong/tag.d.ts} +0 -0
- /package/vendor/opencli/dist/{completion.test.d.ts → clis/lesswrong/tags.d.ts} +0 -0
- /package/vendor/opencli/dist/{daemon.test.d.ts → clis/lesswrong/top-month.d.ts} +0 -0
- /package/vendor/opencli/dist/{doctor.test.d.ts → clis/lesswrong/top-week.d.ts} +0 -0
- /package/vendor/opencli/dist/{download/index.test.d.ts → clis/lesswrong/top-year.d.ts} +0 -0
- /package/vendor/opencli/dist/{electron-apps.test.d.ts → clis/lesswrong/top.d.ts} +0 -0
- /package/vendor/opencli/dist/{engine.test.d.ts → clis/lesswrong/user-posts.d.ts} +0 -0
- /package/vendor/opencli/dist/{errors.test.d.ts → clis/lesswrong/user.d.ts} +0 -0
- /package/vendor/opencli/dist/{analysis.d.ts → src/analysis.d.ts} +0 -0
- /package/vendor/opencli/dist/{analysis.js → src/analysis.js} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/base-page.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/base-page.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/bridge.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/bridge.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/cdp.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/cdp.js +0 -0
- /package/vendor/opencli/dist/{extension-manifest-regression.test.d.ts → src/browser/cdp.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/cdp.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/daemon-client.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/daemon-client.js +0 -0
- /package/vendor/opencli/dist/{external.test.d.ts → src/browser/daemon-client.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/daemon-client.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/discover.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/discover.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-helpers.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-helpers.js +0 -0
- /package/vendor/opencli/dist/{launcher.test.d.ts → src/browser/dom-helpers.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-helpers.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.test.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/dom-snapshot.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/errors.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/errors.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/index.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/index.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/page.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/page.js +0 -0
- /package/vendor/opencli/dist/{node-network.test.d.ts → src/browser/page.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/page.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/stealth.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/stealth.js +0 -0
- /package/vendor/opencli/dist/{output.test.d.ts → src/browser/stealth.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/stealth.test.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/tabs.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/tabs.js +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/utils.d.ts +0 -0
- /package/vendor/opencli/dist/{browser → src/browser}/utils.js +0 -0
- /package/vendor/opencli/dist/{execution.test.d.ts → src/browser.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{browser.test.js → src/browser.test.js} +0 -0
- /package/vendor/opencli/dist/{build-manifest.d.ts → src/build-manifest.d.ts} +0 -0
- /package/vendor/opencli/dist/{pipeline/steps/download.test.d.ts → src/build-manifest.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{build-manifest.test.js → src/build-manifest.test.js} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.d.ts → src/capabilityRouting.d.ts} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.js → src/capabilityRouting.js} +0 -0
- /package/vendor/opencli/dist/{pipeline/steps/fetch.test.d.ts → src/capabilityRouting.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{capabilityRouting.test.js → src/capabilityRouting.test.js} +0 -0
- /package/vendor/opencli/dist/{cascade.d.ts → src/cascade.d.ts} +0 -0
- /package/vendor/opencli/dist/{record.test.d.ts → src/cli.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.test.d.ts → src/commanderAdapter.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{commanderAdapter.test.js → src/commanderAdapter.test.js} +0 -0
- /package/vendor/opencli/dist/{commands → src/commands}/daemon.d.ts +0 -0
- /package/vendor/opencli/dist/{commands → src/commands}/daemon.js +0 -0
- /package/vendor/opencli/dist/{serialization.test.d.ts → src/commands/daemon.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{commands → src/commands}/daemon.test.js +0 -0
- /package/vendor/opencli/dist/{completion.d.ts → src/completion.d.ts} +0 -0
- /package/vendor/opencli/dist/{completion.js → src/completion.js} +0 -0
- /package/vendor/opencli/dist/{tui.test.d.ts → src/completion.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{completion.test.js → src/completion.test.js} +0 -0
- /package/vendor/opencli/dist/{constants.d.ts → src/constants.d.ts} +0 -0
- /package/vendor/opencli/dist/{constants.js → src/constants.js} +0 -0
- /package/vendor/opencli/dist/{daemon.d.ts → src/daemon.d.ts} +0 -0
- /package/vendor/opencli/dist/{daemon.js → src/daemon.js} +0 -0
- /package/vendor/opencli/dist/{weixin-download.test.d.ts → src/daemon.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{daemon.test.js → src/daemon.test.js} +0 -0
- /package/vendor/opencli/dist/{doctor.d.ts → src/doctor.d.ts} +0 -0
- /package/vendor/opencli/dist/{doctor.js → src/doctor.js} +0 -0
- /package/vendor/opencli/dist/{doctor.test.js → src/doctor.test.js} +0 -0
- /package/vendor/opencli/dist/{download → src/download}/article-download.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/article-download.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/index.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/index.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/index.test.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/media-download.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/media-download.js +0 -0
- /package/vendor/opencli/dist/{download → src/download}/progress.d.ts +0 -0
- /package/vendor/opencli/dist/{download → src/download}/progress.js +0 -0
- /package/vendor/opencli/dist/{electron-apps.d.ts → src/electron-apps.d.ts} +0 -0
- /package/vendor/opencli/dist/{electron-apps.js → src/electron-apps.js} +0 -0
- /package/vendor/opencli/dist/{electron-apps.test.js → src/electron-apps.test.js} +0 -0
- /package/vendor/opencli/dist/{errors.d.ts → src/errors.d.ts} +0 -0
- /package/vendor/opencli/dist/{errors.js → src/errors.js} +0 -0
- /package/vendor/opencli/dist/{errors.test.js → src/errors.test.js} +0 -0
- /package/vendor/opencli/dist/{execution.d.ts → src/execution.d.ts} +0 -0
- /package/vendor/opencli/dist/{execution.test.js → src/execution.test.js} +0 -0
- /package/vendor/opencli/dist/{explore.d.ts → src/explore.d.ts} +0 -0
- /package/vendor/opencli/dist/{explore.js → src/explore.js} +0 -0
- /package/vendor/opencli/dist/{extension-manifest-regression.test.js → src/extension-manifest-regression.test.js} +0 -0
- /package/vendor/opencli/dist/{external-clis.yaml → src/external-clis.yaml} +0 -0
- /package/vendor/opencli/dist/{external.d.ts → src/external.d.ts} +0 -0
- /package/vendor/opencli/dist/{external.js → src/external.js} +0 -0
- /package/vendor/opencli/dist/{external.test.js → src/external.test.js} +0 -0
- /package/vendor/opencli/dist/{generate.d.ts → src/generate.d.ts} +0 -0
- /package/vendor/opencli/dist/{generate.js → src/generate.js} +0 -0
- /package/vendor/opencli/dist/{hooks.d.ts → src/hooks.d.ts} +0 -0
- /package/vendor/opencli/dist/{hooks.js → src/hooks.js} +0 -0
- /package/vendor/opencli/dist/{hooks.test.d.ts → src/hooks.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{hooks.test.js → src/hooks.test.js} +0 -0
- /package/vendor/opencli/dist/{idle-manager.d.ts → src/idle-manager.d.ts} +0 -0
- /package/vendor/opencli/dist/{idle-manager.js → src/idle-manager.js} +0 -0
- /package/vendor/opencli/dist/{interceptor.test.d.ts → src/interceptor.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{interceptor.test.js → src/interceptor.test.js} +0 -0
- /package/vendor/opencli/dist/{launcher.d.ts → src/launcher.d.ts} +0 -0
- /package/vendor/opencli/dist/{launcher.js → src/launcher.js} +0 -0
- /package/vendor/opencli/dist/{launcher.test.js → src/launcher.test.js} +0 -0
- /package/vendor/opencli/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/vendor/opencli/dist/{node-network.d.ts → src/node-network.d.ts} +0 -0
- /package/vendor/opencli/dist/{node-network.js → src/node-network.js} +0 -0
- /package/vendor/opencli/dist/{node-network.test.js → src/node-network.test.js} +0 -0
- /package/vendor/opencli/dist/{output.d.ts → src/output.d.ts} +0 -0
- /package/vendor/opencli/dist/{output.js → src/output.js} +0 -0
- /package/vendor/opencli/dist/{output.test.js → src/output.test.js} +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.test.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/executor.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/index.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/index.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/registry.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/registry.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/browser.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/browser.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/download.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/download.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/download.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/fetch.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/fetch.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/fetch.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/intercept.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/intercept.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/tap.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/tap.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/transform.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/steps/transform.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.test.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/template.test.js +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/transform.test.d.ts +0 -0
- /package/vendor/opencli/dist/{pipeline → src/pipeline}/transform.test.js +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.d.ts → src/plugin-manifest.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.js → src/plugin-manifest.js} +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.test.d.ts → src/plugin-manifest.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-manifest.test.js → src/plugin-manifest.test.js} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.d.ts → src/plugin-scaffold.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.js → src/plugin-scaffold.js} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.test.d.ts → src/plugin-scaffold.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin-scaffold.test.js → src/plugin-scaffold.test.js} +0 -0
- /package/vendor/opencli/dist/{plugin.d.ts → src/plugin.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin.js → src/plugin.js} +0 -0
- /package/vendor/opencli/dist/{plugin.test.d.ts → src/plugin.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{plugin.test.js → src/plugin.test.js} +0 -0
- /package/vendor/opencli/dist/{record.d.ts → src/record.d.ts} +0 -0
- /package/vendor/opencli/dist/{record.test.js → src/record.test.js} +0 -0
- /package/vendor/opencli/dist/{registry-api.js → src/registry-api.js} +0 -0
- /package/vendor/opencli/dist/{registry.d.ts → src/registry.d.ts} +0 -0
- /package/vendor/opencli/dist/{registry.js → src/registry.js} +0 -0
- /package/vendor/opencli/dist/{registry.test.d.ts → src/registry.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{registry.test.js → src/registry.test.js} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.d.ts → src/runtime-detect.d.ts} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.js → src/runtime-detect.js} +0 -0
- /package/vendor/opencli/dist/{runtime-detect.test.js → src/runtime-detect.test.js} +0 -0
- /package/vendor/opencli/dist/{runtime.d.ts → src/runtime.d.ts} +0 -0
- /package/vendor/opencli/dist/{runtime.js → src/runtime.js} +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/framework.d.ts +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/framework.js +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/interact.d.ts +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/interact.js +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/store.d.ts +0 -0
- /package/vendor/opencli/dist/{scripts → src/scripts}/store.js +0 -0
- /package/vendor/opencli/dist/{serialization.d.ts → src/serialization.d.ts} +0 -0
- /package/vendor/opencli/dist/{serialization.js → src/serialization.js} +0 -0
- /package/vendor/opencli/dist/{serialization.test.js → src/serialization.test.js} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.d.ts → src/snapshotFormatter.d.ts} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.js → src/snapshotFormatter.js} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.test.d.ts → src/snapshotFormatter.test.d.ts} +0 -0
- /package/vendor/opencli/dist/{snapshotFormatter.test.js → src/snapshotFormatter.test.js} +0 -0
- /package/vendor/opencli/dist/{tui.d.ts → src/tui.d.ts} +0 -0
- /package/vendor/opencli/dist/{tui.js → src/tui.js} +0 -0
- /package/vendor/opencli/dist/{tui.test.js → src/tui.test.js} +0 -0
- /package/vendor/opencli/dist/{types.d.ts → src/types.d.ts} +0 -0
- /package/vendor/opencli/dist/{types.js → src/types.js} +0 -0
- /package/vendor/opencli/dist/{update-check.d.ts → src/update-check.d.ts} +0 -0
- /package/vendor/opencli/dist/{update-check.js → src/update-check.js} +0 -0
- /package/vendor/opencli/dist/{validate.d.ts → src/validate.d.ts} +0 -0
- /package/vendor/opencli/dist/{validate.js → src/validate.js} +0 -0
- /package/vendor/opencli/dist/{verify.d.ts → src/verify.d.ts} +0 -0
- /package/vendor/opencli/dist/{verify.js → src/verify.js} +0 -0
- /package/vendor/opencli/dist/{version.d.ts → src/version.d.ts} +0 -0
- /package/vendor/opencli/dist/{yaml-schema.d.ts → src/yaml-schema.d.ts} +0 -0
- /package/vendor/opencli/dist/{yaml-schema.js → src/yaml-schema.js} +0 -0
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import { CommandExecutionError } from '
|
|
1
|
+
import { CommandExecutionError } from '@jackwener/opencli/errors';
|
|
2
2
|
export const GEMINI_DOMAIN = 'gemini.google.com';
|
|
3
3
|
export const GEMINI_APP_URL = 'https://gemini.google.com/app';
|
|
4
|
+
export const GEMINI_DEEP_RESEARCH_DEFAULT_TOOL_LABELS = ['Deep Research', 'Deep research', '\u6df1\u5ea6\u7814\u7a76'];
|
|
5
|
+
export const GEMINI_DEEP_RESEARCH_DEFAULT_CONFIRM_LABELS = [
|
|
6
|
+
'Start research',
|
|
7
|
+
'Start Research',
|
|
8
|
+
'Start deep research',
|
|
9
|
+
'Start Deep Research',
|
|
10
|
+
'Generate research plan',
|
|
11
|
+
'Generate Research Plan',
|
|
12
|
+
'Generate deep research plan',
|
|
13
|
+
'Generate Deep Research Plan',
|
|
14
|
+
'\u5f00\u59cb\u7814\u7a76',
|
|
15
|
+
'\u5f00\u59cb\u6df1\u5ea6\u7814\u7a76',
|
|
16
|
+
'\u5f00\u59cb\u8c03\u7814',
|
|
17
|
+
'\u751f\u6210\u7814\u7a76\u8ba1\u5212',
|
|
18
|
+
'\u751f\u6210\u8c03\u7814\u8ba1\u5212',
|
|
19
|
+
];
|
|
4
20
|
const GEMINI_RESPONSE_NOISE_PATTERNS = [
|
|
5
21
|
/Gemini can make mistakes\.?/gi,
|
|
6
22
|
/Google Terms/gi,
|
|
@@ -58,6 +74,68 @@ function buildGeminiComposerLocatorScript() {
|
|
|
58
74
|
};
|
|
59
75
|
`;
|
|
60
76
|
}
|
|
77
|
+
export function resolveGeminiLabels(value, fallback) {
|
|
78
|
+
const label = String(value ?? '').trim();
|
|
79
|
+
return label ? [label] : fallback;
|
|
80
|
+
}
|
|
81
|
+
export function parseGeminiPositiveInt(value, fallback) {
|
|
82
|
+
const parsed = Number.parseInt(String(value ?? ''), 10);
|
|
83
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
|
|
84
|
+
}
|
|
85
|
+
export function parseGeminiTitleMatchMode(value, fallback = 'contains') {
|
|
86
|
+
const raw = String(value ?? fallback).trim().toLowerCase();
|
|
87
|
+
if (raw === 'contains' || raw === 'exact')
|
|
88
|
+
return raw;
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
export function parseGeminiConversationUrl(value) {
|
|
92
|
+
const raw = String(value ?? '').trim();
|
|
93
|
+
if (!raw)
|
|
94
|
+
return null;
|
|
95
|
+
try {
|
|
96
|
+
const url = new URL(raw);
|
|
97
|
+
if (url.hostname !== GEMINI_DOMAIN && !url.hostname.endsWith(`.${GEMINI_DOMAIN}`))
|
|
98
|
+
return null;
|
|
99
|
+
if (!url.pathname.startsWith('/app/'))
|
|
100
|
+
return null;
|
|
101
|
+
return url.href;
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export function normalizeGeminiTitle(value) {
|
|
108
|
+
return value.replace(/\s+/g, ' ').trim().toLowerCase();
|
|
109
|
+
}
|
|
110
|
+
export function pickGeminiConversationByTitle(conversations, query, mode = 'contains') {
|
|
111
|
+
const normalizedQuery = normalizeGeminiTitle(query);
|
|
112
|
+
if (!normalizedQuery)
|
|
113
|
+
return null;
|
|
114
|
+
for (const conversation of conversations) {
|
|
115
|
+
const normalizedTitle = normalizeGeminiTitle(conversation.Title);
|
|
116
|
+
if (!normalizedTitle)
|
|
117
|
+
continue;
|
|
118
|
+
if (mode === 'exact') {
|
|
119
|
+
if (normalizedTitle === normalizedQuery)
|
|
120
|
+
return conversation;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (normalizedTitle.includes(normalizedQuery))
|
|
124
|
+
return conversation;
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
export function resolveGeminiConversationForQuery(conversations, query, mode) {
|
|
129
|
+
const normalizedQuery = String(query ?? '').trim();
|
|
130
|
+
if (!normalizedQuery)
|
|
131
|
+
return conversations[0] ?? null;
|
|
132
|
+
const exact = pickGeminiConversationByTitle(conversations, normalizedQuery, 'exact');
|
|
133
|
+
if (exact)
|
|
134
|
+
return exact;
|
|
135
|
+
if (mode === 'contains')
|
|
136
|
+
return pickGeminiConversationByTitle(conversations, normalizedQuery, 'contains');
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
61
139
|
export function sanitizeGeminiResponseText(value, promptText) {
|
|
62
140
|
let sanitized = value;
|
|
63
141
|
for (const pattern of GEMINI_RESPONSE_NOISE_PATTERNS) {
|
|
@@ -216,6 +294,7 @@ function readGeminiSnapshotScript() {
|
|
|
216
294
|
const transcriptLines = ${getTranscriptLinesScript().trim()};
|
|
217
295
|
|
|
218
296
|
return {
|
|
297
|
+
url: window.location.href,
|
|
219
298
|
turns,
|
|
220
299
|
transcriptLines,
|
|
221
300
|
composerHasText: composerText.length > 0,
|
|
@@ -225,6 +304,18 @@ function readGeminiSnapshotScript() {
|
|
|
225
304
|
})()
|
|
226
305
|
`;
|
|
227
306
|
}
|
|
307
|
+
function isGeminiConversationUrl(url) {
|
|
308
|
+
try {
|
|
309
|
+
const parsed = new URL(url);
|
|
310
|
+
if (parsed.hostname !== GEMINI_DOMAIN && !parsed.hostname.endsWith(`.${GEMINI_DOMAIN}`))
|
|
311
|
+
return false;
|
|
312
|
+
const pathname = parsed.pathname.replace(/\/+$/, '');
|
|
313
|
+
return pathname.startsWith('/app/') && pathname !== '/app';
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
228
319
|
function getTranscriptLinesScript() {
|
|
229
320
|
return `
|
|
230
321
|
(() => {
|
|
@@ -568,6 +659,337 @@ function clickNewChatScript() {
|
|
|
568
659
|
})()
|
|
569
660
|
`;
|
|
570
661
|
}
|
|
662
|
+
function openGeminiToolsMenuScript() {
|
|
663
|
+
return `
|
|
664
|
+
(() => {
|
|
665
|
+
const labels = ['tools', 'tool', 'mode', '研究', 'deep research', 'deep-research', '工具'];
|
|
666
|
+
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim().toLowerCase();
|
|
667
|
+
const matchesLabel = (value) => {
|
|
668
|
+
const text = normalize(value);
|
|
669
|
+
return labels.some((label) => text.includes(label));
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
const isDisabled = (el) => {
|
|
673
|
+
if (!(el instanceof HTMLElement)) return true;
|
|
674
|
+
if ('disabled' in el && el.disabled) return true;
|
|
675
|
+
if (el.hasAttribute('disabled')) return true;
|
|
676
|
+
const ariaDisabled = (el.getAttribute('aria-disabled') || '').toLowerCase();
|
|
677
|
+
return ariaDisabled === 'true';
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
const isVisible = (el) => {
|
|
681
|
+
if (!(el instanceof HTMLElement)) return false;
|
|
682
|
+
if (el.hidden || el.closest('[hidden]')) return false;
|
|
683
|
+
const ariaHidden = el.getAttribute('aria-hidden');
|
|
684
|
+
if (ariaHidden && ariaHidden.toLowerCase() === 'true') return false;
|
|
685
|
+
if (el.closest('[aria-hidden="true"]')) return false;
|
|
686
|
+
const style = window.getComputedStyle(el);
|
|
687
|
+
if (style.display === 'none' || style.visibility === 'hidden') return false;
|
|
688
|
+
if (Number(style.opacity) === 0) return false;
|
|
689
|
+
if (style.pointerEvents === 'none') return false;
|
|
690
|
+
const rect = el.getBoundingClientRect();
|
|
691
|
+
return rect.width > 0 && rect.height > 0;
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
const isInteractable = (el) => isVisible(el) && !isDisabled(el);
|
|
695
|
+
|
|
696
|
+
const roots = [
|
|
697
|
+
document.querySelector('main'),
|
|
698
|
+
document.querySelector('[role="main"]'),
|
|
699
|
+
document.querySelector('header'),
|
|
700
|
+
document,
|
|
701
|
+
].filter(Boolean);
|
|
702
|
+
|
|
703
|
+
const isMenuTrigger = (node) => {
|
|
704
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
705
|
+
const popupValue = (node.getAttribute('aria-haspopup') || '').toLowerCase();
|
|
706
|
+
const hasPopup = popupValue === 'menu' || popupValue === 'listbox' || popupValue === 'true';
|
|
707
|
+
const controls = (node.getAttribute('aria-controls') || '').toLowerCase();
|
|
708
|
+
const hasControls = ['menu', 'listbox', 'popup'].some((token) => controls.includes(token));
|
|
709
|
+
return hasPopup || hasControls;
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
const menuAlreadyOpen = () => {
|
|
713
|
+
const visibleMenus = Array.from(document.querySelectorAll('[role="menu"], [role="listbox"]')).filter(isVisible);
|
|
714
|
+
const labeledMenu = visibleMenus.some((menu) => {
|
|
715
|
+
const text = menu.textContent || '';
|
|
716
|
+
const aria = menu.getAttribute('aria-label') || '';
|
|
717
|
+
return matchesLabel(text) || matchesLabel(aria);
|
|
718
|
+
});
|
|
719
|
+
if (labeledMenu) return true;
|
|
720
|
+
const expanded = Array.from(document.querySelectorAll('[aria-expanded="true"]')).filter(isVisible);
|
|
721
|
+
return expanded.some((node) => {
|
|
722
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
723
|
+
const text = node.textContent || '';
|
|
724
|
+
const aria = node.getAttribute('aria-label') || '';
|
|
725
|
+
return isMenuTrigger(node) && (matchesLabel(text) || matchesLabel(aria));
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
if (menuAlreadyOpen()) return true;
|
|
730
|
+
|
|
731
|
+
const pickTarget = (root) => {
|
|
732
|
+
const nodes = Array.from(root.querySelectorAll('button, [role="button"]')).filter(isInteractable);
|
|
733
|
+
const matches = nodes.filter((node) => {
|
|
734
|
+
const text = (node.textContent || '').trim().toLowerCase();
|
|
735
|
+
const aria = (node.getAttribute('aria-label') || '').trim().toLowerCase();
|
|
736
|
+
if (!text && !aria) return false;
|
|
737
|
+
return matchesLabel(text) || matchesLabel(aria);
|
|
738
|
+
});
|
|
739
|
+
if (matches.length === 0) return null;
|
|
740
|
+
const menuMatches = matches.filter((node) => isMenuTrigger(node));
|
|
741
|
+
return menuMatches[0] || matches[0];
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
let target = null;
|
|
745
|
+
for (const root of roots) {
|
|
746
|
+
target = pickTarget(root);
|
|
747
|
+
if (target) break;
|
|
748
|
+
}
|
|
749
|
+
if (target instanceof HTMLElement) {
|
|
750
|
+
target.click();
|
|
751
|
+
return true;
|
|
752
|
+
}
|
|
753
|
+
return false;
|
|
754
|
+
})()
|
|
755
|
+
`;
|
|
756
|
+
}
|
|
757
|
+
function selectGeminiToolScript(labels) {
|
|
758
|
+
const labelsJson = JSON.stringify(labels);
|
|
759
|
+
return `
|
|
760
|
+
((targetLabels) => {
|
|
761
|
+
const isDisabled = (el) => {
|
|
762
|
+
if (!(el instanceof HTMLElement)) return true;
|
|
763
|
+
if ('disabled' in el && el.disabled) return true;
|
|
764
|
+
if (el.hasAttribute('disabled')) return true;
|
|
765
|
+
const ariaDisabled = (el.getAttribute('aria-disabled') || '').toLowerCase();
|
|
766
|
+
return ariaDisabled === 'true';
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
const isVisible = (el) => {
|
|
770
|
+
if (!(el instanceof HTMLElement)) return false;
|
|
771
|
+
if (el.hidden || el.closest('[hidden]')) return false;
|
|
772
|
+
const ariaHidden = el.getAttribute('aria-hidden');
|
|
773
|
+
if (ariaHidden && ariaHidden.toLowerCase() === 'true') return false;
|
|
774
|
+
if (el.closest('[aria-hidden="true"]')) return false;
|
|
775
|
+
const style = window.getComputedStyle(el);
|
|
776
|
+
if (style.display === 'none' || style.visibility === 'hidden') return false;
|
|
777
|
+
if (Number(style.opacity) === 0) return false;
|
|
778
|
+
if (style.pointerEvents === 'none') return false;
|
|
779
|
+
const rect = el.getBoundingClientRect();
|
|
780
|
+
return rect.width > 0 && rect.height > 0;
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
const isInteractable = (el) => isVisible(el) && !isDisabled(el);
|
|
784
|
+
|
|
785
|
+
const normalized = Array.isArray(targetLabels)
|
|
786
|
+
? targetLabels.map((label) => String(label || '').trim()).filter((label) => label)
|
|
787
|
+
: [];
|
|
788
|
+
const lowered = normalized.map((label) => label.toLowerCase());
|
|
789
|
+
if (lowered.length === 0) return '';
|
|
790
|
+
|
|
791
|
+
const menuSelectors = [
|
|
792
|
+
'[role="menu"]',
|
|
793
|
+
'[role="listbox"]',
|
|
794
|
+
'[aria-label*="tool" i]',
|
|
795
|
+
'[aria-label*="mode" i]',
|
|
796
|
+
'[aria-modal="true"]',
|
|
797
|
+
];
|
|
798
|
+
const menuRoots = Array.from(document.querySelectorAll(menuSelectors.join(','))).filter(isVisible);
|
|
799
|
+
if (menuRoots.length === 0) return '';
|
|
800
|
+
const seen = new Set();
|
|
801
|
+
|
|
802
|
+
for (const root of menuRoots) {
|
|
803
|
+
const candidates = Array.from(root.querySelectorAll('button, [role="menuitem"], [role="option"], [role="button"], a, li'));
|
|
804
|
+
for (const node of candidates) {
|
|
805
|
+
if (seen.has(node)) continue;
|
|
806
|
+
seen.add(node);
|
|
807
|
+
if (!isInteractable(node)) continue;
|
|
808
|
+
const text = (node.textContent || '').trim().toLowerCase();
|
|
809
|
+
const aria = (node.getAttribute('aria-label') || '').trim().toLowerCase();
|
|
810
|
+
if (!text && !aria) continue;
|
|
811
|
+
const combined = \`\${text} \${aria}\`.trim();
|
|
812
|
+
for (let index = 0; index < lowered.length; index += 1) {
|
|
813
|
+
const label = lowered[index];
|
|
814
|
+
if (label && combined.includes(label)) {
|
|
815
|
+
if (node instanceof HTMLElement) node.click();
|
|
816
|
+
return normalized[index];
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
return '';
|
|
823
|
+
})(${labelsJson})
|
|
824
|
+
`;
|
|
825
|
+
}
|
|
826
|
+
function clickGeminiConfirmButtonScript(labels) {
|
|
827
|
+
const labelsJson = JSON.stringify(labels);
|
|
828
|
+
return `
|
|
829
|
+
((targetLabels) => {
|
|
830
|
+
const isDisabled = (el) => {
|
|
831
|
+
if (!(el instanceof HTMLElement)) return true;
|
|
832
|
+
if ('disabled' in el && el.disabled) return true;
|
|
833
|
+
if (el.hasAttribute('disabled')) return true;
|
|
834
|
+
const ariaDisabled = (el.getAttribute('aria-disabled') || '').toLowerCase();
|
|
835
|
+
return ariaDisabled === 'true';
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
const isVisible = (el) => {
|
|
839
|
+
if (!(el instanceof HTMLElement)) return false;
|
|
840
|
+
if (el.hidden || el.closest('[hidden]')) return false;
|
|
841
|
+
const ariaHidden = el.getAttribute('aria-hidden');
|
|
842
|
+
if (ariaHidden && ariaHidden.toLowerCase() === 'true') return false;
|
|
843
|
+
if (el.closest('[aria-hidden="true"]')) return false;
|
|
844
|
+
const style = window.getComputedStyle(el);
|
|
845
|
+
if (style.display === 'none' || style.visibility === 'hidden') return false;
|
|
846
|
+
if (Number(style.opacity) === 0) return false;
|
|
847
|
+
if (style.pointerEvents === 'none') return false;
|
|
848
|
+
const rect = el.getBoundingClientRect();
|
|
849
|
+
return rect.width > 0 && rect.height > 0;
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
const isInteractable = (el) => isVisible(el) && !isDisabled(el);
|
|
853
|
+
|
|
854
|
+
const normalized = Array.isArray(targetLabels)
|
|
855
|
+
? targetLabels.map((label) => String(label || '').trim()).filter((label) => label)
|
|
856
|
+
: [];
|
|
857
|
+
const lowered = normalized.map((label) => label.toLowerCase());
|
|
858
|
+
if (lowered.length === 0) return '';
|
|
859
|
+
|
|
860
|
+
const dialogRoots = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"]')).filter(isVisible);
|
|
861
|
+
const mainRoot = document.querySelector('main');
|
|
862
|
+
const primaryRoots = [...dialogRoots, mainRoot].filter(Boolean).filter(isVisible);
|
|
863
|
+
const rootGroups = primaryRoots.length > 0 ? [primaryRoots, [document]] : [[document]];
|
|
864
|
+
const seen = new Set();
|
|
865
|
+
|
|
866
|
+
for (const roots of rootGroups) {
|
|
867
|
+
for (const root of roots) {
|
|
868
|
+
const candidates = Array.from(root.querySelectorAll('button, [role="button"]'));
|
|
869
|
+
for (const node of candidates) {
|
|
870
|
+
if (seen.has(node)) continue;
|
|
871
|
+
seen.add(node);
|
|
872
|
+
if (!isInteractable(node)) continue;
|
|
873
|
+
const text = (node.textContent || '').trim().toLowerCase();
|
|
874
|
+
const aria = (node.getAttribute('aria-label') || '').trim().toLowerCase();
|
|
875
|
+
if (!text && !aria) continue;
|
|
876
|
+
const combined = \`\${text} \${aria}\`.trim();
|
|
877
|
+
for (let index = 0; index < lowered.length; index += 1) {
|
|
878
|
+
const label = lowered[index];
|
|
879
|
+
if (label && combined.includes(label)) {
|
|
880
|
+
if (node instanceof HTMLElement) node.click();
|
|
881
|
+
return normalized[index];
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
return '';
|
|
889
|
+
})(${labelsJson})
|
|
890
|
+
`;
|
|
891
|
+
}
|
|
892
|
+
function getGeminiConversationListScript() {
|
|
893
|
+
return `
|
|
894
|
+
(() => {
|
|
895
|
+
const normalizeText = (value) => String(value || '').replace(/\\s+/g, ' ').trim();
|
|
896
|
+
const clampText = (value, maxLength) => {
|
|
897
|
+
const normalized = normalizeText(value);
|
|
898
|
+
if (!normalized) return '';
|
|
899
|
+
if (normalized.length <= maxLength) return normalized;
|
|
900
|
+
return normalized.slice(0, maxLength).trim();
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
const isVisible = (el) => {
|
|
904
|
+
if (!(el instanceof HTMLElement)) return false;
|
|
905
|
+
if (el.hidden || el.closest('[hidden]')) return false;
|
|
906
|
+
const ariaHidden = el.getAttribute('aria-hidden');
|
|
907
|
+
if (ariaHidden && ariaHidden.toLowerCase() === 'true') return false;
|
|
908
|
+
if (el.closest('[aria-hidden="true"]')) return false;
|
|
909
|
+
const style = window.getComputedStyle(el);
|
|
910
|
+
if (style.display === 'none' || style.visibility === 'hidden') return false;
|
|
911
|
+
if (Number(style.opacity) === 0) return false;
|
|
912
|
+
if (style.pointerEvents === 'none') return false;
|
|
913
|
+
const rect = el.getBoundingClientRect();
|
|
914
|
+
return rect.width > 0 && rect.height > 0;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
const selector = 'a[href*="/app"]';
|
|
918
|
+
const navRoots = Array.from(document.querySelectorAll('nav, aside, [role="navigation"]'));
|
|
919
|
+
const rootsWithLinks = navRoots.filter((root) => root.querySelector(selector));
|
|
920
|
+
const roots = rootsWithLinks.length > 0 ? rootsWithLinks : [document];
|
|
921
|
+
|
|
922
|
+
const results = [];
|
|
923
|
+
const seen = new Set();
|
|
924
|
+
const maxLength = 200;
|
|
925
|
+
|
|
926
|
+
for (const root of roots) {
|
|
927
|
+
const anchors = Array.from(root.querySelectorAll(selector));
|
|
928
|
+
for (const anchor of anchors) {
|
|
929
|
+
if (!(anchor instanceof HTMLAnchorElement)) continue;
|
|
930
|
+
if (!isVisible(anchor)) continue;
|
|
931
|
+
const href = anchor.getAttribute('href') || '';
|
|
932
|
+
if (!href) continue;
|
|
933
|
+
let url = '';
|
|
934
|
+
try {
|
|
935
|
+
url = new URL(href, 'https://gemini.google.com').href;
|
|
936
|
+
} catch {
|
|
937
|
+
continue;
|
|
938
|
+
}
|
|
939
|
+
if (!url) continue;
|
|
940
|
+
const title = clampText(anchor.textContent || anchor.getAttribute('aria-label') || '', maxLength);
|
|
941
|
+
if (!title) continue;
|
|
942
|
+
const key = url + '::' + title;
|
|
943
|
+
if (seen.has(key)) continue;
|
|
944
|
+
seen.add(key);
|
|
945
|
+
results.push({ title, url });
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
return results;
|
|
950
|
+
})()
|
|
951
|
+
`;
|
|
952
|
+
}
|
|
953
|
+
function clickGeminiConversationByTitleScript(query) {
|
|
954
|
+
const normalizedQuery = normalizeGeminiTitle(query);
|
|
955
|
+
return `
|
|
956
|
+
((targetQuery) => {
|
|
957
|
+
const normalizeText = (value) => String(value || '').replace(/\\s+/g, ' ').trim().toLowerCase();
|
|
958
|
+
const isDisabled = (el) => {
|
|
959
|
+
if (!(el instanceof HTMLElement)) return true;
|
|
960
|
+
if ('disabled' in el && el.disabled) return true;
|
|
961
|
+
if (el.hasAttribute('disabled')) return true;
|
|
962
|
+
const ariaDisabled = (el.getAttribute('aria-disabled') || '').toLowerCase();
|
|
963
|
+
return ariaDisabled === 'true';
|
|
964
|
+
};
|
|
965
|
+
const isVisible = (el) => {
|
|
966
|
+
if (!(el instanceof HTMLElement)) return false;
|
|
967
|
+
if (el.hidden || el.closest('[hidden]')) return false;
|
|
968
|
+
const ariaHidden = (el.getAttribute('aria-hidden') || '').toLowerCase();
|
|
969
|
+
if (ariaHidden === 'true' || el.closest('[aria-hidden="true"]')) return false;
|
|
970
|
+
const style = window.getComputedStyle(el);
|
|
971
|
+
if (style.display === 'none' || style.visibility === 'hidden') return false;
|
|
972
|
+
if (Number(style.opacity) === 0 || style.pointerEvents === 'none') return false;
|
|
973
|
+
const rect = el.getBoundingClientRect();
|
|
974
|
+
return rect.width > 0 && rect.height > 0;
|
|
975
|
+
};
|
|
976
|
+
const selector = 'nav a[href*="/app"], aside a[href*="/app"], [role="navigation"] a[href*="/app"], a[href*="/app"]';
|
|
977
|
+
const anchors = Array.from(document.querySelectorAll(selector));
|
|
978
|
+
|
|
979
|
+
for (const anchor of anchors) {
|
|
980
|
+
if (!(anchor instanceof HTMLAnchorElement)) continue;
|
|
981
|
+
if (!isVisible(anchor)) continue;
|
|
982
|
+
if (isDisabled(anchor)) continue;
|
|
983
|
+
const title = normalizeText(anchor.textContent || anchor.getAttribute('aria-label') || '');
|
|
984
|
+
if (!title || !targetQuery) continue;
|
|
985
|
+
if (!title.includes(targetQuery)) continue;
|
|
986
|
+
anchor.click();
|
|
987
|
+
return true;
|
|
988
|
+
}
|
|
989
|
+
return false;
|
|
990
|
+
})(${JSON.stringify(normalizedQuery)})
|
|
991
|
+
`;
|
|
992
|
+
}
|
|
571
993
|
function currentUrlScript() {
|
|
572
994
|
return 'window.location.href';
|
|
573
995
|
}
|
|
@@ -589,6 +1011,40 @@ export async function ensureGeminiPage(page) {
|
|
|
589
1011
|
await page.wait(1);
|
|
590
1012
|
}
|
|
591
1013
|
}
|
|
1014
|
+
export async function getCurrentGeminiUrl(page) {
|
|
1015
|
+
await ensureGeminiPage(page);
|
|
1016
|
+
const url = await page.evaluate(currentUrlScript()).catch(() => '');
|
|
1017
|
+
if (typeof url === 'string' && url.trim())
|
|
1018
|
+
return url;
|
|
1019
|
+
return GEMINI_APP_URL;
|
|
1020
|
+
}
|
|
1021
|
+
export async function openGeminiToolsMenu(page) {
|
|
1022
|
+
await ensureGeminiPage(page);
|
|
1023
|
+
const opened = await page.evaluate(openGeminiToolsMenuScript());
|
|
1024
|
+
if (opened) {
|
|
1025
|
+
await page.wait(0.5);
|
|
1026
|
+
return true;
|
|
1027
|
+
}
|
|
1028
|
+
return false;
|
|
1029
|
+
}
|
|
1030
|
+
export async function selectGeminiTool(page, labels) {
|
|
1031
|
+
await ensureGeminiPage(page);
|
|
1032
|
+
await openGeminiToolsMenu(page);
|
|
1033
|
+
const matched = await page.evaluate(selectGeminiToolScript(labels));
|
|
1034
|
+
return typeof matched === 'string' ? matched : '';
|
|
1035
|
+
}
|
|
1036
|
+
export async function waitForGeminiConfirmButton(page, labels, timeoutSeconds) {
|
|
1037
|
+
await ensureGeminiPage(page);
|
|
1038
|
+
const pollIntervalSeconds = 1;
|
|
1039
|
+
const maxPolls = Math.max(1, Math.ceil(timeoutSeconds / pollIntervalSeconds));
|
|
1040
|
+
for (let index = 0; index < maxPolls; index += 1) {
|
|
1041
|
+
await page.wait(index === 0 ? 0.5 : pollIntervalSeconds);
|
|
1042
|
+
const matched = await page.evaluate(clickGeminiConfirmButtonScript(labels));
|
|
1043
|
+
if (typeof matched === 'string' && matched)
|
|
1044
|
+
return matched;
|
|
1045
|
+
}
|
|
1046
|
+
return '';
|
|
1047
|
+
}
|
|
592
1048
|
export async function getGeminiPageState(page) {
|
|
593
1049
|
await ensureGeminiPage(page);
|
|
594
1050
|
return await page.evaluate(getStateScript());
|
|
@@ -602,6 +1058,25 @@ export async function startNewGeminiChat(page) {
|
|
|
602
1058
|
await page.wait(1);
|
|
603
1059
|
return action;
|
|
604
1060
|
}
|
|
1061
|
+
export async function getGeminiConversationList(page) {
|
|
1062
|
+
await ensureGeminiPage(page);
|
|
1063
|
+
const raw = await page.evaluate(getGeminiConversationListScript());
|
|
1064
|
+
if (!Array.isArray(raw))
|
|
1065
|
+
return [];
|
|
1066
|
+
return raw
|
|
1067
|
+
.filter((item) => item && typeof item.title === 'string' && typeof item.url === 'string')
|
|
1068
|
+
.map((item) => ({ Title: item.title, Url: item.url }));
|
|
1069
|
+
}
|
|
1070
|
+
export async function clickGeminiConversationByTitle(page, query) {
|
|
1071
|
+
await ensureGeminiPage(page);
|
|
1072
|
+
const normalizedQuery = normalizeGeminiTitle(query);
|
|
1073
|
+
if (!normalizedQuery)
|
|
1074
|
+
return false;
|
|
1075
|
+
const clicked = await page.evaluate(clickGeminiConversationByTitleScript(normalizedQuery));
|
|
1076
|
+
if (clicked)
|
|
1077
|
+
await page.wait(1);
|
|
1078
|
+
return !!clicked;
|
|
1079
|
+
}
|
|
605
1080
|
export async function getGeminiVisibleTurns(page) {
|
|
606
1081
|
const turns = await getGeminiStructuredTurns(page);
|
|
607
1082
|
if (Array.isArray(turns) && turns.length > 0)
|
|
@@ -618,6 +1093,27 @@ export async function getGeminiTranscriptLines(page) {
|
|
|
618
1093
|
await ensureGeminiPage(page);
|
|
619
1094
|
return await page.evaluate(getTranscriptLinesScript());
|
|
620
1095
|
}
|
|
1096
|
+
export async function waitForGeminiTranscript(page, attempts = 5) {
|
|
1097
|
+
let lines = [];
|
|
1098
|
+
for (let index = 0; index < attempts; index += 1) {
|
|
1099
|
+
lines = await getGeminiTranscriptLines(page);
|
|
1100
|
+
if (lines.length > 0)
|
|
1101
|
+
return lines;
|
|
1102
|
+
if (index < attempts - 1)
|
|
1103
|
+
await page.wait(1);
|
|
1104
|
+
}
|
|
1105
|
+
return lines;
|
|
1106
|
+
}
|
|
1107
|
+
export async function getLatestGeminiAssistantResponse(page) {
|
|
1108
|
+
await ensureGeminiPage(page);
|
|
1109
|
+
const turns = await getGeminiVisibleTurns(page);
|
|
1110
|
+
const assistantTurn = [...turns].reverse().find((turn) => turn.Role === 'Assistant');
|
|
1111
|
+
if (assistantTurn?.Text) {
|
|
1112
|
+
return sanitizeGeminiResponseText(assistantTurn.Text, '');
|
|
1113
|
+
}
|
|
1114
|
+
const lines = await getGeminiTranscriptLines(page);
|
|
1115
|
+
return lines.join('\n').trim();
|
|
1116
|
+
}
|
|
621
1117
|
export async function readGeminiSnapshot(page) {
|
|
622
1118
|
await ensureGeminiPage(page);
|
|
623
1119
|
return await page.evaluate(readGeminiSnapshotScript());
|
|
@@ -657,7 +1153,12 @@ export async function waitForGeminiSubmission(page, before, timeoutSeconds) {
|
|
|
657
1153
|
reason: 'composer_generating',
|
|
658
1154
|
};
|
|
659
1155
|
}
|
|
660
|
-
|
|
1156
|
+
// Transcript-only growth is noisy on /app root. When URL is available,
|
|
1157
|
+
// trust this signal only after Gemini has navigated into a concrete
|
|
1158
|
+
// conversation URL. (Keep backwards compatibility for mocked snapshots
|
|
1159
|
+
// that don't carry url.)
|
|
1160
|
+
const transcriptSubmissionAllowed = !current.url || isGeminiConversationUrl(String(current.url));
|
|
1161
|
+
if (!current.composerHasText && transcriptDelta.length > 0 && transcriptSubmissionAllowed) {
|
|
661
1162
|
return {
|
|
662
1163
|
snapshot: current,
|
|
663
1164
|
preSendAssistantCount,
|
|
@@ -717,6 +1218,517 @@ export async function sendGeminiMessage(page, text) {
|
|
|
717
1218
|
await page.wait(1);
|
|
718
1219
|
return 'enter';
|
|
719
1220
|
}
|
|
1221
|
+
function normalizeGeminiExportUrls(value) {
|
|
1222
|
+
if (!Array.isArray(value))
|
|
1223
|
+
return [];
|
|
1224
|
+
const seen = new Set();
|
|
1225
|
+
const urls = [];
|
|
1226
|
+
for (const item of value) {
|
|
1227
|
+
const raw = String(item ?? '').trim();
|
|
1228
|
+
if (!raw || seen.has(raw))
|
|
1229
|
+
continue;
|
|
1230
|
+
seen.add(raw);
|
|
1231
|
+
urls.push(raw);
|
|
1232
|
+
}
|
|
1233
|
+
return urls;
|
|
1234
|
+
}
|
|
1235
|
+
export function pickGeminiDeepResearchExportUrl(rawUrls, currentUrl) {
|
|
1236
|
+
let bestScore = -Infinity;
|
|
1237
|
+
let bestUrl = '';
|
|
1238
|
+
let bestSource = 'none';
|
|
1239
|
+
const sourceWeight = {
|
|
1240
|
+
fetch: 50,
|
|
1241
|
+
xhr: 45,
|
|
1242
|
+
'fetch-body': 72,
|
|
1243
|
+
'xhr-body': 72,
|
|
1244
|
+
'fetch-body-docs-id': 95,
|
|
1245
|
+
'xhr-body-docs-id': 95,
|
|
1246
|
+
open: 55,
|
|
1247
|
+
anchor: 55,
|
|
1248
|
+
performance: 35,
|
|
1249
|
+
};
|
|
1250
|
+
for (const rawEntry of rawUrls) {
|
|
1251
|
+
const match = rawEntry.match(/^([a-z-]+)::(.+)$/i);
|
|
1252
|
+
const sourceKey = (match?.[1] ?? 'performance').toLowerCase();
|
|
1253
|
+
const rawUrl = (match?.[2] ?? rawEntry).trim();
|
|
1254
|
+
if (!rawUrl)
|
|
1255
|
+
continue;
|
|
1256
|
+
let parsedUrl = rawUrl;
|
|
1257
|
+
let isBlob = false;
|
|
1258
|
+
if (rawUrl.startsWith('blob:')) {
|
|
1259
|
+
isBlob = true;
|
|
1260
|
+
}
|
|
1261
|
+
else {
|
|
1262
|
+
try {
|
|
1263
|
+
parsedUrl = new URL(rawUrl, currentUrl).href;
|
|
1264
|
+
}
|
|
1265
|
+
catch {
|
|
1266
|
+
continue;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
if (!isBlob) {
|
|
1270
|
+
try {
|
|
1271
|
+
const parsed = new URL(parsedUrl);
|
|
1272
|
+
if (!['http:', 'https:'].includes(parsed.protocol))
|
|
1273
|
+
continue;
|
|
1274
|
+
}
|
|
1275
|
+
catch {
|
|
1276
|
+
continue;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
const hasMarkdownSignal = /\.md(?:$|[?#])/i.test(parsedUrl) || /markdown/i.test(parsedUrl);
|
|
1280
|
+
const hasExportSignal = /export|download|attachment|file|save-report/i.test(parsedUrl);
|
|
1281
|
+
const isGoogleDocUrl = /docs\.google\.com\/document\//i.test(parsedUrl);
|
|
1282
|
+
const isGoogleSheetUrl = /docs\.google\.com\/spreadsheets\//i.test(parsedUrl);
|
|
1283
|
+
const isNoiseEndpoint = /cspreport|allowlist|gen_204|telemetry|metrics|analytics|doubleclick|logging|collect|favicon/i.test(parsedUrl);
|
|
1284
|
+
let score = sourceWeight[sourceKey] ?? 20;
|
|
1285
|
+
if (hasMarkdownSignal)
|
|
1286
|
+
score += 45;
|
|
1287
|
+
if (hasExportSignal)
|
|
1288
|
+
score += 25;
|
|
1289
|
+
if (isGoogleDocUrl)
|
|
1290
|
+
score += 100;
|
|
1291
|
+
if (isGoogleSheetUrl)
|
|
1292
|
+
score -= 160;
|
|
1293
|
+
if (/gemini\.google\.com\/app\//i.test(parsedUrl))
|
|
1294
|
+
score -= 60;
|
|
1295
|
+
if (/googleapis\.com|gstatic\.com|doubleclick\.net|google-analytics/i.test(parsedUrl))
|
|
1296
|
+
score -= 40;
|
|
1297
|
+
if (!hasMarkdownSignal && !hasExportSignal && !isBlob)
|
|
1298
|
+
score -= 40;
|
|
1299
|
+
if (isNoiseEndpoint)
|
|
1300
|
+
score -= 120;
|
|
1301
|
+
if (parsedUrl === currentUrl)
|
|
1302
|
+
score -= 80;
|
|
1303
|
+
if (isBlob)
|
|
1304
|
+
score += 25;
|
|
1305
|
+
if (score > bestScore) {
|
|
1306
|
+
bestScore = score;
|
|
1307
|
+
bestUrl = parsedUrl;
|
|
1308
|
+
if (isBlob)
|
|
1309
|
+
bestSource = 'blob';
|
|
1310
|
+
else if (sourceKey === 'open')
|
|
1311
|
+
bestSource = 'window-open';
|
|
1312
|
+
else if (sourceKey === 'anchor')
|
|
1313
|
+
bestSource = 'anchor';
|
|
1314
|
+
else if (sourceKey === 'performance')
|
|
1315
|
+
bestSource = 'performance';
|
|
1316
|
+
else
|
|
1317
|
+
bestSource = 'network';
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
if (!bestUrl || bestScore < 60) {
|
|
1321
|
+
return { url: '', source: 'none' };
|
|
1322
|
+
}
|
|
1323
|
+
return { url: bestUrl, source: bestSource };
|
|
1324
|
+
}
|
|
1325
|
+
function exportGeminiDeepResearchReportScript(maxWaitMs) {
|
|
1326
|
+
return `
|
|
1327
|
+
(async () => {
|
|
1328
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
1329
|
+
const labels = {
|
|
1330
|
+
actionMenu: ['open menu for conversation actions', 'conversation actions', '会话操作'],
|
|
1331
|
+
share: ['share & export', 'share and export', 'share/export', '分享与导出', '分享和导出', '分享并导出', '共享和导出'],
|
|
1332
|
+
shareConversation: ['share conversation', '分享会话', '分享对话'],
|
|
1333
|
+
export: ['export', '导出'],
|
|
1334
|
+
exportDocs: ['export to docs', 'export to google docs', 'export to doc', '导出到 docs', '导出到文档', '导出到 google docs'],
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
const recorderKey = '__opencliGeminiExportUrls';
|
|
1338
|
+
const patchedKey = '__opencliGeminiExportPatched';
|
|
1339
|
+
const trace = [];
|
|
1340
|
+
const tracePush = (step, detail = '') => {
|
|
1341
|
+
const entry = detail ? step + ':' + detail : step;
|
|
1342
|
+
trace.push(entry);
|
|
1343
|
+
if (trace.length > 80) trace.shift();
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
const normalize = (value) => (value || '').replace(/\\s+/g, ' ').trim().toLowerCase();
|
|
1347
|
+
const normalizeLabels = (values) => {
|
|
1348
|
+
if (!Array.isArray(values)) return [];
|
|
1349
|
+
return values.map((value) => normalize(value)).filter(Boolean);
|
|
1350
|
+
};
|
|
1351
|
+
const includesAny = (value, candidates) => {
|
|
1352
|
+
const text = normalize(value);
|
|
1353
|
+
if (!text) return false;
|
|
1354
|
+
return candidates.some((candidate) => text.includes(candidate));
|
|
1355
|
+
};
|
|
1356
|
+
const labelsNormalized = {
|
|
1357
|
+
actionMenu: normalizeLabels(labels.actionMenu),
|
|
1358
|
+
share: normalizeLabels(labels.share),
|
|
1359
|
+
shareConversation: normalizeLabels(labels.shareConversation),
|
|
1360
|
+
export: normalizeLabels(labels.export),
|
|
1361
|
+
exportDocs: normalizeLabels(labels.exportDocs),
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
const queryAllDeep = (roots, selector) => {
|
|
1365
|
+
const seed = Array.isArray(roots) && roots.length > 0 ? roots : [document];
|
|
1366
|
+
const seenScopes = new Set();
|
|
1367
|
+
const seenElements = new Set();
|
|
1368
|
+
const out = [];
|
|
1369
|
+
const queue = [...seed];
|
|
1370
|
+
while (queue.length > 0) {
|
|
1371
|
+
const scope = queue.shift();
|
|
1372
|
+
const isValidScope = scope === document
|
|
1373
|
+
|| scope instanceof Document
|
|
1374
|
+
|| scope instanceof Element
|
|
1375
|
+
|| scope instanceof ShadowRoot;
|
|
1376
|
+
if (!isValidScope || seenScopes.has(scope)) continue;
|
|
1377
|
+
seenScopes.add(scope);
|
|
1378
|
+
|
|
1379
|
+
let nodes = [];
|
|
1380
|
+
try {
|
|
1381
|
+
nodes = Array.from(scope.querySelectorAll(selector));
|
|
1382
|
+
} catch {}
|
|
1383
|
+
|
|
1384
|
+
for (const node of nodes) {
|
|
1385
|
+
if (!(node instanceof Element)) continue;
|
|
1386
|
+
if (!seenElements.has(node)) {
|
|
1387
|
+
seenElements.add(node);
|
|
1388
|
+
out.push(node);
|
|
1389
|
+
}
|
|
1390
|
+
if (node.shadowRoot) queue.push(node.shadowRoot);
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
let descendants = [];
|
|
1394
|
+
try {
|
|
1395
|
+
descendants = Array.from(scope.querySelectorAll('*'));
|
|
1396
|
+
} catch {}
|
|
1397
|
+
for (const child of descendants) {
|
|
1398
|
+
if (child instanceof Element && child.shadowRoot) queue.push(child.shadowRoot);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
return out;
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
const isVisible = (el) => {
|
|
1405
|
+
if (!(el instanceof HTMLElement)) return false;
|
|
1406
|
+
if (el.hidden || el.closest('[hidden]')) return false;
|
|
1407
|
+
const ariaHidden = (el.getAttribute('aria-hidden') || '').toLowerCase();
|
|
1408
|
+
if (ariaHidden === 'true' || el.closest('[aria-hidden="true"]')) return false;
|
|
1409
|
+
const style = window.getComputedStyle(el);
|
|
1410
|
+
if (style.display === 'none' || style.visibility === 'hidden') return false;
|
|
1411
|
+
if (Number(style.opacity) === 0 || style.pointerEvents === 'none') return false;
|
|
1412
|
+
const rect = el.getBoundingClientRect();
|
|
1413
|
+
return rect.width > 0 && rect.height > 0;
|
|
1414
|
+
};
|
|
1415
|
+
const isDisabled = (el) => {
|
|
1416
|
+
if (!(el instanceof HTMLElement)) return true;
|
|
1417
|
+
if ('disabled' in el && el.disabled) return true;
|
|
1418
|
+
if (el.hasAttribute('disabled')) return true;
|
|
1419
|
+
return (el.getAttribute('aria-disabled') || '').toLowerCase() === 'true';
|
|
1420
|
+
};
|
|
1421
|
+
const isInteractable = (el) => isVisible(el) && !isDisabled(el);
|
|
1422
|
+
const textOf = (node) => [
|
|
1423
|
+
node?.textContent || '',
|
|
1424
|
+
node instanceof HTMLElement ? (node.innerText || '') : '',
|
|
1425
|
+
node?.getAttribute?.('aria-label') || '',
|
|
1426
|
+
node?.getAttribute?.('title') || '',
|
|
1427
|
+
node?.getAttribute?.('data-tooltip') || '',
|
|
1428
|
+
node?.getAttribute?.('mattooltip') || '',
|
|
1429
|
+
].join(' ');
|
|
1430
|
+
const hasTokens = (value, tokens) => {
|
|
1431
|
+
const normalized = normalize(value);
|
|
1432
|
+
if (!normalized) return false;
|
|
1433
|
+
return tokens.every((token) => normalized.includes(token));
|
|
1434
|
+
};
|
|
1435
|
+
const isKindMatch = (kind, combined, targetLabels) => {
|
|
1436
|
+
if (includesAny(combined, targetLabels)) return true;
|
|
1437
|
+
if (kind === 'share') return hasTokens(combined, ['share', 'export']) || hasTokens(combined, ['分享', '导出']);
|
|
1438
|
+
if (kind === 'export') return hasTokens(combined, ['export']) || hasTokens(combined, ['导出']);
|
|
1439
|
+
if (kind === 'export-docs') {
|
|
1440
|
+
return hasTokens(combined, ['export', 'docs'])
|
|
1441
|
+
|| hasTokens(combined, ['导出', '文档'])
|
|
1442
|
+
|| hasTokens(combined, ['导出', 'docs']);
|
|
1443
|
+
}
|
|
1444
|
+
if (kind === 'action-menu') {
|
|
1445
|
+
return hasTokens(combined, ['conversation', 'action']) || hasTokens(combined, ['会话', '操作']);
|
|
1446
|
+
}
|
|
1447
|
+
return false;
|
|
1448
|
+
};
|
|
1449
|
+
const triggerClick = (node) => {
|
|
1450
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
1451
|
+
try { node.scrollIntoView({ block: 'center', inline: 'center' }); } catch {}
|
|
1452
|
+
try { node.focus({ preventScroll: true }); } catch {}
|
|
1453
|
+
try {
|
|
1454
|
+
const EventCtor = window.PointerEvent || window.MouseEvent;
|
|
1455
|
+
node.dispatchEvent(new EventCtor('pointerdown', { bubbles: true, cancelable: true, composed: true, button: 0 }));
|
|
1456
|
+
} catch {}
|
|
1457
|
+
try { node.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, cancelable: true, composed: true, button: 0 })); } catch {}
|
|
1458
|
+
try { node.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, cancelable: true, composed: true, button: 0 })); } catch {}
|
|
1459
|
+
try { node.click(); } catch { return false; }
|
|
1460
|
+
return true;
|
|
1461
|
+
};
|
|
1462
|
+
|
|
1463
|
+
const ensureRecorder = () => {
|
|
1464
|
+
if (!Array.isArray(window[recorderKey])) window[recorderKey] = [];
|
|
1465
|
+
const push = (prefix, raw) => {
|
|
1466
|
+
const url = String(raw || '').trim();
|
|
1467
|
+
if (!url) return;
|
|
1468
|
+
window[recorderKey].push(prefix + '::' + url);
|
|
1469
|
+
};
|
|
1470
|
+
const extractUrlsFromText = (rawText) => {
|
|
1471
|
+
const text = String(rawText || '');
|
|
1472
|
+
const urls = [];
|
|
1473
|
+
const direct = text.match(/https?:\\/\\/[^\\s"'<>\\\\]+/g) || [];
|
|
1474
|
+
urls.push(...direct);
|
|
1475
|
+
const escaped = text.match(/https?:\\\\\\/\\\\\\/[^\\s"'<>]+/g) || [];
|
|
1476
|
+
for (const item of escaped) {
|
|
1477
|
+
urls.push(
|
|
1478
|
+
item
|
|
1479
|
+
.split('\\\\/').join('/')
|
|
1480
|
+
.split('\\\\u003d').join('=')
|
|
1481
|
+
.split('\\\\u0026').join('&'),
|
|
1482
|
+
);
|
|
1483
|
+
}
|
|
1484
|
+
return Array.from(new Set(urls.map((value) => String(value || '').trim()).filter(Boolean)));
|
|
1485
|
+
};
|
|
1486
|
+
const extractDocsIdsFromText = (rawText) => {
|
|
1487
|
+
const text = String(rawText || '');
|
|
1488
|
+
const ids = [];
|
|
1489
|
+
const patterns = [
|
|
1490
|
+
/"id"\\s*:\\s*"([a-zA-Z0-9_-]{15,})"/g,
|
|
1491
|
+
/'id'\\s*:\\s*'([a-zA-Z0-9_-]{15,})'/g,
|
|
1492
|
+
];
|
|
1493
|
+
for (const pattern of patterns) {
|
|
1494
|
+
let match;
|
|
1495
|
+
while ((match = pattern.exec(text)) !== null) {
|
|
1496
|
+
const docId = String(match[1] || '').trim();
|
|
1497
|
+
if (docId) ids.push(docId);
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
return Array.from(new Set(ids));
|
|
1501
|
+
};
|
|
1502
|
+
const docsUrlFromId = (id) => {
|
|
1503
|
+
const docId = String(id || '').trim();
|
|
1504
|
+
if (!/^[a-zA-Z0-9_-]{15,}$/.test(docId)) return '';
|
|
1505
|
+
return 'https://docs.google.com/document/d/' + docId + '/edit';
|
|
1506
|
+
};
|
|
1507
|
+
const isDriveDocCreateRequest = (url) => /\\/upload\\/drive\\/v3\\/files/i.test(String(url || ''));
|
|
1508
|
+
|
|
1509
|
+
if (window[patchedKey]) return push;
|
|
1510
|
+
window[patchedKey] = true;
|
|
1511
|
+
|
|
1512
|
+
const originalFetch = window.fetch.bind(window);
|
|
1513
|
+
window.fetch = (...args) => {
|
|
1514
|
+
let reqUrl = '';
|
|
1515
|
+
try {
|
|
1516
|
+
const input = args[0];
|
|
1517
|
+
reqUrl = typeof input === 'string' ? input : (input && input.url) || '';
|
|
1518
|
+
push('fetch', reqUrl);
|
|
1519
|
+
} catch {}
|
|
1520
|
+
return originalFetch(...args).then((response) => {
|
|
1521
|
+
try {
|
|
1522
|
+
response.clone().text().then((text) => {
|
|
1523
|
+
const embeddedUrls = extractUrlsFromText(text);
|
|
1524
|
+
for (const embeddedUrl of embeddedUrls) push('fetch-body', embeddedUrl);
|
|
1525
|
+
if (isDriveDocCreateRequest(reqUrl)) {
|
|
1526
|
+
const docIds = extractDocsIdsFromText(text);
|
|
1527
|
+
for (const docId of docIds) {
|
|
1528
|
+
const docUrl = docsUrlFromId(docId);
|
|
1529
|
+
if (docUrl) push('fetch-body-docs-id', docUrl);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}).catch(() => {});
|
|
1533
|
+
} catch {}
|
|
1534
|
+
return response;
|
|
1535
|
+
});
|
|
1536
|
+
};
|
|
1537
|
+
|
|
1538
|
+
const originalXhrOpen = XMLHttpRequest.prototype.open;
|
|
1539
|
+
XMLHttpRequest.prototype.open = function(method, url, ...rest) {
|
|
1540
|
+
try { push('xhr', url); } catch {}
|
|
1541
|
+
try { this.__opencliReqUrl = String(url || ''); } catch {}
|
|
1542
|
+
return originalXhrOpen.call(this, method, url, ...rest);
|
|
1543
|
+
};
|
|
1544
|
+
const originalXhrSend = XMLHttpRequest.prototype.send;
|
|
1545
|
+
XMLHttpRequest.prototype.send = function(...args) {
|
|
1546
|
+
try {
|
|
1547
|
+
this.addEventListener('load', () => {
|
|
1548
|
+
try {
|
|
1549
|
+
const embeddedUrls = extractUrlsFromText(this.responseText || '');
|
|
1550
|
+
for (const embeddedUrl of embeddedUrls) push('xhr-body', embeddedUrl);
|
|
1551
|
+
const reqUrl = String(this.__opencliReqUrl || '');
|
|
1552
|
+
if (isDriveDocCreateRequest(reqUrl)) {
|
|
1553
|
+
const docIds = extractDocsIdsFromText(this.responseText || '');
|
|
1554
|
+
for (const docId of docIds) {
|
|
1555
|
+
const docUrl = docsUrlFromId(docId);
|
|
1556
|
+
if (docUrl) push('xhr-body-docs-id', docUrl);
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
} catch {}
|
|
1560
|
+
});
|
|
1561
|
+
} catch {}
|
|
1562
|
+
return originalXhrSend.apply(this, args);
|
|
1563
|
+
};
|
|
1564
|
+
|
|
1565
|
+
const originalOpen = window.open.bind(window);
|
|
1566
|
+
window.open = (...args) => {
|
|
1567
|
+
try { push('open', args[0]); } catch {}
|
|
1568
|
+
return originalOpen(...args);
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
const originalAnchorClick = HTMLAnchorElement.prototype.click;
|
|
1572
|
+
HTMLAnchorElement.prototype.click = function(...args) {
|
|
1573
|
+
try { push('anchor', this.href || this.getAttribute('href')); } catch {}
|
|
1574
|
+
return originalAnchorClick.apply(this, args);
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
return push;
|
|
1578
|
+
};
|
|
1579
|
+
|
|
1580
|
+
const pushUrl = ensureRecorder();
|
|
1581
|
+
const collectUrls = () => {
|
|
1582
|
+
try {
|
|
1583
|
+
const entries = performance.getEntriesByType('resource');
|
|
1584
|
+
for (const entry of entries) {
|
|
1585
|
+
if (!entry || !entry.name) continue;
|
|
1586
|
+
pushUrl('performance', entry.name);
|
|
1587
|
+
}
|
|
1588
|
+
} catch {}
|
|
1589
|
+
try {
|
|
1590
|
+
const anchors = queryAllDeep([document], 'a[href]');
|
|
1591
|
+
for (const anchor of anchors) {
|
|
1592
|
+
const href = anchor.getAttribute('href') || '';
|
|
1593
|
+
if (!href) continue;
|
|
1594
|
+
if (/docs\\.google\\.com\\/document\\//i.test(href)) pushUrl('anchor', href);
|
|
1595
|
+
}
|
|
1596
|
+
} catch {}
|
|
1597
|
+
const all = Array.isArray(window[recorderKey]) ? window[recorderKey] : [];
|
|
1598
|
+
return Array.from(new Set(all.map((value) => String(value || '').trim()).filter(Boolean)));
|
|
1599
|
+
};
|
|
1600
|
+
|
|
1601
|
+
const clickByLabels = (kind, targetLabels, roots) => {
|
|
1602
|
+
const allRoots = Array.isArray(roots) && roots.length > 0 ? roots : [document];
|
|
1603
|
+
const selector = 'button, [role="button"], [role="menuitem"], [role="option"], a, li';
|
|
1604
|
+
|
|
1605
|
+
for (const root of allRoots) {
|
|
1606
|
+
if (!(root instanceof Document || root instanceof Element)) continue;
|
|
1607
|
+
let nodes = [];
|
|
1608
|
+
try {
|
|
1609
|
+
nodes = Array.from(root.querySelectorAll(selector));
|
|
1610
|
+
} catch {
|
|
1611
|
+
continue;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
for (const node of nodes) {
|
|
1615
|
+
if (!isInteractable(node)) continue;
|
|
1616
|
+
const combined = normalize(textOf(node));
|
|
1617
|
+
if (!combined) continue;
|
|
1618
|
+
if (!isKindMatch(kind, combined, targetLabels)) continue;
|
|
1619
|
+
if (triggerClick(node)) {
|
|
1620
|
+
const clickedText = (textOf(node) || targetLabels[0] || '').trim();
|
|
1621
|
+
tracePush('clicked', kind + '|' + clickedText.slice(0, 120));
|
|
1622
|
+
return clickedText;
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
tracePush('miss', kind);
|
|
1627
|
+
return '';
|
|
1628
|
+
};
|
|
1629
|
+
|
|
1630
|
+
const getDialogRoots = () =>
|
|
1631
|
+
queryAllDeep([document], '[role="dialog"], [aria-modal="true"], [role="menu"], [role="listbox"]')
|
|
1632
|
+
.filter((node) => isVisible(node));
|
|
1633
|
+
const buildRoots = () => {
|
|
1634
|
+
const dialogRoots = getDialogRoots();
|
|
1635
|
+
if (dialogRoots.length > 0) return [...dialogRoots, document];
|
|
1636
|
+
return [document];
|
|
1637
|
+
};
|
|
1638
|
+
const clickWithRetry = async (kind, targetLabels, attempts, delayMs, includeDialogs = true) => {
|
|
1639
|
+
for (let index = 0; index < attempts; index += 1) {
|
|
1640
|
+
const roots = includeDialogs ? buildRoots() : [document];
|
|
1641
|
+
const clicked = clickByLabels(kind, targetLabels, roots);
|
|
1642
|
+
if (clicked) return clicked;
|
|
1643
|
+
await sleep(delayMs);
|
|
1644
|
+
}
|
|
1645
|
+
return '';
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
tracePush('start', window.location.href);
|
|
1649
|
+
let exportDocsBtn = await clickWithRetry('export-docs', labelsNormalized.exportDocs, 2, 250, true);
|
|
1650
|
+
let share = '';
|
|
1651
|
+
if (!exportDocsBtn) {
|
|
1652
|
+
share = await clickWithRetry('share', labelsNormalized.share, 4, 280, true);
|
|
1653
|
+
}
|
|
1654
|
+
if (!exportDocsBtn && !share) {
|
|
1655
|
+
await clickWithRetry('action-menu', labelsNormalized.actionMenu, 2, 250, false);
|
|
1656
|
+
await clickWithRetry('share-conversation', labelsNormalized.shareConversation, 2, 250, true);
|
|
1657
|
+
share = await clickWithRetry('share', labelsNormalized.share, 4, 280, true);
|
|
1658
|
+
}
|
|
1659
|
+
if (!exportDocsBtn) {
|
|
1660
|
+
await sleep(350);
|
|
1661
|
+
exportDocsBtn = await clickWithRetry('export-docs', labelsNormalized.exportDocs, 8, 280, true);
|
|
1662
|
+
}
|
|
1663
|
+
if (!exportDocsBtn) {
|
|
1664
|
+
const exportEntry = await clickWithRetry('export', labelsNormalized.export, 2, 220, true);
|
|
1665
|
+
if (exportEntry) {
|
|
1666
|
+
await sleep(240);
|
|
1667
|
+
exportDocsBtn = await clickWithRetry('export-docs', labelsNormalized.exportDocs, 6, 280, true);
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
if (!share && !exportDocsBtn) {
|
|
1672
|
+
return { ok: false, step: 'share', currentUrl: window.location.href, trace, urls: collectUrls() };
|
|
1673
|
+
}
|
|
1674
|
+
if (!exportDocsBtn) {
|
|
1675
|
+
return { ok: false, step: 'export-docs', currentUrl: window.location.href, share, trace, urls: collectUrls() };
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
const deadline = Date.now() + ${Math.max(5000, Math.min(maxWaitMs, 180000))};
|
|
1679
|
+
while (Date.now() < deadline) {
|
|
1680
|
+
const urls = collectUrls();
|
|
1681
|
+
const hasDocsSignal = urls.some((value) => /docs\\.google\\.com\\/document\\//i.test(String(value || '')));
|
|
1682
|
+
const sameTabDocs = /docs\\.google\\.com\\/document\\//i.test(window.location.href || '');
|
|
1683
|
+
if (hasDocsSignal) {
|
|
1684
|
+
return { ok: true, step: 'done', currentUrl: window.location.href, share, exportDocs: exportDocsBtn, trace, urls };
|
|
1685
|
+
}
|
|
1686
|
+
if (sameTabDocs) {
|
|
1687
|
+
urls.push('open::' + window.location.href);
|
|
1688
|
+
return { ok: true, step: 'same-tab-docs', currentUrl: window.location.href, share, exportDocs: exportDocsBtn, trace, urls };
|
|
1689
|
+
}
|
|
1690
|
+
await sleep(300);
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
return { ok: true, step: 'timeout', currentUrl: window.location.href, share, exportDocs: exportDocsBtn, trace, urls: collectUrls() };
|
|
1694
|
+
})()
|
|
1695
|
+
`;
|
|
1696
|
+
}
|
|
1697
|
+
function extractDocsUrlFromTabs(tabs) {
|
|
1698
|
+
if (!Array.isArray(tabs))
|
|
1699
|
+
return '';
|
|
1700
|
+
for (const tab of tabs) {
|
|
1701
|
+
if (!tab || typeof tab !== 'object')
|
|
1702
|
+
continue;
|
|
1703
|
+
const url = String(tab.url ?? '').trim();
|
|
1704
|
+
if (/^https:\/\/docs\.google\.com\/document\//i.test(url))
|
|
1705
|
+
return url;
|
|
1706
|
+
}
|
|
1707
|
+
return '';
|
|
1708
|
+
}
|
|
1709
|
+
export async function exportGeminiDeepResearchReport(page, timeoutSeconds = 120) {
|
|
1710
|
+
await ensureGeminiPage(page);
|
|
1711
|
+
const timeoutMs = Math.max(1, timeoutSeconds) * 1000;
|
|
1712
|
+
const tabsBefore = await page.tabs().catch(() => []);
|
|
1713
|
+
const exportScript = exportGeminiDeepResearchReportScript(timeoutMs);
|
|
1714
|
+
const raw = await page.evaluate(exportScript).catch(() => null);
|
|
1715
|
+
const tabsAfter = await page.tabs().catch(() => []);
|
|
1716
|
+
const docsUrlFromTabs = extractDocsUrlFromTabs(tabsAfter) || extractDocsUrlFromTabs(tabsBefore);
|
|
1717
|
+
if (docsUrlFromTabs) {
|
|
1718
|
+
return { url: docsUrlFromTabs, source: 'tab' };
|
|
1719
|
+
}
|
|
1720
|
+
const docsUrlFromCurrent = typeof raw?.currentUrl === 'string' && /^https:\/\/docs\.google\.com\/document\//i.test(raw.currentUrl)
|
|
1721
|
+
? raw.currentUrl
|
|
1722
|
+
: '';
|
|
1723
|
+
if (docsUrlFromCurrent) {
|
|
1724
|
+
return { url: docsUrlFromCurrent, source: 'window-open' };
|
|
1725
|
+
}
|
|
1726
|
+
const urls = normalizeGeminiExportUrls(raw?.urls);
|
|
1727
|
+
const currentUrl = typeof raw?.currentUrl === 'string' && raw.currentUrl
|
|
1728
|
+
? raw.currentUrl
|
|
1729
|
+
: await getCurrentGeminiUrl(page);
|
|
1730
|
+
return pickGeminiDeepResearchExportUrl(urls, currentUrl);
|
|
1731
|
+
}
|
|
720
1732
|
export const __test__ = {
|
|
721
1733
|
GEMINI_COMPOSER_SELECTORS,
|
|
722
1734
|
GEMINI_COMPOSER_MARKER_ATTR,
|