@yuriai/web 0.2.29-beta.7 → 0.2.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 (135) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/{AgentAvatar-BNk56-Uq.js → AgentAvatar-CR6dX_XT.js} +1 -1
  3. package/dist/assets/AssistantContactStatus-diuJawg6.js +3 -0
  4. package/dist/assets/{AssistantUnreadBadge-doY0Hft6.js → AssistantUnreadBadge-Bm2v4QFf.js} +1 -1
  5. package/dist/assets/{AssistantView-B4mEblYi.js → AssistantView-BfJ7SgWf.js} +1 -1
  6. package/dist/assets/{DiagramView-Diyf4LSt.js → DiagramView-Doy9Dw3w.js} +1 -1
  7. package/dist/assets/{FadeInOnReveal-l6XCssmS.js → FadeInOnReveal-CuOJu25b.js} +1 -1
  8. package/dist/assets/{GuiPluginSurface-rMZtD1SR.js → GuiPluginSurface-DD2js1dF.js} +1 -1
  9. package/dist/assets/{GuiPluginWindow-DXfru2tW.js → GuiPluginWindow-CIVNyw4s.js} +1 -1
  10. package/dist/assets/{Icon-p_czvEI7.js → Icon-BQczEnxm.js} +1 -1
  11. package/dist/assets/{ImageLoadingPlaceholder-Dg_CU5VT.js → ImageLoadingPlaceholder-KksxJaKp.js} +1 -1
  12. package/dist/assets/{LoadingImage-CcML4X1d.js → LoadingImage-Ch5MyA20.js} +1 -1
  13. package/dist/assets/MarkdownRenderer-DlwJOAKc.js +2 -0
  14. package/dist/assets/{MarkdownRendererImpl-CzpxCCAo.js → MarkdownRendererImpl-Bcew9khF.js} +1 -1
  15. package/dist/assets/{MarkstreamRendererImpl-BRsSpYVn.js → MarkstreamRendererImpl-DhcURvX5.js} +1 -1
  16. package/dist/assets/{MobileDetailNavigation-D_fj0utf.js → MobileDetailNavigation-6ZzfZFN1.js} +1 -1
  17. package/dist/assets/{MobileResizableSheet-B2GU_fkU.js → MobileResizableSheet-Bk3z4g6T.js} +1 -1
  18. package/dist/assets/{MobileShareBridge-Cr4nh-gT.js → MobileShareBridge-gejXx1yh.js} +1 -1
  19. package/dist/assets/MobileTabPageHeader-DkT6g7Mg.js +2 -0
  20. package/dist/assets/{MultiRunWindow-D22yagDA.js → MultiRunWindow-CRgoeY0-.js} +1 -1
  21. package/dist/assets/{OnboardingScreen-BYD95kJF.js → OnboardingScreen-CgQGvlEs.js} +1 -1
  22. package/dist/assets/{OverlayScrollbar-CvwSam3X.js → OverlayScrollbar-C9Ac564a.js} +1 -1
  23. package/dist/assets/SettingsView-Ds6O5lyc.js +29 -0
  24. package/dist/assets/{SettingsWindow-B_pQHcHp.js → SettingsWindow-BWn1_7aJ.js} +1 -1
  25. package/dist/assets/SetupTourDialog-CPIzaGRX.js +1 -0
  26. package/dist/assets/SetupTourDialog-CUzqT2sw.css +1 -0
  27. package/dist/assets/{TerminalView-C8T2MbNS.js → TerminalView-c7zh5vLz.js} +1 -1
  28. package/dist/assets/{ToolOutputDialog-CwOZ2rK4.js → ToolOutputDialog-CDOXuNnT.js} +1 -1
  29. package/dist/assets/VoiceSettings-C4dUe9aM.js +2 -0
  30. package/dist/assets/{YuriLogo-Bw8_KAED.js → YuriLogo-CpccdHvS.js} +1 -1
  31. package/dist/assets/YuriWordmark-hZ6K7Smk.js +1 -0
  32. package/dist/assets/{appThemeRegistry-CAryUA-D.js → appThemeRegistry-yYsjzEE3.js} +1 -1
  33. package/dist/assets/{button-DC4BhJtL.js → button-Cjciq1yh.js} +1 -1
  34. package/dist/assets/{capgoAdapter-n0GPI3Ea.js → capgoAdapter-Bu3WngVl.js} +1 -1
  35. package/dist/assets/{collapsible-D87ZOJIG.js → collapsible-BzCn4-sd.js} +1 -1
  36. package/dist/assets/{context-menu-CD5IEDb5.js → context-menu-BIjCIXOg.js} +1 -1
  37. package/dist/assets/{diagram-BzzPtmNA.js → diagram--zTR0vWJ.js} +1 -1
  38. package/dist/assets/{dialog-BCMKa538.js → dialog-rVkj8VgE.js} +1 -1
  39. package/dist/assets/dropdown-menu.styles-BDla58Rm.js +1 -0
  40. package/dist/assets/{es-C1m4Kl9P.js → es-B8dNq0Lv.js} +3 -3
  41. package/dist/assets/{fileMentionTouchSelection-PLpnmqHg.js → fileMentionTouchSelection-CmdNi_d0.js} +1 -1
  42. package/dist/assets/{fr-CnTFShIJ.js → fr-DbzWoYOD.js} +3 -3
  43. package/dist/assets/{gitApi-CP5napwr.js → gitApi-Qflz9_C8.js} +1 -1
  44. package/dist/assets/{input-BuAMQD1i.js → input-GVRUiwuQ.js} +1 -1
  45. package/dist/assets/insertionBoundaries-BUw7PHl1.js +1 -0
  46. package/dist/assets/{ja-C975DGmU.js → ja-BGk5BIrz.js} +3 -3
  47. package/dist/assets/{ko-Donv-MLw.js → ko-Broo5A8H.js} +3 -3
  48. package/dist/assets/{main-CSNJQF6u.js → main-Bjl7PEcs.js} +21 -21
  49. package/dist/assets/main-D-GaWYGg.js +2 -0
  50. package/dist/assets/{markdownHeightCache-gGCb2TW0.js → markdownHeightCache-C7UOJdkN.js} +1 -1
  51. package/dist/assets/{mcpQueries-BbNEHTru.js → mcpQueries-DHembIpw.js} +1 -1
  52. package/dist/assets/miniChat-CmBB3uQK.js +2 -0
  53. package/dist/assets/mobile-Dc6ZV3uE.js +2 -0
  54. package/dist/assets/{mobileBackNavigation-BFnxHmcJ.js → mobileBackNavigation-CsrEjMEM.js} +1 -1
  55. package/dist/assets/multirun-ruXWPXy8.js +3 -0
  56. package/dist/assets/{native-config-CxrxYHct.js → native-config-BcE2v-v8.js} +1 -1
  57. package/dist/assets/{pl-D22JxKm-.js → pl-not4wEra.js} +3 -3
  58. package/dist/assets/projectMeta-aZbJXiqn.js +1 -0
  59. package/dist/assets/{pt-BR-D6NkqDFy.js → pt-BR-3OzFQDGv.js} +3 -3
  60. package/dist/assets/pwa-BXcwcwBq.js +2 -0
  61. package/dist/assets/{queue-abort-optimistic-Bix-IUrI.js → queue-abort-optimistic-p3-XNzC5.js} +1 -1
  62. package/dist/assets/{readiness-Bo2P-IXf.js → readiness-CG6k1v_D.js} +1 -1
  63. package/dist/assets/renderElectronMiniChatApp-DKbHyoWv.js +2 -0
  64. package/dist/assets/renderMobileApp-ouUhZ7cf.js +28 -0
  65. package/dist/assets/{runtimeConfig-DmZoakxE.js → runtimeConfig-pROQUB9G.js} +1 -1
  66. package/dist/assets/runtimeEndpointReset-DPIu6oI9.js +149 -0
  67. package/dist/assets/select-DeP9bukP.js +1 -0
  68. package/dist/assets/sessionLookup-CNrni3E6.js +1 -0
  69. package/dist/assets/{sortable-tabs-strip-2alRozPo.js → sortable-tabs-strip-BloEQRck.js} +1 -1
  70. package/dist/assets/speechSettingsQueries-Dz5sTpjO.js +3 -0
  71. package/dist/assets/{store-XWRveCM0.js → store-CKIMMlXR.js} +4 -3
  72. package/dist/assets/{textarea-Cj7oz4TZ.js → textarea-B4mWtnN5.js} +1 -1
  73. package/dist/assets/{tooltip-BUDeDvMc.js → tooltip-BuZ86ipm.js} +1 -1
  74. package/dist/assets/tour-Db44qwfs.js +1 -0
  75. package/dist/assets/types-DodQbc1N.js +2 -0
  76. package/dist/assets/{uk-DEV7vjeo.js → uk-DyZ2SwUJ.js} +3 -3
  77. package/dist/assets/{useAppFontEffects-DupRRD7K.js → useAppFontEffects-DtteQwrV.js} +31 -31
  78. package/dist/assets/useDesktopWindowControlsLayout-BDhl0M6j.js +1 -0
  79. package/dist/assets/{dropdown-menu.styles-DEOmf_B_.js → useDictation-CwX05CAo.js} +1 -1
  80. package/dist/assets/{useEffectiveDirectory-DB5tS-o5.js → useEffectiveDirectory-DcTO2pCq.js} +1 -1
  81. package/dist/assets/{useMobileNavigationStore-BsWXpW7G.js → useMobileNavigationStore-CWXCC9MY.js} +7 -7
  82. package/dist/assets/usePluginsStore-B6vwvN4g.js +1 -0
  83. package/dist/assets/{useWorkerHighlightedLines-B76dqB8T.js → useWorkerHighlightedLines-B9uHlxuS.js} +1 -1
  84. package/dist/assets/{zh-CN-6GRNLBLK.js → zh-CN-aNIWxYun.js} +3 -3
  85. package/dist/assets/{zh-TW-7oorZFq9.js → zh-TW-B1IdCz5g.js} +3 -3
  86. package/dist/index.html +5 -5
  87. package/dist/mini-chat.html +5 -5
  88. package/dist/mobile.html +5 -5
  89. package/package.json +4 -3
  90. package/server/lib/assistants/DOCUMENTATION.md +1 -1
  91. package/server/lib/assistants/contact-tools.js +1 -1
  92. package/server/lib/assistants/harness.js +3 -3
  93. package/server/lib/client-auth/pairing.js +4 -1
  94. package/server/lib/client-auth/pairing.test.js +41 -0
  95. package/server/lib/client-auth/remote-clients.js +6 -2
  96. package/server/lib/client-auth/remote-clients.test.js +42 -0
  97. package/server/lib/gui-customization/DOCUMENTATION.md +13 -2
  98. package/server/lib/gui-customization/session-skill.js +2 -2
  99. package/server/lib/gui-customization/session-skill.test.js +1 -1
  100. package/server/lib/gui-customization/skill/SKILL.md +8 -3
  101. package/server/lib/gui-customization/skill/references/appearance.md +6 -6
  102. package/server/lib/gui-customization/skill/references/file-previews.md +1 -1
  103. package/server/lib/gui-customization/skill/references/global-pages.md +1 -1
  104. package/server/lib/gui-customization/skill/references/ui-surfaces.md +228 -0
  105. package/server/lib/gui-customization/skill/references/workflow.md +31 -32
  106. package/server/lib/llm/DOCUMENTATION.md +14 -1
  107. package/server/lib/llm/bridge-plugin.bundle.js +13 -1136
  108. package/server/lib/llm/bridge-plugin.js +4 -4
  109. package/server/lib/llm/bridge-plugin.test.js +31 -4
  110. package/server/lib/opencode/DOCUMENTATION.md +7 -0
  111. package/server/lib/opencode/core-routes.js +3 -2
  112. package/server/lib/opencode/core-routes.test.js +12 -2
  113. package/server/lib/opencode/npm-registry.js +9 -2
  114. package/server/lib/opencode/npm-registry.test.js +22 -1
  115. package/server/lib/opencode/plugin-routes.js +1 -0
  116. package/server/lib/remote-desktop/DOCUMENTATION.md +4 -0
  117. package/server/lib/ui-auth/DOCUMENTATION.md +2 -0
  118. package/dist/assets/AssistantContactStatus-D0cP0UOu.js +0 -3
  119. package/dist/assets/MarkdownRenderer-DVKRLcN5.js +0 -2
  120. package/dist/assets/MobileTabPageHeader-l9R9cIsn.js +0 -2
  121. package/dist/assets/SettingsView-wm-g9vvT.js +0 -30
  122. package/dist/assets/insertionBoundaries-DxuIUK0X.js +0 -1
  123. package/dist/assets/main-CKdt6zYu.js +0 -2
  124. package/dist/assets/miniChat-Qg-TMzPz.js +0 -2
  125. package/dist/assets/mobile-LXYsDpBs.js +0 -2
  126. package/dist/assets/multirun-B1BNFN80.js +0 -3
  127. package/dist/assets/projectMeta-D4-hBAf0.js +0 -1
  128. package/dist/assets/renderElectronMiniChatApp-C1vzQUQn.js +0 -2
  129. package/dist/assets/renderMobileApp-Bxlepbqn.js +0 -28
  130. package/dist/assets/runtimeEndpointReset-CGWAfy_Y.js +0 -149
  131. package/dist/assets/sessionLookup-CgL50yRb.js +0 -1
  132. package/dist/assets/speechSettingsQueries-BHjkhNvX.js +0 -4
  133. package/dist/assets/types-D7m_3iXu.js +0 -2
  134. package/dist/assets/useDesktopWindowControlsLayout-DBGiDEmg.js +0 -1
  135. /package/dist/assets/{SettingsView-C0HSdVvS.css → VoiceSettings-C0HSdVvS.css} +0 -0
