@kabmo-labs/kabmo 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/README.md +3 -2
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +412 -394
  4. package/dist/client/static/js/index-3ve31rzx.css +1 -0
  5. package/dist/client/static/js/{index-mx658m43.js → index-rerjq5th.js} +846 -844
  6. package/marketplace/plugins/stats/README.md +27 -8
  7. package/marketplace/plugins/stats/package.json +2 -2
  8. package/marketplace/plugins/stats/src/HeaderReadout.test.tsx +2 -1
  9. package/marketplace/plugins/stats/src/HeaderReadout.tsx +6 -2
  10. package/marketplace/plugins/stats/src/KillConfirm.test.tsx +159 -0
  11. package/marketplace/plugins/stats/src/KillConfirm.tsx +145 -0
  12. package/marketplace/plugins/stats/src/ProcessTable.tsx +54 -8
  13. package/marketplace/plugins/stats/src/TotalsBar.test.tsx +5 -2
  14. package/marketplace/plugins/stats/src/TotalsBar.tsx +13 -3
  15. package/marketplace/plugins/stats/src/app.test.tsx +100 -4
  16. package/marketplace/plugins/stats/src/app.tsx +51 -4
  17. package/marketplace/plugins/stats/src/groups.test.ts +1 -1
  18. package/marketplace/plugins/stats/src/kill.test.ts +131 -0
  19. package/marketplace/plugins/stats/src/kill.ts +74 -0
  20. package/marketplace/plugins/stats/src/labels.test.ts +1 -0
  21. package/marketplace/plugins/stats/src/machine.test.ts +77 -0
  22. package/marketplace/plugins/stats/src/machine.ts +115 -0
  23. package/marketplace/plugins/stats/src/proc/darwin.ts +38 -0
  24. package/marketplace/plugins/stats/src/proc/linux.ts +4 -0
  25. package/marketplace/plugins/stats/src/proc/ps.ts +1 -0
  26. package/marketplace/plugins/stats/src/proc/types.ts +11 -0
  27. package/marketplace/plugins/stats/src/sampler.test.ts +42 -4
  28. package/marketplace/plugins/stats/src/sampler.ts +32 -18
  29. package/marketplace/plugins/stats/src/server.ts +29 -2
  30. package/marketplace/plugins/stats/src/snapshot.ts +31 -3
  31. package/package.json +3 -2
  32. package/src/client/components/common/Modal.tsx +7 -0
  33. package/src/client/components/common/code-surface/bracket-guide.test.ts +2 -2
  34. package/src/client/components/common/code-surface/bracket-guide.ts +2 -2
  35. package/src/client/components/common/code-surface/conflict-markers.ts +5 -5
  36. package/src/client/components/common/code-surface/extensions.ts +7 -4
  37. package/src/client/components/common/code-surface/theme.ts +34 -9
  38. package/src/client/components/common/code-surface/whitespace.test.ts +223 -0
  39. package/src/client/components/common/code-surface/whitespace.ts +140 -0
  40. package/src/client/components/common/{server-switcher/index.tsx → server-control/Panel.tsx} +73 -35
  41. package/src/client/components/common/{server-switcher → server-control}/index.test.tsx +98 -37
  42. package/src/client/components/common/server-control/index.tsx +118 -0
  43. package/src/client/components/layout/LeftDock.tsx +1 -0
  44. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +8 -50
  45. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +1 -0
  46. package/src/client/components/mobile/RightSidebar.tsx +1 -0
  47. package/src/client/components/mobile/mobile-main-view/Header.tsx +6 -12
  48. package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +41 -13
  49. package/src/client/components/mobile/mobile-session-sidebar/use-dock.ts +1 -0
  50. package/src/client/components/settings/Modal.tsx +9 -3
  51. package/src/client/components/settings/ProjectSelectorDropdown.tsx +19 -9
  52. package/src/client/components/settings/categories/AgentSettings.tsx +27 -6
  53. package/src/client/components/settings/categories/ProjectSettings.tsx +122 -156
  54. package/src/client/components/settings/categories/SkillCatalogSettings.tsx +220 -260
  55. package/src/client/components/settings/categories/SkillSettings.tsx +6 -3
  56. package/src/client/components/settings/categories/agent-settings/SidebarList.tsx +5 -0
  57. package/src/client/components/settings/categories/project-settings/AccentPalette.test.tsx +189 -0
  58. package/src/client/components/settings/categories/project-settings/AccentPalette.tsx +156 -24
  59. package/src/client/components/settings/categories/project-settings/AddProjectModal.tsx +175 -0
  60. package/src/client/components/settings/categories/project-settings/DeleteProjectModal.tsx +107 -0
  61. package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +40 -24
  62. package/src/client/components/settings/categories/project-settings/DetailsHeader.tsx +17 -7
  63. package/src/client/components/settings/categories/project-settings/IconGrid.tsx +164 -69
  64. package/src/client/components/settings/categories/project-settings/ModelDropdown.test.tsx +122 -0
  65. package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +124 -53
  66. package/src/client/components/settings/categories/project-settings/NameInput.tsx +57 -11
  67. package/src/client/components/settings/categories/project-settings/PathField.tsx +122 -0
  68. package/src/client/components/settings/categories/project-settings/SidebarList.tsx +100 -59
  69. package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +253 -0
  70. package/src/client/components/settings/categories/skill-catalog/SkillCard.tsx +89 -0
  71. package/src/client/components/settings/categories/skill-catalog/SourceRail.tsx +122 -0
  72. package/src/client/components/settings/categories/skill-catalog/catalog-ui.test.tsx +179 -0
  73. package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +208 -0
  74. package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +137 -232
  75. package/src/client/components/settings/categories/skill-settings/InstructionsEditor.tsx +84 -0
  76. package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +123 -87
  77. package/src/client/components/settings/categories/skill-settings/pane.test.tsx +179 -0
  78. package/src/client/components/settings/categories/skill-settings/row-meta.ts +58 -0
  79. package/src/client/components/workspace/chat-timeline/index.tsx +6 -1
  80. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +46 -0
  81. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +15 -6
  82. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.test.ts +29 -0
  83. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +11 -3
  84. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +24 -1
  85. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +6 -2
  86. package/src/client/components/workspace/editor/viewers/SvgPreview.tsx +18 -2
  87. package/src/client/components/workspace/editor/viewers/viewers.test.ts +39 -0
  88. package/src/client/components/workspace/file-explorer/ContextMenu.tsx +18 -5
  89. package/src/client/components/workspace/file-explorer/Modals.tsx +15 -1
  90. package/src/client/components/workspace/file-explorer/RowLabel.tsx +68 -0
  91. package/src/client/components/workspace/file-explorer/TreeItem.tsx +47 -57
  92. package/src/client/components/workspace/file-explorer/collapsed-chain.test.ts +167 -0
  93. package/src/client/components/workspace/file-explorer/drag-props.ts +42 -0
  94. package/src/client/components/workspace/file-explorer/drag.test.ts +43 -0
  95. package/src/client/components/workspace/file-explorer/index.tsx +21 -20
  96. package/src/client/components/workspace/model-dropdown/Panel.tsx +7 -2
  97. package/src/client/components/workspace/model-dropdown/Section.test.tsx +13 -0
  98. package/src/client/components/workspace/model-dropdown/Section.tsx +5 -1
  99. package/src/client/components/workspace/panels/builtin.tsx +7 -0
  100. package/src/client/components/workspace/wiki-panel/NavModal.test.tsx +136 -0
  101. package/src/client/components/workspace/wiki-panel/NavModal.tsx +94 -0
  102. package/src/client/components/workspace/wiki-panel/PageView.tsx +16 -10
  103. package/src/client/components/workspace/wiki-panel/index.tsx +44 -9
  104. package/src/client/data/settings/omp-schema.json +91 -4
  105. package/src/client/data/settings/project.ts +9 -28
  106. package/src/client/data/settings/skill.ts +6 -32
  107. package/src/client/hooks/chat/timeline/pending-model.ts +28 -0
  108. package/src/client/hooks/settings/projects/index.ts +294 -0
  109. package/src/client/hooks/settings/projects.test.ts +237 -0
  110. package/src/client/hooks/settings/skill-catalog.ts +101 -9
  111. package/src/client/hooks/settings/skill-git-import.ts +153 -0
  112. package/src/client/hooks/shell/servers.test.ts +166 -0
  113. package/src/client/hooks/{desktop → shell}/servers.ts +17 -14
  114. package/src/client/hooks/ui/updates/shell-download.ts +1 -1
  115. package/src/client/hooks/ui/updates/shell-update.ts +2 -6
  116. package/src/client/hooks/workspace/file-row-drag.ts +41 -0
  117. package/src/client/hooks/workspace/file-tree-actions.ts +25 -1
  118. package/src/client/hooks/workspace/file-tree-edits.ts +23 -6
  119. package/src/client/hooks/workspace/root-drop-target.ts +77 -0
  120. package/src/client/hooks/workspace/unfolded-chains.ts +165 -0
  121. package/src/client/lib/desktop/dropped-paths.ts +1 -1
  122. package/src/client/lib/desktop/titlebar.test.ts +12 -3
  123. package/src/client/lib/desktop/titlebar.ts +1 -1
  124. package/src/client/lib/shell/desktop.ts +117 -0
  125. package/src/client/lib/shell/servers.ts +75 -0
  126. package/src/client/lib/shell/transport.ts +216 -0
  127. package/src/client/main.tsx +9 -0
  128. package/src/server/lib/db/schema.ts +11 -0
  129. package/src/server/lib/fs/git-merge-conflict.test.ts +14 -1
  130. package/src/server/lib/lifecycle/memory.test.ts +41 -1
  131. package/src/server/lib/lifecycle/memory.ts +131 -14
  132. package/src/server/lib/omp/config/skill-sources.ts +49 -0
  133. package/src/server/lib/omp/config/skills-git-install.ts +155 -0
  134. package/src/server/lib/omp/config/skills-git-repo.ts +288 -0
  135. package/src/server/lib/omp/config/skills-git.test.ts +220 -0
  136. package/src/server/lib/omp/session/subagent-presence-scan.test.ts +137 -0
  137. package/src/server/lib/omp/session/subagent-presence-scan.ts +120 -0
  138. package/src/server/lib/omp/session/subagent-presence-store.test.ts +120 -0
  139. package/src/server/lib/omp/session/subagent-presence-store.ts +65 -0
  140. package/src/server/lib/omp/session/subagent-presence.ts +52 -15
  141. package/src/server/lib/workspace/project-model.server.test.ts +102 -0
  142. package/src/server/lib/workspace/project-model.server.ts +47 -0
  143. package/src/server/lib/workspace/project-patch.server.ts +156 -0
  144. package/src/server/routes/agent/new.ts +8 -1
  145. package/src/server/routes/settings/agents.ts +19 -7
  146. package/src/server/routes/settings/projects.ts +53 -19
  147. package/src/server/routes/settings/settings-projects-routes.test.ts +214 -0
  148. package/src/server/routes/settings/settings-store-routes.test.ts +5 -2
  149. package/src/server/routes/settings/skills-catalog-actions.ts +195 -0
  150. package/src/server/routes/settings/skills.test.ts +225 -0
  151. package/src/server/routes/settings/skills.ts +18 -15
  152. package/src/shared/lib/fs/folder-chain.test.ts +81 -1
  153. package/src/shared/lib/fs/folder-chain.ts +84 -0
  154. package/src/shared/lib/omp/config/schema.test.ts +35 -0
  155. package/src/shared/lib/omp/session/job-progress.test.ts +37 -1
  156. package/src/shared/lib/omp/session/job-progress.ts +31 -0
  157. package/src/shared/lib/omp/session/proc.ts +5 -0
  158. package/src/shared/lib/omp/session/wait.ts +5 -0
  159. package/src/shared/lib/ui/mobile-overlay.ts +61 -0
  160. package/src/shared/lib/ui/svg-scope.test.ts +97 -0
  161. package/src/shared/lib/ui/svg-scope.ts +134 -0
  162. package/src/shared/lib/workspace/project-accent.test.ts +69 -0
  163. package/src/shared/lib/workspace/project-accent.ts +63 -0
  164. package/src/shared/lib/workspace/project-icon.ts +40 -0
  165. package/src/shared/lib/workspace/project-model.test.ts +79 -0
  166. package/src/shared/lib/workspace/project-model.ts +64 -0
  167. package/src/shared/types/settings/skill.ts +53 -3
  168. package/src/test-support/file-explorer-disk.test-util.ts +25 -1
  169. package/src/test-support/file-explorer-drag.test-util.ts +88 -0
  170. package/src/test-support/file-explorer.test-util.ts +47 -47
  171. package/dist/client/static/js/index-28pwtt69.css +0 -1
  172. package/src/client/components/common/code-surface/indent-guide.ts +0 -104
  173. package/src/client/components/settings/categories/skill-catalog/AddSourceModal.tsx +0 -133
  174. package/src/client/hooks/desktop/servers.test.ts +0 -73
  175. package/src/client/lib/desktop/bridge.ts +0 -203
  176. package/src/shared/lib/code/editor/indent-guide-rule.test.ts +0 -65
  177. package/src/shared/lib/code/editor/indent-guide-rule.ts +0 -47
