dsh-skill-gate 0.1.0 → 0.1.1

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
@@ -6,6 +6,23 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.1] — 2026-11-19
10
+
11
+ ### Fixed
12
+
13
+ - **Fix: `apply()` threw `cannot set property "skillGate" without provide`, which left
14
+ the plugin fully inert while the host booted normally.** 0.1.0 attached a read-only
15
+ `ctx.skillGate` view at the end of `apply()`. A Cordis context is managed, so an
16
+ undeclared property assignment throws; `apply()` aborted before either hook was
17
+ registered, the host printed one warning and every session ran with an unfiltered
18
+ catalog. The view is gone — `apply()` now touches nothing but `ctx.on` and
19
+ `ctx.tools`, and two tests hold that line: one drives a proxy that rejects
20
+ undeclared writes the way Cordis does, one asserts `apply()` adds no key to `ctx`.
21
+
22
+ ### Note
23
+
24
+ - 0.1.0 was never used in a desktop profile; this release supersedes it.
25
+
9
26
  ## [0.1.0] — 2026-11-19
10
27
 
11
28
  First release. Per-preset skill filtering for the DSH host: a hidden skill does
@@ -57,5 +74,6 @@ module (7-cell matrix, catalog rotation, 4 mutations, anti-self-proof run — se
57
74
  been captured on a live host yet**; see `cangku/261119_k4m_skillgate_report.md`
58
75
  for which acceptance items are measured and which are open.
59
76
 
60
- [Unreleased]: https://example.invalid/dsh-skill-gate/compare/v0.1.0...HEAD
77
+ [Unreleased]: https://example.invalid/dsh-skill-gate/compare/v0.1.1...HEAD
78
+ [0.1.1]: https://example.invalid/dsh-skill-gate/releases/tag/v0.1.1
61
79
  [0.1.0]: https://example.invalid/dsh-skill-gate/releases/tag/v0.1.0
package/README.md CHANGED
@@ -14,7 +14,9 @@ to call it.
14
14
  Your lists are your own. Nothing ships pre-configured, and per-preset setup is
15
15
  the whole point — a saving only exists after you write a list.
16
16
 
17
- > **Status: 0.1.0, not yet verified on a live host.** The filtering behaviour is
17
+ > **Status: 0.1.1, not yet verified end-to-end on a live host.** 0.1.0 crashed
18
+ > inside `apply()` (an undeclared `ctx` property write) and was fully inert; that is
19
+ > fixed here and pinned by two tests. The filtering behaviour is
18
20
  > measured against the real `@deepseek-ai/dsh-tool-skill` module
19
21
  > (`cangku/261119_k4m_skillgate_report.md`); end-to-end first-turn byte savings
20
22
  > have not been captured on a real session yet. Every number in these docs is
package/README.zh.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  名单是你自己的事。插件不预置任何名单,省下的字节只在你写完名单之后才存在。
8
8
 
9
- > **状态:0.1.0,尚未在真机宿主上验收。** 过滤行为已对着真的 `@deepseek-ai/dsh-tool-skill` 模块测过(`cangku/261119_k4m_skillgate_report.md`);端到端的首轮字节节省还没有在真会话里采到。本文里的每个数字都注明了出自哪份证据文件。
9
+ > **状态:0.1.1,尚未完成真机端到端验收。** 0.1.0 在 `apply()` 里对未声明的 ctx 属性赋值直接抛错,插件完全没生效;本版已修并由两条测试钉住。 过滤行为已对着真的 `@deepseek-ai/dsh-tool-skill` 模块测过(`cangku/261119_k4m_skillgate_report.md`);端到端的首轮字节节省还没有在真会话里采到。本文里的每个数字都注明了出自哪份证据文件。
10
10
 
11
11
  ## 一、它做什么
12
12
 
package/index.js CHANGED
@@ -41,7 +41,6 @@ import {
41
41
  dshHomeOf,
42
42
  filterCatalogText,
43
43
  guardVerdict,
44
- isHiddenByPolicy,
45
44
  resolvePresetPolicy,
46
45
  } from "./lib/policy.js";
47
46
 
@@ -161,10 +160,9 @@ export function apply(ctx, config = {}) {
161
160
  const releaseGuard = ctx.tools.guard((exec) => guardVerdict(exec, policyOf, hiddenReason));
162
161
  if (typeof releaseGuard === "function") ctx.effect?.(() => releaseGuard);
163
162
 
164
- // Read-only view for an operator poking at a live host; it registers no tool.
165
- ctx.skillGate = {
166
- configFile,
167
- policyOf,
168
- isHiddenByPolicy,
169
- };
163
+ // Nothing else may be attached to ctx. A Cordis context is managed: an undeclared
164
+ // property assignment throws "cannot set property X without provide" from inside
165
+ // apply(), which leaves the plugin COMPLETELY inert while the host boots and logs
166
+ // only one warning (0.1.0 shipped exactly that bug). Everything this plugin needs
167
+ // stays local to apply().
170
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-skill-gate",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "description": "Hide skills per agent preset: a filtered skill catalog for the model, and a refused `skill` call for what is hidden. Ships with no list — installing it changes nothing until you write skill-gate.json.",
6
6
  "license": "MIT",