@blackbelt-technology/pi-dashboard-session-distiller 0.11.0 → 0.12.0

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/package.json +1 -1
  2. package/src/signals.ts +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blackbelt-technology/pi-dashboard-session-distiller",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Offline miner: distill reusable artifacts from pi session JSONL logs",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/signals.ts CHANGED
@@ -34,7 +34,13 @@ function slug(s: string): string {
34
34
  return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 48);
35
35
  }
36
36
 
37
- function errorClass(text: string): string {
37
+ /**
38
+ * Coarse error class of a tool-result text (`enoent`, `not-found`, first-line
39
+ * slug). Exported for sim-extension failure signatures `err:<tool>:<class>`;
40
+ * changing it changes every recorded signature. See change:
41
+ * add-self-improvement-memory.
42
+ */
43
+ export function errorClass(text: string): string {
38
44
  const m = text.match(/\b(ENOENT|EACCES|cannot find module|not found|undefined|type ?error|syntax ?error|permission denied|timeout)\b/i);
39
45
  if (m) return slug(m[1]);
40
46
  return slug(text.split(/[:\n]/)[0] ?? text).slice(0, 24);