zidane-ui 9.1.4 → 9.1.6

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 (251) hide show
  1. package/dist/adapters/server-extensions-host.js +1 -1
  2. package/dist/adapters/server-host.js +2 -1
  3. package/dist/adapters/server-machines-host.js +1 -1
  4. package/dist/adapters/server-session-host.js +87 -13
  5. package/dist/adapters/server-settings-host.js +1 -1
  6. package/dist/appearance/AppearanceProvider.js +2 -2
  7. package/dist/appearance/headless/index.js +1 -1
  8. package/dist/approvals/headless/index.js +2 -2
  9. package/dist/chat/HostTranscript.d.ts +5 -1
  10. package/dist/chat/HostTranscript.js +16 -4
  11. package/dist/chat/RunEstimateChip.d.ts +5 -3
  12. package/dist/chat/RunEstimateChip.js +33 -3
  13. package/dist/chat/Transcript.js +1 -1
  14. package/dist/chat/composer/ConversationBadges.js +16 -10
  15. package/dist/chat/composer/composer-bus.d.ts +2 -2
  16. package/dist/chat/composer/composer-bus.js +2 -2
  17. package/dist/chat/composer/use-composer-stores.js +1 -1
  18. package/dist/chat/composer/use-run-meter.js +1 -1
  19. package/dist/chat/headless/composer/conversation-badges.d.ts +8 -3
  20. package/dist/chat/headless/composer/conversation-badges.js +26 -11
  21. package/dist/chat/headless/composer/index.js +2 -2
  22. package/dist/chat/headless/composer/labels-chrome.d.ts +3 -1
  23. package/dist/chat/headless/composer/labels-chrome.js +3 -1
  24. package/dist/chat/headless/index.d.ts +6 -3
  25. package/dist/chat/headless/index.js +16 -13
  26. package/dist/chat/headless/labels.d.ts +54 -1
  27. package/dist/chat/headless/labels.js +62 -2
  28. package/dist/chat/headless/secrets.d.ts +32 -0
  29. package/dist/chat/headless/secrets.js +43 -0
  30. package/dist/chat/headless/session-list.d.ts +45 -0
  31. package/dist/chat/headless/sidebar/estimates.js +13 -1
  32. package/dist/chat/headless/sidebar/history.d.ts +71 -0
  33. package/dist/chat/headless/sidebar/history.js +174 -0
  34. package/dist/chat/headless/sidebar/index.d.ts +3 -2
  35. package/dist/chat/headless/sidebar/index.js +2 -1
  36. package/dist/chat/headless/sidebar/labels.d.ts +50 -0
  37. package/dist/chat/headless/sidebar/labels.js +1 -0
  38. package/dist/chat/headless/sidebar/query.d.ts +2 -2
  39. package/dist/chat/headless/sidebar/query.js +6 -3
  40. package/dist/chat/headless/sidebar/types.d.ts +7 -1
  41. package/dist/chat/headless/sidebar/view.js +2 -0
  42. package/dist/chat/headless/transcript/auth-failure.d.ts +67 -0
  43. package/dist/chat/headless/transcript/auth-failure.js +87 -0
  44. package/dist/chat/headless/transcript/index.d.ts +2 -1
  45. package/dist/chat/headless/transcript/index.js +2 -1
  46. package/dist/chat/headless/transcript/nesting.d.ts +3 -3
  47. package/dist/chat/headless/transcript/nesting.js +12 -4
  48. package/dist/chat/index.d.ts +4 -2
  49. package/dist/chat/index.js +3 -1
  50. package/dist/chat/interactions/InboxPanel.d.ts +6 -2
  51. package/dist/chat/interactions/InboxPanel.js +82 -44
  52. package/dist/chat/interactions/PlanCard.d.ts +2 -2
  53. package/dist/chat/interactions/PlanCard.js +1 -1
  54. package/dist/chat/interactions/QuestionField.d.ts +8 -3
  55. package/dist/chat/interactions/QuestionField.js +89 -8
  56. package/dist/chat/interactions/QuestionForm.d.ts +3 -1
  57. package/dist/chat/interactions/QuestionForm.js +48 -10
  58. package/dist/chat/interactions/SecretInput.d.ts +32 -0
  59. package/dist/chat/interactions/SecretInput.js +72 -0
  60. package/dist/chat/interactions/card-ui.d.ts +5 -3
  61. package/dist/chat/interactions/card-ui.js +5 -3
  62. package/dist/chat/interactions/index.d.ts +2 -1
  63. package/dist/chat/interactions/index.js +2 -1
  64. package/dist/chat/sidebar/SessionSidebar.js +2 -0
  65. package/dist/chat/sidebar/SidebarFilterMenu.d.ts +7 -2
  66. package/dist/chat/sidebar/SidebarFilterMenu.js +26 -2
  67. package/dist/chat/sidebar/SidebarSessionRow.d.ts +3 -1
  68. package/dist/chat/sidebar/SidebarSessionRow.js +8 -3
  69. package/dist/chat/sidebar/sidebar-live.js +8 -4
  70. package/dist/chat/transcript/AuthFailureCard.d.ts +34 -0
  71. package/dist/chat/transcript/AuthFailureCard.js +358 -0
  72. package/dist/chat/transcript/InteractionToolBody.js +12 -2
  73. package/dist/chat/transcript/actions.d.ts +24 -1
  74. package/dist/chat/transcript/index.d.ts +3 -2
  75. package/dist/chat/transcript/index.js +2 -1
  76. package/dist/chat/transcript/notices.d.ts +2 -1
  77. package/dist/chat/transcript/notices.js +13 -1
  78. package/dist/chat/transcript/script-input.d.ts +1 -1
  79. package/dist/chat/transcript/shell-block.js +1 -1
  80. package/dist/components/HowItWorks.d.ts +8 -1
  81. package/dist/components/HowItWorks.js +2 -2
  82. package/dist/components/RowActionsMenu.d.ts +6 -1
  83. package/dist/components/RowActionsMenu.js +4 -0
  84. package/dist/core.css +24 -0
  85. package/dist/dist/{index-WlE93Q6d.d.ts → index-DqCio7Nd.d.ts} +36 -3
  86. package/dist/dist/index-f-XWIoYo.d.ts +1 -0
  87. package/dist/dist/index.d.ts +6 -0
  88. package/dist/dist/sandbox-B4OW6oNx.d.ts +2 -0
  89. package/dist/dist/timeout-B5pO5I5a.d.ts +30 -0
  90. package/dist/extensions/ExtensionSettingsPage.js +1 -1
  91. package/dist/extensions/ExtensionSettingsSidebar.js +1 -1
  92. package/dist/extensions/headless/fixture-host.js +1 -1
  93. package/dist/extensions/headless/index.js +4 -4
  94. package/dist/extensions/hooks.js +1 -1
  95. package/dist/files/DiffsTab.js +1 -1
  96. package/dist/files/EditorColumn.js +1 -1
  97. package/dist/files/MediaDiff.js +1 -1
  98. package/dist/files/SearchPanel.js +121 -53
  99. package/dist/files/headless/name-match.js +29 -14
  100. package/dist/files/useEntryActions.js +1 -1
  101. package/dist/files/useOpenFiles.js +1 -1
  102. package/dist/git/WherePicker.js +2 -2
  103. package/dist/git/headless/environment.d.ts +6 -1
  104. package/dist/git/headless/environment.js +5 -2
  105. package/dist/git/headless/labels.d.ts +2 -0
  106. package/dist/git/headless/labels.js +2 -0
  107. package/dist/git/index.d.ts +2 -1
  108. package/dist/git/index.js +2 -1
  109. package/dist/git/useStartFromPanel.d.ts +22 -0
  110. package/dist/git/useStartFromPanel.js +91 -0
  111. package/dist/keybindings/KeyCommands.js +1 -1
  112. package/dist/keybindings/KeybindingsProvider.js +1 -1
  113. package/dist/keybindings/headless/catalog.d.ts +1 -1
  114. package/dist/keybindings/headless/catalog.js +14 -2
  115. package/dist/keybindings/headless/index.js +2 -2
  116. package/dist/keybindings/headless/key-scope.d.ts +4 -2
  117. package/dist/keybindings/headless/key-scope.js +17 -2
  118. package/dist/keybindings/headless/overrides.js +1 -1
  119. package/dist/machines/HostSyncPanel.js +1 -1
  120. package/dist/machines/SyncOutcomeBadge.js +1 -1
  121. package/dist/machines/headless/index.js +1 -1
  122. package/dist/onboarding/demos/features.d.ts +9 -1
  123. package/dist/onboarding/demos/features.js +107 -2
  124. package/dist/onboarding/demos/how-it-works.d.ts +5 -1
  125. package/dist/onboarding/demos/how-it-works.js +120 -2
  126. package/dist/onboarding/demos/index.js +1 -1
  127. package/dist/onboarding/headless/labels.d.ts +17 -0
  128. package/dist/onboarding/headless/labels.js +17 -0
  129. package/dist/onboarding/index.js +4 -4
  130. package/dist/onboarding/marks.d.ts +1 -2
  131. package/dist/onboarding/marks.js +4 -12
  132. package/dist/onboarding/steps/ConnectorsStep.js +1 -1
  133. package/dist/onboarding/steps/ReadyStep.js +1 -1
  134. package/dist/onboarding/steps/SkillsStep.js +1 -1
  135. package/dist/onboarding/steps/connect/ProviderPanel.js +1 -1
  136. package/dist/onboarding/tutorials.d.ts +3 -1
  137. package/dist/onboarding/tutorials.js +2 -1
  138. package/dist/palette/app-sources.js +1 -1
  139. package/dist/palette/headless/app-sources.js +10 -0
  140. package/dist/palette/headless/labels.js +2 -0
  141. package/dist/session/ArtifactsPanel.js +1 -1
  142. package/dist/session/PanelAttention.d.ts +14 -6
  143. package/dist/session/PanelAttention.js +35 -24
  144. package/dist/session/PlanTracker.d.ts +54 -0
  145. package/dist/session/PlanTracker.js +413 -0
  146. package/dist/session/ProjectHome.d.ts +15 -2
  147. package/dist/session/ProjectHome.js +158 -85
  148. package/dist/session/RemindersPanel.d.ts +25 -0
  149. package/dist/session/RemindersPanel.js +526 -0
  150. package/dist/session/SecretsPanel.d.ts +19 -0
  151. package/dist/session/SecretsPanel.js +241 -0
  152. package/dist/session/SessionProvider.d.ts +26 -5
  153. package/dist/session/SessionProvider.js +51 -6
  154. package/dist/session/StepStatusIcon.d.ts +24 -0
  155. package/dist/session/StepStatusIcon.js +50 -0
  156. package/dist/session/TodoList.d.ts +4 -3
  157. package/dist/session/TodoList.js +6 -5
  158. package/dist/session/headless/fixture-host.d.ts +32 -22
  159. package/dist/session/headless/fixture-host.js +86 -51
  160. package/dist/session/headless/fixture-plans.d.ts +57 -0
  161. package/dist/session/headless/fixture-plans.js +141 -0
  162. package/dist/session/headless/fixture-schedules.d.ts +49 -0
  163. package/dist/session/headless/fixture-schedules.js +133 -0
  164. package/dist/session/headless/home-layout.d.ts +10 -2
  165. package/dist/session/headless/home-layout.js +7 -2
  166. package/dist/session/headless/host.d.ts +85 -13
  167. package/dist/session/headless/index.d.ts +5 -3
  168. package/dist/session/headless/index.js +5 -3
  169. package/dist/session/headless/labels.d.ts +95 -12
  170. package/dist/session/headless/labels.js +67 -18
  171. package/dist/session/headless/plans.d.ts +53 -0
  172. package/dist/session/headless/plans.js +78 -0
  173. package/dist/session/headless/reminder-labels.d.ts +63 -0
  174. package/dist/session/headless/reminder-labels.js +84 -0
  175. package/dist/session/headless/schedules.d.ts +93 -0
  176. package/dist/session/headless/schedules.js +190 -0
  177. package/dist/session/headless/secrets.d.ts +28 -0
  178. package/dist/session/headless/secrets.js +48 -0
  179. package/dist/session/index.d.ts +7 -5
  180. package/dist/session/index.js +6 -4
  181. package/dist/session/testing/contract.d.ts +18 -5
  182. package/dist/session/testing/contract.js +351 -43
  183. package/dist/session/testing/index.d.ts +4 -2
  184. package/dist/session/testing/index.js +4 -2
  185. package/dist/settings/headless/catalog.js +17 -1
  186. package/dist/settings/headless/index.d.ts +2 -2
  187. package/dist/settings/headless/index.js +3 -3
  188. package/dist/settings/headless/labels.d.ts +0 -2
  189. package/dist/settings/headless/labels.js +0 -2
  190. package/dist/settings/headless/layout.js +7 -1
  191. package/dist/settings/headless/providers.d.ts +17 -1
  192. package/dist/settings/headless/providers.js +19 -1
  193. package/dist/settings/headless/search.d.ts +1 -1
  194. package/dist/settings/rows.d.ts +1 -1
  195. package/dist/settings/rows.js +2 -2
  196. package/dist/settings/sections/appearance/AppearanceSection.js +2 -2
  197. package/dist/settings/sections/claude-import/ClaudeImportDialog.js +1 -1
  198. package/dist/settings/sections/editor/EditorSection.js +1 -1
  199. package/dist/settings/sections/environments/EnvironmentsSection.js +1 -1
  200. package/dist/settings/sections/extensions/ChangeOriginDialog.js +1 -1
  201. package/dist/settings/sections/extensions/CreateExtensionDialog.js +1 -1
  202. package/dist/settings/sections/extensions/ExtensionsSection.js +1 -1
  203. package/dist/settings/sections/host-catalog/HostCatalogSection.js +1 -1
  204. package/dist/settings/sections/instructions/InstructionsSection.js +1 -1
  205. package/dist/settings/sections/keybindings/labels.d.ts +2 -0
  206. package/dist/settings/sections/keybindings/labels.js +2 -0
  207. package/dist/settings/sections/keybindings/rows.js +8 -0
  208. package/dist/settings/sections/mcp/McpSection.js +1 -1
  209. package/dist/settings/sections/mcp/McpServerRow.js +1 -1
  210. package/dist/settings/sections/models/ModelRows.js +2 -2
  211. package/dist/settings/sections/providers/ProvidersSection.js +209 -201
  212. package/dist/settings/sections/providers/ServerProvidersSection.js +1 -1
  213. package/dist/settings/sections/shared/catalog.js +1 -1
  214. package/dist/settings/sections/skills/SkillList.js +1 -1
  215. package/dist/settings/sections/skills/SkillsSection.js +2 -2
  216. package/dist/styles.css +59 -1
  217. package/dist/terminal/HostTerminalSurface.js +2 -2
  218. package/dist/workspace/PanelContentView.d.ts +22 -4
  219. package/dist/workspace/PanelContentView.js +112 -16
  220. package/dist/workspace/PanelGlyph.d.ts +21 -0
  221. package/dist/workspace/PanelGlyph.js +33 -0
  222. package/dist/workspace/PanelHome.js +5 -3
  223. package/dist/workspace/PanelStrip.js +11 -4
  224. package/dist/workspace/PanelToolbar.d.ts +32 -0
  225. package/dist/workspace/PanelToolbar.js +194 -0
  226. package/dist/workspace/WorkspaceProvider.d.ts +3 -1
  227. package/dist/workspace/WorkspaceProvider.js +6 -2
  228. package/dist/workspace/extension-tabs.js +5 -2
  229. package/dist/workspace/headless/host.d.ts +4 -0
  230. package/dist/workspace/headless/index.d.ts +3 -1
  231. package/dist/workspace/headless/index.js +4 -2
  232. package/dist/workspace/headless/labels.d.ts +10 -0
  233. package/dist/workspace/headless/labels.js +11 -1
  234. package/dist/workspace/headless/pages.d.ts +15 -0
  235. package/dist/workspace/headless/pages.js +49 -0
  236. package/dist/workspace/headless/tab-mark.d.ts +14 -0
  237. package/dist/workspace/headless/tab-mark.js +27 -0
  238. package/dist/workspace/headless/view.d.ts +7 -1
  239. package/dist/workspace/index.d.ts +3 -2
  240. package/dist/workspace/index.js +3 -2
  241. package/dist/workspace/testing/index.js +6 -0
  242. package/dist/workspace/workspace-key-commands.js +3 -3
  243. package/package.json +2 -2
  244. package/src/styles/motion.css +13 -0
  245. package/src/styles/onboarding.css +0 -1
  246. package/src/styles/primitives.css +10 -0
  247. package/src/styles/workspace.css +17 -0
  248. package/dist/session/TodosPanel.d.ts +0 -19
  249. package/dist/session/TodosPanel.js +0 -251
  250. package/dist/session/headless/todos.d.ts +0 -22
  251. package/dist/session/headless/todos.js +0 -38
