@pellux/goodvibes-sdk 0.26.6 → 0.26.7
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/_internal/platform/knowledge/extractors.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/extractors.js +26 -2
- package/dist/_internal/platform/knowledge/home-graph/helpers.d.ts +2 -7
- package/dist/_internal/platform/knowledge/home-graph/helpers.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/helpers.js +0 -54
- package/dist/_internal/platform/knowledge/home-graph/search.d.ts +13 -0
- package/dist/_internal/platform/knowledge/home-graph/search.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/home-graph/search.js +136 -0
- package/dist/_internal/platform/knowledge/home-graph/service.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/service.js +4 -3
- package/dist/_internal/platform/knowledge/home-graph/state.d.ts +4 -1
- package/dist/_internal/platform/knowledge/home-graph/state.d.ts.map +1 -1
- package/dist/_internal/platform/version.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractors.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/knowledge/extractors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"extractors.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/knowledge/extractors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAI5D,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AA6hBD,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,EAC9D,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,yBAAyB,CAAC,CA4CpC"}
|
|
@@ -2,6 +2,7 @@ import JSZip from 'jszip';
|
|
|
2
2
|
import { extname } from 'node:path';
|
|
3
3
|
import { guessMimeType } from '../artifacts/types.js';
|
|
4
4
|
import { extractReadableHtml } from './html-readability.js';
|
|
5
|
+
const MAX_STRUCTURE_SEARCH_TEXT_CHARS = 128 * 1024;
|
|
5
6
|
function decodeHtmlEntities(value) {
|
|
6
7
|
return value
|
|
7
8
|
.replace(/ /g, ' ')
|
|
@@ -29,6 +30,18 @@ function cleanText(value) {
|
|
|
29
30
|
.replace(/[ \t]{2,}/g, ' ')
|
|
30
31
|
.trim();
|
|
31
32
|
}
|
|
33
|
+
function searchTextPayload(value) {
|
|
34
|
+
const cleaned = cleanText(value);
|
|
35
|
+
if (!cleaned)
|
|
36
|
+
return undefined;
|
|
37
|
+
return cleaned.length <= MAX_STRUCTURE_SEARCH_TEXT_CHARS
|
|
38
|
+
? cleaned
|
|
39
|
+
: cleaned.slice(0, MAX_STRUCTURE_SEARCH_TEXT_CHARS);
|
|
40
|
+
}
|
|
41
|
+
function searchTextStructure(value) {
|
|
42
|
+
const searchText = searchTextPayload(value);
|
|
43
|
+
return searchText ? { searchText } : {};
|
|
44
|
+
}
|
|
32
45
|
function estimateTokens(...chunks) {
|
|
33
46
|
const total = chunks
|
|
34
47
|
.filter((value) => typeof value === 'string')
|
|
@@ -103,6 +116,7 @@ function extractHtml(buffer) {
|
|
|
103
116
|
headings: readable.headings,
|
|
104
117
|
readableLength: readable.length,
|
|
105
118
|
paragraphSampleCount: readable.paragraphSamples.length,
|
|
119
|
+
...searchTextStructure(readable.textContent),
|
|
106
120
|
},
|
|
107
121
|
metadata: {
|
|
108
122
|
paragraphSamples: readable.paragraphSamples.slice(0, 4),
|
|
@@ -135,6 +149,7 @@ function extractHtml(buffer) {
|
|
|
135
149
|
headings,
|
|
136
150
|
paragraphCount: paragraphs.length,
|
|
137
151
|
readableLength: readable.length,
|
|
152
|
+
...searchTextStructure(readable),
|
|
138
153
|
},
|
|
139
154
|
metadata: {
|
|
140
155
|
paragraphSamples: paragraphs.slice(0, 4),
|
|
@@ -161,6 +176,7 @@ function extractTextLike(buffer, format, extractorId) {
|
|
|
161
176
|
structure: {
|
|
162
177
|
lineCount: lines.length,
|
|
163
178
|
headingCount: headings.length,
|
|
179
|
+
...searchTextStructure(text),
|
|
164
180
|
},
|
|
165
181
|
metadata: {},
|
|
166
182
|
};
|
|
@@ -189,6 +205,7 @@ function extractJson(buffer) {
|
|
|
189
205
|
rootType: Array.isArray(parsed) ? 'array' : typeof parsed,
|
|
190
206
|
rootKeys,
|
|
191
207
|
itemCount: Array.isArray(parsed) ? parsed.length : undefined,
|
|
208
|
+
...searchTextStructure(text),
|
|
192
209
|
},
|
|
193
210
|
metadata: {},
|
|
194
211
|
};
|
|
@@ -251,6 +268,7 @@ function extractDelimited(buffer, delimiter, format) {
|
|
|
251
268
|
headers,
|
|
252
269
|
sampleRows: rows,
|
|
253
270
|
rowCountSampled: rows.length,
|
|
271
|
+
...searchTextStructure(text),
|
|
254
272
|
},
|
|
255
273
|
metadata: {},
|
|
256
274
|
};
|
|
@@ -268,7 +286,7 @@ function extractXml(buffer) {
|
|
|
268
286
|
sections: tags,
|
|
269
287
|
links: uniqueStrings(Array.from(text.matchAll(/\bhttps?:\/\/[^\s"'<]+/g), (match) => match[0]), 50),
|
|
270
288
|
estimatedTokens: estimateTokens(readable),
|
|
271
|
-
structure: { tags },
|
|
289
|
+
structure: { tags, ...searchTextStructure(readable) },
|
|
272
290
|
metadata: {},
|
|
273
291
|
};
|
|
274
292
|
}
|
|
@@ -284,7 +302,7 @@ function extractYaml(buffer) {
|
|
|
284
302
|
sections: keys.length > 0 ? keys : uniqueStrings(text.split(/\n+/), 8),
|
|
285
303
|
links: uniqueStrings(Array.from(text.matchAll(/\bhttps?:\/\/[^\s"']+/g), (match) => match[0]), 50),
|
|
286
304
|
estimatedTokens: estimateTokens(text),
|
|
287
|
-
structure: { keys },
|
|
305
|
+
structure: { keys, ...searchTextStructure(text) },
|
|
288
306
|
metadata: {},
|
|
289
307
|
};
|
|
290
308
|
}
|
|
@@ -310,6 +328,8 @@ function extractPdf(buffer) {
|
|
|
310
328
|
}
|
|
311
329
|
}
|
|
312
330
|
const combined = uniqueStrings(texts, 64).join('\n');
|
|
331
|
+
const searchable = uniqueStrings(texts, 512).join('\n');
|
|
332
|
+
const searchText = searchTextPayload(searchable);
|
|
313
333
|
return {
|
|
314
334
|
extractorId: 'pdf',
|
|
315
335
|
format: 'pdf',
|
|
@@ -321,6 +341,7 @@ function extractPdf(buffer) {
|
|
|
321
341
|
estimatedTokens: estimateTokens(combined),
|
|
322
342
|
structure: {
|
|
323
343
|
extractedStringCount: texts.length,
|
|
344
|
+
...(searchText ? { searchText } : {}),
|
|
324
345
|
},
|
|
325
346
|
metadata: {
|
|
326
347
|
limitations: texts.length === 0
|
|
@@ -356,6 +377,7 @@ async function extractDocx(buffer) {
|
|
|
356
377
|
structure: {
|
|
357
378
|
paragraphCount: paragraphs.length,
|
|
358
379
|
headingCount: headings.length,
|
|
380
|
+
...searchTextStructure(text),
|
|
359
381
|
},
|
|
360
382
|
metadata: {},
|
|
361
383
|
};
|
|
@@ -411,6 +433,7 @@ async function extractXlsx(buffer) {
|
|
|
411
433
|
structure: {
|
|
412
434
|
sheetNames,
|
|
413
435
|
sampleSheets,
|
|
436
|
+
...searchTextStructure(flatText),
|
|
414
437
|
},
|
|
415
438
|
metadata: {},
|
|
416
439
|
};
|
|
@@ -447,6 +470,7 @@ async function extractPptx(buffer) {
|
|
|
447
470
|
structure: {
|
|
448
471
|
slideCount: slides.length,
|
|
449
472
|
slides: slides.slice(0, 6),
|
|
473
|
+
...searchTextStructure(combined),
|
|
450
474
|
},
|
|
451
475
|
metadata: {},
|
|
452
476
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { KnowledgeEdgeRecord, KnowledgeNodeKind,
|
|
2
|
-
import type { HomeGraphKnowledgeTarget, HomeGraphNodeKind, HomeGraphObjectInput, HomeGraphObjectKind,
|
|
1
|
+
import type { KnowledgeEdgeRecord, KnowledgeNodeKind, KnowledgeReferenceKind, KnowledgeIssueUpsertInput } from '../types.js';
|
|
2
|
+
import type { HomeGraphKnowledgeTarget, HomeGraphNodeKind, HomeGraphObjectInput, HomeGraphObjectKind, HomeGraphSpaceInput } from './types.js';
|
|
3
3
|
export declare const HOME_GRAPH_CONNECTOR_ID = "homeassistant";
|
|
4
4
|
export declare function resolveHomeGraphSpace(input?: HomeGraphSpaceInput): {
|
|
5
5
|
readonly spaceId: string;
|
|
@@ -26,11 +26,6 @@ export declare function edgeIsActive(edge: KnowledgeEdgeRecord): boolean;
|
|
|
26
26
|
export declare function belongsToSpace(record: {
|
|
27
27
|
readonly metadata?: Record<string, unknown>;
|
|
28
28
|
} | undefined | null, spaceId: string): boolean;
|
|
29
|
-
export declare function scoreHomeGraphResults(query: string, sources: readonly KnowledgeSourceRecord[], nodes: readonly KnowledgeNodeRecord[], extractionBySourceId: (sourceId: string) => {
|
|
30
|
-
readonly summary?: string;
|
|
31
|
-
readonly excerpt?: string;
|
|
32
|
-
readonly sections: readonly string[];
|
|
33
|
-
} | null, limit: number): HomeGraphSearchResult[];
|
|
34
29
|
export declare function targetToReference(target: HomeGraphKnowledgeTarget): {
|
|
35
30
|
readonly kind: KnowledgeReferenceKind;
|
|
36
31
|
readonly id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAEjB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AASrB,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAwBvD,wBAAgB,qBAAqB,CAAC,KAAK,GAAE,mBAAwB,GAAG;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC,CAWA;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,iBAAiB,CAG3G;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,CAElF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM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Q,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEnI;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,wBAAwB,GAAG;IACnE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC,CAQA;AAED,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAChE,yBAAyB,CAa3B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,MAAM,CAE7D;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,MAAM,EAAE,CAUnF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAElE;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,mBAAmB,GAAG,iBAAiB,EAC7C,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpD,oBAAoB,CAyDtB"}
|
|
@@ -122,54 +122,6 @@ export function edgeIsActive(edge) {
|
|
|
122
122
|
export function belongsToSpace(record, spaceId) {
|
|
123
123
|
return record ? getKnowledgeSpaceId(record) === normalizeKnowledgeSpaceId(spaceId) : false;
|
|
124
124
|
}
|
|
125
|
-
export function scoreHomeGraphResults(query, sources, nodes, extractionBySourceId, limit) {
|
|
126
|
-
const tokens = tokenize(query);
|
|
127
|
-
if (tokens.length === 0)
|
|
128
|
-
return [];
|
|
129
|
-
const sourceResults = sources.map((source) => {
|
|
130
|
-
const extraction = extractionBySourceId(source.id);
|
|
131
|
-
const haystack = [
|
|
132
|
-
source.title ?? '',
|
|
133
|
-
source.summary ?? '',
|
|
134
|
-
source.description ?? '',
|
|
135
|
-
source.sourceUri ?? '',
|
|
136
|
-
source.tags.join(' '),
|
|
137
|
-
extraction?.summary ?? '',
|
|
138
|
-
extraction?.excerpt ?? '',
|
|
139
|
-
extraction?.sections.join(' ') ?? '',
|
|
140
|
-
].join(' ').toLowerCase();
|
|
141
|
-
const baseScore = scoreHaystack(haystack, tokens);
|
|
142
|
-
return {
|
|
143
|
-
kind: 'source',
|
|
144
|
-
id: source.id,
|
|
145
|
-
score: baseScore > 0 ? baseScore + (extraction ? 8 : 0) : 0,
|
|
146
|
-
title: source.title ?? source.sourceUri ?? source.id,
|
|
147
|
-
summary: extraction?.summary ?? source.summary,
|
|
148
|
-
source,
|
|
149
|
-
};
|
|
150
|
-
});
|
|
151
|
-
const nodeResults = nodes.map((node) => {
|
|
152
|
-
const haystack = [
|
|
153
|
-
node.title,
|
|
154
|
-
node.summary ?? '',
|
|
155
|
-
node.aliases.join(' '),
|
|
156
|
-
JSON.stringify(node.metadata),
|
|
157
|
-
].join(' ').toLowerCase();
|
|
158
|
-
const baseScore = scoreHaystack(haystack, tokens);
|
|
159
|
-
return {
|
|
160
|
-
kind: 'node',
|
|
161
|
-
id: node.id,
|
|
162
|
-
score: baseScore > 0 ? baseScore + Math.round(node.confidence / 20) : 0,
|
|
163
|
-
title: node.title,
|
|
164
|
-
summary: node.summary,
|
|
165
|
-
node,
|
|
166
|
-
};
|
|
167
|
-
});
|
|
168
|
-
return [...sourceResults, ...nodeResults]
|
|
169
|
-
.filter((entry) => entry.score > 0)
|
|
170
|
-
.sort((a, b) => b.score - a.score || a.id.localeCompare(b.id))
|
|
171
|
-
.slice(0, Math.max(1, limit));
|
|
172
|
-
}
|
|
173
125
|
export function targetToReference(target) {
|
|
174
126
|
if (target.kind === 'source')
|
|
175
127
|
return { kind: 'source', id: target.id };
|
|
@@ -327,9 +279,3 @@ function buildObjectSummary(object) {
|
|
|
327
279
|
]);
|
|
328
280
|
return parts.length > 0 ? parts.join(' - ') : undefined;
|
|
329
281
|
}
|
|
330
|
-
function tokenize(value) {
|
|
331
|
-
return value.toLowerCase().split(/[^a-z0-9_.:-]+/).map((entry) => entry.trim()).filter(Boolean);
|
|
332
|
-
}
|
|
333
|
-
function scoreHaystack(haystack, tokens) {
|
|
334
|
-
return tokens.reduce((score, token) => score + (haystack.includes(token) ? 10 : 0), 0);
|
|
335
|
-
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { KnowledgeStore } from '../store.js';
|
|
2
|
+
import type { KnowledgeEdgeRecord, KnowledgeExtractionRecord, KnowledgeNodeRecord, KnowledgeSourceRecord } from '../types.js';
|
|
3
|
+
import type { HomeGraphSearchResult } from './types.js';
|
|
4
|
+
export interface HomeGraphSearchState {
|
|
5
|
+
readonly spaceId: string;
|
|
6
|
+
readonly sources: readonly KnowledgeSourceRecord[];
|
|
7
|
+
readonly nodes: readonly KnowledgeNodeRecord[];
|
|
8
|
+
readonly edges: readonly KnowledgeEdgeRecord[];
|
|
9
|
+
readonly extractionBySourceId: ReadonlyMap<string, KnowledgeExtractionRecord>;
|
|
10
|
+
}
|
|
11
|
+
export declare function readHomeGraphSearchState(store: KnowledgeStore, spaceId: string): HomeGraphSearchState;
|
|
12
|
+
export declare function scoreHomeGraphResults(query: string, sources: readonly KnowledgeSourceRecord[], nodes: readonly KnowledgeNodeRecord[], extractionBySourceId: (sourceId: string) => KnowledgeExtractionRecord | null | undefined, limit: number): HomeGraphSearchResult[];
|
|
13
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAMxD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC/C,QAAQ,CAAC,oBAAoB,EAAE,WAAW,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;CAC/E;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAqBrG;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,qBAAqB,EAAE,EACzC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,yBAAyB,GAAG,IAAI,GAAG,SAAS,EACxF,KAAK,EAAE,MAAM,GACZ,qBAAqB,EAAE,CA+CzB"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { belongsToSpace, edgeIsActive, readRecord } from './helpers.js';
|
|
2
|
+
const MAX_FIELD_CHARS = 4_096;
|
|
3
|
+
const MAX_SECTION_COUNT = 32;
|
|
4
|
+
const MAX_SEARCH_TEXT_CHARS = 64 * 1024;
|
|
5
|
+
export function readHomeGraphSearchState(store, spaceId) {
|
|
6
|
+
const sources = store.listSources(10_000).filter((source) => belongsToSpace(source, spaceId));
|
|
7
|
+
const nodes = store.listNodes(10_000).filter((node) => belongsToSpace(node, spaceId));
|
|
8
|
+
const sourceIds = new Set(sources.map((source) => source.id));
|
|
9
|
+
const nodeIds = new Set(nodes.map((node) => node.id));
|
|
10
|
+
const edges = store.listEdges().filter((edge) => (edgeIsActive(edge)
|
|
11
|
+
&& belongsToSpace(edge, spaceId)
|
|
12
|
+
&& (edge.fromKind !== 'source' || sourceIds.has(edge.fromId))
|
|
13
|
+
&& (edge.toKind !== 'source' || sourceIds.has(edge.toId))
|
|
14
|
+
&& (edge.fromKind !== 'node' || nodeIds.has(edge.fromId))
|
|
15
|
+
&& (edge.toKind !== 'node' || nodeIds.has(edge.toId))));
|
|
16
|
+
const extractionBySourceId = new Map();
|
|
17
|
+
for (const extraction of store.listExtractions(10_000)) {
|
|
18
|
+
if (!sourceIds.has(extraction.sourceId) && !belongsToSpace(extraction, spaceId))
|
|
19
|
+
continue;
|
|
20
|
+
if (!extractionBySourceId.has(extraction.sourceId)) {
|
|
21
|
+
extractionBySourceId.set(extraction.sourceId, extraction);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { spaceId, sources, nodes, edges, extractionBySourceId };
|
|
25
|
+
}
|
|
26
|
+
export function scoreHomeGraphResults(query, sources, nodes, extractionBySourceId, limit) {
|
|
27
|
+
const tokens = tokenize(query);
|
|
28
|
+
if (tokens.length === 0)
|
|
29
|
+
return [];
|
|
30
|
+
const sourceResults = sources.map((source) => {
|
|
31
|
+
const extraction = extractionBySourceId(source.id);
|
|
32
|
+
const baseScore = scoreFields(tokens, [
|
|
33
|
+
source.title,
|
|
34
|
+
source.summary,
|
|
35
|
+
source.description,
|
|
36
|
+
source.sourceUri,
|
|
37
|
+
source.canonicalUri,
|
|
38
|
+
source.tags.join(' '),
|
|
39
|
+
extraction?.title,
|
|
40
|
+
extraction?.summary,
|
|
41
|
+
extraction?.excerpt,
|
|
42
|
+
readSearchText(extraction),
|
|
43
|
+
...limitedSections(extraction),
|
|
44
|
+
]);
|
|
45
|
+
return {
|
|
46
|
+
kind: 'source',
|
|
47
|
+
id: source.id,
|
|
48
|
+
score: baseScore > 0 ? baseScore + (extraction ? 8 : 0) : 0,
|
|
49
|
+
title: source.title ?? source.sourceUri ?? source.id,
|
|
50
|
+
summary: extraction?.summary ?? source.summary,
|
|
51
|
+
source,
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
const nodeResults = nodes.map((node) => {
|
|
55
|
+
const baseScore = scoreFields(tokens, [
|
|
56
|
+
node.title,
|
|
57
|
+
node.summary,
|
|
58
|
+
node.aliases.join(' '),
|
|
59
|
+
readNodeMetadataText(node),
|
|
60
|
+
]);
|
|
61
|
+
return {
|
|
62
|
+
kind: 'node',
|
|
63
|
+
id: node.id,
|
|
64
|
+
score: baseScore > 0 ? baseScore + Math.round(node.confidence / 20) : 0,
|
|
65
|
+
title: node.title,
|
|
66
|
+
summary: node.summary,
|
|
67
|
+
node,
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
return [...sourceResults, ...nodeResults]
|
|
71
|
+
.filter((entry) => entry.score > 0)
|
|
72
|
+
.sort((a, b) => b.score - a.score || a.id.localeCompare(b.id))
|
|
73
|
+
.slice(0, Math.max(1, limit));
|
|
74
|
+
}
|
|
75
|
+
function limitedSections(extraction) {
|
|
76
|
+
if (!extraction)
|
|
77
|
+
return [];
|
|
78
|
+
return extraction.sections.slice(0, MAX_SECTION_COUNT).map((section) => clampText(section, MAX_FIELD_CHARS));
|
|
79
|
+
}
|
|
80
|
+
function readSearchText(extraction) {
|
|
81
|
+
if (!extraction)
|
|
82
|
+
return undefined;
|
|
83
|
+
const structure = readRecord(extraction.structure);
|
|
84
|
+
const metadata = readRecord(extraction.metadata);
|
|
85
|
+
return firstBoundedText([
|
|
86
|
+
structure.searchText,
|
|
87
|
+
structure.text,
|
|
88
|
+
structure.content,
|
|
89
|
+
metadata.searchText,
|
|
90
|
+
], MAX_SEARCH_TEXT_CHARS);
|
|
91
|
+
}
|
|
92
|
+
function readNodeMetadataText(node) {
|
|
93
|
+
const homeAssistant = readRecord(node.metadata.homeAssistant);
|
|
94
|
+
const values = [
|
|
95
|
+
homeAssistant.objectKind,
|
|
96
|
+
homeAssistant.objectId,
|
|
97
|
+
homeAssistant.entityId,
|
|
98
|
+
homeAssistant.deviceId,
|
|
99
|
+
homeAssistant.areaId,
|
|
100
|
+
homeAssistant.integrationId,
|
|
101
|
+
node.metadata.manufacturer,
|
|
102
|
+
node.metadata.model,
|
|
103
|
+
].filter((value) => typeof value === 'string' && value.trim().length > 0);
|
|
104
|
+
return values.length > 0 ? values.join(' ') : undefined;
|
|
105
|
+
}
|
|
106
|
+
function firstBoundedText(values, maxLength) {
|
|
107
|
+
for (const value of values) {
|
|
108
|
+
if (typeof value !== 'string')
|
|
109
|
+
continue;
|
|
110
|
+
const trimmed = value.trim();
|
|
111
|
+
if (!trimmed)
|
|
112
|
+
continue;
|
|
113
|
+
return clampText(trimmed, maxLength);
|
|
114
|
+
}
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
function clampText(value, maxLength) {
|
|
118
|
+
return value.length <= maxLength ? value : value.slice(0, maxLength);
|
|
119
|
+
}
|
|
120
|
+
function tokenize(value) {
|
|
121
|
+
return value.toLowerCase().split(/[^a-z0-9_.:-]+/).map((entry) => entry.trim()).filter(Boolean);
|
|
122
|
+
}
|
|
123
|
+
function scoreFields(tokens, fields) {
|
|
124
|
+
let score = 0;
|
|
125
|
+
for (const field of fields) {
|
|
126
|
+
const raw = typeof field === 'string' ? field.trim() : '';
|
|
127
|
+
const haystack = clampText(raw, MAX_SEARCH_TEXT_CHARS).toLowerCase();
|
|
128
|
+
if (!haystack)
|
|
129
|
+
continue;
|
|
130
|
+
for (const token of tokens) {
|
|
131
|
+
if (haystack.includes(token))
|
|
132
|
+
score += 10;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return score;
|
|
136
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACV,mBAAmB,EAEnB,oBAAoB,EACpB,mBAAmB,EAEnB,qBAAqB,EAEtB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACV,mBAAmB,EAEnB,oBAAoB,EACpB,mBAAmB,EAEnB,qBAAqB,EAEtB,MAAM,aAAa,CAAC;AAqCrB,OAAO,KAAK,EACV,iBAAiB,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,eAAe,EACrF,4BAA4B,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,uBAAuB,EAC5E,kBAAkB,EAAE,mBAAmB,EACjE,wBAAwB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,mBAAmB,EAC9F,sBAAsB,EAAE,eAAe,EAAE,mBAAmB,EAC7D,MAAM,YAAY,CAAC;AAGpB,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,KAAK,EAAE,cAAc,EACrB,aAAa,EAAE,aAAa;IAGzC,MAAM,CAAC,KAAK,GAAE;QAAE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,C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AO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,QAAQ,EAAE;YAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC;KACxJ,CAAC;YA+BY,qBAAqB;YA0CrB,eAAe;YA+Bf,cAAc;YAmBd,qBAAqB;YA+CrB,2BAA2B;YAiB3B,WAAW;YAoBX,oBAAoB;IAelC,OAAO,CAAC,iBAAiB;YAcX,YAAY;YAkCZ,mBAAmB;CAsBlC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { extractKnowledgeArtifact } from '../extractors.js';
|
|
2
|
-
import { HOME_GRAPH_CONNECTOR_ID, belongsToSpace, buildHomeGraphMetadata, buildHomeGraphNodeInput, buildIssue, edgeIsActive, homeGraphNodeId, homeGraphSourceId, namespacedCanonicalUri, nodeKindForHomeGraphObject, normalizeHomeGraphObjectInput, resolveHomeGraphSpace,
|
|
2
|
+
import { HOME_GRAPH_CONNECTOR_ID, belongsToSpace, buildHomeGraphMetadata, buildHomeGraphNodeInput, buildIssue, edgeIsActive, homeGraphNodeId, homeGraphSourceId, namespacedCanonicalUri, nodeKindForHomeGraphObject, normalizeHomeGraphObjectInput, resolveHomeGraphSpace, targetToReference, uniqueStrings, } from './helpers.js';
|
|
3
3
|
import { collectLinkedObjects, findHomeAssistantNode, inferHomeGraphSourceType, missingDevicePassportFields, readHomeGraphState, renderAskAnswer, renderHomeGraphState, safeHomeGraphFilename, sourcesLinkedToNode, } from './state.js';
|
|
4
4
|
import { renderDevicePassportPage, renderPacketPage, renderRoomPage, } from './rendering.js';
|
|
5
|
+
import { readHomeGraphSearchState, scoreHomeGraphResults, } from './search.js';
|
|
5
6
|
import { HOME_GRAPH_CAPABILITIES } from './types.js';
|
|
6
7
|
export class HomeGraphService {
|
|
7
8
|
store;
|
|
@@ -186,8 +187,8 @@ export class HomeGraphService {
|
|
|
186
187
|
async ask(input) {
|
|
187
188
|
await this.store.init();
|
|
188
189
|
const { spaceId } = resolveHomeGraphSpace(input);
|
|
189
|
-
const state =
|
|
190
|
-
const results = scoreHomeGraphResults(input.query, state.sources, state.nodes, (sourceId) =>
|
|
190
|
+
const state = readHomeGraphSearchState(this.store, spaceId);
|
|
191
|
+
const results = scoreHomeGraphResults(input.query, state.sources, state.nodes, (sourceId) => state.extractionBySourceId.get(sourceId), input.limit ?? 8);
|
|
191
192
|
const sources = results.flatMap((result) => result.source ? [result.source] : []);
|
|
192
193
|
const linkedObjects = collectLinkedObjects(results, state);
|
|
193
194
|
const confidence = Math.min(100, Math.max(10, results[0]?.score ?? 10));
|
|
@@ -10,7 +10,10 @@ export declare function sourcesLinkedToNode(nodeId: string, state: HomeGraphStat
|
|
|
10
10
|
export declare function collectLinkedObjects(results: readonly {
|
|
11
11
|
readonly source?: KnowledgeSourceRecord;
|
|
12
12
|
readonly node?: KnowledgeNodeRecord;
|
|
13
|
-
}[], state:
|
|
13
|
+
}[], state: {
|
|
14
|
+
readonly edges: readonly KnowledgeEdgeRecord[];
|
|
15
|
+
readonly nodes: readonly KnowledgeNodeRecord[];
|
|
16
|
+
}): KnowledgeNodeRecord[];
|
|
14
17
|
export declare function missingDevicePassportFields(device: KnowledgeNodeRecord, sources: readonly KnowledgeSourceRecord[]): string[];
|
|
15
18
|
export declare function findHomeAssistantNode(nodes: readonly KnowledgeNodeRecord[], kind: string, id: string): KnowledgeNodeRecord | undefined;
|
|
16
19
|
export declare function inferHomeGraphSourceType(tags: readonly string[] | undefined, fallback: KnowledgeSourceType): KnowledgeSourceType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/state.ts"],"names":[],"mappings":"AAAA,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AE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,qBAAqB,CAAA;CAAE,EAAE,EAClH,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GACxC,MAAM,CASR;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAOnH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
let version = '0.26.
|
|
3
|
+
let version = '0.26.7';
|
|
4
4
|
try {
|
|
5
5
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', '..', 'package.json'), 'utf-8'));
|
|
6
6
|
version = pkg.version ?? version;
|