package/dist/index.html CHANGED
@@ -560,7 +560,7 @@
560
560
  opacity: 0.72;
561
561
  }
562
562
  </style>
563
- <script type="module" crossorigin src="/assets/main-CKdt6zYu.js"></script>
563
+ <script type="module" crossorigin src="/assets/main-D-GaWYGg.js"></script>
564
564
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
565
565
  <link rel="modulepreload" crossorigin href="/assets/runtime-auth-DBn9yahL.js">
566
566
  <link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEZ1K7qW.js">
@@ -592,10 +592,10 @@
592
592
  <link rel="modulepreload" crossorigin href="/assets/terminalApi-ChZhb60_.js">
593
593
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-D6bwc3Kj.js">
594
594
  <link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
595
- <link rel="modulepreload" crossorigin href="/assets/types-D7m_3iXu.js">
596
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-n0GPI3Ea.js">
597
- <link rel="modulepreload" crossorigin href="/assets/native-config-CxrxYHct.js">
598
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-DmZoakxE.js">
595
+ <link rel="modulepreload" crossorigin href="/assets/types-DodQbc1N.js">
596
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-Bu3WngVl.js">
597
+ <link rel="modulepreload" crossorigin href="/assets/native-config-BcE2v-v8.js">
598
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-pROQUB9G.js">
599
599
  <link rel="stylesheet" crossorigin href="/assets/src-EZMbcCtg.css">
