dsh-agent-persona 0.1.1 → 0.1.3

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 CHANGED
@@ -4,6 +4,38 @@ All notable changes to this project are documented here.
4
4
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.1.3] - 2026-09-23
8
+
9
+ ### Fixed
10
+
11
+ - **The plugin could not load from a registry install.** `src/index.ts` imports `@deepseek-ai/schemastery` for its
12
+ config schema, but `package.json` never declared it — a phantom dependency that npm's flat layout hid (it was
13
+ hoisted from a transitive dependency) and pnpm's isolated layout does not: a package only resolves what its own
14
+ manifest declares. The installed copy therefore threw `ERR_MODULE_NOT_FOUND`, which failed the whole plugin tree
15
+ and stopped `dsh web` from starting. It was declared as a **peer dependency**, which is both what the ecosystem
16
+ does for official `@deepseek-ai/*` packages (`dsh-context` and `dshmarket` declare the same one) and what makes
17
+ the installer link it next to the installed copy next to the peers it already links.
18
+
19
+ This affects every published version so far: 0.1.0, 0.1.1 and 0.1.2 all fail to load from a registry install and
20
+ only worked while the profile resolved the plugin from a source checkout over `link:`.
21
+
22
+ ## [0.1.2] - 2026-09-21
23
+
24
+ ### Fixed
25
+
26
+ - **The sidebar card could be missing after a restart even though the switch showed it on.** The two read
27
+ different sources: the switch shows the store's `prefs.showSidebar` (through the remote view), while the
28
+ registration resolved the sidebar service once, when this plugin applied, and gave up for good if it was not
29
+ there yet. Plugin load order is not guaranteed, so a restart could put this plugin's client half before the
30
+ sidebar plugin's; the card then only came back by toggling the switch by hand. The service is now awaited —
31
+ registered immediately when it is already present, otherwise through `ctx.inject(['betterSidebar'], …)` and
32
+ bound to the arriving context, so it is torn down with the provider. The switch still acts at once.
33
+
34
+ ### Added
35
+
36
+ - A `screenshots.json` in the repository, so storefronts show the three interface screenshots and they can be
37
+ replaced by pushing here rather than by opening a pull request elsewhere.
38
+
7
39
  ## [0.1.1] - 2026-09-20
8
40
 
9
41
  ### Added
@@ -165,5 +197,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
165
197
  - The conversation dialog hides plugin-injected user-side content — `AGENTS.md`, runtime snapshots, the skill
166
198
  catalog, goal rounds — reporting only 「已隐藏 N 条插件注入内容」.
167
199
 
200
+ [0.1.3]: https://github.com/Awoodwhale/dsh-agent-persona/compare/v0.1.2...v0.1.3
201
+ [0.1.2]: https://github.com/Awoodwhale/dsh-agent-persona/compare/v0.1.1...v0.1.2
168
202
  [0.1.1]: https://github.com/Awoodwhale/dsh-agent-persona/compare/v0.1.0...v0.1.1
169
203
  [0.1.0]: https://github.com/Awoodwhale/dsh-agent-persona/releases/tag/v0.1.0
package/lib/client.js CHANGED
@@ -2609,21 +2609,27 @@ ${state.proposal.trim()}
2609
2609
  };
2610
2610
  {
2611
2611
  let disposeTab;
2612
- syncSidebarModule = () => {
2612
+ let sidebarService;
2613
+ const resolveSidebar = (from = void 0) => {
2614
+ try {
2615
+ return (from ?? ctx).get("betterSidebar");
2616
+ } catch {
2617
+ return void 0;
2618
+ }
2619
+ };
2620
+ const dropTab = () => {
2613
2621
  if (typeof disposeTab === "function") {
2614
2622
  disposeTab();
2615
2623
  disposeTab = void 0;
2616
2624
  }
2625
+ };
2626
+ const mountTab = (service) => {
2627
+ sidebarService = service;
2628
+ dropTab();
2617
2629
  if (readPrefs().showSidebar === false) return;
2618
- let better;
2619
- try {
2620
- better = ctx.get("betterSidebar");
2621
- } catch {
2622
- better = void 0;
2623
- }
2624
- sidebarAvailable = better !== void 0 && better !== null && typeof better.registerTab === "function";
2630
+ sidebarAvailable = service !== void 0 && service !== null && typeof service.registerTab === "function";
2625
2631
  if (sidebarAvailable !== true) return;
2626
- disposeTab = better.registerTab({
2632
+ disposeTab = service.registerTab({
2627
2633
  id: NS,
2628
2634
  title: () => "Agent \u4EBA\u8BBE",
2629
2635
  order: 30,
@@ -2631,7 +2637,20 @@ ${state.proposal.trim()}
2631
2637
  component: SidebarPersonaView
2632
2638
  });
2633
2639
  };
2634
- syncSidebarModule();
2640
+ syncSidebarModule = () => mountTab(sidebarService ?? resolveSidebar());
2641
+ const present = resolveSidebar();
2642
+ if (present !== void 0) {
2643
+ mountTab(present);
2644
+ } else if (typeof ctx.inject === "function") {
2645
+ ctx.inject(["betterSidebar"], (sidebarCtx) => {
2646
+ const service = resolveSidebar(sidebarCtx);
2647
+ if (service === void 0) return;
2648
+ sidebarCtx.effect(() => {
2649
+ mountTab(service);
2650
+ return () => dropTab();
2651
+ }, `${NS}: sidebar tab`);
2652
+ });
2653
+ }
2635
2654
  }
2636
2655
  ctx.slots.inject("settings.section", () => ctx.slots.register({
2637
2656
  name: "settings.section",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agent-persona",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Workspace personas for DeepSeek Harness (DSH): create many system-prompt personas and scope each one by workspace path or session id (exact / prefix / regex / contains), managed from a Web settings page with Markdown editing and AI tuning.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -93,6 +93,7 @@
93
93
  "@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-rc.1",
94
94
  "@deepseek-ai/dsh-client-ui-slots": ">=0.1.5-rc.1",
95
95
  "@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.1",
96
+ "@deepseek-ai/schemastery": "^3.18.2",
96
97
  "react": "^18.3.1",
97
98
  "zod": "^4.0.0"
98
99
  },