dsh-mobile-plugin 0.5.28 → 0.5.29

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 (350) hide show
  1. package/extensions/catalog.json +10 -1
  2. package/extensions/magpie/agentcompact.js +104 -0
  3. package/extensions/magpie/app.css +4902 -0
  4. package/extensions/magpie/app.js +24474 -0
  5. package/extensions/magpie/autobackup.js +185 -0
  6. package/extensions/magpie/autoresetown.js +151 -0
  7. package/extensions/magpie/balfound.js +38 -0
  8. package/extensions/magpie/boot.js +23 -0
  9. package/extensions/magpie/cfgblocked.js +39 -0
  10. package/extensions/magpie/checkinnow.js +111 -0
  11. package/extensions/magpie/claudemode.js +92 -0
  12. package/extensions/magpie/compat.js +41 -0
  13. package/extensions/magpie/context.css +433 -0
  14. package/extensions/magpie/context.js +1576 -0
  15. package/extensions/magpie/ctxtext.js +223 -0
  16. package/extensions/magpie/fonts.js +42 -0
  17. package/extensions/magpie/i18n.js +18942 -0
  18. package/extensions/magpie/icons/ai21.svg +1 -0
  19. package/extensions/magpie/icons/ai302-color.svg +1 -0
  20. package/extensions/magpie/icons/ai360-color.svg +1 -0
  21. package/extensions/magpie/icons/aihubmix-color.svg +1 -0
  22. package/extensions/magpie/icons/aionui.svg +1 -0
  23. package/extensions/magpie/icons/air.svg +4 -0
  24. package/extensions/magpie/icons/alibaba-color.svg +1 -0
  25. package/extensions/magpie/icons/alibabacloud-color.svg +1 -0
  26. package/extensions/magpie/icons/alma.png +0 -0
  27. package/extensions/magpie/icons/anthropic.svg +1 -0
  28. package/extensions/magpie/icons/antigravity-color.svg +1 -0
  29. package/extensions/magpie/icons/anyscale-color.svg +1 -0
  30. package/extensions/magpie/icons/app-alma.png +0 -0
  31. package/extensions/magpie/icons/app-cc-switch.png +0 -0
  32. package/extensions/magpie/icons/apple-touch-icon.png +0 -0
  33. package/extensions/magpie/icons/aside.svg +28 -0
  34. package/extensions/magpie/icons/astrbot.svg +1 -0
  35. package/extensions/magpie/icons/atomcode.png +0 -0
  36. package/extensions/magpie/icons/aws.svg +1 -0
  37. package/extensions/magpie/icons/azure-color.svg +1 -0
  38. package/extensions/magpie/icons/azureai-color.svg +1 -0
  39. package/extensions/magpie/icons/baichuan-color.svg +1 -0
  40. package/extensions/magpie/icons/baidu-color.svg +1 -0
  41. package/extensions/magpie/icons/baiducloud-color.svg +1 -0
  42. package/extensions/magpie/icons/bailian-color.svg +1 -0
  43. package/extensions/magpie/icons/baseten.svg +1 -0
  44. package/extensions/magpie/icons/bedrock-color.svg +1 -0
  45. package/extensions/magpie/icons/burncloud-color.svg +1 -0
  46. package/extensions/magpie/icons/bytedance-color.svg +1 -0
  47. package/extensions/magpie/icons/cerebras.svg +1 -0
  48. package/extensions/magpie/icons/chatglm-color.svg +1 -0
  49. package/extensions/magpie/icons/cherryin-color.svg +1 -0
  50. package/extensions/magpie/icons/chutes.svg +1 -0
  51. package/extensions/magpie/icons/cindy.png +0 -0
  52. package/extensions/magpie/icons/claude-color.svg +1 -0
  53. package/extensions/magpie/icons/claudecode-color.svg +1 -0
  54. package/extensions/magpie/icons/cline.svg +1 -0
  55. package/extensions/magpie/icons/cloudflare-color.svg +1 -0
  56. package/extensions/magpie/icons/codebuddy-color.svg +1 -0
  57. package/extensions/magpie/icons/codex-color.svg +1 -0
  58. package/extensions/magpie/icons/cohere-color.svg +1 -0
  59. package/extensions/magpie/icons/cometapi-color.svg +1 -0
  60. package/extensions/magpie/icons/commandcode.svg +1 -0
  61. package/extensions/magpie/icons/copilot-color.svg +1 -0
  62. package/extensions/magpie/icons/coze.svg +1 -0
  63. package/extensions/magpie/icons/crush.png +0 -0
  64. package/extensions/magpie/icons/curl.svg +1 -0
  65. package/extensions/magpie/icons/cursor.svg +1 -0
  66. package/extensions/magpie/icons/deepinfra-color.svg +1 -0
  67. package/extensions/magpie/icons/deepmind-color.svg +1 -0
  68. package/extensions/magpie/icons/deepseek-color.svg +1 -0
  69. package/extensions/magpie/icons/deveco-color.svg +12 -0
  70. package/extensions/magpie/icons/devin.svg +1 -0
  71. package/extensions/magpie/icons/doubao-color.svg +1 -0
  72. package/extensions/magpie/icons/empryo-color.svg +1 -0
  73. package/extensions/magpie/icons/factory.svg +1 -0
  74. package/extensions/magpie/icons/favicon.svg +1 -0
  75. package/extensions/magpie/icons/featherless-color.svg +1 -0
  76. package/extensions/magpie/icons/fireworks-color.svg +1 -0
  77. package/extensions/magpie/icons/friendli.svg +1 -0
  78. package/extensions/magpie/icons/fx.svg +1 -0
  79. package/extensions/magpie/icons/gemini-color.svg +1 -0
  80. package/extensions/magpie/icons/geminicli-color.svg +1 -0
  81. package/extensions/magpie/icons/gemma-color.svg +1 -0
  82. package/extensions/magpie/icons/giteeai.svg +1 -0
  83. package/extensions/magpie/icons/github.svg +1 -0
  84. package/extensions/magpie/icons/githubcopilot.svg +1 -0
  85. package/extensions/magpie/icons/glama.svg +1 -0
  86. package/extensions/magpie/icons/gmicloud.svg +1 -0
  87. package/extensions/magpie/icons/google-color.svg +1 -0
  88. package/extensions/magpie/icons/googlecloud-color.svg +1 -0
  89. package/extensions/magpie/icons/goose.svg +1 -0
  90. package/extensions/magpie/icons/grok.svg +1 -0
  91. package/extensions/magpie/icons/groq.svg +1 -0
  92. package/extensions/magpie/icons/hanako.png +0 -0
  93. package/extensions/magpie/icons/hermes.svg +1 -0
  94. package/extensions/magpie/icons/huawei-color.svg +1 -0
  95. package/extensions/magpie/icons/huaweicloud-color.svg +1 -0
  96. package/extensions/magpie/icons/huggingface-color.svg +1 -0
  97. package/extensions/magpie/icons/hunyuan-color.svg +1 -0
  98. package/extensions/magpie/icons/hyperbolic-color.svg +1 -0
  99. package/extensions/magpie/icons/icon-512.png +0 -0
  100. package/extensions/magpie/icons/iflytekcloud-color.svg +1 -0
  101. package/extensions/magpie/icons/inference.svg +1 -0
  102. package/extensions/magpie/icons/infinigence-color.svg +1 -0
  103. package/extensions/magpie/icons/internlm-color.svg +1 -0
  104. package/extensions/magpie/icons/jcode.svg +1 -0
  105. package/extensions/magpie/icons/jina.svg +1 -0
  106. package/extensions/magpie/icons/kilo.svg +1 -0
  107. package/extensions/magpie/icons/kilocode.svg +1 -0
  108. package/extensions/magpie/icons/kimi-code-desktop.png +0 -0
  109. package/extensions/magpie/icons/kimi.svg +1 -0
  110. package/extensions/magpie/icons/kiro-color.svg +1 -0
  111. package/extensions/magpie/icons/kling-color.svg +1 -0
  112. package/extensions/magpie/icons/lambda.svg +1 -0
  113. package/extensions/magpie/icons/leptonai-color.svg +1 -0
  114. package/extensions/magpie/icons/liquid.svg +1 -0
  115. package/extensions/magpie/icons/liveagent-color.svg +1 -0
  116. package/extensions/magpie/icons/llmapi.svg +1 -0
  117. package/extensions/magpie/icons/lmstudio.svg +1 -0
  118. package/extensions/magpie/icons/lody.png +0 -0
  119. package/extensions/magpie/icons/longcat.svg +1 -0
  120. package/extensions/magpie/icons/magpie.svg +1 -0
  121. package/extensions/magpie/icons/meta-color.svg +1 -0
  122. package/extensions/magpie/icons/metaai-color.svg +1 -0
  123. package/extensions/magpie/icons/microsoft-color.svg +1 -0
  124. package/extensions/magpie/icons/mimocode.svg +1 -0
  125. package/extensions/magpie/icons/minimax-color.svg +1 -0
  126. package/extensions/magpie/icons/mistermorph-color.svg +1 -0
  127. package/extensions/magpie/icons/mistral-color.svg +1 -0
  128. package/extensions/magpie/icons/mlx-serve.png +0 -0
  129. package/extensions/magpie/icons/modelscope-color.svg +1 -0
  130. package/extensions/magpie/icons/monica-color.svg +1 -0
  131. package/extensions/magpie/icons/moonshot.svg +1 -0
  132. package/extensions/magpie/icons/morph-color.svg +1 -0
  133. package/extensions/magpie/icons/mothx.png +0 -0
  134. package/extensions/magpie/icons/nebius.svg +1 -0
  135. package/extensions/magpie/icons/newapi-color.svg +1 -0
  136. package/extensions/magpie/icons/nousresearch.svg +1 -0
  137. package/extensions/magpie/icons/nova-color.svg +1 -0
  138. package/extensions/magpie/icons/novita-color.svg +1 -0
  139. package/extensions/magpie/icons/nvidia-color.svg +1 -0
  140. package/extensions/magpie/icons/ollama.svg +1 -0
  141. package/extensions/magpie/icons/omlx.svg +1 -0
  142. package/extensions/magpie/icons/omo.svg +1 -0
  143. package/extensions/magpie/icons/omp.svg +1 -0
  144. package/extensions/magpie/icons/openai.svg +1 -0
  145. package/extensions/magpie/icons/openchamber.svg +11 -0
  146. package/extensions/magpie/icons/openclaw.svg +1 -0
  147. package/extensions/magpie/icons/opencode.svg +1 -0
  148. package/extensions/magpie/icons/openmausbot.svg +1 -0
  149. package/extensions/magpie/icons/openrouter.svg +1 -0
  150. package/extensions/magpie/icons/openwebui.svg +1 -0
  151. package/extensions/magpie/icons/parasail.svg +1 -0
  152. package/extensions/magpie/icons/penguin-color.svg +1 -0
  153. package/extensions/magpie/icons/perplexity-color.svg +1 -0
  154. package/extensions/magpie/icons/phala-color.svg +1 -0
  155. package/extensions/magpie/icons/pi.svg +1 -0
  156. package/extensions/magpie/icons/pipellm-color.svg +5 -0
  157. package/extensions/magpie/icons/poe.svg +1 -0
  158. package/extensions/magpie/icons/ppio-color.svg +1 -0
  159. package/extensions/magpie/icons/prime-agent.svg +1 -0
  160. package/extensions/magpie/icons/qiniu-color.svg +1 -0
  161. package/extensions/magpie/icons/qoder.svg +1 -0
  162. package/extensions/magpie/icons/qwen-color.svg +1 -0
  163. package/extensions/magpie/icons/qwenpaw.svg +1 -0
  164. package/extensions/magpie/icons/raycast.svg +1 -0
  165. package/extensions/magpie/icons/reasonix-color.svg +48 -0
  166. package/extensions/magpie/icons/reka.svg +1 -0
  167. package/extensions/magpie/icons/replicate.svg +1 -0
  168. package/extensions/magpie/icons/roocode.svg +1 -0
  169. package/extensions/magpie/icons/rtk.png +0 -0
  170. package/extensions/magpie/icons/sambanova-color.svg +1 -0
  171. package/extensions/magpie/icons/sensenova-color.svg +1 -0
  172. package/extensions/magpie/icons/siliconcloud-color.svg +1 -0
  173. package/extensions/magpie/icons/snow.png +0 -0
  174. package/extensions/magpie/icons/snowflake-color.svg +1 -0
  175. package/extensions/magpie/icons/sophnet-color.svg +1 -0
  176. package/extensions/magpie/icons/spark-color.svg +1 -0
  177. package/extensions/magpie/icons/stepfun-color.svg +1 -0
  178. package/extensions/magpie/icons/straico-color.svg +1 -0
  179. package/extensions/magpie/icons/submodel-color.svg +1 -0
  180. package/extensions/magpie/icons/t3code.svg +4 -0
  181. package/extensions/magpie/icons/targon-color.svg +1 -0
  182. package/extensions/magpie/icons/tencent-color.svg +1 -0
  183. package/extensions/magpie/icons/tencentcloud-color.svg +1 -0
  184. package/extensions/magpie/icons/tiangong-color.svg +1 -0
  185. package/extensions/magpie/icons/together-color.svg +1 -0
  186. package/extensions/magpie/icons/trae.svg +1 -0
  187. package/extensions/magpie/icons/typesafe.png +0 -0
  188. package/extensions/magpie/icons/upstage-color.svg +1 -0
  189. package/extensions/magpie/icons/venice-color.svg +1 -0
  190. package/extensions/magpie/icons/vercel.svg +1 -0
  191. package/extensions/magpie/icons/vertexai-color.svg +1 -0
  192. package/extensions/magpie/icons/vllm-color.svg +1 -0
  193. package/extensions/magpie/icons/volcengine-color.svg +1 -0
  194. package/extensions/magpie/icons/voyage-color.svg +1 -0
  195. package/extensions/magpie/icons/vscode.svg +1 -0
  196. package/extensions/magpie/icons/wenxin-color.svg +1 -0
  197. package/extensions/magpie/icons/windsurf.svg +1 -0
  198. package/extensions/magpie/icons/workbuddy-color.svg +1 -0
  199. package/extensions/magpie/icons/workersai-color.svg +1 -0
  200. package/extensions/magpie/icons/xai.svg +1 -0
  201. package/extensions/magpie/icons/xiaomimimo.svg +1 -0
  202. package/extensions/magpie/icons/xinference-color.svg +1 -0
  203. package/extensions/magpie/icons/yi.svg +1 -0
  204. package/extensions/magpie/icons/yuanbao-color.svg +1 -0
  205. package/extensions/magpie/icons/yylx.svg +5 -0
  206. package/extensions/magpie/icons/zai.svg +1 -0
  207. package/extensions/magpie/icons/zcode.png +0 -0
  208. package/extensions/magpie/icons/zed.svg +1 -0
  209. package/extensions/magpie/icons/zenmux.svg +1 -0
  210. package/extensions/magpie/icons/zeroone.svg +1 -0
  211. package/extensions/magpie/icons/zhipu-color.svg +1 -0
  212. package/extensions/magpie/icons/zoo-code.png +0 -0
  213. package/extensions/magpie/index.html +572 -0
  214. package/extensions/magpie/kernel.js +274 -0
  215. package/extensions/magpie/keyspend.js +63 -0
  216. package/extensions/magpie/layout.js +26 -0
  217. package/extensions/magpie/manifest.json +37 -0
  218. package/extensions/magpie/navlamp.js +47 -0
  219. package/extensions/magpie/omarchy.css +72 -0
  220. package/extensions/magpie/omarchy.js +46 -0
  221. package/extensions/magpie/passerrors.js +21 -0
  222. package/extensions/magpie/pluginpages.js +405 -0
  223. package/extensions/magpie/plugins/gateway/client.js +1194 -0
  224. package/extensions/magpie/plugins/gateway/keys.js +972 -0
  225. package/extensions/magpie/plugins/gateway/settings.js +459 -0
  226. package/extensions/magpie/plugins/library/client.js +6788 -0
  227. package/extensions/magpie/plugins/library/i18n.js +3228 -0
  228. package/extensions/magpie/plugins/library/library.css +848 -0
  229. package/extensions/magpie/plugins/otel/i18n.js +48 -0
  230. package/extensions/magpie/plugins/otel/page.js +189 -0
  231. package/extensions/magpie/plugins/redact/client.js +46 -0
  232. package/extensions/magpie/plugins/redact/demo.js +461 -0
  233. package/extensions/magpie/plugins/redact/i18n.js +432 -0
  234. package/extensions/magpie/plugins/redact/page.js +985 -0
  235. package/extensions/magpie/plugins/redact/redact.css +385 -0
  236. package/extensions/magpie/plugins/redact/settings.js +248 -0
  237. package/extensions/magpie/plugins/redact/xq_dark.jpg +0 -0
  238. package/extensions/magpie/plugins/redact/xq_dark.webm +0 -0
  239. package/extensions/magpie/plugins/redact/xq_light.jpg +0 -0
  240. package/extensions/magpie/plugins/redact/xq_light.webm +0 -0
  241. package/extensions/magpie/plugins/routing/client.js +8593 -0
  242. package/extensions/magpie/plugins/routing/i18n.js +2696 -0
  243. package/extensions/magpie/plugins/routing/routing.css +1111 -0
  244. package/extensions/magpie/plugins/search/settings.js +460 -0
  245. package/extensions/magpie/plugins/sessions/client.js +1622 -0
  246. package/extensions/magpie/plugins/sessions/i18n.js +360 -0
  247. package/extensions/magpie/plugins/sessions/sessions.css +181 -0
  248. package/extensions/magpie/plugins/sessions/settings.js +100 -0
  249. package/extensions/magpie/plugins/usage/client.js +150 -0
  250. package/extensions/magpie/plugins/usage/i18n.js +984 -0
  251. package/extensions/magpie/plugins/usage/page.js +4307 -0
  252. package/extensions/magpie/plugins.css +319 -0
  253. package/extensions/magpie/plugins.js +1926 -0
  254. package/extensions/magpie/profilerename.js +27 -0
  255. package/extensions/magpie/purposes.js +2 -0
  256. package/extensions/magpie/quitask.js +79 -0
  257. package/extensions/magpie/quotaall.js +142 -0
  258. package/extensions/magpie/ratewindows.js +123 -0
  259. package/extensions/magpie/registry.js +87 -0
  260. package/extensions/magpie/resetask.js +137 -0
  261. package/extensions/magpie/ruleedit.js +53 -0
  262. package/extensions/magpie/scrollends.js +91 -0
  263. package/extensions/magpie/settingshints.js +75 -0
  264. package/extensions/magpie/signsheets.js +86 -0
  265. package/extensions/magpie/start.js +26 -0
  266. package/extensions/magpie/syncfiles.js +216 -0
  267. package/extensions/magpie/theme.js +29 -0
  268. package/extensions/magpie/traywindows.js +41 -0
  269. package/extensions/magpie/webfonts.js +130 -0
  270. package/extensions/magpie/whatsnew.js +252 -0
  271. package/extensions/magpie.zip +0 -0
  272. package/knowledge/apps/baijiahao.md +30 -0
  273. package/knowledge/apps/bilibili.md +1 -0
  274. package/knowledge/apps/dedao.md +33 -0
  275. package/knowledge/apps/feishu.md +35 -0
  276. package/knowledge/apps/gmail.md +33 -0
  277. package/knowledge/apps/jike.md +31 -0
  278. package/knowledge/apps/kuaishou.md +34 -0
  279. package/knowledge/apps/linkedin.md +33 -0
  280. package/knowledge/apps/qqmail.md +30 -0
  281. package/knowledge/apps/telegram.md +27 -0
  282. package/knowledge/apps/toutiao.md +32 -0
  283. package/knowledge/apps/uber-eats.md +26 -0
  284. package/knowledge/apps/uber.md +27 -0
  285. package/knowledge/apps/whatsapp.md +27 -0
  286. package/knowledge/apps/x.md +32 -0
  287. package/knowledge/apps/xiaohongshu.md +1 -0
  288. package/knowledge/apps/zhihu.md +1 -0
  289. package/knowledge/sites/bilibili.com/SITE.md +50 -0
  290. package/knowledge/sites/bilibili.com/references/view-fields.md +17 -0
  291. package/knowledge/sites/github.com/SITE.md +51 -0
  292. package/knowledge/sites/github.com/references/repo-fields.md +13 -0
  293. package/knowledge/sites/x.com/SITE.md +47 -0
  294. package/knowledge/sites/xiaohongshu.com/SITE.md +48 -0
  295. package/knowledge/sites/xiaohongshu.com/references/note-fields.md +18 -0
  296. package/knowledge/sites/youtube.com/SITE.md +49 -0
  297. package/knowledge/sites/youtube.com/references/innertube-fields.md +14 -0
  298. package/knowledge/sites/zhihu.com/SITE.md +47 -0
  299. package/knowledge/sites/zhihu.com/references/api-fields.md +21 -0
  300. package/lib/mobile/extension-catalog.js +41 -1
  301. package/lib/mobile/extension-data.js +224 -0
  302. package/lib/mobile/extension-dev.js +3 -1
  303. package/lib/mobile/file-ops.js +252 -0
  304. package/lib/mobile/history-derive.js +80 -4
  305. package/lib/mobile/host-bridge/endpoints.js +48 -6
  306. package/lib/mobile/host-bridge/event-synthesis.js +33 -6
  307. package/lib/mobile/jobs-control.js +118 -0
  308. package/lib/mobile/memory.js +635 -0
  309. package/lib/mobile/model-badges.js +77 -0
  310. package/lib/mobile/pet-tools.js +50 -4
  311. package/lib/mobile/pets.js +214 -18
  312. package/lib/mobile/phone/access.js +85 -0
  313. package/lib/mobile/phone/evidence.js +228 -0
  314. package/lib/mobile/phone/gate.js +290 -0
  315. package/lib/mobile/phone/grounding.js +314 -0
  316. package/lib/mobile/phone/guard.js +465 -0
  317. package/lib/mobile/phone/irreversible.js +88 -8
  318. package/lib/mobile/phone/knowledge-tools.js +665 -0
  319. package/lib/mobile/phone/learn.js +329 -0
  320. package/lib/mobile/phone/redact.js +237 -0
  321. package/lib/mobile/phone/risk.js +95 -0
  322. package/lib/mobile/phone/routes.js +28 -1
  323. package/lib/mobile/phone/service.js +23 -0
  324. package/lib/mobile/phone/site-commands.js +271 -0
  325. package/lib/mobile/phone/step-summary.js +201 -0
  326. package/lib/mobile/phone/stop-summary.js +235 -0
  327. package/lib/mobile/phone/tool-groups.js +125 -0
  328. package/lib/mobile/phone/tools.js +589 -0
  329. package/lib/mobile/phone/untrusted.js +65 -0
  330. package/lib/mobile/phone-knowledge.js +20 -4
  331. package/lib/mobile/schedule-edit.js +500 -0
  332. package/lib/mobile/schedule.js +5 -0
  333. package/lib/mobile/send-continuation.js +52 -0
  334. package/lib/mobile/session-models.js +27 -31
  335. package/lib/mobile/session-send.js +12 -12
  336. package/lib/mobile/skill-import.js +338 -0
  337. package/lib/mobile/skill-store.js +524 -0
  338. package/lib/routes/mobile-api.js +42 -0
  339. package/package.json +7 -6
  340. package/skills/skill-authoring/SKILL.md +46 -0
  341. package/skills/skill-authoring/references/examples.md +82 -0
  342. package/skills/skill-authoring/references/frontmatter-and-fields.md +46 -0
  343. package/skills/skill-authoring/scripts/check_skill.py +167 -0
  344. package/skills/skill-authoring/scripts/manifest.json +3 -0
  345. package/knowledge/sites/bilibili.com.md +0 -27
  346. package/knowledge/sites/github.com.md +0 -27
  347. package/knowledge/sites/x.com.md +0 -28
  348. package/knowledge/sites/xiaohongshu.com.md +0 -27
  349. package/knowledge/sites/youtube.com.md +0 -28
  350. package/knowledge/sites/zhihu.com.md +0 -27
