@lmzhen/dsh-skill-usage 0.1.0-rc.44 → 0.1.0-rc.46
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 +13 -1
- package/lib/types/index.d.ts +7 -0
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Service } from "@deepseek-ai/cordis";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
|
-
import { bumpPatch, bumpUse, bumpView, evolutionIoAdapter, loadUsage, markAgentCreated, saveUsage, skillsRoot } from "@lmzhen/dsh-evolution-core";
|
|
3
|
+
import { bumpPatch, bumpUse, bumpView, evolutionIoAdapter, getRecord, loadUsage, markAgentCreated, saveUsage, skillsRoot } from "@lmzhen/dsh-evolution-core";
|
|
4
4
|
//#region lib/types/index.js
|
|
5
5
|
/**
|
|
6
6
|
* Skill usage telemetry service for the evolution family.
|
|
@@ -49,6 +49,18 @@ var SkillUsageRegistry = class extends Service {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
+
* Ensure a usage record exists for `name` without bumping any counter
|
|
53
|
+
* (rc.46 M3-3.3 companion): skill creation is authorship — the record must
|
|
54
|
+
* exist from birth (created_at anchors now) but `patch_count` stays 0 so
|
|
55
|
+
* mutation maturity is not inflated by mere creation.
|
|
56
|
+
*/
|
|
57
|
+
async ensureRecord(name) {
|
|
58
|
+
await this.mutate(async (map) => {
|
|
59
|
+
getRecord(map, name);
|
|
60
|
+
await this.flush();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
52
64
|
* Mark a skill's usage record as archived (delete / curator archive paths).
|
|
53
65
|
* Unlike `record('patch')` this never bumps the patch counter — archiving is
|
|
54
66
|
* a state transition, not a content mutation.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -28,6 +28,13 @@ export declare class SkillUsageRegistry extends Service {
|
|
|
28
28
|
record(name: string, kind: 'use' | 'view' | 'patch', at?: Date): Promise<void>;
|
|
29
29
|
report(): Promise<UsageMap>;
|
|
30
30
|
markAgentCreated(name: string): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Ensure a usage record exists for `name` without bumping any counter
|
|
33
|
+
* (rc.46 M3-3.3 companion): skill creation is authorship — the record must
|
|
34
|
+
* exist from birth (created_at anchors now) but `patch_count` stays 0 so
|
|
35
|
+
* mutation maturity is not inflated by mere creation.
|
|
36
|
+
*/
|
|
37
|
+
ensureRecord(name: string): Promise<void>;
|
|
31
38
|
/**
|
|
32
39
|
* Mark a skill's usage record as archived (delete / curator archive paths).
|
|
33
40
|
* Unlike `record('patch')` this never bumps the patch counter — archiving is
|
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.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.46",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
36
|
-
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.
|
|
36
|
+
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.46"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
40
40
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
41
|
-
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.
|
|
41
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.46"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
45
|
-
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.
|
|
46
|
-
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.
|
|
45
|
+
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.46",
|
|
46
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.46"
|
|
47
47
|
}
|
|
48
48
|
}
|