@yuriai/web 0.2.40-beta.3 → 0.2.40-beta.4

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 (108) hide show
  1. package/dist/assets/{AgentAvatar-kQhfwlay.js → AgentAvatar-BmT_6apW.js} +1 -1
  2. package/dist/assets/{AssistantConversationSurface-CW3U6Lhp.js → AssistantConversationSurface-B-D-mLgs.js} +3 -3
  3. package/dist/assets/{AssistantUnreadBadge-B2SY-_-u.js → AssistantUnreadBadge-C34eOGCL.js} +1 -1
  4. package/dist/assets/{AssistantView-C_hiAuTd.js → AssistantView-0nXkM9VG.js} +1 -1
  5. package/dist/assets/{DiagramView-CzhdZEw4.js → DiagramView-BU6jWxKJ.js} +1 -1
  6. package/dist/assets/{FadeInOnReveal-CMeIdEKz.js → FadeInOnReveal-CCVdl9Vt.js} +1 -1
  7. package/dist/assets/{GuiPluginPage-WXqykPAg.js → GuiPluginPage-BMt5AMqg.js} +1 -1
  8. package/dist/assets/{GuiPluginSurface-BG3hENTt.js → GuiPluginSurface-kxAcgmf1.js} +1 -1
  9. package/dist/assets/{GuiPluginWindow-BLzchKn7.js → GuiPluginWindow-BVvzrnp1.js} +1 -1
  10. package/dist/assets/{Icon-DygEqfgq.js → Icon-B5nBc6dO.js} +1 -1
  11. package/dist/assets/{ImageLoadingPlaceholder-kbBRpDSD.js → ImageLoadingPlaceholder-Bv5mmf2U.js} +1 -1
  12. package/dist/assets/{LoadingImage-DmucvXdY.js → LoadingImage-BzBw_1lI.js} +1 -1
  13. package/dist/assets/{MarkdownRenderer-BkOMcK8x.js → MarkdownRenderer-CoMohPOZ.js} +2 -2
  14. package/dist/assets/{MarkdownRendererImpl-B5vJtPoa.js → MarkdownRendererImpl-DoZW1UKH.js} +1 -1
  15. package/dist/assets/{MarkstreamRendererImpl-1J-Gu2M2.js → MarkstreamRendererImpl-B3zd5x2O.js} +1 -1
  16. package/dist/assets/{MobileDetailNavigation-48o8aG28.js → MobileDetailNavigation-bEZ_NA03.js} +1 -1
  17. package/dist/assets/{MobileResizableSheet-Dt2U0JHY.js → MobileResizableSheet-D5PcZMuI.js} +1 -1
  18. package/dist/assets/{MobileShareBridge-DnYT3Dbz.js → MobileShareBridge-Cjukxazk.js} +1 -1
  19. package/dist/assets/{MobileTabPageHeader-D6kqRFm0.js → MobileTabPageHeader-Da1maXx-.js} +1 -1
  20. package/dist/assets/{MultiRunWindow-BuRo90Ma.js → MultiRunWindow-rMqP99ID.js} +1 -1
  21. package/dist/assets/{OnboardingScreen-Bn0RgrJU.js → OnboardingScreen-CZhqHzAj.js} +1 -1
  22. package/dist/assets/{OverlayScrollbar-B0X61qR-.js → OverlayScrollbar-Byx2H3pc.js} +1 -1
  23. package/dist/assets/{SettingsView-Bla2lVqS.js → SettingsView-7Bea2DvF.js} +1 -1
  24. package/dist/assets/{SettingsWindow-kCbf8IoB.js → SettingsWindow-U-RDDOS7.js} +1 -1
  25. package/dist/assets/{SetupTourDialog-GDRS3gDa.js → SetupTourDialog-CKec5tUy.js} +1 -1
  26. package/dist/assets/{TerminalView-B1u3s7IN.js → TerminalView-CS1oSAuY.js} +1 -1
  27. package/dist/assets/{ToolOutputDialog-CYUPmbtq.js → ToolOutputDialog-BWhrFvvI.js} +1 -1
  28. package/dist/assets/{VoiceSettings-Dy6-nkQo.js → VoiceSettings-7aFmJq9Z.js} +1 -1
  29. package/dist/assets/{appThemeRegistry--G1XaYmo.js → appThemeRegistry-LyWTE-mT.js} +1 -1
  30. package/dist/assets/{capgoAdapter-DO1rEVQf.js → capgoAdapter-B5NImlKh.js} +1 -1
  31. package/dist/assets/{checkbox-BW80bcK5.js → checkbox-Bdj4n5cI.js} +1 -1
  32. package/dist/assets/{collapsible-BOL5Wx2J.js → collapsible-D1JZOgJZ.js} +1 -1
  33. package/dist/assets/{context-menu-CiFnjP1q.js → context-menu-DDX0ZFhc.js} +1 -1
  34. package/dist/assets/{diagram-DRn8iIs1.js → diagram-C72TQWfh.js} +1 -1
  35. package/dist/assets/{dialog-DQp289fr.js → dialog-CIKJalI5.js} +1 -1
  36. package/dist/assets/{fileMentionTouchSelection-582p0uCX.js → fileMentionTouchSelection-tnd9RDDh.js} +1 -1
  37. package/dist/assets/{gitApi-vYBmQIuU.js → gitApi-BI8OG_ts.js} +1 -1
  38. package/dist/assets/{input-B281XcMR.js → input-gVHSS0EB.js} +1 -1
  39. package/dist/assets/{insertionBoundaries-CB4gv9rr.js → insertionBoundaries-B-yZI6iY.js} +1 -1
  40. package/dist/assets/{main-Caf-6KmT.js → main-BfAN93rT.js} +4 -4
  41. package/dist/assets/{main-B1KrAdkh.js → main-DYWwmI_W.js} +2 -2
  42. package/dist/assets/{markdownHeightCache-BgYJswDy.js → markdownHeightCache-B-FoaQ1U.js} +1 -1
  43. package/dist/assets/{mcpQueries-CQyOFjX2.js → mcpQueries-CehWHIB1.js} +1 -1
  44. package/dist/assets/{miniChat-zEoOVjOQ.js → miniChat-BlkcLQBr.js} +2 -2
  45. package/dist/assets/{mobile-Dt8wAkc4.js → mobile-I3Xe5NtO.js} +2 -2
  46. package/dist/assets/{mobileBackNavigation-BbKMa0Jb.js → mobileBackNavigation-BFUH-c-G.js} +1 -1
  47. package/dist/assets/{mobileConnections-CXYj4P9M.js → mobileConnections-BFvtbJXX.js} +2 -2
  48. package/dist/assets/{multirun-9v2r_beX.js → multirun-DdEjp77z.js} +1 -1
  49. package/dist/assets/{native-config-BOaqa45X.js → native-config-DqDXViVx.js} +1 -1
  50. package/dist/assets/{projectMeta-ZouOo-T_.js → projectMeta-BKgum5WN.js} +1 -1
  51. package/dist/assets/{pwa-syKJBLoe.js → pwa-BvKUY4Hk.js} +1 -1
  52. package/dist/assets/{queue-abort-optimistic-BYH5yLM2.js → queue-abort-optimistic-BcbiNk8t.js} +1 -1
  53. package/dist/assets/{react-DPhQUTaH.js → react-DeB-Vc_L.js} +1 -1
  54. package/dist/assets/{readiness-BpVAjFhF.js → readiness-CIlvQ-aQ.js} +2 -2
  55. package/dist/assets/{renderElectronMiniChatApp-DprABvit.js → renderElectronMiniChatApp-DIjWdFHu.js} +2 -2
  56. package/dist/assets/{renderMobileApp-DQmX6iak.js → renderMobileApp-CE0QyOH0.js} +4 -4
  57. package/dist/assets/{runtimeConfig-7Umh9QWi.js → runtimeConfig-uhjQn4kK.js} +1 -1
  58. package/dist/assets/{runtimeEndpointReset-BYtLmSuX.js → runtimeEndpointReset-DezNESKT.js} +3 -3
  59. package/dist/assets/{select-CyPxbnW8.js → select-BwCKwnTH.js} +1 -1
  60. package/dist/assets/{sessionLookup-D_fPlqqT.js → sessionLookup-DzKZsy-W.js} +1 -1
  61. package/dist/assets/{sortable-tabs-strip-BclS0Hnd.js → sortable-tabs-strip-m5JQrTx4.js} +1 -1
  62. package/dist/assets/{speechSettingsQueries-CTsBn-Ib.js → speechSettingsQueries-C5mPRWIv.js} +1 -1
  63. package/dist/assets/{textarea-CjJsstUF.js → textarea-CaTDyZrS.js} +1 -1
  64. package/dist/assets/{tooltip-Di_DSZ8p.js → tooltip-BvZzoiqg.js} +1 -1
  65. package/dist/assets/{types-wnqkJWYs.js → types-Bm8kDgSv.js} +1 -1
  66. package/dist/assets/{useAppFontEffects-BRMf55oN.js → useAppFontEffects-C9IaiJgF.js} +5 -5
  67. package/dist/assets/{useDesktopWindowControlsLayout-Bq9DFNYn.js → useDesktopWindowControlsLayout-C3M12PjJ.js} +1 -1
  68. package/dist/assets/{useEffectiveDirectory-5RwQ_nuK.js → useEffectiveDirectory-Do4UqfZR.js} +1 -1
  69. package/dist/assets/{useMobileNavigationStore-ePbEoQwb.js → useMobileNavigationStore-InwdmuDX.js} +5 -5
  70. package/dist/assets/{usePluginsStore-HJJZ65gd.js → usePluginsStore-BH4-CNcj.js} +1 -1
  71. package/dist/assets/{useStreamingTextThrottle-CjMALEr7.js → useStreamingTextThrottle-CeKHHK13.js} +1 -1
  72. package/dist/assets/{useWorkerHighlightedLines-6x1R4afJ.js → useWorkerHighlightedLines-0XahwAbS.js} +1 -1
  73. package/dist/index.html +5 -5
  74. package/dist/mini-chat.html +5 -5
  75. package/dist/mobile.html +1 -1
  76. package/package.json +1 -1
  77. package/server/lib/assistants/builtin-skills.js +1 -1
  78. package/server/lib/assistants/builtin-skills.test.js +2 -0
  79. package/server/lib/gui-customization/DOCUMENTATION.md +25 -1
  80. package/server/lib/gui-customization/projects-client.mjs +59 -0
  81. package/server/lib/gui-customization/projects.js +43 -0
  82. package/server/lib/gui-customization/projects.test.js +103 -0
  83. package/server/lib/gui-customization/remote-connections-client.mjs +2 -8
  84. package/server/lib/gui-customization/session-skill-command.mjs +8 -0
  85. package/server/lib/gui-customization/session-skill.js +15 -10
  86. package/server/lib/gui-customization/session-skill.test.js +21 -2
  87. package/server/lib/gui-customization/skill/SKILL.md +3 -1
  88. package/server/lib/gui-customization/skill/references/projects.md +63 -0
  89. package/server/lib/notifications/DOCUMENTATION.md +12 -0
  90. package/server/lib/notifications/runtime.js +20 -2
  91. package/server/lib/notifications/runtime.test.js +21 -0
  92. package/server/lib/notifications/session-unread-runtime.js +51 -13
  93. package/server/lib/notifications/session-unread.test.js +113 -1
  94. package/server/lib/opencode/core-routes.js +2 -1
  95. package/server/lib/opencode/feature-routes-runtime.js +6 -0
  96. package/server/lib/opencode/feature-routes-runtime.test.js +4 -0
  97. package/server/lib/projects/DOCUMENTATION.md +6 -3
  98. package/server/lib/scheduled-tasks/session-skill.js +2 -1
  99. package/server/lib/scheduled-tasks/session-skill.test.js +34 -1
  100. package/server/lib/session-index/DOCUMENTATION.md +4 -1
  101. package/server/lib/session-index/event-ingest.js +8 -0
  102. package/server/lib/session-index/event-ingest.test.js +16 -0
  103. package/server/lib/session-index/service.js +1 -0
  104. package/server/lib/session-index/service.test.js +3 -1
  105. package/server/lib/session-metadata/DOCUMENTATION.md +18 -1
  106. package/server/lib/session-title/DOCUMENTATION.md +3 -0
  107. package/server/lib/session-title/runtime.js +1 -0
  108. package/server/lib/session-title/runtime.test.js +2 -0