@@ -0,0 +1,63 @@
1
+ import { ReminderWhen } from "./schedules.js";
2
+ import { ScheduleCreator, ScheduleFireOutcome } from "zidane/chat/pure";
3
+ //#region src/session/headless/reminder-labels.d.ts
4
+ /** `in 4m 07s` under an hour, `in 2h 05m` under a day, else `in 3d 4h`. Rounds up, so it says `now` only when due. */
5
+ declare function countdown(ms: number): string;
6
+ /** The Reminders panel's labels. */
7
+ declare const REMINDER_LABELS: {
8
+ remindersLabel: string;
9
+ remindersOff: string;
10
+ remindersOffHint: string;
11
+ remindersUnsupported: string;
12
+ remindersScopeLabel: string;
13
+ remindersScopeSession: string;
14
+ remindersScopeAll: string;
15
+ remindersListLabel: string;
16
+ remindersEmpty: string;
17
+ remindersEmptyHint: string;
18
+ remindersEmptyAll: string;
19
+ remindersCount: (n: number) => string;
20
+ remindersFinished: string;
21
+ reminderNew: string;
22
+ reminderWhenLabel: string;
23
+ reminderWhenPlaceholder: string;
24
+ /** Time words the form offers as one-click picks. */
25
+ reminderWhenPicks: readonly string[];
26
+ reminderWhenPick: (words: string) => string;
27
+ reminderWhenError: (reason: Extract<ReminderWhen, {
28
+ ok: false;
29
+ }>["reason"]) => "Type when to send it." | "Only the time goes here. Put the message below." | "Try in 20m, at 9:00, tomorrow 9:00, every 2h, daily 9:00, weekdays 9:00 or cron \"0 9 * * 1-5\".";
30
+ reminderPreview: (when: string) => string;
31
+ reminderPromptLabel: string;
32
+ reminderPromptPlaceholder: string;
33
+ reminderCreate: string;
34
+ reminderCancel: string;
35
+ reminderCreator: (creator: ScheduleCreator) => string;
36
+ reminderNext: (when: string) => string;
37
+ /** Time left before the next send, to the second under an hour. */
38
+ reminderCountdown: typeof countdown;
39
+ reminderOnce: string;
40
+ reminderLastSent: (when: string) => string;
41
+ reminderDone: string;
42
+ reminderOff: string;
43
+ reminderOffReason: (reason: string) => string;
44
+ reminderExpires: (when: string) => string;
45
+ reminderTargetOther: string;
46
+ reminderTargetUntitled: string;
47
+ reminderTargetOpen: (title: string) => string;
48
+ reminderTargetNew: (folder: string) => string;
49
+ reminderTargetExtension: (extension: string) => string;
50
+ reminderPause: (label: string) => string;
51
+ reminderResume: (label: string) => string;
52
+ reminderRunNow: (label: string) => string;
53
+ reminderDelete: (label: string) => string;
54
+ reminderKeep: (label: string) => string;
55
+ reminderHistoryShow: (label: string) => string;
56
+ reminderHistoryHide: (label: string) => string;
57
+ reminderHistoryLabel: (label: string) => string;
58
+ reminderNoFires: string;
59
+ reminderFireOutcome: (outcome: ScheduleFireOutcome) => string;
60
+ reminderFireLate: string;
61
+ };
62
+ //#endregion
63
+ export { REMINDER_LABELS };
@@ -0,0 +1,84 @@
1
+ //#region src/session/headless/reminder-labels.ts
2
+ const plural = (n, noun) => `${n} ${noun}${n === 1 ? "" : "s"}`;
3
+ const pad2 = (n) => String(n).padStart(2, "0");
4
+ /** `in 4m 07s` under an hour, `in 2h 05m` under a day, else `in 3d 4h`. Rounds up, so it says `now` only when due. */
5
+ function countdown(ms) {
6
+ const s = Math.ceil(ms / 1e3);
7
+ if (s <= 0) return "now";
8
+ const d = Math.floor(s / 86400);
9
+ const h = Math.floor(s % 86400 / 3600);
10
+ const m = Math.floor(s % 3600 / 60);
11
+ if (d > 0) return `in ${d}d ${h}h`;
12
+ if (h > 0) return `in ${h}h ${pad2(m)}m`;
13
+ if (m > 0) return `in ${m}m ${pad2(s % 60)}s`;
14
+ return `in ${s}s`;
15
+ }
16
+ const FIRE_OUTCOMES = {
17
+ sent: "Sent",
18
+ queued: "Queued behind a run",
19
+ merged: "Joined the waiting one",
20
+ handled: "Handled",
21
+ skipped: "Skipped",
22
+ failed: "Failed"
23
+ };
24
+ /** The Reminders panel's labels. */
25
+ const REMINDER_LABELS = {
26
+ remindersLabel: "Reminders",
27
+ remindersOff: "Reminders are off",
28
+ remindersOffHint: "Turn on Reminders in Settings, under Sessions.",
29
+ remindersUnsupported: "This host does not keep reminders.",
30
+ remindersScopeLabel: "Which reminders",
31
+ remindersScopeSession: "This session",
32
+ remindersScopeAll: "All",
33
+ remindersListLabel: "Reminders",
34
+ remindersEmpty: "No reminders",
35
+ remindersEmptyHint: "Add one below, or ask the agent to remind you.",
36
+ remindersEmptyAll: "No reminders anywhere",
37
+ remindersCount: (n) => plural(n, "reminder"),
38
+ remindersFinished: "Finished",
39
+ reminderNew: "New reminder",
40
+ reminderWhenLabel: "When",
41
+ reminderWhenPlaceholder: "in 20m, tomorrow 9:00, weekdays 9:00",
42
+ /** Time words the form offers as one-click picks. */
43
+ reminderWhenPicks: [
44
+ "in 5m",
45
+ "in 20m",
46
+ "in 1h",
47
+ "tomorrow 9:00"
48
+ ],
49
+ reminderWhenPick: (words) => `Set the time to ${words}`,
50
+ reminderWhenError: (reason) => reason === "empty" ? "Type when to send it." : reason === "extra" ? "Only the time goes here. Put the message below." : "Try in 20m, at 9:00, tomorrow 9:00, every 2h, daily 9:00, weekdays 9:00 or cron \"0 9 * * 1-5\".",
51
+ reminderPreview: (when) => `Sends ${when}`,
52
+ reminderPromptLabel: "Message",
53
+ reminderPromptPlaceholder: "What to send the agent",
54
+ reminderCreate: "Add reminder",
55
+ reminderCancel: "Cancel",
56
+ reminderCreator: (creator) => creator.kind === "user" ? "Set by you" : creator.kind === "agent" ? "Set by the agent" : `Set by ${creator.id}`,
57
+ reminderNext: (when) => `Next ${when}`,
58
+ /** Time left before the next send, to the second under an hour. */
59
+ reminderCountdown: countdown,
60
+ reminderOnce: "once",
61
+ reminderLastSent: (when) => `Last sent ${when}`,
62
+ reminderDone: "Done",
63
+ reminderOff: "Off",
64
+ reminderOffReason: (reason) => `Off: ${reason}`,
65
+ reminderExpires: (when) => `Stops ${when} unless you keep it`,
66
+ reminderTargetOther: "Goes to another session",
67
+ reminderTargetUntitled: "Untitled session",
68
+ reminderTargetOpen: (title) => `Open ${title}`,
69
+ reminderTargetNew: (folder) => folder ? `Starts a new session in ${folder}` : "Starts a new chat",
70
+ reminderTargetExtension: (extension) => `Runs ${extension}`,
71
+ reminderPause: (label) => `Pause ${label}`,
72
+ reminderResume: (label) => `Resume ${label}`,
73
+ reminderRunNow: (label) => `Run ${label} now`,
74
+ reminderDelete: (label) => `Delete ${label}`,
75
+ reminderKeep: (label) => `Keep ${label} for good`,
76
+ reminderHistoryShow: (label) => `Show the history of ${label}`,
77
+ reminderHistoryHide: (label) => `Hide the history of ${label}`,
78
+ reminderHistoryLabel: (label) => `History of ${label}`,
79
+ reminderNoFires: "Not sent yet",
80
+ reminderFireOutcome: (outcome) => FIRE_OUTCOMES[outcome],
81
+ reminderFireLate: "late"
82
+ };
83
+ //#endregion
84
+ export { REMINDER_LABELS };
@@ -0,0 +1,93 @@
1
+ import { Readable } from "../../chat/headless/store.js";
2
+ import { Schedule as Schedule$1, SchedulesStatus } from "./host.js";
3
+ import { ScheduleTrigger } from "zidane/chat/pure";
4
+ //#region src/session/headless/schedules.d.ts
5
+ /** The reminders a host holds, as stores. */
6
+ interface SchedulesState {
7
+ /** Whether the feature is on: `null` until read. */
8
+ status: Readable<SchedulesStatus | null>;
9
+ /** Every schedule, in the backend's order: `null` until read, and while the feature is off. */
10
+ all: Readable<readonly Schedule$1[] | null>;
11
+ /** The schedules whose prompt goes to `sessionId` (`null` like `all`). The same store for the same id. */
12
+ forSession(sessionId: string): Readable<readonly Schedule$1[] | null>;
13
+ /** Reads the status, then the list while the feature is on. Rejects when a read fails. */
14
+ refresh(): Promise<void>;
15
+ /** Reads once, the first time something asks. Never rejects. */
16
+ ensure(): void;
17
+ /** Something changed on the backend: re-reads once this tick, when read so far. */
18
+ wake(): void;
19
+ /** Writes a schedule an action answered (created or changed) at once. */
20
+ apply(schedule: Schedule$1): void;
21
+ /** Drops a removed schedule at once. */
22
+ drop(id: string): void;
23
+ }
24
+ /** What a {@link SchedulesState} reads from the backend. */
25
+ interface SchedulesBackend {
26
+ /** Whether the feature is on and the store keeps schedules (zidane's `schedules.status`). Never rejects. */
27
+ status(): Promise<SchedulesStatus>;
28
+ /** Every schedule (zidane's `schedules.list`). Rejects while the feature is off. */
29
+ list(): Promise<readonly Schedule$1[]>;
30
+ }
31
+ /**
32
+ * Creates a {@link SchedulesState}.
33
+ *
34
+ * @param backend - Reads the status and the list.
35
+ */
36
+ declare function createSchedulesState(backend: SchedulesBackend): SchedulesState;
37
+ /**
38
+ * The schedules that will fire, soonest first: on, with a next time.
39
+ *
40
+ * @param list - Schedules in any order.
41
+ */
42
+ declare function upcomingSchedules(list: readonly Schedule$1[]): Schedule$1[];
43
+ /**
44
+ * Schedules as the Reminders panel lists them: the ones that will fire, soonest first, then the rest, newest first.
45
+ *
46
+ * @param list - Schedules in any order.
47
+ */
48
+ declare function sortSchedules(list: readonly Schedule$1[]): Schedule$1[];
49
+ /**
50
+ * Whether a reminder is finished: on, but with no next time (a one-off that was sent).
51
+ *
52
+ * @param schedule - The schedule.
53
+ */
54
+ declare function isScheduleFinished(schedule: Schedule$1): boolean;
55
+ /** What the composer's Reminders badge shows: how many will fire, and the soonest time. */
56
+ interface RemindersSummary {
57
+ /** Schedules of the session that are on and have a next time. */
58
+ count: number;
59
+ /** The soonest next time (epoch ms). */
60
+ next: number;
61
+ }
62
+ /**
63
+ * The composer badge's summary of a session's schedules. `null` when none will fire.
64
+ *
65
+ * @param list - The session's schedules (`null` until read).
66
+ */
67
+ declare function remindersSummary(list: readonly Schedule$1[] | null): RemindersSummary | null;
68
+ /**
69
+ * Whether Keep applies: a repeat the agent made, which the backend turns off at `expiresAt` unless you keep it.
70
+ *
71
+ * @param schedule - The schedule.
72
+ */
73
+ declare function canKeepSchedule(schedule: Schedule$1): boolean;
74
+ /** The time words of the Reminders form, read: a trigger, or why not. */
75
+ type ReminderWhen = {
76
+ ok: true;
77
+ trigger: ScheduleTrigger;
78
+ } | {
79
+ ok: false;
80
+ /** `empty`: nothing typed; `unknown`: not a form zidane reads; `extra`: words after the time. */
81
+ reason: 'empty' | 'unknown' | 'extra';
82
+ };
83
+ /**
84
+ * Reads the Reminders form's time field (`in 20m`, `tomorrow 9:00`, `weekdays 9:00`, `cron "0 9 * * 1-5"`) in the
85
+ * client's time zone. The prompt has its own field, so words after the time are refused.
86
+ *
87
+ * @param text - What the person typed.
88
+ * @param now - Epoch ms.
89
+ * @param tz - The IANA time zone for cron triggers. Default: the client's.
90
+ */
91
+ declare function readReminderWhen(text: string, now: number, tz?: string): ReminderWhen;
92
+ //#endregion
93
+ export { ReminderWhen, RemindersSummary, SchedulesBackend, SchedulesState, canKeepSchedule, createSchedulesState, isScheduleFinished, readReminderWhen, remindersSummary, sortSchedules, upcomingSchedules };
@@ -0,0 +1,190 @@
1
+ import { parseWhen, scheduleTargetSession } from "zidane/chat/pure";
2
+ //#region src/session/headless/schedules.ts
3
+ /**
4
+ * Reminders (zidane's schedules, `Settings.schedules`): the store a host
5
+ * builds `SessionHost.schedules` on, and the models the Reminders panel and
6
+ * the composer badge read.
7
+ *
8
+ * One list holds every schedule of the backend; a session's view is that
9
+ * list cut to the schedules whose prompt goes to the session. The backend's
10
+ * change signal (`schedules:changed`) and a settings change wake a re-read
11
+ * of the status and the list, once per tick, and only the newest read
12
+ * writes. An action's answer lands at once (`apply`, `drop`), before the
13
+ * signal's re-read.
14
+ */
15
+ const sameItems = (a, b) => a.length === b.length && a.every((x, i) => x === b[i]);
16
+ /** A readable value with a setter that notifies when it changed by identity. */
17
+ function cell(initial) {
18
+ let value = initial;
19
+ const listeners = /* @__PURE__ */ new Set();
20
+ return {
21
+ get: () => value,
22
+ set(next) {
23
+ if (Object.is(next, value)) return;
24
+ value = next;
25
+ for (const l of [...listeners]) l();
26
+ },
27
+ subscribe(onChange) {
28
+ listeners.add(onChange);
29
+ return () => {
30
+ listeners.delete(onChange);
31
+ };
32
+ }
33
+ };
34
+ }
35
+ /**
36
+ * Creates a {@link SchedulesState}.
37
+ *
38
+ * @param backend - Reads the status and the list.
39
+ */
40
+ function createSchedulesState(backend) {
41
+ const status = cell(null);
42
+ const all = cell(null);
43
+ const views = /* @__PURE__ */ new Map();
44
+ let read = false;
45
+ let seq = 0;
46
+ let waking = false;
47
+ const refresh = async () => {
48
+ read = true;
49
+ const mine = ++seq;
50
+ const next = await backend.status();
51
+ if (mine !== seq) return;
52
+ status.set(sameStatus(status.get(), next) ? status.get() : next);
53
+ if (!next.enabled) {
54
+ all.set(null);
55
+ return;
56
+ }
57
+ const list = await backend.list();
58
+ if (mine !== seq) return;
59
+ all.set([...list]);
60
+ };
61
+ return {
62
+ status,
63
+ all,
64
+ forSession(sessionId) {
65
+ let view = views.get(sessionId);
66
+ if (!view) {
67
+ let source;
68
+ let value = null;
69
+ view = {
70
+ get() {
71
+ const list = all.get();
72
+ if (list === source) return value;
73
+ source = list;
74
+ const next = list === null ? null : list.filter((s) => scheduleTargetSession(s.action) === sessionId);
75
+ if (next === null || value === null || !sameItems(next, value)) value = next;
76
+ return value;
77
+ },
78
+ subscribe: all.subscribe
79
+ };
80
+ views.set(sessionId, view);
81
+ }
82
+ return view;
83
+ },
84
+ refresh,
85
+ ensure() {
86
+ if (read) return;
87
+ refresh().catch(() => void 0);
88
+ },
89
+ wake() {
90
+ if (!read || waking) return;
91
+ waking = true;
92
+ queueMicrotask(() => {
93
+ waking = false;
94
+ refresh().catch(() => void 0);
95
+ });
96
+ },
97
+ apply(schedule) {
98
+ const list = all.get();
99
+ if (list === null) return;
100
+ seq++;
101
+ const at = list.findIndex((s) => s.id === schedule.id);
102
+ all.set(at === -1 ? [...list, schedule] : list.map((s, i) => i === at ? schedule : s));
103
+ },
104
+ drop(id) {
105
+ const list = all.get();
106
+ if (list === null || !list.some((s) => s.id === id)) return;
107
+ seq++;
108
+ all.set(list.filter((s) => s.id !== id));
109
+ }
110
+ };
111
+ }
112
+ function sameStatus(a, b) {
113
+ return a !== null && a.enabled === b.enabled && a.supported === b.supported;
114
+ }
115
+ /**
116
+ * The schedules that will fire, soonest first: on, with a next time.
117
+ *
118
+ * @param list - Schedules in any order.
119
+ */
120
+ function upcomingSchedules(list) {
121
+ return list.filter((s) => s.enabled && s.nextFireAt !== null).sort((a, b) => (a.nextFireAt ?? 0) - (b.nextFireAt ?? 0));
122
+ }
123
+ /**
124
+ * Schedules as the Reminders panel lists them: the ones that will fire, soonest first, then the rest, newest first.
125
+ *
126
+ * @param list - Schedules in any order.
127
+ */
128
+ function sortSchedules(list) {
129
+ const upcoming = upcomingSchedules(list);
130
+ const ids = new Set(upcoming.map((s) => s.id));
131
+ const rest = list.filter((s) => !ids.has(s.id)).sort((a, b) => b.updatedAt - a.updatedAt);
132
+ return [...upcoming, ...rest];
133
+ }
134
+ /**
135
+ * Whether a reminder is finished: on, but with no next time (a one-off that was sent).
136
+ *
137
+ * @param schedule - The schedule.
138
+ */
139
+ function isScheduleFinished(schedule) {
140
+ return schedule.enabled && schedule.nextFireAt === null;
141
+ }
142
+ /**
143
+ * The composer badge's summary of a session's schedules. `null` when none will fire.
144
+ *
145
+ * @param list - The session's schedules (`null` until read).
146
+ */
147
+ function remindersSummary(list) {
148
+ const upcoming = upcomingSchedules(list ?? []);
149
+ return upcoming.length === 0 ? null : {
150
+ count: upcoming.length,
151
+ next: upcoming[0].nextFireAt
152
+ };
153
+ }
154
+ /**
155
+ * Whether Keep applies: a repeat the agent made, which the backend turns off at `expiresAt` unless you keep it.
156
+ *
157
+ * @param schedule - The schedule.
158
+ */
159
+ function canKeepSchedule(schedule) {
160
+ return schedule.createdBy.kind === "agent" && schedule.trigger.kind !== "at" && schedule.expiresAt !== void 0;
161
+ }
162
+ /**
163
+ * Reads the Reminders form's time field (`in 20m`, `tomorrow 9:00`, `weekdays 9:00`, `cron "0 9 * * 1-5"`) in the
164
+ * client's time zone. The prompt has its own field, so words after the time are refused.
165
+ *
166
+ * @param text - What the person typed.
167
+ * @param now - Epoch ms.
168
+ * @param tz - The IANA time zone for cron triggers. Default: the client's.
169
+ */
170
+ function readReminderWhen(text, now, tz) {
171
+ if (text.trim() === "") return {
172
+ ok: false,
173
+ reason: "empty"
174
+ };
175
+ const parsed = tz === void 0 ? parseWhen(text, now) : parseWhen(text, now, tz);
176
+ if (!parsed) return {
177
+ ok: false,
178
+ reason: "unknown"
179
+ };
180
+ if (parsed.rest !== "") return {
181
+ ok: false,
182
+ reason: "extra"
183
+ };
184
+ return {
185
+ ok: true,
186
+ trigger: parsed.trigger
187
+ };
188
+ }
189
+ //#endregion
190
+ export { canKeepSchedule, createSchedulesState, isScheduleFinished, readReminderWhen, remindersSummary, sortSchedules, upcomingSchedules };
@@ -0,0 +1,28 @@
1
+ import { Readable } from "../../chat/headless/store.js";
2
+ import { SessionSecretEntry } from "./host.js";
3
+ //#region src/session/headless/secrets.d.ts
4
+ /** The secret lists of every session a host has read. */
5
+ interface SecretsState {
6
+ /** The session's entries store (`null` until first read). */
7
+ entries(sessionId: string): Readable<readonly SessionSecretEntry[] | null>;
8
+ /** Reads the session from the backend. Rejects when the read fails. */
9
+ refresh(sessionId: string): Promise<void>;
10
+ /** A store changed somewhere: every session read so far re-reads once this tick. */
11
+ wakeAll(): void;
12
+ /** Forgets a session (deleted). */
13
+ forget(sessionId: string): void;
14
+ }
15
+ /**
16
+ * Creates a {@link SecretsState}.
17
+ *
18
+ * @param list - Reads one session's entries from the backend.
19
+ */
20
+ declare function createSecretsState(list: (sessionId: string) => Promise<readonly SessionSecretEntry[]>): SecretsState;
21
+ /**
22
+ * Secrets by name, as the panel lists them.
23
+ *
24
+ * @param entries - The entries in any order.
25
+ */
26
+ declare function sortSecrets(entries: readonly SessionSecretEntry[]): SessionSecretEntry[];
27
+ //#endregion
28
+ export { SecretsState, createSecretsState, sortSecrets };
@@ -0,0 +1,48 @@
1
+ import { createKeyedState } from "./keyed.js";
2
+ //#region src/session/headless/secrets.ts
3
+ /**
4
+ * Creates a {@link SecretsState}.
5
+ *
6
+ * @param list - Reads one session's entries from the backend.
7
+ */
8
+ function createSecretsState(list) {
9
+ const state = createKeyedState(null);
10
+ const seen = /* @__PURE__ */ new Set();
11
+ const requests = /* @__PURE__ */ new Map();
12
+ let waking = false;
13
+ const refresh = async (sessionId) => {
14
+ seen.add(sessionId);
15
+ const seq = (requests.get(sessionId) ?? 0) + 1;
16
+ requests.set(sessionId, seq);
17
+ const entries = await list(sessionId);
18
+ if (requests.get(sessionId) !== seq) return;
19
+ state.set(sessionId, sortSecrets(entries));
20
+ };
21
+ return {
22
+ entries: (sessionId) => state.readable(sessionId),
23
+ refresh,
24
+ wakeAll() {
25
+ if (waking) return;
26
+ waking = true;
27
+ queueMicrotask(() => {
28
+ waking = false;
29
+ for (const sessionId of seen) refresh(sessionId).catch(() => void 0);
30
+ });
31
+ },
32
+ forget(sessionId) {
33
+ seen.delete(sessionId);
34
+ requests.delete(sessionId);
35
+ state.delete(sessionId);
36
+ }
37
+ };
38
+ }
39
+ /**
40
+ * Secrets by name, as the panel lists them.
41
+ *
42
+ * @param entries - The entries in any order.
43
+ */
44
+ function sortSecrets(entries) {
45
+ return [...entries].sort((a, b) => a.name.localeCompare(b.name));
46
+ }
47
+ //#endregion
48
+ export { createSecretsState, sortSecrets };
@@ -1,23 +1,25 @@
1
1
  import { ArtifactRowChips, ArtifactRowChipsFields, ArtifactRowChipsProps, BADGE_ICONS, DiffFacts, DiffFactsProps, badgeColorStyle, badgeToneClass, hasArtifactRowChips } from "./ArtifactRowChips.js";
