publishport-opencli 1.0.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.
Files changed (1860) hide show
  1. package/LICENSE +214 -0
  2. package/README.md +299 -0
  3. package/README.zh-CN.md +341 -0
  4. package/cli-manifest.json +51513 -0
  5. package/clis/12306/auth.js +25 -0
  6. package/clis/12306/me.js +9 -0
  7. package/clis/12306/orders.js +13 -0
  8. package/clis/12306/passengers.js +14 -0
  9. package/clis/12306/price.js +1 -0
  10. package/clis/12306/stations.js +1 -0
  11. package/clis/12306/train.js +1 -0
  12. package/clis/12306/trains.js +1 -0
  13. package/clis/12306/utils.js +1 -0
  14. package/clis/1688/assets.js +127 -0
  15. package/clis/1688/auth.js +1 -0
  16. package/clis/1688/download.js +1 -0
  17. package/clis/1688/item.js +21 -0
  18. package/clis/1688/search.js +129 -0
  19. package/clis/1688/shared.js +11 -0
  20. package/clis/1688/store.js +26 -0
  21. package/clis/1point3acres/auth.js +18 -0
  22. package/clis/1point3acres/digest.js +1 -0
  23. package/clis/1point3acres/forum.js +1 -0
  24. package/clis/1point3acres/forums.js +1 -0
  25. package/clis/1point3acres/hot.js +1 -0
  26. package/clis/1point3acres/latest.js +1 -0
  27. package/clis/1point3acres/notifications.js +1 -0
  28. package/clis/1point3acres/search.js +1 -0
  29. package/clis/1point3acres/thread.js +2 -0
  30. package/clis/1point3acres/user.js +1 -0
  31. package/clis/1point3acres/utils.js +6 -0
  32. package/clis/36kr/article.js +20 -0
  33. package/clis/36kr/hot.js +16 -0
  34. package/clis/36kr/news.js +1 -0
  35. package/clis/36kr/search.js +36 -0
  36. package/clis/51job/company.js +36 -0
  37. package/clis/51job/detail.js +35 -0
  38. package/clis/51job/hot.js +1 -0
  39. package/clis/51job/search.js +1 -0
  40. package/clis/51job/utils.js +21 -0
  41. package/clis/_atlassian/shared.js +21 -0
  42. package/clis/_shared/article/auth.js +16 -0
  43. package/clis/_shared/article/douban-md2draft.js +4 -0
  44. package/clis/_shared/article/format.js +1 -0
  45. package/clis/_shared/article/images.js +95 -0
  46. package/clis/_shared/article/login.js +1 -0
  47. package/clis/_shared/article/page-runtime.js +745 -0
  48. package/clis/_shared/article/publish.js +34 -0
  49. package/clis/_shared/common.js +1 -0
  50. package/clis/_shared/content-guard.js +1 -0
  51. package/clis/_shared/desktop-commands.js +1 -0
  52. package/clis/_shared/search-adapter.js +1 -0
  53. package/clis/_shared/site-auth.js +1 -0
  54. package/clis/_shared/token-auth.js +2 -0
  55. package/clis/_shared/video-publish.js +62 -0
  56. package/clis/aibase/news.js +31 -0
  57. package/clis/amazon/auth.js +19 -0
  58. package/clis/amazon/bestsellers.js +1 -0
  59. package/clis/amazon/discussion.js +20 -0
  60. package/clis/amazon/movers-shakers.js +1 -0
  61. package/clis/amazon/new-releases.js +1 -0
  62. package/clis/amazon/offer.js +29 -0
  63. package/clis/amazon/product.js +25 -0
  64. package/clis/amazon/rankings.js +68 -0
  65. package/clis/amazon/search.js +16 -0
  66. package/clis/amazon/shared.js +11 -0
  67. package/clis/antigravity/SKILL.md +38 -0
  68. package/clis/antigravity/_actions.js +201 -0
  69. package/clis/antigravity/audit-extras.js +78 -0
  70. package/clis/antigravity/delete.js +1 -0
  71. package/clis/antigravity/dump.js +1 -0
  72. package/clis/antigravity/extract-code.js +18 -0
  73. package/clis/antigravity/history.js +1 -0
  74. package/clis/antigravity/mark-read.js +1 -0
  75. package/clis/antigravity/model.js +90 -0
  76. package/clis/antigravity/new.js +9 -0
  77. package/clis/antigravity/read.js +10 -0
  78. package/clis/antigravity/rename.js +1 -0
  79. package/clis/antigravity/send.js +11 -0
  80. package/clis/antigravity/serve.js +97 -0
  81. package/clis/antigravity/status.js +1 -0
  82. package/clis/antigravity/storage.js +12 -0
  83. package/clis/antigravity/watch.js +6 -0
  84. package/clis/apple-podcasts/episodes.js +1 -0
  85. package/clis/apple-podcasts/search.js +1 -0
  86. package/clis/apple-podcasts/top.js +1 -0
  87. package/clis/apple-podcasts/utils.js +1 -0
  88. package/clis/archive/item.js +1 -0
  89. package/clis/archive/search.js +1 -0
  90. package/clis/archive/snapshots.js +1 -0
  91. package/clis/archive/wayback.js +1 -0
  92. package/clis/arxiv/author.js +1 -0
  93. package/clis/arxiv/paper.js +1 -0
  94. package/clis/arxiv/recent.js +1 -0
  95. package/clis/arxiv/search.js +1 -0
  96. package/clis/arxiv/utils.js +1 -0
  97. package/clis/autohome/__fixtures__/catalog.html +11 -0
  98. package/clis/autohome/__fixtures__/koubei.json +116 -0
  99. package/clis/autohome/brand.js +1 -0
  100. package/clis/autohome/score.js +1 -0
  101. package/clis/autohome/utils.js +1 -0
  102. package/clis/baidu-scholar/search.js +63 -0
  103. package/clis/baijiahao/article.js +1 -0
  104. package/clis/baijiahao/lists.js +1 -0
  105. package/clis/baijiahao/login.js +1 -0
  106. package/clis/baijiahao/publish.js +57 -0
  107. package/clis/baijiahao/stats.js +1 -0
  108. package/clis/baijiahao/whoami.js +1 -0
  109. package/clis/band/auth.js +29 -0
  110. package/clis/band/bands.js +37 -0
  111. package/clis/band/mentions.js +6 -0
  112. package/clis/band/post.js +76 -0
  113. package/clis/band/posts.js +50 -0
  114. package/clis/barchart/flow.js +70 -0
  115. package/clis/barchart/greeks.js +88 -0
  116. package/clis/barchart/options.js +61 -0
  117. package/clis/barchart/quote.js +87 -0
  118. package/clis/bbc/news.js +1 -0
  119. package/clis/bbc/topic.js +1 -0
  120. package/clis/bbc/utils.js +1 -0
  121. package/clis/bilibili/article.js +1 -0
  122. package/clis/bilibili/auth.js +1 -0
  123. package/clis/bilibili/categories.js +1 -0
  124. package/clis/bilibili/coin.js +1 -0
  125. package/clis/bilibili/comment-del.js +1 -0
  126. package/clis/bilibili/comment-like.js +1 -0
  127. package/clis/bilibili/comment.js +1 -0
  128. package/clis/bilibili/comments.js +1 -0
  129. package/clis/bilibili/dm-list.js +1 -0
  130. package/clis/bilibili/dm-read.js +1 -0
  131. package/clis/bilibili/dm-send.js +1 -0
  132. package/clis/bilibili/download.js +7 -0
  133. package/clis/bilibili/drafts.js +1 -0
  134. package/clis/bilibili/dynamic-post.js +24 -0
  135. package/clis/bilibili/dynamic.js +1 -0
  136. package/clis/bilibili/favorite-add.js +1 -0
  137. package/clis/bilibili/favorite.js +1 -0
  138. package/clis/bilibili/feed.js +2 -0
  139. package/clis/bilibili/follow.js +1 -0
  140. package/clis/bilibili/following.js +1 -0
  141. package/clis/bilibili/history.js +1 -0
  142. package/clis/bilibili/hot.js +15 -0
  143. package/clis/bilibili/like.js +1 -0
  144. package/clis/bilibili/me.js +1 -0
  145. package/clis/bilibili/partitions.js +1 -0
  146. package/clis/bilibili/ranking.js +1 -0
  147. package/clis/bilibili/search.js +1 -0
  148. package/clis/bilibili/stats.js +1 -0
  149. package/clis/bilibili/subtitle.js +21 -0
  150. package/clis/bilibili/summary.js +1 -0
  151. package/clis/bilibili/topics.js +1 -0
  152. package/clis/bilibili/unfollow.js +1 -0
  153. package/clis/bilibili/upload.js +1 -0
  154. package/clis/bilibili/user-videos.js +1 -0
  155. package/clis/bilibili/utils.js +50 -0
  156. package/clis/bilibili/video-drafts.js +1 -0
  157. package/clis/bilibili/video.js +1 -0
  158. package/clis/binance/asks.js +1 -0
  159. package/clis/binance/depth.js +1 -0
  160. package/clis/binance/gainers.js +1 -0
  161. package/clis/binance/klines.js +1 -0
  162. package/clis/binance/losers.js +1 -0
  163. package/clis/binance/pairs.js +1 -0
  164. package/clis/binance/price.js +1 -0
  165. package/clis/binance/prices.js +1 -0
  166. package/clis/binance/ticker.js +1 -0
  167. package/clis/binance/top.js +1 -0
  168. package/clis/binance/trades.js +1 -0
  169. package/clis/bloomberg/businessweek.js +12 -0
  170. package/clis/bloomberg/crypto.js +1 -0
  171. package/clis/bloomberg/economics.js +1 -0
  172. package/clis/bloomberg/feeds.js +1 -0
  173. package/clis/bloomberg/green.js +1 -0
  174. package/clis/bloomberg/industries.js +1 -0
  175. package/clis/bloomberg/main.js +1 -0
  176. package/clis/bloomberg/markets.js +1 -0
  177. package/clis/bloomberg/news.js +57 -0
  178. package/clis/bloomberg/opinions.js +1 -0
  179. package/clis/bloomberg/politics.js +1 -0
  180. package/clis/bloomberg/pursuits.js +1 -0
  181. package/clis/bloomberg/tech.js +1 -0
  182. package/clis/bloomberg/utils.js +17 -0
  183. package/clis/bluesky/post.js +1 -0
  184. package/clis/bluesky/shared.js +56 -0
  185. package/clis/bluesky/whoami.js +1 -0
  186. package/clis/booking/search.js +93 -0
  187. package/clis/boss/auth.js +13 -0
  188. package/clis/boss/batchgreet.js +1 -0
  189. package/clis/boss/chatlist.js +1 -0
  190. package/clis/boss/chatmsg.js +1 -0
  191. package/clis/boss/detail.js +1 -0
  192. package/clis/boss/exchange.js +1 -0
  193. package/clis/boss/greet.js +1 -0
  194. package/clis/boss/invite.js +4 -0
  195. package/clis/boss/joblist.js +1 -0
  196. package/clis/boss/mark.js +1 -0
  197. package/clis/boss/recommend.js +1 -0
  198. package/clis/boss/resume.js +90 -0
  199. package/clis/boss/search.js +1 -0
  200. package/clis/boss/send.js +1 -0
  201. package/clis/boss/stats.js +1 -0
  202. package/clis/boss/utils.js +161 -0
  203. package/clis/brave/search.js +23 -0
  204. package/clis/chaoxing/assignments.js +1 -0
  205. package/clis/chaoxing/auth.js +21 -0
  206. package/clis/chaoxing/exams.js +1 -0
  207. package/clis/chaoxing/utils.js +58 -0
  208. package/clis/chatgpt/ask.js +1 -0
  209. package/clis/chatgpt/auth.js +17 -0
  210. package/clis/chatgpt/detail.js +1 -0
  211. package/clis/chatgpt/history.js +1 -0
  212. package/clis/chatgpt/image.js +1 -0
  213. package/clis/chatgpt/model.js +1 -0
  214. package/clis/chatgpt/new.js +1 -0
  215. package/clis/chatgpt/project-file-add.js +1 -0
  216. package/clis/chatgpt/project-list.js +1 -0
  217. package/clis/chatgpt/read.js +1 -0
  218. package/clis/chatgpt/send.js +1 -0
  219. package/clis/chatgpt/status.js +1 -0
  220. package/clis/chatgpt/utils.js +1092 -0
  221. package/clis/chatgpt-app/ask.js +1 -0
  222. package/clis/chatgpt-app/ax.js +512 -0
  223. package/clis/chatgpt-app/model.js +1 -0
  224. package/clis/chatgpt-app/new.js +1 -0
  225. package/clis/chatgpt-app/read.js +1 -0
  226. package/clis/chatgpt-app/send.js +1 -0
  227. package/clis/chatgpt-app/status.js +1 -0
  228. package/clis/chatwise/ask.js +1 -0
  229. package/clis/chatwise/export.js +21 -0
  230. package/clis/chatwise/history.js +26 -0
  231. package/clis/chatwise/model.js +48 -0
  232. package/clis/chatwise/new.js +1 -0
  233. package/clis/chatwise/read.js +25 -0
  234. package/clis/chatwise/screenshot.js +1 -0
  235. package/clis/chatwise/send.js +1 -0
  236. package/clis/chatwise/status.js +1 -0
  237. package/clis/chatwise/utils.js +75 -0
  238. package/clis/chess/analyze.js +1 -0
  239. package/clis/chess/game.js +1 -0
  240. package/clis/chess/games.js +1 -0
  241. package/clis/chess/stats.js +1 -0
  242. package/clis/chess/utils.js +1 -0
  243. package/clis/claude/ask.js +4 -0
  244. package/clis/claude/auth.js +19 -0
  245. package/clis/claude/detail.js +1 -0
  246. package/clis/claude/history.js +1 -0
  247. package/clis/claude/new.js +1 -0
  248. package/clis/claude/read.js +1 -0
  249. package/clis/claude/send.js +1 -0
  250. package/clis/claude/status.js +1 -0
  251. package/clis/claude/utils.js +179 -0
  252. package/clis/cnblogs/article.js +1 -0
  253. package/clis/cnblogs/login.js +1 -0
  254. package/clis/cnblogs/stats.js +37 -0
  255. package/clis/cnblogs/whoami.js +1 -0
  256. package/clis/cnki/search.js +38 -0
  257. package/clis/codex/_actions.js +72 -0
  258. package/clis/codex/archive.js +1 -0
  259. package/clis/codex/ask.js +23 -0
  260. package/clis/codex/dump.js +1 -0
  261. package/clis/codex/export.js +12 -0
  262. package/clis/codex/extract-diff.js +28 -0
  263. package/clis/codex/history.js +1 -0
  264. package/clis/codex/model.js +118 -0
  265. package/clis/codex/new.js +1 -0
  266. package/clis/codex/pin.js +1 -0
  267. package/clis/codex/projects.js +1 -0
  268. package/clis/codex/read.js +16 -0
  269. package/clis/codex/rename.js +34 -0
  270. package/clis/codex/screenshot.js +1 -0
  271. package/clis/codex/send.js +16 -0
  272. package/clis/codex/sidebar.js +1 -0
  273. package/clis/codex/status.js +1 -0
  274. package/clis/coingecko/categories.js +1 -0
  275. package/clis/coingecko/coin.js +1 -0
  276. package/clis/coingecko/derivatives.js +1 -0
  277. package/clis/coingecko/exchanges.js +1 -0
  278. package/clis/coingecko/global.js +1 -0
  279. package/clis/coingecko/top.js +1 -0
  280. package/clis/coingecko/trending.js +1 -0
  281. package/clis/confluence/create.js +1 -0
  282. package/clis/confluence/page.js +1 -0
  283. package/clis/confluence/search.js +1 -0
  284. package/clis/confluence/shared.js +1 -0
  285. package/clis/confluence/update.js +1 -0
  286. package/clis/coupang/add-to-cart.js +86 -0
  287. package/clis/coupang/auth.js +16 -0
  288. package/clis/coupang/product.js +161 -0
  289. package/clis/coupang/search.js +385 -0
  290. package/clis/coupang/utils.js +1 -0
  291. package/clis/crates/crate.js +1 -0
  292. package/clis/crates/search.js +1 -0
  293. package/clis/crates/utils.js +1 -0
  294. package/clis/csdn/article.js +29 -0
  295. package/clis/csdn/columns.js +1 -0
  296. package/clis/csdn/login.js +1 -0
  297. package/clis/csdn/stats.js +71 -0
  298. package/clis/csdn/whoami.js +1 -0
  299. package/clis/cto51/article.js +1 -0
  300. package/clis/cto51/whoami.js +1 -0
  301. package/clis/ctrip/auth.js +1 -0
  302. package/clis/ctrip/flight.js +17 -0
  303. package/clis/ctrip/hotel-search.js +24 -0
  304. package/clis/ctrip/hotel-suggest.js +1 -0
  305. package/clis/ctrip/search.js +1 -0
  306. package/clis/ctrip/utils.js +119 -0
  307. package/clis/cursor/ask.js +22 -0
  308. package/clis/cursor/composer.js +12 -0
  309. package/clis/cursor/dump.js +1 -0
  310. package/clis/cursor/export.js +23 -0
  311. package/clis/cursor/extract-code.js +18 -0
  312. package/clis/cursor/history.js +26 -0
  313. package/clis/cursor/model.js +18 -0
  314. package/clis/cursor/new.js +1 -0
  315. package/clis/cursor/read.js +27 -0
  316. package/clis/cursor/screenshot.js +1 -0
  317. package/clis/cursor/send.js +12 -0
  318. package/clis/cursor/status.js +1 -0
  319. package/clis/dblp/author.js +1 -0
  320. package/clis/dblp/paper.js +1 -0
  321. package/clis/dblp/search.js +1 -0
  322. package/clis/dblp/utils.js +1 -0
  323. package/clis/dblp/venue.js +1 -0
  324. package/clis/deepseek/ask.js +1 -0
  325. package/clis/deepseek/auth.js +22 -0
  326. package/clis/deepseek/detail.js +1 -0
  327. package/clis/deepseek/history.js +1 -0
  328. package/clis/deepseek/new.js +1 -0
  329. package/clis/deepseek/read.js +1 -0
  330. package/clis/deepseek/send.js +50 -0
  331. package/clis/deepseek/status.js +1 -0
  332. package/clis/deepseek/utils.js +202 -0
  333. package/clis/defillama/protocol.js +1 -0
  334. package/clis/defillama/protocols.js +1 -0
  335. package/clis/defillama/utils.js +1 -0
  336. package/clis/devto/auth.js +9 -0
  337. package/clis/devto/latest.js +1 -0
  338. package/clis/devto/publish.js +17 -0
  339. package/clis/devto/read.js +3 -0
  340. package/clis/devto/stats.js +27 -0
  341. package/clis/devto/tag.js +1 -0
  342. package/clis/devto/top.js +1 -0
  343. package/clis/devto/user.js +1 -0
  344. package/clis/dianping/__fixtures__/search.html +168 -0
  345. package/clis/dianping/__fixtures__/shop.html +6 -0
  346. package/clis/dianping/auth.js +10 -0
  347. package/clis/dianping/cityResolver.js +4 -0
  348. package/clis/dianping/search.js +1 -0
  349. package/clis/dianping/shop.js +1 -0
  350. package/clis/dianping/utils.js +1 -0
  351. package/clis/dictionary/examples.js +1 -0
  352. package/clis/dictionary/search.js +1 -0
  353. package/clis/dictionary/synonyms.js +1 -0
  354. package/clis/discord-app/channels.js +1 -0
  355. package/clis/discord-app/delete.js +66 -0
  356. package/clis/discord-app/goto.js +1 -0
  357. package/clis/discord-app/members.js +21 -0
  358. package/clis/discord-app/read.js +1 -0
  359. package/clis/discord-app/search.js +29 -0
  360. package/clis/discord-app/send.js +10 -0
  361. package/clis/discord-app/servers.js +1 -0
  362. package/clis/discord-app/status.js +1 -0
  363. package/clis/discord-app/thread-read.js +1 -0
  364. package/clis/discord-app/threads.js +1 -0
  365. package/clis/discord-app/utils.js +226 -0
  366. package/clis/discord-web/auth.js +10 -0
  367. package/clis/discord-web/send.js +13 -0
  368. package/clis/dockerhub/image.js +1 -0
  369. package/clis/dockerhub/search.js +1 -0
  370. package/clis/dockerhub/utils.js +1 -0
  371. package/clis/dongchedi/__fixtures__/search.json +60 -0
  372. package/clis/dongchedi/__fixtures__/series-detail.json +911 -0
  373. package/clis/dongchedi/__fixtures__/series-score.json +1396 -0
  374. package/clis/dongchedi/koubei.js +1 -0
  375. package/clis/dongchedi/models.js +1 -0
  376. package/clis/dongchedi/score.js +1 -0
  377. package/clis/dongchedi/search.js +1 -0
  378. package/clis/dongchedi/series.js +1 -0
  379. package/clis/dongchedi/specs.js +1 -0
  380. package/clis/dongchedi/utils.js +1 -0
  381. package/clis/douban/article.js +53 -0
  382. package/clis/douban/auth.js +21 -0
  383. package/clis/douban/book-hot.js +1 -0
  384. package/clis/douban/download.js +1 -0
  385. package/clis/douban/marks.js +59 -0
  386. package/clis/douban/movie-hot.js +1 -0
  387. package/clis/douban/photos.js +1 -0
  388. package/clis/douban/reviews.js +53 -0
  389. package/clis/douban/search.js +1 -0
  390. package/clis/douban/subject.js +1 -0
  391. package/clis/douban/top250.js +50 -0
  392. package/clis/douban/utils.js +344 -0
  393. package/clis/doubao/ask.js +1 -0
  394. package/clis/doubao/auth.js +28 -0
  395. package/clis/doubao/detail.js +1 -0
  396. package/clis/doubao/history.js +1 -0
  397. package/clis/doubao/meeting-summary.js +1 -0
  398. package/clis/doubao/meeting-transcript.js +1 -0
  399. package/clis/doubao/new.js +1 -0
  400. package/clis/doubao/read.js +1 -0
  401. package/clis/doubao/send.js +1 -0
  402. package/clis/doubao/status.js +1 -0
  403. package/clis/doubao/utils.js +704 -0
  404. package/clis/doubao-app/ask.js +1 -0
  405. package/clis/doubao-app/dump.js +1 -0
  406. package/clis/doubao-app/new.js +1 -0
  407. package/clis/doubao-app/read.js +1 -0
  408. package/clis/doubao-app/screenshot.js +1 -0
  409. package/clis/doubao-app/send.js +1 -0
  410. package/clis/doubao-app/status.js +1 -0
  411. package/clis/doubao-app/utils.js +64 -0
  412. package/clis/douyin/_shared/browser-fetch.js +28 -0
  413. package/clis/douyin/_shared/creation-id.js +1 -0
  414. package/clis/douyin/_shared/evaluate-result.js +1 -0
  415. package/clis/douyin/_shared/imagex-upload.js +1 -0
  416. package/clis/douyin/_shared/public-api.js +1 -0
  417. package/clis/douyin/_shared/sts2.js +1 -0
  418. package/clis/douyin/_shared/text-extra.js +1 -0
  419. package/clis/douyin/_shared/timing.js +1 -0
  420. package/clis/douyin/_shared/tos-upload.js +5 -0
  421. package/clis/douyin/_shared/transcode.js +1 -0
  422. package/clis/douyin/_shared/types.js +1 -0
  423. package/clis/douyin/_shared/vod-upload.js +5 -0
  424. package/clis/douyin/activities.js +1 -0
  425. package/clis/douyin/auth.js +1 -0
  426. package/clis/douyin/collections.js +1 -0
  427. package/clis/douyin/delete.js +76 -0
  428. package/clis/douyin/draft.js +166 -0
  429. package/clis/douyin/drafts.js +1 -0
  430. package/clis/douyin/hashtag.js +1 -0
  431. package/clis/douyin/location.js +1 -0
  432. package/clis/douyin/profile.js +1 -0
  433. package/clis/douyin/publish-image.js +64 -0
  434. package/clis/douyin/publish.js +14 -0
  435. package/clis/douyin/search.js +51 -0
  436. package/clis/douyin/stats.js +1 -0
  437. package/clis/douyin/update.js +1 -0
  438. package/clis/douyin/user-videos.js +1 -0
  439. package/clis/douyin/videos.js +1 -0
  440. package/clis/duckduckgo/search.js +1 -0
  441. package/clis/duckduckgo/suggest.js +1 -0
  442. package/clis/eastmoney/_secid.js +1 -0
  443. package/clis/eastmoney/announcement.js +1 -0
  444. package/clis/eastmoney/article.js +1 -0
  445. package/clis/eastmoney/convertible.js +1 -0
  446. package/clis/eastmoney/etf.js +1 -0
  447. package/clis/eastmoney/holders.js +1 -0
  448. package/clis/eastmoney/hot-rank.js +30 -0
  449. package/clis/eastmoney/index-board.js +1 -0
  450. package/clis/eastmoney/kline.js +1 -0
  451. package/clis/eastmoney/kuaixun.js +1 -0
  452. package/clis/eastmoney/longhu.js +1 -0
  453. package/clis/eastmoney/money-flow.js +1 -0
  454. package/clis/eastmoney/northbound.js +1 -0
  455. package/clis/eastmoney/quote.js +1 -0
  456. package/clis/eastmoney/rank.js +1 -0
  457. package/clis/eastmoney/sectors.js +1 -0
  458. package/clis/eastmoney/whoami.js +1 -0
  459. package/clis/endoflife/product.js +1 -0
  460. package/clis/endoflife/utils.js +1 -0
  461. package/clis/facebook/__fixtures__/notifications-page.html +13 -0
  462. package/clis/facebook/add-friend.js +24 -0
  463. package/clis/facebook/auth.js +1 -0
  464. package/clis/facebook/comment.js +18 -0
  465. package/clis/facebook/events.js +26 -0
  466. package/clis/facebook/feed.js +209 -0
  467. package/clis/facebook/friends.js +24 -0
  468. package/clis/facebook/groups.js +32 -0
  469. package/clis/facebook/join-group.js +25 -0
  470. package/clis/facebook/like.js +29 -0
  471. package/clis/facebook/marketplace-inbox.js +34 -0
  472. package/clis/facebook/marketplace-listings.js +33 -0
  473. package/clis/facebook/memories.js +21 -0
  474. package/clis/facebook/notifications.js +31 -0
  475. package/clis/facebook/post.js +88 -0
  476. package/clis/facebook/profile.js +18 -0
  477. package/clis/facebook/search.js +22 -0
  478. package/clis/flathub/app.js +1 -0
  479. package/clis/flathub/search.js +1 -0
  480. package/clis/flathub/utils.js +1 -0
  481. package/clis/flomo/auth.js +22 -0
  482. package/clis/flomo/memos.js +13 -0
  483. package/clis/gemini/ask.js +1 -0
  484. package/clis/gemini/auth.js +14 -0
  485. package/clis/gemini/deep-research-result.js +4 -0
  486. package/clis/gemini/deep-research.js +1 -0
  487. package/clis/gemini/detail.js +1 -0
  488. package/clis/gemini/history.js +1 -0
  489. package/clis/gemini/image.js +3 -0
  490. package/clis/gemini/new.js +1 -0
  491. package/clis/gemini/read.js +1 -0
  492. package/clis/gemini/status.js +1 -0
  493. package/clis/gemini/utils.js +1234 -0
  494. package/clis/geogebra/add-circle.js +1 -0
  495. package/clis/geogebra/add-line.js +1 -0
  496. package/clis/geogebra/add-point.js +1 -0
  497. package/clis/geogebra/add-polygon.js +1 -0
  498. package/clis/geogebra/eval.js +1 -0
  499. package/clis/geogebra/hexagon.js +1 -0
  500. package/clis/geogebra/info.js +13 -0
  501. package/clis/geogebra/list.js +1 -0
  502. package/clis/geogebra/triangle.js +1 -0
  503. package/clis/geogebra/utils.js +99 -0
  504. package/clis/ghost/publish.js +1 -0
  505. package/clis/ghost/shared.js +1 -0
  506. package/clis/ghost/whoami.js +1 -0
  507. package/clis/gitee/auth.js +12 -0
  508. package/clis/gitee/index.js +1 -0
  509. package/clis/gitee/search.js +1 -0
  510. package/clis/gitee/trending.js +240 -0
  511. package/clis/gitee/user.js +71 -0
  512. package/clis/github/auth.js +7 -0
  513. package/clis/github-trending/repos.js +1 -0
  514. package/clis/google/news.js +1 -0
  515. package/clis/google/search.js +90 -0
  516. package/clis/google/suggest.js +1 -0
  517. package/clis/google/trends.js +1 -0
  518. package/clis/google/utils.js +1 -0
  519. package/clis/google-scholar/cite.js +20 -0
  520. package/clis/google-scholar/profile.js +36 -0
  521. package/clis/google-scholar/search.js +35 -0
  522. package/clis/goproxy/module.js +1 -0
  523. package/clis/goproxy/utils.js +1 -0
  524. package/clis/goproxy/versions.js +1 -0
  525. package/clis/gov-law/recent.js +1 -0
  526. package/clis/gov-law/search.js +14 -0
  527. package/clis/gov-law/shared.js +29 -0
  528. package/clis/gov-policy/__fixtures__/recent.html +16 -0
  529. package/clis/gov-policy/__fixtures__/search.html +41 -0
  530. package/clis/gov-policy/recent.js +8 -0
  531. package/clis/gov-policy/search.js +8 -0
  532. package/clis/gov-policy/utils.js +1 -0
  533. package/clis/grok/ask.js +1 -0
  534. package/clis/grok/auth.js +17 -0
  535. package/clis/grok/delete.js +1 -0
  536. package/clis/grok/detail.js +1 -0
  537. package/clis/grok/export-all.js +170 -0
  538. package/clis/grok/export-utils.js +1 -0
  539. package/clis/grok/export.js +106 -0
  540. package/clis/grok/history.js +1 -0
  541. package/clis/grok/image.js +119 -0
  542. package/clis/grok/image.test.ts +127 -0
  543. package/clis/grok/new.js +1 -0
  544. package/clis/grok/pin.js +1 -0
  545. package/clis/grok/read.js +1 -0
  546. package/clis/grok/send.js +1 -0
  547. package/clis/grok/status.js +1 -0
  548. package/clis/grok/utils.js +337 -0
  549. package/clis/guazi/__fixtures__/detail.html +7 -0
  550. package/clis/guazi/__fixtures__/list.html +5 -0
  551. package/clis/guazi/browse.js +1 -0
  552. package/clis/guazi/car.js +1 -0
  553. package/clis/guazi/utils.js +1 -0
  554. package/clis/hackernews/ask.js +1 -0
  555. package/clis/hackernews/auth.js +9 -0
  556. package/clis/hackernews/best.js +1 -0
  557. package/clis/hackernews/comment.js +61 -0
  558. package/clis/hackernews/jobs.js +1 -0
  559. package/clis/hackernews/new.js +1 -0
  560. package/clis/hackernews/read.js +11 -0
  561. package/clis/hackernews/search.js +1 -0
  562. package/clis/hackernews/show.js +1 -0
  563. package/clis/hackernews/submit.js +65 -0
  564. package/clis/hackernews/top.js +1 -0
  565. package/clis/hackernews/user.js +1 -0
  566. package/clis/hashnode/auth.js +11 -0
  567. package/clis/hashnode/publish.js +92 -0
  568. package/clis/hf/auth.js +12 -0
  569. package/clis/hf/datasets.js +1 -0
  570. package/clis/hf/models.js +1 -0
  571. package/clis/hf/paper.js +1 -0
  572. package/clis/hf/spaces.js +1 -0
  573. package/clis/hf/top.js +1 -0
  574. package/clis/homebrew/cask.js +1 -0
  575. package/clis/homebrew/formula.js +1 -0
  576. package/clis/homebrew/popular.js +1 -0
  577. package/clis/homebrew/utils.js +1 -0
  578. package/clis/huodongxing/events.js +1 -0
  579. package/clis/hupu/__fixtures__/hot-home.html +64 -0
  580. package/clis/hupu/auth.js +14 -0
  581. package/clis/hupu/detail.js +7 -0
  582. package/clis/hupu/hot.js +14 -0
  583. package/clis/hupu/like.js +1 -0
  584. package/clis/hupu/mentions.js +91 -0
  585. package/clis/hupu/reply.js +1 -0
  586. package/clis/hupu/search.js +1 -0
  587. package/clis/hupu/unlike.js +1 -0
  588. package/clis/hupu/utils.js +243 -0
  589. package/clis/imdb/person.js +140 -0
  590. package/clis/imdb/reviews.js +40 -0
  591. package/clis/imdb/search.js +113 -0
  592. package/clis/imdb/title.js +1 -0
  593. package/clis/imdb/top.js +1 -0
  594. package/clis/imdb/trending.js +1 -0
  595. package/clis/imdb/utils.js +162 -0
  596. package/clis/imooc/article.js +59 -0
  597. package/clis/imooc/login.js +1 -0
  598. package/clis/imooc/whoami.js +1 -0
  599. package/clis/indeed/job.js +20 -0
  600. package/clis/indeed/search.js +37 -0
  601. package/clis/indeed/utils.js +1 -0
  602. package/clis/infoq/article.js +19 -0
  603. package/clis/infoq/login.js +1 -0
  604. package/clis/infoq/whoami.js +1 -0
  605. package/clis/instagram/_shared/private-publish.js +75 -0
  606. package/clis/instagram/_shared/protocol-capture.js +180 -0
  607. package/clis/instagram/_shared/runtime-info.js +33 -0
  608. package/clis/instagram/auth.js +22 -0
  609. package/clis/instagram/collection-create.js +38 -0
  610. package/clis/instagram/collection-delete.js +72 -0
  611. package/clis/instagram/comment.js +26 -0
  612. package/clis/instagram/detail.js +2 -0
  613. package/clis/instagram/download.js +83 -0
  614. package/clis/instagram/explore.js +27 -0
  615. package/clis/instagram/follow.js +24 -0
  616. package/clis/instagram/followers.js +30 -0
  617. package/clis/instagram/following.js +74 -0
  618. package/clis/instagram/like.js +25 -0
  619. package/clis/instagram/note.js +162 -0
  620. package/clis/instagram/post.js +718 -0
  621. package/clis/instagram/profile.js +25 -0
  622. package/clis/instagram/reel.js +452 -0
  623. package/clis/instagram/save.js +25 -0
  624. package/clis/instagram/saved.js +37 -0
  625. package/clis/instagram/search.js +23 -0
  626. package/clis/instagram/story.js +21 -0
  627. package/clis/instagram/unfollow.js +21 -0
  628. package/clis/instagram/unlike.js +25 -0
  629. package/clis/instagram/unsave.js +25 -0
  630. package/clis/instagram/user.js +1 -0
  631. package/clis/jd/add-cart.js +22 -0
  632. package/clis/jd/auth.js +12 -0
  633. package/clis/jd/cart.js +59 -0
  634. package/clis/jd/detail.js +42 -0
  635. package/clis/jd/item.js +98 -0
  636. package/clis/jd/item.test.ts +517 -0
  637. package/clis/jd/reviews.js +31 -0
  638. package/clis/jd/search.js +42 -0
  639. package/clis/jianshu/article.js +1 -0
  640. package/clis/jianshu/login.js +1 -0
  641. package/clis/jianshu/notebooks.js +1 -0
  642. package/clis/jianshu/whoami.js +1 -0
  643. package/clis/jianyu/auth.js +28 -0
  644. package/clis/jianyu/detail.js +1 -0
  645. package/clis/jianyu/search.js +73 -0
  646. package/clis/jianyu/shared/china-bid-search.js +86 -0
  647. package/clis/jianyu/shared/procurement-contract.js +1 -0
  648. package/clis/jianyu/shared/procurement-detail.js +18 -0
  649. package/clis/jike/auth.js +19 -0
  650. package/clis/jike/comment.js +82 -0
  651. package/clis/jike/create.js +83 -0
  652. package/clis/jike/feed.js +32 -0
  653. package/clis/jike/like.js +38 -0
  654. package/clis/jike/notifications.js +115 -0
  655. package/clis/jike/post.js +33 -0
  656. package/clis/jike/repost.js +67 -0
  657. package/clis/jike/search.js +29 -0
  658. package/clis/jike/topic.js +20 -0
  659. package/clis/jike/user.js +19 -0
  660. package/clis/jike/utils.js +15 -0
  661. package/clis/jimeng/auth.js +13 -0
  662. package/clis/jimeng/generate.js +60 -0
  663. package/clis/jimeng/history.js +32 -0
  664. package/clis/jimeng/new.js +26 -0
  665. package/clis/jimeng/workspaces.js +22 -0
  666. package/clis/jira/attachments.js +1 -0
  667. package/clis/jira/comments.js +1 -0
  668. package/clis/jira/issue.js +1 -0
  669. package/clis/jira/links.js +1 -0
  670. package/clis/jira/search.js +1 -0
  671. package/clis/jira/shared.js +1 -0
  672. package/clis/juejin/article.js +5 -0
  673. package/clis/juejin/categories.js +1 -0
  674. package/clis/juejin/hot.js +1 -0
  675. package/clis/juejin/login.js +1 -0
  676. package/clis/juejin/recommend.js +1 -0
  677. package/clis/juejin/stats.js +53 -0
  678. package/clis/juejin/tags.js +1 -0
  679. package/clis/juejin/utils.js +1 -0
  680. package/clis/juejin/whoami.js +1 -0
  681. package/clis/ke/auth.js +14 -0
  682. package/clis/ke/chengjiao.js +45 -0
  683. package/clis/ke/ershoufang.js +50 -0
  684. package/clis/ke/utils.js +21 -0
  685. package/clis/ke/xiaoqu.js +45 -0
  686. package/clis/ke/zufang.js +50 -0
  687. package/clis/kimi/_utils.js +38 -0
  688. package/clis/kimi/audit-extras.js +64 -0
  689. package/clis/kimi/auth.js +17 -0
  690. package/clis/kimi/chat.js +77 -0
  691. package/clis/kimi/storage.js +14 -0
  692. package/clis/kimi/ui.js +89 -0
  693. package/clis/kimi/usage.js +51 -0
  694. package/clis/kuaishou/auth.js +1 -0
  695. package/clis/kuaishou/publish.js +53 -0
  696. package/clis/lesswrong/_helpers.js +9 -0
  697. package/clis/lesswrong/comments.js +9 -0
  698. package/clis/lesswrong/curated.js +5 -0
  699. package/clis/lesswrong/frontpage.js +5 -0
  700. package/clis/lesswrong/new.js +5 -0
  701. package/clis/lesswrong/read.js +5 -0
  702. package/clis/lesswrong/sequences.js +5 -0
  703. package/clis/lesswrong/shortform.js +5 -0
  704. package/clis/lesswrong/tag.js +5 -0
  705. package/clis/lesswrong/tags.js +5 -0
  706. package/clis/lesswrong/top-month.js +5 -0
  707. package/clis/lesswrong/top-week.js +5 -0
  708. package/clis/lesswrong/top-year.js +5 -0
  709. package/clis/lesswrong/top.js +5 -0
  710. package/clis/lesswrong/user-posts.js +5 -0
  711. package/clis/lesswrong/user.js +5 -0
  712. package/clis/lichess/top.js +1 -0
  713. package/clis/lichess/user.js +1 -0
  714. package/clis/lichess/utils.js +1 -0
  715. package/clis/linkedin/auth.js +27 -0
  716. package/clis/linkedin/comment.js +1 -0
  717. package/clis/linkedin/connect.js +244 -0
  718. package/clis/linkedin/create.js +113 -0
  719. package/clis/linkedin/follow.js +1 -0
  720. package/clis/linkedin/inbox.js +1 -0
  721. package/clis/linkedin/job-detail.js +40 -0
  722. package/clis/linkedin/jobs-preferences.js +34 -0
  723. package/clis/linkedin/like.js +1 -0
  724. package/clis/linkedin/notifications.js +1 -0
  725. package/clis/linkedin/people-search.js +1 -0
  726. package/clis/linkedin/post-analytics.js +1 -0
  727. package/clis/linkedin/post-comments.js +1 -0
  728. package/clis/linkedin/post-detail.js +1 -0
  729. package/clis/linkedin/posts-core.js +138 -0
  730. package/clis/linkedin/posts.js +1 -0
  731. package/clis/linkedin/profile-analytics.js +1 -0
  732. package/clis/linkedin/profile-api.js +218 -0
  733. package/clis/linkedin/profile-experience.js +1 -0
  734. package/clis/linkedin/profile-projects.js +1 -0
  735. package/clis/linkedin/profile-read.js +3 -0
  736. package/clis/linkedin/reply.js +1 -0
  737. package/clis/linkedin/repost.js +1 -0
  738. package/clis/linkedin/safe-send.js +155 -0
  739. package/clis/linkedin/salesnav-inbox.js +21 -0
  740. package/clis/linkedin/salesnav-message.js +33 -0
  741. package/clis/linkedin/salesnav-search.js +15 -0
  742. package/clis/linkedin/salesnav-thread.js +1 -0
  743. package/clis/linkedin/search-api.js +42 -0
  744. package/clis/linkedin/search.js +50 -0
  745. package/clis/linkedin/sent-invitations.js +46 -0
  746. package/clis/linkedin/services-read.js +57 -0
  747. package/clis/linkedin/shared.js +10 -0
  748. package/clis/linkedin/social-api.js +260 -0
  749. package/clis/linkedin/thread-snapshot.js +81 -0
  750. package/clis/linkedin/timeline.js +37 -0
  751. package/clis/linkedin-learning/auth.js +27 -0
  752. package/clis/linkedin-learning/course.js +17 -0
  753. package/clis/linkedin-learning/search.js +17 -0
  754. package/clis/linkedin-learning/trending.js +17 -0
  755. package/clis/linux-do/auth.js +20 -0
  756. package/clis/linux-do/categories.js +1 -0
  757. package/clis/linux-do/feed.js +19 -0
  758. package/clis/linux-do/search.js +1 -0
  759. package/clis/linux-do/tags.js +1 -0
  760. package/clis/linux-do/topic-content.js +28 -0
  761. package/clis/linux-do/topic.js +1 -0
  762. package/clis/linux-do/user-posts.js +1 -0
  763. package/clis/linux-do/user-topics.js +1 -0
  764. package/clis/lobsters/active.js +1 -0
  765. package/clis/lobsters/domain.js +1 -0
  766. package/clis/lobsters/hot.js +1 -0
  767. package/clis/lobsters/newest.js +1 -0
  768. package/clis/lobsters/read.js +11 -0
  769. package/clis/lobsters/tag.js +1 -0
  770. package/clis/maimai/auth.js +19 -0
  771. package/clis/maimai/search-talents.js +37 -0
  772. package/clis/manus/_utils.js +28 -0
  773. package/clis/manus/auth.js +20 -0
  774. package/clis/manus/connectors.js +4 -0
  775. package/clis/manus/credits.js +4 -0
  776. package/clis/manus/list.js +7 -0
  777. package/clis/manus/read.js +7 -0
  778. package/clis/manus/skills.js +4 -0
  779. package/clis/manus/status.js +8 -0
  780. package/clis/mastodon/post.js +1 -0
  781. package/clis/mastodon/shared.js +48 -0
  782. package/clis/mastodon/whoami.js +1 -0
  783. package/clis/maven/artifact.js +1 -0
  784. package/clis/maven/search.js +1 -0
  785. package/clis/maven/utils.js +1 -0
  786. package/clis/mdn/search.js +1 -0
  787. package/clis/medium/article.js +12 -0
  788. package/clis/medium/feed.js +1 -0
  789. package/clis/medium/login.js +1 -0
  790. package/clis/medium/search.js +1 -0
  791. package/clis/medium/stats.js +56 -0
  792. package/clis/medium/tag.js +1 -0
  793. package/clis/medium/user.js +1 -0
  794. package/clis/medium/utils.js +62 -0
  795. package/clis/medium/whoami.js +1 -0
  796. package/clis/mubu/doc.js +1 -0
  797. package/clis/mubu/docs.js +1 -0
  798. package/clis/mubu/notes.js +1 -0
  799. package/clis/mubu/recent.js +1 -0
  800. package/clis/mubu/search.js +1 -0
  801. package/clis/mubu/utils.js +31 -0
  802. package/clis/note/auth.js +12 -0
  803. package/clis/note/note-utils.js +2 -0
  804. package/clis/note/publish.js +17 -0
  805. package/clis/notebooklm/add-source.js +46 -0
  806. package/clis/notebooklm/auth.js +21 -0
  807. package/clis/notebooklm/create.js +1 -0
  808. package/clis/notebooklm/current.js +1 -0
  809. package/clis/notebooklm/generate-audio.js +1 -0
  810. package/clis/notebooklm/generate-slides.js +1 -0
  811. package/clis/notebooklm/get.js +1 -0
  812. package/clis/notebooklm/history.js +1 -0
  813. package/clis/notebooklm/list.js +1 -0
  814. package/clis/notebooklm/note-list.js +1 -0
  815. package/clis/notebooklm/notes-get.js +1 -0
  816. package/clis/notebooklm/open.js +1 -0
  817. package/clis/notebooklm/rpc.js +36 -0
  818. package/clis/notebooklm/shared.js +1 -0
  819. package/clis/notebooklm/source-fulltext.js +1 -0
  820. package/clis/notebooklm/source-get.js +1 -0
  821. package/clis/notebooklm/source-guide.js +1 -0
  822. package/clis/notebooklm/source-list.js +1 -0
  823. package/clis/notebooklm/status.js +1 -0
  824. package/clis/notebooklm/summary.js +1 -0
  825. package/clis/notebooklm/utils.js +172 -0
  826. package/clis/notebooklm/write-note.js +1 -0
  827. package/clis/nowcoder/auth.js +24 -0
  828. package/clis/nowcoder/comment.js +1 -0
  829. package/clis/nowcoder/comments.js +1 -0
  830. package/clis/nowcoder/companies.js +1 -0
  831. package/clis/nowcoder/creators.js +1 -0
  832. package/clis/nowcoder/delete.js +1 -0
  833. package/clis/nowcoder/detail.js +46 -0
  834. package/clis/nowcoder/dm-list.js +1 -0
  835. package/clis/nowcoder/dm-read.js +1 -0
  836. package/clis/nowcoder/dm-send.js +1 -0
  837. package/clis/nowcoder/drafts.js +1 -0
  838. package/clis/nowcoder/experience.js +20 -0
  839. package/clis/nowcoder/hot.js +1 -0
  840. package/clis/nowcoder/inbox.js +1 -0
  841. package/clis/nowcoder/jobs.js +1 -0
  842. package/clis/nowcoder/like.js +1 -0
  843. package/clis/nowcoder/my.js +1 -0
  844. package/clis/nowcoder/notifications.js +16 -0
  845. package/clis/nowcoder/papers.js +22 -0
  846. package/clis/nowcoder/post.js +1 -0
  847. package/clis/nowcoder/practice.js +21 -0
  848. package/clis/nowcoder/recommend.js +1 -0
  849. package/clis/nowcoder/referral.js +21 -0
  850. package/clis/nowcoder/salary.js +22 -0
  851. package/clis/nowcoder/search.js +31 -0
  852. package/clis/nowcoder/suggest.js +17 -0
  853. package/clis/nowcoder/topics.js +1 -0
  854. package/clis/nowcoder/trending.js +1 -0
  855. package/clis/nowcoder/utils.js +68 -0
  856. package/clis/npm/downloads.js +1 -0
  857. package/clis/npm/package.js +1 -0
  858. package/clis/npm/search.js +1 -0
  859. package/clis/npm/utils.js +1 -0
  860. package/clis/nuget/package.js +1 -0
  861. package/clis/nuget/search.js +1 -0
  862. package/clis/nuget/utils.js +1 -0
  863. package/clis/nvd/cve.js +1 -0
  864. package/clis/oeis/search.js +1 -0
  865. package/clis/oeis/sequence.js +1 -0
  866. package/clis/oeis/utils.js +1 -0
  867. package/clis/ones/common.js +23 -0
  868. package/clis/ones/enrich-tasks.js +1 -0
  869. package/clis/ones/login.js +2 -0
  870. package/clis/ones/logout.js +1 -0
  871. package/clis/ones/me.js +1 -0
  872. package/clis/ones/my-tasks.js +1 -0
  873. package/clis/ones/resolve-labels.js +1 -0
  874. package/clis/ones/task-helpers.js +1 -0
  875. package/clis/ones/task.js +1 -0
  876. package/clis/ones/tasks.js +1 -0
  877. package/clis/ones/token-info.js +1 -0
  878. package/clis/ones/worklog.js +14 -0
  879. package/clis/openalex/search.js +1 -0
  880. package/clis/openalex/utils.js +1 -0
  881. package/clis/openalex/work.js +1 -0
  882. package/clis/openfda/drug-label.js +1 -0
  883. package/clis/openfda/food-recall.js +1 -0
  884. package/clis/openfda/utils.js +1 -0
  885. package/clis/openreview/author.js +1 -0
  886. package/clis/openreview/paper.js +1 -0
  887. package/clis/openreview/reviews.js +4 -0
  888. package/clis/openreview/search.js +1 -0
  889. package/clis/openreview/utils.js +1 -0
  890. package/clis/openreview/venue.js +1 -0
  891. package/clis/oschina/article.js +1 -0
  892. package/clis/oschina/catalogs.js +1 -0
  893. package/clis/oschina/login.js +1 -0
  894. package/clis/oschina/stats.js +54 -0
  895. package/clis/oschina/whoami.js +1 -0
  896. package/clis/osv/query.js +1 -0
  897. package/clis/osv/utils.js +1 -0
  898. package/clis/osv/vulnerability.js +1 -0
  899. package/clis/packagist/package.js +1 -0
  900. package/clis/packagist/search.js +1 -0
  901. package/clis/packagist/utils.js +1 -0
  902. package/clis/paperreview/feedback.js +1 -0
  903. package/clis/paperreview/review.js +1 -0
  904. package/clis/paperreview/submit.js +1 -0
  905. package/clis/paperreview/utils.js +1 -0
  906. package/clis/pinterest/api.js +1 -0
  907. package/clis/pinterest/auth.js +1 -0
  908. package/clis/pinterest/boards.js +1 -0
  909. package/clis/pinterest/client.js +20 -0
  910. package/clis/pinterest/publish.js +13 -0
  911. package/clis/pixiv/auth.js +17 -0
  912. package/clis/pixiv/detail.js +1 -0
  913. package/clis/pixiv/download.js +1 -0
  914. package/clis/pixiv/illusts.js +1 -0
  915. package/clis/pixiv/ranking.js +26 -0
  916. package/clis/pixiv/search.js +1 -0
  917. package/clis/pixiv/user.js +1 -0
  918. package/clis/pixiv/utils.js +18 -0
  919. package/clis/powerchina/auth.js +17 -0
  920. package/clis/powerchina/search.js +1 -0
  921. package/clis/producthunt/browse.js +54 -0
  922. package/clis/producthunt/hot.js +64 -0
  923. package/clis/producthunt/posts.js +1 -0
  924. package/clis/producthunt/today.js +1 -0
  925. package/clis/producthunt/utils.js +1 -0
  926. package/clis/pubmed/article.js +1 -0
  927. package/clis/pubmed/author.js +1 -0
  928. package/clis/pubmed/citations.js +1 -0
  929. package/clis/pubmed/clinical-trial.js +1 -0
  930. package/clis/pubmed/journal.js +1 -0
  931. package/clis/pubmed/mesh.js +1 -0
  932. package/clis/pubmed/related.js +1 -0
  933. package/clis/pubmed/review.js +1 -0
  934. package/clis/pubmed/search.js +1 -0
  935. package/clis/pubmed/utils.js +1 -0
  936. package/clis/pypi/downloads.js +1 -0
  937. package/clis/pypi/package.js +1 -0
  938. package/clis/pypi/utils.js +1 -0
  939. package/clis/qiita/auth.js +1 -0
  940. package/clis/qiita/gql.js +32 -0
  941. package/clis/qiita/publish.js +7 -0
  942. package/clis/qiita/stats.js +37 -0
  943. package/clis/qoder/_utils.js +113 -0
  944. package/clis/qoder/composer.js +1 -0
  945. package/clis/qoder/history.js +25 -0
  946. package/clis/qoder/quest.js +1 -0
  947. package/clis/qoder/read.js +1 -0
  948. package/clis/qoder/status.js +1 -0
  949. package/clis/qoder/ui.js +59 -0
  950. package/clis/quark/auth.js +16 -0
  951. package/clis/quark/ls.js +1 -0
  952. package/clis/quark/mkdir.js +1 -0
  953. package/clis/quark/mv.js +1 -0
  954. package/clis/quark/rename.js +1 -0
  955. package/clis/quark/rm.js +1 -0
  956. package/clis/quark/save.js +1 -0
  957. package/clis/quark/share-tree.js +1 -0
  958. package/clis/quark/utils.js +13 -0
  959. package/clis/quora/create-answer.js +22 -0
  960. package/clis/quora/create-question.js +24 -0
  961. package/clis/quora/shared.js +43 -0
  962. package/clis/quora/whoami.js +1 -0
  963. package/clis/qwen/ask.js +1 -0
  964. package/clis/qwen/auth.js +17 -0
  965. package/clis/qwen/detail.js +1 -0
  966. package/clis/qwen/history.js +1 -0
  967. package/clis/qwen/image.js +31 -0
  968. package/clis/qwen/new.js +1 -0
  969. package/clis/qwen/read.js +1 -0
  970. package/clis/qwen/send.js +1 -0
  971. package/clis/qwen/status.js +1 -0
  972. package/clis/qwen/utils.js +185 -0
  973. package/clis/reddit/auth.js +17 -0
  974. package/clis/reddit/comment.js +36 -0
  975. package/clis/reddit/frontpage.js +40 -0
  976. package/clis/reddit/home.js +32 -0
  977. package/clis/reddit/hot.js +46 -0
  978. package/clis/reddit/popular.js +46 -0
  979. package/clis/reddit/read.js +398 -0
  980. package/clis/reddit/reply.js +56 -0
  981. package/clis/reddit/save.js +30 -0
  982. package/clis/reddit/saved.js +24 -0
  983. package/clis/reddit/search.js +51 -0
  984. package/clis/reddit/submit.js +42 -0
  985. package/clis/reddit/subreddit-info.js +29 -0
  986. package/clis/reddit/subreddit.js +52 -0
  987. package/clis/reddit/subscribe.js +29 -0
  988. package/clis/reddit/subscribed.js +68 -0
  989. package/clis/reddit/upvote.js +43 -0
  990. package/clis/reddit/upvoted.js +24 -0
  991. package/clis/reddit/user-comments.js +20 -0
  992. package/clis/reddit/user-posts.js +17 -0
  993. package/clis/reddit/user.js +20 -0
  994. package/clis/reddit/whoami.js +19 -0
  995. package/clis/rednote/auth.js +19 -0
  996. package/clis/rednote/comments.js +1 -0
  997. package/clis/rednote/download.js +1 -0
  998. package/clis/rednote/feed.js +1 -0
  999. package/clis/rednote/note.js +1 -0
  1000. package/clis/rednote/notifications.js +67 -0
  1001. package/clis/rednote/search.js +32 -0
  1002. package/clis/rednote/user.js +1 -0
  1003. package/clis/rest-countries/country.js +1 -0
  1004. package/clis/rest-countries/region.js +1 -0
  1005. package/clis/rest-countries/utils.js +1 -0
  1006. package/clis/reuters/article-detail.js +1 -0
  1007. package/clis/reuters/auth.js +39 -0
  1008. package/clis/reuters/search.js +1 -0
  1009. package/clis/reuters/utils.js +50 -0
  1010. package/clis/rfc/rfc.js +1 -0
  1011. package/clis/rfc/utils.js +1 -0
  1012. package/clis/rubygems/gem.js +1 -0
  1013. package/clis/rubygems/search.js +1 -0
  1014. package/clis/rubygems/utils.js +1 -0
  1015. package/clis/segmentfault/_signed-request.js +43 -0
  1016. package/clis/segmentfault/article.js +3 -0
  1017. package/clis/segmentfault/channels.js +1 -0
  1018. package/clis/segmentfault/login.js +1 -0
  1019. package/clis/segmentfault/stats.js +82 -0
  1020. package/clis/segmentfault/tags.js +1 -0
  1021. package/clis/segmentfault/whoami.js +1 -0
  1022. package/clis/semanticscholar/citations.js +1 -0
  1023. package/clis/semanticscholar/paper.js +1 -0
  1024. package/clis/semanticscholar/recommendations.js +1 -0
  1025. package/clis/semanticscholar/search.js +1 -0
  1026. package/clis/semanticscholar/utils.js +1 -0
  1027. package/clis/sinablog/article.js +1 -0
  1028. package/clis/sinablog/hot.js +1 -0
  1029. package/clis/sinablog/search.js +1 -0
  1030. package/clis/sinablog/user.js +1 -0
  1031. package/clis/sinablog/utils.js +153 -0
  1032. package/clis/sinafinance/news.js +1 -0
  1033. package/clis/sinafinance/rolling-news.js +20 -0
  1034. package/clis/sinafinance/stock-rank.js +41 -0
  1035. package/clis/sinafinance/stock.js +1 -0
  1036. package/clis/slock/attachment-download.js +1 -0
  1037. package/clis/slock/attachment-upload.js +34 -0
  1038. package/clis/slock/attachment-url.js +1 -0
  1039. package/clis/slock/auth-verify.js +1 -0
  1040. package/clis/slock/bookmark-add.js +11 -0
  1041. package/clis/slock/bookmark-list.js +10 -0
  1042. package/clis/slock/bookmark-remove.js +7 -0
  1043. package/clis/slock/channel-action.js +1 -0
  1044. package/clis/slock/channel-archive.js +1 -0
  1045. package/clis/slock/channel-create.js +1 -0
  1046. package/clis/slock/channel-files.js +1 -0
  1047. package/clis/slock/channel-info.js +1 -0
  1048. package/clis/slock/channel-join.js +1 -0
  1049. package/clis/slock/channel-leave.js +1 -0
  1050. package/clis/slock/channel-list.js +1 -0
  1051. package/clis/slock/channel-mark.js +1 -0
  1052. package/clis/slock/channel-members.js +1 -0
  1053. package/clis/slock/channel-unarchive.js +1 -0
  1054. package/clis/slock/dm-list.js +1 -0
  1055. package/clis/slock/errors.js +1 -0
  1056. package/clis/slock/in-page.js +113 -0
  1057. package/clis/slock/inbox-done.js +9 -0
  1058. package/clis/slock/inbox-read-all.js +1 -0
  1059. package/clis/slock/inbox.js +1 -0
  1060. package/clis/slock/login.js +1 -0
  1061. package/clis/slock/message-read.js +61 -0
  1062. package/clis/slock/message-search.js +24 -0
  1063. package/clis/slock/message-send.js +55 -0
  1064. package/clis/slock/reaction-add.js +1 -0
  1065. package/clis/slock/reaction-remove.js +1 -0
  1066. package/clis/slock/resolve.js +1 -0
  1067. package/clis/slock/server-list.js +9 -0
  1068. package/clis/slock/server-use.js +18 -0
  1069. package/clis/slock/shared.js +1 -0
  1070. package/clis/slock/task-claim.js +14 -0
  1071. package/clis/slock/task-convert.js +35 -0
  1072. package/clis/slock/task-create.js +24 -0
  1073. package/clis/slock/task-delete.js +9 -0
  1074. package/clis/slock/task-get.js +11 -0
  1075. package/clis/slock/task-list-server.js +12 -0
  1076. package/clis/slock/task-list.js +14 -0
  1077. package/clis/slock/task-status.js +19 -0
  1078. package/clis/slock/task-unclaim.js +13 -0
  1079. package/clis/slock/thread-done.js +1 -0
  1080. package/clis/slock/thread-follow.js +1 -0
  1081. package/clis/slock/thread-list.js +1 -0
  1082. package/clis/slock/thread-state.js +1 -0
  1083. package/clis/slock/thread-undone.js +1 -0
  1084. package/clis/slock/thread-unfollow.js +1 -0
  1085. package/clis/slock/unread-summary.js +18 -0
  1086. package/clis/slock/whoami.js +1 -0
  1087. package/clis/smzdm/search.js +71 -0
  1088. package/clis/sohu/article.js +1 -0
  1089. package/clis/sohu/attributes.js +1 -0
  1090. package/clis/sohu/categories.js +1 -0
  1091. package/clis/sohu/channels.js +1 -0
  1092. package/clis/sohu/columns.js +1 -0
  1093. package/clis/sohu/login.js +1 -0
  1094. package/clis/sohu/mpbp.js +1 -0
  1095. package/clis/sohu/stats.js +95 -0
  1096. package/clis/sohu/topics.js +1 -0
  1097. package/clis/sohu/whoami.js +1 -0
  1098. package/clis/spotify/spotify.js +1 -0
  1099. package/clis/spotify/utils.js +8 -0
  1100. package/clis/stackoverflow/bounties.js +1 -0
  1101. package/clis/stackoverflow/hot.js +1 -0
  1102. package/clis/stackoverflow/read.js +13 -0
  1103. package/clis/stackoverflow/related.js +1 -0
  1104. package/clis/stackoverflow/search.js +1 -0
  1105. package/clis/stackoverflow/tag.js +1 -0
  1106. package/clis/stackoverflow/unanswered.js +1 -0
  1107. package/clis/stackoverflow/user.js +1 -0
  1108. package/clis/stackoverflow/utils.js +1 -0
  1109. package/clis/steam/app.js +1 -0
  1110. package/clis/steam/search.js +1 -0
  1111. package/clis/steam/top-sellers.js +1 -0
  1112. package/clis/steam/utils.js +1 -0
  1113. package/clis/substack/auth.js +11 -0
  1114. package/clis/substack/feed.js +1 -0
  1115. package/clis/substack/post-utils.js +2 -0
  1116. package/clis/substack/publication.js +1 -0
  1117. package/clis/substack/publish.js +10 -0
  1118. package/clis/substack/search.js +1 -0
  1119. package/clis/substack/utils.js +108 -0
  1120. package/clis/suno/auth.js +21 -0
  1121. package/clis/suno/download.js +17 -0
  1122. package/clis/suno/generate.js +4 -0
  1123. package/clis/suno/list.js +14 -0
  1124. package/clis/suno/status.js +1 -0
  1125. package/clis/suno/utils.js +102 -0
  1126. package/clis/taobao/add-cart.js +93 -0
  1127. package/clis/taobao/auth.js +8 -0
  1128. package/clis/taobao/cart.js +68 -0
  1129. package/clis/taobao/detail.js +48 -0
  1130. package/clis/taobao/reviews.js +52 -0
  1131. package/clis/taobao/search.js +64 -0
  1132. package/clis/tdx/hot-rank.js +25 -0
  1133. package/clis/telegram/send.js +18 -0
  1134. package/clis/telegram/shared.js +21 -0
  1135. package/clis/telegram/whoami.js +1 -0
  1136. package/clis/test-utils.js +1 -0
  1137. package/clis/threads/post.js +152 -0
  1138. package/clis/threads/shared.js +27 -0
  1139. package/clis/threads/whoami.js +1 -0
  1140. package/clis/ths/hot-rank.js +27 -0
  1141. package/clis/tieba/hot.js +16 -0
  1142. package/clis/tieba/posts.js +1 -0
  1143. package/clis/tieba/read.js +84 -0
  1144. package/clis/tieba/search.js +54 -0
  1145. package/clis/tieba/utils.js +1 -0
  1146. package/clis/tiktok/auth.js +30 -0
  1147. package/clis/tiktok/comment.js +69 -0
  1148. package/clis/tiktok/creator-videos.js +45 -0
  1149. package/clis/tiktok/explore.js +76 -0
  1150. package/clis/tiktok/follow.js +49 -0
  1151. package/clis/tiktok/following.js +103 -0
  1152. package/clis/tiktok/friends.js +79 -0
  1153. package/clis/tiktok/like.js +19 -0
  1154. package/clis/tiktok/live.js +79 -0
  1155. package/clis/tiktok/notifications.js +77 -0
  1156. package/clis/tiktok/profile.js +26 -0
  1157. package/clis/tiktok/publish.js +82 -0
  1158. package/clis/tiktok/save.js +15 -0
  1159. package/clis/tiktok/search.js +24 -0
  1160. package/clis/tiktok/unfollow.js +59 -0
  1161. package/clis/tiktok/unlike.js +19 -0
  1162. package/clis/tiktok/unsave.js +17 -0
  1163. package/clis/tiktok/user.js +143 -0
  1164. package/clis/tiktok/utils.js +272 -0
  1165. package/clis/toutiao/article.js +1 -0
  1166. package/clis/toutiao/articles.js +6 -0
  1167. package/clis/toutiao/auth.js +50 -0
  1168. package/clis/toutiao/hot.js +1 -0
  1169. package/clis/toutiao/utils.js +2 -0
  1170. package/clis/trae-cn/activity.js +1 -0
  1171. package/clis/trae-cn/approve.js +1 -0
  1172. package/clis/trae-cn/ask.js +1 -0
  1173. package/clis/trae-cn/dump.js +1 -0
  1174. package/clis/trae-cn/export.js +3 -0
  1175. package/clis/trae-cn/model.js +1 -0
  1176. package/clis/trae-cn/new.js +1 -0
  1177. package/clis/trae-cn/read.js +1 -0
  1178. package/clis/trae-cn/screenshot.js +1 -0
  1179. package/clis/trae-cn/select-model.js +1 -0
  1180. package/clis/trae-cn/send.js +1 -0
  1181. package/clis/trae-cn/setup.js +1 -0
  1182. package/clis/trae-cn/status.js +1 -0
  1183. package/clis/trae-cn/targets.js +1 -0
  1184. package/clis/trae-cn/utils.js +456 -0
  1185. package/clis/trae-cn/watch.js +3 -0
  1186. package/clis/trae-solo/_actions.js +41 -0
  1187. package/clis/trae-solo/_fs.js +6 -0
  1188. package/clis/trae-solo/_state.js +2 -0
  1189. package/clis/trae-solo/automation.js +43 -0
  1190. package/clis/trae-solo/history.js +15 -0
  1191. package/clis/trae-solo/mode.js +31 -0
  1192. package/clis/trae-solo/model.js +50 -0
  1193. package/clis/trae-solo/renderer-storage.js +11 -0
  1194. package/clis/trae-solo/settings.js +1 -0
  1195. package/clis/trae-solo/skill-fs.js +1 -0
  1196. package/clis/trae-solo/skill.js +81 -0
  1197. package/clis/trae-solo/state-fs.js +2 -0
  1198. package/clis/trae-solo/status.js +1 -0
  1199. package/clis/trae-solo/task-fs.js +5 -0
  1200. package/clis/trae-solo/user-rules.js +1 -0
  1201. package/clis/trae-solo/workspaces-fs.js +1 -0
  1202. package/clis/tumblr/auth.js +24 -0
  1203. package/clis/tumblr/publish.js +14 -0
  1204. package/clis/tvmaze/search.js +1 -0
  1205. package/clis/tvmaze/show.js +1 -0
  1206. package/clis/tvmaze/utils.js +1 -0
  1207. package/clis/twitter/accept.js +116 -0
  1208. package/clis/twitter/article.js +116 -0
  1209. package/clis/twitter/auth.js +4 -0
  1210. package/clis/twitter/block.js +62 -0
  1211. package/clis/twitter/bookmark-folder.js +4 -0
  1212. package/clis/twitter/bookmark-folders.js +4 -0
  1213. package/clis/twitter/bookmark.js +44 -0
  1214. package/clis/twitter/bookmarks.js +27 -0
  1215. package/clis/twitter/delete.js +36 -0
  1216. package/clis/twitter/device-follow.js +13 -0
  1217. package/clis/twitter/dm-list.js +1 -0
  1218. package/clis/twitter/dm-read.js +1 -0
  1219. package/clis/twitter/dm-send.js +13 -0
  1220. package/clis/twitter/dm-shared.js +6 -0
  1221. package/clis/twitter/download.js +38 -0
  1222. package/clis/twitter/follow-batch.js +43 -0
  1223. package/clis/twitter/follow.js +39 -0
  1224. package/clis/twitter/followers.js +59 -0
  1225. package/clis/twitter/following.js +4 -0
  1226. package/clis/twitter/hide-reply.js +57 -0
  1227. package/clis/twitter/like.js +48 -0
  1228. package/clis/twitter/likes.js +14 -0
  1229. package/clis/twitter/list-add-batch.js +1 -0
  1230. package/clis/twitter/list-add-core.js +35 -0
  1231. package/clis/twitter/list-add.js +1 -0
  1232. package/clis/twitter/list-batch-utils.js +1 -0
  1233. package/clis/twitter/list-create.js +12 -0
  1234. package/clis/twitter/list-delete.js +36 -0
  1235. package/clis/twitter/list-remove-batch.js +1 -0
  1236. package/clis/twitter/list-remove-core.js +127 -0
  1237. package/clis/twitter/list-remove.js +1 -0
  1238. package/clis/twitter/list-tweets.js +27 -0
  1239. package/clis/twitter/lists.js +27 -0
  1240. package/clis/twitter/notifications.js +4 -0
  1241. package/clis/twitter/post.js +158 -0
  1242. package/clis/twitter/profile.js +66 -0
  1243. package/clis/twitter/quote.js +123 -0
  1244. package/clis/twitter/reply-dm.js +112 -0
  1245. package/clis/twitter/reply.js +97 -0
  1246. package/clis/twitter/retweet.js +62 -0
  1247. package/clis/twitter/schedule.js +96 -0
  1248. package/clis/twitter/scheduled-delete.js +60 -0
  1249. package/clis/twitter/scheduled-list.js +15 -0
  1250. package/clis/twitter/scheduled-utils.js +18 -0
  1251. package/clis/twitter/search.js +12 -0
  1252. package/clis/twitter/shared.js +76 -0
  1253. package/clis/twitter/thread.js +4 -0
  1254. package/clis/twitter/timeline.js +4 -0
  1255. package/clis/twitter/trending.js +18 -0
  1256. package/clis/twitter/tweets.js +12 -0
  1257. package/clis/twitter/unblock.js +45 -0
  1258. package/clis/twitter/unbookmark.js +41 -0
  1259. package/clis/twitter/unfollow.js +45 -0
  1260. package/clis/twitter/unlike.js +48 -0
  1261. package/clis/twitter/unretweet.js +62 -0
  1262. package/clis/twitter/utils.js +55 -0
  1263. package/clis/uisdc/news.js +25 -0
  1264. package/clis/uiverse/_shared.js +257 -0
  1265. package/clis/uiverse/code.js +1 -0
  1266. package/clis/uiverse/preview.js +1 -0
  1267. package/clis/upwork/auth.js +19 -0
  1268. package/clis/upwork/detail.js +22 -0
  1269. package/clis/upwork/feed.js +21 -0
  1270. package/clis/upwork/search.js +21 -0
  1271. package/clis/upwork/utils.js +1 -0
  1272. package/clis/v2ex/auth.js +10 -0
  1273. package/clis/v2ex/daily.js +41 -0
  1274. package/clis/v2ex/hot.js +1 -0
  1275. package/clis/v2ex/latest.js +1 -0
  1276. package/clis/v2ex/me.js +58 -0
  1277. package/clis/v2ex/member.js +1 -0
  1278. package/clis/v2ex/node.js +1 -0
  1279. package/clis/v2ex/nodes.js +1 -0
  1280. package/clis/v2ex/notifications.js +40 -0
  1281. package/clis/v2ex/replies.js +1 -0
  1282. package/clis/v2ex/topic.js +1 -0
  1283. package/clis/v2ex/user.js +1 -0
  1284. package/clis/vk/post.js +1 -0
  1285. package/clis/vk/shared.js +8 -0
  1286. package/clis/vk/whoami.js +1 -0
  1287. package/clis/wanfang/search.js +42 -0
  1288. package/clis/web/read.js +260 -0
  1289. package/clis/wechat-channels/auth.js +31 -0
  1290. package/clis/wechat-channels/publish.js +298 -0
  1291. package/clis/weibo/article.js +1 -0
  1292. package/clis/weibo/auth.js +17 -0
  1293. package/clis/weibo/comments.js +28 -0
  1294. package/clis/weibo/delete.js +84 -0
  1295. package/clis/weibo/favorites.js +27 -0
  1296. package/clis/weibo/feed.js +33 -0
  1297. package/clis/weibo/hot.js +17 -0
  1298. package/clis/weibo/me.js +51 -0
  1299. package/clis/weibo/post.js +46 -0
  1300. package/clis/weibo/publish.js +98 -0
  1301. package/clis/weibo/search.js +47 -0
  1302. package/clis/weibo/user-posts.js +92 -0
  1303. package/clis/weibo/user.js +37 -0
  1304. package/clis/weibo/utils.js +16 -0
  1305. package/clis/weixin/article.js +1 -0
  1306. package/clis/weixin/create-draft.js +152 -0
  1307. package/clis/weixin/download.js +100 -0
  1308. package/clis/weixin/drafts.js +27 -0
  1309. package/clis/weixin/login.js +1 -0
  1310. package/clis/weixin/search.js +44 -0
  1311. package/clis/weixin/stats.js +43 -0
  1312. package/clis/weixin/whoami.js +1 -0
  1313. package/clis/weread/ai-outline.js +2 -0
  1314. package/clis/weread/auth.js +24 -0
  1315. package/clis/weread/book-search.js +2 -0
  1316. package/clis/weread/book.js +3 -0
  1317. package/clis/weread/highlights.js +1 -0
  1318. package/clis/weread/notebooks.js +1 -0
  1319. package/clis/weread/notes.js +1 -0
  1320. package/clis/weread/ranking.js +1 -0
  1321. package/clis/weread/search.js +1 -0
  1322. package/clis/weread/shelf.js +1 -0
  1323. package/clis/weread/utils.js +67 -0
  1324. package/clis/weread-official/book.js +1 -0
  1325. package/clis/weread-official/discover.js +1 -0
  1326. package/clis/weread-official/list-apis.js +1 -0
  1327. package/clis/weread-official/notes.js +1 -0
  1328. package/clis/weread-official/readdata.js +1 -0
  1329. package/clis/weread-official/review.js +1 -0
  1330. package/clis/weread-official/search.js +1 -0
  1331. package/clis/weread-official/shelf.js +1 -0
  1332. package/clis/weread-official/utils.js +1 -0
  1333. package/clis/wikidata/entity.js +1 -0
  1334. package/clis/wikidata/search.js +1 -0
  1335. package/clis/wikidata/utils.js +1 -0
  1336. package/clis/wikipedia/page.js +3 -0
  1337. package/clis/wikipedia/random.js +1 -0
  1338. package/clis/wikipedia/search.js +1 -0
  1339. package/clis/wikipedia/summary.js +1 -0
  1340. package/clis/wikipedia/trending.js +1 -0
  1341. package/clis/wikipedia/utils.js +1 -0
  1342. package/clis/wordpress/login.js +1 -0
  1343. package/clis/wordpress/publish.js +1 -0
  1344. package/clis/wordpress/shared.js +54 -0
  1345. package/clis/wordpress/whoami.js +1 -0
  1346. package/clis/woshipm/article.js +1 -0
  1347. package/clis/woshipm/login.js +1 -0
  1348. package/clis/woshipm/stats.js +52 -0
  1349. package/clis/woshipm/whoami.js +1 -0
  1350. package/clis/wttr/current.js +1 -0
  1351. package/clis/wttr/forecast.js +1 -0
  1352. package/clis/wttr/utils.js +1 -0
  1353. package/clis/xianyu/auth.js +11 -0
  1354. package/clis/xianyu/chat.js +1 -0
  1355. package/clis/xianyu/im.js +240 -0
  1356. package/clis/xianyu/inbox.js +1 -0
  1357. package/clis/xianyu/item.js +97 -0
  1358. package/clis/xianyu/messages.js +1 -0
  1359. package/clis/xianyu/publish.js +245 -0
  1360. package/clis/xianyu/reply.js +1 -0
  1361. package/clis/xianyu/search.js +141 -0
  1362. package/clis/xianyu/utils.js +1 -0
  1363. package/clis/xiaoe/auth.js +10 -0
  1364. package/clis/xiaoe/catalog.js +134 -0
  1365. package/clis/xiaoe/content.js +16 -0
  1366. package/clis/xiaoe/courses.js +43 -0
  1367. package/clis/xiaoe/detail.js +19 -0
  1368. package/clis/xiaoe/play-url.js +97 -0
  1369. package/clis/xiaohongshu/ask.js +130 -0
  1370. package/clis/xiaohongshu/auth.js +13 -0
  1371. package/clis/xiaohongshu/collection-helpers.js +64 -0
  1372. package/clis/xiaohongshu/comments.js +89 -0
  1373. package/clis/xiaohongshu/creator-note-detail.js +80 -0
  1374. package/clis/xiaohongshu/creator-notes-summary.js +1 -0
  1375. package/clis/xiaohongshu/creator-notes.js +107 -0
  1376. package/clis/xiaohongshu/creator-profile.js +13 -0
  1377. package/clis/xiaohongshu/creator-stats.js +13 -0
  1378. package/clis/xiaohongshu/delete-note.js +69 -0
  1379. package/clis/xiaohongshu/download.js +200 -0
  1380. package/clis/xiaohongshu/draft-clear.js +44 -0
  1381. package/clis/xiaohongshu/draft-delete.js +37 -0
  1382. package/clis/xiaohongshu/draft-open.js +1 -0
  1383. package/clis/xiaohongshu/draft-utils.js +36 -0
  1384. package/clis/xiaohongshu/drafts.js +1 -0
  1385. package/clis/xiaohongshu/feed.js +38 -0
  1386. package/clis/xiaohongshu/follow.js +75 -0
  1387. package/clis/xiaohongshu/liked.js +1 -0
  1388. package/clis/xiaohongshu/note-helpers.js +1 -0
  1389. package/clis/xiaohongshu/note.js +32 -0
  1390. package/clis/xiaohongshu/notifications.js +1 -0
  1391. package/clis/xiaohongshu/publish-video.js +87 -0
  1392. package/clis/xiaohongshu/publish.js +637 -0
  1393. package/clis/xiaohongshu/saved.js +1 -0
  1394. package/clis/xiaohongshu/search.js +194 -0
  1395. package/clis/xiaohongshu/unfollow.js +98 -0
  1396. package/clis/xiaohongshu/user-helpers.js +1 -0
  1397. package/clis/xiaohongshu/user.js +30 -0
  1398. package/clis/xiaoyuzhou/auth.js +3 -0
  1399. package/clis/xiaoyuzhou/download.js +1 -0
  1400. package/clis/xiaoyuzhou/episode.js +1 -0
  1401. package/clis/xiaoyuzhou/podcast-episodes.js +1 -0
  1402. package/clis/xiaoyuzhou/podcast.js +1 -0
  1403. package/clis/xiaoyuzhou/transcript.js +1 -0
  1404. package/clis/xiaoyuzhou/utils.js +1 -0
  1405. package/clis/xueqiu/article.js +4 -0
  1406. package/clis/xueqiu/auth.js +27 -0
  1407. package/clis/xueqiu/comments.js +38 -0
  1408. package/clis/xueqiu/danjuan-utils.js +84 -0
  1409. package/clis/xueqiu/earnings-date.js +1 -0
  1410. package/clis/xueqiu/events.js +17 -0
  1411. package/clis/xueqiu/feed.js +1 -0
  1412. package/clis/xueqiu/fund-holdings.js +1 -0
  1413. package/clis/xueqiu/fund-snapshot.js +1 -0
  1414. package/clis/xueqiu/groups.js +1 -0
  1415. package/clis/xueqiu/hashtags.js +26 -0
  1416. package/clis/xueqiu/hot-stock.js +1 -0
  1417. package/clis/xueqiu/hot.js +1 -0
  1418. package/clis/xueqiu/kline.js +1 -0
  1419. package/clis/xueqiu/search.js +1 -0
  1420. package/clis/xueqiu/stock.js +1 -0
  1421. package/clis/xueqiu/stocks.js +13 -0
  1422. package/clis/xueqiu/users.js +12 -0
  1423. package/clis/xueqiu/utils.js +9 -0
  1424. package/clis/xueqiu/watchlist.js +1 -0
  1425. package/clis/yahoo/search.js +21 -0
  1426. package/clis/yahoo-finance/quote.js +50 -0
  1427. package/clis/yollomi/background.js +1 -0
  1428. package/clis/yollomi/edit.js +1 -0
  1429. package/clis/yollomi/face-swap.js +1 -0
  1430. package/clis/yollomi/generate.js +1 -0
  1431. package/clis/yollomi/models.js +1 -0
  1432. package/clis/yollomi/object-remover.js +1 -0
  1433. package/clis/yollomi/remove-bg.js +1 -0
  1434. package/clis/yollomi/restore.js +1 -0
  1435. package/clis/yollomi/try-on.js +1 -0
  1436. package/clis/yollomi/upload.js +17 -0
  1437. package/clis/yollomi/upscale.js +1 -0
  1438. package/clis/yollomi/utils.js +16 -0
  1439. package/clis/yollomi/video.js +1 -0
  1440. package/clis/youdao/note.js +113 -0
  1441. package/clis/youtube/auth.js +20 -0
  1442. package/clis/youtube/channel.js +118 -0
  1443. package/clis/youtube/comments.js +64 -0
  1444. package/clis/youtube/feed.js +89 -0
  1445. package/clis/youtube/history.js +87 -0
  1446. package/clis/youtube/like.js +33 -0
  1447. package/clis/youtube/playlist.js +47 -0
  1448. package/clis/youtube/publish.js +56 -0
  1449. package/clis/youtube/search.js +39 -0
  1450. package/clis/youtube/subscribe.js +42 -0
  1451. package/clis/youtube/subscriptions.js +26 -0
  1452. package/clis/youtube/transcript-group.js +2 -0
  1453. package/clis/youtube/transcript.js +417 -0
  1454. package/clis/youtube/unlike.js +33 -0
  1455. package/clis/youtube/unsubscribe.js +42 -0
  1456. package/clis/youtube/utils.js +34 -0
  1457. package/clis/youtube/video.js +96 -0
  1458. package/clis/youtube/watch-later.js +41 -0
  1459. package/clis/yuanbao/ask.js +145 -0
  1460. package/clis/yuanbao/auth.js +23 -0
  1461. package/clis/yuanbao/detail.js +1 -0
  1462. package/clis/yuanbao/history.js +1 -0
  1463. package/clis/yuanbao/new.js +16 -0
  1464. package/clis/yuanbao/read.js +1 -0
  1465. package/clis/yuanbao/send.js +1 -0
  1466. package/clis/yuanbao/shared.js +127 -0
  1467. package/clis/yuanbao/status.js +1 -0
  1468. package/clis/yuque/article.js +1 -0
  1469. package/clis/yuque/whoami.js +1 -0
  1470. package/clis/zhihu/answer-comments.js +11 -0
  1471. package/clis/zhihu/answer-detail.js +11 -0
  1472. package/clis/zhihu/answer.js +15 -0
  1473. package/clis/zhihu/article-transform.js +1 -0
  1474. package/clis/zhihu/article.js +7 -0
  1475. package/clis/zhihu/auth.js +11 -0
  1476. package/clis/zhihu/collection.js +7 -0
  1477. package/clis/zhihu/collections.js +7 -0
  1478. package/clis/zhihu/comment.js +17 -0
  1479. package/clis/zhihu/download.js +39 -0
  1480. package/clis/zhihu/favorite.js +39 -0
  1481. package/clis/zhihu/follow.js +19 -0
  1482. package/clis/zhihu/followers.js +1 -0
  1483. package/clis/zhihu/following.js +1 -0
  1484. package/clis/zhihu/hot.js +21 -0
  1485. package/clis/zhihu/like.js +16 -0
  1486. package/clis/zhihu/paginate.js +11 -0
  1487. package/clis/zhihu/pin.js +24 -0
  1488. package/clis/zhihu/pins.js +1 -0
  1489. package/clis/zhihu/question.js +7 -0
  1490. package/clis/zhihu/recommend.js +7 -0
  1491. package/clis/zhihu/search.js +11 -0
  1492. package/clis/zhihu/stats.js +41 -0
  1493. package/clis/zhihu/target.js +1 -0
  1494. package/clis/zhihu/text.js +6 -0
  1495. package/clis/zhihu/user-answers.js +1 -0
  1496. package/clis/zhihu/user-arg.js +1 -0
  1497. package/clis/zhihu/user-articles.js +1 -0
  1498. package/clis/zhihu/user.js +11 -0
  1499. package/clis/zhihu/write-shared.js +71 -0
  1500. package/clis/zlibrary/info.js +1 -0
  1501. package/clis/zlibrary/search.js +1 -0
  1502. package/clis/zlibrary/utils.js +48 -0
  1503. package/clis/zsxq/auth.js +33 -0
  1504. package/clis/zsxq/dynamics.js +1 -0
  1505. package/clis/zsxq/groups.js +1 -0
  1506. package/clis/zsxq/search.js +1 -0
  1507. package/clis/zsxq/topic.js +1 -0
  1508. package/clis/zsxq/topics.js +1 -0
  1509. package/clis/zsxq/utils.js +72 -0
  1510. package/dist/src/adapter-shadow.d.ts +11 -0
  1511. package/dist/src/adapter-shadow.js +2 -0
  1512. package/dist/src/adapter-shadow.test.d.ts +1 -0
  1513. package/dist/src/adapter-source.d.ts +11 -0
  1514. package/dist/src/adapter-source.js +1 -0
  1515. package/dist/src/adapter-source.test.d.ts +1 -0
  1516. package/dist/src/browser/analyze.d.ts +118 -0
  1517. package/dist/src/browser/analyze.js +1 -0
  1518. package/dist/src/browser/analyze.test.d.ts +1 -0
  1519. package/dist/src/browser/article-extract.d.ts +57 -0
  1520. package/dist/src/browser/article-extract.e2e.test.d.ts +1 -0
  1521. package/dist/src/browser/article-extract.js +2 -0
  1522. package/dist/src/browser/article-extract.test.d.ts +1 -0
  1523. package/dist/src/browser/ax-snapshot.d.ts +37 -0
  1524. package/dist/src/browser/ax-snapshot.js +2 -0
  1525. package/dist/src/browser/ax-snapshot.test.d.ts +1 -0
  1526. package/dist/src/browser/base-page.d.ts +151 -0
  1527. package/dist/src/browser/base-page.js +225 -0
  1528. package/dist/src/browser/base-page.test.d.ts +1 -0
  1529. package/dist/src/browser/bridge-readiness.d.ts +14 -0
  1530. package/dist/src/browser/bridge-readiness.js +1 -0
  1531. package/dist/src/browser/bridge-readiness.test.d.ts +1 -0
  1532. package/dist/src/browser/bridge.d.ts +26 -0
  1533. package/dist/src/browser/bridge.js +1 -0
  1534. package/dist/src/browser/cdp-click-fixture.test.d.ts +1 -0
  1535. package/dist/src/browser/cdp.d.ts +51 -0
  1536. package/dist/src/browser/cdp.js +1 -0
  1537. package/dist/src/browser/cdp.test.d.ts +1 -0
  1538. package/dist/src/browser/compound.d.ts +59 -0
  1539. package/dist/src/browser/compound.js +82 -0
  1540. package/dist/src/browser/compound.test.d.ts +1 -0
  1541. package/dist/src/browser/config.d.ts +2 -0
  1542. package/dist/src/browser/config.js +1 -0
  1543. package/dist/src/browser/daemon-client.d.ts +79 -0
  1544. package/dist/src/browser/daemon-client.js +1 -0
  1545. package/dist/src/browser/daemon-client.test.d.ts +1 -0
  1546. package/dist/src/browser/daemon-lifecycle.d.ts +37 -0
  1547. package/dist/src/browser/daemon-lifecycle.js +12 -0
  1548. package/dist/src/browser/daemon-transport.d.ts +55 -0
  1549. package/dist/src/browser/daemon-transport.js +1 -0
  1550. package/dist/src/browser/daemon-version.d.ts +4 -0
  1551. package/dist/src/browser/daemon-version.js +2 -0
  1552. package/dist/src/browser/dom-helpers.d.ts +41 -0
  1553. package/dist/src/browser/dom-helpers.js +166 -0
  1554. package/dist/src/browser/dom-helpers.test.d.ts +1 -0
  1555. package/dist/src/browser/dom-snapshot.d.ts +93 -0
  1556. package/dist/src/browser/dom-snapshot.js +809 -0
  1557. package/dist/src/browser/dom-snapshot.test.d.ts +11 -0
  1558. package/dist/src/browser/errors.d.ts +38 -0
  1559. package/dist/src/browser/errors.js +5 -0
  1560. package/dist/src/browser/errors.test.d.ts +1 -0
  1561. package/dist/src/browser/extract.d.ts +69 -0
  1562. package/dist/src/browser/extract.js +42 -0
  1563. package/dist/src/browser/extract.test.d.ts +1 -0
  1564. package/dist/src/browser/find.d.ts +84 -0
  1565. package/dist/src/browser/find.js +328 -0
  1566. package/dist/src/browser/find.test.d.ts +1 -0
  1567. package/dist/src/browser/fingerprint.d.ts +44 -0
  1568. package/dist/src/browser/fingerprint.js +82 -0
  1569. package/dist/src/browser/html-tree.d.ts +75 -0
  1570. package/dist/src/browser/html-tree.js +61 -0
  1571. package/dist/src/browser/html-tree.test.d.ts +1 -0
  1572. package/dist/src/browser/index.d.ts +14 -0
  1573. package/dist/src/browser/index.js +1 -0
  1574. package/dist/src/browser/managed-chrome.d.ts +89 -0
  1575. package/dist/src/browser/managed-chrome.js +1 -0
  1576. package/dist/src/browser/network-cache.d.ts +49 -0
  1577. package/dist/src/browser/network-cache.js +1 -0
  1578. package/dist/src/browser/network-cache.test.d.ts +1 -0
  1579. package/dist/src/browser/network-key.d.ts +22 -0
  1580. package/dist/src/browser/network-key.js +1 -0
  1581. package/dist/src/browser/network-key.test.d.ts +1 -0
  1582. package/dist/src/browser/page.d.ts +83 -0
  1583. package/dist/src/browser/page.js +15 -0
  1584. package/dist/src/browser/page.test.d.ts +1 -0
  1585. package/dist/src/browser/profile.d.ts +96 -0
  1586. package/dist/src/browser/profile.js +2 -0
  1587. package/dist/src/browser/proxy-test.d.ts +28 -0
  1588. package/dist/src/browser/proxy-test.js +12 -0
  1589. package/dist/src/browser/shape-filter.d.ts +52 -0
  1590. package/dist/src/browser/shape-filter.js +1 -0
  1591. package/dist/src/browser/shape-filter.test.d.ts +1 -0
  1592. package/dist/src/browser/shape.d.ts +23 -0
  1593. package/dist/src/browser/shape.js +1 -0
  1594. package/dist/src/browser/shape.test.d.ts +1 -0
  1595. package/dist/src/browser/stealth.d.ts +18 -0
  1596. package/dist/src/browser/stealth.js +391 -0
  1597. package/dist/src/browser/stealth.test.d.ts +1 -0
  1598. package/dist/src/browser/tabs.d.ts +13 -0
  1599. package/dist/src/browser/tabs.js +2 -0
  1600. package/dist/src/browser/target-errors.d.ts +39 -0
  1601. package/dist/src/browser/target-errors.js +1 -0
  1602. package/dist/src/browser/target-errors.test.d.ts +1 -0
  1603. package/dist/src/browser/target-resolver.d.ts +158 -0
  1604. package/dist/src/browser/target-resolver.js +423 -0
  1605. package/dist/src/browser/target-resolver.test.d.ts +1 -0
  1606. package/dist/src/browser/trace.d.ts +21 -0
  1607. package/dist/src/browser/trace.js +2 -0
  1608. package/dist/src/browser/utils.d.ts +20 -0
  1609. package/dist/src/browser/utils.js +1 -0
  1610. package/dist/src/browser/utils.test.d.ts +1 -0
  1611. package/dist/src/browser/verify-fixture.d.ts +65 -0
  1612. package/dist/src/browser/verify-fixture.js +2 -0
  1613. package/dist/src/browser/verify-fixture.test.d.ts +1 -0
  1614. package/dist/src/browser/visual-refs.d.ts +11 -0
  1615. package/dist/src/browser/visual-refs.js +94 -0
  1616. package/dist/src/browser-session-lock.d.ts +13 -0
  1617. package/dist/src/browser-session-lock.js +1 -0
  1618. package/dist/src/browser-session-lock.test.d.ts +1 -0
  1619. package/dist/src/browser.test.d.ts +1 -0
  1620. package/dist/src/build-manifest.d.ts +103 -0
  1621. package/dist/src/build-manifest.js +16 -0
  1622. package/dist/src/build-manifest.test.d.ts +1 -0
  1623. package/dist/src/capabilityRouting.d.ts +19 -0
  1624. package/dist/src/capabilityRouting.js +1 -0
  1625. package/dist/src/capabilityRouting.test.d.ts +1 -0
  1626. package/dist/src/cli-argv-preprocess.d.ts +63 -0
  1627. package/dist/src/cli-argv-preprocess.js +1 -0
  1628. package/dist/src/cli-argv-preprocess.test.d.ts +1 -0
  1629. package/dist/src/cli.d.ts +79 -0
  1630. package/dist/src/cli.js +132 -0
  1631. package/dist/src/cli.test.d.ts +1 -0
  1632. package/dist/src/commanderAdapter.d.ts +21 -0
  1633. package/dist/src/commanderAdapter.js +3 -0
  1634. package/dist/src/commanderAdapter.test.d.ts +1 -0
  1635. package/dist/src/commands/auth.d.ts +40 -0
  1636. package/dist/src/commands/auth.js +2 -0
  1637. package/dist/src/commands/auth.test.d.ts +1 -0
  1638. package/dist/src/commands/daemon.d.ts +25 -0
  1639. package/dist/src/commands/daemon.js +1 -0
  1640. package/dist/src/commands/daemon.test.d.ts +1 -0
  1641. package/dist/src/completion-fast.d.ts +22 -0
  1642. package/dist/src/completion-fast.js +1 -0
  1643. package/dist/src/completion-shared.d.ts +13 -0
  1644. package/dist/src/completion-shared.js +30 -0
  1645. package/dist/src/completion.d.ts +21 -0
  1646. package/dist/src/completion.js +1 -0
  1647. package/dist/src/completion.test.d.ts +1 -0
  1648. package/dist/src/constants.d.ts +22 -0
  1649. package/dist/src/constants.js +1 -0
  1650. package/dist/src/convention-audit.d.ts +50 -0
  1651. package/dist/src/convention-audit.js +2 -0
  1652. package/dist/src/convention-audit.test.d.ts +1 -0
  1653. package/dist/src/daemon-utils.d.ts +18 -0
  1654. package/dist/src/daemon-utils.js +1 -0
  1655. package/dist/src/daemon.d.ts +22 -0
  1656. package/dist/src/daemon.js +1 -0
  1657. package/dist/src/daemon.test.d.ts +1 -0
  1658. package/dist/src/discovery.d.ts +43 -0
  1659. package/dist/src/discovery.js +2 -0
  1660. package/dist/src/doctor.d.ts +38 -0
  1661. package/dist/src/doctor.js +13 -0
  1662. package/dist/src/doctor.test.d.ts +1 -0
  1663. package/dist/src/download/article-download.d.ts +72 -0
  1664. package/dist/src/download/article-download.js +21 -0
  1665. package/dist/src/download/article-download.test.d.ts +1 -0
  1666. package/dist/src/download/index.d.ts +71 -0
  1667. package/dist/src/download/index.js +7 -0
  1668. package/dist/src/download/index.test.d.ts +1 -0
  1669. package/dist/src/download/media-download.d.ts +49 -0
  1670. package/dist/src/download/media-download.js +1 -0
  1671. package/dist/src/download/media-download.test.d.ts +1 -0
  1672. package/dist/src/download/progress.d.ts +36 -0
  1673. package/dist/src/download/progress.js +5 -0
  1674. package/dist/src/download/progress.test.d.ts +1 -0
  1675. package/dist/src/electron-apps.d.ts +31 -0
  1676. package/dist/src/electron-apps.js +1 -0
  1677. package/dist/src/electron-apps.test.d.ts +1 -0
  1678. package/dist/src/engine.test.d.ts +1 -0
  1679. package/dist/src/errors.d.ts +117 -0
  1680. package/dist/src/errors.js +2 -0
  1681. package/dist/src/errors.test.d.ts +1 -0
  1682. package/dist/src/execution.d.ts +24 -0
  1683. package/dist/src/execution.js +2 -0
  1684. package/dist/src/execution.test.d.ts +1 -0
  1685. package/dist/src/extension-manifest-regression.test.d.ts +1 -0
  1686. package/dist/src/external-clis.yaml +109 -0
  1687. package/dist/src/external.d.ts +49 -0
  1688. package/dist/src/external.js +1 -0
  1689. package/dist/src/external.test.d.ts +1 -0
  1690. package/dist/src/help.d.ts +88 -0
  1691. package/dist/src/help.js +8 -0
  1692. package/dist/src/help.test.d.ts +1 -0
  1693. package/dist/src/hooks.d.ts +46 -0
  1694. package/dist/src/hooks.js +1 -0
  1695. package/dist/src/hooks.test.d.ts +4 -0
  1696. package/dist/src/interceptor.d.ts +44 -0
  1697. package/dist/src/interceptor.js +123 -0
  1698. package/dist/src/interceptor.test.d.ts +4 -0
  1699. package/dist/src/launcher.d.ts +41 -0
  1700. package/dist/src/launcher.js +7 -0
  1701. package/dist/src/launcher.test.d.ts +1 -0
  1702. package/dist/src/logger.d.ts +26 -0
  1703. package/dist/src/logger.js +9 -0
  1704. package/dist/src/main.d.ts +5 -0
  1705. package/dist/src/main.js +10 -0
  1706. package/dist/src/manifest-types.d.ts +43 -0
  1707. package/dist/src/manifest-types.js +1 -0
  1708. package/dist/src/node-network.d.ts +10 -0
  1709. package/dist/src/node-network.js +1 -0
  1710. package/dist/src/node-network.test.d.ts +1 -0
  1711. package/dist/src/observation/artifact.d.ts +16 -0
  1712. package/dist/src/observation/artifact.js +8 -0
  1713. package/dist/src/observation/artifact.test.d.ts +1 -0
  1714. package/dist/src/observation/events.d.ts +89 -0
  1715. package/dist/src/observation/events.js +1 -0
  1716. package/dist/src/observation/index.d.ts +7 -0
  1717. package/dist/src/observation/index.js +1 -0
  1718. package/dist/src/observation/manager.d.ts +9 -0
  1719. package/dist/src/observation/manager.js +1 -0
  1720. package/dist/src/observation/manager.test.d.ts +1 -0
  1721. package/dist/src/observation/redaction.d.ts +11 -0
  1722. package/dist/src/observation/redaction.js +2 -0
  1723. package/dist/src/observation/redaction.test.d.ts +1 -0
  1724. package/dist/src/observation/retention.d.ts +32 -0
  1725. package/dist/src/observation/retention.js +1 -0
  1726. package/dist/src/observation/retention.test.d.ts +1 -0
  1727. package/dist/src/observation/ring-buffer.d.ts +22 -0
  1728. package/dist/src/observation/ring-buffer.js +1 -0
  1729. package/dist/src/observation/ring-buffer.test.d.ts +1 -0
  1730. package/dist/src/observation/session.d.ts +25 -0
  1731. package/dist/src/observation/session.js +1 -0
  1732. package/dist/src/output.d.ts +14 -0
  1733. package/dist/src/output.js +2 -0
  1734. package/dist/src/output.test.d.ts +1 -0
  1735. package/dist/src/package-exports.test.d.ts +1 -0
  1736. package/dist/src/package-paths.d.ts +8 -0
  1737. package/dist/src/package-paths.js +1 -0
  1738. package/dist/src/pipeline/executor.d.ts +11 -0
  1739. package/dist/src/pipeline/executor.js +1 -0
  1740. package/dist/src/pipeline/executor.test.d.ts +4 -0
  1741. package/dist/src/pipeline/index.d.ts +5 -0
  1742. package/dist/src/pipeline/index.js +1 -0
  1743. package/dist/src/pipeline/registry.d.ts +28 -0
  1744. package/dist/src/pipeline/registry.js +1 -0
  1745. package/dist/src/pipeline/steps/browser.d.ts +13 -0
  1746. package/dist/src/pipeline/steps/browser.js +1 -0
  1747. package/dist/src/pipeline/steps/download.d.ts +18 -0
  1748. package/dist/src/pipeline/steps/download.js +1 -0
  1749. package/dist/src/pipeline/steps/download.test.d.ts +1 -0
  1750. package/dist/src/pipeline/steps/fetch.d.ts +5 -0
  1751. package/dist/src/pipeline/steps/fetch.js +31 -0
  1752. package/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
  1753. package/dist/src/pipeline/steps/intercept.d.ts +5 -0
  1754. package/dist/src/pipeline/steps/intercept.js +1 -0
  1755. package/dist/src/pipeline/steps/tap.d.ts +12 -0
  1756. package/dist/src/pipeline/steps/tap.js +53 -0
  1757. package/dist/src/pipeline/steps/transform.d.ts +9 -0
  1758. package/dist/src/pipeline/steps/transform.js +1 -0
  1759. package/dist/src/pipeline/template.d.ts +17 -0
  1760. package/dist/src/pipeline/template.js +1 -0
  1761. package/dist/src/pipeline/template.test.d.ts +4 -0
  1762. package/dist/src/pipeline/transform.test.d.ts +4 -0
  1763. package/dist/src/plugin-manifest.d.ts +70 -0
  1764. package/dist/src/plugin-manifest.js +1 -0
  1765. package/dist/src/plugin-manifest.test.d.ts +4 -0
  1766. package/dist/src/plugin-scaffold.d.ts +28 -0
  1767. package/dist/src/plugin-scaffold.js +75 -0
  1768. package/dist/src/plugin-scaffold.test.d.ts +4 -0
  1769. package/dist/src/plugin.d.ts +145 -0
  1770. package/dist/src/plugin.js +20 -0
  1771. package/dist/src/plugin.test.d.ts +4 -0
  1772. package/dist/src/rate-limit.d.ts +15 -0
  1773. package/dist/src/rate-limit.js +2 -0
  1774. package/dist/src/rate-limit.test.d.ts +1 -0
  1775. package/dist/src/registry-api.d.ts +13 -0
  1776. package/dist/src/registry-api.js +1 -0
  1777. package/dist/src/registry.d.ts +130 -0
  1778. package/dist/src/registry.js +1 -0
  1779. package/dist/src/registry.test.d.ts +4 -0
  1780. package/dist/src/runtime-detect.d.ts +31 -0
  1781. package/dist/src/runtime-detect.js +1 -0
  1782. package/dist/src/runtime-detect.test.d.ts +1 -0
  1783. package/dist/src/runtime.d.ts +57 -0
  1784. package/dist/src/runtime.js +1 -0
  1785. package/dist/src/scripts/framework.d.ts +7 -0
  1786. package/dist/src/scripts/framework.js +1 -0
  1787. package/dist/src/scripts/interact.d.ts +4 -0
  1788. package/dist/src/scripts/interact.js +1 -0
  1789. package/dist/src/scripts/store.d.ts +13 -0
  1790. package/dist/src/scripts/store.js +1 -0
  1791. package/dist/src/serialization.d.ts +42 -0
  1792. package/dist/src/serialization.js +4 -0
  1793. package/dist/src/serialization.test.d.ts +1 -0
  1794. package/dist/src/skills.d.ts +14 -0
  1795. package/dist/src/skills.js +6 -0
  1796. package/dist/src/skills.test.d.ts +1 -0
  1797. package/dist/src/snapshotFormatter.d.ts +11 -0
  1798. package/dist/src/snapshotFormatter.js +3 -0
  1799. package/dist/src/snapshotFormatter.test.d.ts +7 -0
  1800. package/dist/src/tui.d.ts +28 -0
  1801. package/dist/src/tui.js +16 -0
  1802. package/dist/src/tui.test.d.ts +1 -0
  1803. package/dist/src/types.d.ts +236 -0
  1804. package/dist/src/types.js +1 -0
  1805. package/dist/src/utils.d.ts +57 -0
  1806. package/dist/src/utils.js +38 -0
  1807. package/dist/src/utils.test.d.ts +1 -0
  1808. package/dist/src/validate.d.ts +21 -0
  1809. package/dist/src/validate.js +3 -0
  1810. package/dist/src/validate.test.d.ts +9 -0
  1811. package/dist/src/verify.d.ts +27 -0
  1812. package/dist/src/verify.js +2 -0
  1813. package/dist/src/verify.test.d.ts +8 -0
  1814. package/dist/src/version.d.ts +4 -0
  1815. package/dist/src/version.js +1 -0
  1816. package/dist/src/weixin-download.test.d.ts +1 -0
  1817. package/docs/guide/browser-bridge.md +94 -0
  1818. package/docs/guide/electron-app-cli.md +199 -0
  1819. package/docs/guide/exit-codes.md +24 -0
  1820. package/docs/guide/extending-opencli.md +134 -0
  1821. package/docs/guide/getting-started.md +81 -0
  1822. package/docs/guide/installation.md +52 -0
  1823. package/docs/guide/plugins.md +226 -0
  1824. package/docs/guide/remote-orchestration.md +116 -0
  1825. package/docs/guide/troubleshooting.md +69 -0
  1826. package/package.json +116 -0
  1827. package/scripts/check-doc-coverage.sh +81 -0
  1828. package/scripts/check-listing-id-pairing.mjs +193 -0
  1829. package/scripts/check-silent-column-drop.mjs +105 -0
  1830. package/scripts/check-typed-error-lint.mjs +118 -0
  1831. package/scripts/clean-dist.cjs +13 -0
  1832. package/scripts/copy-yaml.cjs +12 -0
  1833. package/scripts/fetch-adapters.js +293 -0
  1834. package/scripts/minify-release.mjs +115 -0
  1835. package/scripts/postinstall.js +174 -0
  1836. package/scripts/silent-column-drop-baseline.json +910 -0
  1837. package/scripts/typed-error-lint-baseline.json +1098 -0
  1838. package/skills/opencli-adapter-author/SKILL.md +256 -0
  1839. package/skills/opencli-adapter-author/references/adapter-template.md +471 -0
  1840. package/skills/opencli-adapter-author/references/api-discovery.md +295 -0
  1841. package/skills/opencli-adapter-author/references/coverage-matrix.md +81 -0
  1842. package/skills/opencli-adapter-author/references/field-conventions.md +172 -0
  1843. package/skills/opencli-adapter-author/references/field-decode-playbook.md +181 -0
  1844. package/skills/opencli-adapter-author/references/jsdom-fixture-pattern.md +196 -0
  1845. package/skills/opencli-adapter-author/references/output-design.md +149 -0
  1846. package/skills/opencli-adapter-author/references/site-memory/bilibili.md +70 -0
  1847. package/skills/opencli-adapter-author/references/site-memory/eastmoney.md +70 -0
  1848. package/skills/opencli-adapter-author/references/site-memory/tonghuashun.md +51 -0
  1849. package/skills/opencli-adapter-author/references/site-memory/xueqiu.md +58 -0
  1850. package/skills/opencli-adapter-author/references/site-memory.md +231 -0
  1851. package/skills/opencli-adapter-author/references/site-recon.md +134 -0
  1852. package/skills/opencli-adapter-author/references/strategy-selection.md +169 -0
  1853. package/skills/opencli-adapter-author/references/success-rate-pitfalls.md +162 -0
  1854. package/skills/opencli-adapter-author/references/typed-errors.md +234 -0
  1855. package/skills/opencli-autofix/SKILL.md +297 -0
  1856. package/skills/opencli-browser/SKILL.md +468 -0
  1857. package/skills/opencli-browser-sitemap/SKILL.md +96 -0
  1858. package/skills/opencli-sitemap-author/SKILL.md +161 -0
  1859. package/skills/opencli-sitemap-author/references/sitemap-schema.md +660 -0
  1860. package/skills/opencli-usage/SKILL.md +168 -0
