@lmzhen/dsh-skill-usage 0.3.56 → 0.3.58

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.
Files changed (2) hide show
  1. package/lib/index.js +8 -7
  2. package/package.json +5 -5
package/lib/index.js CHANGED
@@ -140,10 +140,11 @@ var SkillUsageRegistry = class extends Service {
140
140
  return run;
141
141
  }
142
142
  async record(name, kind, at = /* @__PURE__ */ new Date()) {
143
+ const normalized = name.trim();
143
144
  await this.mutate((map) => {
144
- if (kind === "use") bumpUse(map, name, at);
145
- else if (kind === "view") bumpView(map, name, at);
146
- else bumpPatch(map, name, at);
145
+ if (kind === "use") bumpUse(map, normalized, at);
146
+ else if (kind === "view") bumpView(map, normalized, at);
147
+ else bumpPatch(map, normalized, at);
147
148
  });
148
149
  }
149
150
  /** Read-only snapshot of the sidecar (no disk write — reading never mutates). */
@@ -154,7 +155,7 @@ var SkillUsageRegistry = class extends Service {
154
155
  }
155
156
  async markAgentCreated(name) {
156
157
  await this.mutate((map) => {
157
- markAgentCreated(map, name);
158
+ markAgentCreated(map, name.trim());
158
159
  });
159
160
  }
160
161
  /**
@@ -167,8 +168,8 @@ var SkillUsageRegistry = class extends Service {
167
168
  */
168
169
  async ensureRecordCreated(name, agentCreated) {
169
170
  await this.mutate((map) => {
170
- if (agentCreated) markAgentCreated(map, name);
171
- else getRecord(map, name);
171
+ if (agentCreated) markAgentCreated(map, name.trim());
172
+ else getRecord(map, name.trim());
172
173
  });
173
174
  }
174
175
  /**
@@ -178,7 +179,7 @@ var SkillUsageRegistry = class extends Service {
178
179
  */
179
180
  async markArchived(name, at = /* @__PURE__ */ new Date()) {
180
181
  await this.mutate((map) => {
181
- const record = map.get(name);
182
+ const record = map.get(name.trim());
182
183
  if (record) {
183
184
  record.state = "archived";
184
185
  record.archived_at = at.toISOString();
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.56",
4
+ "version": "0.3.58",
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.56"
34
+ "@lmzhen/dsh-evolution-core": "^0.3.58"
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.56"
40
+ "@lmzhen/dsh-evolution-io": "^0.3.58"
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.56",
46
- "@lmzhen/dsh-evolution-io": "^0.3.56"
45
+ "@lmzhen/dsh-evolution-core": "^0.3.58",
46
+ "@lmzhen/dsh-evolution-io": "^0.3.58"
47
47
  }
48
48
  }