2
2
  import { ArtifactOpenEvent, ArtifactsPanel, ArtifactsPanelFocus, ArtifactsPanelProps } from "./ArtifactsPanel.js";
3
3
  import { DiffFileTree, DiffFileTreeProps, FindingCounts } from "./DiffFileTree.js";
4
- import { AttentionActions, InboxAttention, InboxAttentionProps, PanelAttentionProps, QueueAttention, TodosAttention } from "./PanelAttention.js";
5
- import { ProjectHome, ProjectHomeProject, ProjectHomeProps, ProjectHomeRepo, ProjectHomeSwitcher } from "./ProjectHome.js";
4
+ import { AttentionActions, InboxAttention, InboxAttentionProps, PanelAttentionProps, QueueAttention, SecretsAttention, SecretsAttentionProps } from "./PanelAttention.js";
5
+ import { PlanTracker, PlanTrackerProps, RecentPlans, RecentPlansProps, planStateTone, useInboxPlans } from "./PlanTracker.js";
6
+ import { ProjectHome, ProjectHomeProject, ProjectHomeProps, ProjectHomeRepo, ProjectHomeStartResult, ProjectHomeSwitcher } from "./ProjectHome.js";
6
7
  import { ProviderUsage, ProviderUsageProvider, ProviderUsageProviderProps, useProviderUsage } from "./ProviderUsageProvider.js";
