@goodandready/dsh-agent-loop-guard 0.2.10 → 0.2.12
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 +29 -0
- package/lib/client.js +70 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.12] - 2026-09-19
|
|
9
|
+
|
|
10
|
+
- **Settings reachable again on the plugin's own page**: the current DSH core
|
|
11
|
+
(0.1.6-alpha.2) renders a plugin's configuration page only for entries registered
|
|
12
|
+
in the plugin-list seat `plugins.item` — that is how `dsh-agentrouter` and
|
|
13
|
+
`dsh-agent-orchestrator` show their settings, while the row seat and the legacy
|
|
14
|
+
card alone leave the page without the form. `PluginItem` is now registered there
|
|
15
|
+
too (`id: '@goodandready/dsh-agent-loop-guard'`, order 10, static label), with both
|
|
16
|
+
older seats kept as fallbacks.
|
|
17
|
+
- The seat-composition test now expects the list seat and asserts its `id`, static
|
|
18
|
+
`label` and component.
|
|
19
|
+
|
|
20
|
+
## [0.2.11] - 2026-09-18
|
|
21
|
+
|
|
22
|
+
- **Settings reachable again**: the settings card registered into
|
|
23
|
+
`settings.plugin.item`, a slot the current DSH core no longer renders, so the
|
|
24
|
+
guard's settings were unreachable. The surface now registers into the Plugins
|
|
25
|
+
page row seat `plugins.row.config`, keyed
|
|
26
|
+
`@goodandready/dsh-agent-loop-guard#@goodandready/dsh-agent-loop-guard` (row id
|
|
27
|
+
as `cordis.patch.yml` declares it): the plugin's row gains a configure control
|
|
28
|
+
whose page is the settings form (`view: 'page'`, rendered bare — `PluginCard`
|
|
29
|
+
accepts a `bare` prop and drops the card chrome because the host page draws the
|
|
30
|
+
title, icon, crumb and padding) plus a one-line state under the title
|
|
31
|
+
(`view: 'summary'`). The legacy seat stays registered as a fallback for older
|
|
32
|
+
cores.
|
|
33
|
+
- **Row-seat guard** (`test/row-config-seat.test.js`): checks the row key against
|
|
34
|
+
`package.json` and `cordis.patch.yml`, the seat order (row seat first) and the
|
|
35
|
+
bare page render.
|
|
36
|
+
|
|
8
37
|
## [0.2.10] - 2026-09-18
|
|
9
38
|
|
|
10
39
|
- **Documentation & Packaging Architecture**:
|
package/lib/client.js
CHANGED
|
@@ -6,6 +6,12 @@ window.__ModuleLoader__.load({
|
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
7
7
|
const React = require('react');
|
|
8
8
|
const NS = '@goodandready/dsh-agent-loop-guard';
|
|
9
|
+
// Row seat on the Plugins page: the row's "configure" control opens this
|
|
10
|
+
// entry, keyed `<package name>#<row id>` exactly as cordis.patch.yml
|
|
11
|
+
// declares the row (kernel: rowConfigKey(bundle, rowId)).
|
|
12
|
+
const PKG = '@goodandready/dsh-agent-loop-guard';
|
|
13
|
+
const ROW_ID = '@goodandready/dsh-agent-loop-guard';
|
|
14
|
+
const ROW_CONFIG_KEY = PKG + '#' + ROW_ID;
|
|
9
15
|
|
|
10
16
|
let PrimitivesChevron = null;
|
|
11
17
|
try {
|
|
@@ -19,6 +25,11 @@ window.__ModuleLoader__.load({
|
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
const CSS_STYLES = `
|
|
28
|
+
/* Row seat on the Plugins page: the page owns the frame and the padding. */
|
|
29
|
+
.alg-page {
|
|
30
|
+
width: 100%;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
22
33
|
.alg-card {
|
|
23
34
|
border: 1px solid var(--dsw-alias-border-l2);
|
|
24
35
|
background: var(--dsw-alias-bg-layer-3);
|
|
@@ -245,7 +256,7 @@ window.__ModuleLoader__.load({
|
|
|
245
256
|
maxAssistantBlockChars: 16384,
|
|
246
257
|
};
|
|
247
258
|
|
|
248
|
-
function PluginCard({ ctx: _ctx, t }) {
|
|
259
|
+
function PluginCard({ ctx: _ctx, t, bare }) {
|
|
249
260
|
const [expanded, setExpanded] = React.useState(false);
|
|
250
261
|
const [draft, setDraft] = React.useState({
|
|
251
262
|
...DEFAULTS,
|
|
@@ -517,10 +528,7 @@ window.__ModuleLoader__.load({
|
|
|
517
528
|
tt(key)
|
|
518
529
|
);
|
|
519
530
|
|
|
520
|
-
|
|
521
|
-
className: 'alg-card',
|
|
522
|
-
},
|
|
523
|
-
React.createElement('button', {
|
|
531
|
+
const header = React.createElement('button', {
|
|
524
532
|
className: 'alg-header-btn',
|
|
525
533
|
onClick: () => setExpanded(!expanded),
|
|
526
534
|
'aria-expanded': expanded,
|
|
@@ -533,8 +541,8 @@ window.__ModuleLoader__.load({
|
|
|
533
541
|
React.createElement('span', { style: { color: 'var(--dsw-alias-label-secondary)', fontSize: 13 } }, tt('sub'))
|
|
534
542
|
),
|
|
535
543
|
renderChevron()
|
|
536
|
-
)
|
|
537
|
-
|
|
544
|
+
);
|
|
545
|
+
const body = React.createElement('div', {
|
|
538
546
|
className: 'alg-body',
|
|
539
547
|
},
|
|
540
548
|
// Section: One-Click Updater
|
|
@@ -608,8 +616,24 @@ window.__ModuleLoader__.load({
|
|
|
608
616
|
}, saving ? tt('saving') : tt('ready')),
|
|
609
617
|
msg && React.createElement('span', { style: { fontSize: 13, color: msg === tt('saved') || msg === tt('statsResetDone') ? 'var(--dsw-alias-status-success)' : 'var(--dsw-alias-status-danger)' } }, msg)
|
|
610
618
|
)
|
|
611
|
-
)
|
|
612
|
-
|
|
619
|
+
);
|
|
620
|
+
|
|
621
|
+
// The Plugins page renders this entry bare: it draws the title, the icon
|
|
622
|
+
// and the crumb itself, so the row seat must not add a second card frame.
|
|
623
|
+
if (bare) {
|
|
624
|
+
return React.createElement('div', { className: 'alg-page' }, body);
|
|
625
|
+
}
|
|
626
|
+
return React.createElement('li', { className: 'alg-card' }, header, expanded && body);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
// Row seat component: summary one-liner plus the bare form on the page.
|
|
630
|
+
function PluginItem(props) {
|
|
631
|
+
if (props && props.view === 'summary') {
|
|
632
|
+
return React.createElement('div', {
|
|
633
|
+
style: { color: 'var(--dsw-alias-label-secondary)', fontSize: 13 }
|
|
634
|
+
}, en.sub);
|
|
635
|
+
}
|
|
636
|
+
return React.createElement(PluginCard, { ...props, bare: true });
|
|
613
637
|
}
|
|
614
638
|
|
|
615
639
|
exports.inject = ['slots', 'settingsScope', 'locale'];
|
|
@@ -647,6 +671,42 @@ window.__ModuleLoader__.load({
|
|
|
647
671
|
}
|
|
648
672
|
}
|
|
649
673
|
|
|
674
|
+
// Row seat first: the current core renders the Plugins page and opens
|
|
675
|
+
// this entry from the row's configure control. The older seats stay as
|
|
676
|
+
// fallbacks for hosts that only declare them.
|
|
677
|
+
registerSlotWhenReady('plugins.row.config', () =>
|
|
678
|
+
ctx.slots.register(
|
|
679
|
+
{
|
|
680
|
+
name: 'plugins.row.config',
|
|
681
|
+
key: ROW_CONFIG_KEY,
|
|
682
|
+
order: 10,
|
|
683
|
+
locale: NS,
|
|
684
|
+
inject: () => ({ ctx }),
|
|
685
|
+
},
|
|
686
|
+
(props) => React.createElement(PluginItem, { ...props, ctx: (props && props.ctx) || ctx })
|
|
687
|
+
)
|
|
688
|
+
);
|
|
689
|
+
|
|
690
|
+
// List seat (plugins.item): the seat the Plugins page really renders as the
|
|
691
|
+
// plugin's own page with its configuration — the page draws the title, icon
|
|
692
|
+
// and crumb and asks for view 'summary' (the card's one-liner) or view 'page'
|
|
693
|
+
// (the form), both served by PluginItem. The label is a static string on
|
|
694
|
+
// purpose: it is resolved while the page renders, and a locale lookup there
|
|
695
|
+
// would take the whole client batch down with it.
|
|
696
|
+
registerSlotWhenReady('plugins.item', () =>
|
|
697
|
+
ctx.slots.register(
|
|
698
|
+
{
|
|
699
|
+
name: 'plugins.item',
|
|
700
|
+
id: ROW_ID,
|
|
701
|
+
order: 10,
|
|
702
|
+
label: () => 'Agent Loop Guard',
|
|
703
|
+
locale: NS,
|
|
704
|
+
inject: () => ({ ctx }),
|
|
705
|
+
},
|
|
706
|
+
(props) => React.createElement(PluginItem, { ...props, ctx: (props && props.ctx) || ctx })
|
|
707
|
+
)
|
|
708
|
+
);
|
|
709
|
+
|
|
650
710
|
registerSlotWhenReady('settings.plugin.item', () =>
|
|
651
711
|
ctx.slots.register(
|
|
652
712
|
{
|
|
@@ -663,4 +723,4 @@ window.__ModuleLoader__.load({
|
|
|
663
723
|
|
|
664
724
|
return module.exports;
|
|
665
725
|
},
|
|
666
|
-
});
|
|
726
|
+
});
|