@pellux/goodvibes-sdk 0.27.8 → 0.27.9
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 +1 -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.js +1 -1
- package/dist/_internal/platform/knowledge/home-graph/ask.js +4 -4
- package/dist/_internal/platform/knowledge/semantic/answer.js +1 -0
- package/dist/_internal/platform/knowledge/semantic/fact-quality.d.ts.map +1 -1
- package/dist/_internal/platform/knowledge/semantic/fact-quality.js +10 -1
- package/dist/_internal/platform/version.js +1 -1
- package/package.json +1 -1
|
@@ -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.27.
|
|
4
|
+
"productVersion": "0.27.9",
|
|
5
5
|
"operatorMethodCount": 256,
|
|
6
6
|
"operatorEventCount": 30,
|
|
7
7
|
"peerEndpointCount": 6
|
|
@@ -3,10 +3,6 @@ export async function answerHomeGraphQuery(input) {
|
|
|
3
3
|
const sources = input.results.flatMap((result) => result.source ? [result.source] : []);
|
|
4
4
|
const linkedObjects = collectLinkedObjects(input.results, input.state);
|
|
5
5
|
if (input.semanticService) {
|
|
6
|
-
void input.semanticService.enrichSources(uniqueSources(sources), {
|
|
7
|
-
knowledgeSpaceId: input.spaceId,
|
|
8
|
-
limit: Math.min(3, Math.max(1, sources.length)),
|
|
9
|
-
}).catch(() => { });
|
|
10
6
|
const answer = await input.semanticService.answer({
|
|
11
7
|
query: input.query.query,
|
|
12
8
|
knowledgeSpaceId: input.spaceId,
|
|
@@ -21,6 +17,10 @@ export async function answerHomeGraphQuery(input) {
|
|
|
21
17
|
linkedObjects,
|
|
22
18
|
noMatchMessage: `No Home Graph knowledge matched "${input.query.query}".`,
|
|
23
19
|
});
|
|
20
|
+
void input.semanticService.enrichSources(uniqueSources(sources), {
|
|
21
|
+
knowledgeSpaceId: input.spaceId,
|
|
22
|
+
limit: Math.min(3, Math.max(1, sources.length)),
|
|
23
|
+
}).catch(() => { });
|
|
24
24
|
return {
|
|
25
25
|
ok: true,
|
|
26
26
|
spaceId: input.spaceId,
|
|
@@ -172,6 +172,7 @@ async function synthesizeAnswer(llm, query, mode, evidence) {
|
|
|
172
172
|
'You answer questions from a GoodVibes self-improving knowledge wiki.',
|
|
173
173
|
'Use only the supplied evidence. Synthesize the answer for the user intent rather than dumping snippets.',
|
|
174
174
|
'If evidence is insufficient, say what is missing. Prefer concrete features, specs, procedures, and relationships.',
|
|
175
|
+
'For feature or specification questions, ignore manual boilerplate about accessories, cable recommendations, button maps, batteries, cleaning, servicing, safety, and future product changes unless the user asks about those topics.',
|
|
175
176
|
'Return only JSON with answer, confidence, usedSourceIds, usedNodeIds, and optional gaps.',
|
|
176
177
|
].join(' '),
|
|
177
178
|
prompt: JSON.stringify({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fact-quality.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/semantic/fact-quality.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAcvD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAK/E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAQlE;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"fact-quality.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/semantic/fact-quality.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAcvD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAK/E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAQlE;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAyCjE;AAWD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAa5E"}
|
|
@@ -46,7 +46,16 @@ export function isLowValueFeatureOrSpecText(text) {
|
|
|
46
46
|
if (!magicRemoteDetail && /\b(may vary|depending (upon|on) (the )?model|depending on country|depending on region)\b/.test(lower)) {
|
|
47
47
|
return true;
|
|
48
48
|
}
|
|
49
|
-
if (/\b(fasten|screws?|stand|tip over|overturn|fall over|transporting|move the tv|moving the tv|oils?|lubricants?|cleaning cloth|dry cloth|power cord|electric shock|fire hazard|near water|ventilation|antenna grounding|qualified personnel|customer service|servicing|repair is required|refer all servicing)\b/.test(lower)) {
|
|
49
|
+
if (/\b(fasten|screws?|stand|tip over|overturn|fall over|transporting|move the tv|moving the tv|oils?|lubricants?|cleaning cloth|dry cloth|power cord|electric shock|fire hazard|near water|ventilation|antenna grounding|qualified personnel|qualified service personnel|service personnel|customer service|servicing|repair is required|refer all servicing)\b/.test(lower)) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
if (/\b(infrared light|remote control sensor|point (the )?(magic )?remote|aim (the )?(magic )?remote)\b/.test(lower)) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
if (/\bif (the )?device (doesn'?t|does not) support\b/.test(lower) && /\bmay not work properly\b/.test(lower)) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
if (/\bchange\b/.test(lower) && /\bsetting to off\b/.test(lower)) {
|
|
50
59
|
return true;
|
|
51
60
|
}
|
|
52
61
|
if (/\bbatter(y|ies)\b/.test(lower) && /\b(remote|magic remote|button)\b/.test(lower)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
let version = '0.27.
|
|
3
|
+
let version = '0.27.9';
|
|
4
4
|
try {
|
|
5
5
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', '..', 'package.json'), 'utf-8'));
|
|
6
6
|
version = pkg.version ?? version;
|