@@ -0,0 +1,34 @@
1
+ import $ from"node:fs";import D from"node:path";import{cli as X,Strategy as Y}from"@jackwener/opencli/registry";import{ArgumentError as z}from"@jackwener/opencli/errors";import{authHeadersFragment as I,channelResolveFragment as P}from"./in-page.js";import{dispatchEvaluateResult as R}from"./errors.js";import{SLOCK_SITE as T,SLOCK_DOMAIN as y,SLOCK_HOME_URL as B,SLOCK_API_BASE as C}from"./shared.js";const N=52428800;X({site:T,name:"attachment-upload",access:"write",description:"Upload a local file to Slock attachments. Prints the attachmentId for use with `message-send --attach`.",domain:y,strategy:Y.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"file",positional:!0,required:!0,help:"Local file path to upload (single file; max 50 MB)"},{name:"channel",positional:!0,required:!0,help:"channelId UUID or #name — server requires the attachment be scoped to a channel"},{name:"server",help:"Override active server slug"}],columns:["attachmentId","filename","mimeType","sizeBytes"],func:async(Q,J)=>{const V=String(J.file??"").trim();if(!V)throw new z("file path required");const Z=String(J.channel??"").trim();if(!Z)throw new z("channel required (UUID or #name); server rejects uploads without channelId");const x=D.resolve(V);let G;try{G=$.statSync(x)}catch(q){throw new z(`file not readable: ${x} (${q.message})`)}if(!G.isFile())throw new z(`not a regular file: ${x}`);if(G.size===0)throw new z(`file is empty: ${x}`);if(G.size>N)throw new z(`file is ${G.size} bytes, exceeds server limit ${N} (50 MiB). Split or compress before upload.`);const U=$.readFileSync(x),W=D.basename(x),v=U.toString("base64");await Q.goto(B);const F=`
2
+ ${I({serverScoped:!0,serverIdOverride:J.server})}
3
+ ${P(Z)}
4
+ // multipart wants the browser to set its own boundary — strip content-type.
5
+ const uploadHeaders = { authorization: headers.authorization, accept: headers.accept };
6
+ if (headers['x-server-id']) uploadHeaders['x-server-id'] = headers['x-server-id'];
7
+ // Rebuild File from base64 → Uint8Array → Blob → File. The base64 string
8
+ // is the only path across the page boundary; JSON.stringify it (caller did)
9
+ // so injection isn't possible.
10
+ const b64 = ${JSON.stringify(v)};
11
+ const bin = atob(b64);
12
+ const u8 = new Uint8Array(bin.length);
13
+ for (let i = 0; i < bin.length; i++) u8[i] = bin.charCodeAt(i);
14
+ const blob = new Blob([u8]);
15
+ const file = new File([blob], ${JSON.stringify(W)});
16
+ const fd = new FormData();
17
+ fd.append('files', file);
18
+ // qatester live-verified F4: server returns 400 "channelId is required"
19
+ // without this field. Must travel as a multipart text part.
20
+ fd.append('channelId', channelId);
21
+ const res = await fetch('${C}/attachments/upload', {
22
+ method: 'POST', credentials: 'include', headers: uploadHeaders, body: fd,
23
+ });
24
+ if (res.status === 401) return { kind: 'auth', detail: '/attachments/upload returned 401' };
25
+ if (res.status === 413) {
26
+ const j = await res.json().catch(() => ({}));
27
+ return { kind: 'http', status: 413, where: '/attachments/upload (file too large; maxBytes=' + (j.maxBytes ?? '?') + ')' };
28
+ }
29
+ if (!res.ok) return { kind: 'http', status: res.status, where: '/attachments/upload' };
30
+ const data = await res.json().catch(() => ({}));
31
+ const list = Array.isArray(data.attachments) ? data.attachments : [];
32
+ if (!list.length) return { kind: 'http', status: 200, where: '/attachments/upload (no attachments in response)' };
33
+ return { kind: 'ok', rows: list };
34
+ `,H=await Q.evaluate(`(async () => { ${F} })()`);return R(H).map((q)=>({attachmentId:q.id??q.attachmentId??null,filename:q.filename??q.name??null,mimeType:q.mimeType??q.contentType??null,sizeBytes:typeof q.sizeBytes==="number"?q.sizeBytes:q.size??null}))}});
@@ -0,0 +1 @@
1
+ import{cli as i,Strategy as u}from"@jackwener/opencli/registry";import{ArgumentError as c,CommandExecutionError as d}from"@jackwener/opencli/errors";import{buildFetchSnippet as m}from"./in-page.js";import{dispatchEvaluateResult as l}from"./errors.js";import{SLOCK_SITE as h,SLOCK_DOMAIN as p,SLOCK_HOME_URL as f}from"./shared.js";import{UUID_RE as v}from"./resolve.js";i({site:h,name:"attachment-url",access:"read",description:"Get a short-lived signed CDN URL for an attachment (does not download bytes).",domain:p,strategy:u.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"attachmentId",positional:!0,required:!0,help:"Attachment UUID"},{name:"server",help:"Override active server slug"}],columns:["attachmentId","url","expiresAt"],func:async(a,s)=>{const t=String(s.attachmentId??"").trim();if(!v.test(t))throw new c(`attachmentId "${t}" is not a UUID`);await a.goto(f);const n=m({method:"GET",path:`/attachments/${encodeURIComponent(t)}/url`,serverScoped:!0,serverIdOverride:s.server}),o=await a.evaluate(`(async () => { ${n} })()`),e=l(o),r=Array.isArray(e)?e[0]:e;if(!r?.url)throw new d(`no signed url returned for attachment ${t}`);return[{attachmentId:t,url:r?.url??null,expiresAt:r?.expiresAt??null}]}});
@@ -0,0 +1 @@
1
+ import{AuthRequiredError as P,CommandExecutionError as Q}from"@jackwener/opencli/errors";import{buildFetchSnippet as T}from"./in-page.js";import{SLOCK_DOMAIN as V,SLOCK_HOME_URL as W}from"./shared.js";export async function verifySlockSession(G){await G.goto(W);const J=T({method:"GET",path:"/auth/me",serverScoped:!1}),z=await G.evaluate(`(async () => { ${J} })()`);if(z&&z.kind==="auth")throw new P(V,z.detail);if(!z||z.kind!=="ok")throw new Q(`unexpected /auth/me result: ${JSON.stringify(z)}`);const B=z.rows??{};return{id:B.id??null,name:B.name??B.displayName??B.username??null,email:B.email??null}}
@@ -0,0 +1,11 @@
1
+ import{cli as d,Strategy as i}from"@jackwener/opencli/registry";import{ArgumentError as n}from"@jackwener/opencli/errors";import{authHeadersFragment as m}from"./in-page.js";import{dispatchEvaluateResult as c}from"./errors.js";import{SLOCK_SITE as u,SLOCK_DOMAIN as h,SLOCK_HOME_URL as g,SLOCK_API_BASE as l}from"./shared.js";import{assertMessageIdShape as p}from"./resolve.js";d({site:u,name:"bookmark-add",access:"write",description:"Bookmark a message (POST /channels/saved). Requires full messageId UUID.",domain:h,strategy:i.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"messageId",positional:!0,required:!0,help:"Full messageId UUID (short ids rejected)"},{name:"server",help:"Override active server"}],columns:["messageId","saved"],func:async(r,t)=>{let e;try{e=p(String(t.messageId??""))}catch(s){throw new n(s.message)}await r.goto(g);const a=`
2
+ ${m({serverScoped:!0,serverIdOverride:t.server})}
3
+ const res = await fetch('${l}/channels/saved', { method:'POST', credentials:'include', headers, body: JSON.stringify({ messageId: ${JSON.stringify(e)} }) });
4
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where:'/channels/saved' };
5
+ const data = await res.json().catch(() => ({}));
6
+ // F3-a — qatester live dump: response is { ok: true } with NO id field.
7
+ // The bookmark is keyed by messageId on the server side, so there is no
8
+ // separate bookmark id to surface; we report saved=true and echo the
9
+ // message id back.
10
+ return { kind: 'ok', rows: [{ saved: data && data.ok === true, messageId: ${JSON.stringify(e)} }] };
11
+ `,o=await r.evaluate(`(async () => { ${a} })()`);return c(o).map((s)=>({messageId:s.messageId??e,saved:s.saved===!0}))}});
@@ -0,0 +1,10 @@
1
+ import{cli as d,Strategy as m}from"@jackwener/opencli/registry";import{CommandExecutionError as c}from"@jackwener/opencli/errors";import{authHeadersFragment as f}from"./in-page.js";import{dispatchEvaluateResult as l}from"./errors.js";import{SLOCK_SITE as p,SLOCK_DOMAIN as u,SLOCK_HOME_URL as v,SLOCK_API_BASE as h}from"./shared.js";import{parseNonNegativeInteger as y,parsePositiveInteger as g}from"./resolve.js";d({site:p,name:"bookmark-list",access:"read",description:"List bookmarks (saved messages) in the active server",domain:u,strategy:m.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"limit",type:"int",default:50,help:"Max results"},{name:"offset",type:"int",default:0,help:"Offset"},{name:"server",help:"Override active server"}],columns:["id","messageId","content","savedAt"],func:async(r,t)=>{const s=g(t.limit,"--limit",{defaultValue:50}),o=y(t.offset,"--offset",{defaultValue:0});await r.goto(v);const i=`
2
+ ${f({serverScoped:!0,serverIdOverride:t.server})}
3
+ const res = await fetch('${h}/channels/saved?limit=' + encodeURIComponent(${JSON.stringify(s)}) + '&offset=' + encodeURIComponent(${JSON.stringify(o)}), { credentials:'include', headers });
4
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where:'/channels/saved' };
5
+ const data = await res.json();
6
+ // F3-b — qatester live dump: shape is { saved: [...], hasMore }.
7
+ // Unwrap .saved first; fall back to legacy .bookmarks / .data /
8
+ // bare array for forward-compat.
9
+ return { kind: 'ok', rows: Array.isArray(data) ? data : (data.saved || data.bookmarks || data.data || []) };
10
+ `,n=await r.evaluate(`(async () => { ${i} })()`),a=l(n);if(!Array.isArray(a))throw new c(`expected array of rows from server, got ${typeof a} (contract drift?)`);return a.map((e)=>({id:e.id??"",messageId:e.messageId??"",content:e.content??e.message?.content??"",savedAt:e.savedAt??e.createdAt??""}))}});
@@ -0,0 +1,7 @@
1
+ import{cli as n,Strategy as i}from"@jackwener/opencli/registry";import{ArgumentError as d}from"@jackwener/opencli/errors";import{authHeadersFragment as m}from"./in-page.js";import{dispatchEvaluateResult as u}from"./errors.js";import{SLOCK_SITE as c,SLOCK_DOMAIN as v,SLOCK_HOME_URL as p,SLOCK_API_BASE as h}from"./shared.js";import{assertMessageIdShape as l}from"./resolve.js";n({site:c,name:"bookmark-remove",access:"write",description:"Remove a bookmark (DELETE /channels/saved/:messageId). 404 is treated as already-removed.",domain:v,strategy:i.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"messageId",positional:!0,required:!0,help:"Full messageId UUID"},{name:"server",help:"Override active server"}],columns:["messageId","removed","note"],func:async(t,s)=>{let e;try{e=l(String(s.messageId??""))}catch(o){throw new d(o.message)}await t.goto(p);const a=`
2
+ ${m({serverScoped:!0,serverIdOverride:s.server})}
3
+ const res = await fetch('${h}/channels/saved/' + encodeURIComponent(${JSON.stringify(e)}), { method:'DELETE', credentials:'include', headers });
4
+ if (res.status === 404) return { kind: 'http', status: 404, where:'/channels/saved/:id' };
5
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where:'/channels/saved/:id' };
6
+ return { kind: 'ok', rows: [{ removed: true }] };
7
+ `,r=await t.evaluate(`(async () => { ${a} })()`);if(r&&r.kind==="http"&&r.status===404)return[{messageId:e,removed:!0,note:"idempotent (already absent)"}];return u(r).map(()=>({messageId:e,removed:!0,note:""}))}});
@@ -0,0 +1 @@
1
+ import{cli as Y,Strategy as Z}from"@jackwener/opencli/registry";import{ArgumentError as z}from"@jackwener/opencli/errors";import{buildChannelScopedSnippet as $}from"./in-page.js";import{dispatchEvaluateResult as D}from"./errors.js";import{SLOCK_SITE as N,SLOCK_DOMAIN as T,SLOCK_HOME_URL as U}from"./shared.js";export function makeChannelActionCommand({name:G,verb:J,resultLabel:P,description:Q,archivedHint:V=!1}){Y({site:N,name:G,access:"write",description:Q,domain:T,strategy:Z.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"channel",positional:!0,required:!0,help:"channelId UUID or #name"},{name:"server",help:"Override active server"}],columns:["channel","id","archivedAt","result"],func:async(B,F)=>{const q=String(F.channel??"").trim();if(!q)throw new z("channel required");await B.goto(U);const W=$({channelInput:q,method:"POST",pathSuffix:`/${J}`,serverIdOverride:F.server}),X=await B.evaluate(`(async () => { ${W} })()`);let x;try{x=D(X)}catch(f){if(V&&f instanceof z&&/no channel matches/.test(f.message))throw new z(`${f.message}. Archived channels are excluded from the name lookup; pass the channelId UUID instead (find it in the archived channel's URL in the Slock app).`);throw f}return[{channel:q,id:x?.id??"",archivedAt:x?.archivedAt??null,result:P}]}})}
@@ -0,0 +1 @@
1
+ import{makeChannelActionCommand as e}from"./channel-action.js";e({name:"channel-archive",verb:"archive",resultLabel:"archived",description:"Archive a channel — admin only (POST /channels/:id/archive)"});
@@ -0,0 +1 @@
1
+ import{cli as W,Strategy as X}from"@jackwener/opencli/registry";import{ArgumentError as J}from"@jackwener/opencli/errors";import{buildFetchSnippet as Y}from"./in-page.js";import{dispatchEvaluateResult as Z}from"./errors.js";import{SLOCK_SITE as $,SLOCK_DOMAIN as v,SLOCK_HOME_URL as D}from"./shared.js";W({site:$,name:"channel-create",access:"write",description:"Create a channel — admin only (POST /channels/). Public unless --private.",domain:v,strategy:X.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"name",positional:!0,required:!0,help:"Channel name"},{name:"description",help:"Channel description / topic (≤500 chars)"},{name:"private",type:"bool",default:!1,help:"Create a private channel instead of public"},{name:"server",help:"Override active server"}],columns:["id","name","type","result"],func:async(B,f)=>{const x=String(f.name??"").trim();if(!x)throw new J("name required");const q=f.description!==void 0?String(f.description):void 0;if(q!==void 0&&q.length>500)throw new J("--description must be at most 500 characters");const G={name:x,visibility:f.private?"private":"public"};if(q!==void 0)G.description=q;await B.goto(D);const Q=Y({method:"POST",path:"/channels/",body:G,serverScoped:!0,serverIdOverride:f.server}),V=await B.evaluate(`(async () => { ${Q} })()`),z=Z(V);return[{id:z?.id??"",name:z?.name??x,type:z?.type??"",result:"created"}]}});
@@ -0,0 +1 @@
1
+ import{cli as o,Strategy as c}from"@jackwener/opencli/registry";import{ArgumentError as d,CommandExecutionError as p}from"@jackwener/opencli/errors";import{buildChannelScopedSnippet as u}from"./in-page.js";import{dispatchEvaluateResult as f}from"./errors.js";import{SLOCK_SITE as h,SLOCK_DOMAIN as y,SLOCK_HOME_URL as I}from"./shared.js";import{parsePositiveInteger as v}from"./resolve.js";o({site:h,name:"channel-files",access:"read",description:"List files shared in a channel (GET /channels/:id/files)",domain:y,strategy:c.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"channel",positional:!0,required:!0,help:"channelId UUID or #name"},{name:"limit",type:"int",default:50,help:"Max files"},{name:"server",help:"Override active server"}],columns:["id","filename","mimeType","sizeBytes","messageId","createdAt"],func:async(n,t)=>{const a=String(t.channel??"").trim();if(!a)throw new d("channel required");const s=v(t.limit,"--limit",{defaultValue:50});await n.goto(I);const l=u({channelInput:a,method:"GET",pathSuffix:"/files",query:`?limit=${s}`,serverIdOverride:t.server}),m=await n.evaluate(`(async () => { ${l} })()`),i=f(m),r=Array.isArray(i)?i:i.files||[];if(!Array.isArray(r))throw new p(`expected files array, got ${typeof r} (contract drift?)`);return r.map((e)=>({id:e.id??"",filename:e.filename??"",mimeType:e.mimeType??"",sizeBytes:typeof e.sizeBytes==="number"?e.sizeBytes:null,messageId:e.messageId??"",createdAt:e.createdAt??""}))}});
@@ -0,0 +1 @@
1
+ import{cli as o,Strategy as c}from"@jackwener/opencli/registry";import{ArgumentError as s}from"@jackwener/opencli/errors";import{buildChannelScopedSnippet as l}from"./in-page.js";import{dispatchEvaluateResult as d}from"./errors.js";import{SLOCK_SITE as p,SLOCK_DOMAIN as m,SLOCK_HOME_URL as h}from"./shared.js";o({site:p,name:"channel-info",access:"read",description:"Show one channel's details (GET /channels/:id)",domain:m,strategy:c.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"channel",positional:!0,required:!0,help:"channelId UUID or #name"},{name:"server",help:"Override active server"}],columns:["id","name","type","topic","joined","archivedAt"],func:async(n,r)=>{const t=String(r.channel??"").trim();if(!t)throw new s("channel required");await n.goto(h);const i=l({channelInput:t,method:"GET",serverIdOverride:r.server}),a=await n.evaluate(`(async () => { ${i} })()`),e=d(a)||{};return[{id:e.id??"",name:e.name??e.slug??"",type:e.type??"",topic:e.topic??e.description??"",joined:e.joined??null,archivedAt:e.archivedAt??null}]}});
@@ -0,0 +1 @@
1
+ import{makeChannelActionCommand as n}from"./channel-action.js";n({name:"channel-join",verb:"join",resultLabel:"joined",description:"Join a public channel (POST /channels/:id/join)"});
@@ -0,0 +1 @@
1
+ import{makeChannelActionCommand as e}from"./channel-action.js";e({name:"channel-leave",verb:"leave",resultLabel:"left",description:"Leave a channel (POST /channels/:id/leave)"});
@@ -0,0 +1 @@
1
+ import{cli as a,Strategy as n}from"@jackwener/opencli/registry";import{CommandExecutionError as c}from"@jackwener/opencli/errors";import{buildFetchSnippet as m}from"./in-page.js";import{dispatchEvaluateResult as p}from"./errors.js";import{SLOCK_SITE as l,SLOCK_DOMAIN as d,SLOCK_HOME_URL as u}from"./shared.js";a({site:l,name:"channel-list",access:"read",description:"List channels in the active slock server",domain:d,strategy:n.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"server",help:"Override active server (slug or id) for this call"}],columns:["id","name","topic"],func:async(t,s)=>{await t.goto(u);const i=m({method:"GET",path:"/channels/",serverScoped:!0,serverIdOverride:s.server}),o=await t.evaluate(`(async () => { ${i} })()`),r=p(o);if(!Array.isArray(r))throw new c(`expected array of rows from server, got ${typeof r} (contract drift?)`);return r.map((e)=>({id:e.id??"",name:e.name??e.slug??"",topic:e.topic??""}))}});
@@ -0,0 +1 @@
1
+ import{cli as v,Strategy as D}from"@jackwener/opencli/registry";import{ArgumentError as V}from"@jackwener/opencli/errors";import{buildChannelScopedSnippet as H}from"./in-page.js";import{dispatchEvaluateResult as N}from"./errors.js";import{SLOCK_SITE as P,SLOCK_DOMAIN as U,SLOCK_HOME_URL as I}from"./shared.js";v({site:P,name:"channel-mark",access:"write",description:"Mark a channel read (default), read up to --seq, or --unread.",domain:U,strategy:D.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"channel",positional:!0,required:!0,help:"channelId UUID or #name"},{name:"seq",type:"int",help:"Mark read up to this seq (omit for read-all)"},{name:"unread",type:"bool",default:!1,help:"Mark the channel unread instead of read"},{name:"server",help:"Override active server"}],columns:["channel","action","result"],func:async(W,z)=>{const Q=String(z.channel??"").trim();if(!Q)throw new V("channel required");const X=z.seq!==void 0&&z.seq!==null&&z.seq!=="";if(z.unread&&X)throw new V("--unread and --seq are mutually exclusive");let B,Y,F;if(z.unread){B="/unread";F="unread"}else if(X){const J=Number(z.seq);if(!Number.isInteger(J)||J<=0)throw new V(`--seq must be a positive integer (got "${z.seq}")`);B="/read";Y={seq:J};F=`read-to-${J}`}else{B="/read-all";F="read-all"}await W.goto(I);const Z=H({channelInput:Q,method:"POST",pathSuffix:B,body:Y,serverIdOverride:z.server}),$=await W.evaluate(`(async () => { ${Z} })()`),G=N($);return[{channel:Q,action:F,result:G?.seq!==void 0?`seq=${G.seq}`:G?.unreadCount!==void 0?`unreadCount=${G.unreadCount}`:"ok"}]}});
@@ -0,0 +1 @@
1
+ import{cli as V,Strategy as W}from"@jackwener/opencli/registry";import{ArgumentError as X}from"@jackwener/opencli/errors";import{buildChannelScopedSnippet as Y}from"./in-page.js";import{dispatchEvaluateResult as Z}from"./errors.js";import{SLOCK_SITE as $,SLOCK_DOMAIN as v,SLOCK_HOME_URL as D}from"./shared.js";V({site:$,name:"channel-members",access:"read",description:"List members of a channel",domain:v,strategy:W.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"channel",positional:!0,required:!0,help:"channelId UUID or #name"},{name:"server",help:"Override active server (slug or id)"}],columns:["userId","name","kind","role"],func:async(F,G)=>{const J=String(G.channel??"").trim();if(!J)throw new X("channel required");await F.goto(D);const P=Y({channelInput:J,method:"GET",pathSuffix:"/members",serverIdOverride:G.server}),Q=await F.evaluate(`(async () => { ${P} })()`),x=Z(Q);let B=[],z=[];if(Array.isArray(x))z=x;else if(x){B=Array.isArray(x.agents)?x.agents:[];z=Array.isArray(x.humans)?x.humans:[];if(!B.length&&!z.length){const q=x.members||x.data||[];z=Array.isArray(q)?q:[]}}return[...z.map((q)=>({userId:q.userId??q.id??"",name:q.name??q.username??q.displayName??"",kind:"human",role:q.role??""})),...B.map((q)=>({userId:q.userId??q.id??"",name:q.name??q.username??q.displayName??"",kind:"agent",role:q.status??q.activity??""}))]}});
@@ -0,0 +1 @@
1
+ import{makeChannelActionCommand as n}from"./channel-action.js";n({name:"channel-unarchive",verb:"unarchive",resultLabel:"unarchived",description:"Unarchive a channel — admin only (POST /channels/:id/unarchive). "+"#name lookups exclude archived channels; pass the channelId UUID for archived ones.",archivedHint:!0});
@@ -0,0 +1 @@
1
+ import{cli as n,Strategy as o}from"@jackwener/opencli/registry";import{CommandExecutionError as d}from"@jackwener/opencli/errors";import{buildFetchSnippet as m}from"./in-page.js";import{dispatchEvaluateResult as p}from"./errors.js";import{SLOCK_SITE as c,SLOCK_DOMAIN as l,SLOCK_HOME_URL as h}from"./shared.js";n({site:c,name:"dm-list",access:"read",description:"List DM channels in the active server (GET /channels/dm)",domain:l,strategy:o.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"server",help:"Override active server (slug or id)"}],columns:["channelId","peerName","peerId","createdAt"],func:async(t,a)=>{await t.goto(h);const s=m({method:"GET",path:"/channels/dm",serverScoped:!0,serverIdOverride:a.server}),i=await t.evaluate(`(async () => { ${s} })()`),r=p(i);if(!Array.isArray(r))throw new d(`expected array of DM channels, got ${typeof r} (contract drift?)`);return r.map((e)=>({channelId:e.id??"",peerName:e.peerDisplayName??e.peerName??e.name??"",peerId:e.peerId??"",createdAt:e.createdAt??""}))}});
@@ -0,0 +1 @@
1
+ import{ArgumentError as z,AuthRequiredError as B,CommandExecutionError as y,ConfigError as F}from"@jackwener/opencli/errors";import{SLOCK_DOMAIN as G}from"./shared.js";export function dispatchEvaluateResult(b){switch(b&&b.kind){case"ok":return b.rows;case"auth":throw new B(G,b.detail);case"http":throw new y(`HTTP ${b.status} from ${b.where}`);case"no-server":throw new F(b.detail,"Run `opencli slock server-use <slug>` to set the active server.");case"unresolvable":throw new z(b.detail);case"no-thread":throw new y(`no-thread should be handled by caller, not dispatcher: ${b.parent}`);default:throw new y(`unexpected evaluate envelope: ${JSON.stringify(b)}`)}}
@@ -0,0 +1,113 @@
1
+ import{UUID_RE as T}from"./resolve.js";import{SLOCK_API_BASE as Q}from"./shared.js";export function authHeadersFragment({serverScoped:k=!1,serverIdOverride:z=null}={}){const G=z?JSON.stringify(z):"null",M="^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",N=k?`
2
+ if (!sid) {
3
+ // Determine the slug to look up: override slug (if not a UUID) wins,
4
+ // otherwise fall back to the active slug from localStorage.
5
+ const __override = ${G};
6
+ const __slug = __override ?? localStorage.getItem('slock_last_server_slug');
7
+ if (!__slug) return { kind: 'no-server', detail: 'no --server override and localStorage.slock_last_server_slug is empty; run \`slock server-use <slug>\` or pass --server <slug>' };
8
+ const sres = await fetch('${Q}/servers/', {
9
+ method: 'GET', credentials: 'include',
10
+ headers: { authorization: 'Bearer ' + token, accept: 'application/json' },
11
+ });
12
+ if (sres.status === 401) return { kind: 'auth', detail: '/servers/ returned 401' };
13
+ if (!sres.ok) return { kind: 'http', status: sres.status, where: '/servers/' };
14
+ const slist = await sres.json();
15
+ const __arr = Array.isArray(slist) ? slist : [];
16
+ const sm = __arr.find((s) => s && s.slug === __slug);
17
+ if (!sm) {
18
+ const __choices = __arr.map((s) => s && s.slug).filter(Boolean).join(', ');
19
+ return { kind: 'no-server', detail: 'slug "' + __slug + '" not in /servers/' + (__override ? ' (--server)' : ' (active)') + '. Known slugs: ' + __choices };
20
+ }
21
+ sid = sm.id;
22
+ }`:"";return`
23
+ // Page-readiness loop: page.goto can return before the SPA's first navigation
24
+ // settles, leaving location on an opaque interstitial (about:blank, redirector,
25
+ // etc.). Reading localStorage there throws SecurityError "Access is denied".
26
+ // Worse, qatester also live-flagged silent-empty fetches when the SPA had
27
+ // navigated to app.slock.ai but had not yet hydrated the token into
28
+ // localStorage — fetches then went out with an empty Authorization and the
29
+ // server happily returned [].
30
+ //
31
+ // The loop polls BOTH: (a) location.href is on app.slock.ai (so localStorage
32
+ // is no longer opaque) and (b) localStorage.slock_access_token is present
33
+ // (so the SPA finished hydrating). Reading localStorage inside try/catch
34
+ // because (a) and (b) can be partially satisfied — reading localStorage on
35
+ // an opaque origin still throws even after a redirect starts.
36
+ //
37
+ // 3s ceiling so a real navigation failure fails loud instead of hanging.
38
+ let __waited = 0;
39
+ let __reason = 'never reached app.slock.ai';
40
+ while (true) {
41
+ let __onHost = false;
42
+ try { __onHost = location.href.indexOf('app.slock.ai') !== -1; } catch (e) {}
43
+ if (__onHost) {
44
+ try {
45
+ if (localStorage.getItem('slock_access_token')) break;
46
+ __reason = 'on app.slock.ai but localStorage.slock_access_token not yet hydrated';
47
+ } catch (e) {
48
+ __reason = 'localStorage access threw even on app.slock.ai: ' + (e && e.message);
49
+ }
50
+ }
51
+ if (__waited >= 3000) {
52
+ let __loc;
53
+ try { __loc = location.href; } catch (e) { __loc = '(unreadable)'; }
54
+ return { kind: 'http', status: 0, where: 'page-readiness timeout: waited 3000ms (' + __reason + '), location=' + __loc };
55
+ }
56
+ await new Promise((r) => setTimeout(r, 50));
57
+ __waited += 50;
58
+ }
59
+ const token = localStorage.getItem('slock_access_token');
60
+ if (!token) return { kind: 'auth', detail: 'no access token in localStorage' };
61
+ let sid = ${!!z&&new RegExp(M).test(String(z))?G:"null"};${N}
62
+ const headers = {
63
+ authorization: 'Bearer ' + token,
64
+ accept: 'application/json',
65
+ 'content-type': 'application/json',
66
+ };
67
+ if (sid) headers['x-server-id'] = sid;
68
+ `}export function channelResolveFragment(k){const z=String(k??""),G=T.test(z),M=JSON.stringify(z),N=JSON.stringify(z.replace(/^#/,"").toLowerCase());return`
69
+ let channelId;
70
+ if (${G}) {
71
+ channelId = ${M};
72
+ } else {
73
+ const cres = await fetch('${Q}/channels/', { credentials: 'include', headers });
74
+ if (cres.status === 401) return { kind: 'auth', detail: '/channels/ returned 401' };
75
+ if (!cres.ok) return { kind: 'http', status: cres.status, where: '/channels/' };
76
+ const carr = await cres.json();
77
+ const clist = Array.isArray(carr) ? carr : (carr.channels || carr.data || []);
78
+ const chit = clist.find((c) => (c.name || c.slug || '').toLowerCase() === ${N});
79
+ if (!chit) return { kind: 'unresolvable', detail: 'no channel matches ' + ${N} };
80
+ channelId = chit.id;
81
+ }
82
+ `}export function resolveShortIdFragment({shortIdVar:k,parentChannelIdVar:z,contextDescription:G="''"}){return`
83
+ if (!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(${k})) {
84
+ const cx = await fetch('${Q}/messages/context/' + encodeURIComponent(${k}) + '?channelId=' + encodeURIComponent(${z}), { credentials:'include', headers });
85
+ if (cx.status === 404) {
86
+ const __ctx = ${G};
87
+ return { kind: 'unresolvable', detail: 'short id "' + ${k} + '" not found' + (__ctx ? ' in #' + __ctx : '') };
88
+ }
89
+ if (!cx.ok) return { kind: cx.status===401?'auth':'http', status: cx.status, where:'/messages/context' };
90
+ const cxd = await cx.json();
91
+ // CRITICAL — read targetMessageId, NOT m.message.id (Phase 7.1).
92
+ ${k} = cxd.targetMessageId;
93
+ }
94
+ `}export function buildFetchSnippet(k){const z=JSON.stringify(k.method),G=JSON.stringify(Q+k.path),M=k.body===void 0?"undefined":JSON.stringify(JSON.stringify(k.body));return`
95
+ ${authHeadersFragment({serverScoped:k.serverScoped,serverIdOverride:k.serverIdOverride})}
96
+ const res = await fetch(${G}, {
97
+ method: ${z}, credentials: 'include', headers,
98
+ body: ${M},
99
+ });
100
+ if (res.status === 401) return { kind: 'auth', detail: ${G} + ' returned 401' };
101
+ if (!res.ok) return { kind: 'http', status: res.status, where: ${G} };
102
+ const data = await res.json().catch(() => ({}));
103
+ return { kind: 'ok', rows: data };
104
+ `}export function buildChannelScopedSnippet(k){const z=JSON.stringify(k.method),G=JSON.stringify(k.pathSuffix||""),M=k.query?JSON.stringify(k.query):"''",N=k.body===void 0?"undefined":JSON.stringify(JSON.stringify(k.body));return`
105
+ ${authHeadersFragment({serverScoped:!0,serverIdOverride:k.serverIdOverride})}
106
+ ${channelResolveFragment(k.channelInput)}
107
+ const __url = '${Q}/channels/' + encodeURIComponent(channelId) + ${G} + ${M};
108
+ const res = await fetch(__url, { method: ${z}, credentials: 'include', headers, body: ${N} });
109
+ if (res.status === 401) return { kind: 'auth', detail: __url + ' returned 401' };
110
+ if (!res.ok) return { kind: 'http', status: res.status, where: __url };
111
+ const data = await res.json().catch(() => ({}));
112
+ return { kind: 'ok', rows: data };
113
+ `}
@@ -0,0 +1,9 @@
1
+ import{cli as Q,Strategy as V}from"@jackwener/opencli/registry";import{ArgumentError as W}from"@jackwener/opencli/errors";import{authHeadersFragment as X,channelResolveFragment as Z}from"./in-page.js";import{dispatchEvaluateResult as $}from"./errors.js";import{SLOCK_SITE as f,SLOCK_DOMAIN as x,SLOCK_HOME_URL as N,SLOCK_API_BASE as Y}from"./shared.js";Q({site:f,name:"inbox-done",access:"write",description:"Mark one chat as done / clear it from the inbox (POST /channels/inbox/done)",domain:x,strategy:V.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"channel",positional:!0,required:!0,help:"channelId UUID or #name"},{name:"server",help:"Override active server"}],columns:["channel","result"],func:async(q,z)=>{const b=String(z.channel??"").trim();if(!b)throw new W("channel required");await q.goto(N);const G=`
2
+ ${X({serverScoped:!0,serverIdOverride:z.server})}
3
+ ${Z(b)}
4
+ const res = await fetch('${Y}/channels/inbox/done', { method:'POST', credentials:'include', headers, body: JSON.stringify({ channelId }) });
5
+ if (res.status === 401) return { kind: 'auth', detail: '/channels/inbox/done returned 401' };
6
+ if (!res.ok) return { kind: 'http', status: res.status, where:'/channels/inbox/done' };
7
+ const data = await res.json().catch(() => ({}));
8
+ return { kind: 'ok', rows: data };
9
+ `,J=await q.evaluate(`(async () => { ${G} })()`);$(J);return[{channel:b,result:"done"}]}});
@@ -0,0 +1 @@
1
+ import{cli as s,Strategy as n}from"@jackwener/opencli/registry";import{buildFetchSnippet as i}from"./in-page.js";import{dispatchEvaluateResult as o}from"./errors.js";import{SLOCK_SITE as l,SLOCK_DOMAIN as d,SLOCK_HOME_URL as c}from"./shared.js";s({site:l,name:"inbox-read-all",access:"write",description:"Mark the entire inbox as read (POST /channels/inbox/read-all)",domain:d,strategy:n.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"server",help:"Override active server"}],columns:["result","markedCount"],func:async(e,r)=>{await e.goto(c);const t=i({method:"POST",path:"/channels/inbox/read-all",serverScoped:!0,serverIdOverride:r.server}),a=await e.evaluate(`(async () => { ${t} })()`);return[{result:"read-all",markedCount:o(a)?.markedCount??null}]}});
@@ -0,0 +1 @@
1
+ import{cli as Z,Strategy as $}from"@jackwener/opencli/registry";import{ArgumentError as x,CommandExecutionError as D}from"@jackwener/opencli/errors";import{buildFetchSnippet as H}from"./in-page.js";import{dispatchEvaluateResult as P}from"./errors.js";import{SLOCK_SITE as U,SLOCK_DOMAIN as y,SLOCK_HOME_URL as A}from"./shared.js";import{parseNonNegativeInteger as M,parsePositiveInteger as b}from"./resolve.js";const Q=["all","unread","mentions"];function F(q){if(q.kind==="thread")return{kind:"thread",id:q.threadChannelId??"",name:q.parentChannelName??"",unreadCount:typeof q.unreadCount==="number"?q.unreadCount:0,hasMention:!!q.hasMention,lastActivityAt:q.lastActivityAt??q.lastReplyAt??"",preview:q.latestActivityPreview??q.parentMessagePreview??""};return{kind:q.kind??"channel",id:q.channelId??"",name:q.channelName??"",unreadCount:typeof q.unreadCount==="number"?q.unreadCount:0,hasMention:!!q.hasMention,lastActivityAt:q.lastMessageAt??"",preview:q.lastMessagePreview??""}}Z({site:U,name:"inbox",access:"read",description:"List unified inbox items (channels, DMs, followed threads) that need attention.",domain:y,strategy:$.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"filter",default:"all",help:"all | unread | mentions"},{name:"limit",type:"int",default:30,help:"Max items (server caps at 100)"},{name:"offset",type:"int",default:0,help:"Pagination offset"},{name:"server",help:"Override active server"}],columns:["kind","id","name","unreadCount","hasMention","lastActivityAt","preview"],func:async(q,z)=>{const B=String(z.filter??"all").toLowerCase();if(!Q.includes(B))throw new x(`--filter must be one of ${Q.join(" | ")} (got "${B}")`);const V=b(z.limit,"--limit",{defaultValue:30,max:100}),W=M(z.offset,"--offset",{defaultValue:0});await q.goto(A);const X=H({method:"GET",path:`/channels/inbox?filter=${encodeURIComponent(B)}&limit=${V}&offset=${W}`,serverScoped:!0,serverIdOverride:z.server}),Y=await q.evaluate(`(async () => { ${X} })()`),G=P(Y),J=Array.isArray(G)?G:G.items||[];if(!Array.isArray(J))throw new D(`expected inbox items array, got ${typeof J} (contract drift?)`);return J.map(F)}});
@@ -0,0 +1 @@
1
+ import"./whoami.js";
@@ -0,0 +1,61 @@
1
+ import{cli as C,Strategy as L}from"@jackwener/opencli/registry";import{ArgumentError as x,CommandExecutionError as O}from"@jackwener/opencli/errors";import{authHeadersFragment as c,resolveShortIdFragment as v}from"./in-page.js";import{dispatchEvaluateResult as M}from"./errors.js";import{SLOCK_SITE as U,SLOCK_DOMAIN as b,SLOCK_HOME_URL as I,SLOCK_API_BASE as W}from"./shared.js";import{UUID_RE as H,classifyThreadTarget as u,parsePositiveInteger as y}from"./resolve.js";function E(q,z){const G=z&&typeof z==="object"?z[q.id??q.messageId]:void 0,J=z===null;return{id:q.id??q.messageId??"",seq:typeof q.seq==="number"?q.seq:null,createdAt:q.createdAt??q.created_at??"",senderName:q.sender?.name??q.user?.name??q.senderName??"",content:q.content??"",threadChannelId:J?null:G?.threadChannelId??null,replyCount:J?null:typeof G?.replyCount==="number"?G.replyCount:0,unreadCount:J?null:typeof G?.unreadCount==="number"?G.unreadCount:0,lastReplyAt:J?null:G?.lastReplyAt??null}}C({site:U,name:"message-read",access:"read",description:'Read messages in a channel or thread. Thread form: "#channel:msgIdOrShort". Use --after seq|UUID for cursor.',domain:b,strategy:L.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"channel",positional:!0,required:!0,help:'channelId UUID, "#name", or "#channel:msgIdOrShort"'},{name:"after",help:"Cursor: seq number or messageId UUID (exclusive)"},{name:"before",help:"seq to page before"},{name:"limit",type:"int",default:50,help:"Max messages"},{name:"no-threads",type:"bool",default:!1,help:"Skip /threads enrichment"},{name:"server",help:"Override active server"}],columns:["id","seq","createdAt","senderName","content","threadChannelId","replyCount","unreadCount","lastReplyAt"],func:async(q,z)=>{const G=String(z.channel??"").trim();if(!G)throw new x("channel required");const J=u(G),Y=H.test(G),Q=z.after!==void 0?String(z.after):"";if(Q&&!/^\d+$/.test(Q)&&!H.test(Q))throw new x(`--after must be a seq number or messageId UUID (got "${Q}")`);const Z=y(z.limit,"--limit",{defaultValue:50}),V=z.before!==void 0?String(z.before):"";if(V&&!/^\d+$/.test(V))throw new x(`--before must be a seq number (got "${V}")`);if(V)y(V,"--before");const j=!!z["no-threads"],B=z.server??null;await q.goto(I);const D={isUuid:Y,channel:G,after:Q,before:V,limit:Z,noThreads:j,override:B,parentTarget:J?.parentTarget??"",parentMsgId:J?.parentMsgId??"",isThread:!!J},R=A(D),X=await q.evaluate(`(async () => { ${R} })()`);if(X?.kind==="no-thread")return[{id:"",seq:null,createdAt:"",senderName:"",content:`(${X.parent} — no thread yet, 0 replies.)`,threadChannelId:null,replyCount:0,unreadCount:0,lastReplyAt:null}];const $=M(X);if(!Array.isArray($))throw new O(`expected array of rows from server, got ${typeof $} (contract drift?)`);const T=X.meta?.threadsMap??{},N=X.meta?.threadsDegraded===!0,P=N?null:T,F=$.map((K)=>E(K,P));if(N)F.unshift({id:"",seq:null,createdAt:"",senderName:"",content:"(threads-enrichment unavailable — replyCount/threadChannelId set to null. Retry to get reply counts.)",threadChannelId:null,replyCount:null,unreadCount:null,lastReplyAt:null});return F}});function A(q){const z=JSON.stringify(q.channel.replace(/^#/,"").toLowerCase()),G=JSON.stringify(q.parentTarget.replace(/^#/,"").toLowerCase()),J=JSON.stringify(q.parentMsgId),Y=JSON.stringify(q.after),Q=JSON.stringify(q.before),Z=JSON.stringify(q.limit);return`
2
+ ${c({serverScoped:!0,serverIdOverride:q.override})}
3
+ let channelId;
4
+ ${q.isThread?`
5
+ // thread shape: resolve parent channel, then short-id → full, then /threads/:msgId
6
+ const cres = await fetch('${W}/channels/', { credentials:'include', headers });
7
+ if (!cres.ok) return { kind: cres.status===401?'auth':'http', status: cres.status, where:'/channels/' };
8
+ const carr = await cres.json();
9
+ const carrL = Array.isArray(carr) ? carr : (carr.channels || carr.data || []);
10
+ const phit = carrL.find((c) => (c.name||c.slug||'').toLowerCase() === ${G});
11
+ if (!phit) return { kind: 'unresolvable', detail: 'parent channel not found: ' + ${G} };
12
+ const parentChannelId = phit.id;
13
+ let fullMsgId = ${J};
14
+ ${v({shortIdVar:"fullMsgId",parentChannelIdVar:"parentChannelId",contextDescription:G})}
15
+ const tres = await fetch('${W}/channels/' + encodeURIComponent(parentChannelId) + '/threads/' + encodeURIComponent(fullMsgId), { credentials:'include', headers });
16
+ if (tres.status === 404) return { kind: 'no-thread', parent: ${JSON.stringify(q.channel)} };
17
+ if (!tres.ok) return { kind: tres.status===401?'auth':'http', status: tres.status, where:'/threads/:msgId' };
18
+ const tinfo = await tres.json();
19
+ channelId = tinfo.threadChannelId || tinfo.channelId || tinfo.id;
20
+ `:`
21
+ if (${q.isUuid}) {
22
+ channelId = ${JSON.stringify(q.channel)};
23
+ } else {
24
+ const cres = await fetch('${W}/channels/', { credentials:'include', headers });
25
+ if (!cres.ok) return { kind: cres.status===401?'auth':'http', status: cres.status, where:'/channels/' };
26
+ const arr = await cres.json();
27
+ const arrL = Array.isArray(arr) ? arr : (arr.channels || arr.data || []);
28
+ const hit = arrL.find((c) => (c.name||c.slug||'').toLowerCase() === ${z});
29
+ if (!hit) return { kind: 'unresolvable', detail: 'no channel matches ' + ${z} };
30
+ channelId = hit.id;
31
+ }
32
+ `}
33
+ let afterSeq = ${Y};
34
+ if (afterSeq && /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(afterSeq)) {
35
+ const cx = await fetch('${W}/messages/context/' + encodeURIComponent(afterSeq), { credentials:'include', headers });
36
+ if (!cx.ok) return { kind: cx.status===401?'auth':'http', status: cx.status, where:'/messages/context (--after)' };
37
+ const cxd = await cx.json();
38
+ const anchor = (cxd.messages || []).find((m) => (m.id||m.messageId) === cxd.targetMessageId);
39
+ afterSeq = String(anchor?.seq ?? '');
40
+ }
41
+ const qs = new URLSearchParams();
42
+ if (afterSeq) qs.set('after', afterSeq);
43
+ if (${Q}) qs.set('before', ${Q});
44
+ qs.set('limit', ${Z});
45
+ const mres = await fetch('${W}/messages/channel/' + encodeURIComponent(channelId) + '?' + qs.toString(), { credentials:'include', headers });
46
+ if (!mres.ok) return { kind: mres.status===401?'auth':'http', status: mres.status, where: '/messages/channel/:id' };
47
+ const mdata = await mres.json();
48
+ const messages = Array.isArray(mdata) ? mdata : (mdata.messages || mdata.data || []);
49
+ let threadsMap = {};
50
+ let threadsDegraded = false;
51
+ ${q.noThreads?"":`
52
+ try {
53
+ const thres = await fetch('${W}/channels/' + encodeURIComponent(channelId) + '/threads', { credentials:'include', headers });
54
+ if (thres.ok) {
55
+ const tmap = await thres.json();
56
+ if (tmap && typeof tmap === 'object' && !Array.isArray(tmap)) threadsMap = tmap;
57
+ } else { threadsDegraded = true; }
58
+ } catch { threadsDegraded = true; }
59
+ `}
60
+ return { kind: 'ok', rows: messages, meta: { threadsMap: threadsDegraded ? null : threadsMap, threadsDegraded } };
61
+ `}
@@ -0,0 +1,24 @@
1
+ import{cli as N,Strategy as T}from"@jackwener/opencli/registry";import{ArgumentError as q,CommandExecutionError as y}from"@jackwener/opencli/errors";import{authHeadersFragment as B}from"./in-page.js";import{dispatchEvaluateResult as F}from"./errors.js";import{SLOCK_SITE as M,SLOCK_DOMAIN as D,SLOCK_HOME_URL as H,SLOCK_API_BASE as V}from"./shared.js";import{UUID_RE as P,parsePositiveInteger as R}from"./resolve.js";N({site:M,name:"message-search",access:"read",description:"Search messages",domain:D,strategy:T.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"query",positional:!0,required:!0,help:"Search query"},{name:"channel",help:"Restrict to a channel (UUID or #name)"},{name:"limit",type:"int",default:50,help:"Max results"},{name:"server",help:"Override active server"}],columns:["id","channelId","createdAt","senderName","content"],func:async(J,z)=>{const Q=String(z.query??"").trim();if(!Q)throw new q("query required");const f=String(z.channel??"").trim(),W=f?P.test(f):!1,X=f?JSON.stringify(f.replace(/^#/,"").toLowerCase()):'""',Y=z.server??null,Z=R(z.limit,"--limit",{defaultValue:50});await J.goto(H);const $=`
2
+ ${B({serverScoped:!0,serverIdOverride:Y})}
3
+ let channelId = '';
4
+ if (${JSON.stringify(f)}) {
5
+ if (${W}) {
6
+ channelId = ${JSON.stringify(f)};
7
+ } else {
8
+ const cres = await fetch('${V}/channels/', { credentials:'include', headers });
9
+ if (!cres.ok) return { kind: cres.status===401?'auth':'http', status: cres.status, where:'/channels/' };
10
+ const arr = await cres.json();
11
+ const hit = (Array.isArray(arr)?arr:(arr.channels||arr.data||[])).find((c) => (c.name||c.slug||'').toLowerCase() === ${X});
12
+ if (!hit) return { kind: 'unresolvable', detail: 'no channel matches ' + ${JSON.stringify(f)} };
13
+ channelId = hit.id;
14
+ }
15
+ }
16
+ const searchUrl = '${V}/messages/search?q=' + encodeURIComponent(${JSON.stringify(Q)}) + (channelId ? '&channelId=' + encodeURIComponent(channelId) : '') + '&limit=' + encodeURIComponent(${JSON.stringify(Z)});
17
+ const res = await fetch(searchUrl, { credentials:'include', headers });
18
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where:'/messages/search' };
19
+ const data = await res.json();
20
+ // F2-b — qatester live dump: shape is { results: [...], hasMore }.
21
+ // Unwrap .results first; fall back to legacy .messages / .data /
22
+ // bare array for forward-compat.
23
+ return { kind: 'ok', rows: Array.isArray(data) ? data : (data.results || data.messages || data.data || []) };
24
+ `,x=await J.evaluate(`(async () => { ${$} })()`),G=F(x);if(!Array.isArray(G))throw new y(`expected array of rows from server, got ${typeof G} (contract drift?)`);return G.map((b)=>({id:b.id??b.messageId??"",channelId:b.channelId??"",createdAt:b.createdAt??b.created_at??"",senderName:b.sender?.name??b.user?.name??"",content:b.content??""}))}});
@@ -0,0 +1,55 @@
1
+ import{cli as D,Strategy as T}from"@jackwener/opencli/registry";import{ArgumentError as y,CommandExecutionError as R}from"@jackwener/opencli/errors";import{authHeadersFragment as j,resolveShortIdFragment as B}from"./in-page.js";import{dispatchEvaluateResult as U}from"./errors.js";import{SLOCK_SITE as h,SLOCK_DOMAIN as K,SLOCK_HOME_URL as C,SLOCK_API_BASE as W}from"./shared.js";import{UUID_RE as H,classifyTarget as L}from"./resolve.js";D({site:h,name:"message-send",access:"write",description:"Send a message to a channel, DM, or thread (content sent verbatim)",domain:K,strategy:T.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"target",positional:!0,required:!0,help:'"#channel", "#channel:msgIdOrShort", "dm:@name", "dm:<uuid>", or channel UUID'},{name:"content",positional:!0,required:!0,help:"Message body (sent verbatim, no marker)"},{name:"dry-run",type:"bool",default:!1,help:"Print the planned payload without sending"},{name:"as-task",type:"bool",default:!1,help:"Create the message as a task (asTask)"},{name:"attach",help:"Comma-separated attachmentId UUIDs (upload separately first)"},{name:"server",help:"Override active server (slug or id)"}],columns:["target","channelId","content","result","messageId"],func:async(f,Q)=>{const q=String(Q.target??"").trim();if(!q)throw new y("target required");const Y=String(Q.content??""),V=!!Q["as-task"],Z=String(Q.attach??"").split(",").map((G)=>G.trim()).filter(Boolean);for(const G of Z)if(!H.test(G))throw new y(`--attach expects attachmentId UUIDs; "${G}" is not a UUID`);let $;try{$=L(q)}catch(G){throw new y(G.message)}const X={asTask:V,attachmentIds:Z};if(Q["dry-run"])return[{target:q,channelId:"(not resolved in dry-run)",content:Y,result:V?"dry-run (asTask)":"dry-run",messageId:null}];await f.goto(C);const J=P(q,Y,$,Q.server,X),N=await f.evaluate(`(async () => { ${J} })()`),z=U(N)[0]??{},b=z.id??z.messageId;if(!b)throw new R("Slock message-send succeeded without returning a message id; refusing to report a sent row.");return[{target:q,channelId:z.channelId??"",content:Y,result:"sent",messageId:b}]}});function P(f,Q,q,Y,V={}){const Z=Y??null,$=JSON.stringify(Q),X=[];if(V.asTask)X.push("asTask: true");if(Array.isArray(V.attachmentIds)&&V.attachmentIds.length)X.push(`attachmentIds: ${JSON.stringify(V.attachmentIds)}`);const J=X.length?", "+X.join(", "):"",N=j({serverScoped:!0,serverIdOverride:Z}),F=`
2
+ if (!channelId) return { kind: 'http', status: 500, where:'/messages (target resolved without channelId)' };
3
+ const mres = await fetch('${W}/messages', { method:'POST', credentials:'include', headers, body: JSON.stringify({ channelId, content: ${$}${J} }) });
4
+ if (!mres.ok) return { kind: mres.status===401?'auth':'http', status: mres.status, where:'/messages' };
5
+ const m = await mres.json();
6
+ const messageId = m.id ?? m.messageId;
7
+ if (!messageId) return { kind: 'http', status: 200, where:'/messages (no message id in response)' };
8
+ return { kind: 'ok', rows: [{ id: messageId, channelId }] };
9
+ `;let z="";if(q.kind==="channel-uuid")z=`let channelId = ${JSON.stringify(q.channelId)};`;else if(q.kind==="channel-name")z=`
10
+ const cres = await fetch('${W}/channels/', { credentials:'include', headers });
11
+ if (!cres.ok) return { kind: cres.status===401?'auth':'http', status: cres.status, where:'/channels/' };
12
+ const carr = await cres.json();
13
+ const hit = (Array.isArray(carr)?carr:(carr.channels||carr.data||[])).find((c) => (c.name||c.slug||'').toLowerCase() === ${JSON.stringify(q.name)});
14
+ if (!hit) return { kind: 'unresolvable', detail: 'no channel matches ' + ${JSON.stringify(q.name)} };
15
+ let channelId = hit.id;
16
+ `;else if(q.kind==="dm-uuid")z=`
17
+ const dres = await fetch('${W}/channels/dm', { method:'POST', credentials:'include', headers, body: JSON.stringify({ userId: ${JSON.stringify(q.userId)} }) });
18
+ if (!dres.ok) return { kind: dres.status===401?'auth':'http', status: dres.status, where:'/channels/dm' };
19
+ const dd = await dres.json();
20
+ let channelId = dd.channelId ?? dd.id;
21
+ if (!channelId) return { kind: 'http', status: 500, where: '/channels/dm (no id in response)' };
22
+ `;else if(q.kind==="dm-name")z=`
23
+ const sres2 = await fetch('${W}/servers/' + encodeURIComponent(sid) + '/members', { credentials:'include', headers });
24
+ if (!sres2.ok) return { kind: sres2.status===401?'auth':'http', status: sres2.status, where:'/servers/:id/members' };
25
+ const mlist = await sres2.json();
26
+ const marr = Array.isArray(mlist) ? mlist : (mlist.members || mlist.data || []);
27
+ const mh = marr.find((u) => (u.username||u.name||u.displayName||'').toLowerCase() === ${JSON.stringify(q.name.toLowerCase())});
28
+ if (!mh) return { kind: 'unresolvable', detail: 'no member @' + ${JSON.stringify(q.name)} };
29
+ const dres = await fetch('${W}/channels/dm', { method:'POST', credentials:'include', headers, body: JSON.stringify({ userId: mh.userId ?? mh.id }) });
30
+ if (!dres.ok) return { kind: dres.status===401?'auth':'http', status: dres.status, where:'/channels/dm' };
31
+ const dd = await dres.json();
32
+ let channelId = dd.channelId ?? dd.id;
33
+ if (!channelId) return { kind: 'http', status: 500, where: '/channels/dm (no id in response)' };
34
+ `;else if(q.kind==="thread"){const b=H.test(q.parentTarget),G=JSON.stringify(q.parentTarget.replace(/^#/,"").toLowerCase()),M=JSON.stringify(q.parentMsgId);z=`
35
+ let parentChannelId;
36
+ if (${b}) {
37
+ parentChannelId = ${JSON.stringify(q.parentTarget)};
38
+ } else {
39
+ const cres = await fetch('${W}/channels/', { credentials:'include', headers });
40
+ if (!cres.ok) return { kind: cres.status===401?'auth':'http', status: cres.status, where:'/channels/' };
41
+ const carr = await cres.json();
42
+ const hit = (Array.isArray(carr)?carr:(carr.channels||carr.data||[])).find((c) => (c.name||c.slug||'').toLowerCase() === ${G});
43
+ if (!hit) return { kind: 'unresolvable', detail: 'no parent channel: ' + ${G} };
44
+ parentChannelId = hit.id;
45
+ }
46
+ let fullMsgId = ${M};
47
+ ${B({shortIdVar:"fullMsgId",parentChannelIdVar:"parentChannelId"})}
48
+ const tres = await fetch('${W}/channels/' + encodeURIComponent(parentChannelId) + '/threads', { method:'POST', credentials:'include', headers, body: JSON.stringify({ parentMessageId: fullMsgId }) });
49
+ if (!tres.ok) return { kind: tres.status===401?'auth':'http', status: tres.status, where:'/channels/:id/threads' };
50
+ const td = await tres.json();
51
+ let channelId = td.threadChannelId ?? td.channelId ?? td.id;
52
+ if (!channelId) return { kind: 'http', status: 500, where:'/channels/:id/threads (no id)' };
53
+ `}return`${N}
54
+ ${z}
55
+ ${F}`}
@@ -0,0 +1 @@
1
+ import{cli as d,Strategy as n}from"@jackwener/opencli/registry";import{ArgumentError as i}from"@jackwener/opencli/errors";import{buildFetchSnippet as c}from"./in-page.js";import{dispatchEvaluateResult as u}from"./errors.js";import{SLOCK_SITE as p,SLOCK_DOMAIN as l,SLOCK_HOME_URL as g}from"./shared.js";import{assertMessageIdShape as S}from"./resolve.js";d({site:p,name:"reaction-add",access:"write",description:"Add an emoji reaction to a message (POST /messages/:id/reactions). Idempotent server-side.",domain:l,strategy:n.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"messageId",positional:!0,required:!0,help:"Full messageId UUID (short ids rejected)"},{name:"emoji",positional:!0,required:!0,help:"A single unicode emoji, e.g. \uD83D\uDC4D"},{name:"server",help:"Override active server"}],columns:["messageId","emoji","result"],func:async(s,e)=>{let r;try{r=S(String(e.messageId??""))}catch(m){throw new i(m.message)}const t=String(e.emoji??"").trim();if(!t)throw new i("emoji required (a single unicode emoji)");await s.goto(g);const o=c({method:"POST",path:`/messages/${r}/reactions`,body:{emoji:t},serverScoped:!0,serverIdOverride:e.server}),a=await s.evaluate(`(async () => { ${o} })()`);u(a);return[{messageId:r,emoji:t,result:"added"}]}});
@@ -0,0 +1 @@
1
+ import{cli as n,Strategy as d}from"@jackwener/opencli/registry";import{ArgumentError as s}from"@jackwener/opencli/errors";import{buildFetchSnippet as c}from"./in-page.js";import{dispatchEvaluateResult as u}from"./errors.js";import{SLOCK_SITE as p,SLOCK_DOMAIN as l,SLOCK_HOME_URL as v}from"./shared.js";import{assertMessageIdShape as g}from"./resolve.js";n({site:p,name:"reaction-remove",access:"write",description:"Remove your emoji reaction from a message (DELETE /messages/:id/reactions).",domain:l,strategy:d.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"messageId",positional:!0,required:!0,help:"Full messageId UUID (short ids rejected)"},{name:"emoji",positional:!0,required:!0,help:"The unicode emoji to remove, e.g. \uD83D\uDC4D"},{name:"server",help:"Override active server"}],columns:["messageId","emoji","result"],func:async(o,e)=>{let r;try{r=g(String(e.messageId??""))}catch(a){throw new s(a.message)}const t=String(e.emoji??"").trim();if(!t)throw new s("emoji required (the unicode emoji to remove)");await o.goto(v);const i=c({method:"DELETE",path:`/messages/${r}/reactions`,body:{emoji:t},serverScoped:!0,serverIdOverride:e.server}),m=await o.evaluate(`(async () => { ${i} })()`);u(m);return[{messageId:r,emoji:t,result:"removed"}]}});
@@ -0,0 +1 @@
1
+ import{ArgumentError as C}from"@jackwener/opencli/errors";export const UUID_RE=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;export function classifyThreadTarget(q){const B=String(q??"").trim().match(/^(#?[^:]+):([A-Za-z0-9-]{6,})$/);if(!B)return null;return{parentTarget:B[1],parentMsgId:B[2]}}export function classifyTarget(q){const b=String(q??"").trim();if(!b)throw new C('target required: "#channel", "#channel:threadShortId", "dm:@name", "dm:<userId>", or channelId UUID.');if(b.startsWith("dm:")){const z=b.slice(3);if(!z)throw new C('dm target must be "dm:<userId>" or "dm:@name".');if(UUID_RE.test(z))return{kind:"dm-uuid",userId:z};if(z.startsWith("@"))return{kind:"dm-name",name:z.slice(1)};throw new C('dm target must be "dm:<userId-uuid>" or "dm:@name".')}const B=classifyThreadTarget(b);if(B)return{kind:"thread",...B};if(UUID_RE.test(b))return{kind:"channel-uuid",channelId:b};return{kind:"channel-name",name:b.replace(/^#/,"").toLowerCase()}}const L="short ids (the 8-hex `msg=...` form in channel headers) are NOT accepted — use the FULL UUID "+"from `bookmark-list` / `message-read` output.";export function assertMessageIdShape(q){const b=String(q??"").trim();if(!b)throw new C("messageId required");if(!UUID_RE.test(b))throw new C(`messageId "${b}" is not a full UUID. ${L}`);return b}export function parsePositiveInteger(q,b,{defaultValue:B,max:z}={}){const F=q===void 0||q===null||q===""?B:q,G=J(F);if(!Number.isInteger(G)||G<=0||z!==void 0&&G>z){const K=z!==void 0?` between 1 and ${z}`:" as a positive integer";throw new C(`${b} must be${K} (got "${F}")`)}return G}export function parseNonNegativeInteger(q,b,{defaultValue:B}={}){const z=q===void 0||q===null||q===""?B:q,F=J(z);if(!Number.isInteger(F)||F<0)throw new C(`${b} must be a non-negative integer (got "${z}")`);return F}function J(q){if(typeof q==="number")return q;const b=String(q);if(!/^\d+$/.test(b))return NaN;return Number(b)}
@@ -0,0 +1,9 @@
1
+ import{cli as o,Strategy as n}from"@jackwener/opencli/registry";import{dispatchEvaluateResult as l}from"./errors.js";import{SLOCK_SITE as c,SLOCK_DOMAIN as u,SLOCK_HOME_URL as g,SLOCK_API_BASE as m}from"./shared.js";o({site:c,name:"server-list",access:"read",description:"List slock servers you belong to; marks active per localStorage slug",domain:u,strategy:n.COOKIE,browser:!0,siteSession:"persistent",args:[],columns:["id","slug","name","active"],func:async(e)=>{await e.goto(g);const a=`
2
+ const token = localStorage.getItem('slock_access_token');
3
+ if (!token) return { kind: 'auth', detail: 'no token' };
4
+ const res = await fetch('${m}/servers/', { credentials:'include', headers:{authorization:'Bearer '+token,accept:'application/json'} });
5
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where: '/servers/' };
6
+ const list = await res.json();
7
+ const activeSlug = localStorage.getItem('slock_last_server_slug') || null;
8
+ return { kind: 'ok', rows: Array.isArray(list) ? list : (list.servers || list.data || []), meta: { activeSlug } };
9
+ `,s=await e.evaluate(`(async () => { ${a} })()`),r=l(s),i=s.meta?.activeSlug??null;return r.map((t)=>({id:t.id??"",slug:t.slug??"",name:t.name??"",active:t.slug===i}))}});
@@ -0,0 +1,18 @@
1
+ import{cli as u,Strategy as c}from"@jackwener/opencli/registry";import{ArgumentError as g}from"@jackwener/opencli/errors";import{dispatchEvaluateResult as m}from"./errors.js";import{SLOCK_SITE as d,SLOCK_DOMAIN as w,SLOCK_HOME_URL as h,SLOCK_API_BASE as f}from"./shared.js";import{UUID_RE as p}from"./resolve.js";u({site:d,name:"server-use",access:"write",description:"Set the active slock server (writes localStorage.slock_last_server_slug)",domain:w,strategy:c.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"input",positional:!0,required:!0,help:'server slug, "#slug", or UUID id'}],columns:["id","slug","name","written"],func:async(s,i)=>{const t=String(i.input??"").trim();if(!t)throw new g("input required: slug or UUID");const o=p.test(t),a=t.replace(/^#/,"").toLowerCase(),n=JSON.stringify(a);await s.goto(h);const l=`
2
+ const token = localStorage.getItem('slock_access_token');
3
+ if (!token) return { kind: 'auth', detail: 'no token' };
4
+ const res = await fetch('${f}/servers/', { credentials:'include', headers:{authorization:'Bearer '+token,accept:'application/json'} });
5
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where:'/servers/' };
6
+ const list = await res.json();
7
+ const arr = Array.isArray(list) ? list : (list.servers || list.data || []);
8
+ let hit;
9
+ if (${o}) hit = arr.find((s) => s.id === ${JSON.stringify(t)});
10
+ else hit = arr.find((s) => (s.slug || '').toLowerCase() === ${n});
11
+ if (!hit) {
12
+ const choices = arr.map((s) => s.slug).filter(Boolean).join(', ');
13
+ return { kind: 'unresolvable', detail: 'no server matches ' + ${JSON.stringify(t)} + '. Known slugs: ' + choices };
14
+ }
15
+ // ATOMICITY: write to localStorage ONLY after we have a confirmed hit.
16
+ localStorage.setItem('slock_last_server_slug', hit.slug);
17
+ return { kind: 'ok', rows: [hit], meta: { written: true, newSlug: hit.slug } };
18
+ `,r=await s.evaluate(`(async () => { ${l} })()`);return m(r).map((e)=>({id:e.id??"",slug:e.slug??"",name:e.name??"",written:r.meta?.written??!1}))}});
@@ -0,0 +1 @@
1
+ export const SLOCK_SITE="slock",SLOCK_DOMAIN="app.slock.ai",SLOCK_HOME_URL="https://app.slock.ai/",SLOCK_API_BASE="https://api.slock.ai/api",LS_ACCESS_TOKEN="slock_access_token",LS_REFRESH_TOKEN="slock_refresh_token",LS_ACTIVE_SLUG="slock_last_server_slug";
@@ -0,0 +1,14 @@
1
+ import{cli as W,Strategy as X}from"@jackwener/opencli/registry";import{ArgumentError as Y,CommandExecutionError as Q}from"@jackwener/opencli/errors";import{authHeadersFragment as Z}from"./in-page.js";import{dispatchEvaluateResult as $}from"./errors.js";import{SLOCK_SITE as B,SLOCK_DOMAIN as D,SLOCK_HOME_URL as F,SLOCK_API_BASE as P}from"./shared.js";import{assertMessageIdShape as U}from"./resolve.js";W({site:B,name:"task-claim",access:"write",description:"Claim a chat task (PATCH /tasks/:id/claim). Requires full task UUID (= message id).",domain:D,strategy:X.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"taskId",positional:!0,required:!0,help:"Full task UUID (= message id; short ids rejected)"},{name:"server",help:"Override active server"}],columns:["taskId","taskStatus","assigneeId","taskNumber"],func:async(J,q)=>{let z;try{z=U(String(q.taskId??""))}catch(b){throw new Y(b.message)}await J.goto(F);const G=`
2
+ ${Z({serverScoped:!0,serverIdOverride:q.server})}
3
+ const res = await fetch('${P}/tasks/' + encodeURIComponent(${JSON.stringify(z)}) + '/claim', { method:'PATCH', credentials:'include', headers });
4
+ if (res.status === 404) return { kind: 'http', status: 404, where: '/tasks/:id/claim (task not found)' };
5
+ if (res.status === 403) return { kind: 'http', status: 403, where: '/tasks/:id/claim (forbidden — not your task, terminal status, or channel archived)' };
6
+ if (res.status === 409) return { kind: 'http', status: 409, where: '/tasks/:id/claim (conflict — already claimed by someone else; use task-unclaim first)' };
7
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where:'/tasks/:id/claim' };
8
+ const data = await res.json().catch(() => ({}));
9
+ // F5 — qatester live dump: server wraps the task as { task: {...} }.
10
+ // Unwrap so the command surfaces the inner row, otherwise every column
11
+ // resolves to null even though the claim succeeded.
12
+ const t = (data && data.task) ? data.task : data;
13
+ return { kind: 'ok', rows: [t] };
14
+ `,V=await J.evaluate(`(async () => { ${G} })()`);return $(V).map((b)=>({taskId:f(b,z,"task-claim"),taskStatus:b.taskStatus??b.status??"",assigneeId:b.claimedById??b.assigneeId??null,taskNumber:b.taskNumber??null}))}});function f(J,q,z){const G=J?.id;if(!G)throw new Q(`Slock ${z} succeeded without returning task id ${q}; refusing to report a task row.`);if(G!==q)throw new Q(`Slock ${z} returned task id ${G}, expected ${q}.`);return G}
@@ -0,0 +1,35 @@
1
+ import{cli as b,Strategy as f}from"@jackwener/opencli/registry";import{ArgumentError as W}from"@jackwener/opencli/errors";import{authHeadersFragment as B,resolveShortIdFragment as H}from"./in-page.js";import{dispatchEvaluateResult as M}from"./errors.js";import{SLOCK_SITE as P,SLOCK_DOMAIN as y,SLOCK_HOME_URL as D,SLOCK_API_BASE as X}from"./shared.js";import{UUID_RE as Y,classifyThreadTarget as T}from"./resolve.js";b({site:P,name:"task-convert",access:"write",description:'Convert a message into a chat task (POST /tasks/convert-message). Accepts a message UUID or "#channel:shortId".',domain:y,strategy:f.COOKIE,browser:!0,siteSession:"persistent",args:[{name:"messageId",positional:!0,required:!0,help:'Full message UUID, or "#channel:shortId" (short id expanded via /messages/context)'},{name:"server",help:"Override active server"}],columns:["id","taskNumber","title","taskStatus","channelId"],func:async(Q,V)=>{const z=String(V.messageId??"").trim();if(!z)throw new W("messageId required");let G;if(Y.test(z))G=`const fullMsgId = ${JSON.stringify(z)};`;else{const q=T(z);if(!q)throw new W(`messageId "${z}" is not a UUID or a "#channel:shortId" form`);const x=Y.test(q.parentTarget),J=JSON.stringify(q.parentTarget.replace(/^#/,"").toLowerCase()),N=JSON.stringify(q.parentMsgId);G=`
2
+ let parentChannelId;
3
+ if (${x}) {
4
+ parentChannelId = ${JSON.stringify(q.parentTarget)};
5
+ } else {
6
+ const cres = await fetch('${X}/channels/', { credentials:'include', headers });
7
+ if (!cres.ok) return { kind: cres.status===401?'auth':'http', status: cres.status, where:'/channels/' };
8
+ const carr = await cres.json();
9
+ const hit = (Array.isArray(carr)?carr:(carr.channels||carr.data||[])).find((c) => (c.name||c.slug||'').toLowerCase() === ${J});
10
+ if (!hit) return { kind: 'unresolvable', detail: 'no channel matches ' + ${J} };
11
+ parentChannelId = hit.id;
12
+ }
13
+ let fullMsgId = ${N};
14
+ ${H({shortIdVar:"fullMsgId",parentChannelIdVar:"parentChannelId",contextDescription:J})}
15
+ `}await Q.goto(D);const Z=`
16
+ ${B({serverScoped:!0,serverIdOverride:V.server})}
17
+ ${G}
18
+ const res = await fetch('${X}/tasks/convert-message', {
19
+ method:'POST', credentials:'include', headers,
20
+ body: JSON.stringify({ messageId: fullMsgId }),
21
+ });
22
+ if (res.status === 400) {
23
+ const j = await res.json().catch(() => ({}));
24
+ return { kind: 'http', status: 400, where: '/tasks/convert-message (bad request: ' + (j.error || j.message || 'invalid messageId') + ')' };
25
+ }
26
+ if (res.status === 403) return { kind: 'http', status: 403, where: '/tasks/convert-message (forbidden — not a channel member, or channel archived)' };
27
+ if (res.status === 404) return { kind: 'http', status: 404, where: '/tasks/convert-message (message not found)' };
28
+ if (res.status === 409) return { kind: 'http', status: 409, where: '/tasks/convert-message (conflict — message is already a task, or in a thread channel which does not accept tasks)' };
29
+ if (!res.ok) return { kind: res.status===401?'auth':'http', status: res.status, where:'/tasks/convert-message' };
30
+ const data = await res.json().catch(() => ({}));
31
+ // F5 — server wraps the task as { task: {...} }; unwrap so the
32
+ // command surfaces the inner row instead of all-null columns.
33
+ const t = (data && data.task) ? data.task : data;
34
+ return { kind: 'ok', rows: [t] };
35
+ `,$=await Q.evaluate(`(async () => { ${Z} })()`);return M($).map((q)=>({id:q.id??"",taskNumber:q.taskNumber??null,title:q.content??q.title??"",taskStatus:q.taskStatus??"todo",channelId:q.channelId??null}))}});