@@ -29,7 +29,11 @@ interface WikiPageViewProps {
29
29
  rootPath?: string;
30
30
  repoScope: string;
31
31
  onNavigate: (path: string) => void;
32
- onBack: () => void;
32
+ /**
33
+ * The desktop's narrow-column back arrow. Absent on the phone, where the page
34
+ * list is a modal reached by the floating button and nothing needs a back.
35
+ */
36
+ onBack?: () => void;
33
37
  }
34
38
 
35
39
  /** Web URL of one page, for "open on the host". Null for an unknown provider. */
@@ -66,15 +70,17 @@ export function WikiPageView({
66
70
  return (
67
71
  <div className="flex h-full min-h-0 w-full flex-col bg-paper">
68
72
  <div className="flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5">
69
- <button
70
- type="button"
71
- onClick={onBack}
72
- title="Back to the page list"
73
- aria-label="Back to the page list"
74
- className="flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden"
75
- >
76
- <ArrowLeft size={13} />
77
- </button>
73
+ {onBack && (
74
+ <button
75
+ type="button"
76
+ onClick={onBack}
77
+ title="Back to the page list"
78
+ aria-label="Back to the page list"
79
+ className="flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden"
80
+ >
81
+ <ArrowLeft size={13} />
82
+ </button>
83
+ )}
78
84
  <span className="min-w-0 flex-1 truncate text-[11px] text-ink/50" title={path}>
79
85
  {path}
80
86
  </span>
@@ -22,6 +22,7 @@ import { useEffect, useMemo, useState } from 'preact/hooks';
22
22
  import { AlertCircle, BookOpen, ExternalLink, Loader2, RefreshCw } from 'lucide-preact';
23
23
  import { GitRepoPicker } from '@/client/components/workspace/repo-picker';
24
24
  import { WikiNav } from '@/client/components/workspace/wiki-panel/Nav';
25
+ import { WikiNavModal, WikiNavTrigger } from '@/client/components/workspace/wiki-panel/NavModal';
25
26
  import { WikiPageView } from '@/client/components/workspace/wiki-panel/PageView';
26
27
  import { useSessionState } from '@/client/hooks/workspace/session-state';
27
28
  import { useRepoList, useRepoScope } from '@/client/hooks/workspace/repo-scope';
@@ -36,6 +37,12 @@ interface WikiPanelProps {
36
37
  active?: boolean;
37
38
  rootPath?: string;
38
39
  refreshKey?: number;
40
+ /**
41
+ * Which shell is drawing this view. The phone gets the floating page-list
42
+ * button; the desktop keeps its nav column and the drill-down a narrow
43
+ * column has always used. Defaults to desktop for a caller that predates it.
44
+ */
45
+ layout?: 'desktop' | 'phone';
39
46
  }
40
47
 
41
48
  /** Why there is no wiki, in the reader's terms. */
@@ -52,7 +59,15 @@ interface WikiPick {
52
59
  path: string;
53
60
  }
54
61
 
55
- export function WikiPanel({ className = '', enabled = true, active = true, rootPath, refreshKey = 0 }: WikiPanelProps) {
62
+ export function WikiPanel({
63
+ className = '',
64
+ enabled = true,
65
+ active = true,
66
+ rootPath,
67
+ refreshKey = 0,
68
+ layout = 'desktop',
69
+ }: WikiPanelProps) {
70
+ const isPhone = layout === 'phone';
56
71
  const { activeRepo, setActiveRepo } = useRepoScope(rootPath);
57
72
  const { repos, scanning: reposScanning, rescan: rescanRepos } = useRepoList(rootPath, enabled);
58
73
  const scope = wikiScopeKey(rootPath, activeRepo);
@@ -60,6 +75,10 @@ export function WikiPanel({ className = '', enabled = true, active = true, rootP
60
75
  // The pick is stored WITH its scope: a page path from another repository names
61
76
  // a page this wiki does not have, and restoring it would open a 404.
62
77
  const [pick, setPick] = useSessionState<WikiPick | null>('wiki.selectedPage', null);
78
+ // The phone's page-list modal.
79
+ const [navOpen, setNavOpen] = useState(false);
80
+ // The desktop's narrow-column drill-down: the list replaces the page until a
81
+ // page is chosen, then the page carries a back arrow.
63
82
  const [narrowShowingPage, setNarrowShowingPage] = useState(false);
64
83
  // Bumped by the panel's own Refresh so the open page follows a re-listed tree
65
84
  // (the tree's revision is what a page read is anchored to).
@@ -74,6 +93,9 @@ export function WikiPanel({ className = '', enabled = true, active = true, rootP
74
93
  () => tree.data?.sidebar ?? sectionsFromEntries(entries),
75
94
  [tree.data?.sidebar, entries],
76
95
  );
96
+ // A wiki with no links has nothing for the narrow modal to show, so the
97
+ // floating trigger stays away rather than opening an empty sheet.
98
+ const hasNavLinks = useMemo(() => sections.some((section) => section.links.length > 0), [sections]);
77
99
 
78
100
  const storedPath = pick && pick.scope === scope ? pick.path : null;
79
101
  // The stored page when it still exists in this wiki, else Home, else the first
@@ -100,15 +122,17 @@ export function WikiPanel({ className = '', enabled = true, active = true, rootP
100
122
  setPick({ scope, path: selectedPath });
101
123
  }, [selectedPath, storedPath, scope, setPick]);
102
124
 
103
- // A different wiki is a different document: drop the narrow-layout drill-down
104
- // so a repo switch lands on the list rather than on a page of the old one.
125
+ // A different wiki is a different document: close the nav and drop the
126
+ // desktop drill-down so a repo switch lands on the list, not on a page of the
127
+ // old one.
105
128
  useEffect(() => {
129
+ setNavOpen(false);
106
130
  setNarrowShowingPage(false);
107
131
  }, [scope]);
108
132
 
109
133
  const handleSelect = (path: string) => {
110
134
  setPick({ scope, path });
111
- setNarrowShowingPage(true);
135
+ if (!isPhone) setNarrowShowingPage(true);
112
136
  };
113
137
 
114
138
  const handleRefresh = () => {
@@ -209,15 +233,17 @@ export function WikiPanel({ className = '', enabled = true, active = true, rootP
209
233
  // narrow drill-down's hidden/shown pair needs no second set of rules.
210
234
  <div className="flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse">
211
235
  <div
212
- className={`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${
213
- narrowShowingPage ? 'hidden @[520px]:flex' : 'flex'
214
- } flex-col`}
236
+ className={`${
237
+ isPhone ? 'hidden' : narrowShowingPage ? 'hidden @[520px]:flex' : 'flex'
238
+ } min-h-0 w-full flex-col @[520px]:w-52 @[520px]:flex-shrink-0 @[520px]:border-l @[520px]:border-ink/10`}
215
239
  >
216
240
  <WikiNav sections={sections} selected={selectedPath} onSelect={handleSelect} />
217
241
  </div>
218
242
 
219
243
  <div
220
- className={`min-w-0 min-h-0 flex-1 ${narrowShowingPage ? 'flex' : 'hidden @[520px]:flex'} flex-col`}
244
+ className={`relative min-w-0 min-h-0 flex-1 ${
245
+ isPhone ? 'flex' : narrowShowingPage ? 'flex' : 'hidden @[520px]:flex'
246
+ } flex-col`}
221
247
  >
222
248
  {repo && selectedPath ? (
223
249
  <WikiPageView
@@ -230,13 +256,22 @@ export function WikiPanel({ className = '', enabled = true, active = true, rootP
230
256
  rootPath={rootPath}
231
257
  repoScope={activeRepo}
232
258
  onNavigate={handleSelect}
233
- onBack={() => setNarrowShowingPage(false)}
259
+ onBack={isPhone ? undefined : () => setNarrowShowingPage(false)}
234
260
  />
235
261
  ) : (
236
262
  <div className="flex h-full items-center justify-center px-6 text-center text-[11px] text-ink/40">
237
263
  This wiki has no markdown pages.
238
264
  </div>
239
265
  )}
266
+
267
+ {isPhone && hasNavLinks && <WikiNavTrigger open={navOpen} onClick={() => setNavOpen(true)} />}
268
+ <WikiNavModal
269
+ open={navOpen}
270
+ sections={sections}
271
+ selected={selectedPath}
272
+ onSelect={handleSelect}
273
+ onClose={() => setNavOpen(false)}
274
+ />
240
275
  </div>
241
276
  </div>
242
277
  )}
@@ -1,5 +1,5 @@
1
1
  {
2
- "source": "@oh-my-pi/pi-coding-agent 10 tabs / 574 settings",
2
+ "source": "@oh-my-pi/pi-coding-agent 10 tabs / 579 settings",
3
3
  "tabs": [
4
4
  {
5
5
  "id": "appearance",
@@ -2291,7 +2291,7 @@
2291
2291
  {
2292
2292
  "value": "ultrafast",
2293
2293
  "label": "Ultrafast",
2294
- "description": "Lowest-latency serving; OpenAI API preview access, or Codex models that advertise it"
2294
+ "description": "Lowest-latency serving; OpenAI API preview access, or Codex and relay models that advertise it"
2295
2295
  }
2296
2296
  ]
2297
2297
  }
@@ -3155,6 +3155,16 @@
3155
3155
  "description": "Store Muse Code results on Meta's servers so a turn whose connection drops is recovered instead of re-run. Stored runs keep prompts and outputs on Meta's side."
3156
3156
  }
3157
3157
  },
3158
+ "providers.openai-codex.daybreak": {
3159
+ "type": "boolean",
3160
+ "default": true,
3161
+ "ui": {
3162
+ "tab": "providers",
3163
+ "group": "Protocol",
3164
+ "label": "Codex Daybreak Blue",
3165
+ "description": "Automatically request the Daybreak Blue cyber access program on ChatGPT accounts eligible for it. OpenAI may use content from Daybreak Blue sessions to improve its models. Does not cover dedicated Daybreak Blue models (gpt-daybreak-blue-*), which may still run as Daybreak sessions."
3166
+ }
3167
+ },
3158
3168
  "providers.cacheRetention": {
3159
3169
  "type": "enum",
3160
3170
  "default": "auto",
@@ -6644,7 +6654,7 @@
6644
6654
  "tab": "tools",
6645
6655
  "group": "Execution",
6646
6656
  "label": "Live Job Widgets",
6647
- "description": "Draw a live widget for each running background job (charts, bars, status grids derived from its output) in the wait card, the jobs pill and the jobs sheet. The `widget` model role (default: `smol`) writes one spec per job; updates need no further model calls"
6657
+ "description": "Draw a live widget for each running background job (charts, bars, status grids derived from its output) in the wait card, the jobs pill and the jobs sheet, and caption long shell commands with one line on what they do. The `widget` model role (default: `smol`) writes one spec and at most one caption per job; updates need no further model calls"
6648
6658
  }
6649
6659
  },
6650
6660
  "tools.xdev": {
@@ -7343,6 +7353,50 @@
7343
7353
  "description": "Expose the optional effort parameter on task spawns, allowing callers to override each subagent's thinking level"
7344
7354
  }
7345
7355
  },
7356
+ "task.perCallModel": {
7357
+ "type": "enum",
7358
+ "default": "off",
7359
+ "values": [
7360
+ "off",
7361
+ "eval",
7362
+ "on"
7363
+ ],
7364
+ "ui": {
7365
+ "tab": "tasks",
7366
+ "group": "Subagents",
7367
+ "label": "Per-Call Model",
7368
+ "description": "Whether a subagent call may pick its model with one exact provider/model-id[@upstream][:level] selector. An @upstream pin is part of the model identity and is supported only by aggregators. Only models the configuration already routes to are accepted. Project settings can turn it off but not on, and never approve a model.",
7369
+ "options": [
7370
+ {
7371
+ "value": "off",
7372
+ "label": "Off",
7373
+ "description": "Reject `model` on task items and eval agent()/workpool()"
7374
+ },
7375
+ {
7376
+ "value": "eval",
7377
+ "label": "Eval only",
7378
+ "description": "Accept `model` in eval agent() and workpool() only"
7379
+ },
7380
+ {
7381
+ "value": "on",
7382
+ "label": "On",
7383
+ "description": "Accept `model` on task items and in eval agent()/workpool()"
7384
+ }
7385
+ ]
7386
+ }
7387
+ },
7388
+ "task.perCallModelAllow": {
7389
+ "type": "array",
7390
+ "default": [],
7391
+ "ui": {
7392
+ "tab": "tasks",
7393
+ "group": "Subagents",
7394
+ "label": "Per-Call Model Allowlist",
7395
+ "editor": "json",
7396
+ "condition": "perCallModelAllowNotProject",
7397
+ "description": "Exact selectors: `provider/model-id`, including `@upstream` only for a pinned OpenRouter/Vercel route (e.g. `openrouter/x@y`). When set, a per-call model must also be listed here. Empty: every model the configuration grants. A project list can only narrow this one."
7398
+ }
7399
+ },
7346
7400
  "task.maxConcurrency": {
7347
7401
  "type": "number",
7348
7402
  "default": 32,
@@ -7536,7 +7590,7 @@
7536
7590
  "tab": "tasks",
7537
7591
  "group": "Subagents",
7538
7592
  "label": "Maximum Per-Spawn Effort",
7539
- "description": "Maximum reasoning effort allowed for the task tool's per-spawn effort hint. Lower values prevent callers from escalating subagents above this ceiling; the default preserves the model's full range.",
7593
+ "description": "Maximum reasoning effort allowed for the task tool's per-spawn effort hint or a per-call model. An explicit `:level` is clamped to the highest supported effort at or below this ceiling, and an omitted `:level` inherits the agent's thinking level capped at this value; cold revival re-applies the cap. Unset, `:inherit` and `:off` keep their existing meaning. A per-call model must support an effort at or below this ceiling; the default preserves the model's full range.",
7540
7594
  "options": [
7541
7595
  {
7542
7596
  "value": "minimal",
@@ -7733,6 +7787,39 @@
7733
7787
  "description": "Refresh generated session titles after todo init replans unless the title was set by the user"
7734
7788
  }
7735
7789
  },
7790
+ "title.refreshAfterPrompts": {
7791
+ "type": "number",
7792
+ "default": 0,
7793
+ "ui": {
7794
+ "tab": "tasks",
7795
+ "group": "Modes",
7796
+ "label": "Refresh Title After Prompts",
7797
+ "description": "Every this many operator prompts, ask the judge model whether a generated session title still fits the conversation, and regenerate it if not",
7798
+ "options": [
7799
+ {
7800
+ "value": "0",
7801
+ "label": "Off",
7802
+ "description": "Default"
7803
+ },
7804
+ {
7805
+ "value": "1",
7806
+ "label": "Every prompt"
7807
+ },
7808
+ {
7809
+ "value": "3",
7810
+ "label": "Every 3 prompts"
7811
+ },
7812
+ {
7813
+ "value": "5",
7814
+ "label": "Every 5 prompts"
7815
+ },
7816
+ {
7817
+ "value": "10",
7818
+ "label": "Every 10 prompts"
7819
+ }
7820
+ ]
7821
+ }
7822
+ },
7736
7823
  "skills.registryUrl": {
7737
7824
  "type": "string",
7738
7825
  "default": "https://skills.omp.sh",
@@ -1,5 +1,13 @@
1
- import type { AccentColorOption, ProjectConfigItem } from '@/shared/types';
1
+ import type { ProjectConfigItem } from '@/shared/types';
2
2
 
3
+ /**
4
+ * Legacy seed rows for the one-shot migration off `omp_projects_config`.
5
+ *
6
+ * Read ONLY by `migrateLegacyProjectSettings`: when the legacy row exists but
7
+ * is not an array, that migration falls back to this list. Nothing else may
8
+ * read it — the live project list comes from the `workspace_folders` table, and
9
+ * the accent palette lives in `@/shared/lib/workspace/project-accent`.
10
+ */
3
11
  export const DEFAULT_PROJECTS_LIST: ProjectConfigItem[] = [
4
12
  { id: 'proj-workspace', name: 'Workspace', path: '/Users/rajebdev/JatisMobile/Workspace', model: 'Not selected', accentColor: '#a3e635', icon: 'default' },
5
13
  { id: 'proj-drrealhandler', name: 'drrealhandler', path: '/Users/rajebdev/JatisMobile/drrealhandler', model: 'Not selected', accentColor: '#94a3b8', icon: 'default' },
@@ -29,30 +37,3 @@ export const DEFAULT_PROJECTS_LIST: ProjectConfigItem[] = [
29
37
  { id: 'proj-ompweb', name: 'ompweb', path: '/Users/rajebdev/JatisMobile/ompweb', model: 'Not selected', accentColor: '#f43f5e', icon: 'default' },
30
38
  { id: 'proj-kabmo', name: 'kabmo', path: '/Users/rajebdev/JatisMobile/kabmo', model: 'Not selected', accentColor: '#38bdf8', icon: 'default' },
31
39
  ];
32
-
33
- export const ACCENT_COLOR_OPTIONS: AccentColorOption[] = [
34
- { label: 'None', value: '', bgHex: 'transparent' },
35
- { label: 'Sky Blue', value: '#38bdf8', bgHex: '#38bdf8' },
36
- { label: 'Light Green', value: '#a3e635', bgHex: '#a3e635' },
37
- { label: 'Coral', value: '#f87171', bgHex: '#f87171' },
38
- { label: 'Amber', value: '#fbbf24', bgHex: '#fbbf24' },
39
- { label: 'Teal', value: '#2dd4bf', bgHex: '#2dd4bf' },
40
- { label: 'Slate', value: '#94a3b8', bgHex: '#94a3b8' },
41
- { label: 'Rose', value: '#f43f5e', bgHex: '#f43f5e' },
42
- { label: 'Vivid Blue', value: '#3b82f6', bgHex: '#3b82f6' },
43
- { label: 'Lime Green', value: '#84cc16', bgHex: '#84cc16' },
44
- ];
45
-
46
- export const AVAILABLE_PROJECT_MODELS: string[] = [
47
- 'Not selected',
48
- 'DeepSeek-V3',
49
- 'DeepSeek-R1',
50
- 'Claude 3.5 Sonnet',
51
- 'Claude 3.7 Sonnet',
52
- 'GPT-4o',
53
- 'GPT-4o-mini',
54
- 'Gemini 2.5 Flash',
55
- 'Gemini 2.5 Pro',
56
- 'Qwen 2.5 Coder 32B',
57
- 'Llama 3.3 70B',
58
- ];
@@ -153,38 +153,12 @@ description: "Automated pre-flight security review, secret leak inspection, and
153
153
  ];
154
154
 
155
155
  export const DEFAULT_CATALOG_SOURCES: SkillCatalogSource[] = [
156
- {
157
- id: 'anthropic',
158
- name: 'Anthropic',
159
- repo: 'anthropics/skills',
160
- stars: '175K',
161
- updatedAt: 'Updated 3d ago',
162
- skillCount: 20,
163
- },
164
- {
165
- id: 'openai',
166
- name: 'OpenAI',
167
- repo: 'openai/skills',
168
- stars: '26K',
169
- updatedAt: 'Updated 7w ago',
170
- skillCount: 14,
171
- },
172
- {
173
- id: 'cursor',
174
- name: 'Cursor',
175
- repo: 'cursor/plugins',
176
- stars: '7K',
177
- updatedAt: 'Updated 2d ago',
178
- skillCount: 18,
179
- },
180
- {
181
- id: 'matt-pocock',
182
- name: 'Matt Pocock',
183
- repo: 'mattpocock/skills',
184
- stars: '255K',
185
- updatedAt: 'Updated 2d ago',
186
- skillCount: 12,
187
- },
156
+ // `skillCount: null` — these counts are NOT known until a scan runs, and the
157
+ // card says "Not scanned" rather than printing an invented number.
158
+ { id: 'anthropic', name: 'Anthropic', repo: 'anthropics/skills', skillCount: null },
159
+ { id: 'openai', name: 'OpenAI', repo: 'openai/skills', skillCount: null },
160
+ { id: 'cursor', name: 'Cursor', repo: 'cursor/plugins', skillCount: null },
161
+ { id: 'matt-pocock', name: 'Matt Pocock', repo: 'mattpocock/skills', skillCount: null },
188
162
  ];
189
163
 
190
164
  export const DEFAULT_CATALOG_SKILLS: CatalogSkillItem[] = [
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The model a PENDING chat will start on.
8
+ *
9
+ * The composer on a `new-…` chat has no session to read a model from, so its
10
+ * pill showed Kabmo's registry default while `POST /api/agent/new` applies the
11
+ * workspace's own default first. The two disagreed for exactly the project the
12
+ * user had configured a default for. This resolves the same value the spawn
13
+ * does, from the folder row the composer is bound to.
14
+ */
15
+
16
+ import { useMemo } from 'preact/hooks';
17
+ import type { SelectedModel, WorkspaceFolderData } from '@/shared/types';
18
+ import { parseProjectModel } from '@/shared/lib/workspace/project-model';
19
+
20
+ export function usePendingProjectModel(
21
+ folders: WorkspaceFolderData[],
22
+ selectedFolderId: number | null,
23
+ ): SelectedModel | null {
24
+ return useMemo(() => {
25
+ const folder = folders.find((row) => String(row.id) === String(selectedFolderId));
26
+ return parseProjectModel(folder?.model);
27
+ }, [folders, selectedFolderId]);
28
+ }