@kalera/munin-sdk 1.0.4 → 1.0.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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @kalera/munin-sdk@1.0.4 build /home/runner/work/munin-for-agents/munin-for-agents/packages/ts-sdk
2
+ > @kalera/munin-sdk@1.0.6 build /home/runner/work/munin-for-agents/munin-for-agents/packages/ts-sdk
3
3
  > tsc -p tsconfig.json
4
4
 
package/dist/client.js CHANGED
@@ -113,12 +113,16 @@ export class MuninClient {
113
113
  const entities = (kg.entities || []).map((e) => {
114
114
  if (e.embedding)
115
115
  delete e.embedding;
116
- return `${e.name} (${e.type}): ${e.description}`;
116
+ return `${e.label || 'Unknown'} (${e.type || 'Unknown'}): ${e.description || ''}`;
117
117
  });
118
+ // To make relationships readable without doing a separate map lookup,
119
+ // we use the sourceEntityId and targetEntityId directly or map if populated.
118
120
  const relationships = (kg.relationships || []).map((r) => {
119
121
  if (r.embedding)
120
122
  delete r.embedding;
121
- return `${r.source} -[${r.relation}]-> ${r.target}`;
123
+ const source = r.sourceLabel || r.sourceEntityId || 'Unknown';
124
+ const target = r.targetLabel || r.targetEntityId || 'Unknown';
125
+ return `${source} -[${r.type || 'Unknown'}]-> ${target}`;
122
126
  });
123
127
  return {
124
128
  summary: "GraphRAG knowledge formatted for readability",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalera/munin-sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/client.ts CHANGED
@@ -153,12 +153,16 @@ export class MuninClient {
153
153
 
154
154
  const entities = (kg.entities || []).map((e: any) => {
155
155
  if (e.embedding) delete e.embedding;
156
- return `${e.name} (${e.type}): ${e.description}`;
156
+ return `${e.label || 'Unknown'} (${e.type || 'Unknown'}): ${e.description || ''}`;
157
157
  });
158
158
 
159
+ // To make relationships readable without doing a separate map lookup,
160
+ // we use the sourceEntityId and targetEntityId directly or map if populated.
159
161
  const relationships = (kg.relationships || []).map((r: any) => {
160
162
  if (r.embedding) delete r.embedding;
161
- return `${r.source} -[${r.relation}]-> ${r.target}`;
163
+ const source = r.sourceLabel || r.sourceEntityId || 'Unknown';
164
+ const target = r.targetLabel || r.targetEntityId || 'Unknown';
165
+ return `${source} -[${r.type || 'Unknown'}]-> ${target}`;
162
166
  });
163
167
 
164
168
  return {