@pellux/goodvibes-sdk 0.28.8 → 0.28.10

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.
Files changed (48) hide show
  1. package/dist/_internal/contracts/artifacts/operator-contract.json +89 -4
  2. package/dist/_internal/contracts/generated/foundation-metadata.d.ts +2 -2
  3. package/dist/_internal/contracts/generated/foundation-metadata.js +2 -2
  4. package/dist/_internal/contracts/generated/operator-contract.d.ts.map +1 -1
  5. package/dist/_internal/contracts/generated/operator-contract.js +89 -4
  6. package/dist/_internal/contracts/generated/operator-method-ids.d.ts +1 -1
  7. package/dist/_internal/contracts/generated/operator-method-ids.d.ts.map +1 -1
  8. package/dist/_internal/contracts/generated/operator-method-ids.js +1 -0
  9. package/dist/_internal/platform/control-plane/method-catalog-homegraph.d.ts.map +1 -1
  10. package/dist/_internal/platform/control-plane/method-catalog-homegraph.js +13 -1
  11. package/dist/_internal/platform/control-plane/operator-contract-schemas-homegraph.d.ts +1 -0
  12. package/dist/_internal/platform/control-plane/operator-contract-schemas-homegraph.d.ts.map +1 -1
  13. package/dist/_internal/platform/control-plane/operator-contract-schemas-homegraph.js +7 -0
  14. package/dist/_internal/platform/daemon/http/home-graph-routes.d.ts.map +1 -1
  15. package/dist/_internal/platform/daemon/http/home-graph-routes.js +3 -0
  16. package/dist/_internal/platform/knowledge/home-graph/ask.d.ts.map +1 -1
  17. package/dist/_internal/platform/knowledge/home-graph/ask.js +26 -7
  18. package/dist/_internal/platform/knowledge/home-graph/index.d.ts +1 -1
  19. package/dist/_internal/platform/knowledge/home-graph/index.d.ts.map +1 -1
  20. package/dist/_internal/platform/knowledge/home-graph/search-utils.d.ts +3 -0
  21. package/dist/_internal/platform/knowledge/home-graph/search-utils.d.ts.map +1 -0
  22. package/dist/_internal/platform/knowledge/home-graph/search-utils.js +16 -0
  23. package/dist/_internal/platform/knowledge/home-graph/search.d.ts.map +1 -1
  24. package/dist/_internal/platform/knowledge/home-graph/search.js +12 -13
  25. package/dist/_internal/platform/knowledge/home-graph/service.d.ts +2 -1
  26. package/dist/_internal/platform/knowledge/home-graph/service.d.ts.map +1 -1
  27. package/dist/_internal/platform/knowledge/home-graph/service.js +6 -0
  28. package/dist/_internal/platform/knowledge/home-graph/types.d.ts +20 -1
  29. package/dist/_internal/platform/knowledge/home-graph/types.d.ts.map +1 -1
  30. package/dist/_internal/platform/knowledge/home-graph/types.js +1 -0
  31. package/dist/_internal/platform/knowledge/index.d.ts +1 -1
  32. package/dist/_internal/platform/knowledge/index.d.ts.map +1 -1
  33. package/dist/_internal/platform/knowledge/semantic/answer.d.ts.map +1 -1
  34. package/dist/_internal/platform/knowledge/semantic/answer.js +6 -0
  35. package/dist/_internal/platform/knowledge/semantic/homeassistant-scope.d.ts +12 -0
  36. package/dist/_internal/platform/knowledge/semantic/homeassistant-scope.d.ts.map +1 -0
  37. package/dist/_internal/platform/knowledge/semantic/homeassistant-scope.js +240 -0
  38. package/dist/_internal/platform/knowledge/store-schedules.d.ts +5 -0
  39. package/dist/_internal/platform/knowledge/store-schedules.d.ts.map +1 -0
  40. package/dist/_internal/platform/knowledge/store-schedules.js +46 -0
  41. package/dist/_internal/platform/knowledge/store-space-delete.d.ts +30 -0
  42. package/dist/_internal/platform/knowledge/store-space-delete.d.ts.map +1 -0
  43. package/dist/_internal/platform/knowledge/store-space-delete.js +66 -0
  44. package/dist/_internal/platform/knowledge/store.d.ts +2 -0
  45. package/dist/_internal/platform/knowledge/store.d.ts.map +1 -1
  46. package/dist/_internal/platform/knowledge/store.js +21 -42
  47. package/dist/_internal/platform/version.js +1 -1
  48. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  "product": {
4
4
  "id": "goodvibes",
5
5
  "surface": "operator",
6
- "version": "0.28.8"
6
+ "version": "0.28.10"
7
7
  },
8
8
  "auth": {
9
9
  "modes": [
@@ -30046,6 +30046,91 @@
30046
30046
  },
30047
30047
  "invokable": true
30048
30048
  },
30049
+ {
30050
+ "id": "homeassistant.homeGraph.reset",
30051
+ "title": "Reset Home Graph Space",
30052
+ "description": "Clear one Home Assistant Home Graph knowledge space after callers export any diagnostic backup they need.",
30053
+ "category": "knowledge",
30054
+ "source": "builtin",
30055
+ "access": "admin",
30056
+ "transport": [
30057
+ "http",
30058
+ "ws"
30059
+ ],
30060
+ "scopes": [
30061
+ "write:knowledge"
30062
+ ],
30063
+ "http": {
30064
+ "method": "POST",
30065
+ "path": "/api/homeassistant/home-graph/reset"
30066
+ },
30067
+ "inputSchema": {
30068
+ "type": "object",
30069
+ "properties": {
30070
+ "installationId": {
30071
+ "type": "string"
30072
+ },
30073
+ "knowledgeSpaceId": {
30074
+ "type": "string"
30075
+ }
30076
+ },
30077
+ "additionalProperties": true
30078
+ },
30079
+ "outputSchema": {
30080
+ "type": "object",
30081
+ "properties": {
30082
+ "ok": {
30083
+ "type": "boolean"
30084
+ },
30085
+ "spaceId": {
30086
+ "type": "string"
30087
+ },
30088
+ "installationId": {
30089
+ "type": "string"
30090
+ },
30091
+ "deleted": {
30092
+ "type": "object",
30093
+ "additionalProperties": {
30094
+ "anyOf": [
30095
+ {
30096
+ "type": "string"
30097
+ },
30098
+ {
30099
+ "type": "number"
30100
+ },
30101
+ {
30102
+ "type": "boolean"
30103
+ },
30104
+ {
30105
+ "type": "null"
30106
+ },
30107
+ {
30108
+ "type": "object",
30109
+ "additionalProperties": {}
30110
+ },
30111
+ {
30112
+ "type": "array",
30113
+ "items": {}
30114
+ }
30115
+ ]
30116
+ }
30117
+ },
30118
+ "artifactsDeleted": {
30119
+ "type": "boolean"
30120
+ }
30121
+ },
30122
+ "required": [
30123
+ "ok",
30124
+ "spaceId",
30125
+ "installationId",
30126
+ "deleted",
30127
+ "artifactsDeleted"
30128
+ ],
30129
+ "additionalProperties": true
30130
+ },
30131
+ "dangerous": true,
30132
+ "invokable": true
30133
+ },
30049
30134
  {
30050
30135
  "id": "homeassistant.homeGraph.reviewHomeGraphFact",
30051
30136
  "title": "Review Home Graph Fact",
@@ -68662,10 +68747,10 @@
68662
68747
  }
