@pellux/goodvibes-sdk 0.28.15 → 0.28.17
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 +70 -1
- package/dist/_internal/contracts/generated/foundation-metadata.d.ts +1 -1
- package/dist/_internal/contracts/generated/foundation-metadata.js +1 -1
- package/dist/_internal/contracts/generated/operator-contract.d.ts.map +1 -1
- package/dist/_internal/contracts/generated/operator-contract.js +70 -1
- package/dist/_internal/platform/artifacts/store.d.ts +2 -0
- package/dist/_internal/platform/artifacts/store.d.ts.map +1 -1
- package/dist/_internal/platform/artifacts/store.js +20 -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 +9 -0
- package/dist/_internal/platform/control-plane/operator-contract-schemas-homegraph.d.ts.map +1 -1
- package/dist/_internal/platform/control-plane/operator-contract-schemas-homegraph.js +15 -1
- package/dist/_internal/platform/knowledge/home-graph/ask-page-refresh.d.ts +11 -0
- package/dist/_internal/platform/knowledge/home-graph/ask-page-refresh.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/home-graph/ask-page-refresh.js +31 -0
- package/dist/_internal/platform/knowledge/home-graph/generated-pages.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/generated-pages.js +89 -20
- package/dist/_internal/platform/knowledge/home-graph/map-view.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/map-view.js +11 -0
- package/dist/_internal/platform/knowledge/home-graph/rendering.d.ts +0 -1
- package/dist/_internal/platform/knowledge/home-graph/rendering.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/rendering.js +0 -12
- package/dist/_internal/platform/knowledge/home-graph/reset.d.ts +2 -1
- package/dist/_internal/platform/knowledge/home-graph/reset.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/reset.js +35 -2
- package/dist/_internal/platform/knowledge/home-graph/search.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/search.js +2 -18
- package/dist/_internal/platform/knowledge/home-graph/service.d.ts +1 -1
- package/dist/_internal/platform/knowledge/home-graph/service.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/service.js +15 -5
- package/dist/_internal/platform/knowledge/home-graph/source-links.d.ts +3 -0
- package/dist/_internal/platform/knowledge/home-graph/source-links.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/home-graph/source-links.js +30 -0
- package/dist/_internal/platform/knowledge/home-graph/state.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/home-graph/state.js +43 -1
- package/dist/_internal/platform/knowledge/home-graph/types.d.ts +14 -1
- package/dist/_internal/platform/knowledge/home-graph/types.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/ingest-compile.js +1 -1
- package/dist/_internal/platform/knowledge/pdf-extractor.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/pdf-extractor.js +8 -3
- package/dist/_internal/platform/knowledge/semantic/answer-fallback.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/answer-fallback.js +11 -16
- package/dist/_internal/platform/knowledge/semantic/answer-source-ranking.d.ts +7 -0
- package/dist/_internal/platform/knowledge/semantic/answer-source-ranking.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/semantic/answer-source-ranking.js +55 -0
- package/dist/_internal/platform/knowledge/semantic/answer.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/answer.js +62 -7
- package/dist/_internal/platform/knowledge/semantic/fact-quality.d.ts +0 -1
- package/dist/_internal/platform/knowledge/semantic/fact-quality.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/fact-quality.js +6 -18
- package/dist/_internal/platform/knowledge/semantic/gap-repair.js +11 -4
- package/dist/_internal/platform/knowledge/semantic/homeassistant-scope.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/homeassistant-scope.js +63 -5
- package/dist/_internal/platform/knowledge/semantic/repair-profile.d.ts +16 -0
- package/dist/_internal/platform/knowledge/semantic/repair-profile.d.ts.map +1 -0
- package/dist/_internal/platform/knowledge/semantic/repair-profile.js +152 -0
- package/dist/_internal/platform/knowledge/semantic/self-improvement-promotion.d.ts +1 -1
- package/dist/_internal/platform/knowledge/semantic/self-improvement-promotion.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/self-improvement-promotion.js +101 -53
- package/dist/_internal/platform/knowledge/semantic/self-improvement.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/self-improvement.js +15 -7
- package/dist/_internal/platform/knowledge/semantic/service.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/service.js +51 -8
- package/dist/_internal/platform/version.js +1 -1
- package/package.json +2 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"product": {
|
|
4
4
|
"id": "goodvibes",
|
|
5
5
|
"surface": "operator",
|
|
6
|
-
"version": "0.28.
|
|
6
|
+
"version": "0.28.17"
|
|
7
7
|
},
|
|
8
8
|
"auth": {
|
|
9
9
|
"modes": [
|
|
@@ -28012,6 +28012,60 @@
|
|
|
28012
28012
|
"minConfidence": {
|
|
28013
28013
|
"type": "number"
|
|
28014
28014
|
},
|
|
28015
|
+
"objectKinds": {
|
|
28016
|
+
"type": "array",
|
|
28017
|
+
"items": {
|
|
28018
|
+
"type": "string"
|
|
28019
|
+
}
|
|
28020
|
+
},
|
|
28021
|
+
"entityIds": {
|
|
28022
|
+
"type": "array",
|
|
28023
|
+
"items": {
|
|
28024
|
+
"type": "string"
|
|
28025
|
+
}
|
|
28026
|
+
},
|
|
28027
|
+
"deviceIds": {
|
|
28028
|
+
"type": "array",
|
|
28029
|
+
"items": {
|
|
28030
|
+
"type": "string"
|
|
28031
|
+
}
|
|
28032
|
+
},
|
|
28033
|
+
"areaIds": {
|
|
28034
|
+
"type": "array",
|
|
28035
|
+
"items": {
|
|
28036
|
+
"type": "string"
|
|
28037
|
+
}
|
|
28038
|
+
},
|
|
28039
|
+
"integrationIds": {
|
|
28040
|
+
"type": "array",
|
|
28041
|
+
"items": {
|
|
28042
|
+
"type": "string"
|
|
28043
|
+
}
|
|
28044
|
+
},
|
|
28045
|
+
"integrationDomains": {
|
|
28046
|
+
"type": "array",
|
|
28047
|
+
"items": {
|
|
28048
|
+
"type": "string"
|
|
28049
|
+
}
|
|
28050
|
+
},
|
|
28051
|
+
"domains": {
|
|
28052
|
+
"type": "array",
|
|
28053
|
+
"items": {
|
|
28054
|
+
"type": "string"
|
|
28055
|
+
}
|
|
28056
|
+
},
|
|
28057
|
+
"deviceClasses": {
|
|
28058
|
+
"type": "array",
|
|
28059
|
+
"items": {
|
|
28060
|
+
"type": "string"
|
|
28061
|
+
}
|
|
28062
|
+
},
|
|
28063
|
+
"labels": {
|
|
28064
|
+
"type": "array",
|
|
28065
|
+
"items": {
|
|
28066
|
+
"type": "string"
|
|
28067
|
+
}
|
|
28068
|
+
},
|
|
28015
28069
|
"ha": {
|
|
28016
28070
|
"type": "object",
|
|
28017
28071
|
"properties": {
|
|
@@ -30087,6 +30141,9 @@
|
|
|
30087
30141
|
},
|
|
30088
30142
|
"dryRun": {
|
|
30089
30143
|
"type": "boolean"
|
|
30144
|
+
},
|
|
30145
|
+
"preserveArtifacts": {
|
|
30146
|
+
"type": "boolean"
|
|
30090
30147
|
}
|
|
30091
30148
|
},
|
|
30092
30149
|
"additionalProperties": true
|
|
@@ -30133,6 +30190,15 @@
|
|
|
30133
30190
|
]
|
|
30134
30191
|
}
|
|
30135
30192
|
},
|
|
30193
|
+
"artifactDeleteCandidates": {
|
|
30194
|
+
"type": "number"
|
|
30195
|
+
},
|
|
30196
|
+
"deletedArtifacts": {
|
|
30197
|
+
"type": "number"
|
|
30198
|
+
},
|
|
30199
|
+
"preservedArtifacts": {
|
|
30200
|
+
"type": "number"
|
|
30201
|
+
},
|
|
30136
30202
|
"artifactsDeleted": {
|
|
30137
30203
|
"type": "boolean"
|
|
30138
30204
|
}
|
|
@@ -30143,6 +30209,9 @@
|
|
|
30143
30209
|
"installationId",
|
|
30144
30210
|
"dryRun",
|
|
30145
30211
|
"deleted",
|
|
30212
|
+
"artifactDeleteCandidates",
|
|
30213
|
+
"deletedArtifacts",
|
|
30214
|
+
"preservedArtifacts",
|
|
30146
30215
|
"artifactsDeleted"
|
|
30147
30216
|
],
|
|
30148
30217
|
"additionalProperties": true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Synced from packages/contracts/src/generated/foundation-metadata.ts
|
|
2
2
|
export const FOUNDATION_METADATA = {
|
|
3
3
|
"productId": "goodvibes",
|
|
4
|
-
"productVersion": "0.28.
|
|
4
|
+
"productVersion": "0.28.17",
|
|
5
5
|
"operatorMethodCount": 265,
|
|
6
6
|
"operatorEventCount": 30,
|
|
7
7
|
"peerEndpointCount": 6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-contract.d.ts","sourceRoot":"","sources":["../../../../src/_internal/contracts/generated/operator-contract.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"operator-contract.d.ts","sourceRoot":"","sources":["../../../../src/_internal/contracts/generated/operator-contract.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,iBAAiB,EAAE,wBA6wmEtB,CAAC"}
|
|
@@ -3,7 +3,7 @@ export const OPERATOR_CONTRACT = {
|
|
|
3
3
|
"product": {
|
|
4
4
|
"id": "goodvibes",
|
|
5
5
|
"surface": "operator",
|
|
6
|
-
"version": "0.28.
|
|
6
|
+
"version": "0.28.17"
|
|
7
7
|
},
|
|
8
8
|
"auth": {
|
|
9
9
|
"modes": [
|
|
@@ -28012,6 +28012,60 @@ export const OPERATOR_CONTRACT = {
|
|
|
28012
28012
|
"minConfidence": {
|
|
28013
28013
|
"type": "number"
|
|
28014
28014
|
},
|
|
28015
|
+
"objectKinds": {
|
|
28016
|
+
"type": "array",
|
|
28017
|
+
"items": {
|
|
28018
|
+
"type": "string"
|
|
28019
|
+
}
|
|
28020
|
+
},
|
|
28021
|
+
"entityIds": {
|
|
28022
|
+
"type": "array",
|
|
28023
|
+
"items": {
|
|
28024
|
+
"type": "string"
|
|
28025
|
+
}
|
|
28026
|
+
},
|
|
28027
|
+
"deviceIds": {
|
|
28028
|
+
"type": "array",
|
|
28029
|
+
"items": {
|
|
28030
|
+
"type": "string"
|
|
28031
|
+
}
|
|
28032
|
+
},
|
|
28033
|
+
"areaIds": {
|
|
28034
|
+
"type": "array",
|
|
28035
|
+
"items": {
|
|
28036
|
+
"type": "string"
|
|
28037
|
+
}
|
|
28038
|
+
},
|
|
28039
|
+
"integrationIds": {
|
|
28040
|
+
"type": "array",
|
|
28041
|
+
"items": {
|
|
28042
|
+
"type": "string"
|
|
28043
|
+
}
|
|
28044
|
+
},
|
|
28045
|
+
"integrationDomains": {
|
|
28046
|
+
"type": "array",
|
|
28047
|
+
"items": {
|
|
28048
|
+
"type": "string"
|
|
28049
|
+
}
|
|
28050
|
+
},
|
|
28051
|
+
"domains": {
|
|
28052
|
+
"type": "array",
|
|
28053
|
+
"items": {
|
|
28054
|
+
"type": "string"
|
|
28055
|
+
}
|
|
28056
|
+
},
|
|
28057
|
+
"deviceClasses": {
|
|
28058
|
+
"type": "array",
|
|
28059
|
+
"items": {
|
|
28060
|
+
"type": "string"
|
|
28061
|
+
}
|
|
28062
|
+
},
|
|
28063
|
+
"labels": {
|
|
28064
|
+
"type": "array",
|
|
28065
|
+
"items": {
|
|
28066
|
+
"type": "string"
|
|
28067
|
+
}
|
|
28068
|
+
},
|
|
28015
28069
|
"ha": {
|
|
28016
28070
|
"type": "object",
|
|
28017
28071
|
"properties": {
|
|
@@ -30087,6 +30141,9 @@ export const OPERATOR_CONTRACT = {
|
|
|
30087
30141
|
},
|
|
30088
30142
|
"dryRun": {
|
|
30089
30143
|
"type": "boolean"
|
|
30144
|
+
},
|
|
30145
|
+
"preserveArtifacts": {
|
|
30146
|
+
"type": "boolean"
|
|
30090
30147
|
}
|
|
30091
30148
|
},
|
|
30092
30149
|
"additionalProperties": true
|
|
@@ -30133,6 +30190,15 @@ export const OPERATOR_CONTRACT = {
|
|
|
30133
30190
|
]
|
|
30134
30191
|
}
|
|
30135
30192
|
},
|
|
30193
|
+
"artifactDeleteCandidates": {
|
|
30194
|
+
"type": "number"
|
|
30195
|
+
},
|
|
30196
|
+
"deletedArtifacts": {
|
|
30197
|
+
"type": "number"
|
|
30198
|
+
},
|
|
30199
|
+
"preservedArtifacts": {
|
|
30200
|
+
"type": "number"
|
|
30201
|
+
},
|
|
30136
30202
|
"artifactsDeleted": {
|
|
30137
30203
|
"type": "boolean"
|
|
30138
30204
|
}
|
|
@@ -30143,6 +30209,9 @@ export const OPERATOR_CONTRACT = {
|
|
|
30143
30209
|
"installationId",
|
|
30144
30210
|
"dryRun",
|
|
30145
30211
|
"deleted",
|
|
30212
|
+
"artifactDeleteCandidates",
|
|
30213
|
+
"deletedArtifacts",
|
|
30214
|
+
"preservedArtifacts",
|
|
30146
30215
|
"artifactsDeleted"
|
|
30147
30216
|
],
|
|
30148
30217
|
"additionalProperties": true
|
|
@@ -28,6 +28,8 @@ export declare class ArtifactStore {
|
|
|
28
28
|
list(limit?: number): ArtifactDescriptor[];
|
|
29
29
|
get(id: string): ArtifactDescriptor | null;
|
|
30
30
|
getRecord(id: string): ArtifactRecord | null;
|
|
31
|
+
delete(id: string): boolean;
|
|
32
|
+
deleteMany(ids: Iterable<string>): number;
|
|
31
33
|
readContent(id: string): Promise<{
|
|
32
34
|
record: ArtifactRecord;
|
|
33
35
|
buffer: Buffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/artifacts/store.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SA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@ -228,6 +228,26 @@ export class ArtifactStore {
|
|
|
228
228
|
this.pruneExpired();
|
|
229
229
|
return this.records.get(id) ?? null;
|
|
230
230
|
}
|
|
231
|
+
delete(id) {
|
|
232
|
+
this.pruneExpired();
|
|
233
|
+
const record = this.records.get(id);
|
|
234
|
+
if (!record)
|
|
235
|
+
return false;
|
|
236
|
+
this.removeRecordFiles(record);
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
239
|
+
deleteMany(ids) {
|
|
240
|
+
let deleted = 0;
|
|
241
|
+
const seen = new Set();
|
|
242
|
+
for (const id of ids) {
|
|
243
|
+
if (seen.has(id))
|
|
244
|
+
continue;
|
|
245
|
+
seen.add(id);
|
|
246
|
+
if (this.delete(id))
|
|
247
|
+
deleted += 1;
|
|
248
|
+
}
|
|
249
|
+
return deleted;
|
|
250
|
+
}
|
|
231
251
|
async readContent(id) {
|
|
232
252
|
this.pruneExpired();
|
|
233
253
|
const record = this.records.get(id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-catalog-homegraph.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/method-catalog-homegraph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAyE1E,eAAO,MAAM,wCAAwC,EAAE,SAAS,uBAAuB,
|
|
1
|
+
{"version":3,"file":"method-catalog-homegraph.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/method-catalog-homegraph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAyE1E,eAAO,MAAM,wCAAwC,EAAE,SAAS,uBAAuB,EA8UtF,CAAC"}
|
|
@@ -303,6 +303,15 @@ export const builtinGatewayHomeGraphMethodDescriptors = [
|
|
|
303
303
|
edgeRelations: STRING_LIST_SCHEMA,
|
|
304
304
|
tags: STRING_LIST_SCHEMA,
|
|
305
305
|
minConfidence: NUMBER_SCHEMA,
|
|
306
|
+
objectKinds: STRING_LIST_SCHEMA,
|
|
307
|
+
entityIds: STRING_LIST_SCHEMA,
|
|
308
|
+
deviceIds: STRING_LIST_SCHEMA,
|
|
309
|
+
areaIds: STRING_LIST_SCHEMA,
|
|
310
|
+
integrationIds: STRING_LIST_SCHEMA,
|
|
311
|
+
integrationDomains: STRING_LIST_SCHEMA,
|
|
312
|
+
domains: STRING_LIST_SCHEMA,
|
|
313
|
+
deviceClasses: STRING_LIST_SCHEMA,
|
|
314
|
+
labels: STRING_LIST_SCHEMA,
|
|
306
315
|
ha: objectSchema({
|
|
307
316
|
objectKinds: STRING_LIST_SCHEMA,
|
|
308
317
|
entityIds: STRING_LIST_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-contract-schemas-homegraph.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/operator-contract-schemas-homegraph.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,6BAA6B,yBAGJ,CAAC;AAEvC,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"operator-contract-schemas-homegraph.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/control-plane/operator-contract-schemas-homegraph.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,6BAA6B,yBAGJ,CAAC;AAEvC,eAAO,MAAM,6BAA6B,yBAKJ,CAAC;AAEvC,eAAO,MAAM,wBAAwB,yBAY4H,CAAC;AAElK,eAAO,MAAM,6BAA6B,yBAkBiF,CAAC;AAE5H,eAAO,MAAM,+BAA+B,yBAOmB,CAAC;AAEhE,eAAO,MAAM,6BAA6B,yBAKmB,CAAC;AAE9D,eAAO,MAAM,4BAA4B,yBAM0C,CAAC;AAEpF,eAAO,MAAM,4BAA4B,yBAA8B,CAAC;AAExE,eAAO,MAAM,gCAAgC,yBAoB2E,CAAC;AAEzH,eAAO,MAAM,mCAAmC,yBAQsC,CAAC;AAEvF,eAAO,MAAM,+BAA+B,yBAImB,CAAC;AAEhE,eAAO,MAAM,gCAAgC,yBAImB,CAAC;AAEjE,eAAO,MAAM,8BAA8B,yBAImB,CAAC;AAE/D,eAAO,MAAM,+BAA+B,yBAOgD,CAAC;AAE7F,eAAO,MAAM,+BAA+B,yBAMS,CAAC;AAEtD,eAAO,MAAM,yCAAyC,yBAIQ,CAAC;AAE/D,eAAO,MAAM,wCAAwC,yBAIQ,CAAC;AAE9D,eAAO,MAAM,uCAAuC,yBAIW,CAAC;AAEhE,eAAO,MAAM,+BAA+B,yBAUoG,CAAC;AAEjJ,eAAO,MAAM,+BAA+B,yBAIqB,CAAC;AAElE,eAAO,MAAM,8BAA8B,yBAoBT,CAAC"}
|
|
@@ -9,6 +9,7 @@ export const HOME_GRAPH_RESET_INPUT_SCHEMA = objectSchema({
|
|
|
9
9
|
installationId: STRING_SCHEMA,
|
|
10
10
|
knowledgeSpaceId: STRING_SCHEMA,
|
|
11
11
|
dryRun: BOOLEAN_SCHEMA,
|
|
12
|
+
preserveArtifacts: BOOLEAN_SCHEMA,
|
|
12
13
|
}, [], { additionalProperties: true });
|
|
13
14
|
export const HOME_GRAPH_STATUS_SCHEMA = objectSchema({
|
|
14
15
|
ok: BOOLEAN_SCHEMA,
|
|
@@ -161,5 +162,18 @@ export const HOME_GRAPH_RESET_OUTPUT_SCHEMA = objectSchema({
|
|
|
161
162
|
installationId: STRING_SCHEMA,
|
|
162
163
|
dryRun: BOOLEAN_SCHEMA,
|
|
163
164
|
deleted: JSON_RECORD_SCHEMA,
|
|
165
|
+
artifactDeleteCandidates: NUMBER_SCHEMA,
|
|
166
|
+
deletedArtifacts: NUMBER_SCHEMA,
|
|
167
|
+
preservedArtifacts: NUMBER_SCHEMA,
|
|
164
168
|
artifactsDeleted: BOOLEAN_SCHEMA,
|
|
165
|
-
}, [
|
|
169
|
+
}, [
|
|
170
|
+
'ok',
|
|
171
|
+
'spaceId',
|
|
172
|
+
'installationId',
|
|
173
|
+
'dryRun',
|
|
174
|
+
'deleted',
|
|
175
|
+
'artifactDeleteCandidates',
|
|
176
|
+
'deletedArtifacts',
|
|
177
|
+
'preservedArtifacts',
|
|
178
|
+
'artifactsDeleted',
|
|
179
|
+
], { additionalProperties: true });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ArtifactStore } from '../../artifacts/index.js';
|
|
2
|
+
import type { KnowledgeStore } from '../store.js';
|
|
3
|
+
import type { HomeGraphAskResult } from './types.js';
|
|
4
|
+
export declare function refreshDevicePagesForHomeGraphAsk(input: {
|
|
5
|
+
readonly store: KnowledgeStore;
|
|
6
|
+
readonly artifactStore: ArtifactStore;
|
|
7
|
+
readonly spaceId: string;
|
|
8
|
+
readonly installationId: string;
|
|
9
|
+
readonly answer: HomeGraphAskResult;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=ask-page-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-page-refresh.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/ask-page-refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,wBAAsB,iCAAiC,CAAC,KAAK,EAAE;IAC7D,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBhB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { readRecord } from './helpers.js';
|
|
2
|
+
import { refreshHomeGraphDevicePassport } from './generated-pages.js';
|
|
3
|
+
export async function refreshDevicePagesForHomeGraphAsk(input) {
|
|
4
|
+
if ((input.answer.answer.facts?.length ?? 0) === 0 && input.answer.answer.sources.length === 0)
|
|
5
|
+
return;
|
|
6
|
+
const devices = input.answer.answer.linkedObjects.filter((node) => node.kind === 'ha_device').slice(0, 2);
|
|
7
|
+
for (const device of devices) {
|
|
8
|
+
const deviceId = readHomeAssistantObjectId(device) ?? device.id;
|
|
9
|
+
try {
|
|
10
|
+
await refreshHomeGraphDevicePassport({
|
|
11
|
+
store: input.store,
|
|
12
|
+
artifactStore: input.artifactStore,
|
|
13
|
+
spaceId: input.spaceId,
|
|
14
|
+
installationId: input.installationId,
|
|
15
|
+
input: {
|
|
16
|
+
knowledgeSpaceId: input.spaceId,
|
|
17
|
+
deviceId,
|
|
18
|
+
metadata: { automation: 'ask-refresh' },
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// Ask should never fail solely because a generated page refresh failed.
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function readHomeAssistantObjectId(node) {
|
|
28
|
+
const homeAssistant = readRecord(node.metadata.homeAssistant);
|
|
29
|
+
const value = homeAssistant.objectId ?? homeAssistant.deviceId;
|
|
30
|
+
return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
|
|
31
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-pages.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/generated-pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAM9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"generated-pages.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/generated-pages.ts"],"names":[],"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CAAE,GAC3E,OAAO,CAAC,yBAAyB,GAAG;IAAE,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAC,CAyB5E"}
|
|
@@ -3,8 +3,9 @@ import { yieldEvery, yieldToEventLoop } from '../cooperative.js';
|
|
|
3
3
|
import { HOME_GRAPH_CONNECTOR_ID, buildHomeGraphMetadata, edgeIsActive, homeGraphNodeId, homeGraphSourceId, isGeneratedPageSource, namespacedCanonicalUri, readRecord, uniqueStrings, } from './helpers.js';
|
|
4
4
|
import { findHomeAssistantNode, missingDevicePassportFields, readHomeGraphState, renderHomeGraphState, safeHomeGraphFilename, sourcesLinkedToNode, } from './state.js';
|
|
5
5
|
import { issuesForScope, renderDevicePassportPage, renderPacketPage, renderRoomPage, } from './rendering.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { isUsefulHomeGraphPageFact } from '../semantic/fact-quality.js';
|
|
7
|
+
import { deriveRepairProfileFacts } from '../semantic/repair-profile.js';
|
|
8
|
+
import { semanticHash, semanticSlug, sourceSemanticText } from '../semantic/utils.js';
|
|
8
9
|
export const HOME_GRAPH_PAGE_POLICY_VERSION = 'homegraph-pages-v7';
|
|
9
10
|
const DEFAULT_SYNC_DEVICE_PASSPORT_LIMIT = 32;
|
|
10
11
|
const DEFAULT_SYNC_ROOM_PAGE_LIMIT = 12;
|
|
@@ -126,9 +127,13 @@ export async function refreshHomeGraphDevicePassport(context) {
|
|
|
126
127
|
&& edge.toKind === 'node'
|
|
127
128
|
&& edge.toId === device.id
|
|
128
129
|
&& edge.relation === 'belongs_to_device'))));
|
|
129
|
-
const sources = sourcesLinkedToNode(device.id, state)
|
|
130
|
-
|
|
131
|
-
const
|
|
130
|
+
const sources = sourcesLinkedToNode(device.id, state)
|
|
131
|
+
.filter((source) => !isGeneratedPageSource(source));
|
|
132
|
+
const pageProfileFacts = await upsertDevicePageProfileFacts({ store, spaceId, installationId, device, sources });
|
|
133
|
+
const semanticFacts = uniqueNodesById([
|
|
134
|
+
...semanticFactsForNode(device.id, sources, state.nodes, state.edges),
|
|
135
|
+
...pageProfileFacts,
|
|
136
|
+
]);
|
|
132
137
|
const scopedNodeIds = new Set([device.id, ...entities.map((node) => node.id)]);
|
|
133
138
|
const issues = issuesForScope(state.issues, state.edges, scopedNodeIds, sources);
|
|
134
139
|
const missingFields = missingDevicePassportFields(device, sources);
|
|
@@ -155,7 +160,7 @@ export async function refreshHomeGraphDevicePassport(context) {
|
|
|
155
160
|
relation: 'source_for',
|
|
156
161
|
metadata: buildHomeGraphMetadata(spaceId, installationId),
|
|
157
162
|
});
|
|
158
|
-
const markdown = renderDevicePassportPage({ spaceId, device, entities, sources, issues, missingFields, semanticFacts
|
|
163
|
+
const markdown = renderDevicePassportPage({ spaceId, device, entities, sources, issues, missingFields, semanticFacts });
|
|
159
164
|
const generated = await materializeGeneratedMarkdown({
|
|
160
165
|
store,
|
|
161
166
|
artifactStore,
|
|
@@ -353,22 +358,86 @@ function semanticFactsLinkedToSources(sources, nodes, edges) {
|
|
|
353
358
|
&& edge.relation === 'supports_fact')).map((edge) => edge.toId));
|
|
354
359
|
return nodes.filter((node) => factIds.has(node.id) && isUsefulHomeGraphPageFact(node));
|
|
355
360
|
}
|
|
356
|
-
function
|
|
357
|
-
const
|
|
358
|
-
for (const
|
|
359
|
-
|
|
360
|
-
|
|
361
|
+
function semanticFactsForNode(nodeId, sources, nodes, edges) {
|
|
362
|
+
const factIds = new Set();
|
|
363
|
+
for (const edge of edges) {
|
|
364
|
+
if (edgeIsActive(edge)
|
|
365
|
+
&& edge.fromKind === 'node'
|
|
366
|
+
&& edge.toKind === 'node'
|
|
367
|
+
&& edge.toId === nodeId
|
|
368
|
+
&& edge.relation === 'describes') {
|
|
369
|
+
factIds.add(edge.fromId);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
for (const fact of semanticFactsLinkedToSources(sources, nodes, edges)) {
|
|
373
|
+
factIds.add(fact.id);
|
|
374
|
+
}
|
|
375
|
+
return nodes.filter((node) => factIds.has(node.id) && isUsefulHomeGraphPageFact(node));
|
|
376
|
+
}
|
|
377
|
+
async function upsertDevicePageProfileFacts(input) {
|
|
378
|
+
const facts = [];
|
|
379
|
+
for (const source of input.sources.slice(0, 8)) {
|
|
380
|
+
const extraction = input.store.getExtractionBySourceId(source.id);
|
|
381
|
+
const profileFacts = deriveRepairProfileFacts({
|
|
382
|
+
query: `complete features specifications ${input.device.title}`,
|
|
383
|
+
source,
|
|
384
|
+
text: sourceSemanticText(source, extraction),
|
|
385
|
+
});
|
|
386
|
+
for (const profileFact of profileFacts) {
|
|
387
|
+
const fact = await input.store.upsertNode({
|
|
388
|
+
id: `sem-fact-${semanticHash(input.spaceId, source.id, input.device.id, profileFact.title, profileFact.value ?? profileFact.summary)}`,
|
|
389
|
+
kind: 'fact',
|
|
390
|
+
slug: semanticSlug(`${input.spaceId}-${input.device.title}-${profileFact.title}-${source.id}`),
|
|
391
|
+
title: profileFact.title,
|
|
392
|
+
summary: profileFact.summary,
|
|
393
|
+
aliases: profileFact.aliases,
|
|
394
|
+
status: 'active',
|
|
395
|
+
confidence: 72,
|
|
396
|
+
sourceId: source.id,
|
|
397
|
+
metadata: buildHomeGraphMetadata(input.spaceId, input.installationId, {
|
|
398
|
+
semanticKind: 'fact',
|
|
399
|
+
factKind: profileFact.kind,
|
|
400
|
+
value: profileFact.value,
|
|
401
|
+
evidence: profileFact.evidence,
|
|
402
|
+
labels: profileFact.labels,
|
|
403
|
+
sourceId: source.id,
|
|
404
|
+
linkedObjectIds: [input.device.id],
|
|
405
|
+
extractor: 'page-profile',
|
|
406
|
+
}),
|
|
407
|
+
});
|
|
408
|
+
await input.store.upsertEdge({
|
|
409
|
+
fromKind: 'source',
|
|
410
|
+
fromId: source.id,
|
|
411
|
+
toKind: 'node',
|
|
412
|
+
toId: fact.id,
|
|
413
|
+
relation: 'supports_fact',
|
|
414
|
+
weight: 0.78,
|
|
415
|
+
metadata: buildHomeGraphMetadata(input.spaceId, input.installationId, {
|
|
416
|
+
linkedBy: 'generated-page-profile',
|
|
417
|
+
}),
|
|
418
|
+
});
|
|
419
|
+
await input.store.upsertEdge({
|
|
420
|
+
fromKind: 'node',
|
|
421
|
+
fromId: fact.id,
|
|
422
|
+
toKind: 'node',
|
|
423
|
+
toId: input.device.id,
|
|
424
|
+
relation: 'describes',
|
|
425
|
+
weight: 0.76,
|
|
426
|
+
metadata: buildHomeGraphMetadata(input.spaceId, input.installationId, {
|
|
427
|
+
linkedBy: 'generated-page-profile',
|
|
428
|
+
sourceId: source.id,
|
|
429
|
+
}),
|
|
430
|
+
});
|
|
431
|
+
facts.push(fact);
|
|
432
|
+
}
|
|
361
433
|
}
|
|
362
|
-
return
|
|
434
|
+
return facts;
|
|
363
435
|
}
|
|
364
|
-
function
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
.
|
|
368
|
-
|
|
369
|
-
.filter((part) => hasConcreteFeatureSignal(part))
|
|
370
|
-
.filter((part) => isUsefulHomeGraphSourceBackedNote(part))
|
|
371
|
-
.filter((part) => !isLowValueFeatureOrSpecText(part));
|
|
436
|
+
function uniqueNodesById(nodes) {
|
|
437
|
+
const byId = new Map();
|
|
438
|
+
for (const node of nodes)
|
|
439
|
+
byId.set(node.id, node);
|
|
440
|
+
return [...byId.values()];
|
|
372
441
|
}
|
|
373
442
|
function limitRecords(records, limit) {
|
|
374
443
|
if (typeof limit !== 'number')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-view.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/map-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAExE,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG;IAC5D,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,GAAG,OAAO,CAAC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"map-view.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/map-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAExE,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG;IAC5D,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAkB9B"}
|
|
@@ -6,6 +6,17 @@ export async function mapHomeGraph(input) {
|
|
|
6
6
|
const { spaceId } = resolveReadableHomeGraphSpace(input.store, input);
|
|
7
7
|
return renderHomeGraphMap(renderHomeGraphState(input.store, spaceId, 'Home Graph Map'), {
|
|
8
8
|
...input,
|
|
9
|
+
ha: {
|
|
10
|
+
objectKinds: input.ha?.objectKinds ?? input.objectKinds,
|
|
11
|
+
entityIds: input.ha?.entityIds ?? input.entityIds,
|
|
12
|
+
deviceIds: input.ha?.deviceIds ?? input.deviceIds,
|
|
13
|
+
areaIds: input.ha?.areaIds ?? input.areaIds,
|
|
14
|
+
integrationIds: input.ha?.integrationIds ?? input.integrationIds,
|
|
15
|
+
integrationDomains: input.ha?.integrationDomains ?? input.integrationDomains,
|
|
16
|
+
domains: input.ha?.domains ?? input.domains,
|
|
17
|
+
deviceClasses: input.ha?.deviceClasses ?? input.deviceClasses,
|
|
18
|
+
labels: input.ha?.labels ?? input.labels,
|
|
19
|
+
},
|
|
9
20
|
knowledgeSpaceId: spaceId,
|
|
10
21
|
});
|
|
11
22
|
}
|
|
@@ -17,7 +17,6 @@ export declare function renderDevicePassportPage(input: {
|
|
|
17
17
|
readonly issues: readonly KnowledgeIssueRecord[];
|
|
18
18
|
readonly missingFields: readonly string[];
|
|
19
19
|
readonly semanticFacts?: readonly KnowledgeNodeRecord[];
|
|
20
|
-
readonly sourceBackedNotes?: readonly string[];
|
|
21
20
|
}): string;
|
|
22
21
|
export declare function renderPacketPage(state: HomeGraphRenderState, options?: {
|
|
23
22
|
readonly packetKind?: string;
|
|
@@ -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,EAEpB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAA6B,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMnG,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,CA2CnF;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACjD,QAAQ,CAAC,aAAa,EAAE,SAAS,MA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CACzD,GAAG,MAAM,CAyBT;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,EAAE,OAAO,GAAE;IACrE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC,GAAG,MAAM,CAkBd;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,EAAE,OAAO,GAAE,iBAAsB,GAAG,kBAAkB,CAcnH;AA+SD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,oBAAoB,EAAE,EACvC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAC5B,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,oBAAoB,EAAE,CAUxB"}
|
|
@@ -61,7 +61,6 @@ export function renderDevicePassportPage(input) {
|
|
|
61
61
|
'',
|
|
62
62
|
renderNodeList('Entities Exposed To Home Assistant', input.entities),
|
|
63
63
|
renderSemanticFacts('Verified Device Facts', input.semanticFacts ?? []),
|
|
64
|
-
renderTextList('Source-Backed Features And Notes', input.sourceBackedNotes ?? []),
|
|
65
64
|
renderSourceList('Sources', input.sources),
|
|
66
65
|
renderIssueList('Open Issues', input.issues.filter((issue) => issue.status === 'open')),
|
|
67
66
|
input.missingFields.length > 0
|
|
@@ -315,17 +314,6 @@ function renderSemanticFacts(title, facts) {
|
|
|
315
314
|
]),
|
|
316
315
|
].join('\n');
|
|
317
316
|
}
|
|
318
|
-
function renderTextList(title, items) {
|
|
319
|
-
const entries = uniqueStrings(items).slice(0, 80);
|
|
320
|
-
if (entries.length === 0)
|
|
321
|
-
return '';
|
|
322
|
-
return [
|
|
323
|
-
`## ${title}`,
|
|
324
|
-
'',
|
|
325
|
-
...entries.map((item) => `- ${item}`),
|
|
326
|
-
'',
|
|
327
|
-
].join('\n');
|
|
328
|
-
}
|
|
329
317
|
function semanticFactsLinkedToSources(sources, nodes, edges) {
|
|
330
318
|
const sourceIds = new Set(sources.map((source) => source.id));
|
|
331
319
|
const factIds = new Set(edges.filter((edge) => (edgeIsActive(edge)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { ArtifactStore } from '../../artifacts/index.js';
|
|
1
2
|
import type { KnowledgeStore } from '../store.js';
|
|
2
3
|
import type { HomeGraphResetInput, HomeGraphResetResult } from './types.js';
|
|
3
|
-
export declare function resetHomeGraphSpace(store: KnowledgeStore, input: HomeGraphResetInput): Promise<HomeGraphResetResult>;
|
|
4
|
+
export declare function resetHomeGraphSpace(store: KnowledgeStore, artifactStore: ArtifactStore, input: HomeGraphResetInput): Promise<HomeGraphResetResult>;
|
|
4
5
|
//# sourceMappingURL=reset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/reset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE5E,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/reset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE5E,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,cAAc,EACrB,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,oBAAoB,CAAC,CAsB/B"}
|