synabun 2026.5.3 → 2026.5.13-beta
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/CHANGELOG.md +203 -43
- package/mcp-server/dist/config.d.ts +13 -0
- package/mcp-server/dist/config.d.ts.map +1 -0
- package/mcp-server/dist/config.js +59 -0
- package/mcp-server/dist/config.js.map +1 -0
- package/mcp-server/dist/http.d.ts +20 -0
- package/mcp-server/dist/http.d.ts.map +1 -0
- package/mcp-server/dist/http.js +104 -0
- package/mcp-server/dist/http.js.map +1 -0
- package/mcp-server/dist/index.d.ts +19 -0
- package/mcp-server/dist/index.d.ts.map +1 -0
- package/mcp-server/dist/index.js +439 -0
- package/mcp-server/dist/index.js.map +1 -0
- package/mcp-server/dist/preload-http.d.ts +3 -0
- package/mcp-server/dist/preload-http.d.ts.map +1 -0
- package/mcp-server/dist/preload-http.js +26 -0
- package/mcp-server/dist/preload-http.js.map +1 -0
- package/mcp-server/dist/preload.d.ts +3 -0
- package/mcp-server/dist/preload.d.ts.map +1 -0
- package/mcp-server/dist/preload.js +30 -0
- package/mcp-server/dist/preload.js.map +1 -0
- package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.d.ts +19 -0
- package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.d.ts.map +1 -0
- package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.js +403 -0
- package/mcp-server/dist/scripts/migrate-qdrant-to-sqlite.js.map +1 -0
- package/mcp-server/dist/services/categories.d.ts +61 -0
- package/mcp-server/dist/services/categories.d.ts.map +1 -0
- package/mcp-server/dist/services/categories.js +356 -0
- package/mcp-server/dist/services/categories.js.map +1 -0
- package/mcp-server/dist/services/discord.d.ts +112 -0
- package/mcp-server/dist/services/discord.d.ts.map +1 -0
- package/mcp-server/dist/services/discord.js +477 -0
- package/mcp-server/dist/services/discord.js.map +1 -0
- package/mcp-server/dist/services/file-checksums.d.ts +14 -0
- package/mcp-server/dist/services/file-checksums.d.ts.map +1 -0
- package/mcp-server/dist/services/file-checksums.js +34 -0
- package/mcp-server/dist/services/file-checksums.js.map +1 -0
- package/mcp-server/dist/services/local-embeddings.d.ts +23 -0
- package/mcp-server/dist/services/local-embeddings.d.ts.map +1 -0
- package/mcp-server/dist/services/local-embeddings.js +71 -0
- package/mcp-server/dist/services/local-embeddings.js.map +1 -0
- package/mcp-server/dist/services/neural-interface.d.ts +113 -0
- package/mcp-server/dist/services/neural-interface.d.ts.map +1 -0
- package/mcp-server/dist/services/neural-interface.js +348 -0
- package/mcp-server/dist/services/neural-interface.js.map +1 -0
- package/mcp-server/dist/services/profiles.d.ts +29 -0
- package/mcp-server/dist/services/profiles.d.ts.map +1 -0
- package/mcp-server/dist/services/profiles.js +257 -0
- package/mcp-server/dist/services/profiles.js.map +1 -0
- package/mcp-server/dist/services/sqlite.d.ts +85 -0
- package/mcp-server/dist/services/sqlite.d.ts.map +1 -0
- package/mcp-server/dist/services/sqlite.js +660 -0
- package/mcp-server/dist/services/sqlite.js.map +1 -0
- package/mcp-server/dist/tools/browser-advanced.d.ts +58 -0
- package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -0
- package/mcp-server/dist/tools/browser-advanced.js +104 -0
- package/mcp-server/dist/tools/browser-advanced.js.map +1 -0
- package/mcp-server/dist/tools/browser-cheatsheet.d.ts +21 -0
- package/mcp-server/dist/tools/browser-cheatsheet.d.ts.map +1 -0
- package/mcp-server/dist/tools/browser-cheatsheet.js +114 -0
- package/mcp-server/dist/tools/browser-cheatsheet.js.map +1 -0
- package/mcp-server/dist/tools/browser-interact.d.ts +216 -0
- package/mcp-server/dist/tools/browser-interact.d.ts.map +1 -0
- package/mcp-server/dist/tools/browser-interact.js +218 -0
- package/mcp-server/dist/tools/browser-interact.js.map +1 -0
- package/mcp-server/dist/tools/browser-navigate.d.ts +86 -0
- package/mcp-server/dist/tools/browser-navigate.d.ts.map +1 -0
- package/mcp-server/dist/tools/browser-navigate.js +96 -0
- package/mcp-server/dist/tools/browser-navigate.js.map +1 -0
- package/mcp-server/dist/tools/browser-observe.d.ts +362 -0
- package/mcp-server/dist/tools/browser-observe.d.ts.map +1 -0
- package/mcp-server/dist/tools/browser-observe.js +1279 -0
- package/mcp-server/dist/tools/browser-observe.js.map +1 -0
- package/mcp-server/dist/tools/browser.d.ts +18 -0
- package/mcp-server/dist/tools/browser.d.ts.map +1 -0
- package/mcp-server/dist/tools/browser.js +88 -0
- package/mcp-server/dist/tools/browser.js.map +1 -0
- package/mcp-server/dist/tools/card-tools.d.ts +82 -0
- package/mcp-server/dist/tools/card-tools.d.ts.map +1 -0
- package/mcp-server/dist/tools/card-tools.js +137 -0
- package/mcp-server/dist/tools/card-tools.js.map +1 -0
- package/mcp-server/dist/tools/card.d.ts +8 -0
- package/mcp-server/dist/tools/card.d.ts.map +1 -0
- package/mcp-server/dist/tools/card.js +16 -0
- package/mcp-server/dist/tools/card.js.map +1 -0
- package/mcp-server/dist/tools/category.d.ts +32 -0
- package/mcp-server/dist/tools/category.d.ts.map +1 -0
- package/mcp-server/dist/tools/category.js +290 -0
- package/mcp-server/dist/tools/category.js.map +1 -0
- package/mcp-server/dist/tools/discord-channel.d.ts +44 -0
- package/mcp-server/dist/tools/discord-channel.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-channel.js +236 -0
- package/mcp-server/dist/tools/discord-channel.js.map +1 -0
- package/mcp-server/dist/tools/discord-guild.d.ts +20 -0
- package/mcp-server/dist/tools/discord-guild.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-guild.js +138 -0
- package/mcp-server/dist/tools/discord-guild.js.map +1 -0
- package/mcp-server/dist/tools/discord-member.d.ts +26 -0
- package/mcp-server/dist/tools/discord-member.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-member.js +122 -0
- package/mcp-server/dist/tools/discord-member.js.map +1 -0
- package/mcp-server/dist/tools/discord-message.d.ts +36 -0
- package/mcp-server/dist/tools/discord-message.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-message.js +184 -0
- package/mcp-server/dist/tools/discord-message.js.map +1 -0
- package/mcp-server/dist/tools/discord-onboarding.d.ts +32 -0
- package/mcp-server/dist/tools/discord-onboarding.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-onboarding.js +179 -0
- package/mcp-server/dist/tools/discord-onboarding.js.map +1 -0
- package/mcp-server/dist/tools/discord-role.d.ts +34 -0
- package/mcp-server/dist/tools/discord-role.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-role.js +178 -0
- package/mcp-server/dist/tools/discord-role.js.map +1 -0
- package/mcp-server/dist/tools/discord-thread.d.ts +28 -0
- package/mcp-server/dist/tools/discord-thread.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-thread.js +88 -0
- package/mcp-server/dist/tools/discord-thread.js.map +1 -0
- package/mcp-server/dist/tools/discord-webhook.d.ts +32 -0
- package/mcp-server/dist/tools/discord-webhook.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord-webhook.js +154 -0
- package/mcp-server/dist/tools/discord-webhook.js.map +1 -0
- package/mcp-server/dist/tools/discord.d.ts +7 -0
- package/mcp-server/dist/tools/discord.d.ts.map +1 -0
- package/mcp-server/dist/tools/discord.js +25 -0
- package/mcp-server/dist/tools/discord.js.map +1 -0
- package/mcp-server/dist/tools/forget.d.ts +14 -0
- package/mcp-server/dist/tools/forget.d.ts.map +1 -0
- package/mcp-server/dist/tools/forget.js +26 -0
- package/mcp-server/dist/tools/forget.js.map +1 -0
- package/mcp-server/dist/tools/git-tools.d.ts +24 -0
- package/mcp-server/dist/tools/git-tools.d.ts.map +1 -0
- package/mcp-server/dist/tools/git-tools.js +107 -0
- package/mcp-server/dist/tools/git-tools.js.map +1 -0
- package/mcp-server/dist/tools/git.d.ts +7 -0
- package/mcp-server/dist/tools/git.d.ts.map +1 -0
- package/mcp-server/dist/tools/git.js +11 -0
- package/mcp-server/dist/tools/git.js.map +1 -0
- package/mcp-server/dist/tools/gsc/experience.d.ts +135 -0
- package/mcp-server/dist/tools/gsc/experience.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc/experience.js +351 -0
- package/mcp-server/dist/tools/gsc/experience.js.map +1 -0
- package/mcp-server/dist/tools/gsc/helpers.d.ts +78 -0
- package/mcp-server/dist/tools/gsc/helpers.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc/helpers.js +258 -0
- package/mcp-server/dist/tools/gsc/helpers.js.map +1 -0
- package/mcp-server/dist/tools/gsc/indexing.d.ts +121 -0
- package/mcp-server/dist/tools/gsc/indexing.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc/indexing.js +357 -0
- package/mcp-server/dist/tools/gsc/indexing.js.map +1 -0
- package/mcp-server/dist/tools/gsc/inspect.d.ts +78 -0
- package/mcp-server/dist/tools/gsc/inspect.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc/inspect.js +321 -0
- package/mcp-server/dist/tools/gsc/inspect.js.map +1 -0
- package/mcp-server/dist/tools/gsc/navigate.d.ts +44 -0
- package/mcp-server/dist/tools/gsc/navigate.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc/navigate.js +197 -0
- package/mcp-server/dist/tools/gsc/navigate.js.map +1 -0
- package/mcp-server/dist/tools/gsc/performance.d.ts +84 -0
- package/mcp-server/dist/tools/gsc/performance.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc/performance.js +274 -0
- package/mcp-server/dist/tools/gsc/performance.js.map +1 -0
- package/mcp-server/dist/tools/gsc/settings.d.ts +153 -0
- package/mcp-server/dist/tools/gsc/settings.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc/settings.js +425 -0
- package/mcp-server/dist/tools/gsc/settings.js.map +1 -0
- package/mcp-server/dist/tools/gsc.d.ts +7 -0
- package/mcp-server/dist/tools/gsc.d.ts.map +1 -0
- package/mcp-server/dist/tools/gsc.js +51 -0
- package/mcp-server/dist/tools/gsc.js.map +1 -0
- package/mcp-server/dist/tools/image-tools.d.ts +24 -0
- package/mcp-server/dist/tools/image-tools.d.ts.map +1 -0
- package/mcp-server/dist/tools/image-tools.js +80 -0
- package/mcp-server/dist/tools/image-tools.js.map +1 -0
- package/mcp-server/dist/tools/image.d.ts +10 -0
- package/mcp-server/dist/tools/image.d.ts.map +1 -0
- package/mcp-server/dist/tools/image.js +14 -0
- package/mcp-server/dist/tools/image.js.map +1 -0
- package/mcp-server/dist/tools/leonardo-browser-tools.d.ts +97 -0
- package/mcp-server/dist/tools/leonardo-browser-tools.d.ts.map +1 -0
- package/mcp-server/dist/tools/leonardo-browser-tools.js +228 -0
- package/mcp-server/dist/tools/leonardo-browser-tools.js.map +1 -0
- package/mcp-server/dist/tools/leonardo.d.ts +13 -0
- package/mcp-server/dist/tools/leonardo.d.ts.map +1 -0
- package/mcp-server/dist/tools/leonardo.js +21 -0
- package/mcp-server/dist/tools/leonardo.js.map +1 -0
- package/mcp-server/dist/tools/loop.d.ts +30 -0
- package/mcp-server/dist/tools/loop.d.ts.map +1 -0
- package/mcp-server/dist/tools/loop.js +357 -0
- package/mcp-server/dist/tools/loop.js.map +1 -0
- package/mcp-server/dist/tools/memories.d.ts +26 -0
- package/mcp-server/dist/tools/memories.d.ts.map +1 -0
- package/mcp-server/dist/tools/memories.js +96 -0
- package/mcp-server/dist/tools/memories.js.map +1 -0
- package/mcp-server/dist/tools/profile.d.ts +16 -0
- package/mcp-server/dist/tools/profile.d.ts.map +1 -0
- package/mcp-server/dist/tools/profile.js +59 -0
- package/mcp-server/dist/tools/profile.js.map +1 -0
- package/mcp-server/dist/tools/recall.d.ts +41 -0
- package/mcp-server/dist/tools/recall.d.ts.map +1 -0
- package/mcp-server/dist/tools/recall.js +273 -0
- package/mcp-server/dist/tools/recall.js.map +1 -0
- package/mcp-server/dist/tools/reflect.d.ts +44 -0
- package/mcp-server/dist/tools/reflect.d.ts.map +1 -0
- package/mcp-server/dist/tools/reflect.js +118 -0
- package/mcp-server/dist/tools/reflect.js.map +1 -0
- package/mcp-server/dist/tools/remember.d.ts +38 -0
- package/mcp-server/dist/tools/remember.d.ts.map +1 -0
- package/mcp-server/dist/tools/remember.js +88 -0
- package/mcp-server/dist/tools/remember.js.map +1 -0
- package/mcp-server/dist/tools/response.d.ts +23 -0
- package/mcp-server/dist/tools/response.d.ts.map +1 -0
- package/mcp-server/dist/tools/response.js +24 -0
- package/mcp-server/dist/tools/response.js.map +1 -0
- package/mcp-server/dist/tools/restore.d.ts +14 -0
- package/mcp-server/dist/tools/restore.d.ts.map +1 -0
- package/mcp-server/dist/tools/restore.js +23 -0
- package/mcp-server/dist/tools/restore.js.map +1 -0
- package/mcp-server/dist/tools/sync.d.ts +18 -0
- package/mcp-server/dist/tools/sync.d.ts.map +1 -0
- package/mcp-server/dist/tools/sync.js +93 -0
- package/mcp-server/dist/tools/sync.js.map +1 -0
- package/mcp-server/dist/tools/tictactoe-tools.d.ts +18 -0
- package/mcp-server/dist/tools/tictactoe-tools.d.ts.map +1 -0
- package/mcp-server/dist/tools/tictactoe-tools.js +78 -0
- package/mcp-server/dist/tools/tictactoe-tools.js.map +1 -0
- package/mcp-server/dist/tools/tictactoe.d.ts +7 -0
- package/mcp-server/dist/tools/tictactoe.d.ts.map +1 -0
- package/mcp-server/dist/tools/tictactoe.js +11 -0
- package/mcp-server/dist/tools/tictactoe.js.map +1 -0
- package/mcp-server/dist/tools/utils.d.ts +10 -0
- package/mcp-server/dist/tools/utils.d.ts.map +1 -0
- package/mcp-server/dist/tools/utils.js +30 -0
- package/mcp-server/dist/tools/utils.js.map +1 -0
- package/mcp-server/dist/tools/whiteboard-tools.d.ts +194 -0
- package/mcp-server/dist/tools/whiteboard-tools.d.ts.map +1 -0
- package/mcp-server/dist/tools/whiteboard-tools.js +198 -0
- package/mcp-server/dist/tools/whiteboard-tools.js.map +1 -0
- package/mcp-server/dist/tools/whiteboard.d.ts +8 -0
- package/mcp-server/dist/tools/whiteboard.d.ts.map +1 -0
- package/mcp-server/dist/tools/whiteboard.js +16 -0
- package/mcp-server/dist/tools/whiteboard.js.map +1 -0
- package/mcp-server/dist/tui.d.ts +3 -0
- package/mcp-server/dist/tui.d.ts.map +1 -0
- package/mcp-server/dist/tui.js +807 -0
- package/mcp-server/dist/tui.js.map +1 -0
- package/mcp-server/dist/types.d.ts +77 -0
- package/mcp-server/dist/types.d.ts.map +1 -0
- package/mcp-server/dist/types.js +2 -0
- package/mcp-server/dist/types.js.map +1 -0
- package/mcp-server/src/http.ts +5 -1
- package/mcp-server/src/index.ts +22 -3
- package/mcp-server/src/services/profiles.ts +25 -5
- package/neural-interface/lib/opencode-client.js +517 -0
- package/neural-interface/lib/opencode-v2-client.js +235 -0
- package/neural-interface/package.json +1 -0
- package/neural-interface/public/shared/cdx/cdx-panel.js +39 -16
- package/neural-interface/public/shared/cdx/cdx-render.js +28 -4
- package/neural-interface/public/shared/cdx/cdx-styles.js +41 -20
- package/neural-interface/public/shared/cdx/cdx-tabs.js +149 -10
- package/neural-interface/public/shared/ocp/ocp-events.js +246 -0
- package/neural-interface/public/shared/ocp/ocp-panel.js +351 -126
- package/neural-interface/public/shared/ocp/ocp-plan.js +567 -0
- package/neural-interface/public/shared/ocp/ocp-questions.js +626 -0
- package/neural-interface/public/shared/ocp/ocp-render.js +437 -67
- package/neural-interface/public/shared/ocp/ocp-send.js +358 -0
- package/neural-interface/public/shared/ocp/ocp-state.js +177 -0
- package/neural-interface/public/shared/ocp/ocp-stream.js +208 -0
- package/neural-interface/public/shared/ocp/ocp-styles.js +372 -41
- package/neural-interface/public/shared/ocp/ocp-tabs.js +932 -477
- package/neural-interface/public/shared/ocp/ocp-trace.js +175 -0
- package/neural-interface/public/shared/ocp/ocp-ws.js +16 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-childpanel.js +646 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-compact-button.js +81 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-context-gauge.js +332 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-manager.js +437 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-modelpicker.js +632 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +1369 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-plan.js +443 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-projectbar.js +519 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +1475 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-send.js +627 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-slash-hints.js +337 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-state.js +418 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +2815 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-variantpicker.js +313 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +367 -0
- package/neural-interface/public/shared/storage.js +28 -5
- package/neural-interface/public/shared/styles.css +43 -3
- package/neural-interface/public/shared/ui-automation-studio.js +5 -32
- package/neural-interface/public/shared/ui-claude-panel.js +216 -62
- package/neural-interface/public/shared/ui-cost-widget.js +55 -34
- package/neural-interface/public/shared/ui-explorer.js +40 -21
- package/neural-interface/public/shared/ui-file-explorer.js +48 -28
- package/neural-interface/public/shared/ui-image-gallery.js +45 -21
- package/neural-interface/public/shared/ui-link.js +105 -51
- package/neural-interface/public/shared/ui-navbar.js +82 -37
- package/neural-interface/public/shared/ui-opencode-panel-v2.js +15 -0
- package/neural-interface/public/shared/ui-sessions.js +189 -0
- package/neural-interface/public/shared/ui-sidepanel-layout.js +55 -9
- package/neural-interface/public/shared/ui-sidepanel-tray.js +79 -11
- package/neural-interface/public/shared/ui-skills.js +5 -30
- package/neural-interface/public/shared/ui-terminal.js +232 -41
- package/neural-interface/public/shared/ui-tooltip.js +62 -18
- package/neural-interface/public/shared/ui-whiteboard.js +135 -91
- package/neural-interface/server.js +1300 -223
- package/package.json +3 -2
- package/setup.js +12 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,43 +1,203 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
43
|
-
- **
|
|
1
|
+
# Project Changelog
|
|
2
|
+
|
|
3
|
+
## 2026-05-13
|
|
4
|
+
|
|
5
|
+
### Fixed — Sidepanel Pills Open Blank Session After Server Restart
|
|
6
|
+
- **Pill click landed on "New chat" instead of resuming the underlying Claude session** — `loadConfig()` in `neural-interface/public/shared/ui-claude-panel.js` detected a server-bootId mismatch and `removeItem`'d `STOR.tabs` / `STOR.tabsLegacy` / `STOR.session` outright. Pills (rendered by `ui-sidepanel-tray.js`) read those same keys but render before the panel inits, so they survived the restart visually — but the first pill click triggered `toggleClaudePanel` → `loadConfig` → wipe → `restoreTabs` found nothing → fell through to `createTab(null, 'New chat')`.
|
|
7
|
+
- Replaced the wipe with a new `_scrubStaleTabState(key)` helper added above `restoreTabs()`. On bootId mismatch it now **preserves** resumable identity (`id`, `sessionId`, `label`, `project`, `model`, `effort`) and **drops** runtime-only state that would lie post-restart (`running` / `_wasRunning`, `queue` / `queuePaused`, `planMode` / `planFilePath`, `sessionCost` — re-synced via `syncSessionCosts()`). Tabs with no `sessionId` and only a default label ("New chat", "New session", "Claude") are pruned; the legacy `STOR.session` single-sessionId key is left intact.
|
|
8
|
+
- Codex and OpenCode panels never had a bootId wipe, so their pills already worked across restarts — Claude was the lone outlier.
|
|
9
|
+
|
|
10
|
+
## 2026-05-12
|
|
11
|
+
|
|
12
|
+
### Fixed — OpenCode V2 Sidepanel Error Auto-Heal
|
|
13
|
+
- **Stale header error pill recovery** — `ocp-v2-state.js` now has explicit `healing`, `clearErrors()`, and `setHealing()` state so transient OpenCode/WebSocket failures no longer leave the sidepanel header stuck on `error` after the connection recovers.
|
|
14
|
+
- **Debounced panel auto-heal** — `ocp-v2-panel.js` now reacts to recoverable errors, `offline`, and `reconnecting` statuses by reconnecting the sidepanel WebSocket, calling `api.init()` to ensure `opencode serve` is healthy, rehydrating the active session/messages, and only creating a fresh session when the current one is unavailable.
|
|
15
|
+
- **Recovery-aware status propagation** — `ocp-v2-ws.js` broadcasts `reconnecting`/`error` status into registered panel stores on WebSocket close/open failure, and the header now shows `healing` / `reconnecting` states instead of immediately surfacing a red error pill.
|
|
16
|
+
- **Child panel stale badge cleanup** — `ocp-v2-childpanel.js` clears recoverable child/sub-agent errors once the server reports ready, preventing minimized child pills from retaining false error badges after recovery.
|
|
17
|
+
|
|
18
|
+
### Fixed — OpenCode V2 Sidepanel Notification Wiring (DONE/ERROR)
|
|
19
|
+
- **Missing DONE notification on turn completion** — `ocp-v2-ws.js` previously only fired ASK notifications for permissions/questions; `session.idle` only flipped the running flag without notifying. Added a `running→idle` transition check that fires `NOTIF_TYPE.DONE` via `uiNotify('panel', ...)` only on a real transition, so idle echoes after reconnect do not re-fire.
|
|
20
|
+
- **Missing ERROR notification on session failure** — `session.error` only pushed the error into state; now also fires `NOTIF_TYPE.ERROR` via `uiNotify` so the user is alerted when not focused on the panel.
|
|
21
|
+
- **Per-turn dedup for outcome notifications** — Added `_outcomeKey` `WeakMap<store, NOTIF_TYPE>` to dedup repeated DONE/ERROR fires within a single turn; previous ERROR locks out subsequent DONE for the same turn, mirroring the legacy `ocp-tabs.js` lockout. Reset is wired via `_ensureOutcomeReset(store)` which subscribes once to `running:set` from `subscribeSession()`, so the dedup clears whenever a new turn starts — including local sends from `ocp-v2-send.js` that flip `running` directly on the store rather than through a ws event.
|
|
22
|
+
- **Parent-aware notification labels** — Sub-agent (child panel) outcomes display as `↳ {title}` to visually distinguish them from primary-session toasts, matching the existing ASK and ACTION label conventions.
|
|
23
|
+
|
|
24
|
+
### Fixed — OpenCode V2 Cascading Close & Phantom Pill Swap
|
|
25
|
+
- **`switchToSession` no longer resurrects the just-closed tab** — `handlePillClose()` in `ocp-v2-panel.js` called `removeTab(sid)` then `switchToSession(next)`, but `switchToSession()` ran `if (prevSid) ensureTab(prevSid, getState().sessionInfo)` while `state.sessionId` still pointed at the deleted session — re-adding it to `_tabSessionIds` every time. Fix: clear `setSession(null, null)` BEFORE `removeTab` when the closing session is active, and guard `switchToSession`'s ensureTab call with `if (prevSid && _tabSessionIds.includes(prevSid))` so no other call path can resurrect a removed tab either.
|
|
26
|
+
- **Pill X now matches header X destructiveness** — Tray pill close on `.ocpv2-session-pill` previously only ran the local `handlePillClose()` (no server delete), leaving orphan sessions on the OpenCode backend. Pill X now `await api.sessionDelete(sessionId)` before the local cleanup, mirroring the header X "Delete + switch" behavior.
|
|
27
|
+
|
|
28
|
+
### Fixed — OpenCode V2 Tray Placeholder Mismatch
|
|
29
|
+
- **`ui-sidepanel-tray.js` now reads the v2 storage shape** — `PROVIDERS.opencode.tabsKeyPrefix` was pinned at the legacy v1 per-window key `synabun-ocp-tabs`, but OCP v2 writes to the single global key `opencode-v2-tabs` holding a plain `string[]` of session IDs. The tray rendered ghost placeholder pills from stale v1 data alongside real v2 pills; clicking a placeholder ran `openProvider('opencode')` → `toggleOpencodePanel()` which closes-if-open, perceived as a cascading panel swap. Added a `v2Plain: true` flag to the opencode provider config; `scopedTabsKey()`, `readPayload()`, `writeProviderPayload()`, and `pickMostRecentMeaningfulPayload()` now branch on it to handle the unscoped single-key `string[]` shape.
|
|
30
|
+
- **One-shot legacy v1 cleanup** — New `cleanupLegacyV1Once()` in `ui-sidepanel-tray.js` deletes every stale `synabun-ocp-tabs-*` storage key on first opencode read, then sets `opencode-v1-cleanup-done` so it only runs once. Eliminates phantom v1 placeholders permanently.
|
|
31
|
+
- **OCP v2 now dispatches `sidepanel-tray:provider-loaded`** — Claude (`ui-claude-panel.js`) and Codex (`cdx-panel.js`) emit this event after boot so `ui-sidepanel-tray.js` can drop its placeholder pills; OCP v2's `boot()` silently skipped the dispatch, so placeholders survived even after the real panel rendered its own pills. Added the `window.dispatchEvent(new CustomEvent('sidepanel-tray:provider-loaded', { detail: { provider: 'opencode' } }))` call inside `boot()` after `_booted = true`.
|
|
32
|
+
- **`hasOpenCodeState` short-circuits on `sessionId`** — V2 plain entries have no `draft`/`plan`/`title` fields; predicate now treats any entry with a `sessionId` as meaningful so placeholder pills render correctly during the pre-boot window.
|
|
33
|
+
- **`tabLabel` fallback for unbooted v2 placeholders** — Placeholder pills show `OpenCode · {sid8}` when no title is persisted yet (v2 plain payload doesn't store titles), instead of a generic "New session" label.
|
|
34
|
+
|
|
35
|
+
### Changed — Sidepanel Header & Tray Pill Polish
|
|
36
|
+
- **`stopPropagation` on OCP header buttons** — `+` (new session), Minimize, Close, and Slide buttons in `ocp-v2-panel.js` now `event.stopPropagation()` so a click no longer bubbles into the session-menu open/close handler. Removes a race where a stray header click could toggle the session dropdown.
|
|
37
|
+
- **`data-tooltip-pos` on every sidepanel pill close button** — Tray pill X buttons in `ui-claude-panel.js` (`.cp-session-pill`), `cdx/cdx-tabs.js` (`.cxp-session-pill`), `ocp-v2-panel.js` (`.ocpv2-session-pill`), and the placeholder pills in `ui-sidepanel-tray.js` all got `data-tooltip-pos="top"` so the "Close" tooltip stops clipping at the bottom edge of the tray. OCP header buttons got `data-tooltip-pos="bottom"` for symmetry.
|
|
38
|
+
|
|
39
|
+
### Fixed — OpenCode V2 Sub-Agent Sidepanel Reliability
|
|
40
|
+
- **Sub-agent tray pill no longer disappears on spawn** — Sub-agent sessions (e.g. the `Task` / `Explore` tool) used to fire server-side without producing a tray pill, leaving the user to dig through the Resume header. Multiple detection gaps fixed in `ocp-v2-manager.js`: new `readParentID()` helper reads `parentID` / `parentId` / `parent_id` / `session.parentID` variants; `AGENT_TOOL_NAMES` expanded with `invoke` / `subagent` / `spawn` / `explore` / `plan` casing variants; new `scanForOrphanChildren()` calls `api.sessionList()` on `registerPrimaryPanel` and `bindPrimarySession` to find children whose `parentID` matches the active session; a new `session.updated` listener catches sub-agents whose `parentID` arrives after creation; the fallback tool-event path no longer requires strict parent-equality so a mid-spawn tab switch still attaches.
|
|
41
|
+
- **Late `session.created` events buffered** — `ocp-v2-ws.js` now keeps a 32-entry / 60 s TTL ring of `session.created` events and replays them to every new `subscribeSessionCreated` subscriber. The panel manager registers only after `boot()` finishes, so child spawns that fired during boot used to be dropped silently — now they are seen.
|
|
42
|
+
- **Child pill survives a missing tray** — `ocp-v2-childpanel.js` split pill mounting into `buildPillElement()` + `attachPillToTray()`. If `#term-minimized-tray` isn't in the DOM yet (panel never opened), the pill polls every 250 ms (up to 15 s) until it can attach, instead of returning `null` and never appearing. Pill also stamps its own `data-session-id` and is inserted directly after the matching parent pill.
|
|
43
|
+
- **Header status stuck on "idle" while server still streaming** — Both primary and child panel headers showed `idle` even while the agent was streaming. `store.setRunning(true)` was only called from `ocp-v2-send.js` when the user pressed Send locally. `ocp-v2-ws.js` `dispatchEvent` now flips `running` on for any incoming `message.updated` whose assistant `info.time.completed` is `null` / `0`, and for any `message.part.updated` with `state.status` of `running` or `pending`. `ocp-v2-panel.js` gained `syncRunningFromHydration()` which scans the transcript after every hydrate (`boot()` tab-restore, `switchToSession()`, `refreshSessionMessages()` auto-heal). `ocp-v2-manager.js` `hydrateChildPanel()` runs the same scan for the child store so the sub-agent header reflects in-flight state after reload.
|
|
44
|
+
|
|
45
|
+
### Added — OpenCode V2 Sub-Agent Transition Polish
|
|
46
|
+
- **Spawn entrance animation** — When a sub-agent attaches, the new child pill in the tray now slides in from +28 px with a soft overshoot (`@keyframes ocpv2-child-pill-spawn`, 0.55 s `cubic-bezier(0.34, 1.18, 0.5, 1)`), a radial glow `::after` burst (`@keyframes ocpv2-child-pill-flash`, 1.4 s), and an outer blue-accent `box-shadow`. The `ocpv2-pill-spawning` class auto-removes after 1.6 s so subsequent hover styles aren't shadowed.
|
|
47
|
+
- **Child panel cross-panel flash** — `.ocpv2-panel-child.ocpv2-open` now runs `@keyframes ocpv2-child-panel-flash` for 0.9 s on open, briefly tinting the panel's `box-shadow` with the blue sub-agent accent so the handoff from parent → child sidepanel reads unmistakably.
|
|
48
|
+
- **Spawn toast notification** — `ocp-v2-manager.js` now calls `uiNotify('panel', NOTIF_TYPE.ACTION, '↳ Sub-agent of <parent>')` when a child is created, giving the user immediate visual feedback in the notifications drawer.
|
|
49
|
+
- **Parent pill state-change transitions** — `.ocpv2-pill-has-child` got an explicit `transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.5, 1), border-color 0.2s, box-shadow 0.2s` so the parent pill animates smoothly into its "child attached" appearance instead of snapping.
|
|
50
|
+
|
|
51
|
+
### Changed — OpenCode V2 Sub-Agent Header Affordances
|
|
52
|
+
- **Header status shows the task, not "idle"** — `ocp-v2-childpanel.js` accepts a new `taskInfo` option and exposes `instance.setTaskInfo()`. New `currentTaskLabel(s)` builds the badge from (priority) the currently-running tool name → `${subagentType} · ${summary}` → summary alone → subagent type alone. `syncHeader()` displays the label both while running and while idle, with the same string as `data-tooltip`. `ocp-v2-manager.js` added `describeAgentTask(part, ev, toolName)` to extract `{subagentType, summary}` from the parent's tool input (`state.input.description` / `state.input.prompt` / `subagent_type` / `agent`) and `lookupParentTaskInfo(childSid)` which scans the parent store's recent tool parts when no replay part is available (session.created / session.updated / orphan-scan paths). Task info is threaded through `ensureChildSpawn` → `spawnChildPanel` → `createChildPanel`.
|
|
53
|
+
- **Child pill tooltip pops left, not above** — `ocp-v2-childpanel.js` sets `data-tooltip-pos="left"` on both the child tray pill and its close button. The tray is right-anchored, so `above` tooltips were getting clipped at the screen edge; left placement uses `ui-tooltip.js`'s existing left path. The tray pill tooltip also appends ` — ${taskLabel}` so the minimized state still surfaces the agent's task.
|
|
54
|
+
|
|
55
|
+
## 2026-05-11
|
|
56
|
+
|
|
57
|
+
### Fixed — Long-Session Memory Leaks
|
|
58
|
+
- **Bounded `_orphanedProcs` map** — Claude-skin orphan processes accumulated in `server.js` when a kill timer never fired (crash, kill -9, sleep) and an entry was never reattached. Added a 60-second sweep (`setInterval(...).unref()`) that deletes entries whose `proc` is null/killed/exited and clears the stale `killTimer`.
|
|
59
|
+
- **Pruned `_ocpSessionOwners` / `_ocpSessionActivity`** — `_ocpStartSilenceWatchdog` in `server.js` now removes session entries with no live clients and `lastEventAt` older than 30 minutes. Watchdog scan no longer iterates dead sessions for the lifetime of the process.
|
|
60
|
+
- **Idle screencast frame waste** — `onScreencastFrame` in `server.js` now bails out early (still ack'ing `Page.screencastFrameAck` to keep the CDP pipeline alive) when `session.clients` is empty, skipping JPEG buffer allocation and broadcast. Removed the per-frame `frameCount++` and conditional `console.log` that allocated even when not logging.
|
|
61
|
+
|
|
62
|
+
### Changed — Whiteboard Drag Hot Path
|
|
63
|
+
- **rAF-batched `renderAll()`** — `ui-whiteboard.js` now schedules renders through `requestAnimationFrame` via `_renderRafId`. Multiple mousemove handlers used to call `renderAll()` synchronously per pointer event; renders are coalesced to one per frame. Added `renderAllImmediate()` for explicit flushes.
|
|
64
|
+
- **`_elementMap` O(1) lookups** — Added `_findEl(id)` Map cache. Rebuilt lazily when `_elements.length` changes; `_invalidateElementMap()` is called from `undo()`/`redo()` to cover same-length object replacement. Replaced 8 `_elements.find(el2 => el2.id === ...)` calls inside `onMouseMove` (move-multi, shape-create, section-create, move, move-arrow, move-pen, rotate, resize).
|
|
65
|
+
- **Cached root rect** — Added `_rootRectCached` + `_getRootRect()`/`_invalidateRootRect()`. `clientToCanvas()` and the pen-drawing path reuse the cached rect for the duration of a gesture; cache is cleared at mouseup and on window resize. Eliminates `_root.getBoundingClientRect()` layout flushes inside the 60 Hz mousemove loop.
|
|
66
|
+
|
|
67
|
+
### Changed — Sidepanel Markdown Rendering
|
|
68
|
+
- **OCP v2 incremental render** — Rewrote `render()` in `ocp-v2-render.js` to use a key/sig reconciler (`_reconcile`, `_partSig`, `_msgSig`) instead of `_container.innerHTML = ''` followed by a full rebuild. User messages, assistant part bubbles, error banners, permission cards, question cards, and the post-plan card now have stable composite keys and content signatures so unchanged nodes are reused. Scroll position is far more stable across streaming deltas.
|
|
69
|
+
- **LRU markdown memoization** — Added a 512-entry insertion-order LRU cache around `renderMarkdown()` in `ocp-v2-render.js`, `md()` in `cdx/cdx-render.js`, and `md()` in `ocp/ocp-render.js`. Identical text re-rendered during streaming/state-change passes now returns cached HTML instead of re-invoking `marked.parse()`.
|
|
70
|
+
|
|
71
|
+
### Changed — Storage Layer
|
|
72
|
+
- **Deferred `JSON.parse` to flush time** — `storage.js` introduces `STR_SENTINEL`. `setItem()` no longer parses the caller-provided string on every call; `_dirty[key] = STR_SENTINEL` records "parse the current cache string at flush time". `_flushToServer()` and the `beforeunload` `sendBeacon` path resolve sentinels by parsing the cached string once when actually flushing. Big win for callers that store large snapshots (whiteboard, codex transcripts) where every keystroke previously triggered a redundant `JSON.parse`.
|
|
73
|
+
|
|
74
|
+
### Changed — Floating Terminal Drag Compositing
|
|
75
|
+
- **Simplified `.term-float-tab.float-dragging` shadow** — In `styles.css`, replaced the multi-layer `box-shadow: var(--shadow-2xl), 0 0 0 1px rgba(0,0,0,0.4)` with a single `0 8px 24px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.4)`, dropped the `box-shadow` transition (kept `border-radius`), and added `will-change: transform, left, top` so the dragging window stays on its own composited layer. Removes per-frame GPU compositing thrash during drag.
|
|
76
|
+
|
|
77
|
+
## 2026-05-09
|
|
78
|
+
|
|
79
|
+
### Added — Reasoning Effort Picker in OpenCode V2 Sidepanel
|
|
80
|
+
|
|
81
|
+
- **Variant picker in compose footer** — New `neural-interface/public/shared/ocp-v2/ocp-v2-variantpicker.js` module renders a small dropdown beside the model picker that lets users pick a reasoning/thinking effort (`low` / `medium` / `high` / `max` / `xhigh` / `minimal` / `none`) for any OpenCode model that exposes a `variants` map. Auto-hides when the active model has no variants. Includes a "default" entry that clears the variant so the SDK falls back to its built-in default.
|
|
82
|
+
- Persists per-model selection in `localStorage` under `ocp-v2-model-variants` so each model remembers its preferred effort across sessions.
|
|
83
|
+
- Subscribes to `config:model` and restores the saved variant whenever the user switches models.
|
|
84
|
+
- Variants ordered by `PREFERRED_ORDER` (`none, minimal, low, medium, high, max, xhigh`); unknown variant names appended alphabetically; entries with `disabled: true` filtered out.
|
|
85
|
+
- **State plumbing** — Added `variant: null` field plus `setVariant()` setter to `neural-interface/public/shared/ocp-v2/ocp-v2-state.js` (emits `config:variant` event).
|
|
86
|
+
- **Send pipeline** — `neural-interface/public/shared/ocp-v2/ocp-v2-send.js` mounts the variant picker before the model picker in `.ocpv2-footer-right` and forwards `variant: s.variant || undefined` on every `api.send()` call. WS API in `neural-interface/public/shared/ocp-v2/ocp-v2-ws.js` carries the field through to the server, and `neural-interface/server.js` forwards it to `opencodeV2Client.session.prompt(...)` (the v2 client already passes through arbitrary fields via `...rest`).
|
|
87
|
+
- **Styles** — Added `#ocpv2-variant-dd` rules to `neural-interface/public/shared/ocp-v2/ocp-v2-styles.js`: brain icon, capitalised variant names, smaller right-anchored menu, reused `ocpv2-model-menu-in` animation.
|
|
88
|
+
|
|
89
|
+
## 2026-05-07
|
|
90
|
+
|
|
91
|
+
### Changed — Empty-Plan Re-Prompt Button (Claude Panel)
|
|
92
|
+
- **Replaced "Plan text was empty" status text with an interactive button** — When the user clicks `Edit plan` in the post-plan card but the plan extractor and `/api/latest-plan` disk fallback both fail to surface a plan file, `neural-interface/public/shared/ui-claude-panel.js` previously printed a static `appendStatus()` line ("Plan text was empty — ask Claude to re-output the plan, or click Continue with implementation to proceed."). The `noFile()` callback in the `'plan'` action handler now renders an inline `msg-status` row containing the short text "Plan text was empty." plus a primary `post-plan-action pp-primary` button labeled "Ask Claude to re-output the plan". Clicking the button populates `#cp-input` with a re-prompt instruction (`Please re-output the full plan you were preparing. Use ExitPlanMode with the complete plan text...`) and calls `send()`. Button disables on click, and falls back to a status if the WebSocket is closed. Scoped to the Claude panel only — `ocp-panel.js` retains the existing `renderErrorMessage` pattern.
|
|
93
|
+
|
|
94
|
+
### Added — OpenCode Sidepanel Trace System
|
|
95
|
+
- **`ocp-trace.js` client trace bus** — New `neural-interface/public/shared/ocp/ocp-trace.js` exporting `trace()`, `traceTimer()`, `setTraceLevel()`, `setTraceContext()`, `onTrace()`, and `exportTraceLog()`. 5000-event ring buffer, level-gated routing (silent/errors/normal/verbose, persisted in `localStorage:ocp.traceLevel`), CSS-styled `[ocp-trace]` `console.debug` mirror, 250ms batched POST to `/api/ocp/trace/ingest`, `keepalive: true` flush on `pagehide`/`visibilitychange`.
|
|
96
|
+
- **Server trace endpoints** — Added `POST /api/ocp/trace/ingest`, `GET /api/ocp/trace/snapshot?tail=N`, `POST /api/ocp/trace/clear`, and `WS /ws/ocp-trace` to `neural-interface/server.js`. Appends each batch to `data/ocp-trace.jsonl` (rotates at 50MB), broadcasts to live `/ws/ocp-trace` viewer clients. New `ocpTraceEmit(tag, fields)` helper for server-originated events.
|
|
97
|
+
- **Trace points across all OCP modules** — `ocp-ws.js` (request lifecycle with timing), `ocp-events.js` (`event:in` router decisions, `q:asked`/`queued`/`render`), `ocp-stream.js` (`stream:finalize`), `ocp-plan.js` (`plan:exitPlanMode`, `onTurnTerminal`, `proseDetected`, `postUI:show`, `watchdog:fire`), `ocp-questions.js` (`q:reply` timer, `q:list`, `perm:render`/`respond`, `q:poll`), `ocp-send.js` (`send:start`, `send:fetch` timer, `send:turn:end`, `send:error`), `ocp-tabs.js` (`tab:switch` + `setTraceContext` on switch).
|
|
98
|
+
- **Server-side `ocpTraceEmit`** — `q:reply:recv`/`q:reply:done` (with `via` and ms), `q:list:done`, `perm:respond:done`, `send:dispatch` (records `planSystemInjected` when `agent==='plan'`), `sse:relay` for high-signal SSE events (`question.*`/`permission.*`/`session.*`).
|
|
99
|
+
|
|
100
|
+
### Added — OpenCode Plan-Mode "Force Question Tool" Recovery
|
|
101
|
+
- **4th recovery button** — `renderProseQuestionRecoveryCard()` in `neural-interface/public/shared/ocp/ocp-render.js` now renders a "Force question tool now" button alongside the existing Reply directly / Re-ask / Dismiss buttons. Wired in `ocp-plan.js` to send a hard prompt with a literal `question({ questions: [...] })` one-shot example so models like Kimi K2.6 can pattern-match the tool-call shape.
|
|
102
|
+
- **`question:list` polling fallback** — `startQuestionPolling()` / `stopQuestionPolling()` in `neural-interface/public/shared/ocp/ocp-questions.js`. While a plan turn is active and no question card is visible, polls `question.list()` every 2.5s and surfaces any pending question via `backfillPendingQuestions()`. Wired from `ocp-send.js` to start on plan-mode turn start and stop on resolve / abort / error.
|
|
103
|
+
|
|
104
|
+
### Fixed — OpenCode Question Reply "Fetch Failed" Frozen UI
|
|
105
|
+
- **Non-terminal reply error path** — In `neural-interface/public/shared/ocp/ocp-questions.js renderOpencodeQuestion`, the `requestWs('question:reply')` catch handler no longer flips `tab.running=false` / `endTurn(tab)`. Instead it re-enables the question card (`locked=''`, buttons re-enabled) and shows "Click an answer again to retry." Previously a transient SDK fetch error caused the entire turn to be marked complete, freezing the UI behind a stale card.
|
|
106
|
+
- **Composer unblocking on prose-recovery dismiss** — `onReplyDirectly` and `onDismiss` callbacks in `ocp-plan.js showProseQuestionRecoveryUI` now defensively clear `tab.showPostPlanActions = false` so the composer always re-enables when the user closes the prose-recovery card.
|
|
107
|
+
|
|
108
|
+
### Fixed — OpenCode Sidepanel Question Card Multi-Question Routing Trace
|
|
109
|
+
- **`event:in` + `q:queued` diagnostics** — `neural-interface/public/shared/ocp/ocp-events.js` now traces every routed SDK event with `eventType`, `sid`, `partType`, `toolName`, plus `q:asked` (with question count) and `q:queued` (with `reason: no-container | active-question-busy`). Makes it possible to determine — from the trace alone — whether the model emitted `question.asked`, whether the router rendered or queued it, and why.
|
|
110
|
+
|
|
111
|
+
### Changed — OpenCode Plan-Mode System Instruction
|
|
112
|
+
- **One-shot `question` tool example** — `PLAN_MODE_INSTRUCTION` in `neural-interface/lib/opencode-client.js` and the duplicate `OPENCODE_PLAN_MODE_INSTRUCTION` in `neural-interface/server.js` now include a literal `question({ questions: [{ question, header, options: [{label, description}], multiSelect }] })` example block plus a "If you find yourself writing 'let me ask a few questions'… STOP and call the `question` tool" reinforcement. Kimi K2.6 ignored the abstract directive but pattern-matches the concrete example.
|
|
113
|
+
|
|
114
|
+
### Added — OpenCode Sidepanel V2 (Clean-Slate Rebuild)
|
|
115
|
+
- **Fresh SDK wrapper `lib/opencode-v2-client.js`** — New ~190-line wrapper around `@opencode-ai/sdk/v2`'s `createOpencodeClient`. Pass-through philosophy: NO `normalizeV2Event` translation, NO `buildSystemForPlanMode` injection, NO legacy shape massaging. `connect({ port })` runs an `event.subscribe()` loop with 1s→10s exponential-backoff auto-reconnect via `AbortController`, emitting `{ eventType, event }` envelopes verbatim through an internal `event.onEvent(listener)` registry. Surfaces `session.list/create/get/delete/abort/messages/prompt` and `permission.reply`; `unwrap()` translates hey-api `{ data, error, response }` to `{ status, data }` and throws on error; `clean()` strips `undefined` keys so the URL builder doesn't append `?foo=undefined`. Verbose log gated on `OCPV2_VERBOSE=1`.
|
|
116
|
+
- **New WS route `/ws/opencode-v2` + REST endpoints** — `neural-interface/server.js` adds `_ocpV2WsClients` Set, `broadcastToOpencodeV2Clients()`, `installOpencodeV2Listener()` (independent bridge from legacy `installOpencodeClientListener`), and `handleOpencodeV2Ws(ws)`. The handler implements `init / session:list / session:create / session:get / session:delete / session:messages / message:send / message:abort / permission:reply` over id-correlated JSON frames, with per-session `AbortController` map so a fresh send cancels the previous in-flight prompt cleanly. New REST: `GET /api/opencode-v2/status`, `POST /api/opencode-v2/serve/start`, `POST /api/opencode-v2/serve/stop`. Wired `opencodeV2Client.connect/disconnect` into both `ensureOpencodeServer` boot points and `stopOpencodeServer`, sharing the same `opencode serve` process on port 4096 as the legacy panel. `/ws/opencode-v2` added to the upgrade allowlist and connection router; legacy `/ws/opencode-skin` route remains registered (orphaned).
|
|
117
|
+
- **Browser modules under `public/shared/ocp-v2/`** — Six fresh modules totaling under 1500 lines:
|
|
118
|
+
- `ocp-v2-styles.js` — `.ocpv2-*` CSS injected once, slide-in panel, message bubbles, tool cards with status badges, reasoning collapsibles, permission cards, error banners, compose footer with autosizing textarea.
|
|
119
|
+
- `ocp-v2-state.js` — pub/sub state store: `serverStatus`, `sessionId`/`sessionInfo`, `messageOrder[]`, `messages: Map<id,{parts:Map}>`, `running`, `pendingPermission`, `errors[]`. Setters fire `notify()` to all `subscribe()` listeners.
|
|
120
|
+
- `ocp-v2-ws.js` — WebSocket client. `api.{init,sessionList,sessionCreate,sessionGet,sessionDelete,sessionMessages,send,abort,permissionReply}` returns id-correlated promises. `handleEvent()` dispatches `message.updated` / `message.removed` / `message.part.updated` / `session.idle` / `session.error` / `permission.asked` / `permission.replied` into state mutations; auto-reconnect after 1.5s on close.
|
|
121
|
+
- `ocp-v2-render.js` — full CLI parity renderers: text (minimal Markdown — paragraphs, fences, inline code, **bold**, *italic*, lists, links — no external deps), reasoning (collapsible `<details>`, open while streaming), tool (header with name + status badge, input JSON, output `<pre>`, error variant), file chip, step markers, permission card with `Allow once / Always / Reject` buttons that lock on click and call `api.permissionReply()`, error banner. Mounts on the messages container and re-renders on every state notification.
|
|
122
|
+
- `ocp-v2-send.js` — compose textarea + Send/Abort button. Enter sends, Shift+Enter newline, optimistic user message rendered before SDK echoes back, button toggles to Abort while `running`. `doAbort()` calls `api.abort(sessionId)` and force-clears `running`.
|
|
123
|
+
- `ocp-v2-panel.js` — slide-in panel container. Lazy boot on first toggle: `api.init()` → `setServerStatus` → `startFreshSession()` (auto-creates one fresh session per panel open, matches CLI single-session model). Header shows `OpenCode · {sid8}` + status pill (`ready` / `running` / `error`) + a `New` button to spawn a new session. Emits `opencode-panel:visibility` so the existing navbar binding still highlights the topright button.
|
|
124
|
+
- **Barrel + navbar swap** — New `public/shared/ui-opencode-panel-v2.js` re-exports `toggleOpencodePanel` / `isOpencodePanelOpen` / `openOpencodeWithPrompt` from `ocp-v2/ocp-v2-panel.js`. Single-line edit in `public/shared/ui-navbar.js` repoints the import from `./ui-opencode-panel.js` → `./ui-opencode-panel-v2.js`. Topright OpenCode button now opens the V2 panel; old `public/shared/ocp/**` (13 files, ~14000 lines), `public/shared/ui-opencode-panel.js`, and `lib/opencode-client.js` remain unmodified on disk as a rollback safety net.
|
|
125
|
+
|
|
126
|
+
## 2026-05-06
|
|
127
|
+
|
|
128
|
+
### Fixed — Terminal ESC Key Now Aborts CLI TUIs On First Press (Floating + Docked)
|
|
129
|
+
- **Single ESC reaches the PTY instead of `\x1b\x1b`** — In `neural-interface/public/shared/ui-terminal.js`, the global window-capture ESC handler in `initTerminal()` sent `\x1b` over the WS without `e.preventDefault()` / `e.stopImmediatePropagation()`, so xterm.js's own keydown listener on `.xterm-helper-textarea` fired afterwards and re-emitted ESC via `term.onData(...)` (line 1915). The PTY received `\x1b\x1b`, which Bubbletea-based TUIs (OpenCode, Claude Code, Codex) interpret as a Meta-prefix and ignore — so the running task never aborted. Handler now sends one `\x1b`, calls `e.preventDefault()` + `e.stopImmediatePropagation()` to block the duplicate, and re-focuses via `requestAnimationFrame(() => session.term?.focus())` instead of the old `term?.blur()` / `ta.blur()` pair (focus loss had forced the user to click back into the terminal between keystrokes).
|
|
130
|
+
- **Docked terminal now has ESC coverage** — Previous early return `if (!isXterm) return;` left the docked panel without any ESC fallback when focus drifted to a tab title or panel chrome. Handler now resolves the target session by DOM ancestry: xterm helper textarea → its viewport's `dataset.sessionId`, else `.term-float-tab` → that tab's session, else inside `_panel` (`#terminal-panel`) → `_sessions[_activeIdx]`. Skips non-terminal `input/textarea/select/[contenteditable]` so search/rename/path inputs still consume ESC normally.
|
|
131
|
+
- **Removed redundant per-floating-window ESC branch** — `attachTab()`'s `win.addEventListener('keydown', ...)` had a duplicate ESC sender that was unreachable for the common case (skipped when target was a textarea). Stripped the ESC branch; the Ctrl+C copy-on-selection branch stays as the floating-window-only fallback.
|
|
132
|
+
|
|
133
|
+
## 2026-05-05
|
|
134
|
+
|
|
135
|
+
### Fixed — OpenCode Plan-Mode Stall Recovery Now Always Shows PLAN COMPLETE (Followup)
|
|
136
|
+
- **PLAN COMPLETE always renders after a stall** — In `neural-interface/public/shared/ocp/ocp-tabs.js`, the `executePlanStallRecovery()` added in the prior fix took the wrong fallback when `tab.planContent` ended up shorter than 40 chars: it called `showProseQuestionRecoveryUI(tab)` (which renders a card titled `MODEL ASKED QUESTIONS IN PROSE`), instead of the user-expected `PLAN COMPLETE`. Reproduced on `opencode-go/kimi-k2.6` plan mode where the user reported "the agent asked a few questions … then automatically returned an error … but why isn't it presenting the plan complete normally?". Recovery now unconditionally calls `maybeShowPostPlanUI(tab, { source: \`stall:${reason}\`, force: true })` — `force: true` skips both the 40-char gate AND the prose-question guard. The prose-question recovery card is for a different bug class (model wrote questions as text instead of using the `question` tool) and should never be the stall fallback.
|
|
137
|
+
- **Broader content extraction via `extractPlanTextLoose`** — The previous recovery called `capturePlanContent(tab)` which only adopts DOM text > 80 chars from the *last* `.ocp-msg-assistant` bubble, missing two key paths used by kimi-k2.6: (1) the live thinking block content (rendered into `.ocp-think-content-live` by the new inline `<think>` parser), and (2) `tab.planContent` not being populated by `message.part.delta` events (deltas update the DOM only — only `message.part.updated` updates `tab.planContent`). Recovery now calls `extractPlanTextLoose(tab)` which already covers all six extraction sources: existing `tab.planContent` → `ExitPlanMode` tool args → `todowrite`/`tasks` todos → final assistant text bubble (>40 chars) → standalone `.ocp-think-block .ocp-think-content` (matches both finalized AND live-streaming thinking blocks since the live block carries both classes) → subagent (Agent/task) tool result → last-resort any assistant bubble.
|
|
138
|
+
|
|
139
|
+
### Fixed — OpenCode Sidepanel Plan Mode Hang on Non-Anthropic Models (Tiered Stall Watchdog)
|
|
140
|
+
- **Auto-recovers when the model never finalizes** — In `neural-interface/public/shared/ocp/ocp-tabs.js`, plan-mode turns on non-Anthropic providers (e.g., `opencode-go/kimi-k2.6`) often hang because the model never calls `ExitPlanMode` and the OpenCode server never delivers a terminal `session.idle` / `session.status:idle` / `message.completed`. The synchronous POST blocks for up to 30 min, so the user had to manually press STOP for the PLAN COMPLETE card to appear (manual STOP triggers `message:abort` → server emits `session.idle` → post-plan funnel). New `schedulePlanStallWatchdog(tab)` runs a single-shot silence timer that is re-armed on every SSE event in `handleSSEEvent`, plus a one-shot hard-cap timer set in `sendMessage`.
|
|
141
|
+
- **Tiered behavior** — `PLAN_STALL_SOFT_MS` (60 s of silence) renders a soft prompt card with `Abort & show captured plan` / `Wait longer` / `Cancel turn`; `PLAN_STALL_AUTO_MS` (180 s of silence) auto-recovers without prompting; `PLAN_STALL_HARD_CAP_MS` (8 min total turn duration) force-recovers regardless of activity.
|
|
142
|
+
- **Recovery path (`executePlanStallRecovery`)** — Captures latest plan content via `capturePlanContent`, rejects the pending WS request via `rejectPending`, sends `message:abort` so the OpenCode server fires `session.idle` and stops burning model compute, force-finalizes tab UI (`tab.running = false; endTurn(tab); setTurnStatus(tab)`), then renders PLAN COMPLETE card if `tab.planContent.length >= 40` else falls back to the prose-question recovery card.
|
|
143
|
+
- **Suppressed during interactive question** — `hasActiveQuestion(tab)` short-circuits both arm and fire so a user taking 90 s to answer a `question` tool prompt doesn't trigger a false stall.
|
|
144
|
+
- **Couples with finalization watchdog clearing** — `clearPlanFinalizationWatchdog(tab)` now also calls `clearPlanStallTimers(tab)`, so all 16 existing terminal/abort sites (message.completed, session.status:idle, session.idle, session.error, abortTab, sendMessage start/resolved/catch, setTabMode, etc.) clear stall timers without per-site edits.
|
|
145
|
+
- **Soft-prompt card** — New `renderPlanStallSoftCard()` in `neural-interface/public/shared/ocp/ocp-render.js` mirrors the prose-question recovery card with a cool-blue accent (vs. amber) so users can visually distinguish "stuck" from "asked questions in prose". CSS in `neural-interface/public/shared/ocp/ocp-styles.js` (`.ocp-plan-stall-card` and friends).
|
|
146
|
+
|
|
147
|
+
### Fixed — OpenCode Sidepanel Live Thinking Stream for Inline `<think>` Tag Models
|
|
148
|
+
- **CLI-style typing for Kimi K2 / DeepSeek R1 / Qwen QwQ via opencode-go** — In `neural-interface/public/shared/ocp/ocp-render.js`, models that emit reasoning as inline `<think>…</think>` tags (rather than as a structured `partType === 'reasoning'` part) previously had their reasoning render as raw `<think>` text in the live bubble, with `<think>` parsing only happening at `finalizeStreamingMessage()`. The user complaint: thinking should "type into" the sidepanel as it does in the OpenCode CLI. New stateful parser `_routeStreamingChunk(el, container, chunk)` walks each delta, splits at `<think>` / `</think>` boundaries, and routes inside-tag content to the live thinking block via `_appendThinkTextOnly` and outside-tag content to the live text node via `_appendRawTextOnly`.
|
|
149
|
+
- **Element-level state** — `el._thinkInside` tracks whether subsequent deltas continue inside an unclosed `<think>` block. `el._thinkPendingTag` buffers a partial tag that lands at a chunk boundary (e.g., delta ending with `<thi` or `</thin`); `_matchTrailingTagPrefix(s, target)` finds the longest suffix of `s` that prefixes `target`, so the partial flushes correctly when the rest of the tag arrives in the next delta.
|
|
150
|
+
- **`setStreamRawText` split path** — Full-payload `message.part.updated` events that include `<think>…</think>` no longer clobber the live split. When the full text contains `<think>`, the parser uses `parseThinkSegments` to compute the canonical `textJoined` (non-thinking) and `thinkJoined` (thinking) strings and adopts each side independently with the existing length-gate. Sets `el._thinkInside` from the trailing segment so subsequent deltas continue correctly. Fast path (no inline tags) keeps the original direct-write behavior.
|
|
151
|
+
- **No regression for explicit reasoning parts** — Anthropic and other providers that emit `partType === 'reasoning'` with structured deltas continue to flow through `appendThinkChunk` directly; only the `appendStreamChunk` (text delta) path got the new inline parser.
|
|
152
|
+
|
|
153
|
+
### Fixed — OpenCode Sidepanel Live Thinking Stream (CLI Parity)
|
|
154
|
+
- **Token-by-token reasoning typing** — Reasoning deltas in `neural-interface/public/shared/ocp/ocp-render.js` previously routed through `scheduleStreamingRender()` which rebuilt the entire `<details>` block via `slot.innerHTML = thinkBlockHtml(...)` every 16 ms (O(n) per tick over the growing buffer). The block now lives in a persistent `<details class="ocp-think-block ocp-think-block-live" open>` skeleton built once by the new `getOrCreateLiveThinkContent(el)`; each delta does `live.appendChild(document.createTextNode(chunk))` (O(1)) so reasoning text "types in" character-by-character, mirroring the OpenCode CLI feel.
|
|
155
|
+
- **Snapshot suffix append** — `setStreamThinkText()` now slices the new suffix when a `message.part.updated` snapshot arrives longer than the current buffer and appends only that suffix as a single text node, preserving the persistent live element (no flicker, no scroll-position loss).
|
|
156
|
+
- **Auto-scroll respects manual scroll-up** — New `autoScrollLiveThink(live)` only scrolls the live content to the bottom when the user is within 32 px of it, so scrolling up to read earlier reasoning isn't fought.
|
|
157
|
+
- **Removed obsolete render path** — Deleted `renderStreamingElement()` and `scheduleStreamingRender()` (the 16 ms `innerHTML`-rebuild path) since the live append path replaces it.
|
|
158
|
+
- **Live styling cues** — Added `.ocp-think-block-live` (slightly brighter border) and a pulsing `Thinking…` summary label via `@keyframes ocp-think-pulse` in `neural-interface/public/shared/ocp/ocp-styles.js`, plus `scroll-behavior: smooth` on `.ocp-think-content-live`.
|
|
159
|
+
|
|
160
|
+
### Fixed — OpenCode Plan Mode Auto-Finalizes After ExitPlanMode
|
|
161
|
+
- **PLAN COMPLETE without manual STOP** — When a plan-mode model emitted `ExitPlanMode` but the OpenCode server never delivered a terminal `session.idle` / `message.completed`, the post-plan card stayed buried until the user pressed STOP (which triggered `message:abort` → server-emitted `session.idle` → post-plan funnel). The `schedulePlanFinalizationWatchdog()` in `neural-interface/public/shared/ocp/ocp-tabs.js` was previously armed only inside `recordAgentChildEvent` for the Deepseek subagent-idle case, never for parent-level `ExitPlanMode` without subagents (e.g., Anthropic plan mode). The watchdog is now armed (with a 5 s timeout) in BOTH ExitPlanMode detection sites — the legacy `tool.start` handler and the modern `message.part.updated` handler — replacing the lone `clearPlanFinalizationWatchdog(tab)` call with a clear-then-schedule pair.
|
|
162
|
+
- **Parameterized timeout** — `schedulePlanFinalizationWatchdog(tab, { timeoutMs = 8000 } = {})` accepts an optional `timeoutMs`; the subagent-idle case keeps the 8 s default while ExitPlanMode-detected uses 5 s (the tool already returned, terminal event should arrive in 1–3 s).
|
|
163
|
+
- **Relaxed min-length guard on watchdog fire** — When `_exitPlanDetected = true`, the 40-char `tab.planContent` minimum is bypassed so plans whose text only lives on `toolInput.plan` (no separate assistant prose) still render. The existing `maybeShowPostPlanUI(tab, { force: tab._exitPlanDetected })` already passes `force: true` for the tool-detected path.
|
|
164
|
+
|
|
165
|
+
### Fixed — Claude Sidepanel Plan-Mode "Plan Text Was Empty" Edit Flow
|
|
166
|
+
- **Server-side plan file authoring before `killProc()`** — `neural-interface/server.js` ExitPlanMode hook (`handleClaudeSkinWebSocket`, ~line 6616) now calls `writePlanFile(inputPlan || planText, { cwd: workDir })` before the kill. Previously the kill (intentional, prevents `--print`-mode auto-implementation) ran before `PostToolUse` could fire, so `post-plan.mjs` never authored a plan file from `tool_input.plan`. Result: clicking "Edit Plan" hit `noFile()` with "Plan text was empty — ask Claude to re-output the plan…". Server now writes `data/plans/YYYY-MM-DD/<slug>.md` directly from `ExitPlanMode.input.plan` (or the preceding text block as fallback).
|
|
167
|
+
- **`writePlanFile()` helper extracted from `/api/create-plan`** — both the new ExitPlanMode hook and the existing `POST /api/create-plan` route share one writer. Helper is idempotent: same slug + identical content returns the existing path so server-side and client-side races never produce `slug-2.md` duplicates.
|
|
168
|
+
- **Tightened narration-prefix filter `_NARRATION_PREFIX`** — regex now catches `now i (have|see|need)`, `here's`, `looking at`, `based on (the|my|your)`, `the user (wants|asked|is asking|needs)`, `okay/alright` openers, `found it`, `the recent` — preventing prose narration from being slugified into garbage filenames like `now-i-have-a-good-understanding-of-the-context.md` or `here-s-the-refined-plan-based-on-your-selections.md`.
|
|
169
|
+
- **New `plan_file_written` system event** — server emits `{ type: 'system', subtype: 'plan_file_written', path, name }` to the client BEFORE the assistant event so `handleTabEvent()` in `neural-interface/public/shared/ui-claude-panel.js` sets `tab.planFilePath` immediately. Edit Plan now takes `openPlan(tab.planFilePath)` on the very first click — no race, no fallback chain, no `requestAnimationFrame` retry needed in the happy path.
|
|
170
|
+
- **Removed redundant `/api/create-plan` POST from 3 eager-capture sites** — `renderAssistant()` (ExitPlanMode-detection block, partial-message dedup branch, new-message branch) no longer POSTs the captured plan content. Capture still stashes `tab._planContent` from `exitBlock.input.plan` for the implementation-prompt flow, but file authoring is exclusively server-side.
|
|
171
|
+
- **Removed `extractPlanText`/`materialize` DOM-scrape fallback from Edit Plan click handler** — `renderPostPlanActions()`'s `a.action === 'plan'` branch no longer scrapes `.msg-body` rendered prose and POSTs it to `/api/create-plan`. The DOM only ever held rendered prose narration, never authoritative plan markdown — that path was the source of the garbage-named plan files. Click flow simplified to: `tab.planFilePath` → `openPlan` immediately; else one `requestAnimationFrame` retry for in-flight `plan_file_written`; else `diskFallback` via `GET /api/latest-plan`; else `noFile()`.
|
|
172
|
+
|
|
173
|
+
### Fixed — OpenCode Plan Mode Forces `question` Tool + Prose-Question Recovery
|
|
174
|
+
- **Plan-mode prompt-prefix injection** — `neural-interface/server.js` previously sent `body.mode='plan'` and `body.tools={...}` without any prompt instruction, so models like Kimi K2.6 wrote clarification questions as prose ("Before I proceed, a couple of quick questions:") instead of calling the OpenCode `question` tool — the sidepanel only renders interactive cards for actual `question` tool calls, so prose questions stranded the user. New `OPENCODE_PLAN_MODE_INSTRUCTION` constant (mirroring the existing `CODEX_PLAN_MODE_PREFIXES` at ~line 2828) is now prepended to the first text part in every `body.mode === 'plan'` send: it explicitly states `You MUST call the \`question\` tool`, forbids prose questions, and reminds the model to call `ExitPlanMode` when ready. Idempotent via a `startsWith('[PLAN MODE]')` guard so the prefix isn't double-injected on multi-turn plan refinement.
|
|
175
|
+
- **Per-turn question-tool usage tracking** — `neural-interface/public/shared/ocp/ocp-tabs.js` adds a `tab._questionToolUsedThisTurn` flag set to `true` in all three question-detection sites (`message.part.updated` tool branch, `tool.start` handler, and the dedicated `question.asked` SSE event), reset to `false` at the start of `sendMessage()`, when entering plan mode in `setTabMode()`, and on tab clear.
|
|
176
|
+
- **Prose-question detector** — New `looksLikeProseQuestions(content)` helper scans the last 400 chars of captured plan text for trailing patterns: `quick/a couple of/two/before i proceed … questions:`, `Question N:` markers, or 2+ trailing `?` per line.
|
|
177
|
+
- **`maybeShowPostPlanUI` recovery reroute** — When `!force && !_exitPlanDetected && !_questionToolUsedThisTurn && looksLikeProseQuestions(planContent)`, the function now calls `showProseQuestionRecoveryUI(tab)` and returns `false` instead of stamping the misleading PLAN COMPLETE card. Fixes the long-standing "press STOP after prose questions → PLAN COMPLETE for half-finished plan" trap.
|
|
178
|
+
- **`MODEL ASKED QUESTIONS IN PROSE` recovery card** — New `renderProseQuestionRecoveryCard()` / `removeProseQuestionRecoveryCards()` exports in `neural-interface/public/shared/ocp/ocp-render.js`, plus a new `.ocp-prose-question-card` block in `neural-interface/public/shared/ocp/ocp-styles.js` (amber accent so it's visually distinct from the green-ish PLAN COMPLETE). Three actions: **Reply directly** focuses the OCP input field; **Re-ask using question tool** sends a follow-up prompt instructing the model to re-ask using the `question` tool; **Dismiss** removes the card. Cards are also cleared on next `sendMessage()` and on `setTabMode()` exit-plan.
|
|
179
|
+
|
|
180
|
+
### Added — AskUserQuestion Manual QA Test Suite
|
|
181
|
+
- **Test suite at `tests/ask-user-question/`** — Manual QA suite for the `AskUserQuestion` interactive question card across Claude, Codex, and OpenCode sidepanels. Each scenario is a directive copy-paste prompt that forces the panel CLI to invoke its `AskUserQuestion` equivalent (Claude `control_request`, Codex `request_user_input`, OpenCode `tool.start` / `question.asked`) with a specific shape, so visual and functional rendering can be verified across all three panels.
|
|
182
|
+
- **`README.md`** — Master entry with the panel-to-render-function map (`renderAskUserQuestion()` in `neural-interface/public/shared/ui-claude-panel.js`, `renderUserInputRequest()` in `neural-interface/public/shared/cdx/cdx-requests.js`, `renderQuestionCard()` in `neural-interface/public/shared/ocp/ocp-render.js`), pre-flight steps, and recommended run order.
|
|
183
|
+
- **`checklist.md`** — Per-panel verification checklist covering visual checks (header chip, options layout, `Submit (x/y)` progress, locked state, inter-block spacing) and functional checks (selection toggling, multi-select, "Other" / custom-input path, submit transmission, queue behavior). Includes a scenario × panel scoreboard.
|
|
184
|
+
- **`master-prompt.md`** — Single 4-question stress prompt (mixed multi/single-select, long labels, descriptions) for end-to-end smoke testing after granular scenarios.
|
|
185
|
+
- **`scenarios/01-12-*.md`** — 12 numbered scenarios covering single-select min/max, multi-select, batched 2/4-question cards with mixed types, `Other` / custom typed answer, sequential queue (`_questionQueue` / `processQuestionQueue`), plan-mode integration, long-content overflow, header-only cards, no-options free-text fallback, and cancel-mid-answer queue clearing.
|
|
186
|
+
|
|
187
|
+
## 2026-05-04
|
|
188
|
+
|
|
189
|
+
### Fixed — OpenCode Sidepanel Project Selector Lost the Project Path
|
|
190
|
+
- **Session created in the right directory** — The `session:create` WS handler in `neural-interface/server.js` now forwards the panel-supplied cwd to OpenCode as `POST /session?directory=<encoded path>`. OpenCode binds each session to the directory passed in this query parameter (`session.directory`); previously the call omitted it, so every OpenCode session inherited the serve cwd (`PACKAGE_ROOT` = SynaBun) and ALL agent tool calls (Read, Bash, Edit, Write) resolved relative to SynaBun even when the user had picked a different project in the footer. With the query param wired through, OpenCode's tools natively resolve at the project root the user selected.
|
|
191
|
+
- **Fresh-session cwd routing** — Switching the project via the OpenCode footer dropdown previously mutated only `tab.project` in `neural-interface/public/shared/ocp/ocp-panel.js`, leaving the existing OpenCode session bound to the cwd it was first created with. Added `setActiveProject()` in `neural-interface/public/shared/ocp/ocp-tabs.js` that updates `tab.project` + `STOR.project`, drops the bound `tab.sessionId` (along with title, token usage, plan/post-plan, watchdogs, tool activity, question/permission queues, and snapshot flush), refreshes the project chip label, and clears the messages container so the next `sendMessage()` creates a fresh OpenCode session at the new cwd. The projectbar dropdown click handler and the name-modal commit now both route through `setActiveProject()` instead of touching `tab.project` directly.
|
|
192
|
+
- **Greeting carries the absolute project path** — Updated `buildOpencodeGreetingUserPrompt()` in `neural-interface/server.js` to spell out the absolute project working directory (`Project working directory: \`/abs/path\``) and instruct the agent to use it for all file operations whenever the selected project differs from `PACKAGE_ROOT`. Belt-and-suspenders alongside the new `?directory=` query param, so the agent's first turn explicitly states the cwd it should be operating in.
|
|
193
|
+
|
|
194
|
+
### Fixed — Codex Sidepanel Project Switching
|
|
195
|
+
- **Fresh-session cwd routing** — Fixed the Codex footer project selector so changing projects updates the bound `_project` state in `neural-interface/public/shared/cdx/cdx-tabs.js` instead of only mutating `tab.project` in `neural-interface/public/shared/cdx/cdx-panel.js`; the new `setActiveProject()` keeps `tab.project`, `STOR.project`, branch UI, and fresh thread reset state in sync before `dispatchPrompt()` sends `query.cwd`.
|
|
196
|
+
- **Sandbox root refresh** — Sends `reset_thread` to the Codex websocket after a project change and clears `_threadId` when the server explicitly returns `threadId: null`, preventing stale app-server thread IDs from leaking into fresh sessions and causing workspace-write permissions to target the old folder.
|
|
197
|
+
|
|
198
|
+
### Added — Pending Remember Picker on Notifications Health Tab
|
|
199
|
+
- **Inline provider/model picker** — New "Run Pending Remembers" button on the Notifications drawer Health tab in `neural-interface/public/shared/ui-sessions.js`. Clicking expands an inline picker with provider buttons (Claude Code / Codex / OpenCode), a per-provider model dropdown, and Cancel/Run actions, so each orphaned `pending-remember` flag can be summarized into a real memory by the user's chosen sidepanel CLI instead of an isolated background agent.
|
|
200
|
+
- **Per-provider model loading** — Claude models pulled from `/api/claude/config`, OpenCode models flattened from `/api/opencode/providers/full` as `provider/model` ids, Codex falls back to a static list (`gpt-5-codex`, `gpt-5`, `o4`, `o4-mini`) since its model list is WebSocket-only.
|
|
201
|
+
- **Sidepanel routing** — Run dispatches the prompt to the chosen sidepanel: Claude via `sendToPanel({ newTab: true, autoSubmit: true })`, OpenCode via `openOpencodeWithPrompt({ autoSend: true })`, Codex by toggling the panel and pre-filling `#cxp-input` (auto-send is unreliable from outside the Codex panel).
|
|
202
|
+
- **Server endpoint** — New `GET /api/sessions/pending-remember-prompt` in `neural-interface/server.js` returns `{ ok, count, prompt }`; resolves each orphaned session id to its `~/.claude/projects/<projKey>/<sessionId>.jsonl` transcript and embeds those paths in the prompt so the executing CLI can read them.
|
|
203
|
+
- **Picker styling** — Added `.sm-pr-picker` / `.sm-pr-row` / `.sm-pr-providers` / `.sm-pr-select` rules in `neural-interface/public/shared/styles.css`, including an `active` pill state for the selected provider.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const config: {
|
|
2
|
+
readonly dataDir: string;
|
|
3
|
+
readonly sqlite: {
|
|
4
|
+
readonly dbPath: string;
|
|
5
|
+
};
|
|
6
|
+
readonly embedding: {
|
|
7
|
+
readonly model: "Xenova/all-MiniLM-L6-v2";
|
|
8
|
+
readonly dimensions: 384;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function getEnvPath(): string;
|
|
12
|
+
export declare function detectProject(cwd?: string): string;
|
|
13
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAC;AAIX,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAsBD,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CA2BlD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
// --- Static config ---
|
|
4
|
+
export const config = {
|
|
5
|
+
dataDir: process.env.MEMORY_DATA_DIR || path.resolve(import.meta.dirname || process.cwd(), '..', 'data'),
|
|
6
|
+
sqlite: {
|
|
7
|
+
dbPath: process.env.SQLITE_DB_PATH || '', // resolved lazily from dataDir
|
|
8
|
+
},
|
|
9
|
+
embedding: {
|
|
10
|
+
model: 'Xenova/all-MiniLM-L6-v2',
|
|
11
|
+
dimensions: 384,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
// --- .env path resolution (for file watching) ---
|
|
15
|
+
export function getEnvPath() {
|
|
16
|
+
return process.env.DOTENV_PATH || path.resolve(import.meta.dirname || process.cwd(), '..', '..', '.env');
|
|
17
|
+
}
|
|
18
|
+
// --- Project Detection (reads from claude-code-projects.json) ---
|
|
19
|
+
const PROJECTS_PATH = path.join(config.dataDir, 'claude-code-projects.json');
|
|
20
|
+
function loadRegisteredProjects() {
|
|
21
|
+
try {
|
|
22
|
+
if (!fs.existsSync(PROJECTS_PATH))
|
|
23
|
+
return [];
|
|
24
|
+
return JSON.parse(fs.readFileSync(PROJECTS_PATH, 'utf-8'));
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function normalizeLabel(label) {
|
|
31
|
+
return label.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
|
|
32
|
+
}
|
|
33
|
+
export function detectProject(cwd) {
|
|
34
|
+
const dir = cwd || process.cwd();
|
|
35
|
+
const lower = dir.toLowerCase().replace(/\\/g, '/');
|
|
36
|
+
const projects = loadRegisteredProjects();
|
|
37
|
+
// Sort by path length descending — most specific match wins
|
|
38
|
+
const sorted = projects
|
|
39
|
+
.map((p) => ({
|
|
40
|
+
path: p.path.toLowerCase().replace(/\\/g, '/'),
|
|
41
|
+
label: normalizeLabel(p.label),
|
|
42
|
+
}))
|
|
43
|
+
.sort((a, b) => b.path.length - a.path.length);
|
|
44
|
+
// 1. Exact path prefix match (cwd is inside a registered project)
|
|
45
|
+
for (const p of sorted) {
|
|
46
|
+
if (lower.startsWith(p.path + '/') || lower === p.path)
|
|
47
|
+
return p.label;
|
|
48
|
+
}
|
|
49
|
+
// 2. Substring match — cwd folder name contains a registered project's folder name
|
|
50
|
+
for (const p of sorted) {
|
|
51
|
+
const projFolder = path.basename(p.path).toLowerCase();
|
|
52
|
+
if (lower.includes(projFolder))
|
|
53
|
+
return p.label;
|
|
54
|
+
}
|
|
55
|
+
// 3. Fallback to directory basename
|
|
56
|
+
const base = path.basename(dir).toLowerCase().replace(/[^a-z0-9-]/g, '-');
|
|
57
|
+
return base || 'global';
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,wBAAwB;AAExB,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC;IACxG,MAAM,EAAE;QACN,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,EAAG,+BAA+B;KAC3E;IACD,SAAS,EAAE;QACT,KAAK,EAAE,yBAAyB;QAChC,UAAU,EAAE,GAAG;KAChB;CACO,CAAC;AAEX,mDAAmD;AAEnD,MAAM,UAAU,UAAU;IACxB,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3G,CAAC;AAED,mEAAmE;AAEnE,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,2BAA2B,CAAC,CAAC;AAO7E,SAAS,sBAAsB;IAC7B,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;YAAE,OAAO,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,EAAE,CAAC;IAAC,CAAC;AACxB,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,MAAM,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,sBAAsB,EAAE,CAAC;IAE1C,4DAA4D;IAC5D,MAAM,MAAM,GAAG,QAAQ;SACpB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;QAC9C,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC;KAC/B,CAAC,CAAC;SACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEjD,kEAAkE;IAClE,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,KAAK,CAAC;IACzE,CAAC;IAED,mFAAmF;IACnF,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;QACvD,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAE,OAAO,CAAC,CAAC,KAAK,CAAC;IACjD,CAAC;IAED,oCAAoC;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAC1E,OAAO,IAAI,IAAI,QAAQ,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* HTTP transport for SynaBun MCP server.
|
|
4
|
+
* Stateless — creates a fresh McpServer per request (same tools, no session state).
|
|
5
|
+
* Mount on any Express app or run standalone.
|
|
6
|
+
*/
|
|
7
|
+
import { type Router } from 'express';
|
|
8
|
+
/**
|
|
9
|
+
* Initialize DB, categories, and warm up the embedding model.
|
|
10
|
+
* Safe to call multiple times — only runs once.
|
|
11
|
+
* Exported so the Neural Interface can eagerly init at startup.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ensureInit(): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Create Express routes for the MCP HTTP endpoint.
|
|
16
|
+
* Auth is handled externally (URL-embedded key in server.js).
|
|
17
|
+
* Can be mounted on an existing Express app: app.use('/mcp', createMcpRoutes());
|
|
18
|
+
*/
|
|
19
|
+
export declare function createMcpRoutes(): Router;
|
|
20
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAgB,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAU/C;;;;GAIG;AACH,wBAAsB,UAAU,kBAW/B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAiDxC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* HTTP transport for SynaBun MCP server.
|
|
4
|
+
* Stateless — creates a fresh McpServer per request (same tools, no session state).
|
|
5
|
+
* Mount on any Express app or run standalone.
|
|
6
|
+
*/
|
|
7
|
+
import express from 'express';
|
|
8
|
+
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
9
|
+
import { ensureDatabase } from './services/sqlite.js';
|
|
10
|
+
import { initCategoryCache } from './services/categories.js';
|
|
11
|
+
import { warmupEmbeddings } from './services/local-embeddings.js';
|
|
12
|
+
import { createMcpServer } from './index.js';
|
|
13
|
+
let initialized = false;
|
|
14
|
+
let initPromise = null;
|
|
15
|
+
/**
|
|
16
|
+
* Initialize DB, categories, and warm up the embedding model.
|
|
17
|
+
* Safe to call multiple times — only runs once.
|
|
18
|
+
* Exported so the Neural Interface can eagerly init at startup.
|
|
19
|
+
*/
|
|
20
|
+
export async function ensureInit() {
|
|
21
|
+
if (initialized)
|
|
22
|
+
return;
|
|
23
|
+
if (initPromise)
|
|
24
|
+
return initPromise;
|
|
25
|
+
initPromise = (async () => {
|
|
26
|
+
try {
|
|
27
|
+
await ensureDatabase();
|
|
28
|
+
}
|
|
29
|
+
catch { }
|
|
30
|
+
await initCategoryCache();
|
|
31
|
+
await warmupEmbeddings();
|
|
32
|
+
initialized = true;
|
|
33
|
+
})();
|
|
34
|
+
await initPromise;
|
|
35
|
+
initPromise = null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create Express routes for the MCP HTTP endpoint.
|
|
39
|
+
* Auth is handled externally (URL-embedded key in server.js).
|
|
40
|
+
* Can be mounted on an existing Express app: app.use('/mcp', createMcpRoutes());
|
|
41
|
+
*/
|
|
42
|
+
export function createMcpRoutes() {
|
|
43
|
+
const router = express.Router();
|
|
44
|
+
router.use(express.json());
|
|
45
|
+
router.post('/', async (req, res) => {
|
|
46
|
+
await ensureInit();
|
|
47
|
+
// HTTP clients (Claude Code via ~/.claude.json) have ToolSearch / deferred
|
|
48
|
+
// loading — always serve the full toolset regardless of active-profile.json.
|
|
49
|
+
// Profile restriction targets stdio clients (Codex, OpenCode) that load all
|
|
50
|
+
// tool schemas eagerly.
|
|
51
|
+
const server = createMcpServer('full');
|
|
52
|
+
try {
|
|
53
|
+
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined });
|
|
54
|
+
await server.connect(transport);
|
|
55
|
+
await transport.handleRequest(req, res, req.body);
|
|
56
|
+
res.on('close', () => {
|
|
57
|
+
transport.close();
|
|
58
|
+
server.close();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
console.error('MCP HTTP error:', error);
|
|
63
|
+
if (!res.headersSent) {
|
|
64
|
+
res.status(500).json({
|
|
65
|
+
jsonrpc: '2.0',
|
|
66
|
+
error: { code: -32603, message: 'Internal server error' },
|
|
67
|
+
id: null,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
// Stateless — no GET (SSE) or DELETE (session close) needed
|
|
73
|
+
router.get('/', (_req, res) => {
|
|
74
|
+
res.writeHead(405).end(JSON.stringify({
|
|
75
|
+
jsonrpc: '2.0',
|
|
76
|
+
error: { code: -32000, message: 'Method not allowed.' },
|
|
77
|
+
id: null,
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
80
|
+
router.delete('/', (_req, res) => {
|
|
81
|
+
res.writeHead(405).end(JSON.stringify({
|
|
82
|
+
jsonrpc: '2.0',
|
|
83
|
+
error: { code: -32000, message: 'Method not allowed.' },
|
|
84
|
+
id: null,
|
|
85
|
+
}));
|
|
86
|
+
});
|
|
87
|
+
return router;
|
|
88
|
+
}
|
|
89
|
+
// If run directly, start a standalone HTTP server
|
|
90
|
+
const isMain = process.argv[1]?.replace(/\\/g, '/').endsWith('/http.js')
|
|
91
|
+
|| process.argv[1]?.replace(/\\/g, '/').endsWith('/http.ts');
|
|
92
|
+
if (isMain) {
|
|
93
|
+
const PORT = parseInt(process.env.MCP_HTTP_PORT || '3345', 10);
|
|
94
|
+
const app = express();
|
|
95
|
+
app.use('/mcp', createMcpRoutes());
|
|
96
|
+
app.get('/', (_req, res) => {
|
|
97
|
+
res.json({ name: 'SynaBun MCP (HTTP)', status: 'ok', endpoint: '/mcp' });
|
|
98
|
+
});
|
|
99
|
+
app.listen(PORT, () => {
|
|
100
|
+
console.log(`SynaBun MCP HTTP server listening on port ${PORT}`);
|
|
101
|
+
console.log(`Endpoint: http://localhost:${PORT}/mcp`);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { PROFILE_PRESETS, VALID_GROUPS, resolveProfileGroups, getActiveProfile, applyProfile, persistProfile } from './services/profiles.js';
|
|
3
|
+
export { PROFILE_PRESETS, VALID_GROUPS, resolveProfileGroups, getActiveProfile, applyProfile, persistProfile };
|
|
4
|
+
export declare function registerTools(server: McpServer): {
|
|
5
|
+
rememberTool: import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|
|
6
|
+
recallTool: import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|
|
7
|
+
reflectTool: import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|
|
8
|
+
memoriesTool: import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|
|
9
|
+
};
|
|
10
|
+
export declare function trackToolUsage(toolName: string): void;
|
|
11
|
+
export declare function getToolUsageSummary(): {
|
|
12
|
+
counts: Record<string, number>;
|
|
13
|
+
profile: string;
|
|
14
|
+
activeGroups: string[];
|
|
15
|
+
recommendation: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function createMcpServer(forceProfile?: string): McpServer;
|
|
18
|
+
export declare function refreshCategorySchemas(): void;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|