7
8
  import { QueueAttachmentRowProps, QueueAttachmentsSlot, QueueTab, QueueTabProps } from "./QueueTab.js";
9
+ import { RemindersPanel, RemindersPanelProps, RemindersScope } from "./RemindersPanel.js";
8
10
  import { RenderSessionShell, SessionShell, SessionShellProps } from "./SessionShell.js";
9
11
  import { RunningWorkDialog, RunningWorkDialogProps } from "./RunningWorkDialog.js";
12
+ import { SecretsPanel, SecretsPanelProps } from "./SecretsPanel.js";
10
13
  import { SessionCacheFacts, SessionCacheFactsProps, useSessionCacheReport } from "./SessionCacheFacts.js";
11
14
  import { SessionDetailsDialog, SessionDetailsDialogProps, SessionDetailsFacts, SessionDetailsSpace, SessionDetailsStatus, SessionFolderLocation } from "./SessionDetailsDialog.js";
12
15
  import { SessionHeader, SessionHeaderProps, SessionHeaderServer } from "./SessionHeader.js";
13
- import { SessionProvider, SessionProviderProps, useSessionArtifacts, useSessionHost, useSessionQueue, useSessionRunningWork, useSessionTodos } from "./SessionProvider.js";
16
+ import { SessionProvider, SessionProviderProps, useAllSchedules, useSchedulesStatus, useSessionArtifacts, useSessionHost, useSessionPlans, useSessionQueue, useSessionRunningWork, useSessionSchedules, useSessionSecrets } from "./SessionProvider.js";
14
17
  import { SideChat, SideChatProps } from "./SideChat.js";
