@ai-ecoverse/slicc-agent 7.6.4 → 7.6.6

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/dist/reports.js CHANGED
@@ -32,7 +32,12 @@ function createReports(now = Date.now, max = REPORTS_MAX) {
32
32
  };
33
33
  kept.unshift(report);
34
34
  kept.length = Math.min(kept.length, max);
35
- for (const listener of listeners) listener(report);
35
+ for (const listener of listeners)
36
+ try {
37
+ listener(report);
38
+ } catch (error2) {
39
+ console.warn(error2);
40
+ }
36
41
  },
37
42
  list: () => [...kept],
38
43
  subscribe(listener) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/reports.ts"],
4
- "sourcesContent": ["import type { ReportInfo } from '@earendil-works/pi-durable';\n\nexport const REPORTS_MAX = 50;\n\nexport interface Report {\n id: string;\n at: number;\n type: ReportInfo['type'];\n message: string;\n conversationId: number | null;\n taskId: number | null;\n source: string | null;\n}\n\nexport interface Reports {\n list(): readonly Report[];\n subscribe(listener: (report: Report) => void): () => void;\n}\n\nexport interface ReportSink extends Reports {\n record(error: unknown, info: ReportInfo): void;\n}\n\nfunction messageOf(error: unknown): string {\n if (error instanceof Error) return error.message;\n return typeof error === 'string' ? error : String(error);\n}\n\nfunction sourceOf(info: ReportInfo): string | null {\n if ('extension' in info && info.extension) return info.extension;\n if (info.type === 'host_error') return info.callback;\n return null;\n}\n\nfunction conversationOf(info: ReportInfo): number | null {\n if ('task' in info && info.task) return Number(info.task.conversationId);\n if (info.type === 'extension_error' && info.conversationId !== undefined)\n return Number(info.conversationId);\n return null;\n}\n\nexport function createReports(now: () => number = Date.now, max = REPORTS_MAX): ReportSink {\n const kept: Report[] = [];\n const listeners = new Set<(report: Report) => void>();\n let next = 0;\n return {\n record(error, info) {\n const task = 'task' in info && info.task ? Number(info.task.id) : null;\n const report: Report = {\n id:\n info.type === 'task_faulted' && task !== null ? `task:${task}` : `report:${(next += 1)}`,\n at: now(),\n type: info.type,\n message: messageOf(error),\n conversationId: conversationOf(info),\n taskId: task,\n source: sourceOf(info),\n };\n kept.unshift(report);\n kept.length = Math.min(kept.length, max);\n for (const listener of listeners) listener(report);\n },\n list: () => [...kept],\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n };\n}\n"],
5
- "mappings": "AAEO,MAAM,cAAc;AAqB3B,SAAS,UAAU,OAAwB;AACzC,MAAI,iBAAiB,MAAO,QAAO,MAAM;AACzC,SAAO,OAAO,UAAU,WAAW,QAAQ,OAAO,KAAK;AACzD;AAEA,SAAS,SAAS,MAAiC;AACjD,MAAI,eAAe,QAAQ,KAAK,UAAW,QAAO,KAAK;AACvD,MAAI,KAAK,SAAS,aAAc,QAAO,KAAK;AAC5C,SAAO;AACT;AAEA,SAAS,eAAe,MAAiC;AACvD,MAAI,UAAU,QAAQ,KAAK,KAAM,QAAO,OAAO,KAAK,KAAK,cAAc;AACvE,MAAI,KAAK,SAAS,qBAAqB,KAAK,mBAAmB;AAC7D,WAAO,OAAO,KAAK,cAAc;AACnC,SAAO;AACT;AAEO,SAAS,cAAc,MAAoB,KAAK,KAAK,MAAM,aAAyB;AACzF,QAAM,OAAiB,CAAC;AACxB,QAAM,YAAY,oBAAI,IAA8B;AACpD,MAAI,OAAO;AACX,SAAO;AAAA,IACL,OAAO,OAAO,MAAM;AAClB,YAAM,OAAO,UAAU,QAAQ,KAAK,OAAO,OAAO,KAAK,KAAK,EAAE,IAAI;AAClE,YAAM,SAAiB;AAAA,QACrB,IACE,KAAK,SAAS,kBAAkB,SAAS,OAAO,QAAQ,IAAI,KAAK,UAAW,QAAQ,CAAE;AAAA,QACxF,IAAI,IAAI;AAAA,QACR,MAAM,KAAK;AAAA,QACX,SAAS,UAAU,KAAK;AAAA,QACxB,gBAAgB,eAAe,IAAI;AAAA,QACnC,QAAQ;AAAA,QACR,QAAQ,SAAS,IAAI;AAAA,MACvB;AACA,WAAK,QAAQ,MAAM;AACnB,WAAK,SAAS,KAAK,IAAI,KAAK,QAAQ,GAAG;AACvC,iBAAW,YAAY,UAAW,UAAS,MAAM;AAAA,IACnD;AAAA,IACA,MAAM,MAAM,CAAC,GAAG,IAAI;AAAA,IACpB,UAAU,UAAU;AAClB,gBAAU,IAAI,QAAQ;AACtB,aAAO,MAAM,UAAU,OAAO,QAAQ;AAAA,IACxC;AAAA,EACF;AACF;",
6
- "names": []
4
+ "sourcesContent": ["import type { ReportInfo } from '@earendil-works/pi-durable';\n\nexport const REPORTS_MAX = 50;\n\nexport interface Report {\n id: string;\n at: number;\n type: ReportInfo['type'];\n message: string;\n conversationId: number | null;\n taskId: number | null;\n source: string | null;\n}\n\nexport interface Reports {\n list(): readonly Report[];\n subscribe(listener: (report: Report) => void): () => void;\n}\n\nexport interface ReportSink extends Reports {\n record(error: unknown, info: ReportInfo): void;\n}\n\nfunction messageOf(error: unknown): string {\n if (error instanceof Error) return error.message;\n return typeof error === 'string' ? error : String(error);\n}\n\nfunction sourceOf(info: ReportInfo): string | null {\n if ('extension' in info && info.extension) return info.extension;\n if (info.type === 'host_error') return info.callback;\n return null;\n}\n\nfunction conversationOf(info: ReportInfo): number | null {\n if ('task' in info && info.task) return Number(info.task.conversationId);\n if (info.type === 'extension_error' && info.conversationId !== undefined)\n return Number(info.conversationId);\n return null;\n}\n\nexport function createReports(now: () => number = Date.now, max = REPORTS_MAX): ReportSink {\n const kept: Report[] = [];\n const listeners = new Set<(report: Report) => void>();\n let next = 0;\n return {\n record(error, info) {\n const task = 'task' in info && info.task ? Number(info.task.id) : null;\n const report: Report = {\n id:\n info.type === 'task_faulted' && task !== null ? `task:${task}` : `report:${(next += 1)}`,\n at: now(),\n type: info.type,\n message: messageOf(error),\n conversationId: conversationOf(info),\n taskId: task,\n source: sourceOf(info),\n };\n kept.unshift(report);\n kept.length = Math.min(kept.length, max);\n for (const listener of listeners)\n try {\n listener(report);\n } catch (error) {\n console.warn(error);\n }\n },\n list: () => [...kept],\n subscribe(listener) {\n list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AAAA,IACA,MAAM,MAAM,CAAC,GAAG,IAAI;AAAA,IACpB,UAAU,UAAU;AAClB,gBAAU,IAAI,QAAQ;AACtB,aAAO,MAAM,UAAU,OAAO,QAAQ;AAAA,IACxC;AAAA,EACF;AACF;",
6
+ "names": ["error"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-agent",
3
- "version": "7.6.4",
3
+ "version": "7.6.6",
4
4
  "description": "SLICC's agent core on pi durable: an agent worker, session storage, remoting and pi extensions",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -65,14 +65,14 @@
65
65
  "release": "semantic-release"
66
66
  },
67
67
  "devDependencies": {
68
- "@ai-ecoverse/slicc-kernel": "1.148.0",
69
- "@ai-ecoverse/slicc-scrub": "1.0.1",
70
- "@ai-ecoverse/slicc-shared-web": "2.11.1",
68
+ "@ai-ecoverse/slicc-kernel": "1.150.1",
69
+ "@ai-ecoverse/slicc-scrub": "1.1.0",
70
+ "@ai-ecoverse/slicc-shared-web": "2.11.3",
71
71
  "@ai-ecoverse/slicc-spectrum": "1.107.1",
72
72
  "@ai-ecoverse/wasi-fnox": "1.39.0-6",
73
73
  "@ai-ecoverse/wasm-bash": "5.3.0-23",
74
74
  "@ai-ecoverse/wasm-coreutils": "9.12.0-15",
75
- "@ai-ecoverse/wasm-git": "2.55.0-20",
75
+ "@ai-ecoverse/wasm-git": "2.55.0-22",
76
76
  "@biomejs/biome": "2.5.15",
77
77
  "@types/node": "24.19.2",
78
78
  "esbuild": "0.28.2",
@@ -95,7 +95,7 @@
95
95
  "@earendil-works/pi-mcp": "1.4.0",
96
96
  "@earendil-works/pi-telemetry": "1.4.0",
97
97
  "@sqlite.org/sqlite-wasm": "3.53.4-build2",
98
- "typebox": "1.3.37"
98
+ "typebox": "1.4.0"
99
99
  },
100
100
  "peerDependencies": {
101
101
  "@ai-ecoverse/slicc-kernel": ">=1.110.0 <2",