@goodandready/dsh-context-lens 0.1.20 → 0.1.22
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 +26 -0
- package/lib/client.js +42 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,32 @@ All notable changes to `@goodandready/dsh-context-lens` will be documented in th
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.22] - 2026-09-19
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Settings reachable again on the plugin's own page**: the current DSH core
|
|
12
|
+
(0.1.6-alpha.2) renders a plugin's configuration page only for entries registered
|
|
13
|
+
in the plugin-list seat `plugins.item` — that is how `dsh-agentrouter` and
|
|
14
|
+
`dsh-agent-orchestrator` show their settings, while the row seat and the legacy
|
|
15
|
+
card alone leave the page without the form. The view-aware card is now registered
|
|
16
|
+
there too (`id: 'dsh-context-lens'`, order 60, static label); `plugins.row.config`
|
|
17
|
+
and `settings.plugin.item` stay as fallbacks.
|
|
18
|
+
|
|
19
|
+
## [0.1.21] - 2026-09-19
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- **Settings reachable again**: the card registered into `settings.plugin.item`, a
|
|
23
|
+
slot the current DSH core (0.1.6-alpha.2) no longer renders, so the settings were
|
|
24
|
+
unreachable. The surface now registers into the Plugins page row seat
|
|
25
|
+
`plugins.row.config`, keyed `@goodandready/dsh-context-lens#dsh-context-lens`
|
|
26
|
+
(`rowConfigKey(package, rowId)`): the plugin's row gains a configure control whose
|
|
27
|
+
page is the settings form (`view: 'page'`, without our header and card chrome —
|
|
28
|
+
the host page draws the title, icon, crumb and padding) plus a one-line state for
|
|
29
|
+
`view: 'summary'`. The legacy seat stays registered as a fallback for older cores.
|
|
30
|
+
- Guard `test/row-seat.test.mjs`: row key against `package.json` and
|
|
31
|
+
`cordis.patch.yml`, seat order (row seat first, legacy seat kept), bare page
|
|
32
|
+
render and no duplicate `settings.section`.
|
|
33
|
+
|
|
8
34
|
## [0.1.20] - 2026-09-18
|
|
9
35
|
|
|
10
36
|
### Fixed
|
package/lib/client.js
CHANGED
|
@@ -4,6 +4,11 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
const React = require('react');
|
|
6
6
|
const NS = '@goodandready/dsh-context-lens';
|
|
7
|
+
// Plugins page row seat (DSH 0.1.6-alpha.2): key = '<package name>#<row id>',
|
|
8
|
+
// row id as cordis.patch.yml declares it.
|
|
9
|
+
const PKG = '@goodandready/dsh-context-lens';
|
|
10
|
+
const ROW_ID = 'dsh-context-lens';
|
|
11
|
+
const ROW_CONFIG_KEY = PKG + '#' + ROW_ID;
|
|
7
12
|
|
|
8
13
|
const en = {
|
|
9
14
|
'update.available': 'Update available: v{latestVersion} (current: v{currentVersion})',
|
|
@@ -592,9 +597,9 @@ window.__ModuleLoader__.load({
|
|
|
592
597
|
);
|
|
593
598
|
}
|
|
594
599
|
|
|
595
|
-
function PluginCardInner({ ctx: _ctx, t }) {
|
|
600
|
+
function PluginCardInner({ ctx: _ctx, t, page }) {
|
|
596
601
|
ensureCss();
|
|
597
|
-
const [expanded, setExpanded] = React.useState(
|
|
602
|
+
const [expanded, setExpanded] = React.useState(!!page);
|
|
598
603
|
const [draft, setDraft] = React.useState({
|
|
599
604
|
compressionMode: 'balanced',
|
|
600
605
|
astSkeletonMaxDepth: 3,
|
|
@@ -811,10 +816,11 @@ window.__ModuleLoader__.load({
|
|
|
811
816
|
}
|
|
812
817
|
}
|
|
813
818
|
|
|
814
|
-
return React.createElement('li', { className: 'cl-section-card' },
|
|
819
|
+
return React.createElement(page ? 'div' : 'li', { className: page ? 'cl-page' : 'cl-section-card' },
|
|
815
820
|
React.createElement('button', {
|
|
816
821
|
type: 'button',
|
|
817
822
|
className: 'cl-section-header',
|
|
823
|
+
style: page ? { display: 'none' } : undefined,
|
|
818
824
|
onClick: () => setExpanded(!expanded),
|
|
819
825
|
'aria-expanded': expanded
|
|
820
826
|
},
|
|
@@ -957,8 +963,15 @@ window.__ModuleLoader__.load({
|
|
|
957
963
|
}
|
|
958
964
|
|
|
959
965
|
function PluginCard(props) {
|
|
966
|
+
// Row seat (plugins.row.config): one-liner for the summary, the form without
|
|
967
|
+
// our header/card chrome for the page (the host page draws those itself).
|
|
968
|
+
if (props && props.view === 'summary') {
|
|
969
|
+
return React.createElement('span', { className: 'cl-sub' },
|
|
970
|
+
'Context lens: token savings, compaction and budget insights.');
|
|
971
|
+
}
|
|
972
|
+
const page = !!(props && props.view === 'page');
|
|
960
973
|
return React.createElement(ErrorBoundary, null,
|
|
961
|
-
React.createElement(PluginCardInner, props)
|
|
974
|
+
React.createElement(PluginCardInner, Object.assign({}, props, { page }))
|
|
962
975
|
);
|
|
963
976
|
}
|
|
964
977
|
|
|
@@ -986,6 +999,31 @@ window.__ModuleLoader__.load({
|
|
|
986
999
|
}
|
|
987
1000
|
if (!ctx.slots) return;
|
|
988
1001
|
let registered = false;
|
|
1002
|
+
// Primary seat for the current core (0.1.6-alpha.2): the plugin-list seat
|
|
1003
|
+
// 'plugins.item', which is the one the Plugins page renders as the plugin's own
|
|
1004
|
+
// page with its configuration (the host draws the title, icon, crumb and
|
|
1005
|
+
// padding and asks for view 'summary' or view 'page'). The row seat and the
|
|
1006
|
+
// legacy settings.plugin.item seat below stay as fallbacks.
|
|
1007
|
+
if (typeof ctx.slots.inject === 'function') {
|
|
1008
|
+
try {
|
|
1009
|
+
ctx.slots.inject('plugins.item', () => ctx.slots.register({
|
|
1010
|
+
name: 'plugins.item',
|
|
1011
|
+
id: ROW_ID,
|
|
1012
|
+
order: 60,
|
|
1013
|
+
label: () => 'Context Lens',
|
|
1014
|
+
locale: NS,
|
|
1015
|
+
inject: () => ({ ctx })
|
|
1016
|
+
}, PluginCard));
|
|
1017
|
+
ctx.slots.inject('plugins.row.config', () => ctx.slots.register({
|
|
1018
|
+
name: 'plugins.row.config',
|
|
1019
|
+
key: ROW_CONFIG_KEY,
|
|
1020
|
+
locale: NS,
|
|
1021
|
+
inject: () => ({ ctx })
|
|
1022
|
+
}, PluginCard));
|
|
1023
|
+
} catch (e) {
|
|
1024
|
+
console.error('[dsh-context-lens] plugins.item / plugins.row.config inject failed', e && e.stack || e);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
989
1027
|
const doRegister = () => {
|
|
990
1028
|
if (registered) return;
|
|
991
1029
|
try {
|
package/package.json
CHANGED