@@ -5,6 +5,7 @@ import {
5
5
  resolveSessionDirectory,
6
6
  } from '../session-metadata/session-projection.js';
7
7
  import { extractSessionStatusUpdate } from '../opencode/session-runtime.js';
8
+ import { isVisibleSession } from './service.js';
8
9
 
9
10
  const withDirectory = (session, directory) => {
10
11
  if (!session || typeof session !== 'object') return null;
@@ -37,6 +38,13 @@ export const applySessionIndexEvent = (service, event, observedAt = Date.now(),
37
38
 
38
39
  const baseType = normalizeSessionEventType(payload.type);
39
40
 
41
+ if (baseType === 'session.metadata.updated') {
42
+ if (isHostReady && !isHostReady()) return false;
43
+ const data = payload.data ?? properties;
44
+ if (typeof data.sessionID !== 'string' || !data.metadata || typeof data.metadata !== 'object') return false;
45
+ return !isVisibleSession({ metadata: data.metadata }) ? service.remove(data.sessionID) : false;
46
+ }
47
+
40
48
  if (baseType === 'session.model.selected') {
41
49
  if (isHostReady && !isHostReady()) return false;
42
50
  const data = payload.data ?? properties;
@@ -3,6 +3,22 @@ import { describe, expect, it, vi } from 'vitest';
3
3
  import { applySessionIndexEvent } from './event-ingest.js';
4
4
 
5
5
  describe('session index event ingest', () => {
6
+ it('removes an indexed CLI worker on authoritative metadata updates without deleting its conversation', () => {
7
+ const service = { remove: vi.fn(() => true), upsertAndReportChange: vi.fn() };
8
+ const event = { payload: { type: 'session.metadata.updated', data: {
9
+ sessionID: 'worker', metadata: { yuri: { worker: { parentSessionID: 'root' } } },
10
+ } } };
11
+ expect(applySessionIndexEvent(service, event, 30, { isHostReady: () => false })).toBe(false);
12
+ expect(service.remove).not.toHaveBeenCalled();
13
+ expect(applySessionIndexEvent(service, event, 30)).toBe(true);
14
+ expect(service.remove).toHaveBeenCalledWith('worker');
15
+ expect(service.upsertAndReportChange).not.toHaveBeenCalled();
16
+ service.remove.mockClear();
17
+ expect(applySessionIndexEvent(service, { payload: { type: 'session.metadata.updated', data: {
18
+ sessionID: 'ordinary', metadata: { yuri: { worker: { parentSessionID: '' } } },
19
+ } } }, 30)).toBe(false);
20
+ expect(service.remove).not.toHaveBeenCalled();
21
+ });
6
22
  it('ingests native model selection through the existing-row mutation and respects Host readiness', () => {
7
23
  const service = { updateModel: vi.fn(() => true) };
8
24
  const model = { providerID: 'p', id: 'model', variant: 'high' };
@@ -16,6 +16,7 @@ const isContactAssignedSession = (yuri) => yuri?.assigned?.from === 'contact';
16
16
  const isSystemSession = (session) => {
17
17
  const yuri = session?.metadata?.yuri;
18
18
  if (!yuri || typeof yuri !== 'object') return false;
19
+ if (nonEmptySystemID(yuri.worker?.parentSessionID)) return true;
19
20
  // Contact-assigned workers stay visible in Chat. Only archived Assistant
20
21
  // bindings use `yuri.assistant` as a hide marker.
21
22
  if (nonEmptySystemID(yuri.assistant?.assistantID) && !isContactAssignedSession(yuri)) return true;
@@ -406,7 +406,8 @@ describe('Electron session index', () => {
406
406
 
407
407
  service.replaceDirectory({
408
408
  directory: '/repo',
409
- sessions: [assistantSession, scheduledSession, smallModelSession, llmSession, ordinary],
409
+ sessions: [assistantSession, scheduledSession, smallModelSession, llmSession,
410
+ { ...session('ses_cli_worker', 95), metadata: { yuri: { worker: { parentSessionID: 'root' } } } }, ordinary],
410
411
  cursor: null,
411
412
  hasMore: false,
412
413
  });
@@ -416,6 +417,7 @@ describe('Electron session index', () => {
416
417
  service.upsert(scheduledSession);
417
418
  service.upsert(smallModelSession);
418
419
  service.upsert(llmSession);
420
+ service.upsert({ ...session('ses_cli_worker', 95), metadata: { yuri: { worker: { parentSessionID: 'root' } } } });
419
421
  expect(service.snapshot().directories[0].sessions.map((item) => item.id)).toEqual(['ses_ordinary']);
420
422
  service.close();
421
423
  });
@@ -95,8 +95,25 @@ The Host has no goal routes, objective-file API, progress auditor or continuatio
95
95
  System ownership for sidebar / session-index / notifications is established when Host metadata
96
96
  carries a non-empty `yuri.assistant.assistantID` (unless
97
97
  `assigned.from === 'contact'`), `yuri.scheduledTask.taskID`,
98
- `yuri.smallModel.purpose`, or `yuri.llm.purpose`. Every system
98
+ `yuri.smallModel.purpose`, or `yuri.llm.purpose`. Every system
99
99
  session creator must persist the matching patch through this store. Separately,
100
100
  ordinary sidebar/session-index lists also exclude reserved leading title tags
101
101
  `[Scheduled]`, `[Assistant]`, and `[yuri-llm]`, including legacy sessions
102
102
  without metadata; these tags do not establish metadata ownership.
103
+
104
+ ## Delegated CLI workers
105
+
106
+ Use the native subagent tool, or create the session with OpenCode's `parentID`
107
+ before passing its ID to `opencode run --session`. Bare `opencode run` creates
108
+ an ordinary root conversation; agent names, titles and prompt text do not prove
109
+ delegation and must not be used to hide it.
110
+
111
+ For an existing CLI worker whose delegating session is explicitly known, merge
112
+ `{ yuri: { worker: { parentSessionID: "<delegating-session-id>" } } }` through
113
+ `PUT /api/yuri/sessions/:sessionId/metadata`. Preserve the real native `parentID`;
114
+ this marker does not manufacture an upstream ancestry edge. It excludes the
115
+ worker from ordinary session catalogs, unread badges, title refresh and ordinary
116
+ notifications, including standalone VS Code. Transcript content is unchanged.
117
+ Only mark verified delegated workers, never every root session using a secondary
118
+ agent. Remove this marker with `{ yuri: { worker: null } }` to restore ordinary
119
+ visibility on the next catalog refresh; old hidden unread is not resurrected.
@@ -4,6 +4,9 @@ Server-side watcher that regenerates a session's sidebar title from the
4
4
  conversation's **main subject** (overall feature / goal) with the small model
5
5
  (`lib/small-model`), then PATCHes `title` plus `metadata.yuri.titleRefresh`.
6
6
 
7
+ Explicit delegated CLI workers (`metadata.yuri.worker.parentSessionID`) are
8
+ system-owned for title refresh, just as they are for catalog/unread visibility.
9
+
7
10
  OpenCode starts its own initial title through `SessionTitle.generate`.
8
11
  This module auto-refreshes sparsely (first user
9
12
  admission of a new session, first newly-sent reply on a fork) and on explicit smart-title
@@ -156,6 +156,7 @@ const extractSessionStatus = (payload) => {
156
156
  export const isSystemOwnedSession = (sessionOrInfo) => {
157
157
  const yuri = sessionOrInfo?.metadata?.yuri;
158
158
  if (!yuri || typeof yuri !== 'object') return false;
159
+ if (typeof yuri.worker?.parentSessionID === 'string' && yuri.worker.parentSessionID) return true;
159
160
  if (yuri.assigned?.from === 'contact') return false;
160
161
  if (typeof yuri.assistant?.assistantID === 'string' && yuri.assistant.assistantID) return true;
161
162
  if (typeof yuri.scheduledTask?.taskID === 'string' && yuri.scheduledTask.taskID) return true;
@@ -226,6 +226,8 @@ describe('session-title helpers', () => {
226
226
  });
227
227
 
228
228
  it('detects system-owned sessions from metadata only', () => {
229
+ expect(isSystemOwnedSession({ metadata: { yuri: { worker: { parentSessionID: 'root' } } } })).toBe(true);
230
+ expect(isSystemOwnedSession({ metadata: { yuri: { worker: { parentSessionID: '' } } } })).toBe(false);
229
231
  expect(isSystemOwnedSession({
230
232
  metadata: { yuri: { assistant: { assistantID: 'assistant_1', name: 'A' } } },
231
233
  })).toBe(true);