@lmzhen/dsh-skill-usage 0.3.63 → 0.3.65
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 +16 -4
- package/lib/types/index.d.ts +1 -0
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -134,7 +134,9 @@ var SkillUsageRegistry = class extends Service {
|
|
|
134
134
|
let outcome = void 0;
|
|
135
135
|
await mutateUsage(this.root, this.io, async (map) => {
|
|
136
136
|
outcome = await task(map);
|
|
137
|
-
})
|
|
137
|
+
}, { onQuarantine: (message) => {
|
|
138
|
+
this.ctx.logger.warn(`skill-usage: ${message}`);
|
|
139
|
+
} });
|
|
138
140
|
return outcome;
|
|
139
141
|
});
|
|
140
142
|
this.chain = run.then(() => void 0, () => void 0);
|
|
@@ -143,9 +145,18 @@ var SkillUsageRegistry = class extends Service {
|
|
|
143
145
|
async record(name, kind, at = /* @__PURE__ */ new Date()) {
|
|
144
146
|
const normalized = name.trim();
|
|
145
147
|
await this.mutate((map) => {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
switch (kind) {
|
|
149
|
+
case "use":
|
|
150
|
+
bumpUse(map, normalized, at);
|
|
151
|
+
break;
|
|
152
|
+
case "view":
|
|
153
|
+
bumpView(map, normalized, at);
|
|
154
|
+
break;
|
|
155
|
+
case "patch":
|
|
156
|
+
bumpPatch(map, normalized, at);
|
|
157
|
+
break;
|
|
158
|
+
default: throw new Error(`skill-usage: unknown record kind ${String(kind)}`);
|
|
159
|
+
}
|
|
149
160
|
});
|
|
150
161
|
}
|
|
151
162
|
/** Read-only snapshot of the sidecar (no disk write — reading never mutates).
|
|
@@ -197,6 +208,7 @@ var SkillUsageRegistry = class extends Service {
|
|
|
197
208
|
* next call without a cache flush; this waits for queued work to drain.
|
|
198
209
|
* V6-44 (0.3.37): test-support API — no production consumer uses it
|
|
199
210
|
* (tests use it as a drain barrier); kept by declaration.
|
|
211
|
+
* @internal Exported for this package's own tests only.
|
|
200
212
|
*/
|
|
201
213
|
async invalidate() {
|
|
202
214
|
await this.chain;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -88,6 +88,7 @@ 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
|
/** P1-1 (v15): write the FEEDBACK-owned quality signal onto the usage
|
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.65",
|
|
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.65"
|
|
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.65"
|
|
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.65",
|
|
46
|
+
"@lmzhen/dsh-evolution-io": "^0.3.65"
|
|
47
47
|
}
|
|
48
48
|
}
|