dsh-mcp-pill 0.2.9 → 0.2.11
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 +5 -1
- package/lib/client.js +47 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,11 @@ Global MCP connection status pill for the DSH web UI — official bundle form
|
|
|
27
27
|
(key `mcp-pill`) on ≤ 0.1.5. Each seat is declared by one host only, so the two
|
|
28
28
|
registrations coexist with no version sniffing and the card always has a home;
|
|
29
29
|
values keep flowing through the single settings transport
|
|
30
|
-
(`settingsScope` on ≤ 0.1.5, `configForms` on ≥ 0.1.7).
|
|
30
|
+
(`settingsScope` on ≤ 0.1.5, `configForms` on ≥ 0.1.7). The same card is also
|
|
31
|
+
registered on the root-scope `settings.section` list seat — identity
|
|
32
|
+
`YOTK · MCP Pill`, id `yotk-mcp-pill`, order `60` — so on a host that declares
|
|
33
|
+
that seat it is a first-class page one click deep in 设置, additive beside the
|
|
34
|
+
row seat and never a gate.
|
|
31
35
|
- `@deepseek-ai/schemastery` is a private `dependencies` entry whose floor must be
|
|
32
36
|
≥ 3.18.4 (`^3.18.4`): the profile hoists an older line (3.18.2) that satisfies a
|
|
33
37
|
lower floor, and an entry whose Config exposes no volatile field is dropped from
|
package/lib/client.js
CHANGED
|
@@ -238,7 +238,13 @@ window.__ModuleLoader__.load({
|
|
|
238
238
|
const scope = props.scope
|
|
239
239
|
const api = props.api
|
|
240
240
|
const [tick, setTick] = React.useState(0)
|
|
241
|
-
|
|
241
|
+
// The collapsible body starts EXPANDED wherever this card renders ALONE —
|
|
242
|
+
// the row seat's `view === 'page'` branch and the `settings.section` page,
|
|
243
|
+
// which both pass `defaultOpen: true`. Collapsed is kept as the default for
|
|
244
|
+
// the legacy ≤ 0.1.5 `settings.plugin.item` seat, because there the card
|
|
245
|
+
// still sits inside the Plugins list of many cards, which is the reason
|
|
246
|
+
// the disclosure existed. The header button below folds it back either way.
|
|
247
|
+
const [open, setOpen] = React.useState(props.defaultOpen === true)
|
|
242
248
|
const [staged, setStaged] = React.useState({})
|
|
243
249
|
const [saving, setSaving] = React.useState(false)
|
|
244
250
|
const [failed, setFailed] = React.useState(false)
|
|
@@ -996,11 +1002,50 @@ window.__ModuleLoader__.load({
|
|
|
996
1002
|
if (props && props.view === 'summary') {
|
|
997
1003
|
return e('span', { className: 'dmpRowSummary' }, '显示状态胶囊开关(默认关闭)')
|
|
998
1004
|
}
|
|
999
|
-
|
|
1005
|
+
// view === 'page': this card is the whole page, so it starts expanded.
|
|
1006
|
+
return e(SettingsCard, { scope, api, defaultOpen: true })
|
|
1000
1007
|
})))
|
|
1001
1008
|
}
|
|
1002
1009
|
ctx.inject(['slots'], registerRowConfig)
|
|
1003
1010
|
|
|
1011
|
+
// ── additive seat: the `settings.section` page ─────────────────────────
|
|
1012
|
+
//
|
|
1013
|
+
// 0.1.7-rc.2 also declares the root-scope LIST slot `settings.section`
|
|
1014
|
+
// ("one settings page per list entry"), which puts this same card one
|
|
1015
|
+
// click deep inside 设置 as a first-class page of its own. It is purely
|
|
1016
|
+
// ADDITIVE: the row seat above stays the bundle row's configuration, and
|
|
1017
|
+
// both render the SAME `SettingsCard` through the SAME single transport —
|
|
1018
|
+
// no second settings UI and no second read/write path.
|
|
1019
|
+
//
|
|
1020
|
+
// The seat declares exactly three registrant options — `id` (required),
|
|
1021
|
+
// `order`, `label` — so only those travel here. `label` is a THUNK, like
|
|
1022
|
+
// every label the catalog projects: the shell re-reads it on each
|
|
1023
|
+
// projection instead of caching registrant-localized text.
|
|
1024
|
+
//
|
|
1025
|
+
// Same non-gating shape as the row seat: `slots` is awaited with
|
|
1026
|
+
// `ctx.inject(['slots'], cb)`, the callback RETURNS the registration
|
|
1027
|
+
// disposer, and that disposer is pushed onto disposeSlots so the entry is
|
|
1028
|
+
// owned by the registering fiber and released with the rest on stop /
|
|
1029
|
+
// update / HMR. The seat is host-version dependent — a host that does not
|
|
1030
|
+
// declare it simply never fires the inner `slots.inject`, so this
|
|
1031
|
+
// registration can never gate the plugin.
|
|
1032
|
+
const registerSettingsSection = (sctx) => {
|
|
1033
|
+
disposeSlots.push(sctx.slots.inject('settings.section', () => sctx.slots.register({
|
|
1034
|
+
name: 'settings.section',
|
|
1035
|
+
id: 'yotk-mcp-pill',
|
|
1036
|
+
order: 60,
|
|
1037
|
+
label: () => 'YOTK · MCP Pill',
|
|
1038
|
+
}, function McpPillSettingsSection() {
|
|
1039
|
+
// The section owner shares `close` and nothing else; this card needs
|
|
1040
|
+
// neither `close` nor the host-owned optional `form` prop, because
|
|
1041
|
+
// values keep flowing through the one resolved transport — so the
|
|
1042
|
+
// page branch is literally the row seat's `view === 'page'` render,
|
|
1043
|
+
// including `defaultOpen: true`: one card alone on the page.
|
|
1044
|
+
return e(SettingsCard, { scope, api, defaultOpen: true })
|
|
1045
|
+
})))
|
|
1046
|
+
}
|
|
1047
|
+
ctx.inject(['slots'], registerSettingsSection)
|
|
1048
|
+
|
|
1004
1049
|
// Pill: fully lifecycle-owned as before, but created hidden — the gate
|
|
1005
1050
|
// inside startPill reveals it only while /status reports pill.enabled
|
|
1006
1051
|
// === true (default off). The getter is re-read on every refresh, so the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mcp-pill",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "EN: Lifecycle-safe MCP status pill and Settings card for DeepSeek Harness Web. ZH: 面向 DeepSeek Harness Web 的生命周期安全 MCP 状态胶囊与设置卡片。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|