@@ -0,0 +1,48 @@
1
+ // Settings › Observability's own words in each language, the English the
2
+ // key: the kernel adds them to i18n.js's (magpie.strings).
3
+ magpie.strings({
4
+ zh: {
5
+ "Langfuse needs only its host and your project's keys; any other OTLP/HTTP collector takes its address and headers": "Langfuse 只需要地址和项目密钥;其他 OTLP/HTTP 采集服务填地址和请求头",
6
+ "Langfuse host": "Langfuse 地址",
7
+ "Langfuse Cloud's region, or the address of your own Langfuse": "Langfuse Cloud 的区域,或你自己部署的 Langfuse 地址",
8
+ "Cloud EU": "Cloud 欧洲",
9
+ "Cloud US": "Cloud 美国",
10
+ "Self-hosted": "自部署",
11
+ "Public key": "公钥",
12
+ "From your Langfuse project's Settings › API Keys. Traces go to {url}": "在 Langfuse 项目的 Settings › API Keys 里获取。链路数据发往 {url}",
13
+ "Enter your Langfuse address, such as https://langfuse.example.com": "请填写 Langfuse 地址,比如 https://langfuse.example.com",
14
+ },
15
+ "zh-TW": {
16
+ "Langfuse needs only its host and your project's keys; any other OTLP/HTTP collector takes its address and headers": "Langfuse 只需要位址和專案金鑰;其他 OTLP/HTTP 採集服務填位址和請求標頭",
17
+ "Langfuse host": "Langfuse 位址",
18
+ "Langfuse Cloud's region, or the address of your own Langfuse": "Langfuse Cloud 的區域,或你自行部署的 Langfuse 位址",
19
+ "Cloud EU": "Cloud 歐洲",
20
+ "Cloud US": "Cloud 美國",
21
+ "Self-hosted": "自行部署",
22
+ "Public key": "公鑰",
23
+ "From your Langfuse project's Settings › API Keys. Traces go to {url}": "在 Langfuse 專案的 Settings › API Keys 取得。鏈路資料傳送到 {url}",
24
+ "Enter your Langfuse address, such as https://langfuse.example.com": "請填寫 Langfuse 位址,例如 https://langfuse.example.com",
25
+ },
26
+ ja: {
27
+ "Langfuse needs only its host and your project's keys; any other OTLP/HTTP collector takes its address and headers": "Langfuse はホストとプロジェクトのキーだけで設定できます。ほかの OTLP/HTTP コレクターはアドレスとヘッダーを入力します",
28
+ "Langfuse host": "Langfuse のホスト",
29
+ "Langfuse Cloud's region, or the address of your own Langfuse": "Langfuse Cloud のリージョン、またはセルフホストした Langfuse のアドレス",
30
+ "Cloud EU": "Cloud EU",
31
+ "Cloud US": "Cloud US",
32
+ "Self-hosted": "セルフホスト",
33
+ "Public key": "公開キー",
34
+ "From your Langfuse project's Settings › API Keys. Traces go to {url}": "Langfuse プロジェクトの Settings › API Keys で取得します。トレースの送信先は {url} です",
35
+ "Enter your Langfuse address, such as https://langfuse.example.com": "Langfuse のアドレスを入力してください(例: https://langfuse.example.com)",
36
+ },
37
+ de: {
38
+ "Langfuse needs only its host and your project's keys; any other OTLP/HTTP collector takes its address and headers": "Langfuse braucht nur seinen Host und die Schlüssel Ihres Projekts; jeder andere OTLP/HTTP-Collector bekommt Adresse und Header",
39
+ "Langfuse host": "Langfuse-Host",
40
+ "Langfuse Cloud's region, or the address of your own Langfuse": "Die Region von Langfuse Cloud oder die Adresse Ihres eigenen Langfuse",
41
+ "Cloud EU": "Cloud EU",
42
+ "Cloud US": "Cloud US",
43
+ "Self-hosted": "Selbst gehostet",
44
+ "Public key": "Öffentlicher Schlüssel",
45
+ "From your Langfuse project's Settings › API Keys. Traces go to {url}": "Aus Settings › API Keys Ihres Langfuse-Projekts. Traces gehen an {url}",
46
+ "Enter your Langfuse address, such as https://langfuse.example.com": "Geben Sie Ihre Langfuse-Adresse ein, z. B. https://langfuse.example.com",
47
+ },
48
+ });
@@ -0,0 +1,189 @@
1
+ // Settings › Observability's code (the otel plugin's page): run after app.js,
2
+ // whose helpers it shares (el, segs, input, savePrefs), and before start.js
3
+ // draws Settings. The connection is either any OTLP collector, set by its
4
+ // address and headers, or Langfuse, set by what only the user knows: where it
5
+ // is and the project's two keys. Langfuse's address, its Basic sign-in and
6
+ // its ingestion header are made from those, into the same endpoint and
7
+ // headers settings, so the secret is kept where it always was.
8
+
9
+ const LANGFUSE_PATH = "/api/public/otel";
10
+ const LANGFUSE_HOSTS = [["https://cloud.langfuse.com", "Cloud EU"], ["https://us.cloud.langfuse.com", "Cloud US"]];
11
+ // otelKind is the user's pick while the page is open ("otlp" or "langfuse"),
12
+ // null for what the saved endpoint says; lfDraft holds keys typed but not yet
13
+ // saved, so a redraw doesn't drop them
14
+ let otelKind = null, lfDraft = null;
15
+ // the rows whose control takes a line of its own under their words
16
+ const OTEL_STACKED = ["otelEndpointRow", "otelHeadersRow", "otelBodiesRow", "otelLangfuseHostRow", "otelLangfuseKeysRow"];
17
+
18
+ // langfuseOf: the host and keys a saved config has, or null for an endpoint
19
+ // that isn't Langfuse's OTLP one
20
+ function langfuseOf(config) {
21
+ const endpoint = (config.endpoint || "").replace(/\/+$/, "");
22
+ if (!endpoint.endsWith(LANGFUSE_PATH)) return null;
23
+ let pk = "", sk = "";
24
+ const auth = Object.entries(config.headers || {}).find(([k]) => k.toLowerCase() === "authorization")?.[1] || "";
25
+ const basic = /^Basic\s+(\S+)$/i.exec(auth.trim());
26
+ if (basic) {
27
+ try {
28
+ const pair = atob(basic[1]), i = pair.indexOf(":");
29
+ if (i > 0) { pk = pair.slice(0, i); sk = pair.slice(i + 1); }
30
+ } catch {}
31
+ }
32
+ return { host: endpoint.slice(0, -LANGFUSE_PATH.length), pk, sk };
33
+ }
34
+
35
+ // langfuseHost: a typed host as a base URL (scheme added, Langfuse's OTLP
36
+ // path taken off if pasted), "" for one that isn't an http(s) address
37
+ function langfuseHost(v) {
38
+ let h = v.trim().replace(/\/+$/, "");
39
+ if (h.endsWith(LANGFUSE_PATH)) h = h.slice(0, -LANGFUSE_PATH.length);
40
+ if (h && !/^[a-z][a-z0-9+.-]*:\/\//i.test(h)) h = "https://" + h;
41
+ try {
42
+ const u = new URL(h);
43
+ return /^https?:$/.test(u.protocol) && u.hostname && !u.search && !u.hash && !u.username ? h : "";
44
+ } catch { return ""; }
45
+ }
46
+
47
+ function renderOTel(s, keep) {
48
+ const page = $("#otelList");
49
+ page.replaceChildren();
50
+ let config = { ...(s.otel || {}) };
51
+ const saved = langfuseOf(config);
52
+ const kind = otelKind || (saved ? "langfuse" : "otlp");
53
+ // a heading over a card of its own, as on every other Settings tab
54
+ let box;
55
+ const section = (name) => {
56
+ const head = el("div", "row-head");
57
+ head.append(el("span", "label", t(name)));
58
+ box = el("div", "list prefs");
59
+ page.append(head, box);
60
+ };
61
+ const row = (id, name, sub, control) => {
62
+ const r = el("div", "row pref");
63
+ r.id = id;
64
+ const who = el("div", "who");
65
+ who.append(el("div", "name", t(name)), el("div", "sub", sub));
66
+ const val = el("div", "val");
67
+ val.append(control);
68
+ r.append(who, val);
69
+ if (OTEL_STACKED.includes(id)) r.classList.add("otel-stacked");
70
+ box.append(r);
71
+ return r;
72
+ };
73
+ const save = (change) => {
74
+ otelKind = kind; // what the user is editing stays on screen as they save
75
+ config = { ...config, ...change };
76
+ savePrefs({ ...keep, otel: { ...config } });
77
+ };
78
+ const field = (value, placeholder, type, label) => {
79
+ const f = input(value, placeholder, type);
80
+ f.className = "words";
81
+ f.setAttribute("aria-label", t(label));
82
+ f.autocomplete = "off";
83
+ f.onkeydown = (e) => { e.stopPropagation(); if (e.key === "Enter") f.blur(); };
84
+ return f;
85
+ };
86
+ section("Collector connection");
87
+ row("otelExportRow", "OTLP export", t("Send traces to your collector. Choose what to include below; account credentials stay local"),
88
+ segs([["off", t("Off")], ["on", t("On")]], config.enabled ? "on" : "off", (v) => save({ enabled: v === "on" })));
89
+ row("otelKindRow", "Collector", t("Langfuse needs only its host and your project's keys; any other OTLP/HTTP collector takes its address and headers"),
90
+ segs([["otlp", "OTLP"], ["langfuse", "Langfuse"]], kind, (v) => { otelKind = v; renderOTel(s, keep); }));
91
+ if (kind === "langfuse") renderLangfuse(saved, config, save, row, field);
92
+ else {
93
+ const endpoint = field(config.endpoint || "", "http://localhost:4318", "url", "OTLP endpoint");
94
+ endpoint.onchange = () => save({ endpoint: endpoint.value.trim().replace(/\/+$/, "") });
95
+ row("otelEndpointRow", "OTLP endpoint", t("Base URL of your collector, or Langfuse's /api/public/otel endpoint"), endpoint);
96
+ const headers = field(Object.entries(config.headers || {}).map(([k, v]) => `${k}=${encodeURIComponent(v)}`).join(","), "Authorization=Bearer%20token", "password", "OTLP headers");
97
+ headers.onchange = () => {
98
+ const values = {};
99
+ try {
100
+ for (const part of headers.value.split(",").filter((p) => p.trim())) {
101
+ const i = part.indexOf("=");
102
+ if (i < 1) throw new Error(t("Use comma-separated name=value headers"));
103
+ values[part.slice(0, i).trim()] = decodeURIComponent(part.slice(i + 1).trim());
104
+ }
105
+ save({ headers: values });
106
+ } catch (e) { toast(e.message, true); }
107
+ };
108
+ row("otelHeadersRow", "OTLP headers", t("Comma-separated name=value pairs; percent-encode spaces and commas in values"), headers);
109
+ }
110
+ section("Export scope");
111
+ row("otelMetricsRow", "Export metrics", t("Also send duration and token histograms. Leave off for a traces-only service such as Langfuse"),
112
+ segs([["off", t("Off")], ["on", t("On")]], config.metrics ? "on" : "off", (v) => save({ metrics: v === "on" })));
113
+ row("otelSessionsRow", "Trace agent conversations", t("Reads all local sessions from Codex, Pi, Oh My Pi, Claude Code, Cowork, OpenCode and Gemini CLI, including calls not routed through Magpie. When content is included below, exports prompts, replies, tool arguments and tool output (including file contents and command output), with secrets masked"),
114
+ segs([["off", t("Off")], ["on", t("On")]], config.sessions ? "on" : "off", (v) => save({ sessions: v === "on" })));
115
+ section("Trace content");
116
+ const mode = !config.bodies ? "metadata" : config.bodiesWhole ? "full" : "limited";
117
+ const content = segs([["metadata", t("Metadata only")], ["limited", t("Up to 256 KB")], ["full", t("Full content")]], mode,
118
+ (v) => {
119
+ for (const button of content.querySelectorAll("button")) button.setAttribute("aria-pressed", String(button.classList.contains("on")));
120
+ save({ bodies: v !== "metadata", bodiesWhole: v === "full" });
121
+ });
122
+ content.setAttribute("role", "group");
123
+ content.setAttribute("aria-label", t("Request and response content"));
124
+ for (const [i, button] of [...content.querySelectorAll("button")].entries()) {
125
+ button.setAttribute("aria-pressed", String(["metadata", "limited", "full"][i] === mode));
126
+ }
127
+ const descriptions = {
128
+ metadata: "Send model, token, status and timing metadata only. Prompts, replies and tool content stay local",
129
+ limited: "Include requests and replies as trace input and output, with secrets masked. Each body is limited to 256 KB",
130
+ full: "Include complete requests and replies, with secrets masked. Large content may be refused by your collector",
131
+ };
132
+ row("otelBodiesRow", "Request and response content", t(descriptions[mode]), content);
133
+ if (s.otelEnv) box.append(el("div", "sub otel-env", t("Environment variables override these saved OTLP preferences")));
134
+ }
135
+
136
+ // renderLangfuse: Langfuse's host and keys. Nothing is saved until both keys
137
+ // are there; then the endpoint and the Basic header are made from them, and
138
+ // a first setup also adds the ingestion header (Langfuse's docs: without it
139
+ // OTLP data can show up to 10 minutes late), turns metrics off (Langfuse
140
+ // takes traces only) and export on. Every other header, and an ingestion
141
+ // header the user set themselves, is kept as it was.
142
+ function renderLangfuse(saved, config, save, row, field) {
143
+ if (lfDraft && saved && lfDraft.pk === saved.pk && lfDraft.sk === saved.sk && lfDraft.host === saved.host) lfDraft = null;
144
+ const d = lfDraft || { host: saved?.host || LANGFUSE_HOSTS[0][0], pk: saved?.pk || "", sk: saved?.sk || "" };
145
+ const preset = LANGFUSE_HOSTS.some(([h]) => h === d.host) ? d.host : "other";
146
+ const commit = () => {
147
+ d.pk = d.pk.trim(); d.sk = d.sk.trim();
148
+ lfDraft = { ...d };
149
+ const host = langfuseHost(d.host);
150
+ if (!host) return void toast(t("Enter your Langfuse address, such as https://langfuse.example.com"), true);
151
+ lfDraft.host = d.host = host;
152
+ if (!d.pk || !d.sk) return;
153
+ // a first setup: no Langfuse endpoint saved yet, or one with no sign-in.
154
+ // Another collector's headers are its own, never sent to Langfuse
155
+ const first = !saved || !Object.keys(config.headers || {}).some((k) => k.toLowerCase() === "authorization");
156
+ const headers = {};
157
+ let version = false;
158
+ for (const [k, v] of Object.entries(saved ? config.headers || {} : {})) {
159
+ if (k.toLowerCase() === "authorization") continue;
160
+ if (k.toLowerCase() === "x-langfuse-ingestion-version") version = true;
161
+ headers[k] = v;
162
+ }
163
+ headers.Authorization = "Basic " + btoa(unescape(encodeURIComponent(d.pk + ":" + d.sk)));
164
+ if (!version && first) headers["x-langfuse-ingestion-version"] = "4";
165
+ save({ endpoint: host + LANGFUSE_PATH, headers, ...(first ? { metrics: false, enabled: true } : {}) });
166
+ };
167
+ const other = field(preset === "other" ? d.host : "", "https://langfuse.example.com", "url", "Langfuse host");
168
+ other.onchange = () => { d.host = other.value; commit(); };
169
+ other.hidden = preset !== "other";
170
+ const where = el("div", "otel-host");
171
+ where.append(segs([...LANGFUSE_HOSTS.map(([h, name]) => [h, t(name)]), ["other", t("Self-hosted")]], preset, (v) => {
172
+ other.hidden = v !== "other";
173
+ d.host = v === "other" ? other.value : v;
174
+ lfDraft = { ...d };
175
+ if (v === "other") return void other.focus({ preventScroll: true });
176
+ commit();
177
+ }), other);
178
+ row("otelLangfuseHostRow", "Langfuse host", t("Langfuse Cloud's region, or the address of your own Langfuse"), where);
179
+ const pk = field(d.pk, "pk-lf-…", "text", "Public key");
180
+ pk.oninput = () => { d.pk = pk.value; lfDraft = { ...d }; };
181
+ pk.onchange = commit;
182
+ const sk = field(d.sk, "sk-lf-…", "password", "Secret key");
183
+ sk.oninput = () => { d.sk = sk.value; lfDraft = { ...d }; };
184
+ sk.onchange = commit;
185
+ const keys = el("div", "otel-keys");
186
+ keys.append(pk, sk);
187
+ const host = langfuseHost(d.host);
188
+ row("otelLangfuseKeysRow", "API keys", t("From your Langfuse project's Settings › API Keys. Traces go to {url}", { url: (host || "…") + LANGFUSE_PATH }), keys);
189
+ }
@@ -0,0 +1,46 @@
1
+ // Insights › Masking: what masking kept from vendors, request by request.
2
+ //
3
+ // A page the redact plugin adds to the window (kernel.js), its words in
4
+ // i18n.js beside this file. This file registers the page and its markup,
5
+ // before app.js; page.js, after app.js, is the page's code. The card on
6
+ // top says how much was masked over 7 or 30 days and where it went, the
7
+ // list under it each request (or each value) masking changed (between
8
+ // them, folded, demo.js's 小鹊 shows how masking works), and a
9
+ // request opened says what it carried, what the vendor got instead, and
10
+ // how each value was found and put back. The Masking alert closes the
11
+ // page (it sat in Settings › Usage, where nb5p looked for it in vain),
12
+ // after the list, so the requests still start in the first screen. The
13
+ // hooks are what the shell asks of it: open, refresh (the window came
14
+ // back), reload (Refresh in the sidebar), leave, and focus (a masked
15
+ // call's badge opens its request).
16
+ magpie.plugin("redact", (ctx) => {
17
+ ctx.slots.add("page", {
18
+ key: "masking",
19
+ title: "Masking",
20
+ html: `
21
+ <section class="msk-card" id="maskCard"></section>
22
+ <section class="msk-demo" id="maskDemo" data-no-pii>
23
+ <button type="button" class="md-row" id="mdRow" aria-expanded="false" aria-controls="mdBody">
24
+ <span class="md-thumb" aria-hidden="true"></span>
25
+ <span class="md-words"><span class="md-name" data-t>How masking works</span><span class="md-sub" data-t>Little Magpie walks one request through: passwords become placeholders before it leaves, and come back on your computer with the answer</span></span>
26
+ <span class="md-len">0:27</span>
27
+ <svg class="md-chev" viewBox="0 0 16 16" width="12" height="12" aria-hidden="true"><path d="m6 3.5 4.5 4.5L6 12.5" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
28
+ </button>
29
+ <div class="md-body" id="mdBody" hidden></div>
30
+ </section>
31
+ <section class="msk-list" id="maskList"></section>
32
+ <div class="list prefs msk-prefs" id="maskPrefs">
33
+ <div class="row pref" id="maskAlertRow">
34
+ <div class="who"><div class="name" data-t>Masking alert</div><div class="sub wraps" data-t>A notification when masking swaps a value for the first time: its kind and how many, never the value itself</div></div>
35
+ <div id="maskAlertSegs"></div>
36
+ </div>
37
+ </div>
38
+ <section class="msk-one" id="maskOne" hidden></section>
39
+ `,
40
+ open() { return maskPageOpen(); },
41
+ refresh(again) { return maskPageLoad(again); },
42
+ reload() { return maskPageLoad(true); },
43
+ leave() { maskTipOff(); },
44
+ focus(key) { maskOneOpen(String(key)); },
45
+ });
46
+ });