ompchamber 2.0.2 → 3.1.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.
- package/README.md +31 -11
- package/bunfig.toml +11 -0
- package/dist/client/index.html +16 -5
- package/dist/client/index.js +1393 -0
- package/dist/client/static/js/index-8t70jhyj.js +5149 -0
- package/dist/client/static/js/index-n4wkqj7t.css +1 -0
- package/index.html +54 -0
- package/package.json +9 -10
- package/public/apple-touch-icon.png +0 -0
- package/public/icon-192x192.png +0 -0
- package/public/icon.svg +60 -0
- package/public/manifest.webmanifest +38 -0
- package/src/cli/lib/commands/serve.js +9 -5
- package/src/cli/lib/runtime.js +18 -7
- package/src/client/components/common/code-editor/handler.test.ts +274 -0
- package/src/client/components/common/code-editor/handler.ts +175 -0
- package/src/client/components/common/code-editor/index.tsx +185 -220
- package/src/client/components/common/code-surface/index.tsx +109 -12
- package/src/client/components/common/lazy-panels.tsx +5 -1
- package/src/client/components/common/provider-icon/glyphs.ts +118 -0
- package/src/client/components/common/provider-icon/index.tsx +85 -0
- package/src/client/components/common/viewport.ts +5 -3
- package/src/client/components/layout/RightActivityBar.tsx +2 -1
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +21 -4
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -0
- package/src/client/components/layout/desktop-layout/index.tsx +26 -4
- package/src/client/components/mobile/LayoutWrapper.tsx +16 -0
- package/src/client/components/mobile/RightSidebar.tsx +11 -4
- package/src/client/components/mobile/SessionSidebar.tsx +10 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +0 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +16 -1
- package/src/client/components/mobile/mobile-session-sidebar/List.tsx +3 -0
- package/src/client/components/settings/categories/ProviderSettings.tsx +45 -4
- package/src/client/components/settings/categories/UsageSettings.tsx +22 -7
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +322 -0
- package/src/client/components/settings/categories/provider-settings/AddProviderModal.tsx +152 -56
- package/src/client/components/settings/categories/provider-settings/AuthSection.tsx +52 -1
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +133 -0
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +136 -0
- package/src/client/components/settings/categories/provider-settings/EffortLadder.tsx +89 -0
- package/src/client/components/settings/categories/provider-settings/Header.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/LoginModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/ModelsList.tsx +22 -2
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +82 -0
- package/src/client/components/settings/categories/provider-settings/PriceFields.tsx +107 -0
- package/src/client/components/settings/categories/provider-settings/ReconnectModal.tsx +43 -22
- package/src/client/components/settings/categories/provider-settings/SidebarList.tsx +2 -2
- package/src/client/components/settings/categories/usage-settings/LimitsSection.tsx +115 -0
- package/src/client/components/settings/categories/usage-settings/ProviderCard.tsx +19 -26
- package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +29 -22
- package/src/client/components/settings/categories/usage-settings/SidebarList.tsx +60 -48
- package/src/client/components/settings/categories/usage-settings/format.ts +36 -0
- package/src/client/components/settings/categories/usage-settings/providers.ts +52 -28
- package/src/client/components/workspace/browser-panel/AddressBar.tsx +1 -10
- package/src/client/components/workspace/browser-panel/Screencast.tsx +4 -5
- package/src/client/components/workspace/browser-panel/index.tsx +6 -6
- package/src/client/components/workspace/browser-toolbar/index.tsx +22 -12
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/ToolCallCard.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +1 -1
- package/src/client/components/workspace/diff-panel/Toolbar.tsx +71 -38
- package/src/client/components/workspace/diff-panel/index.tsx +139 -53
- package/src/client/components/workspace/editor/CommandPalette.test.ts +242 -0
- package/src/client/components/workspace/editor/CommandPalette.tsx +138 -0
- package/src/client/components/workspace/editor/FindWidget.test.ts +261 -0
- package/src/client/components/workspace/editor/FindWidget.tsx +219 -0
- package/src/client/components/workspace/editor/Tabs.tsx +2 -2
- package/src/client/components/workspace/editor/Toolbar.tsx +129 -26
- package/src/client/components/workspace/editor/index.tsx +180 -62
- package/src/client/components/workspace/file-explorer/Modals.tsx +79 -2
- package/src/client/components/workspace/file-explorer/TreeItem.tsx +43 -113
- package/src/client/components/workspace/model-dropdown/Item.tsx +13 -23
- package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/Section.tsx +13 -4
- package/src/client/components/workspace/model-dropdown/index.tsx +7 -3
- package/src/client/components/workspace/todo-panel/PhaseGroup.tsx +76 -0
- package/src/client/components/workspace/todo-panel/Row.tsx +69 -0
- package/src/client/components/workspace/todo-panel/index.tsx +161 -0
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +10 -5
- package/src/client/components/workspace/usage-panel/index.tsx +36 -18
- package/src/client/data/samples/dialogue-session.ts +1 -1
- package/src/client/data/samples/sample-tools/other.ts +1 -1
- package/src/client/data/settings/provider.ts +141 -9
- package/src/client/hooks/editor/find-harness.test-util.ts +170 -0
- package/src/client/hooks/editor/scroll-container.test.ts +102 -0
- package/src/client/hooks/editor/scroll-container.ts +26 -0
- package/src/client/hooks/editor/use-code-window.ts +2 -20
- package/src/client/hooks/editor/use-editor-find-write.test.ts +170 -0
- package/src/client/hooks/editor/use-editor-find.test.ts +118 -0
- package/src/client/hooks/editor/use-editor-find.ts +321 -0
- package/src/client/hooks/editor/use-editor-history.test.ts +216 -0
- package/src/client/hooks/editor/use-editor-history.ts +134 -0
- package/src/client/hooks/editor/use-file-editor.ts +24 -27
- package/src/client/hooks/editor/use-occurrences.test.ts +236 -0
- package/src/client/hooks/editor/use-occurrences.ts +98 -0
- package/src/client/hooks/models/use-provider-names.ts +1 -1
- package/src/client/hooks/settings/providers/actions.ts +337 -0
- package/src/client/hooks/settings/providers/api.ts +69 -0
- package/src/client/hooks/settings/providers/index.ts +138 -0
- package/src/client/hooks/settings/providers/messages.ts +77 -0
- package/src/client/hooks/settings/useUsageReport.ts +8 -3
- package/src/client/hooks/ui/theme.ts +3 -3
- package/src/client/hooks/workspace/file-tabs.ts +62 -11
- package/src/client/hooks/workspace/file-tree-actions.test.ts +348 -0
- package/src/client/hooks/workspace/file-tree-actions.ts +250 -0
- package/src/client/hooks/workspace/session-todos.ts +102 -0
- package/src/client/stubs/elkjs.ts +6 -1
- package/src/client/tailwind.css +30 -0
- package/src/server/index.ts +20 -2
- package/src/server/lib/assets/font-css.server.ts +86 -0
- package/src/server/lib/assets/fonts.server.ts +117 -0
- package/src/server/lib/bundler/css.ts +116 -0
- package/src/server/lib/lifecycle/shell-route.ts +17 -0
- package/src/server/lib/models/provider-listing.server.ts +257 -0
- package/src/server/lib/models/provider-registry.server.test.ts +122 -0
- package/src/server/lib/models/provider-registry.server.ts +76 -25
- package/src/server/lib/omp/config/models-config.ts +11 -0
- package/src/server/lib/omp/config/models-validation.test.ts +137 -0
- package/src/server/lib/omp/config/models-validation.ts +111 -2
- package/src/server/lib/omp/config/provider-seeds.test.ts +167 -0
- package/src/server/lib/omp/config/provider-seeds.ts +176 -0
- package/src/server/lib/omp/config/providers.ts +94 -100
- package/src/server/lib/omp/core/auth-credentials.ts +45 -0
- package/src/server/lib/omp/session/todos.ts +100 -0
- package/src/server/lib/omp/session/{usage.ts → usage/aggregate.ts} +1 -118
- package/src/server/lib/omp/session/usage/shaping.ts +130 -0
- package/src/server/lib/usage/deepseek.ts +4 -5
- package/src/server/lib/usage/kenari.ts +7 -6
- package/src/server/lib/usage/omp-usage.server.test.ts +126 -0
- package/src/server/lib/usage/omp-usage.server.ts +194 -0
- package/src/server/lib/usage/provider-key.ts +81 -3
- package/src/server/lib/usage/providers.server.test.ts +47 -0
- package/src/server/lib/usage/providers.server.ts +208 -0
- package/src/server/lib/usage/vendor-balance.server.test.ts +104 -0
- package/src/server/lib/usage/vendor-balance.server.ts +284 -0
- package/src/server/plugins/shell.server.ts +56 -0
- package/src/server/plugins/ssr.ts +24 -36
- package/src/server/plugins/static.test.ts +26 -29
- package/src/server/plugins/static.ts +40 -19
- package/src/server/routes/fs/action-create.test.ts +90 -0
- package/src/server/routes/fs/action.ts +23 -0
- package/src/server/routes/omp/index.ts +2 -0
- package/src/server/routes/omp/session-todos.ts +80 -0
- package/src/server/routes/settings/index.ts +2 -0
- package/src/server/routes/settings/provider-model.ts +107 -0
- package/src/server/routes/settings/provider-models.ts +65 -202
- package/src/server/routes/settings/providers.ts +22 -7
- package/src/server/routes/settings/usage.ts +125 -45
- package/src/server/routes/telemetry/tokens.ts +2 -1
- package/src/shared/lib/chat/{todo-parser.ts → todo/parser.ts} +17 -0
- package/src/shared/lib/chat/todo/progress.ts +97 -0
- package/src/shared/lib/chat/todo/snapshot.test.ts +156 -0
- package/src/shared/lib/chat/todo/snapshot.ts +215 -0
- package/src/shared/lib/code/editor/commands.test.ts +155 -0
- package/src/shared/lib/code/editor/commands.ts +260 -0
- package/src/shared/lib/code/editor/edits.test.ts +100 -0
- package/src/shared/lib/code/editor/edits.ts +122 -0
- package/src/shared/lib/code/editor/find-status.test.ts +50 -0
- package/src/shared/lib/code/editor/find-status.ts +36 -0
- package/src/shared/lib/code/editor/find.test.ts +203 -0
- package/src/shared/lib/code/editor/find.ts +224 -0
- package/src/{client/components/common/code-editor → shared/lib/code/editor}/history.test.ts +1 -1
- package/src/shared/lib/code/editor/keymap.test.ts +109 -0
- package/src/shared/lib/code/editor/keymap.ts +151 -0
- package/src/shared/lib/code/editor/layers.test.ts +77 -0
- package/src/shared/lib/code/editor/layers.ts +67 -0
- package/src/shared/lib/code/editor/line-edits.test.ts +131 -0
- package/src/shared/lib/code/editor/line-edits.ts +159 -0
- package/src/shared/lib/code/editor/lines.test.ts +81 -0
- package/src/shared/lib/code/editor/lines.ts +83 -0
- package/src/shared/lib/code/editor/marks.test.ts +86 -0
- package/src/shared/lib/code/editor/marks.ts +106 -0
- package/src/shared/lib/code/editor/occurrences.test.ts +117 -0
- package/src/shared/lib/code/editor/occurrences.ts +111 -0
- package/src/shared/lib/code/editor/palette.test.ts +91 -0
- package/src/shared/lib/code/editor/palette.ts +92 -0
- package/src/shared/lib/code/editor/reset-css.test.ts +35 -0
- package/src/shared/lib/code/editor/reset-css.ts +32 -0
- package/src/shared/lib/code/editor/text-commands.test.ts +178 -0
- package/src/shared/lib/code/editor/text-commands.ts +154 -0
- package/src/shared/lib/code/syntax-highlight.test.ts +75 -0
- package/src/shared/lib/code/syntax-highlight.ts +29 -17
- package/src/shared/lib/code/windowed-highlight.ts +52 -1
- package/src/shared/lib/fs/diff-parser.test.ts +116 -0
- package/src/shared/lib/fs/diff-parser.ts +86 -33
- package/src/shared/lib/models/{provider-connection.ts → provider/connection.ts} +37 -0
- package/src/shared/lib/models/provider/dialect.ts +179 -0
- package/src/shared/lib/models/provider/glyph.test.ts +116 -0
- package/src/shared/lib/models/provider/glyph.ts +200 -0
- package/src/shared/lib/models/{provider-models.ts → provider/models.ts} +91 -6
- package/src/shared/lib/models/provider/presets.test.ts +172 -0
- package/src/shared/lib/models/provider/presets.ts +83 -0
- package/src/shared/lib/ui/key-binding.test.ts +115 -0
- package/src/shared/lib/ui/key-binding.ts +143 -0
- package/src/shared/lib/util/platform.test.ts +87 -0
- package/src/shared/lib/util/platform.ts +30 -0
- package/src/shared/lib/workspace/file-tab-id.ts +29 -0
- package/src/shared/lib/workspace/keymap.test.ts +82 -0
- package/src/shared/lib/workspace/keymap.ts +30 -0
- package/src/shared/lib/workspace/refresh-cadence.ts +9 -0
- package/src/shared/lib/workspace/right-panels.ts +8 -0
- package/src/shared/lib/workspace/session-state/store.ts +0 -1
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/provider.ts +81 -0
- package/src/shared/types/settings/usage.ts +88 -14
- package/src/shared/types/todo.ts +108 -0
- package/tsconfig.json +3 -1
- package/dist/client/static/css/index.5f630421b7.css +0 -2
- package/dist/client/static/font/KaTeX_AMS-Regular.a79f1c3119.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Bold.ec17d13264.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Caligraphic-Regular.55fac25845.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Bold.d42a5579b0.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Fraktur-Regular.d3c882a649.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Bold.c3fb5ac22f.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-BoldItalic.6f2bb1dff2.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Italic.8916142bec.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Main-Regular.0462f03bdf.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Math-BoldItalic.572d331f69.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Math-Italic.f28c23acad.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Bold.8c5b5494b6.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Italic.3b1e59b3ba.woff2 +0 -0
- package/dist/client/static/font/KaTeX_SansSerif-Regular.ba21ed5f84.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Script-Regular.03e9641d6f.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size1-Regular.eae34984b3.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size2-Regular.5916a24fa3.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Size4-Regular.10d95fd3a2.woff2 +0 -0
- package/dist/client/static/font/KaTeX_Typewriter-Regular.a8709e3622.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-400-normal.2655b10c55.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-500-normal.92a991f204.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-600-normal.43788eb7f1.woff2 +0 -0
- package/dist/client/static/font/fira-code-latin-700-normal.2667215d33.woff2 +0 -0
- package/dist/client/static/js/77.0d81c74cf0.js +0 -139
- package/dist/client/static/js/77.0d81c74cf0.js.LICENSE.txt +0 -8
- package/dist/client/static/js/async/0.8e59f2eb5b.js +0 -1
- package/dist/client/static/js/async/0k.5852e6b4fa.js +0 -1
- package/dist/client/static/js/async/0w.9ed36d5860.js +0 -1
- package/dist/client/static/js/async/1.f387c12b63.js +0 -1
- package/dist/client/static/js/async/12.d091f91c99.js +0 -1
- package/dist/client/static/js/async/13.8f810a8a6c.js +0 -1
- package/dist/client/static/js/async/19.6fe909d55a.js +0 -160
- package/dist/client/static/js/async/1b.23f1141a38.js +0 -1
- package/dist/client/static/js/async/1k.973e8e21fc.js +0 -2
- package/dist/client/static/js/async/1k.973e8e21fc.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/1p.0d5cddda96.js +0 -1
- package/dist/client/static/js/async/2.b589f1733b.js +0 -1
- package/dist/client/static/js/async/2v.96165101de.js +0 -1
- package/dist/client/static/js/async/3.0cacc08423.js +0 -1
- package/dist/client/static/js/async/37.b28b2f61cd.js +0 -1
- package/dist/client/static/js/async/3d.5085fb913f.js +0 -1
- package/dist/client/static/js/async/3j.357c80ff38.js +0 -2
- package/dist/client/static/js/async/3j.357c80ff38.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/3p.bcf32a0983.js +0 -1
- package/dist/client/static/js/async/3r.3a69e98ee0.js +0 -64
- package/dist/client/static/js/async/3u.1228460e2a.js +0 -1
- package/dist/client/static/js/async/3y.3530b824ad.js +0 -198
- package/dist/client/static/js/async/3y.3530b824ad.js.LICENSE.txt +0 -5
- package/dist/client/static/js/async/4.9442eeb472.js +0 -1
- package/dist/client/static/js/async/4e.678285ca55.js +0 -1
- package/dist/client/static/js/async/4k.33a0c7eeb4.js +0 -1
- package/dist/client/static/js/async/4m.928a1dde85.js +0 -31
- package/dist/client/static/js/async/4m.928a1dde85.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/4q.aad20dab25.js +0 -1
- package/dist/client/static/js/async/5.ebaf8b89cc.js +0 -36
- package/dist/client/static/js/async/51.95bcae98af.js +0 -2
- package/dist/client/static/js/async/51.95bcae98af.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/5b.d88304bc13.js +0 -1
- package/dist/client/static/js/async/5j.d6407c4248.js +0 -287
- package/dist/client/static/js/async/5o.88316d4460.js +0 -62
- package/dist/client/static/js/async/6.f034c9b528.js +0 -1
- package/dist/client/static/js/async/66.5dfa29f957.js +0 -93
- package/dist/client/static/js/async/6o.5b1a06a382.js +0 -1
- package/dist/client/static/js/async/7.e4a9288dd0.js +0 -1
- package/dist/client/static/js/async/73.308dff4da8.js +0 -1
- package/dist/client/static/js/async/7e.a1cc9bfd88.js +0 -1
- package/dist/client/static/js/async/7g.a7814350c3.js +0 -1
- package/dist/client/static/js/async/7l.fadbbc0583.js +0 -1
- package/dist/client/static/js/async/8.5067439d8c.js +0 -1
- package/dist/client/static/js/async/8j.ea110663fb.js +0 -1
- package/dist/client/static/js/async/a.bce4542392.js +0 -1
- package/dist/client/static/js/async/aa.65d3852576.js +0 -1
- package/dist/client/static/js/async/ar.9303e5f2e8.js +0 -2
- package/dist/client/static/js/async/ar.9303e5f2e8.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/az.d656062b0f.js +0 -1
- package/dist/client/static/js/async/b.b4f6f06515.js +0 -1
- package/dist/client/static/js/async/bi.09688ba75c.js +0 -1
- package/dist/client/static/js/async/bq.586bc738d1.js +0 -1
- package/dist/client/static/js/async/c.797d933882.js +0 -1
- package/dist/client/static/js/async/c0.0af1e640d3.js +0 -24
- package/dist/client/static/js/async/ca.8a52cfd447.js +0 -1
- package/dist/client/static/js/async/cf.d34fff5d67.js +0 -1
- package/dist/client/static/js/async/ct.b74928f7a3.js +0 -1
- package/dist/client/static/js/async/cx.3cb0242a3a.js +0 -226
- package/dist/client/static/js/async/d.a5fc8fe1b3.js +0 -1
- package/dist/client/static/js/async/da.f62c70f6c8.js +0 -1
- package/dist/client/static/js/async/dp.1725d6432c.js +0 -1
- package/dist/client/static/js/async/e.93214d622b.js +0 -79
- package/dist/client/static/js/async/f.ab50467719.js +0 -19
- package/dist/client/static/js/async/f.ab50467719.js.LICENSE.txt +0 -12
- package/dist/client/static/js/async/f7.46971e9d6d.js +0 -2
- package/dist/client/static/js/async/f7.46971e9d6d.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/f8.bbf0dbae70.js +0 -1
- package/dist/client/static/js/async/g.cb81980498.js +0 -2
- package/dist/client/static/js/async/g.cb81980498.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/h.4e790471e4.js +0 -27
- package/dist/client/static/js/async/h1.393f066d09.js +0 -1
- package/dist/client/static/js/async/h3.216e9798ab.js +0 -148
- package/dist/client/static/js/async/hd.0da931b622.js +0 -1
- package/dist/client/static/js/async/hk.ba7fb04d41.js +0 -1
- package/dist/client/static/js/async/hn.b645041e00.js +0 -1
- package/dist/client/static/js/async/ho.475a5e1ae4.js +0 -1
- package/dist/client/static/js/async/hp.e9fe2e395a.js +0 -2
- package/dist/client/static/js/async/hp.e9fe2e395a.js.LICENSE.txt +0 -17
- package/dist/client/static/js/async/hs.e7c59d8090.js +0 -41
- package/dist/client/static/js/async/i.7c148e8440.js +0 -1
- package/dist/client/static/js/async/id.573df20f29.js +0 -1
- package/dist/client/static/js/async/j.ab925882d8.js +0 -1
- package/dist/client/static/js/async/jd.63886a1f09.js +0 -1
- package/dist/client/static/js/async/jg.d86ebd4013.js +0 -86
- package/dist/client/static/js/async/jl.874d352278.js +0 -1
- package/dist/client/static/js/async/jll.11313b455a.js +0 -1
- package/dist/client/static/js/async/js.67182759ef.js +0 -1
- package/dist/client/static/js/async/jsc.23b70d6f40.js +0 -1
- package/dist/client/static/js/async/jse.334588ff5d.js +0 -1
- package/dist/client/static/js/async/jz.72eb929106.js +0 -77
- package/dist/client/static/js/async/k.3210286401.js +0 -217
- package/dist/client/static/js/async/ka.c1990ecaa3.js +0 -115
- package/dist/client/static/js/async/katex-vendor.de6a87c308.js +0 -1
- package/dist/client/static/js/async/ku.29c8a59d0c.js +0 -1
- package/dist/client/static/js/async/ky.8dab1dade0.js +0 -1
- package/dist/client/static/js/async/l.12dd34e1be.js +0 -1
- package/dist/client/static/js/async/l9.949710adaf.js +0 -83
- package/dist/client/static/js/async/l9.949710adaf.js.LICENSE.txt +0 -13
- package/dist/client/static/js/async/ls.9d9a01026c.js +0 -104
- package/dist/client/static/js/async/m.eb2e6752e2.js +0 -28
- package/dist/client/static/js/async/m.eb2e6752e2.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/m3.d2b05f9604.js +0 -2
- package/dist/client/static/js/async/m3.d2b05f9604.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/ma.2c261b04dd.js +0 -2
- package/dist/client/static/js/async/ma.2c261b04dd.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/me.8ace414f80.js +0 -23
- package/dist/client/static/js/async/ms.98960af4eb.js +0 -67
- package/dist/client/static/js/async/ms.98960af4eb.js.LICENSE.txt +0 -12
- package/dist/client/static/js/async/mt.0352e976d8.js +0 -1
- package/dist/client/static/js/async/n.a9f1c51701.js +0 -1
- package/dist/client/static/js/async/na.a36cd532d6.js +0 -1
- package/dist/client/static/js/async/nk.fc7e58325e.js +0 -1
- package/dist/client/static/js/async/o.36353dfb88.js +0 -1
- package/dist/client/static/js/async/oc.b73042e8bd.js +0 -8
- package/dist/client/static/js/async/og.8eb577893a.js +0 -193
- package/dist/client/static/js/async/p.48ecfcd14e.js +0 -1
- package/dist/client/static/js/async/px.fc6877924b.js +0 -1
- package/dist/client/static/js/async/q.22588845a9.js +0 -21
- package/dist/client/static/js/async/q.22588845a9.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/q5.97dc1481b6.js +0 -286
- package/dist/client/static/js/async/qs.2a9ddb3c72.js +0 -1
- package/dist/client/static/js/async/r.51010ad87c.js +0 -1
- package/dist/client/static/js/async/rd.cb6bf495bb.js +0 -2
- package/dist/client/static/js/async/rd.cb6bf495bb.js.LICENSE.txt +0 -4
- package/dist/client/static/js/async/s.0f395cdda5.js +0 -94
- package/dist/client/static/js/async/t.4dca0e2ba8.js +0 -1
- package/dist/client/static/js/async/t9.d44f57d518.js +0 -1
- package/dist/client/static/js/async/ta.973534bbec.js +0 -1
- package/dist/client/static/js/async/tr.e878658140.js +0 -309
- package/dist/client/static/js/async/u.0871ac5b22.js +0 -1
- package/dist/client/static/js/async/ud.3065bfee31.js +0 -2
- package/dist/client/static/js/async/ud.3065bfee31.js.LICENSE.txt +0 -4
- package/dist/client/static/js/async/up.ea990da0ff.js +0 -32
- package/dist/client/static/js/async/uw.8890abbabc.js +0 -1
- package/dist/client/static/js/async/v.7d28d3c241.js +0 -34
- package/dist/client/static/js/async/vp.9b13bf8610.js +0 -1
- package/dist/client/static/js/async/vt.42416b707d.js +0 -1
- package/dist/client/static/js/async/w.08ac210f60.js +0 -1
- package/dist/client/static/js/async/wt.ad92393a90.js +0 -1
- package/dist/client/static/js/async/x.563f72ca6b.js +0 -1
- package/dist/client/static/js/async/x0.475516418f.js +0 -1
- package/dist/client/static/js/async/x1.da8687159b.js +0 -90
- package/dist/client/static/js/async/xe.da8dcc2015.js +0 -2
- package/dist/client/static/js/async/xe.da8dcc2015.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/xl.a3c562a58c.js +0 -1
- package/dist/client/static/js/async/xn.6510c0abe2.js +0 -2
- package/dist/client/static/js/async/xn.6510c0abe2.js.LICENSE.txt +0 -6
- package/dist/client/static/js/async/xn1.83a7784fe1.js +0 -10
- package/dist/client/static/js/async/xn1.83a7784fe1.js.LICENSE.txt +0 -11
- package/dist/client/static/js/async/xnl.feb0021e50.js +0 -2
- package/dist/client/static/js/async/xnl.feb0021e50.js.LICENSE.txt +0 -12
- package/dist/client/static/js/async/y.1a9ed7a5d8.js +0 -1
- package/dist/client/static/js/async/y6.43c57defe4.js +0 -1
- package/dist/client/static/js/async/yb.8c1342401d.js +0 -1
- package/dist/client/static/js/async/ybq.4491f2f2dc.js +0 -1
- package/dist/client/static/js/async/yg.35bebd6d0c.js +0 -149
- package/dist/client/static/js/async/yq.917ddd7ba2.js +0 -1
- package/dist/client/static/js/async/ys.00687cf82d.js +0 -38
- package/dist/client/static/js/async/yv.d99d829136.js +0 -1
- package/dist/client/static/js/async/z.56f61a4374.js +0 -1
- package/dist/client/static/js/async/zi.5fdb07b86a.js +0 -24
- package/dist/client/static/js/async/zj.654f37e8ff.js +0 -1
- package/dist/client/static/js/async/zn.966d6f1cc6.js +0 -1
- package/dist/client/static/js/async/zo.26213b40c0.js +0 -1
- package/dist/client/static/js/async/zx.e9f4105e00.js +0 -1
- package/dist/client/static/js/index.e6a257402a.js +0 -38
- package/dist/client/static/js/index.e6a257402a.js.LICENSE.txt +0 -4
- package/dist/client/static/js/markdown-vendor.71e43278b3.js +0 -144
- package/dist/client/static/js/shiki-vendor.cb8452ddcd.js +0 -1
- package/src/client/components/settings/categories/provider-settings/Icons.tsx +0 -35
- package/src/client/hooks/settings/providers.ts +0 -326
- package/src/server/plugins/dev-assets.ts +0 -49
- package/src/shared/lib/code/editor-utils.ts +0 -16
- package/src/shared/lib/models/provider-presets.ts +0 -29
- /package/dist/client/{apple-touch-icon.png → static/apple-touch-icon-dskx5sr3.png} +0 -0
- /package/dist/client/{icon-192x192.png → static/icon-192x192-6gn5cr2f.png} +0 -0
- /package/dist/client/{icon.svg → static/icon-d07z9dtz.svg} +0 -0
- /package/dist/client/{manifest.webmanifest → static/manifest-bnyy75kt.webmanifest} +0 -0
- /package/{dist/client → public}/icon-512x512.png +0 -0
- /package/{dist/client → public}/icon-maskable-512x512.png +0 -0
- /package/{dist/client → public}/sw.js +0 -0
- /package/src/{client/components/common/code-editor → shared/lib/code/editor}/history.ts +0 -0
- /package/src/shared/lib/models/{provider-cleanup.ts → provider/cleanup.ts} +0 -0
- /package/src/shared/lib/models/{provider-label.ts → provider/label.ts} +0 -0
|
@@ -22,6 +22,47 @@ export interface ProviderModel {
|
|
|
22
22
|
reasoningEffort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* `api` values omp's `ApiSchema` accepts — the wire dialect a provider speaks.
|
|
27
|
+
* Mirrors `models-config-schema-bundle.ts` in omp; a value here that omp does
|
|
28
|
+
* not know makes it disable EVERY custom provider in the file at once.
|
|
29
|
+
*/
|
|
30
|
+
export type OmpProviderApi =
|
|
31
|
+
| 'openai-completions'
|
|
32
|
+
| 'openai-responses'
|
|
33
|
+
| 'openai-codex-responses'
|
|
34
|
+
| 'azure-openai-responses'
|
|
35
|
+
| 'anthropic-messages'
|
|
36
|
+
| 'bedrock-converse-stream'
|
|
37
|
+
| 'google-generative-ai'
|
|
38
|
+
| 'google-gemini-cli'
|
|
39
|
+
| 'google-vertex'
|
|
40
|
+
| 'openrouter-decisions'
|
|
41
|
+
| 'typesafe';
|
|
42
|
+
|
|
43
|
+
/** omp's `ProviderAuthSchema`. `none` is what makes a local server keyless. */
|
|
44
|
+
export type ProviderAuthMode = 'apiKey' | 'none' | 'oauth';
|
|
45
|
+
|
|
46
|
+
/** omp's `ProviderDiscoverySchema.type` — how omp lists a provider's models itself. */
|
|
47
|
+
export type ProviderDiscoveryType =
|
|
48
|
+
| 'ollama'
|
|
49
|
+
| 'llama.cpp'
|
|
50
|
+
| 'lm-studio'
|
|
51
|
+
| 'openai-models-list'
|
|
52
|
+
| 'proxy'
|
|
53
|
+
| 'litellm'
|
|
54
|
+
| 'apple-foundation-models';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* How a provider's models reach `models.yml`.
|
|
58
|
+
*
|
|
59
|
+
* - `fetch` — the chamber lists the endpoint now and writes the ids in.
|
|
60
|
+
* - `discovery` — omp lists them live from `discovery.type`; nothing is written.
|
|
61
|
+
* - `override` — keep omp's bundled model list and only override the endpoint
|
|
62
|
+
* (the documented "override-only provider" shape).
|
|
63
|
+
*/
|
|
64
|
+
export type ProviderModelSource = 'fetch' | 'discovery' | 'override';
|
|
65
|
+
|
|
25
66
|
export interface ProviderItem {
|
|
26
67
|
id: string;
|
|
27
68
|
name: string;
|
|
@@ -35,8 +76,38 @@ export interface ProviderItem {
|
|
|
35
76
|
*/
|
|
36
77
|
disabled?: boolean;
|
|
37
78
|
configuredIn: string; // e.g. "auth credentials", "api key", "environment"
|
|
79
|
+
/**
|
|
80
|
+
* Where omp resolves this provider's credential from. The two are not
|
|
81
|
+
* interchangeable in the UI: an `omp-auth` provider is signed in through
|
|
82
|
+
* `/login` (the OAuth flow), while a `models.yml` provider carries its own
|
|
83
|
+
* endpoint and key and is edited in place. Testing the provider ID instead
|
|
84
|
+
* sent a keyless local server into a login flow it can never complete.
|
|
85
|
+
*/
|
|
86
|
+
credentialSource?: 'omp-auth' | 'models.yml' | 'chamber';
|
|
87
|
+
/**
|
|
88
|
+
* The provider HAS an entry in omp's own `models.yml`.
|
|
89
|
+
*
|
|
90
|
+
* Read from the file by the server rather than inferred on the client, because
|
|
91
|
+
* it gates a destructive action: deleting removes that entry, and only the
|
|
92
|
+
* server knows which slugs the file actually holds. A provider that exists
|
|
93
|
+
* only in the chamber overlay must not offer the button — there is nothing in
|
|
94
|
+
* models.yml to delete.
|
|
95
|
+
*/
|
|
96
|
+
inModelsYml?: boolean;
|
|
38
97
|
apiKey?: string;
|
|
39
98
|
baseUrl?: string;
|
|
99
|
+
/** Wire dialect from models.yml. Absent for omp's bundled providers. */
|
|
100
|
+
api?: OmpProviderApi;
|
|
101
|
+
/** Auth mode from models.yml; `none` means the provider is keyless. */
|
|
102
|
+
auth?: ProviderAuthMode;
|
|
103
|
+
/** Live-discovery type from models.yml, when the provider declares one. */
|
|
104
|
+
discovery?: ProviderDiscoveryType;
|
|
105
|
+
/**
|
|
106
|
+
* Where this provider's models come from. Persisted so the settings UI can
|
|
107
|
+
* say WHY a provider legitimately has no model list — an endpoint override
|
|
108
|
+
* for a bundled provider and a failed fetch look identical without it.
|
|
109
|
+
*/
|
|
110
|
+
modelSource?: ProviderModelSource;
|
|
40
111
|
models: ProviderModel[];
|
|
41
112
|
}
|
|
42
113
|
|
|
@@ -46,4 +117,14 @@ export interface PresetProviderOption {
|
|
|
46
117
|
slug: string;
|
|
47
118
|
icon: string;
|
|
48
119
|
defaultUrl: string;
|
|
120
|
+
/** Wire dialect the preset declares; omitted means "infer from the URL". */
|
|
121
|
+
api?: OmpProviderApi;
|
|
122
|
+
/** Auth mode the preset declares. `none` marks a keyless local server. */
|
|
123
|
+
auth?: ProviderAuthMode;
|
|
124
|
+
/** Preset pins a discovery type instead of fetching a model list. */
|
|
125
|
+
discovery?: ProviderDiscoveryType;
|
|
126
|
+
/** Preset configures a provider omp already bundles (override-only entry). */
|
|
127
|
+
bundled?: boolean;
|
|
128
|
+
/** Grouping label in the Add Provider picker. */
|
|
129
|
+
group: string;
|
|
49
130
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Usage / balance contracts for the Settings → Usage panel.
|
|
3
3
|
*
|
|
4
|
-
* Served by `GET /api/settings/usage`.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Served by `GET /api/settings/usage`. `providers` lists every provider whose
|
|
5
|
+
* credential omp can resolve — a provider with no API key is omitted, never
|
|
6
|
+
* shown as an empty row. Each entry carries the provider's own quota windows
|
|
7
|
+
* (`omp usage --json`), the token/cost burn omp recorded locally for the
|
|
8
|
+
* trailing 30 days, and — for kenari and DeepSeek — the richer provider-specific
|
|
9
|
+
* report described below. `error` carries a human-readable failure when an
|
|
10
|
+
* upstream call could not be completed.
|
|
8
11
|
*/
|
|
9
12
|
|
|
10
|
-
/** Fields shared by every provider report. */
|
|
11
|
-
export interface UsageProviderStatus {
|
|
12
|
-
configured: boolean;
|
|
13
|
-
error?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
13
|
/** A single rolling quota window from kenari's plan (week / month / 5 hours). */
|
|
17
14
|
export interface KenariQuotaWindow {
|
|
18
15
|
key: 'five_hour' | 'week' | 'month';
|
|
@@ -66,10 +63,16 @@ export interface KenariBalance {
|
|
|
66
63
|
raw: string;
|
|
67
64
|
}
|
|
68
65
|
|
|
69
|
-
|
|
66
|
+
/**
|
|
67
|
+
* kenari wallet, plan quota, and 30-day usage. Present only when kenari has a
|
|
68
|
+
* credential; the builder returns `null` otherwise, so no `configured` flag is
|
|
69
|
+
* needed on the report itself.
|
|
70
|
+
*/
|
|
71
|
+
export interface KenariUsageReport {
|
|
70
72
|
balance?: KenariBalance;
|
|
71
73
|
usage?: KenariUsage;
|
|
72
74
|
quota?: KenariQuota;
|
|
75
|
+
error?: string;
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
/** One currency bucket from DeepSeek's balance response. */
|
|
@@ -86,14 +89,85 @@ export interface DeepSeekBalance {
|
|
|
86
89
|
entries: DeepSeekBalanceEntry[];
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
/** DeepSeek prepaid balance; present only when DeepSeek has a credential. */
|
|
93
|
+
export interface DeepSeekUsageReport {
|
|
90
94
|
balance?: DeepSeekBalance;
|
|
95
|
+
error?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Unit of a provider-reported quota amount (mirrors omp's `UsageUnit`). */
|
|
99
|
+
export type UsageUnit = 'percent' | 'tokens' | 'requests' | 'credits' | 'usd' | 'minutes' | 'bytes' | 'unknown';
|
|
100
|
+
|
|
101
|
+
/** Coarse state of one quota window. */
|
|
102
|
+
export type UsageWindowStatus = 'ok' | 'warning' | 'exhausted' | 'unknown';
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* One quota window reported by a provider's own usage endpoint, flattened from
|
|
106
|
+
* omp's `UsageLimit` (`omp usage --json`). Every amount is optional: providers
|
|
107
|
+
* populate different subsets (`used`/`limit`, `usedFraction`, or
|
|
108
|
+
* `remainingFraction`), and `usedFraction` is pre-resolved here with omp's own
|
|
109
|
+
* precedence so the UI never has to re-derive it.
|
|
110
|
+
*/
|
|
111
|
+
export interface UsageLimitWindow {
|
|
112
|
+
id: string;
|
|
113
|
+
label: string;
|
|
114
|
+
/** Compact window label from omp, e.g. "5h" or "7d". */
|
|
115
|
+
windowLabel?: string;
|
|
116
|
+
/** Model/account scope when the provider reports per-model windows. */
|
|
117
|
+
modelId?: string;
|
|
118
|
+
accountId?: string;
|
|
119
|
+
used?: number;
|
|
120
|
+
limit?: number;
|
|
121
|
+
remaining?: number;
|
|
122
|
+
/** Fraction used, 0..1; values above 1 mean overage. */
|
|
123
|
+
usedFraction?: number;
|
|
124
|
+
unit: UsageUnit;
|
|
125
|
+
status: UsageWindowStatus;
|
|
126
|
+
/** Epoch ms when the window rolls over. */
|
|
127
|
+
resetsAt?: number;
|
|
128
|
+
notes?: string[];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* One provider row in the Usage surfaces. Only providers whose credentials
|
|
133
|
+
* were actually detected are present — a provider with no key is absent from
|
|
134
|
+
* `UsageReport.providers` entirely rather than shown as "not configured".
|
|
135
|
+
*/
|
|
136
|
+
export interface UsageProviderSummary {
|
|
137
|
+
/** Stable id (provider slug, lowercased) used for selection + persistence. */
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
/** Where the credential was found ("models.yml", "agent.db", "app DB"). */
|
|
141
|
+
credentialSources: string[];
|
|
142
|
+
/**
|
|
143
|
+
* Whether omp ships a usage adapter for this provider. False means omp has no
|
|
144
|
+
* quota endpoint for it at all (kenari, DeepSeek, arbitrary OpenAI-compatible
|
|
145
|
+
* gateways), which is different from an adapter that returned nothing — see
|
|
146
|
+
* `limitsUnavailable`.
|
|
147
|
+
*/
|
|
148
|
+
tracked: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* True when omp DOES track this provider but its endpoint produced no data
|
|
151
|
+
* (invalid or expired credential, unreachable endpoint, or a plan exposing no
|
|
152
|
+
* quota). Distinguishes "nothing to report" from "not supported".
|
|
153
|
+
*/
|
|
154
|
+
limitsUnavailable?: boolean;
|
|
155
|
+
/** Provider-wide caveats from its usage report (e.g. spend is omp-observed). */
|
|
156
|
+
notes?: string[];
|
|
157
|
+
/** Human-readable failure from the provider's usage endpoint, when it failed. */
|
|
158
|
+
error?: string;
|
|
159
|
+
/** Native quota windows; empty when the provider exposes no usage endpoint. */
|
|
160
|
+
limits: UsageLimitWindow[];
|
|
161
|
+
/** Rich kenari report (wallet, Rupiah plan windows, MCP usage table). */
|
|
162
|
+
kenari?: KenariUsageReport;
|
|
163
|
+
/** Rich DeepSeek report (prepaid balance). */
|
|
164
|
+
deepseek?: DeepSeekUsageReport;
|
|
91
165
|
}
|
|
92
166
|
|
|
93
167
|
/** Response body of `GET /api/settings/usage`. */
|
|
94
168
|
export interface UsageReport {
|
|
95
169
|
isMock: boolean;
|
|
96
170
|
generatedAt: string;
|
|
97
|
-
|
|
98
|
-
|
|
171
|
+
/** Every provider with a detected credential, ordered by display name. */
|
|
172
|
+
providers: UsageProviderSummary[];
|
|
99
173
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* oh-my-pi's `todo` tool state, as the chamber reads it.
|
|
8
|
+
*
|
|
9
|
+
* omp owns this list, not the chamber: the `todo` tool writes a structured
|
|
10
|
+
* snapshot into the session JSONL (a `toolResult` entry's `details.phases`, or
|
|
11
|
+
* a `user_todo_edit` custom entry when the operator edits the list by hand), and
|
|
12
|
+
* every later branch rehydration — resume, rewind, fork, `/btw` — reads the
|
|
13
|
+
* DEEPEST such snapshot on the active branch back out of it
|
|
14
|
+
* (`getLatestTodoPhasesFromEntries`). The chamber mirrors exactly that read, so
|
|
15
|
+
* the panel and the agent's own HUD cannot disagree about what is open.
|
|
16
|
+
*
|
|
17
|
+
* The status vocabulary is omp's, including the two states the chamber's chat
|
|
18
|
+
* timeline never rendered before: `blocked` (waiting on something, with an
|
|
19
|
+
* optional note) and `abandoned` (deliberately dropped). Both are settled-but-
|
|
20
|
+
* not-done, which is why `isClosedTodo` — not `status === 'completed'` — is
|
|
21
|
+
* what any progress counter must use.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/** Lifecycle state of one todo item (omp's `TodoStatus`). */
|
|
25
|
+
export type TodoStatus = 'pending' | 'in_progress' | 'completed' | 'abandoned' | 'blocked';
|
|
26
|
+
|
|
27
|
+
/** One task inside a phase. */
|
|
28
|
+
export interface TodoItem {
|
|
29
|
+
content: string;
|
|
30
|
+
status: TodoStatus;
|
|
31
|
+
/** Present on a `blocked` task: what it is waiting for. */
|
|
32
|
+
blocker?: string;
|
|
33
|
+
details?: string;
|
|
34
|
+
notes?: string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** A named group of tasks. */
|
|
38
|
+
export interface TodoPhase {
|
|
39
|
+
name: string;
|
|
40
|
+
tasks: TodoItem[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** The `todo` op that produced a snapshot; absent on legacy transcript entries. */
|
|
44
|
+
export type TodoOperation =
|
|
45
|
+
| 'init'
|
|
46
|
+
| 'start'
|
|
47
|
+
| 'done'
|
|
48
|
+
| 'rm'
|
|
49
|
+
| 'drop'
|
|
50
|
+
| 'block'
|
|
51
|
+
| 'unblock'
|
|
52
|
+
| 'append'
|
|
53
|
+
| 'view';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Where the snapshot that resolved the list came from. A `toolResult` entry
|
|
57
|
+
* only exists when the `todo` tool actually ran in this transcript; the
|
|
58
|
+
* `custom` variant is omp's own durable rehydration record (a hand edit from
|
|
59
|
+
* the `/todo` command, a HUD reveal, or the auto-complete omp performs when a
|
|
60
|
+
* subagent matching a task description finishes). The distinction is
|
|
61
|
+
* diagnostic: "the agent never used todos here" and "the agent used them and
|
|
62
|
+
* then edited them by hand" look identical without it.
|
|
63
|
+
*/
|
|
64
|
+
export type TodoSnapshotSource = 'toolResult' | 'custom';
|
|
65
|
+
|
|
66
|
+
/** The resolved todo list for a session, plus the entry that carried it. */
|
|
67
|
+
export interface TodoSnapshot {
|
|
68
|
+
phases: TodoPhase[];
|
|
69
|
+
/** Entry id of the snapshot — what a later snapshot has to beat. */
|
|
70
|
+
sourceEntryId: string;
|
|
71
|
+
source: TodoSnapshotSource;
|
|
72
|
+
/** ISO timestamp of the snapshot entry, when it carries one. */
|
|
73
|
+
updatedAt?: string;
|
|
74
|
+
/** Op that produced it, when the entry records one. */
|
|
75
|
+
op?: TodoOperation;
|
|
76
|
+
/** omp's own storage mode: `session` (durable) or `memory` (no session file). */
|
|
77
|
+
storage?: 'session' | 'memory';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Rolled-up counters over a snapshot's tasks. */
|
|
81
|
+
export interface TodoProgress {
|
|
82
|
+
total: number;
|
|
83
|
+
completed: number;
|
|
84
|
+
/** `completed` + `abandoned` — the pair omp's HUD hides as settled. */
|
|
85
|
+
closed: number;
|
|
86
|
+
inProgress: number;
|
|
87
|
+
pending: number;
|
|
88
|
+
blocked: number;
|
|
89
|
+
abandoned: number;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** One session's todo state as the panel consumes it. */
|
|
93
|
+
export interface SessionTodoState {
|
|
94
|
+
/** null when this session's transcript holds no committed snapshot. */
|
|
95
|
+
snapshot: TodoSnapshot | null;
|
|
96
|
+
/** Roll-up over the snapshot's tasks; all zeros when there is none. */
|
|
97
|
+
progress: TodoProgress;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Wire payload of `GET /api/omp/session-todos`. */
|
|
101
|
+
export interface SessionTodosPayload extends SessionTodoState {
|
|
102
|
+
sessionId: string;
|
|
103
|
+
/** ISO timestamp of the read. */
|
|
104
|
+
generatedAt: string;
|
|
105
|
+
isMock: boolean;
|
|
106
|
+
/** Set when the session has no readable transcript (never written, or gone). */
|
|
107
|
+
error?: string;
|
|
108
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"forceConsistentCasingInFileNames": true,
|
|
17
17
|
"baseUrl": ".",
|
|
18
18
|
"paths": {
|
|
19
|
-
"@/*": ["./src/*"]
|
|
19
|
+
"@/*": ["./src/*"],
|
|
20
|
+
"elkjs/lib/elk.bundled.js": ["./src/client/stubs/elkjs.ts"],
|
|
21
|
+
"elkjs": ["./src/client/stubs/elkjs.ts"]
|
|
20
22
|
},
|
|
21
23
|
"types": ["bun-types"],
|
|
22
24
|
"skipLibCheck": true,
|