@goodandready/dsh-context-lens 0.1.14 → 0.1.15

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 CHANGED
@@ -174,6 +174,13 @@ Audit fixes (#33–#47, #18):
174
174
  - **Test**: Added regression test suite simulating strict Cordis Context Proxy behavior.
175
175
 
176
176
 
177
+ ## Changed in v0.1.15
178
+
179
+ - **Feature (#54)**: Support native DSH right sidebar (`ctx.sidebarRightTabs` + `sidebar.right.pane.tab` slot) introduced in DSH 0.1.5-alpha.1.
180
+ - **Compatibility (#54)**: Preserve legacy `dsh-better-sidebar` integration with deterministic, non-conflicting IDs (`@goodandready/dsh-context-lens` vs `dsh-context-lens:tab`).
181
+ - **Resilience (#54)**: Clean boot and graceful fallback across all 4 layouts (Native only, Legacy only, Both active, Neither active).
182
+ - **Tests (#54)**: Added comprehensive test matrix in `test/sidebar-matrix-54.test.mjs`.
183
+
177
184
  ## Changed in v0.1.14
178
185
 
179
186
  - **Fix (#52)**: Multiline AST signature parsing in `skeletonizer.js` for TypeScript, JavaScript, Rust, and Go with complex parameter types and return annotations.
package/README.ru.md CHANGED
@@ -163,6 +163,13 @@ MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
163
163
  - **Тесты**: Добавлены регрессионные тесты со строгим Cordis Context Proxy.
164
164
 
165
165
 
166
+ ## Changed in v0.1.15
167
+
168
+ - **Функциональность (#54)**: Поддержка встроенной правой боковой панели DSH (`ctx.sidebarRightTabs` + слот `sidebar.right.pane.tab`) из DSH 0.1.5-alpha.1.
169
+ - **Совместимость (#54)**: Сохранена интеграция с легаси `dsh-better-sidebar` с детерминированными неконфликтующими идентификаторами (`@goodandready/dsh-context-lens` и `dsh-context-lens:tab`).
170
+ - **Отказоустойчивость (#54)**: Чистая инициализация во всех 4 конфигурациях (только Native, только Legacy, обе активны, обе отсутствуют).
171
+ - **Тесты (#54)**: Добавлена матрица тестов в `test/sidebar-matrix-54.test.mjs`.
172
+
166
173
  ## Changed in v0.1.14
167
174
 
168
175
  - **Исправление (#52)**: Поддержка многострочных сигнатур функций и методов в `skeletonizer.js` (TypeScript, JavaScript, Rust, Go) со сложными типами параметров и аннотациями возвращаемых значений.
package/lib/client.js CHANGED
@@ -530,6 +530,65 @@ window.__ModuleLoader__.load({
530
530
  } else {
531
531
  try { doRegister(); } catch (e) { console.error('[dsh-context-lens] direct register failed (no inject)', e && e.stack || e); throw e; }
532
532
  }
533
+ // Native DSH Right Sidebar (#54, DSH 0.1.5-alpha.1+)
534
+ if (typeof ctx.inject === "function") {
535
+ try {
536
+ ctx.inject(["sidebarRightTabs"], (sctx) => {
537
+ const tabs = sctx && sctx.sidebarRightTabs;
538
+ if (!tabs || typeof tabs.register !== "function") return;
539
+ try {
540
+ const def = {
541
+ id: "@goodandready/dsh-context-lens",
542
+ kind: "context-lens",
543
+ priority: "extension",
544
+ title: () => "Lens",
545
+ guide: [{
546
+ order: 50,
547
+ title: () => "Context Lens",
548
+ description: () => "AST compression, log filtering, token budget",
549
+ icon: () => React.createElement("span", null, "◐")
550
+ }]
551
+ };
552
+ if (typeof sctx.effect === "function") {
553
+ sctx.effect(() => tabs.register(def));
554
+ } else {
555
+ tabs.register(def);
556
+ }
557
+
558
+ // Register body in sidebar.right.pane.tab slot
559
+ if (ctx.slots) {
560
+ const registerPaneTab = () => {
561
+ try {
562
+ return ctx.slots.register({
563
+ name: "sidebar.right.pane.tab",
564
+ key: "@goodandready/dsh-context-lens",
565
+ locale: NS,
566
+ inject: () => ({ ctx })
567
+ }, LensTab);
568
+ } catch (e) {
569
+ console.warn("[dsh-context-lens] native sidebar pane tab register failed", e && e.message || e);
570
+ }
571
+ };
572
+ if (typeof ctx.slots.inject === "function") {
573
+ try {
574
+ const ok = ctx.slots.inject("sidebar.right.pane.tab", registerPaneTab);
575
+ if (!ok) console.warn("[dsh-context-lens] sidebar.right.pane.tab inject returned false");
576
+ } catch (e) {
577
+ try { registerPaneTab(); } catch (e2) {}
578
+ }
579
+ } else {
580
+ try { registerPaneTab(); } catch (e) {}
581
+ }
582
+ }
583
+ } catch (e) {
584
+ console.warn("[dsh-context-lens] native sidebar registration failed", e && e.message || e);
585
+ }
586
+ });
587
+ } catch (e) {
588
+ // host without sidebarRightTabs declared or inject failure
589
+ }
590
+ }
591
+
533
592
  // BetterSidebar tab (optional, for dsh-better-sidebar via ctx.inject)
534
593
  if (typeof ctx.inject === 'function') {
535
594
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-context-lens",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "DSH plugin for AST context compression, test log filtering, and token budget guard",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",