68663
68748
  ],
68664
68749
  "schemaCoverage": {
68665
- "methods": 264,
68666
- "typedInputs": 264,
68750
+ "methods": 265,
68751
+ "typedInputs": 265,
68667
68752
  "genericInputs": 0,
68668
- "typedOutputs": 264,
68753
+ "typedOutputs": 265,
68669
68754
  "genericOutputs": 0
68670
68755
  },
68671
68756
  "eventCoverage": {
@@ -1,7 +1,7 @@
1
1
  export declare const FOUNDATION_METADATA: {
2
2
  readonly productId: "goodvibes";
3
- readonly productVersion: "0.28.8";
4
- readonly operatorMethodCount: 264;
3
+ readonly productVersion: "0.28.10";
4
+ readonly operatorMethodCount: 265;
5
5
  readonly operatorEventCount: 30;
6
6
  readonly peerEndpointCount: 6;
7
7
  };
@@ -1,8 +1,8 @@
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.8",
5
- "operatorMethodCount": 264,
4
+ "productVersion": "0.28.10",
5
+ "operatorMethodCount": 265,
6
6
  "operatorEventCount": 30,
7
7
  "peerEndpointCount": 6
8
8
  };
@@ -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,wBA2kmEtB,CAAC"}
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,wBAgqmEtB,CAAC"}
@@ -3,7 +3,7 @@ export const OPERATOR_CONTRACT = {
3
3
  "product": {
4
4
  "id": "goodvibes",
5
5
  "surface": "operator",
6
- "version": "0.28.8"
6
+ "version": "0.28.10"
7
7
  },
8
8
  "auth": {
9
9
  "modes": [
@@ -30046,6 +30046,91 @@ export const OPERATOR_CONTRACT = {
30046
30046
  },
30047
30047
  "invokable": true
30048
30048
  },
30049
+ {
30050
+ "id": "homeassistant.homeGraph.reset",
30051
+ "title": "Reset Home Graph Space",
30052
+ "description": "Clear one Home Assistant Home Graph knowledge space after callers export any diagnostic backup they need.",
30053
+ "category": "knowledge",
30054
+ "source": "builtin",
30055
+ "access": "admin",
30056
+ "transport": [
30057
+ "http",
30058
+ "ws"
30059
+ ],
30060
+ "scopes": [
30061
+ "write:knowledge"
30062
+ ],
30063
+ "http": {
30064
+ "method": "POST",
30065
+ "path": "/api/homeassistant/home-graph/reset"
30066
+ },
30067
+ "inputSchema": {
30068
+ "type": "object",
30069
+ "properties": {
30070
+ "installationId": {
30071
+ "type": "string"
30072
+ },
30073
+ "knowledgeSpaceId": {
30074
+ "type": "string"
30075
+ }
30076
+ },
30077
+ "additionalProperties": true
30078
+ },
30079
+ "outputSchema": {
30080
+ "type": "object",
30081
+ "properties": {
30082
+ "ok": {
30083
+ "type": "boolean"
30084
+ },
30085
+ "spaceId": {
30086
+ "type": "string"
30087
+ },
30088
+ "installationId": {
30089
+ "type": "string"
30090
+ },
30091
+ "deleted": {
30092
+ "type": "object",
30093
+ "additionalProperties": {
30094
+ "anyOf": [
30095
+ {
30096
+ "type": "string"
30097
+ },
30098
+ {
30099
+ "type": "number"
30100
+ },
30101
+ {
30102
+ "type": "boolean"
30103
+ },
30104
+ {
30105
+ "type": "null"
30106
+ },
30107
+ {
30108
+ "type": "object",
30109
+ "additionalProperties": {}
30110
+ },
30111
+ {
30112
+ "type": "array",
30113
+ "items": {}
30114
+ }
30115
+ ]
30116
+ }
30117
+ },
30118
+ "artifactsDeleted": {
30119
+ "type": "boolean"
30120
+ }
30121
+ },
30122
+ "required": [
30123
+ "ok",
30124
+ "spaceId",
30125
+ "installationId",
30126
+ "deleted",
30127
+ "artifactsDeleted"
30128
+ ],
30129
+ "additionalProperties": true
30130
+ },
30131
+ "dangerous": true,
30132
+ "invokable": true
30133
+ },
30049
30134
  {
30050
30135
  "id": "homeassistant.homeGraph.reviewHomeGraphFact",
30051
30136
  "title": "Review Home Graph Fact",
@@ -68662,10 +68747,10 @@ export const OPERATOR_CONTRACT = {
68662
68747
  }
68663
68748
  ],
68664
68749
  "schemaCoverage": {
68665
- "methods": 264,
68666
- "typedInputs": 264,
68750
+ "methods": 265,
68751
+ "typedInputs": 265,
68667
68752
  "genericInputs": 0,
68668
- "typedOutputs": 264,
68753
+ "typedOutputs": 265,
68669
68754
  "genericOutputs": 0
68670
68755
  },
68671
68756
  "eventCoverage": {
@@ -1,3 +1,3 @@
1
- export declare const OPERATOR_METHOD_IDS: readonly ["accounts.snapshot", "approvals.approve", "approvals.cancel", "approvals.claim", "approvals.deny", "approvals.list", "artifacts.content.get", "artifacts.create", "artifacts.get", "artifacts.list", "automation.heartbeat.list", "automation.heartbeat.run", "automation.integration.snapshot", "automation.jobs.create", "automation.jobs.delete", "automation.jobs.disable", "automation.jobs.enable", "automation.jobs.list", "automation.jobs.patch", "automation.jobs.pause", "automation.jobs.resume", "automation.jobs.run", "automation.runs.cancel", "automation.runs.get", "automation.runs.list", "automation.runs.retry", "channels.accounts.action.default", "channels.accounts.action.named", "channels.accounts.get", "channels.accounts.list", "channels.accounts.surface.list", "channels.actions.invoke", "channels.actions.list", "channels.actions.surface.list", "channels.agent_tools.list", "channels.agent_tools.surface.list", "channels.allowlist.edit", "channels.allowlist.resolve", "channels.authorize", "channels.capabilities.list", "channels.capabilities.surface.list", "channels.directory.query", "channels.doctor.get", "channels.lifecycle.get", "channels.lifecycle.migrate", "channels.policies.audit", "channels.policies.list", "channels.policies.update", "channels.repairs.list", "channels.setup.get", "channels.status", "channels.targets.resolve", "channels.tools.invoke", "channels.tools.list", "channels.tools.surface.list", "companion.chat.events.stream", "companion.chat.messages.create", "companion.chat.messages.list", "companion.chat.sessions.create", "companion.chat.sessions.delete", "companion.chat.sessions.get", "companion.chat.sessions.update", "config.get", "config.set", "continuity.snapshot", "control.auth.current", "control.auth.login", "control.clients.list", "control.contract", "control.events.catalog", "control.events.stream", "control.messages.list", "control.methods.get", "control.methods.list", "control.snapshot", "control.status", "control.web", "deliveries.get", "deliveries.list", "health.snapshot", "homeassistant.homeGraph.askHomeGraph", "homeassistant.homeGraph.browse", "homeassistant.homeGraph.export", "homeassistant.homeGraph.generateHomeGraphPacket", "homeassistant.homeGraph.generateRoomPage", "homeassistant.homeGraph.import", "homeassistant.homeGraph.ingestHomeGraphArtifact", "homeassistant.homeGraph.ingestHomeGraphNote", "homeassistant.homeGraph.ingestHomeGraphUrl", "homeassistant.homeGraph.linkHomeGraphKnowledge", "homeassistant.homeGraph.listHomeGraphIssues", "homeassistant.homeGraph.map", "homeassistant.homeGraph.pages.list", "homeassistant.homeGraph.refinement.run", "homeassistant.homeGraph.refinement.task.cancel", "homeassistant.homeGraph.refinement.task.get", "homeassistant.homeGraph.refinement.tasks.list", "homeassistant.homeGraph.refreshDevicePassport", "homeassistant.homeGraph.reindex", "homeassistant.homeGraph.reviewHomeGraphFact", "homeassistant.homeGraph.sources.list", "homeassistant.homeGraph.status", "homeassistant.homeGraph.syncHomeGraph", "homeassistant.homeGraph.unlinkHomeGraphKnowledge", "intelligence.snapshot", "knowledge.ask", "knowledge.candidate.decide", "knowledge.candidate.get", "knowledge.candidates.list", "knowledge.connector.doctor", "knowledge.connector.get", "knowledge.connectors.list", "knowledge.extraction.get", "knowledge.extractions.list", "knowledge.graphql.execute", "knowledge.graphql.schema", "knowledge.ingest.artifact", "knowledge.ingest.bookmarks", "knowledge.ingest.browserHistory", "knowledge.ingest.connector", "knowledge.ingest.url", "knowledge.ingest.urls", "knowledge.issue.review", "knowledge.issues.list", "knowledge.item.get", "knowledge.job-runs.list", "knowledge.job.get", "knowledge.job.run", "knowledge.jobs.list", "knowledge.lint", "knowledge.map", "knowledge.nodes.list", "knowledge.packet", "knowledge.projection.materialize", "knowledge.projection.render", "knowledge.projections.list", "knowledge.refinement.run", "knowledge.refinement.task.cancel", "knowledge.refinement.task.get", "knowledge.refinement.tasks.list", "knowledge.reindex", "knowledge.report.get", "knowledge.reports.list", "knowledge.schedule.delete", "knowledge.schedule.enable", "knowledge.schedule.get", "knowledge.schedule.save", "knowledge.schedules.list", "knowledge.search", "knowledge.source.extraction.get", "knowledge.sources.list", "knowledge.status", "knowledge.usage.list", "local_auth.bootstrap.delete", "local_auth.sessions.delete", "local_auth.status", "local_auth.users.create", "local_auth.users.delete", "local_auth.users.password.rotate", "media.analyze", "media.generate", "media.providers.list", "media.transform", "memory.doctor", "memory.embeddings.default.set", "memory.vector.rebuild", "memory.vector.stats", "multimodal.analyze", "multimodal.packet", "multimodal.providers.list", "multimodal.status", "multimodal.writeback", "panels.list", "panels.open", "projectPlanning.decisions.list", "projectPlanning.decisions.record", "projectPlanning.evaluate", "projectPlanning.language.get", "projectPlanning.language.upsert", "projectPlanning.state.get", "projectPlanning.state.upsert", "projectPlanning.status", "providers.get", "providers.list", "providers.usage.get", "remote.node_host.contract", "remote.pair.requests.approve", "remote.pair.requests.list", "remote.pair.requests.reject", "remote.peers.disconnect", "remote.peers.invoke", "remote.peers.list", "remote.peers.token.revoke", "remote.peers.token.rotate", "remote.snapshot", "remote.work.cancel", "remote.work.list", "review.snapshot", "routes.bindings.create", "routes.bindings.delete", "routes.bindings.list", "routes.bindings.patch", "routes.snapshot", "scheduler.capacity", "schedules.create", "schedules.delete", "schedules.disable", "schedules.enable", "schedules.list", "schedules.run", "security.settings", "services.install", "services.restart", "services.start", "services.status", "services.stop", "services.uninstall", "sessions.close", "sessions.create", "sessions.followUp", "sessions.get", "sessions.inputs.cancel", "sessions.inputs.create", "sessions.inputs.list", "sessions.integration.snapshot", "sessions.list", "sessions.messages.create", "sessions.messages.list", "sessions.reopen", "sessions.steer", "settings.snapshot", "surfaces.list", "tasks.cancel", "tasks.create", "tasks.get", "tasks.list", "tasks.retry", "tasks.status", "telemetry.errors.list", "telemetry.events.list", "telemetry.metrics.get", "telemetry.otlp.logs", "telemetry.otlp.metrics", "telemetry.otlp.traces", "telemetry.snapshot", "telemetry.stream", "telemetry.traces.list", "voice.providers.list", "voice.realtime.session", "voice.status", "voice.stt", "voice.tts", "voice.tts.stream", "voice.voices.list", "watchers.create", "watchers.delete", "watchers.list", "watchers.patch", "watchers.run", "watchers.start", "watchers.stop", "web_search.providers.list", "web_search.query", "worktrees.snapshot"];
1
+ export declare const OPERATOR_METHOD_IDS: readonly ["accounts.snapshot", "approvals.approve", "approvals.cancel", "approvals.claim", "approvals.deny", "approvals.list", "artifacts.content.get", "artifacts.create", "artifacts.get", "artifacts.list", "automation.heartbeat.list", "automation.heartbeat.run", "automation.integration.snapshot", "automation.jobs.create", "automation.jobs.delete", "automation.jobs.disable", "automation.jobs.enable", "automation.jobs.list", "automation.jobs.patch", "automation.jobs.pause", "automation.jobs.resume", "automation.jobs.run", "automation.runs.cancel", "automation.runs.get", "automation.runs.list", "automation.runs.retry", "channels.accounts.action.default", "channels.accounts.action.named", "channels.accounts.get", "channels.accounts.list", "channels.accounts.surface.list", "channels.actions.invoke", "channels.actions.list", "channels.actions.surface.list", "channels.agent_tools.list", "channels.agent_tools.surface.list", "channels.allowlist.edit", "channels.allowlist.resolve", "channels.authorize", "channels.capabilities.list", "channels.capabilities.surface.list", "channels.directory.query", "channels.doctor.get", "channels.lifecycle.get", "channels.lifecycle.migrate", "channels.policies.audit", "channels.policies.list", "channels.policies.update", "channels.repairs.list", "channels.setup.get", "channels.status", "channels.targets.resolve", "channels.tools.invoke", "channels.tools.list", "channels.tools.surface.list", "companion.chat.events.stream", "companion.chat.messages.create", "companion.chat.messages.list", "companion.chat.sessions.create", "companion.chat.sessions.delete", "companion.chat.sessions.get", "companion.chat.sessions.update", "config.get", "config.set", "continuity.snapshot", "control.auth.current", "control.auth.login", "control.clients.list", "control.contract", "control.events.catalog", "control.events.stream", "control.messages.list", "control.methods.get", "control.methods.list", "control.snapshot", "control.status", "control.web", "deliveries.get", "deliveries.list", "health.snapshot", "homeassistant.homeGraph.askHomeGraph", "homeassistant.homeGraph.browse", "homeassistant.homeGraph.export", "homeassistant.homeGraph.generateHomeGraphPacket", "homeassistant.homeGraph.generateRoomPage", "homeassistant.homeGraph.import", "homeassistant.homeGraph.ingestHomeGraphArtifact", "homeassistant.homeGraph.ingestHomeGraphNote", "homeassistant.homeGraph.ingestHomeGraphUrl", "homeassistant.homeGraph.linkHomeGraphKnowledge", "homeassistant.homeGraph.listHomeGraphIssues", "homeassistant.homeGraph.map", "homeassistant.homeGraph.pages.list", "homeassistant.homeGraph.refinement.run", "homeassistant.homeGraph.refinement.task.cancel", "homeassistant.homeGraph.refinement.task.get", "homeassistant.homeGraph.refinement.tasks.list", "homeassistant.homeGraph.refreshDevicePassport", "homeassistant.homeGraph.reindex", "homeassistant.homeGraph.reset", "homeassistant.homeGraph.reviewHomeGraphFact", "homeassistant.homeGraph.sources.list", "homeassistant.homeGraph.status", "homeassistant.homeGraph.syncHomeGraph", "homeassistant.homeGraph.unlinkHomeGraphKnowledge", "intelligence.snapshot", "knowledge.ask", "knowledge.candidate.decide", "knowledge.candidate.get", "knowledge.candidates.list", "knowledge.connector.doctor", "knowledge.connector.get", "knowledge.connectors.list", "knowledge.extraction.get", "knowledge.extractions.list", "knowledge.graphql.execute", "knowledge.graphql.schema", "knowledge.ingest.artifact", "knowledge.ingest.bookmarks", "knowledge.ingest.browserHistory", "knowledge.ingest.connector", "knowledge.ingest.url", "knowledge.ingest.urls", "knowledge.issue.review", "knowledge.issues.list", "knowledge.item.get", "knowledge.job-runs.list", "knowledge.job.get", "knowledge.job.run", "knowledge.jobs.list", "knowledge.lint", "knowledge.map", "knowledge.nodes.list", "knowledge.packet", "knowledge.projection.materialize", "knowledge.projection.render", "knowledge.projections.list", "knowledge.refinement.run", "knowledge.refinement.task.cancel", "knowledge.refinement.task.get", "knowledge.refinement.tasks.list", "knowledge.reindex", "knowledge.report.get", "knowledge.reports.list", "knowledge.schedule.delete", "knowledge.schedule.enable", "knowledge.schedule.get", "knowledge.schedule.save", "knowledge.schedules.list", "knowledge.search", "knowledge.source.extraction.get", "knowledge.sources.list", "knowledge.status", "knowledge.usage.list", "local_auth.bootstrap.delete", "local_auth.sessions.delete", "local_auth.status", "local_auth.users.create", "local_auth.users.delete", "local_auth.users.password.rotate", "media.analyze", "media.generate", "media.providers.list", "media.transform", "memory.doctor", "memory.embeddings.default.set", "memory.vector.rebuild", "memory.vector.stats", "multimodal.analyze", "multimodal.packet", "multimodal.providers.list", "multimodal.status", "multimodal.writeback", "panels.list", "panels.open", "projectPlanning.decisions.list", "projectPlanning.decisions.record", "projectPlanning.evaluate", "projectPlanning.language.get", "projectPlanning.language.upsert", "projectPlanning.state.get", "projectPlanning.state.upsert", "projectPlanning.status", "providers.get", "providers.list", "providers.usage.get", "remote.node_host.contract", "remote.pair.requests.approve", "remote.pair.requests.list", "remote.pair.requests.reject", "remote.peers.disconnect", "remote.peers.invoke", "remote.peers.list", "remote.peers.token.revoke", "remote.peers.token.rotate", "remote.snapshot", "remote.work.cancel", "remote.work.list", "review.snapshot", "routes.bindings.create", "routes.bindings.delete", "routes.bindings.list", "routes.bindings.patch", "routes.snapshot", "scheduler.capacity", "schedules.create", "schedules.delete", "schedules.disable", "schedules.enable", "schedules.list", "schedules.run", "security.settings", "services.install", "services.restart", "services.start", "services.status", "services.stop", "services.uninstall", "sessions.close", "sessions.create", "sessions.followUp", "sessions.get", "sessions.inputs.cancel", "sessions.inputs.create", "sessions.inputs.list", "sessions.integration.snapshot", "sessions.list", "sessions.messages.create", "sessions.messages.list", "sessions.reopen", "sessions.steer", "settings.snapshot", "surfaces.list", "tasks.cancel", "tasks.create", "tasks.get", "tasks.list", "tasks.retry", "tasks.status", "telemetry.errors.list", "telemetry.events.list", "telemetry.metrics.get", "telemetry.otlp.logs", "telemetry.otlp.metrics", "telemetry.otlp.traces", "telemetry.snapshot", "telemetry.stream", "telemetry.traces.list", "voice.providers.list", "voice.realtime.session", "voice.status", "voice.stt", "voice.tts", "voice.tts.stream", "voice.voices.list", "watchers.create", "watchers.delete", "watchers.list", "watchers.patch", "watchers.run", "watchers.start", "watchers.stop", "web_search.providers.list", "web_search.query", "worktrees.snapshot"];
2
2
  export type OperatorMethodId = typeof OPERATOR_METHOD_IDS[number];
3
3
  //# sourceMappingURL=operator-method-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operator-method-ids.d.ts","sourceRoot":"","sources":["../../../../src/_internal/contracts/generated/operator-method-ids.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,guNAyQtB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"operator-method-ids.d.ts","sourceRoot":"","sources":["../../../../src/_internal/contracts/generated/operator-method-ids.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,iwNA0QtB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC"}
@@ -99,6 +99,7 @@ export const OPERATOR_METHOD_IDS = [
99
99
  "homeassistant.homeGraph.refinement.tasks.list",
100
100
  "homeassistant.homeGraph.refreshDevicePassport",
101
101
  "homeassistant.homeGraph.reindex",
102
+ "homeassistant.homeGraph.reset",
102
103
  "homeassistant.homeGraph.reviewHomeGraphFact",
103
104
  "homeassistant.homeGraph.sources.list",
104
105
  "homeassistant.homeGraph.status",
@@ -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;AAqE1E,eAAO,MAAM,wCAAwC,EAAE,SAAS,uBAAuB,EAyTtF,CAAC"}
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;AAwE1E,eAAO,MAAM,wCAAwC,EAAE,SAAS,uBAAuB,EAoUtF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { BOOLEAN_SCHEMA, NUMBER_SCHEMA, STRING_SCHEMA, bodyEnvelopeSchema, methodDescriptor, objectSchema, } from './method-catalog-shared.js';
2
2
  import { GENERIC_LIST_SCHEMA, JSON_RECORD_SCHEMA, METADATA_SCHEMA, STRING_LIST_SCHEMA, } from './operator-contract-schemas-shared.js';
3
- import { HOME_GRAPH_ASK_OUTPUT_SCHEMA, HOME_GRAPH_BROWSE_OUTPUT_SCHEMA, HOME_GRAPH_EXPORT_OUTPUT_SCHEMA, HOME_GRAPH_IMPORT_OUTPUT_SCHEMA, HOME_GRAPH_INGEST_OUTPUT_SCHEMA, HOME_GRAPH_ISSUES_OUTPUT_SCHEMA, HOME_GRAPH_LINK_OUTPUT_SCHEMA, HOME_GRAPH_MAP_OUTPUT_SCHEMA, HOME_GRAPH_PAGES_OUTPUT_SCHEMA, HOME_GRAPH_PROJECTION_OUTPUT_SCHEMA, HOME_GRAPH_REINDEX_OUTPUT_SCHEMA, HOME_GRAPH_REFINEMENT_RUN_OUTPUT_SCHEMA, HOME_GRAPH_REFINEMENT_TASK_OUTPUT_SCHEMA, HOME_GRAPH_REFINEMENT_TASKS_OUTPUT_SCHEMA, HOME_GRAPH_REVIEW_OUTPUT_SCHEMA, HOME_GRAPH_SOURCES_OUTPUT_SCHEMA, HOME_GRAPH_SPACE_INPUT_SCHEMA, HOME_GRAPH_STATUS_SCHEMA, HOME_GRAPH_SYNC_OUTPUT_SCHEMA, } from './operator-contract-schemas-homegraph.js';
3
+ import { HOME_GRAPH_ASK_OUTPUT_SCHEMA, HOME_GRAPH_BROWSE_OUTPUT_SCHEMA, HOME_GRAPH_EXPORT_OUTPUT_SCHEMA, HOME_GRAPH_IMPORT_OUTPUT_SCHEMA, HOME_GRAPH_INGEST_OUTPUT_SCHEMA, HOME_GRAPH_ISSUES_OUTPUT_SCHEMA, HOME_GRAPH_LINK_OUTPUT_SCHEMA, HOME_GRAPH_MAP_OUTPUT_SCHEMA, HOME_GRAPH_PAGES_OUTPUT_SCHEMA, HOME_GRAPH_PROJECTION_OUTPUT_SCHEMA, HOME_GRAPH_REINDEX_OUTPUT_SCHEMA, HOME_GRAPH_REFINEMENT_RUN_OUTPUT_SCHEMA, HOME_GRAPH_REFINEMENT_TASK_OUTPUT_SCHEMA, HOME_GRAPH_REFINEMENT_TASKS_OUTPUT_SCHEMA, HOME_GRAPH_RESET_OUTPUT_SCHEMA, HOME_GRAPH_REVIEW_OUTPUT_SCHEMA, HOME_GRAPH_SOURCES_OUTPUT_SCHEMA, HOME_GRAPH_SPACE_INPUT_SCHEMA, HOME_GRAPH_STATUS_SCHEMA, HOME_GRAPH_SYNC_OUTPUT_SCHEMA, } from './operator-contract-schemas-homegraph.js';
4
4
  function homeGraphDescriptor(input) {
5
5
  return methodDescriptor({
6
6
  id: input.id,
@@ -12,6 +12,7 @@ function homeGraphDescriptor(input) {
12
12
  http: { method: input.method, path: input.path },
13
13
  inputSchema: input.inputSchema,
14
14
  outputSchema: input.outputSchema,
15
+ ...(input.dangerous ? { dangerous: true } : {}),
15
16
  ...(input.metadata ? { metadata: input.metadata } : {}),
16
17
  });
17
18
  }
@@ -334,6 +335,17 @@ export const builtinGatewayHomeGraphMethodDescriptors = [
334
335
  inputSchema: bodyEnvelopeSchema({ installationId: STRING_SCHEMA, knowledgeSpaceId: STRING_SCHEMA, data: JSON_RECORD_SCHEMA }, ['data']),
335
336
  outputSchema: HOME_GRAPH_IMPORT_OUTPUT_SCHEMA,
336
337
  }),
338
+ homeGraphDescriptor({
339
+ id: 'homeassistant.homeGraph.reset',
340
+ title: 'Reset Home Graph Space',
341
+ description: 'Clear one Home Assistant Home Graph knowledge space after callers export any diagnostic backup they need.',
342
+ method: 'POST',
343
+ path: '/api/homeassistant/home-graph/reset',
344
+ write: true,
345
+ dangerous: true,
346
+ inputSchema: HOME_GRAPH_SPACE_INPUT_SCHEMA,
347
+ outputSchema: HOME_GRAPH_RESET_OUTPUT_SCHEMA,
348
+ }),
337
349
  ];
338
350
  function linkBodySchema() {
339
351
  return bodyEnvelopeSchema({
@@ -17,4 +17,5 @@ export declare const HOME_GRAPH_REFINEMENT_TASK_OUTPUT_SCHEMA: Record<string, un
17
17
  export declare const HOME_GRAPH_REFINEMENT_RUN_OUTPUT_SCHEMA: Record<string, unknown>;
18
18
  export declare const HOME_GRAPH_EXPORT_OUTPUT_SCHEMA: Record<string, unknown>;
19
19
  export declare const HOME_GRAPH_IMPORT_OUTPUT_SCHEMA: Record<string, unknown>;
20
+ export declare const HOME_GRAPH_RESET_OUTPUT_SCHEMA: Record<string, unknown>;
20
21
  //# sourceMappingURL=operator-contract-schemas-homegraph.d.ts.map
@@ -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,wBAAwB,yBAY4H,CAAC;AAElK,eAAO,MAAM,6BAA6B,yBAeiF,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"}
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,wBAAwB,yBAY4H,CAAC;AAElK,eAAO,MAAM,6BAA6B,yBAeiF,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,yBAM2D,CAAC"}
@@ -147,3 +147,10 @@ export const HOME_GRAPH_IMPORT_OUTPUT_SCHEMA = objectSchema({
147
147
  spaceId: STRING_SCHEMA,
148
148
  imported: JSON_RECORD_SCHEMA,
149
149
  }, ['ok', 'spaceId', 'imported'], { additionalProperties: true });
150
+ export const HOME_GRAPH_RESET_OUTPUT_SCHEMA = objectSchema({
151
+ ok: BOOLEAN_SCHEMA,
152
+ spaceId: STRING_SCHEMA,
153
+ installationId: STRING_SCHEMA,
154
+ deleted: JSON_RECORD_SCHEMA,
155
+ artifactsDeleted: BOOLEAN_SCHEMA,
156
+ }, ['ok', 'spaceId', 'installationId', 'deleted', 'artifactsDeleted'], { additionalProperties: true });
@@ -1 +1 @@
1
- {"version":3,"file":"home-graph-routes.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/daemon/http/home-graph-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAc5C,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,aAAa,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC;IACzE,QAAQ,CAAC,qBAAqB,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,QAAQ,CAAC,CAAC;IACxF,QAAQ,CAAC,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,QAAQ,GAAG,IAAI,CAAC;CAC1D;AAED,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,qBAAqB;IAErD,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;YAkJtC,KAAK;YAML,QAAQ;YAMR,gBAAgB;CAK/B"}
1
+ {"version":3,"file":"home-graph-routes.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/daemon/http/home-graph-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAc5C,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,aAAa,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC;IACzE,QAAQ,CAAC,qBAAqB,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG,QAAQ,CAAC,CAAC;IACxF,QAAQ,CAAC,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,QAAQ,GAAG,IAAI,CAAC;CAC1D;AAED,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,qBAAqB;IAErD,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;YAqJtC,KAAK;YAML,QAAQ;YAMR,gBAAgB;CAK/B"}
@@ -96,6 +96,9 @@ export class HomeGraphRoutes {
96
96
  if (pathname === '/api/homeassistant/home-graph/export' && req.method === 'POST') {
97
97
  return Response.json(await this.context.homeGraphService.exportSpace(await this.readOptionalBody(req)));
98
98
  }
99
+ if (pathname === '/api/homeassistant/home-graph/reset' && req.method === 'POST') {
100
+ return await this.admin(req, async () => Response.json(await this.context.homeGraphService.resetSpace(await this.readOptionalBody(req))));
101
+ }
99
102
  if (pathname === '/api/homeassistant/home-graph/ask' && req.method === 'POST') {
100
103
  return Response.json(await this.context.homeGraphService.ask(await this.readBody(req)));
101
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/ask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACpD,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAwD9B"}
1
+ {"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/ask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAOxD,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACpD,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAyD9B"}
@@ -1,7 +1,9 @@
1
1
  import { collectLinkedObjects, renderAskAnswer } from './state.js';
2
+ import { inferHomeAssistantAnswerScopeForQuery, nodeInHomeAssistantAnswerScope, sourceInHomeAssistantAnswerScope, } from '../semantic/homeassistant-scope.js';
2
3
  export async function answerHomeGraphQuery(input) {
3
- const sources = input.results.flatMap((result) => result.source ? [result.source] : []).map(withAnswerSourceAliases);
4
- const linkedObjects = collectLinkedObjects(input.results, input.state);
4
+ const results = scopeHomeGraphAnswerResults(input.store, input.spaceId, input.query.query, input.results);
5
+ const sources = results.flatMap((result) => result.source ? [result.source] : []).map(withAnswerSourceAliases);
6
+ const linkedObjects = collectLinkedObjects(results, input.state);
5
7
  if (input.semanticService) {
6
8
  const answer = await input.semanticService.answer({
7
9
  query: input.query.query,
@@ -12,7 +14,7 @@ export async function answerHomeGraphQuery(input) {
12
14
  includeConfidence: input.query.includeConfidence,
13
15
  includeLinkedObjects: input.query.includeLinkedObjects,
14
16
  candidateSourceIds: sources.map((source) => source.id),
15
- candidateNodeIds: input.results.flatMap((result) => result.node ? [result.node.id] : []),
17
+ candidateNodeIds: results.flatMap((result) => result.node ? [result.node.id] : []),
16
18
  strictCandidates: true,
17
19
  linkedObjects,
18
20
  noMatchMessage: `No Home Graph knowledge matched "${input.query.query}".`,
@@ -38,24 +40,41 @@ export async function answerHomeGraphQuery(input) {
38
40
  refinementTaskIds: answer.answer.refinementTaskIds,
39
41
  synthesized: answer.answer.synthesized,
40
42
  },
41
- results: input.results,
43
+ results,
42
44
  };
43
45
  }
44
- const confidence = Math.min(100, Math.max(10, input.results[0]?.score ?? 10));
46
+ const confidence = Math.min(100, Math.max(10, results[0]?.score ?? 10));
45
47
  return {
46
48
  ok: true,
47
49
  spaceId: input.spaceId,
48
50
  query: input.query.query,
49
51
  answer: {
50
- text: renderAskAnswer(input.query.query, input.results, input.query.mode ?? 'standard'),
52
+ text: renderAskAnswer(input.query.query, results, input.query.mode ?? 'standard'),
51
53
  mode: input.query.mode ?? 'standard',
52
54
  confidence,
53
55
  sources: input.query.includeSources === false ? [] : sources,
54
56
  linkedObjects: input.query.includeLinkedObjects === false ? [] : linkedObjects,
55
57
  },
56
- results: input.results,
58
+ results,
57
59
  };
58
60
  }
61
+ function scopeHomeGraphAnswerResults(store, spaceId, query, results) {
62
+ if (results.length === 0)
63
+ return results;
64
+ const scope = inferHomeAssistantAnswerScopeForQuery(store, spaceId, query);
65
+ if (!scope || scope.anchorNodeIds.size === 0)
66
+ return results;
67
+ const scoped = results.filter((result) => {
68
+ if (result.source)
69
+ return sourceInHomeAssistantAnswerScope(store, result.source, scope);
70
+ if (result.node)
71
+ return nodeInHomeAssistantAnswerScope(result.node, scope);
72
+ return false;
73
+ });
74
+ if (scoped.length > 0)
75
+ return scoped;
76
+ return [];
77
+ }
59
78
  function uniqueSources(sources) {
60
79
  const seen = new Set();
61
80
  const out = [];
@@ -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, HomeGraphGeneratedPagesSummary, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphKnowledgeTarget, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphMapEdge, HomeGraphMapHaFilterInput, HomeGraphMapInput, HomeGraphMapNode, HomeGraphMapResult, HomeGraphNodeKind, HomeGraphObjectInput, HomeGraphObjectKind, HomeGraphPageAutomationOptions, HomeGraphPageListResult, 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, HomeGraphMapHaFilterInput, HomeGraphMapInput, HomeGraphMapNode, HomeGraphMapResult, HomeGraphNodeKind, HomeGraphObjectInput, HomeGraphObjectKind, HomeGraphPageAutomationOptions, HomeGraphPageListResult, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphReindexResult, HomeGraphRelation, HomeGraphResetResult, 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,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,uBAAuB,EACvB,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,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function intersects(left: ReadonlySet<string>, right: ReadonlySet<string>): boolean;
2
+ export declare function isSingularObjectQuery(query: string, tokens: readonly string[]): boolean;
3
+ //# sourceMappingURL=search-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-utils.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/knowledge/home-graph/search-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAKzF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAOvF"}
@@ -0,0 +1,16 @@
1
+ export function intersects(left, right) {
2
+ for (const value of left) {
3
+ if (right.has(value))
4
+ return true;
5
+ }
6
+ return false;
7
+ }
8
+ export function isSingularObjectQuery(query, tokens) {
9
+ const normalized = query.toLowerCase();
10
+ if (/\b(the|this|that|my)\s+(tv|television|device|sensor|switch|camera|printer|router|phone)\b/.test(normalized))
11
+ return true;
12
+ if (tokens.includes('tv') || tokens.includes('television')) {
13
+ return !tokens.includes('tvs') && !tokens.includes('televisions');
14
+ }
15
+ return false;
16
+ }
@@ -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;AAGrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAoIxD,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,CAoFzB;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,CAoCzB;AAmND,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAWhH"}
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;AAIrB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAsIxD,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,CAoFzB;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,CAoCzB;AAmND,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAWhH"}
@@ -1,5 +1,6 @@
1
1
  import { belongsToSpace, edgeIsActive, isGeneratedPageSource, readRecord } from './helpers.js';
2
2
  import { isUnusableHomeGraphExtractionText } from './extraction-quality.js';
3
+ import { intersects, isSingularObjectQuery } from './search-utils.js';
3
4
  const MAX_FIELD_CHARS = 4_096;
4
5
  const MAX_SECTION_COUNT = 32;
5
6
  const MAX_SEARCH_TEXT_CHARS = 64 * 1024;
@@ -66,6 +67,8 @@ const GENERIC_ANCHOR_TOKENS = new Set([
66
67
  'smart',
67
68
  'storage',
68
69
  'switch',
70
+ 'television',
71
+ 'tv',
69
72
  ]);
70
73
  const QUERY_EXPANSIONS = {
71
74
  capability: ['capabilities', 'feature', 'features', 'function', 'functions', 'mode', 'modes', 'spec', 'specs', 'support', 'supports'],
@@ -149,7 +152,7 @@ export function scoreHomeGraphResults(query, sources, nodes, edges, extractionBy
149
152
  const expandedTokens = expandTokens(tokens);
150
153
  const anchorTokens = selectAnchorQueryTokens(tokens);
151
154
  const anchors = selectAnchorNodes(anchorTokens, nodes);
152
- const sourceAnchors = selectSourceAnchors(anchorTokens, anchors.map((anchor) => anchor.node));
155
+ const sourceAnchors = selectSourceAnchors(anchorTokens, anchors.map((anchor) => anchor.node), isSingularObjectQuery(query, tokens));
153
156
  const anchorIds = new Set(sourceAnchors.map((node) => node.id));
154
157
  const anchorIdentityTokens = collectAnchorIdentityTokens(sourceAnchors);
155
158
  const sourceLinks = buildSourceLinkIndex(edges);
@@ -234,7 +237,7 @@ export function selectHomeGraphExtractionRepairCandidates(query, sources, nodes,
234
237
  if (tokens.length === 0)
235
238
  return [];
236
239
  const anchors = selectAnchorNodes(tokens, nodes);
237
- const sourceAnchors = selectSourceAnchors(tokens, anchors.map((anchor) => anchor.node));
240
+ const sourceAnchors = selectSourceAnchors(tokens, anchors.map((anchor) => anchor.node), isSingularObjectQuery(query, tokens));
238
241
  const anchorIds = new Set(sourceAnchors.map((anchor) => anchor.id));
239
242
  const anchorIdentityTokens = collectAnchorIdentityTokens(sourceAnchors);
240
243
  const sourceLinks = buildSourceLinkIndex(edges);
@@ -351,7 +354,7 @@ function sourceAnchorIdentityScore(anchorTokens, source, extraction) {
351
354
  function selectAnchorNodes(tokens, nodes) {
352
355
  if (tokens.length === 0)
353
356
  return [];
354
- return nodes.map((node) => {
357
+ const scored = nodes.map((node) => {
355
358
  if (!isHomeGraphAnchorNode(node))
356
359
  return { node, score: 0 };
357
360
  const baseScore = scoreFields(tokens, nodeIdentityFields(node));
@@ -362,7 +365,10 @@ function selectAnchorNodes(tokens, nodes) {
362
365
  };
363
366
  })
364
367
  .filter((entry) => entry.score >= 10)
365
- .sort((a, b) => b.score - a.score || a.node.id.localeCompare(b.node.id))
368
+ .sort((a, b) => b.score - a.score || a.node.id.localeCompare(b.node.id));
369
+ const topScore = scored[0]?.score ?? 0;
370
+ return scored
371
+ .filter((entry) => entry.score >= Math.max(10, topScore - 12))
366
372
  .slice(0, 12);
367
373
  }
368
374
  function selectAnchorQueryTokens(tokens) {
@@ -373,10 +379,10 @@ function isHomeGraphAnchorNode(node) {
373
379
  return false;
374
380
  return HOME_GRAPH_ANCHOR_KINDS.has(node.kind);
375
381
  }
376
- function selectSourceAnchors(tokens, nodes) {
382
+ function selectSourceAnchors(tokens, nodes, singularObjectQuery = false) {
377
383
  const preferred = nodes.filter((node) => sourceAnchorIntentBoost(tokens, node) >= 0);
378
384
  if (preferred.length > 0)
379
- return preferred.slice(0, 8);
385
+ return preferred.slice(0, singularObjectQuery ? 1 : ANCHOR_SCOPE_LIMIT);
380
386
  return nodes.slice(0, ANCHOR_SCOPE_LIMIT);
381
387
  }
382
388
  function sourceAnchorIntentBoost(tokens, node) {
@@ -456,13 +462,6 @@ function nodeKindBoost(kind) {
456
462
  return 0;
457
463
  }
458
464
  }
459
- function intersects(left, right) {
460
- for (const value of left) {
461
- if (right.has(value))
462
- return true;
463
- }
464
- return false;
465
- }
466
465
  function isPendingDocumentationCandidate(source, extraction) {
467
466
  return !extraction
468
467
  && source.status !== 'indexed'
@@ -3,7 +3,7 @@ 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
5
  import type { KnowledgeSemanticService } from '../semantic/index.js';
6
- import type { HomeGraphAskInput, HomeGraphAskResult, HomeGraphDevicePassportResult, HomeGraphExport, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphMapInput, HomeGraphMapResult, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphPageListResult, HomeGraphReindexInput, HomeGraphReindexResult, HomeGraphReviewInput, HomeGraphSpaceInput, HomeGraphSnapshotInput, HomeGraphStatus, HomeGraphSyncResult } from './types.js';
6
+ import type { HomeGraphAskInput, HomeGraphAskResult, HomeGraphDevicePassportResult, HomeGraphExport, HomeGraphIngestArtifactInput, HomeGraphIngestNoteInput, HomeGraphIngestResult, HomeGraphIngestUrlInput, HomeGraphLinkInput, HomeGraphLinkResult, HomeGraphMapInput, HomeGraphMapResult, HomeGraphProjectionInput, HomeGraphProjectionResult, HomeGraphPageListResult, HomeGraphReindexInput, HomeGraphReindexResult, HomeGraphResetResult, HomeGraphReviewInput, HomeGraphSpaceInput, HomeGraphSnapshotInput, HomeGraphStatus, HomeGraphSyncResult } from './types.js';
7
7
  export declare class HomeGraphService {
8
8
  private readonly store;
9
9
  private readonly artifactStore;
@@ -122,6 +122,7 @@ export declare class HomeGraphService {
122
122
  readonly extractions: number;
123
123
  };
124
124
  }>;
125
+ resetSpace(input: HomeGraphSpaceInput): Promise<HomeGraphResetResult>;
125
126
  private ingestCreatedArtifact;
126
127
  private extractArtifact;
127
128
  private autoLinkExistingSources;