600
600
  </head>
601
601
  <body class="h-full bg-background text-foreground">
@@ -77,7 +77,7 @@
77
77
  .dark #initial-loading img { filter: invert(1); }
78
78
  </style>
79
79
 
80
- <script type="module" crossorigin src="/assets/miniChat-Qg-TMzPz.js"></script>
80
+ <script type="module" crossorigin src="/assets/miniChat-CmBB3uQK.js"></script>
81
81
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
82
82
  <link rel="modulepreload" crossorigin href="/assets/runtime-auth-DBn9yahL.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEZ1K7qW.js">
@@ -109,10 +109,10 @@
109
109
  <link rel="modulepreload" crossorigin href="/assets/terminalApi-ChZhb60_.js">
110
110
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-D6bwc3Kj.js">
111
111
  <link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
112
- <link rel="modulepreload" crossorigin href="/assets/types-D7m_3iXu.js">
113
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-n0GPI3Ea.js">
114
- <link rel="modulepreload" crossorigin href="/assets/native-config-CxrxYHct.js">
115
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-DmZoakxE.js">
112
+ <link rel="modulepreload" crossorigin href="/assets/types-DodQbc1N.js">
113
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-Bu3WngVl.js">
114
+ <link rel="modulepreload" crossorigin href="/assets/native-config-BcE2v-v8.js">
115
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-pROQUB9G.js">
116
116
  <link rel="stylesheet" crossorigin href="/assets/src-EZMbcCtg.css">
117
117
  </head>
118
118
  <body class="h-full bg-background text-foreground">
package/dist/mobile.html CHANGED
@@ -64,7 +64,7 @@
64
64
  </script>
65
65
 
66
66
  <style>.dark #mobile-startup-logo img { filter: invert(1); }</style>
67
- <script type="module" crossorigin src="/assets/mobile-LXYsDpBs.js"></script>
67
+ <script type="module" crossorigin src="/assets/mobile-Dc6ZV3uE.js"></script>
68
68
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
69
69
  <link rel="modulepreload" crossorigin href="/assets/runtime-auth-DBn9yahL.js">
70
70
  <link rel="modulepreload" crossorigin href="/assets/runtime-switch-DEZ1K7qW.js">
@@ -96,10 +96,10 @@
96
96
  <link rel="modulepreload" crossorigin href="/assets/terminalApi-ChZhb60_.js">
97
97
  <link rel="modulepreload" crossorigin href="/assets/runtime-file-download-D6bwc3Kj.js">
98
98
  <link rel="modulepreload" crossorigin href="/assets/platform-DFJEtBlo.js">
99
- <link rel="modulepreload" crossorigin href="/assets/types-D7m_3iXu.js">
100
- <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-n0GPI3Ea.js">
101
- <link rel="modulepreload" crossorigin href="/assets/native-config-CxrxYHct.js">
102
- <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-DmZoakxE.js">
99
+ <link rel="modulepreload" crossorigin href="/assets/types-DodQbc1N.js">
100
+ <link rel="modulepreload" crossorigin href="/assets/capgoAdapter-Bu3WngVl.js">
101
+ <link rel="modulepreload" crossorigin href="/assets/native-config-BcE2v-v8.js">
102
+ <link rel="modulepreload" crossorigin href="/assets/runtimeConfig-pROQUB9G.js">
103
103
  <link rel="stylesheet" crossorigin href="/assets/src-EZMbcCtg.css">
104
104
  </head>
105
105
  <body class="h-full bg-background text-foreground">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuriai/web",
3
- "version": "0.2.29-beta.7",
3
+ "version": "0.2.29",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./server/index.js",
@@ -31,9 +31,7 @@
31
31
  "@larksuite/channel": "0.7.1",
32
32
  "@larksuite/vercel-chat-adapter": "0.3.0",
33
33
  "@octokit/rest": "^22.0.1",
34
- "@opencode/ai": "2.2.1",
35
34
  "@opencode/client": "^2.0.23",
36
- "@opencode/core": "2.2.1",
37
35
  "@opencode/schema": "^2.0.23",
38
36
  "@simplewebauthn/server": "13.3.1",
39
37
  "adm-zip": "^0.5.16",
@@ -60,6 +58,8 @@
60
58
  "yaml": "^2.8.1"
61
59
  },