15
18
  import { TODO_ROW_CLASS, TodoListItem, TodoListView, TodoListViewProps, TodoTally, TodoTallyProps, isDoneTodo, todoGlyphTone } from "./TodoList.js";
16
- import { TodosPanel, TodosPanelProps } from "./TodosPanel.js";
17
19
  import { TurnDetailsDialog, TurnDetailsDialogProps } from "./TurnDetailsDialog.js";
18
20
  import { UsagePanel, UsagePanelProps } from "./UsagePanel.js";
19
21
  import { WelcomeScreen, WelcomeScreenProps } from "./WelcomeScreen.js";
20
22
  import { useSessionLabels } from "./useSessionLabels.js";
21
23
  import { renderSessionModalShell, renderWideSessionModalShell } from "./modal-shell.js";
22
24
  import { UsageSummaryView, useUsageSummary } from "./useUsageSummary.js";
23
- export { ArtifactOpenEvent, ArtifactRowChips, ArtifactRowChipsFields, ArtifactRowChipsProps, ArtifactsPanel, ArtifactsPanelFocus, ArtifactsPanelProps, AttentionActions, BADGE_ICONS, DiffFacts, DiffFactsProps, DiffFileTree, DiffFileTreeProps, FindingCounts, InboxAttention, InboxAttentionProps, PanelAttentionProps, ProjectHome, ProjectHomeProject, ProjectHomeProps, ProjectHomeRepo, ProjectHomeSwitcher, ProviderUsage, ProviderUsageProvider, ProviderUsageProviderProps, QueueAttachmentRowProps, QueueAttachmentsSlot, QueueAttention, QueueTab, QueueTabProps, type RenderSessionShell, RunningWorkDialog, RunningWorkDialogProps, SessionCacheFacts, SessionCacheFactsProps, SessionDetailsDialog, SessionDetailsDialogProps, SessionDetailsFacts, SessionDetailsSpace, SessionDetailsStatus, SessionFolderLocation, SessionHeader, SessionHeaderProps, SessionHeaderServer, SessionProvider, SessionProviderProps, SessionShell, type SessionShellProps, SideChat, SideChatProps, TODO_ROW_CLASS, TodoListItem, TodoListView, TodoListViewProps, TodoTally, TodoTallyProps, TodosAttention, TodosPanel, TodosPanelProps, TurnDetailsDialog, TurnDetailsDialogProps, UsagePanel, UsagePanelProps, UsageSummaryView, WelcomeScreen, WelcomeScreenProps, badgeColorStyle, badgeToneClass, hasArtifactRowChips, isDoneTodo, renderSessionModalShell, renderWideSessionModalShell, todoGlyphTone, useProviderUsage, useSessionArtifacts, useSessionCacheReport, useSessionHost, useSessionLabels, useSessionQueue, useSessionRunningWork, useSessionTodos, useUsageSummary };
25
+ export { ArtifactOpenEvent, ArtifactRowChips, ArtifactRowChipsFields, ArtifactRowChipsProps, ArtifactsPanel, ArtifactsPanelFocus, ArtifactsPanelProps, AttentionActions, BADGE_ICONS, DiffFacts, DiffFactsProps, DiffFileTree, DiffFileTreeProps, FindingCounts, InboxAttention, InboxAttentionProps, PanelAttentionProps, PlanTracker, PlanTrackerProps, ProjectHome, ProjectHomeProject, ProjectHomeProps, ProjectHomeRepo, ProjectHomeStartResult, ProjectHomeSwitcher, ProviderUsage, ProviderUsageProvider, ProviderUsageProviderProps, QueueAttachmentRowProps, QueueAttachmentsSlot, QueueAttention, QueueTab, QueueTabProps, RecentPlans, RecentPlansProps, RemindersPanel, RemindersPanelProps, RemindersScope, type RenderSessionShell, RunningWorkDialog, RunningWorkDialogProps, SecretsAttention, SecretsAttentionProps, SecretsPanel, SecretsPanelProps, SessionCacheFacts, SessionCacheFactsProps, SessionDetailsDialog, SessionDetailsDialogProps, SessionDetailsFacts, SessionDetailsSpace, SessionDetailsStatus, SessionFolderLocation, SessionHeader, SessionHeaderProps, SessionHeaderServer, SessionProvider, SessionProviderProps, SessionShell, type SessionShellProps, SideChat, SideChatProps, TODO_ROW_CLASS, TodoListItem, TodoListView, TodoListViewProps, TodoTally, TodoTallyProps, TurnDetailsDialog, TurnDetailsDialogProps, UsagePanel, UsagePanelProps, UsageSummaryView, WelcomeScreen, WelcomeScreenProps, badgeColorStyle, badgeToneClass, hasArtifactRowChips, isDoneTodo, planStateTone, renderSessionModalShell, renderWideSessionModalShell, todoGlyphTone, useAllSchedules, useInboxPlans, useProviderUsage, useSchedulesStatus, useSessionArtifacts, useSessionCacheReport, useSessionHost, useSessionLabels, useSessionPlans, useSessionQueue, useSessionRunningWork, useSessionSchedules, useSessionSecrets, useUsageSummary };
@@ -1,23 +1,25 @@
1
- import { SessionProvider, useSessionArtifacts, useSessionHost, useSessionQueue, useSessionRunningWork, useSessionTodos } from "./SessionProvider.js";
1
+ import { SessionProvider, useAllSchedules, useSchedulesStatus, useSessionArtifacts, useSessionHost, useSessionPlans, useSessionQueue, useSessionRunningWork, useSessionSchedules, useSessionSecrets } from "./SessionProvider.js";
2
2
  import { useSessionLabels } from "./useSessionLabels.js";
