@pellux/goodvibes-sdk 0.26.10 → 0.27.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.
- package/dist/_internal/contracts/artifacts/operator-contract.json +4351 -5
- package/dist/_internal/contracts/generated/foundation-metadata.d.ts +2 -2
- package/dist/_internal/contracts/generated/foundation-metadata.js +2 -2
- package/dist/_internal/contracts/generated/operator-contract.d.ts.map +1 -1
- package/dist/_internal/contracts/generated/operator-contract.js +4351 -5
- package/dist/_internal/contracts/generated/operator-method-ids.d.ts +1 -1
- package/dist/_internal/contracts/generated/operator-method-ids.d.ts.map +1 -1
- package/dist/_internal/contracts/generated/operator-method-ids.js +10 -0
- package/dist/_internal/daemon/context.d.ts +1 -0
- package/dist/_internal/daemon/context.d.ts.map +1 -1
- package/dist/_internal/daemon/knowledge-route-types.d.ts +2 -1
- package/dist/_internal/daemon/knowledge-route-types.d.ts.map +1 -1
- package/dist/_internal/daemon/knowledge-routes.d.ts +1 -1
- package/dist/_internal/daemon/knowledge-routes.d.ts.map +1 -1
- package/dist/_internal/daemon/knowledge-routes.js +19 -3
- package/dist/_internal/daemon/operator.d.ts +1 -1
- package/dist/_internal/daemon/operator.d.ts.map +1 -1
- package/dist/_internal/daemon/operator.js +2 -0
- package/dist/_internal/platform/control-plane/method-catalog-homegraph.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/method-catalog-homegraph.js +12 -2
- package/dist/_internal/platform/control-plane/method-catalog-knowledge.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/method-catalog-knowledge.js +117 -1
- package/dist/_internal/platform/control-plane/operator-contract-schemas-knowledge.d.ts +3 -0
- package/dist/_internal/platform/control-plane/operator-contract-schemas-knowledge.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/operator-contract-schemas-knowledge.js +48 -3
- package/dist/_internal/platform/control-plane/operator-contract-schemas-project-planning.d.ts +8 -0
- package/dist/_internal/platform/control-plane/operator-contract-schemas-project-planning.d.ts.map +1 -0
- package/dist/_internal/platform/control-plane/operator-contract-schemas-project-planning.js +135 -0
- package/dist/_internal/platform/control-plane/routes/operator.d.ts +1 -1
- package/dist/_internal/platform/control-plane/routes/operator.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/routes/operator.js +2 -0
- package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/facade-composition.js +2 -0
- package/dist/_internal/platform/daemon/facade-types.d.ts +2 -1
- package/dist/_internal/platform/daemon/facade-types.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/home-graph-routes.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/home-graph-routes.js +21 -0
- package/dist/_internal/platform/daemon/http/project-planning-routes.d.ts +18 -0
- package/dist/_internal/platform/daemon/http/project-planning-routes.d.ts.map +1 -0
- package/dist/_internal/platform/daemon/http/project-planning-routes.js +68 -0
- package/dist/_internal/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/router-route-contexts.js +1 -0
- package/dist/_internal/platform/daemon/http/router.d.ts +4 -1
- package/dist/_internal/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/_internal/platform/daemon/http/router.js +18 -0
- package/dist/_internal/platform/daemon/types.d.ts +2 -1
- package/dist/_internal/platform/daemon/types.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/generated-projections.d.ts +38 -0
- package/dist/_internal/platform/knowledge/generated-projections.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/generated-projections.js +106 -0
- package/dist/_internal/platform/knowledge/home-graph/generated-pages.d.ts +29 -0
- package/dist/_internal/platform/knowledge/home-graph/generated-pages.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/home-graph/generated-pages.js +296 -0
- package/dist/_internal/platform/knowledge/home-graph/helpers.d.ts +4 -1
- package/dist/_internal/platform/knowledge/home-graph/helpers.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/helpers.js +21 -2
- package/dist/_internal/platform/knowledge/home-graph/index.d.ts +1 -1
- package/dist/_internal/platform/knowledge/home-graph/index.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/rendering.d.ts +5 -0
- package/dist/_internal/platform/knowledge/home-graph/rendering.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/rendering.js +32 -11
- package/dist/_internal/platform/knowledge/home-graph/search.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/search.js +95 -11
- package/dist/_internal/platform/knowledge/home-graph/service.d.ts +2 -2
- package/dist/_internal/platform/knowledge/home-graph/service.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/service.js +46 -93
- package/dist/_internal/platform/knowledge/home-graph/space-selection.d.ts +7 -0
- package/dist/_internal/platform/knowledge/home-graph/space-selection.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/home-graph/space-selection.js +36 -0
- package/dist/_internal/platform/knowledge/home-graph/types.d.ts +33 -2
- package/dist/_internal/platform/knowledge/home-graph/types.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/types.js +2 -0
- package/dist/_internal/platform/knowledge/index.d.ts +9 -3
- package/dist/_internal/platform/knowledge/index.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/index.js +4 -1
- package/dist/_internal/platform/knowledge/knowledge-api.d.ts +2 -0
- package/dist/_internal/platform/knowledge/knowledge-api.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/knowledge-api.js +1 -0
- package/dist/_internal/platform/knowledge/map.d.ts +18 -0
- package/dist/_internal/platform/knowledge/map.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/map.js +235 -0
- package/dist/_internal/platform/knowledge/project-planning/helpers.d.ts +17 -0
- package/dist/_internal/platform/knowledge/project-planning/helpers.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/project-planning/helpers.js +65 -0
- package/dist/_internal/platform/knowledge/project-planning/index.d.ts +6 -0
- package/dist/_internal/platform/knowledge/project-planning/index.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/project-planning/index.js +3 -0
- package/dist/_internal/platform/knowledge/project-planning/readiness.d.ts +3 -0
- package/dist/_internal/platform/knowledge/project-planning/readiness.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/project-planning/readiness.js +124 -0
- package/dist/_internal/platform/knowledge/project-planning/service.d.ts +25 -0
- package/dist/_internal/platform/knowledge/project-planning/service.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/project-planning/service.js +259 -0
- package/dist/_internal/platform/knowledge/project-planning/types.d.ts +203 -0
- package/dist/_internal/platform/knowledge/project-planning/types.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/project-planning/types.js +1 -0
- package/dist/_internal/platform/knowledge/projection-utils.d.ts +16 -0
- package/dist/_internal/platform/knowledge/projection-utils.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/projection-utils.js +48 -0
- package/dist/_internal/platform/knowledge/projections.d.ts +1 -0
- package/dist/_internal/platform/knowledge/projections.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/projections.js +52 -58
- package/dist/_internal/platform/knowledge/service.d.ts +7 -1
- package/dist/_internal/platform/knowledge/service.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/service.js +11 -0
- package/dist/_internal/platform/knowledge/spaces.d.ts +4 -0
- package/dist/_internal/platform/knowledge/spaces.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/spaces.js +10 -0
- package/dist/_internal/platform/knowledge/types.d.ts +35 -0
- package/dist/_internal/platform/knowledge/types.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.d.ts +2 -1
- package/dist/_internal/platform/runtime/services.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/services.js +5 -1
- package/dist/_internal/platform/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { isGeneratedKnowledgeSource, } from '../generated-projections.js';
|
|
3
|
+
import { HOME_ASSISTANT_KNOWLEDGE_SPACE_PREFIX, getKnowledgeSpaceId, homeAssistantKnowledgeSpaceId, knowledgeSpaceMetadata, normalizeHomeAssistantInstallationId, normalizeKnowledgeSpaceId, normalizeSpaceComponent, } from '../spaces.js';
|
|
3
4
|
export const HOME_GRAPH_CONNECTOR_ID = 'homeassistant';
|
|
4
5
|
const NODE_KIND_BY_OBJECT = {
|
|
5
6
|
home: 'ha_home',
|
|
@@ -119,8 +120,26 @@ function homeGraphObjectId(kind, object) {
|
|
|
119
120
|
export function edgeIsActive(edge) {
|
|
120
121
|
return edge.metadata.linkStatus !== 'unlinked';
|
|
121
122
|
}
|
|
123
|
+
export function isGeneratedPageSource(source) {
|
|
124
|
+
return isGeneratedKnowledgeSource(source);
|
|
125
|
+
}
|
|
122
126
|
export function belongsToSpace(record, spaceId) {
|
|
123
|
-
|
|
127
|
+
if (!record)
|
|
128
|
+
return false;
|
|
129
|
+
const recordSpaceId = getKnowledgeSpaceId(record);
|
|
130
|
+
const targetSpaceId = normalizeKnowledgeSpaceId(spaceId);
|
|
131
|
+
return recordSpaceId === targetSpaceId || sameHomeAssistantSpace(recordSpaceId, targetSpaceId);
|
|
132
|
+
}
|
|
133
|
+
export function sameHomeAssistantSpace(left, right) {
|
|
134
|
+
const leftComponent = homeAssistantSpaceComponent(left);
|
|
135
|
+
const rightComponent = homeAssistantSpaceComponent(right);
|
|
136
|
+
return Boolean(leftComponent && rightComponent && leftComponent === rightComponent);
|
|
137
|
+
}
|
|
138
|
+
export function homeAssistantSpaceComponent(spaceId) {
|
|
139
|
+
const normalized = normalizeKnowledgeSpaceId(spaceId);
|
|
140
|
+
if (!normalized.toLowerCase().startsWith(HOME_ASSISTANT_KNOWLEDGE_SPACE_PREFIX))
|
|
141
|
+
return undefined;
|
|
142
|
+
return normalizeSpaceComponent(normalized.slice(HOME_ASSISTANT_KNOWLEDGE_SPACE_PREFIX.length));
|
|
124
143
|
}
|
|
125
144
|
export function targetToReference(target) {
|
|
126
145
|
if (target.kind === 'source')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { HomeGraphService } from './service.js';
|
|
2
2
|
export { HOME_GRAPH_NODE_KINDS, HOME_GRAPH_RELATIONS, } from './types.js';
|
|
3
|
-
export type { HomeGraphAskInput, HomeGraphAskResult, HomeGraphDevicePassportResult, HomeGraphExport, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphKnowledgeTarget, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphNodeKind, HomeGraphObjectInput, HomeGraphObjectKind, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphReindexResult, HomeGraphRelation, HomeGraphReviewInput, HomeGraphSnapshotInput, HomeGraphStatus, HomeGraphSyncResult, } from './types.js';
|
|
3
|
+
export type { HomeGraphAskInput, HomeGraphAskResult, HomeGraphDevicePassportResult, HomeGraphExport, HomeGraphGeneratedPagesSummary, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphKnowledgeTarget, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphMapEdge, HomeGraphMapInput, HomeGraphMapNode, HomeGraphMapResult, HomeGraphNodeKind, HomeGraphObjectInput, HomeGraphObjectKind, HomeGraphPageAutomationOptions, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphReindexResult, HomeGraphRelation, HomeGraphReviewInput, HomeGraphSnapshotInput, HomeGraphStatus, HomeGraphSyncResult, } from './types.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,6BAA6B,EAC7B,eAAe,EACf,4BAA4B,EAC5B,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,6BAA6B,EAC7B,eAAe,EACf,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { KnowledgeEdgeRecord, KnowledgeIssueRecord, KnowledgeNodeRecord, KnowledgeSourceRecord } from '../types.js';
|
|
2
|
+
import type { HomeGraphMapResult } from './types.js';
|
|
2
3
|
export interface HomeGraphRenderState {
|
|
3
4
|
readonly spaceId: string;
|
|
4
5
|
readonly title: string;
|
|
@@ -22,4 +23,8 @@ export declare function renderPacketPage(state: HomeGraphRenderState, options?:
|
|
|
22
23
|
readonly includeFields?: readonly string[];
|
|
23
24
|
readonly excludeFields?: readonly string[];
|
|
24
25
|
}): string;
|
|
26
|
+
export declare function renderHomeGraphMap(state: HomeGraphRenderState, options?: {
|
|
27
|
+
readonly limit?: number;
|
|
28
|
+
readonly includeSources?: boolean;
|
|
29
|
+
}): HomeGraphMapResult;
|
|
25
30
|
//# sourceMappingURL=rendering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rendering.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/rendering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,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,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAClD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"rendering.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/rendering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAA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CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,kBAAkB,CAM1B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { renderKnowledgeMap } from '../map.js';
|
|
2
|
+
import { edgeIsActive, isGeneratedPageSource } from './helpers.js';
|
|
2
3
|
export function renderRoomPage(state, areaId) {
|
|
3
4
|
const area = areaId
|
|
4
5
|
? findNodeByHaId(state.nodes, 'ha_area', areaId) ?? findNodeByHaId(state.nodes, 'ha_room', areaId)
|
|
@@ -9,10 +10,18 @@ export function renderRoomPage(state, areaId) {
|
|
|
9
10
|
&& (!areaNodeId || hasActiveEdge(state.edges, node.id, 'located_in', areaNodeId))));
|
|
10
11
|
const devices = state.nodes.filter((node) => (node.kind === 'ha_device'
|
|
11
12
|
&& (!areaNodeId || hasActiveEdge(state.edges, node.id, 'located_in', areaNodeId))));
|
|
12
|
-
const automations = state.nodes
|
|
13
|
-
const scenes = state.nodes
|
|
14
|
-
const scripts = state.nodes
|
|
15
|
-
const
|
|
13
|
+
const automations = filterNodesForArea(state.nodes, state.edges, 'ha_automation', areaNodeId);
|
|
14
|
+
const scenes = filterNodesForArea(state.nodes, state.edges, 'ha_scene', areaNodeId);
|
|
15
|
+
const scripts = filterNodesForArea(state.nodes, state.edges, 'ha_script', areaNodeId);
|
|
16
|
+
const relatedNodeIds = new Set([
|
|
17
|
+
...(areaNodeId ? [areaNodeId] : []),
|
|
18
|
+
...devices.map((node) => node.id),
|
|
19
|
+
...entities.map((node) => node.id),
|
|
20
|
+
...automations.map((node) => node.id),
|
|
21
|
+
...scenes.map((node) => node.id),
|
|
22
|
+
...scripts.map((node) => node.id),
|
|
23
|
+
]);
|
|
24
|
+
const sources = relatedSources(state.sources, state.edges, relatedNodeIds);
|
|
16
25
|
return [
|
|
17
26
|
`# ${title}`,
|
|
18
27
|
'',
|
|
@@ -63,10 +72,17 @@ export function renderPacketPage(state, options = {}) {
|
|
|
63
72
|
excluded.has('maintenance') ? '' : renderNodeList('Maintenance', state.nodes.filter((node) => node.kind === 'ha_maintenance_item')),
|
|
64
73
|
excluded.has('troubleshooting') ? '' : renderNodeList('Troubleshooting', state.nodes.filter((node) => node.kind === 'ha_troubleshooting_case')),
|
|
65
74
|
excluded.has('network') ? '' : renderNodeList('Network', state.nodes.filter((node) => node.kind === 'ha_network_node')),
|
|
66
|
-
excluded.has('sources') ? '' : renderSourceList('Sources', state.sources),
|
|
75
|
+
excluded.has('sources') ? '' : renderSourceList('Sources', state.sources.filter((source) => !isGeneratedPageSource(source))),
|
|
67
76
|
excluded.has('issues') ? '' : renderIssueList('Open Issues', state.issues.filter((issue) => issue.status === 'open')),
|
|
68
77
|
].filter(Boolean).join('\n');
|
|
69
78
|
}
|
|
79
|
+
export function renderHomeGraphMap(state, options = {}) {
|
|
80
|
+
return renderKnowledgeMap(state, {
|
|
81
|
+
...options,
|
|
82
|
+
title: state.title,
|
|
83
|
+
spaceId: state.spaceId,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
70
86
|
function renderNodeList(title, nodes) {
|
|
71
87
|
if (nodes.length === 0)
|
|
72
88
|
return '';
|
|
@@ -103,14 +119,19 @@ function renderIssueList(title, issues) {
|
|
|
103
119
|
function renderMetadataField(label, value) {
|
|
104
120
|
return typeof value === 'string' && value.trim().length > 0 ? `- ${label}: ${value.trim()}` : '';
|
|
105
121
|
}
|
|
106
|
-
function relatedSources(sources, edges,
|
|
107
|
-
|
|
108
|
-
|
|
122
|
+
function relatedSources(sources, edges, nodeIds) {
|
|
123
|
+
const visibleSources = sources.filter((source) => !isGeneratedPageSource(source));
|
|
124
|
+
if (nodeIds.size === 0)
|
|
125
|
+
return visibleSources;
|
|
109
126
|
const sourceIds = new Set(edges.filter((edge) => (edgeIsActive(edge)
|
|
110
127
|
&& edge.fromKind === 'source'
|
|
111
128
|
&& edge.toKind === 'node'
|
|
112
|
-
&& edge.toId
|
|
113
|
-
return
|
|
129
|
+
&& nodeIds.has(edge.toId))).map((edge) => edge.fromId));
|
|
130
|
+
return visibleSources.filter((source) => sourceIds.has(source.id));
|
|
131
|
+
}
|
|
132
|
+
function filterNodesForArea(nodes, edges, kind, areaNodeId) {
|
|
133
|
+
return nodes.filter((node) => (node.kind === kind
|
|
134
|
+
&& (!areaNodeId || hasActiveEdge(edges, node.id, 'located_in', areaNodeId))));
|
|
114
135
|
}
|
|
115
136
|
function hasActiveEdge(edges, fromId, relation, toId) {
|
|
116
137
|
return edges.some((edge) => (edgeIsActive(edge)
|
|
@@ -1 +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;
|
|
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;AA8FxD,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,CAuBrG;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,qBAAqB,EAAE,EACzC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,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,CAiFzB;AAED,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,qBAAqB,EAAE,EACzC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,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,CAmCzB;AA2KD,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAWhH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { belongsToSpace, edgeIsActive, readRecord } from './helpers.js';
|
|
1
|
+
import { belongsToSpace, edgeIsActive, isGeneratedPageSource, readRecord } from './helpers.js';
|
|
2
2
|
const MAX_FIELD_CHARS = 4_096;
|
|
3
3
|
const MAX_SECTION_COUNT = 32;
|
|
4
4
|
const MAX_SEARCH_TEXT_CHARS = 64 * 1024;
|
|
@@ -46,6 +46,19 @@ const STOPWORDS = new Set([
|
|
|
46
46
|
'with',
|
|
47
47
|
]);
|
|
48
48
|
const SHORT_MEANINGFUL_TOKENS = new Set(['ac', 'av', 'dc', 'ha', 'ip', 'ir', 'lg', 'pc', 'tv']);
|
|
49
|
+
const GENERIC_ANCHOR_TOKENS = new Set([
|
|
50
|
+
'area',
|
|
51
|
+
'assistant',
|
|
52
|
+
'device',
|
|
53
|
+
'entity',
|
|
54
|
+
'graph',
|
|
55
|
+
'home',
|
|
56
|
+
'living',
|
|
57
|
+
'media',
|
|
58
|
+
'media_player',
|
|
59
|
+
'room',
|
|
60
|
+
'smart',
|
|
61
|
+
]);
|
|
49
62
|
const QUERY_EXPANSIONS = {
|
|
50
63
|
capability: ['capabilities', 'feature', 'features', 'function', 'functions', 'mode', 'modes', 'spec', 'specs', 'support', 'supports'],
|
|
51
64
|
capabilities: ['capability', 'feature', 'features', 'function', 'functions', 'mode', 'modes', 'spec', 'specs', 'support', 'supports'],
|
|
@@ -72,7 +85,7 @@ const SOURCE_EVIDENCE_TOKENS = new Set([
|
|
|
72
85
|
]);
|
|
73
86
|
const INTEGRATION_QUERY_TOKENS = new Set(['automation', 'automations', 'homeassistant', 'integration', 'integrations', 'webostv']);
|
|
74
87
|
export function readHomeGraphSearchState(store, spaceId) {
|
|
75
|
-
const sources = store.listSources(10_000).filter((source) => belongsToSpace(source, spaceId));
|
|
88
|
+
const sources = store.listSources(10_000).filter((source) => (belongsToSpace(source, spaceId) && !isGeneratedPageSource(source)));
|
|
76
89
|
const nodes = store.listNodes(10_000).filter((node) => belongsToSpace(node, spaceId));
|
|
77
90
|
const sourceIds = new Set(sources.map((source) => source.id));
|
|
78
91
|
const nodeIds = new Set(nodes.map((node) => node.id));
|
|
@@ -99,6 +112,7 @@ export function scoreHomeGraphResults(query, sources, nodes, edges, extractionBy
|
|
|
99
112
|
const expandedTokens = expandTokens(tokens);
|
|
100
113
|
const anchors = selectAnchorNodes(tokens, nodes);
|
|
101
114
|
const anchorIds = new Set(anchors.map((anchor) => anchor.node.id));
|
|
115
|
+
const anchorIdentityTokens = collectAnchorIdentityTokens(anchors.map((anchor) => anchor.node));
|
|
102
116
|
const sourceLinks = buildSourceLinkIndex(edges);
|
|
103
117
|
const useAnchorScope = anchors.length > 0 && anchors.length <= ANCHOR_SCOPE_LIMIT;
|
|
104
118
|
const sourceEvidenceQuery = queryNeedsSourceEvidence(expandedTokens);
|
|
@@ -113,6 +127,9 @@ export function scoreHomeGraphResults(query, sources, nodes, edges, extractionBy
|
|
|
113
127
|
}
|
|
114
128
|
const linkedNodeIds = sourceLinks.get(source.id) ?? new Set();
|
|
115
129
|
const linkedToAnchor = useAnchorScope && intersects(linkedNodeIds, anchorIds);
|
|
130
|
+
const anchorIdentityScore = useAnchorScope
|
|
131
|
+
? sourceAnchorIdentityScore(anchorIdentityTokens, source, extraction)
|
|
132
|
+
: 0;
|
|
116
133
|
const identityScore = scoreFields(tokens, [
|
|
117
134
|
source.title,
|
|
118
135
|
source.summary,
|
|
@@ -130,11 +147,12 @@ export function scoreHomeGraphResults(query, sources, nodes, edges, extractionBy
|
|
|
130
147
|
]);
|
|
131
148
|
const baseScore = identityScore + contentScore;
|
|
132
149
|
const linkBoost = linkedToAnchor ? 120 + relationBoost(source.id, anchorIds, edges) : 0;
|
|
150
|
+
const inferredAnchorBoost = !linkedToAnchor && anchorIdentityScore > 0 ? Math.min(90, 30 + anchorIdentityScore) : 0;
|
|
133
151
|
const manualBoost = isManualLikeSource(source) ? 24 : 0;
|
|
134
152
|
const indexedBoost = source.status === 'indexed' ? 18 : source.status === 'stale' ? 6 : 0;
|
|
135
153
|
const extractionBoost = extraction ? 20 : 0;
|
|
136
|
-
const score = baseScore > 0 || linkBoost > 0
|
|
137
|
-
? baseScore + linkBoost + manualBoost + indexedBoost + extractionBoost
|
|
154
|
+
const score = baseScore > 0 || linkBoost > 0 || inferredAnchorBoost > 0
|
|
155
|
+
? baseScore + linkBoost + inferredAnchorBoost + manualBoost + indexedBoost + extractionBoost
|
|
138
156
|
: 0;
|
|
139
157
|
return sourceResult(source, extraction, score, selectRelevantExcerpt(expandedTokens, source, extraction));
|
|
140
158
|
});
|
|
@@ -155,13 +173,18 @@ export function scoreHomeGraphResults(query, sources, nodes, edges, extractionBy
|
|
|
155
173
|
.filter((entry) => entry.score > 0)
|
|
156
174
|
.sort(compareHomeGraphResults);
|
|
157
175
|
const anchoredSourceResults = useAnchorScope
|
|
158
|
-
? results.filter((result) =>
|
|
176
|
+
? results.filter((result) => {
|
|
177
|
+
if (!result.source)
|
|
178
|
+
return false;
|
|
179
|
+
return intersects(sourceLinks.get(result.source.id) ?? new Set(), anchorIds)
|
|
180
|
+
|| sourceAnchorIdentityScore(anchorIdentityTokens, result.source, extractionBySourceId(result.source.id)) > 0;
|
|
181
|
+
})
|
|
159
182
|
: [];
|
|
160
183
|
if (anchoredSourceResults.length > 0) {
|
|
161
184
|
results = anchoredSourceResults.sort(compareHomeGraphResults);
|
|
162
185
|
}
|
|
163
186
|
if (sourceEvidenceQuery) {
|
|
164
|
-
results = pruneWeakSourceEvidence(results, tokens, sourceLinks, anchorIds);
|
|
187
|
+
results = pruneWeakSourceEvidence(results, tokens, sourceLinks, anchorIds, anchorIdentityTokens, extractionBySourceId);
|
|
165
188
|
}
|
|
166
189
|
const strongResults = pruneWeakTokenCoverage(results, tokens);
|
|
167
190
|
return strongResults.slice(0, Math.max(1, limit));
|
|
@@ -172,6 +195,7 @@ export function selectHomeGraphExtractionRepairCandidates(query, sources, nodes,
|
|
|
172
195
|
return [];
|
|
173
196
|
const anchors = selectAnchorNodes(tokens, nodes);
|
|
174
197
|
const anchorIds = new Set(anchors.map((anchor) => anchor.node.id));
|
|
198
|
+
const anchorIdentityTokens = collectAnchorIdentityTokens(anchors.map((anchor) => anchor.node));
|
|
175
199
|
const sourceLinks = buildSourceLinkIndex(edges);
|
|
176
200
|
return sources
|
|
177
201
|
.map((source) => {
|
|
@@ -179,6 +203,9 @@ export function selectHomeGraphExtractionRepairCandidates(query, sources, nodes,
|
|
|
179
203
|
return { source, score: 0 };
|
|
180
204
|
const linkedNodeIds = sourceLinks.get(source.id) ?? new Set();
|
|
181
205
|
const linkedToAnchor = anchors.length > 0 && intersects(linkedNodeIds, anchorIds);
|
|
206
|
+
const anchorIdentityScore = anchors.length > 0
|
|
207
|
+
? sourceAnchorIdentityScore(anchorIdentityTokens, source, extractionBySourceId(source.id))
|
|
208
|
+
: 0;
|
|
182
209
|
const identityScore = scoreFields(tokens, [
|
|
183
210
|
source.title,
|
|
184
211
|
source.summary,
|
|
@@ -190,7 +217,9 @@ export function selectHomeGraphExtractionRepairCandidates(query, sources, nodes,
|
|
|
190
217
|
const sourceKindBoost = isManualLikeSource(source) ? 30 : 0;
|
|
191
218
|
const score = linkedToAnchor
|
|
192
219
|
? 140 + relationBoost(source.id, anchorIds, edges) + sourceKindBoost + identityScore
|
|
193
|
-
: identityScore > 0
|
|
220
|
+
: identityScore > 0 || anchorIdentityScore > 0
|
|
221
|
+
? identityScore + anchorIdentityScore + sourceKindBoost
|
|
222
|
+
: 0;
|
|
194
223
|
return { source, score };
|
|
195
224
|
})
|
|
196
225
|
.filter((entry) => entry.score > 0)
|
|
@@ -248,6 +277,35 @@ function nodeIdentityFields(node) {
|
|
|
248
277
|
readNodeMetadataText(node),
|
|
249
278
|
].filter((value) => typeof value === 'string' && value.trim().length > 0);
|
|
250
279
|
}
|
|
280
|
+
function collectAnchorIdentityTokens(nodes) {
|
|
281
|
+
const tokens = new Set();
|
|
282
|
+
for (const node of nodes) {
|
|
283
|
+
for (const field of nodeIdentityFields(node)) {
|
|
284
|
+
for (const token of tokenizeQuery(field)) {
|
|
285
|
+
if (GENERIC_ANCHOR_TOKENS.has(token))
|
|
286
|
+
continue;
|
|
287
|
+
tokens.add(token);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return [...tokens];
|
|
292
|
+
}
|
|
293
|
+
function sourceAnchorIdentityScore(anchorTokens, source, extraction) {
|
|
294
|
+
if (anchorTokens.length === 0)
|
|
295
|
+
return 0;
|
|
296
|
+
return scoreFields(anchorTokens, [
|
|
297
|
+
source.title,
|
|
298
|
+
source.summary,
|
|
299
|
+
source.description,
|
|
300
|
+
source.sourceUri,
|
|
301
|
+
source.canonicalUri,
|
|
302
|
+
source.tags.join(' '),
|
|
303
|
+
extraction?.title,
|
|
304
|
+
extraction?.summary,
|
|
305
|
+
extraction?.excerpt,
|
|
306
|
+
readSearchText(extraction),
|
|
307
|
+
]);
|
|
308
|
+
}
|
|
251
309
|
function selectAnchorNodes(tokens, nodes) {
|
|
252
310
|
return nodes.map((node) => {
|
|
253
311
|
const baseScore = scoreFields(tokens, nodeIdentityFields(node));
|
|
@@ -361,7 +419,7 @@ function isHomeAssistantIntegrationSource(source) {
|
|
|
361
419
|
|| tags.includes('documentation')
|
|
362
420
|
|| sourceKind === 'documentation-candidate';
|
|
363
421
|
}
|
|
364
|
-
function pruneWeakSourceEvidence(results, tokens, sourceLinks, anchorIds) {
|
|
422
|
+
function pruneWeakSourceEvidence(results, tokens, sourceLinks, anchorIds, anchorIdentityTokens, extractionBySourceId) {
|
|
365
423
|
const sourceResults = results.filter((result) => result.source);
|
|
366
424
|
if (sourceResults.length === 0)
|
|
367
425
|
return [...results];
|
|
@@ -372,7 +430,11 @@ function pruneWeakSourceEvidence(results, tokens, sourceLinks, anchorIds) {
|
|
|
372
430
|
if (!hasUsefulSourceAnswerText(result))
|
|
373
431
|
return false;
|
|
374
432
|
const linkedToAnchor = intersects(sourceLinks.get(source.id) ?? new Set(), anchorIds);
|
|
375
|
-
|
|
433
|
+
const matchesAnchorIdentity = sourceAnchorIdentityScore(anchorIdentityTokens, source, extractionBySourceId(source.id)) > 0;
|
|
434
|
+
const coverage = tokenCoverage(tokens, resultText(result));
|
|
435
|
+
return linkedToAnchor
|
|
436
|
+
|| (matchesAnchorIdentity && coverage >= 1)
|
|
437
|
+
|| coverage >= Math.min(2, tokens.length);
|
|
376
438
|
});
|
|
377
439
|
return strongSourceResults;
|
|
378
440
|
}
|
|
@@ -381,7 +443,7 @@ function hasUsefulSourceAnswerText(result) {
|
|
|
381
443
|
return typeof detail === 'string' && detail.trim().length > 0 && !isLowInformationExtractionText(detail);
|
|
382
444
|
}
|
|
383
445
|
function selectRelevantExcerpt(tokens, source, extraction) {
|
|
384
|
-
const chunks = candidateExcerptChunks(source, extraction);
|
|
446
|
+
const chunks = candidateExcerptChunks(tokens, source, extraction);
|
|
385
447
|
let best;
|
|
386
448
|
for (const chunk of chunks) {
|
|
387
449
|
const text = cleanWhitespace(chunk);
|
|
@@ -397,12 +459,13 @@ function selectRelevantExcerpt(tokens, source, extraction) {
|
|
|
397
459
|
}
|
|
398
460
|
return clampAroundBestToken(best.text, tokens, MAX_ANSWER_EXCERPT_CHARS);
|
|
399
461
|
}
|
|
400
|
-
function candidateExcerptChunks(source, extraction) {
|
|
462
|
+
function candidateExcerptChunks(tokens, source, extraction) {
|
|
401
463
|
const searchText = readSearchText(extraction);
|
|
402
464
|
return [
|
|
403
465
|
extraction?.excerpt,
|
|
404
466
|
extraction?.summary,
|
|
405
467
|
...limitedSections(extraction),
|
|
468
|
+
...searchTextWindows(tokens, searchText),
|
|
406
469
|
...sentenceChunks(searchText),
|
|
407
470
|
source.description,
|
|
408
471
|
source.summary,
|
|
@@ -426,6 +489,27 @@ function sentenceChunks(value) {
|
|
|
426
489
|
const matches = text.match(/[^.!?\n]+[.!?]?/g) ?? [text];
|
|
427
490
|
return matches.map((entry) => entry.trim()).filter(Boolean).slice(0, 80);
|
|
428
491
|
}
|
|
492
|
+
function searchTextWindows(tokens, value) {
|
|
493
|
+
const text = cleanWhitespace(value ?? '');
|
|
494
|
+
if (!text)
|
|
495
|
+
return [];
|
|
496
|
+
const lower = text.toLowerCase();
|
|
497
|
+
const windows = [];
|
|
498
|
+
const seen = new Set();
|
|
499
|
+
for (const token of tokens) {
|
|
500
|
+
const index = lower.indexOf(token.toLowerCase());
|
|
501
|
+
if (index < 0)
|
|
502
|
+
continue;
|
|
503
|
+
const start = Math.max(0, index - Math.floor(MAX_ANSWER_EXCERPT_CHARS / 3));
|
|
504
|
+
const end = Math.min(text.length, start + MAX_ANSWER_EXCERPT_CHARS);
|
|
505
|
+
const window = `${start > 0 ? '...' : ''}${text.slice(start, end).trim()}${end < text.length ? '...' : ''}`;
|
|
506
|
+
if (window && !seen.has(window)) {
|
|
507
|
+
seen.add(window);
|
|
508
|
+
windows.push(window);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return windows;
|
|
512
|
+
}
|
|
429
513
|
function clampAroundBestToken(value, tokens, maxLength) {
|
|
430
514
|
const text = cleanWhitespace(value);
|
|
431
515
|
if (text.length <= maxLength)
|
|
@@ -2,7 +2,7 @@ import type { ArtifactStore } from '../../artifacts/index.js';
|
|
|
2
2
|
import type { KnowledgeStore } from '../store.js';
|
|
3
3
|
import type { KnowledgeEdgeRecord, KnowledgeIssueRecord, KnowledgeNodeRecord, KnowledgeSourceRecord } from '../types.js';
|
|
4
4
|
import { type HomeGraphReviewResult } from './review.js';
|
|
5
|
-
import type { HomeGraphAskInput, HomeGraphAskResult, HomeGraphDevicePassportResult, HomeGraphExport, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphReindexResult, HomeGraphReviewInput, HomeGraphSpaceInput, HomeGraphSnapshotInput, HomeGraphStatus, HomeGraphSyncResult } from './types.js';
|
|
5
|
+
import type { HomeGraphAskInput, HomeGraphAskResult, HomeGraphDevicePassportResult, HomeGraphExport, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphMapInput, HomeGraphMapResult, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphReindexResult, HomeGraphReviewInput, HomeGraphSpaceInput, HomeGraphSnapshotInput, HomeGraphStatus, HomeGraphSyncResult } from './types.js';
|
|
6
6
|
export declare class HomeGraphService {
|
|
7
7
|
private readonly store;
|
|
8
8
|
private readonly artifactStore;
|
|
@@ -51,6 +51,7 @@ export declare class HomeGraphService {
|
|
|
51
51
|
readonly sources: readonly KnowledgeSourceRecord[];
|
|
52
52
|
readonly issues: readonly KnowledgeIssueRecord[];
|
|
53
53
|
}>;
|
|
54
|
+
map(input?: HomeGraphMapInput): Promise<HomeGraphMapResult>;
|
|
54
55
|
exportSpace(input?: HomeGraphSpaceInput): Promise<HomeGraphExport>;
|
|
55
56
|
importSpace(input: HomeGraphSpaceInput & {
|
|
56
57
|
readonly data: HomeGraphExport;
|
|
@@ -74,6 +75,5 @@ export declare class HomeGraphService {
|
|
|
74
75
|
private refreshQualityIssues;
|
|
75
76
|
private resolveLinkSource;
|
|
76
77
|
private ensureTarget;
|
|
77
|
-
private materializeMarkdown;
|
|
78
78
|
}
|
|
79
79
|
//# sourceMappingURL=service.d.ts.map
|
|
@@ -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;AAmBrB,OAAO,EAAuB,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAuB9E,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,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home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