62
60
  "devDependencies": {
61
+ "@opencode/ai": "2.2.1",
62
+ "@opencode/core": "2.2.1",
63
63
  "@base-ui/react": "^1.4.0",
64
64
  "@codemirror/lang-cpp": "^6.0.3",
65
65
  "@codemirror/lang-go": "^6.0.1",
@@ -108,6 +108,7 @@
108
108
  "supertest": "^7.2.2",
109
109
  "tailwindcss": "^4.0.0",
110
110
  "tsx": "^4.20.6",
111
+ "tsdown": "0.23.5",
111
112
  "tw-animate-css": "^1.3.8",
112
113
  "typescript": "~5.9.0",
113
114
  "typescript-eslint": "^8.39.1",
@@ -510,7 +510,7 @@ and keep their existing error result handling.
510
510
 
511
511
  - Tools use native function calling only (`message.tool_calls`); text is never parsed for tool calls and no schema catalog is repeated in the prompt. A response without tool calls is the final reply.
512
512
  - Public progress uses the harness-owned `notify_user` tool `{ text }` (max 2,000 characters), usually batched with the next call. Its text emits `done:true` bubbles when the response arrives, before the batch executes. Batched notes are dropped from execution and stored as the assistant message's public text (`contactPublicText`); a notes-only response executes and the loop continues. Text beside tool calls is model narration and stays private. Later rounds replay delivered notes to the model as `notify_user` calls.
513
- - The model is prompted to send a progress message only when it adds information the user does not already have (a direction worth correcting, a meaningful finding, a blocker, or expected long work), then give a short final outcome. A message is not required before each tool call, and successful lookups need no separate confirmation. Public messages share the existing SSE, durable contact rows, and turn-global indices across web, desktop, VS Code, hosted mobile, and Capacitor. No timer narration, tool logs, progress widgets, or synthetic chat messages are added. Timing of model-authored milestones remains model policy; the transport guarantees immediate delivery once an explicit public record arrives.
513
+ - The model defaults to quiet execution and one short final reply, usually one or two sentences, expanding only as the requested deliverable needs. Before any public message it checks necessity, repetition against earlier delivered messages, and brevity. Progress is reserved for new information needing attention before the final answer (a decision/blocker, consequential direction change, or unexpected delay affecting expectations); novelty alone is insufficient. Updates that can wait are combined into the final outcome without recapping earlier messages. The `notify_user` description carries the same policy. Public messages share the existing SSE, durable contact rows, and turn-global indices across web, desktop, VS Code, hosted mobile, and Capacitor. No timer narration, tool logs, progress widgets, or synthetic chat messages are added. Timing of model-authored milestones remains model policy; the transport guarantees immediate delivery once an explicit public record arrives.
514
514
  - Completion notifications use the latest spoken message, keeping earlier progress out of the final notification body. Transcript persistence reconciles by stable bubble IDs and adds only remaining messages.
515
515
  - Tool results remain model context for every tool. The outcome projector uses assistant-authored text only. Terminal operations retain the mutation stop gate. Successful interactive assign/watch gets a result-only Agent on the same provider/model with **only** `reference_resource`, followed by a final reply; no coding, loader or business mutation tool is available. Other terminal operations, failures and resets retain their tools-disabled summary. A failed/empty summary surfaces a turn error; a completed side effect stays committed and is never replayed by the result phase.
516
516
  - Tools-disabled summaries project actual completed tool results into labeled, quoted user-role evidence (tool name, error flag and public text only), removing native call/result framing. Some providers reject historical native calls when their tool definitions are absent. The reference-only phase and ordinary Agent rounds retain native call/result association; no execution or permission fallback is introduced. Reset summaries still receive only the current user request and the successful reset result.
@@ -66,7 +66,7 @@ export function createNotifyUserTool() {
66
66
  return {
67
67
  name: NOTIFY_USER_TOOL_NAME,
68
68
  label: 'Notify user',
69
- description: 'Send the user a short progress message while you keep working; batch it with your next tool call. Use only when it tells them something they do not already know: a direction they may want to correct, a finding that matters, a blocker, or that the work will take a while. Never use it to announce the next step or repeat the plan. The final answer is your plain reply, not this tool.',
69
+ description: 'Send a brief progress message only when new information needs user attention before the final answer: a decision or blocker, a consequential change of direction, or an unexpected delay that changes expectations. Default to working quietly; if the information can wait, include it in the final answer instead. Check earlier public messages to avoid repetition and combine related updates. Batch with your next tool call. The final answer is your plain reply, not this tool.',
70
70
  parameters: typeboxObject({ text: typeboxString('Short message in the user language.') }),
71
71
  execute: async (_toolCallId, params) => {
72
72
  const text = typeof params?.text === 'string' ? params.text.trim() : '';
@@ -107,11 +107,11 @@ export const CONTACT_SYSTEM_PROMPT = [
107
107
  "You are Yuri's in-app assistant — a personable contact focused on understanding the user, communicating naturally, coordinating work, and following up on results.",
108
108
  'For substantive tasks, default to finding the relevant existing OpenCode workspace and handing the task to a worker session with assign_session. Carry the user goal, relevant context, constraints, and verification expectations into that session; follow its results and explain the outcome in normal conversation.',
109
109
  'Handle simple questions, file lookups, and small, clearly scoped configuration changes directly when their scope and verification are straightforward. As a task grows into implementation, multi-step debugging, or broad changes, hand it to a worker session. An explicit user request to handle a bounded task yourself can use the direct tools.',
110
- 'Reply in short chat bubbles: a few sentences each, separated by a blank line.',
111
- 'Talk like a person in the user\'s language. One short spoken bubble at a time — never a wall of paragraphs.',
110
+ 'Default to one short final reply per user request, usually one or two sentences. Lead with the answer and include only what the user needs; expand when the requested deliverable requires detail. Do not split one answer into multiple chat bubbles unnecessarily.',
111
+ 'Talk naturally and say less. Before sending any public message, check that it is necessary, adds information not already delivered in this conversation, and cannot be shortened without losing something the user needs. Omit repeated acknowledgments, plans, status, and conclusions; mention an earlier point again only when requested or needed to explain a change.',
112
112
  'Reply in the language of the user\'s messages, unless they explicitly request another language. Infer it from their latest substantive message and conversation context, never from the app interface locale. For ambiguous messages or background follow-ups, continue the established conversation language.',
113
113
  'Keep private reasoning and tool traces private.',
114
- 'Send a progress message when it tells the user something they do not already know: a direction they may want to correct, a finding that matters, a blocker, or that the work will take a while. Skip messages that would only repeat the plan or narrate a step. Keep the final answer to the remaining outcome instead of repeating earlier updates.',
114
+ 'Work quietly by default. Send a progress message only when new information needs the user\'s attention before the final answer: a decision or blocker, a consequential change of direction, or an unexpected delay that changes their expectations. Novelty alone is not a reason to send. If it can wait, fold it into the final reply; combine related updates instead of sending them separately. Keep the final answer to the remaining outcome without recapping earlier messages.',
115
115
  'Progress messages go only through notify_user, batched with your next tool call; it is delivered immediately. Any other text alongside a tool call is never shown to the user. A response without tool calls is your final reply. Tool results are evidence for you to summarize in your own words; never copy their stock confirmation wording into your reply.',
116
116
  'Do not expose tool traces, Activity, or editor actions.',
117
117
  'Use list_scheduled_tasks to review tasks. To create, change, enable or pause tasks, first load yuri.tasks and use its returned schemas with exact IDs from the listing.',
@@ -138,6 +138,7 @@ export const createClientPairingRuntime = ({
138
138
  allowedClientKinds: normalizeAllowedClientKinds(session.allowedClientKinds),
139
139
  createdByClientId: normalizeOptionalString(session.createdByClientId),
140
140
  usesRelay: session.usesRelay === true,
141
+ relayUrl: session.usesRelay === true ? normalizeOptionalString(session.relayUrl) : null,
141
142
  }))
142
143
  .filter((session) => session.secretHash.length > 0)
143
144
  : [],
@@ -176,7 +177,7 @@ export const createClientPairingRuntime = ({
176
177
  });
177
178
  };
178
179
 
179
- const createPairingSession = async ({ label, allowedClientKinds, createdByClientId, usesRelay } = {}) => {
180
+ const createPairingSession = async ({ label, allowedClientKinds, createdByClientId, usesRelay, relayUrl } = {}) => {
180
181
  return withStoreMutation(async () => {
181
182
  const store = await readStore();
182
183
  sweepExpiredSessionsFromStore(store);
@@ -194,6 +195,7 @@ export const createClientPairingRuntime = ({
194
195
  allowedClientKinds: normalizeAllowedClientKinds(allowedClientKinds),
195
196
  createdByClientId: normalizeOptionalString(createdByClientId),
196
197
  usesRelay: usesRelay === true,
198
+ relayUrl: usesRelay === true ? normalizeOptionalString(relayUrl) : null,
197
199
  };
198
200
  store.sessions.push(session);
199
201
  await writeStore(store);
@@ -279,6 +281,7 @@ export const createClientPairingRuntime = ({
279
281
  deviceModel,
280
282
  appVersion,
281
283
  usesRelay: session.usesRelay === true,
284
+ relayUrl: session.relayUrl,
282
285
  });
283
286
  session.usedAt = nowIso();
284
287
  session.clientId = result.client?.id || null;
@@ -5,6 +5,7 @@ import path from 'node:path';
5
5
  import crypto from 'node:crypto';
6
6
 
7
7
  import { createClientPairingRuntime } from './pairing.js';
8
+ import { createRemoteClientAuthRuntime } from './remote-clients.js';
8
9
 
9
10
  const makeRuntime = async (options = {}) => {
10
11
  const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'yuri-pairing-test-'));
@@ -35,6 +36,46 @@ const makeRuntime = async (options = {}) => {
35
36
  };
36
37
 
37
38
  describe('client auth pairing runtime', () => {
39
+ it('keeps the same device paired through different relays independently across restart', async () => {
40
+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'yuri-pairing-relays-test-'));
41
+ const authOptions = { fsPromises: fs, path, crypto, storePath: path.join(dir, 'clients.json') };
42
+ const clients = createRemoteClientAuthRuntime(authOptions);
43
+ const pairingOptions = {
44
+ fsPromises: fs, path, crypto, storePath: path.join(dir, 'pairing.json'), remoteClientAuthRuntime: clients,
45
+ };
46
+ const pair = async (relayUrl, label) => {
47
+ const { pairing } = await createClientPairingRuntime(pairingOptions).createPairingSession({
48
+ label, usesRelay: Boolean(relayUrl), relayUrl,
49
+ });
50
+ return createClientPairingRuntime(pairingOptions).redeemPairingSession({
51
+ pairingId: pairing.id, secret: pairing.secret, clientKind: 'mobile', dedupeKey: 'same-device',
52
+ });
53
+ };
54
+ try {
55
+ const first = await pair('wss://relay-one.example/ws', 'Phone via first relay');
56
+ const second = await pair('wss://relay-two.example/ws', 'Phone via second relay');
57
+ const reopened = createRemoteClientAuthRuntime(authOptions);
58
+ expect((await reopened.listClients()).map((client) => client.id)).toEqual([first.client.id, second.client.id]);
59
+ expect((await reopened.authenticateBearerToken(first.token))?.ok).toBe(true);
60
+ expect((await reopened.authenticateBearerToken(second.token))?.ok).toBe(true);
61
+
62
+ const replacement = await pair('wss://relay-one.example/ws', 'Phone via first relay again');
63
+ expect(await reopened.authenticateBearerToken(first.token)).toBe(null);
64
+ expect((await reopened.authenticateBearerToken(second.token))?.ok).toBe(true);
65
+ expect((await reopened.authenticateBearerToken(replacement.token))?.ok).toBe(true);
66
+ expect(await reopened.listClients()).toHaveLength(2);
67
+
68
+ const direct = await pair(null, 'Phone via LAN');
69
+ expect(await reopened.listClients()).toHaveLength(3);
70
+ await reopened.revokeClient(second.client.id);
71
+ expect(await reopened.authenticateBearerToken(second.token)).toBe(null);
72
+ expect((await reopened.authenticateBearerToken(replacement.token))?.ok).toBe(true);
73
+ expect((await reopened.authenticateBearerToken(direct.token))?.ok).toBe(true);
74
+ } finally {
75
+ await fs.rm(dir, { recursive: true, force: true });
76
+ }
77
+ });
78
+
38
79
  it('redeems a pairing session once and propagates client metadata', async () => {
39
80
  const { runtime, remoteClientAuthRuntime } = await makeRuntime();
40
81
  const created = await runtime.createPairingSession({ allowedClientKinds: ['mobile'] });
@@ -87,6 +87,7 @@ export const createRemoteClientAuthRuntime = ({ fsPromises, path, crypto, storeP
87
87
  clientKind: normalizeOptionalString(client.clientKind),
88
88
  dedupeKey: normalizeOptionalString(client.dedupeKey),
89
89
  usesRelay: client.usesRelay === true,
90
+ relayUrl: client.usesRelay === true ? normalizeOptionalString(client.relayUrl) : null,
90
91
  lastTransport: client.lastTransport === 'relay' || client.lastTransport === 'direct' ? client.lastTransport : null,
91
92
  ...normalizeMetadata(client),
92
93
  }))
@@ -164,6 +165,7 @@ export const createRemoteClientAuthRuntime = ({ fsPromises, path, crypto, storeP
164
165
  deviceModel,
165
166
  appVersion,
166
167
  usesRelay,
168
+ relayUrl,
167
169
  } = {}) => {
168
170
  return withStoreMutation(async () => {
169
171
  const store = await readStore();
@@ -186,16 +188,18 @@ export const createRemoteClientAuthRuntime = ({ fsPromises, path, crypto, storeP
186
188
  deviceModel: normalizeOptionalString(deviceModel),
187
189
  appVersion: normalizeOptionalString(appVersion),
188
190
  usesRelay: usesRelay === true,
191
+ relayUrl: usesRelay === true ? normalizeOptionalString(relayUrl) : null,
189
192
  };
190
193
  if (normalizedDedupeKey) {
191
- store.clients = store.clients.filter((entry) => entry.dedupeKey !== normalizedDedupeKey);
194
+ const sameConnection = (entry) => entry.usesRelay === client.usesRelay && entry.relayUrl === client.relayUrl;
195
+ store.clients = store.clients.filter((entry) => !(sameConnection(entry) && entry.dedupeKey === normalizedDedupeKey));
192
196
  // Migrate pre-clientKind desktop tokens: a deduped, kind-tagged mint
193
197
  // supersedes legacy records with the same label that carry neither a
194
198
  // kind nor a dedupe key — those tokens can no longer pass the
195
199
  // desktop-local client-create gate and would otherwise linger forever.
196
200
  if (client.clientKind) {
197
201
  store.clients = store.clients.filter((entry) =>
198
- !(entry.label === client.label && !entry.clientKind && !entry.dedupeKey));
202
+ !(sameConnection(entry) && entry.label === client.label && !entry.clientKind && !entry.dedupeKey));
199
203
  }
200
204
  }
201
205
  store.clients.push(client);
@@ -153,6 +153,48 @@ describe('remote client auth runtime', () => {
153
153
  }
154
154
  });
155
155
 
156
+ it('preserves legacy relay credentials whose endpoint is unknown', async () => {
157
+ const { dir, runtime } = await createRuntime();
158
+ try {
159
+ const legacy = await runtime.createClient({ label: 'Phone', clientKind: 'mobile', dedupeKey: 'phone', usesRelay: true });
160
+ const untagged = await runtime.createClient({ label: 'Phone', usesRelay: true });
161
+ const storePath = path.join(dir, 'remote-clients.json');
162
+ const store = JSON.parse(await fs.readFile(storePath, 'utf8'));
163
+ for (const client of store.clients) delete client.relayUrl;
164
+ await fs.writeFile(storePath, JSON.stringify(store));
165
+
166
+ const relay = await runtime.createClient({
167
+ label: 'Phone', clientKind: 'mobile', dedupeKey: 'phone', usesRelay: true, relayUrl: 'wss://relay.example/ws',
168
+ });
169
+ const direct = await runtime.createClient({ label: 'Phone', clientKind: 'mobile', dedupeKey: 'phone' });
170
+ expect(await runtime.listClients()).toHaveLength(4);
171
+ for (const connection of [legacy, untagged, relay, direct]) {
172
+ expect((await runtime.authenticateBearerToken(connection.token))?.ok).toBe(true);
173
+ }
174
+ } finally {
175
+ await fs.rm(dir, { recursive: true, force: true });
176
+ }
177
+ });
178
+
179
+ it('keeps every connection credential when a scoped replacement write fails', async () => {
180
+ const { dir, runtime } = await createRuntime();
181
+ try {
182
+ const input = { label: 'Phone', clientKind: 'mobile', dedupeKey: 'phone', usesRelay: true };
183
+ const first = await runtime.createClient({ ...input, relayUrl: 'wss://relay-one.example/ws' });
184
+ const second = await runtime.createClient({ ...input, relayUrl: 'wss://relay-two.example/ws' });
185
+ const failing = createRemoteClientAuthRuntime({
186
+ fsPromises: { ...fs, writeFile: async () => { throw new Error('Write failed'); } },
187
+ path, crypto, storePath: path.join(dir, 'remote-clients.json'),
188
+ });
189
+ await expect(failing.createClient({ ...input, relayUrl: 'wss://relay-one.example/ws' })).rejects.toThrow('Write failed');
190
+ expect((await runtime.listClients()).map((client) => client.id)).toEqual([first.client.id, second.client.id]);
191
+ expect((await runtime.authenticateBearerToken(first.token))?.ok).toBe(true);
192
+ expect((await runtime.authenticateBearerToken(second.token))?.ok).toBe(true);
193
+ } finally {
194
+ await fs.rm(dir, { recursive: true, force: true });
195
+ }
196
+ });
197
+
156
198
  it('does not resurrect revoked clients after concurrent auth traffic', async () => {
157
199
  const { dir, runtime } = await createRuntime();
158
200
  try {
@@ -1,18 +1,29 @@
1
1
  # Built-in Yuri customization skill
2
2
 
3
- `session-skill.js` stages the shipped `skill/SKILL.md` and its six references in
3
+ `session-skill.js` stages the shipped `skill/SKILL.md` and its references in
4
4
  an application-owned, content-fingerprinted `session-skills` directory. Only a
5
5
  short discovery pointer enters `session.instructions.entry` under
6
6
  `yuri.customization`. Agents load the skill and matching references on demand;
7
7
  no global OpenCode config, installed user skills, project files or old sessions
8
8
  are modified.
9
9
 
10
- References are organized by capability: window APIs, appearance, global pages,
10
+ References are organized by capability: window APIs, appearance, UI surfaces, global pages,
11
11
  file parsing/previews, preview actions/exports, and package workflow. Host contracts
12
12
  and verification criteria are separate from illustrative templates and case
13
13
  studies. Runmark and Eficy remain integration references; their service protocols,
14
14
  renderers and compatibility choices are not requirements for unrelated plugins.
15
15
 
16
+ `references/ui-surfaces.md` is the shipped structural/style map for plugin authors
17
+ without a source checkout. It covers shell, sidebar, header, transcript, composer,
18
+ preview, Settings, overlays, tokens/cascade and native transparency boundaries.
19
+ The entry and appearance reference route existing-block CSS work there first.
20
+ DOM hooks are version-sensitive implementation guidance, not new public APIs.
21
+ When these owners change, update their map and recipes alongside the owning docs.
22
+
23
+ The authoring workflow defaults to directly written `gui-experimental.cjs` with
24
+ host-provided modules and inline assets. Local edits use the existing revision
25
+ watcher; compilation is only an optional path for typed/JSX or bundled sources.
26
+
16
27
  ## Admission ownership
17
28
 
18
29
  - Shared-service sessions: the existing scheduled-task admission route installs
@@ -2,7 +2,7 @@ import { readFile, mkdir, writeFile, rename, rm } from 'node:fs/promises';
2
2
  import { createHash, randomUUID } from 'node:crypto';
3
3
  import path from 'node:path';
4
4
 
5
- const files = ['SKILL.md', 'references/appearance.md', 'references/gui-api.md', 'references/workflow.md', 'references/global-pages.md', 'references/file-previews.md', 'references/preview-exports.md'];
5
+ const files = ['SKILL.md', 'references/appearance.md', 'references/ui-surfaces.md', 'references/gui-api.md', 'references/workflow.md', 'references/global-pages.md', 'references/file-previews.md', 'references/preview-exports.md'];
6
6
 
7
7
  /** Stage immutable, shipped instructions; never edit the user's global skills/config. */
8
8
  export function createCustomizationSkillInstaller({ yuriDataDir }) {
@@ -26,7 +26,7 @@ export function createCustomizationSkillInstaller({ yuriDataDir }) {
26
26
  return async (client, sessionID) => {
27
27
  const file = await prepare();
28
28
  await client.session.instructions.entry.put({ sessionID, key: 'yuri.customization',
29
- value: `Yuri customization: for appearance (themes, CSS/layout, Logo, macOS Dock), global pages/tabs, custom file parsing/previews, preview exports, or GUI panels/commands/settings, read ${JSON.stringify(file)} before choosing a plugin API. Use its capability references for supported contracts and runtime limits, and its workflow for building, installation and rollback. Install or apply changes only when requested.`,
29
+ value: `Yuri customization: for appearance (themes, CSS/layout, Logo, macOS Dock), global pages/tabs, custom file parsing/previews, preview exports, or GUI panels/commands/settings, read ${JSON.stringify(file)} before choosing a plugin API. Its UI structure/style reference maps built-in blocks, selectors, tokens and transparency layers; capability references cover contracts and runtime limits. Use its workflow for building, installation and rollback. Install or apply changes only when requested.`,
30
30
  });
31
31
  };
32
32
  }
@@ -23,7 +23,7 @@ describe('built-in customization instructions', () => {
23
23
  expect(entry.value.length).toBeLessThan(1500);
24
24
  const file = JSON.parse(entry.value.match(/read (".*?") before/)[1]);
25
25
  expect(await fs.readFile(file, 'utf8')).toContain('name: yuri-customization');
26
- for (const name of ['appearance', 'gui-api', 'workflow', 'global-pages', 'file-previews', 'preview-exports']) expect((await fs.readFile(path.join(path.dirname(file), 'references', `${name}.md`), 'utf8')).length).toBeGreaterThan(500);
26
+ for (const name of ['appearance', 'ui-surfaces', 'gui-api', 'workflow', 'global-pages', 'file-previews', 'preview-exports']) expect((await fs.readFile(path.join(path.dirname(file), 'references', `${name}.md`), 'utf8')).length).toBeGreaterThan(500);
27
27
  expect(await fs.readFile(path.join(path.dirname(file), 'references', 'appearance.md'), 'utf8')).toContain('yuri.branding');
28
28
  expect(put.mock.calls[1][0].value).toBe(entry.value);
29
29
  });
@@ -11,18 +11,23 @@ Use a standard OpenCode GUI plugin to change the running Yuri UI without modifyi
11
11
 
12
12
  1. Identify the requested change and target client: Web, Electron, VS Code, hosted mobile, or Capacitor. Separate visual changes from backend behavior. Inspect the user's existing plugin/config before changing it. An explanation request does not authorize installation.
13
13
  2. Choose the extension point by the requested capability and read its reference:
14
+ - Existing UI blocks, backgrounds/transparency, selectors, spacing and built-in style tokens: [UI structure and styles](references/ui-surfaces.md). Start here for CSS changes before inspecting application bundles.
14
15
  - Themes, CSS, logos, Dock icons: [appearance](references/appearance.md).
15
16
  - Global main-content tabs and titlebar entries: [global pages](references/global-pages.md).
16
17
  - Custom file suffixes, parsers, inline/mobile previews and file icons: [file previews](references/file-previews.md).
17
18
  - Preview toolbar placement, PDF/PNG/HTML export and iframe snapshot boundaries: [preview actions and exports](references/preview-exports.md).
18
19
  - Panels, commands, settings, files, RPC, lifecycle, runtime support: [GUI API](references/gui-api.md).
19
- - Every implementation: [package, build, install, verification and rollback](references/workflow.md).
20
- 3. Build only the requested capabilities in a user-approved plugin directory. Use declarative registries for appearance, window APIs for GUI behavior, and a server or native part only when the required capability needs it. Keep dependencies aligned with the supported SDK contract and emit the GUI as one prebuilt CommonJS file.
21
- 4. Build and inspect the actual artifact. Preserve unrelated global OpenCode configuration. Install only when asked, using the plugin package's global config entry; project-only configuration does not provide window GUI inventory.
20
+ - Every implementation: [direct-CJS package, installation, updates and rollback](references/workflow.md); compilation is an optional branch.
21
+ 3. Default to `package.json` plus a directly authored `gui-experimental.cjs`, using host-provided modules and inline CSS/assets. This needs no dependency install or compilation. Implement only the requested capabilities; use the optional build branch when TS/TSX or dependency bundling is actually needed.
22
+ 4. Syntax-check the exported CJS file and install within the requested scope, preserving unrelated global OpenCode configuration. A local CJS edit reloads through the existing watcher; project-only configuration does not provide window GUI inventory.
22
23
  5. Verify each requested capability in the target client, including its failure and cleanup behavior; use the matching reference's verification criteria. Finish with the plugin directory, changed settings, verified behavior, known limits, and how to undo it.
23
24
 
24
25
  References distinguish host contracts from illustrative templates and case studies. Choose rendering, authentication and file formats for the current requirement; case-study protocols and dependencies belong to those integrations.
25
26
 
27
+ ## Source fallback
28
+
29
+ If the references and target UI leave the relevant selector, style owner or extension behavior unclear, inspect the implementation at https://github.com/yee94/yuri. Prefer the tag matching the installed Yuri version; use `main` for development builds. Start from the source-owner paths in [UI structure and styles](references/ui-surfaces.md) or the matching capability reference, and read the owning component/style/host module to resolve the specific uncertainty. Repository source is a lookup fallback; customization still goes in the plugin.
30
+
26
31
  ## Boundaries
27
32
 
28
33
  - `Style` can affect the whole document. A GUI plugin is trusted JavaScript, not a sandbox. Prefer tokens and narrow, stable selectors; arbitrary CSS can hide controls or trigger network requests.
@@ -1,6 +1,6 @@
1
1
  # Appearance contracts
2
2
 
3
- Use `Plugin`, `Registry`, and `Style` from `@opencode/plugin/gui`. The package build/install instructions are in [workflow](workflow.md).
3
+ Use `Plugin`, `Registry`, and `Style` from `@opencode/plugin/gui`. Start with the [direct-CJS package](workflow.md); the TypeScript below documents shapes, not a compilation requirement.
4
4
 
5
5
  ## Activation and priority
6
6
 
@@ -43,12 +43,12 @@ The host owns a collision-free theme ID `gui:` + `JSON.stringify([pluginId, id])
43
43
 
44
44
  ## CSS: official `Style`
45
45
 
46
- ```ts
47
- import css from './skin.css?inline'
48
- ctx.add(Style, css)
46
+ ```js
47
+ const { Style } = require('@opencode/plugin/gui')
48
+ ctx.add(Style, `[data-yuri-logo] { border-radius: 12%; }`)
49
49
  ```
50
50
 
51
- CSS is active immediately while the plugin is enabled. Host base theme variables stay before plugin styles, including after theme switches. Ordinary CSS specificity and source order still apply; the declarative resource priority above does not reorder style elements. Base light tokens include `:root:not(.dark)` (two class-level selectors), so a plain `:root` override has lower specificity; use `html[data-theme="light"]` / `html[data-theme="dark"]` or matching specificity. Tailwind aliases such as `--background` / `--primary` are important declarations and require an important override if you deliberately bypass a registered theme. Common semantic tokens: `--surface-background`, `--surface-foreground`, `--surface-muted-foreground`, `--primary-base`, `--interactive-selection`, and `--font-mono`. Inspect actual current DOM/tokens before targeting a specific layout; generated Tailwind classes are not a stable plugin API. `[data-yuri-logo]` identifies the shared application logo. CSS does not cross iframe or native-window boundaries.
51
+ CSS is active immediately while the plugin is enabled. Declarative resource priority does not reorder style elements; normal cascade rules still apply. For existing blocks, read [UI structure and styles](ui-surfaces.md): it maps material owners, selectors, theme aliases, specificity, scoped recipes and native transparency boundaries. It also explains why changing a semantic variable alone may leave its generated alias unchanged.
52
52
 
53
53
  ## Branding: `yuri.branding`
54
54
 
@@ -69,7 +69,7 @@ ctx.add(Branding, {
69
69
  At least one of `logo` / `dockIcon` is required. `svg` / `png` are the dark/default resource; the `light*` resource is optional. Logo and Dock are resolved independently, so a Logo-only plugin does not suppress another plugin's Dock icon. Branding does not rename the app or replace its wordmark text.
70
70
 
71
71
  - Logos: inline complete SVG text with SVG namespace; maximum 16 KiB UTF-8 each. Static geometry, groups, gradients, defs, clipPath, mask and local `#id` references are allowed. Scripts, event handlers, embedded HTML, stylesheets, inline style, external references, DTD and processing instructions are rejected. Resources render as images, never injected SVG markup.
72
- - Dock: inline `data:image/png;base64,...`, at most 2 MiB of URL text, valid PNG, dimensions 1–1024 per side. Import with `?inline` as text only when it really yields a PNG data URL, or generate the data URL at build time. No filesystem path or remote image URL. Requires trusted local macOS Electron; no plugin `main` needed. Preview builds or older shells may reject the capability. Other runtimes still support the logo.
72
+ - Dock: inline `data:image/png;base64,...`, at most 2 MiB of URL text, valid PNG, dimensions 1–1024 per side. Encode the chosen image once and embed the data URL in the CJS file. No filesystem path or remote image URL. Requires trusted local macOS Electron; no plugin `main` needed. Preview builds or older shells may reject the capability. Other runtimes still support the logo.
73
73
  - Maximum 8 branding entries/plugin, 64/window; combined serialized appearance contributions 8 MiB/plugin, 16 MiB/window. IDs/titles are nonempty strings up to 128 characters; IDs are unique within each registry/plugin.
74
74
  - Unregister, disable, reload, failure and runtime switch withdraw resources. If several local windows apply a Dock icon, the newest active window update wins; closing/releasing it restores the previous window's icon or Yuri default. System appearance changes cannot overwrite an active plugin icon.
75
75
  - Invalid appearance contributions or a failed Dock application fail the owning plugin and clean its contributions; unrelated plugins remain active. Diagnostics appear in plugin settings. These contracts do not grant a JS sandbox.
@@ -4,7 +4,7 @@ A file parser/viewer uses official `LinkHandler` + `Panel` + `PanelTab.file`, op
4
4
 
5
5
  ## Complete JSON-format viewer
6
6
 
7
- This working entry recognizes `.report.json`, parses JSON into formatted text, retains its DOM on background updates, and localizes errors. Use the package/build config in [workflow](workflow.md). A real visual report renderer replaces only the parsing/rendering part.
7
+ This typed entry recognizes `.report.json`, parses JSON into formatted text, retains its DOM on background updates, and localizes errors. For the default direct-CJS package in [workflow](workflow.md), use `require`/`module.exports` and omit type annotations; the example uses no JSX. The optional build branch supports retaining TypeScript. A visual report renderer replaces the parsing/rendering part.
8
8
 
9
9
  ```ts
10
10
  import { bindPlugin, createKeyed, LinkHandler, Panel, Plugin, usePlugin, type PanelProps, type PanelTab } from '@opencode/plugin/gui'
@@ -4,7 +4,7 @@ Yuri provides a global **main-content placement**, not a new renderer. `yuri.pag
4
4
 
5
5
  ## Complete window entry
6
6
 
7
- Use the package and Vite config from [workflow](workflow.md), replacing `src/gui.tsx` with:
7
+ This typed example shows the page contract. For the default direct-CJS package in [workflow](workflow.md), replace imports/exports with `require`/`module.exports` and omit type annotations; it uses no JSX. Retain TypeScript through the optional build branch only when needed.
8
8
 
9
9
  ```ts
10
10
  import { Command, Contract, Plugin, Registry, TitlebarItem, usePlugin, type IconName, type TitlebarItem as TitlebarContribution } from '@opencode/plugin/gui'