@lmzhen/dsh-skill-usage 0.3.62 → 0.3.64
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/lib/index.js +25 -7
- package/lib/types/index.d.ts +11 -2
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -143,9 +143,18 @@ var SkillUsageRegistry = class extends Service {
|
|
|
143
143
|
async record(name, kind, at = /* @__PURE__ */ new Date()) {
|
|
144
144
|
const normalized = name.trim();
|
|
145
145
|
await this.mutate((map) => {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
switch (kind) {
|
|
147
|
+
case "use":
|
|
148
|
+
bumpUse(map, normalized, at);
|
|
149
|
+
break;
|
|
150
|
+
case "view":
|
|
151
|
+
bumpView(map, normalized, at);
|
|
152
|
+
break;
|
|
153
|
+
case "patch":
|
|
154
|
+
bumpPatch(map, normalized, at);
|
|
155
|
+
break;
|
|
156
|
+
default: throw new Error(`skill-usage: unknown record kind ${String(kind)}`);
|
|
157
|
+
}
|
|
149
158
|
});
|
|
150
159
|
}
|
|
151
160
|
/** Read-only snapshot of the sidecar (no disk write — reading never mutates).
|
|
@@ -197,18 +206,27 @@ var SkillUsageRegistry = class extends Service {
|
|
|
197
206
|
* next call without a cache flush; this waits for queued work to drain.
|
|
198
207
|
* V6-44 (0.3.37): test-support API — no production consumer uses it
|
|
199
208
|
* (tests use it as a drain barrier); kept by declaration.
|
|
209
|
+
* @internal Exported for this package's own tests only.
|
|
200
210
|
*/
|
|
201
211
|
async invalidate() {
|
|
202
212
|
await this.chain;
|
|
203
213
|
}
|
|
204
|
-
/**
|
|
205
|
-
|
|
214
|
+
/** P1-1 (v15): write the FEEDBACK-owned quality signal onto the usage
|
|
215
|
+
* sidecar. Renamed from `setQuality` (it no longer writes the fields the
|
|
216
|
+
* name claims): the curator's six-factor `scoreTree` overwrites
|
|
217
|
+
* `quality_score`/`quality_warn` on every run BEFORE the lifecycle engine
|
|
218
|
+
* reads them, so feedback written to those fields was a dead channel — the
|
|
219
|
+
* value never survived to a decision. The lifecycle engine and the scope
|
|
220
|
+
* view now read the union `quality_warn || feedback_warn`, so a negative
|
|
221
|
+
* feedback is decision-relevant again. Field-ownership contract: see
|
|
222
|
+
* `UsageRecord` in evolution-core/usage.ts. */
|
|
223
|
+
async setFeedbackQuality(name, score, warn) {
|
|
206
224
|
const normalized = name.trim();
|
|
207
225
|
await this.mutate((map) => {
|
|
208
226
|
const record = map.get(normalized);
|
|
209
227
|
if (!record) return;
|
|
210
|
-
record.
|
|
211
|
-
record.
|
|
228
|
+
record.feedback_score = score;
|
|
229
|
+
record.feedback_warn = warn;
|
|
212
230
|
});
|
|
213
231
|
}
|
|
214
232
|
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -88,10 +88,19 @@ export declare class SkillUsageRegistry extends Service {
|
|
|
88
88
|
* next call without a cache flush; this waits for queued work to drain.
|
|
89
89
|
* V6-44 (0.3.37): test-support API — no production consumer uses it
|
|
90
90
|
* (tests use it as a drain barrier); kept by declaration.
|
|
91
|
+
* @internal Exported for this package's own tests only.
|
|
91
92
|
*/
|
|
92
93
|
invalidate(): Promise<void>;
|
|
93
|
-
/**
|
|
94
|
-
|
|
94
|
+
/** P1-1 (v15): write the FEEDBACK-owned quality signal onto the usage
|
|
95
|
+
* sidecar. Renamed from `setQuality` (it no longer writes the fields the
|
|
96
|
+
* name claims): the curator's six-factor `scoreTree` overwrites
|
|
97
|
+
* `quality_score`/`quality_warn` on every run BEFORE the lifecycle engine
|
|
98
|
+
* reads them, so feedback written to those fields was a dead channel — the
|
|
99
|
+
* value never survived to a decision. The lifecycle engine and the scope
|
|
100
|
+
* view now read the union `quality_warn || feedback_warn`, so a negative
|
|
101
|
+
* feedback is decision-relevant again. Field-ownership contract: see
|
|
102
|
+
* `UsageRecord` in evolution-core/usage.ts. */
|
|
103
|
+
setFeedbackQuality(name: string, score: number, warn: boolean): Promise<void>;
|
|
95
104
|
}
|
|
96
105
|
export default SkillUsageRegistry;
|
|
97
106
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-skill-usage",
|
|
3
3
|
"description": "Skill usage telemetry service (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.64",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.3.64"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
38
38
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
39
39
|
"@deepseek-ai/dsh-session": "^0.1.1-rc.2",
|
|
40
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
40
|
+
"@lmzhen/dsh-evolution-io": "^0.3.64"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
44
44
|
"@deepseek-ai/dsh-session": "^0.1.1-rc.2",
|
|
45
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
46
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
45
|
+
"@lmzhen/dsh-evolution-core": "^0.3.64",
|
|
46
|
+
"@lmzhen/dsh-evolution-io": "^0.3.64"
|
|
47
47
|
}
|
|
48
48
|
}
|