3
3
  import { ArtifactRowChips, BADGE_ICONS, DiffFacts, badgeColorStyle, badgeToneClass, hasArtifactRowChips } from "./ArtifactRowChips.js";
4
4
  import { TODO_ROW_CLASS, TodoListView, TodoTally, isDoneTodo, todoGlyphTone } from "./TodoList.js";
5
5
  import { DiffFileTree } from "./DiffFileTree.js";
6
6
  import { ArtifactsPanel } from "./ArtifactsPanel.js";
7
- import { InboxAttention, QueueAttention, TodosAttention } from "./PanelAttention.js";
7
+ import { InboxAttention, QueueAttention, SecretsAttention } from "./PanelAttention.js";
8
+ import { PlanTracker, RecentPlans, planStateTone, useInboxPlans } from "./PlanTracker.js";
8
9
  import { useUsageSummary } from "./useUsageSummary.js";
9
10
  import { ProjectHome } from "./ProjectHome.js";
10
11
  import { ProviderUsageProvider, useProviderUsage } from "./ProviderUsageProvider.js";
11
12
  import { QueueTab } from "./QueueTab.js";
13
+ import { RemindersPanel } from "./RemindersPanel.js";
12
14
  import { SessionShell } from "./SessionShell.js";
13
15
  import { RunningWorkDialog } from "./RunningWorkDialog.js";
16
+ import { SecretsPanel } from "./SecretsPanel.js";
14
17
  import { SessionCacheFacts, useSessionCacheReport } from "./SessionCacheFacts.js";
15
18
  import { SessionDetailsDialog } from "./SessionDetailsDialog.js";
16
19
  import { SessionHeader } from "./SessionHeader.js";
17
20
  import { SideChat } from "./SideChat.js";
18
- import { TodosPanel } from "./TodosPanel.js";
19
21
  import { TurnDetailsDialog } from "./TurnDetailsDialog.js";
20
22
  import { UsagePanel } from "./UsagePanel.js";
21
23
  import { WelcomeScreen } from "./WelcomeScreen.js";
22
24
  import { renderSessionModalShell, renderWideSessionModalShell } from "./modal-shell.js";
23
- export { ArtifactRowChips, ArtifactsPanel, BADGE_ICONS, DiffFacts, DiffFileTree, InboxAttention, ProjectHome, ProviderUsageProvider, QueueAttention, QueueTab, RunningWorkDialog, SessionCacheFacts, SessionDetailsDialog, SessionHeader, SessionProvider, SessionShell, SideChat, TODO_ROW_CLASS, TodoListView, TodoTally, TodosAttention, TodosPanel, TurnDetailsDialog, UsagePanel, WelcomeScreen, badgeColorStyle, badgeToneClass, hasArtifactRowChips, isDoneTodo, renderSessionModalShell, renderWideSessionModalShell, todoGlyphTone, useProviderUsage, useSessionArtifacts, useSessionCacheReport, useSessionHost, useSessionLabels, useSessionQueue, useSessionRunningWork, useSessionTodos, useUsageSummary };
25
+ export { ArtifactRowChips, ArtifactsPanel, BADGE_ICONS, DiffFacts, DiffFileTree, InboxAttention, PlanTracker, ProjectHome, ProviderUsageProvider, QueueAttention, QueueTab, RecentPlans, RemindersPanel, RunningWorkDialog, SecretsAttention, SecretsPanel, SessionCacheFacts, SessionDetailsDialog, SessionHeader, SessionProvider, SessionShell, SideChat, TODO_ROW_CLASS, TodoListView, TodoTally, TurnDetailsDialog, UsagePanel, WelcomeScreen, badgeColorStyle, badgeToneClass, hasArtifactRowChips, isDoneTodo, planStateTone, renderSessionModalShell, renderWideSessionModalShell, todoGlyphTone, useAllSchedules, useInboxPlans, useProviderUsage, useSchedulesStatus, useSessionArtifacts, useSessionCacheReport, useSessionHost, useSessionLabels, useSessionPlans, useSessionQueue, useSessionRunningWork, useSessionSchedules, useSessionSecrets, useUsageSummary };
@@ -1,7 +1,7 @@
1
- import { PromptAttachment, RunningWorkItem, SessionArtifact, SessionHost, SessionTurn, TodoItem } from "../headless/host.js";
1
+ import { PromptAttachment, RunningWorkItem, Schedule, ScheduleFire, SessionArtifact, SessionHost, SessionSecretEntry, SessionTurn, TodoItem } from "../headless/host.js";
2
2
  //#region src/session/testing/contract.d.ts
3
3
  /** An optional `SessionHost` member, by its path. */
4
- type SessionHostCapability = 'todos' | 'todos.set' | 'todos.retry' | 'queue' | 'queue.add' | 'queue.remove' | 'queue.update' | 'queue.attachments' | 'queue.pushNow' | 'artifacts' | 'artifacts.remove' | 'artifacts.refreshRow' | 'runningWork' | 'runningWork.cancel' | 'turns' | 'turns.fork' | 'turns.editText' | 'turns.delete' | 'turns.rewind' | 'details' | 'details.titleStatus' | 'details.generateTitle' | 'details.export' | 'details.compact' | 'details.setFolder' | 'details.cacheReport' | 'usage' | 'usage.summary' | 'usage.providers' | 'usage.github' | 'usage.redeemReset' | 'side' | 'side.subscribe';
4
+ type SessionHostCapability = 'plans' | 'plans.edit' | 'plans.control' | 'plans.retry' | 'queue' | 'queue.add' | 'queue.remove' | 'queue.update' | 'queue.attachments' | 'queue.pushNow' | 'artifacts' | 'artifacts.remove' | 'artifacts.refreshRow' | 'runningWork' | 'runningWork.cancel' | 'turns' | 'turns.fork' | 'turns.editText' | 'turns.delete' | 'turns.rewind' | 'details' | 'details.titleStatus' | 'details.generateTitle' | 'details.export' | 'details.compact' | 'details.setFolder' | 'details.cacheReport' | 'usage' | 'usage.summary' | 'usage.providers' | 'usage.github' | 'usage.redeemReset' | 'side' | 'side.subscribe' | 'secrets' | 'secrets.save' | 'secrets.revoke' | 'schedules' | 'schedules.create' | 'schedules.update' | 'schedules.remove' | 'schedules.runNow' | 'schedules.fires';
5
5
  /** A queued message the backend holds, with its attachments' bytes. */
6
6
  interface SessionHostContractEntry {
7
7
  /** The entry's id. */
@@ -13,7 +13,10 @@ interface SessionHostContractEntry {
13
13
  }
14
14
  /** What the backend behind the host holds, per session id. */
15
15
  interface SessionHostContractBackend {
16
- /** The live todo list per session (a session missing here has none). */
16
+ /**
17
+ * Each session's task list as the agent wrote it (`todowrite`): its applying plan. A session missing here holds
18
+ * no plans (its snapshot reads `null`). `createFixturePlansBackend({ todos })` serves it.
19
+ */
17
20
  todos: Readonly<Record<string, readonly TodoItem[]>>;
18
21
  /** The queue per session. */
19
22
  queue: Readonly<Record<string, readonly SessionHostContractEntry[]>>;
@@ -25,17 +28,27 @@ interface SessionHostContractBackend {
25
28
  turns: Readonly<Record<string, readonly SessionTurn[]>>;
26
29
  /** Each session's side chat, by the parent's id: side chats created land here, removed ones leave. */
27
30
  sides: Record<string, string>;
31
+ /** The saved secrets per session (its project's), without values. */
32
+ secrets: Readonly<Record<string, readonly SessionSecretEntry[]>>;
33
+ /** The stored reminders, oldest first (the Reminders setting is on). Serve them as `createFixtureScheduleBackend` does. */
34
+ schedules: readonly Schedule[];
35
+ /** Each reminder's fires, newest first. */
36
+ scheduleFires: Readonly<Record<string, readonly ScheduleFire[]>>;
28
37
  }
29
38
  /** Changes the backend from outside and announces it as the backend does. */
30
39
  interface SessionHostContractControl {
31
- /** The agent replaced the session's todo list. */
32
- setTodos(sessionId: string, items: readonly TodoItem[]): void;
40
+ /** The agent wrote its task list again (`todowrite`): announced as a plans snapshot. */
41
+ writeTodos(sessionId: string, items: readonly TodoItem[]): void;
33
42
  /** Another window changed the session's queue. */
34
43
  setQueue(sessionId: string, entries: readonly SessionHostContractEntry[]): void;
35
44
  /** The session recorded an artifact (it becomes the newest). */
36
45
  recordArtifact(sessionId: string, artifact: SessionArtifact): void;
37
46
  /** The session's work changed (a tool call started or ended). */
38
47
  setWork(sessionId: string, items: readonly RunningWorkItem[]): void;
48
+ /** The session's project secrets changed (the agent saved one, another window revoked one): announced as a store change. */
49
+ setSecrets(sessionId: string, entries: readonly SessionSecretEntry[]): void;
50
+ /** The stored reminders changed (the agent set one, one fired): announced as `schedules:changed`. Absent: not checked. */
51
+ setSchedules?(list: readonly Schedule[]): void;
39
52
  }
40
53
  /** A host built over a backend, the backend's control, and how to tear them down. */
41
54
  interface SessionHostHarness {