@hydradb/sdk 2.1.5 → 2.1.6

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 (170) hide show
  1. package/dist/Client.d.ts +1 -1
  2. package/dist/Client.js +1 -1
  3. package/dist/api/client/requests/SearchQueryRequest.d.ts +10 -2
  4. package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.d.ts +7 -0
  5. package/dist/api/resources/context/client/Client.d.ts +2 -2
  6. package/dist/api/resources/context/client/Client.js +10 -4
  7. package/dist/api/resources/context/client/requests/ChunksContextRequest.d.ts +1 -1
  8. package/dist/api/resources/context/client/requests/IngestContextRequest.d.ts +4 -2
  9. package/dist/api/resources/context/client/requests/ListV2ListContentRequest.d.ts +2 -3
  10. package/dist/api/resources/context/client/requests/RelationsContextRequest.d.ts +1 -1
  11. package/dist/api/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +2 -2
  12. package/dist/api/resources/context/client/requests/SubgraphContextRequest.d.ts +1 -1
  13. package/dist/api/resources/context/types/ChunksContextRequestType.d.ts +0 -1
  14. package/dist/api/resources/context/types/ChunksContextRequestType.js +0 -1
  15. package/dist/api/resources/context/types/IngestContextRequestType.d.ts +0 -1
  16. package/dist/api/resources/context/types/IngestContextRequestType.js +0 -1
  17. package/dist/api/resources/context/types/ListV2ListContentRequestType.d.ts +2 -4
  18. package/dist/api/resources/context/types/ListV2ListContentRequestType.js +2 -4
  19. package/dist/api/resources/context/types/RelationsContextRequestType.d.ts +0 -1
  20. package/dist/api/resources/context/types/RelationsContextRequestType.js +0 -1
  21. package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +2 -3
  22. package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.js +2 -3
  23. package/dist/api/resources/context/types/SubgraphContextRequestType.d.ts +0 -1
  24. package/dist/api/resources/context/types/SubgraphContextRequestType.js +0 -1
  25. package/dist/api/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.d.ts +5 -7
  26. package/dist/api/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.js +5 -7
  27. package/dist/api/types/GraphRelationEvidence.d.ts +7 -0
  28. package/dist/api/types/HandlerConnectorLimitView.d.ts +15 -0
  29. package/dist/api/types/HandlerConnectorLimitView.js +3 -0
  30. package/dist/api/types/HandlerConnectorListResponse.d.ts +1 -0
  31. package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResult.d.ts +2 -1
  32. package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResultData.d.ts +5 -0
  33. package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResultData.js +3 -0
  34. package/dist/api/types/IngestionGraphEntity.d.ts +8 -0
  35. package/dist/api/types/IngestionGraphEntity.js +3 -0
  36. package/dist/api/types/IngestionGraphPayload.d.ts +5 -0
  37. package/dist/api/types/IngestionGraphPayload.js +3 -0
  38. package/dist/api/types/IngestionGraphRelation.d.ts +9 -0
  39. package/dist/api/types/IngestionGraphRelation.js +3 -0
  40. package/dist/api/types/ListV2MemoryItem.d.ts +8 -0
  41. package/dist/api/types/ListV2SourceItem.d.ts +8 -0
  42. package/dist/api/types/MemoriesConversationTurn.d.ts +0 -2
  43. package/dist/api/types/MemoriesForcefulRelations.d.ts +11 -0
  44. package/dist/api/types/MemoriesForcefulRelations.js +3 -0
  45. package/dist/api/types/MemoriesIngestItem.d.ts +16 -16
  46. package/dist/api/types/MemoriesUnifiedIngestRequest.d.ts +16 -4
  47. package/dist/api/types/SearchCodeSearchRepoResult.d.ts +11 -0
  48. package/dist/api/types/SearchCodeSearchRepoResult.js +3 -0
  49. package/dist/api/types/SearchCodeSearchResult.d.ts +24 -0
  50. package/dist/api/types/SearchCodeSearchResult.js +3 -0
  51. package/dist/api/types/SearchGraphPlane.d.ts +3 -3
  52. package/dist/api/types/SearchQueryChunk.d.ts +19 -0
  53. package/dist/api/types/SearchQueryChunk.js +3 -0
  54. package/dist/api/types/SearchQueryChunkEnrichmentKind.d.ts +7 -0
  55. package/dist/api/types/SearchQueryChunkEnrichmentKind.js +10 -0
  56. package/dist/api/types/SearchQueryChunkTemporal.d.ts +8 -0
  57. package/dist/api/types/SearchQueryChunkTemporal.js +3 -0
  58. package/dist/api/types/SearchQueryForcefulRelation.d.ts +6 -0
  59. package/dist/api/types/SearchQueryForcefulRelation.js +3 -0
  60. package/dist/api/types/SearchQueryGraphEdge.d.ts +13 -0
  61. package/dist/api/types/SearchQueryGraphEdge.js +3 -0
  62. package/dist/api/types/SearchQueryGraphEntity.d.ts +4 -0
  63. package/dist/api/types/SearchQueryGraphEntity.js +3 -0
  64. package/dist/api/types/SearchQueryGraphPath.d.ts +9 -0
  65. package/dist/api/types/SearchQueryGraphPath.js +3 -0
  66. package/dist/api/types/SearchQueryGraphPathOrigin.d.ts +6 -0
  67. package/dist/api/types/SearchQueryGraphPathOrigin.js +9 -0
  68. package/dist/api/types/SearchQueryGraphTriplet.d.ts +6 -0
  69. package/dist/api/types/SearchQueryGraphTriplet.js +3 -0
  70. package/dist/api/types/SearchQueryResult.d.ts +14 -0
  71. package/dist/api/types/SearchQueryResult.js +3 -0
  72. package/dist/api/types/SearchResolvedReference.d.ts +4 -0
  73. package/dist/api/types/SearchResolvedReference.js +3 -0
  74. package/dist/api/types/SearchSourceType.d.ts +0 -1
  75. package/dist/api/types/SearchSourceType.js +0 -1
  76. package/dist/api/types/SearchV2RetrievalResult.d.ts +20 -0
  77. package/dist/api/types/TenantsDatabaseDetail.d.ts +2 -2
  78. package/dist/api/types/TenantsDatabaseDetailType.d.ts +2 -3
  79. package/dist/api/types/TenantsDatabaseDetailType.js +2 -3
  80. package/dist/api/types/TenantsInfraStatusResponseV2.d.ts +2 -2
  81. package/dist/api/types/TenantsInfraStatusResponseV2Type.d.ts +2 -3
  82. package/dist/api/types/TenantsInfraStatusResponseV2Type.js +2 -3
  83. package/dist/api/types/TenantsTenantIdsResponse.d.ts +1 -5
  84. package/dist/api/types/index.d.ts +19 -0
  85. package/dist/api/types/index.js +19 -0
  86. package/dist/helpers/buildString.d.ts +9 -3
  87. package/dist/helpers/buildString.js +28 -3
  88. package/dist/serialization/client/requests/SearchQueryRequest.d.ts +2 -0
  89. package/dist/serialization/client/requests/SearchQueryRequest.js +2 -0
  90. package/dist/serialization/resources/connectors/client/requests/HandlerConfigureReq.d.ts +1 -0
  91. package/dist/serialization/resources/connectors/client/requests/HandlerConfigureReq.js +1 -0
  92. package/dist/serialization/resources/context/types/ChunksContextRequestType.d.ts +1 -1
  93. package/dist/serialization/resources/context/types/ChunksContextRequestType.js +1 -1
  94. package/dist/serialization/resources/context/types/IngestContextRequestType.d.ts +1 -1
  95. package/dist/serialization/resources/context/types/IngestContextRequestType.js +1 -1
  96. package/dist/serialization/resources/context/types/ListV2ListContentRequestType.d.ts +1 -1
  97. package/dist/serialization/resources/context/types/ListV2ListContentRequestType.js +1 -1
  98. package/dist/serialization/resources/context/types/RelationsContextRequestType.d.ts +1 -1
  99. package/dist/serialization/resources/context/types/RelationsContextRequestType.js +1 -1
  100. package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +1 -1
  101. package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.js +1 -1
  102. package/dist/serialization/resources/context/types/SubgraphContextRequestType.d.ts +1 -1
  103. package/dist/serialization/resources/context/types/SubgraphContextRequestType.js +1 -1
  104. package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.d.ts +1 -1
  105. package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.js +1 -1
  106. package/dist/serialization/types/GraphRelationEvidence.d.ts +1 -0
  107. package/dist/serialization/types/GraphRelationEvidence.js +1 -0
  108. package/dist/serialization/types/HandlerConnectorLimitView.d.ts +12 -0
  109. package/dist/serialization/types/HandlerConnectorLimitView.js +44 -0
  110. package/dist/serialization/types/HandlerConnectorListResponse.d.ts +2 -0
  111. package/dist/serialization/types/HandlerConnectorListResponse.js +2 -0
  112. package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResult.d.ts +2 -2
  113. package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResult.js +2 -2
  114. package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResultData.d.ts +9 -0
  115. package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResultData.js +41 -0
  116. package/dist/serialization/types/IngestionGraphEntity.d.ts +12 -0
  117. package/dist/serialization/types/IngestionGraphEntity.js +44 -0
  118. package/dist/serialization/types/IngestionGraphPayload.d.ts +12 -0
  119. package/dist/serialization/types/IngestionGraphPayload.js +44 -0
  120. package/dist/serialization/types/IngestionGraphRelation.d.ts +13 -0
  121. package/dist/serialization/types/IngestionGraphRelation.js +45 -0
  122. package/dist/serialization/types/ListV2MemoryItem.d.ts +1 -0
  123. package/dist/serialization/types/ListV2MemoryItem.js +1 -0
  124. package/dist/serialization/types/ListV2SourceItem.d.ts +1 -0
  125. package/dist/serialization/types/ListV2SourceItem.js +1 -0
  126. package/dist/serialization/types/MemoriesConversationTurn.d.ts +0 -1
  127. package/dist/serialization/types/MemoriesConversationTurn.js +0 -1
  128. package/dist/serialization/types/MemoriesForcefulRelations.d.ts +10 -0
  129. package/dist/serialization/types/MemoriesForcefulRelations.js +42 -0
  130. package/dist/serialization/types/MemoriesIngestItem.d.ts +4 -4
  131. package/dist/serialization/types/MemoriesIngestItem.js +4 -4
  132. package/dist/serialization/types/MemoriesUnifiedIngestRequest.d.ts +7 -2
  133. package/dist/serialization/types/MemoriesUnifiedIngestRequest.js +7 -2
  134. package/dist/serialization/types/SearchCodeSearchRepoResult.d.ts +15 -0
  135. package/dist/serialization/types/SearchCodeSearchRepoResult.js +47 -0
  136. package/dist/serialization/types/SearchCodeSearchResult.d.ts +14 -0
  137. package/dist/serialization/types/SearchCodeSearchResult.js +46 -0
  138. package/dist/serialization/types/SearchQueryChunk.d.ts +18 -0
  139. package/dist/serialization/types/SearchQueryChunk.js +50 -0
  140. package/dist/serialization/types/SearchQueryChunkEnrichmentKind.d.ts +7 -0
  141. package/dist/serialization/types/SearchQueryChunkEnrichmentKind.js +39 -0
  142. package/dist/serialization/types/SearchQueryChunkTemporal.d.ts +11 -0
  143. package/dist/serialization/types/SearchQueryChunkTemporal.js +43 -0
  144. package/dist/serialization/types/SearchQueryForcefulRelation.d.ts +12 -0
  145. package/dist/serialization/types/SearchQueryForcefulRelation.js +44 -0
  146. package/dist/serialization/types/SearchQueryGraphEdge.d.ts +14 -0
  147. package/dist/serialization/types/SearchQueryGraphEdge.js +46 -0
  148. package/dist/serialization/types/SearchQueryGraphEntity.d.ts +10 -0
  149. package/dist/serialization/types/SearchQueryGraphEntity.js +42 -0
  150. package/dist/serialization/types/SearchQueryGraphPath.d.ts +13 -0
  151. package/dist/serialization/types/SearchQueryGraphPath.js +45 -0
  152. package/dist/serialization/types/SearchQueryGraphPathOrigin.d.ts +7 -0
  153. package/dist/serialization/types/SearchQueryGraphPathOrigin.js +39 -0
  154. package/dist/serialization/types/SearchQueryGraphTriplet.d.ts +13 -0
  155. package/dist/serialization/types/SearchQueryGraphTriplet.js +45 -0
  156. package/dist/serialization/types/SearchQueryResult.d.ts +15 -0
  157. package/dist/serialization/types/SearchQueryResult.js +47 -0
  158. package/dist/serialization/types/SearchResolvedReference.d.ts +10 -0
  159. package/dist/serialization/types/SearchResolvedReference.js +42 -0
  160. package/dist/serialization/types/SearchSourceType.d.ts +1 -1
  161. package/dist/serialization/types/SearchSourceType.js +1 -1
  162. package/dist/serialization/types/SearchV2RetrievalResult.d.ts +6 -0
  163. package/dist/serialization/types/SearchV2RetrievalResult.js +6 -0
  164. package/dist/serialization/types/TenantsDatabaseDetailType.d.ts +1 -1
  165. package/dist/serialization/types/TenantsDatabaseDetailType.js +1 -1
  166. package/dist/serialization/types/TenantsInfraStatusResponseV2Type.d.ts +1 -1
  167. package/dist/serialization/types/TenantsInfraStatusResponseV2Type.js +1 -1
  168. package/dist/serialization/types/index.d.ts +19 -0
  169. package/dist/serialization/types/index.js +19 -0
  170. package/package.json +1 -1
package/dist/Client.d.ts CHANGED
@@ -51,7 +51,7 @@ export declare class HydraDBClient {
51
51
  listProviders(request?: HydraDB.ListProvidersRequest, requestOptions?: HydraDBClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerProviderListResponse>;
52
52
  private __listProviders;
53
53
  /**
54
- * Unified query endpoint that dispatches across type and query_by (hybrid/text). Optionally filter by one or more exact document titles with `titles`; these are resolved to source IDs before normal retrieval. Filter with `attributes` (an operator language, pushed into the vector search); `metadata_filters` is deprecated in favour of it and still works. On a SPLIT database `type` is knowledge (the default), memory, or all (both, merged), unchanged. On a UNIFIED database there is one corpus: omit `type`, or send `unified` (`all` is accepted and means the same); knowledge and memory are rejected there. Prefer sub_tenant_ids for sub-tenant scoping; legacy sub_tenant_id is deprecated for /query and cannot be sent together with sub_tenant_ids.
54
+ * Unified query endpoint that dispatches across type and query_by (hybrid/text). Optionally filter by one or more exact document titles with `titles`; these are resolved to source IDs before normal retrieval. Filter with `attributes` (an operator language, pushed into the vector search); `metadata_filters` is deprecated in favour of it and still works. `type` is knowledge (the default), memory, or all (both, merged). Prefer sub_tenant_ids for sub-tenant scoping; legacy sub_tenant_id is deprecated for /query and cannot be sent together with sub_tenant_ids. The response body always carries `llm_prompt`: the whole result rendered as a single Markdown string (results, related facts, temporal facts, profiles and sources, with citable ids inline), ready to inject verbatim into an LLM context.
55
55
  *
56
56
  * @param {HydraDB.SearchQueryRequest} request
57
57
  * @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
package/dist/Client.js CHANGED
@@ -180,7 +180,7 @@ class HydraDBClient {
180
180
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/connectors/providers");
181
181
  }
182
182
  /**
183
- * Unified query endpoint that dispatches across type and query_by (hybrid/text). Optionally filter by one or more exact document titles with `titles`; these are resolved to source IDs before normal retrieval. Filter with `attributes` (an operator language, pushed into the vector search); `metadata_filters` is deprecated in favour of it and still works. On a SPLIT database `type` is knowledge (the default), memory, or all (both, merged), unchanged. On a UNIFIED database there is one corpus: omit `type`, or send `unified` (`all` is accepted and means the same); knowledge and memory are rejected there. Prefer sub_tenant_ids for sub-tenant scoping; legacy sub_tenant_id is deprecated for /query and cannot be sent together with sub_tenant_ids.
183
+ * Unified query endpoint that dispatches across type and query_by (hybrid/text). Optionally filter by one or more exact document titles with `titles`; these are resolved to source IDs before normal retrieval. Filter with `attributes` (an operator language, pushed into the vector search); `metadata_filters` is deprecated in favour of it and still works. `type` is knowledge (the default), memory, or all (both, merged). Prefer sub_tenant_ids for sub-tenant scoping; legacy sub_tenant_id is deprecated for /query and cannot be sent together with sub_tenant_ids. The response body always carries `llm_prompt`: the whole result rendered as a single Markdown string (results, related facts, temporal facts, profiles and sources, with citable ids inline), ready to inject verbatim into an LLM context.
184
184
  *
185
185
  * @param {HydraDB.SearchQueryRequest} request
186
186
  * @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -37,6 +37,12 @@ export interface SearchQueryRequest {
37
37
  * behaves like `metadata_filters` on every part of the response.
38
38
  */
39
39
  attributes?: Record<string, unknown>;
40
+ /**
41
+ * CodeSearch forces the repository code-search branch on (true) or off
42
+ * (false) for this query, overriding the classifier. Nil = let the
43
+ * classifier decide. Only meaningful where the branch is enabled.
44
+ */
45
+ codeSearch?: boolean;
40
46
  /** Collection scope. Defaults to the default collection when omitted. Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still accepted (deprecated). */
41
47
  collection?: string;
42
48
  /** Preferred /query scope selector. Send either a list of collection IDs for equal normalized weighting, or an object mapping collection ID to a positive relative ranking weight with at most one decimal place. Do not send together with the deprecated sub_tenant_ids or sub_tenant_id. */
@@ -48,6 +54,8 @@ export interface SearchQueryRequest {
48
54
  * handler reads it; Database/Collection are carried only for docs/OpenAPI.
49
55
  */
50
56
  database?: string;
57
+ /** Whether to follow the relations the author declared at ingest (forceful_relations) and return the related contexts. Defaults to true when omitted. */
58
+ followForcefulRelations?: boolean;
51
59
  /** Whether to include graph context in the response. Defaults to true for /query when omitted. */
52
60
  graphContext?: boolean;
53
61
  /**
@@ -106,7 +114,7 @@ export interface SearchQueryRequest {
106
114
  queryApps?: boolean;
107
115
  /** Retrieval method to use for the query. */
108
116
  queryBy?: HydraDB.SearchQueryBy;
109
- /** Whether to force relation expansion for graph-aware query retrieval. Defaults to true when omitted. */
117
+ /** Deprecated alias for follow_forceful_relations. Ignored when follow_forceful_relations is sent. */
110
118
  queryForcefulRelations?: boolean;
111
119
  /** Recency boost applied to ranking (0.0-1.0). Omit it to get the always-on default baseline of 0.40 (a bounded <=40% swing on normalized relevance — it reorders within a relevance gap of up to 0.40 but never buries a more strongly relevant result); send 0 to disable recency entirely; higher values favour more recent sources more strongly. */
112
120
  recencyBias?: number;
@@ -138,6 +146,6 @@ export interface SearchQueryRequest {
138
146
  tenantId?: string;
139
147
  /** Optional exact document-title filter. Values are matched case-insensitively and ORed, resolved to source IDs, then the normal query pipeline runs within that source scope. When ids is also supplied, the two filters are intersected. */
140
148
  titles?: string[];
141
- /** Corpus to query. Split database: knowledge (the default), memory, or all (both, merged). Unified database: omit it, or send unified (all is accepted and means the same); knowledge and memory are rejected there. */
149
+ /** Deprecated: kept for split databases. Corpus to query: knowledge (the default), memory, or all (both, merged). */
142
150
  type?: HydraDB.SearchSourceType;
143
151
  }
@@ -25,6 +25,13 @@ export interface HandlerConfigureReq {
25
25
  id: string;
26
26
  /** Internal interval for async backfill paging. */
27
27
  backfillChunkIntervalSeconds?: number;
28
+ /**
29
+ * FullVisibilityRoles names the HubSpot roles whose members can see every
30
+ * record (PRO-2036). Resolved to ids against the portal at configure time
31
+ * and stored on the account-wide resource row. A pointer so an omitted
32
+ * field keeps the current setting while an explicit [] clears it.
33
+ */
34
+ fullVisibilityRoles?: string[];
28
35
  /** How far back the first sync fetches historical data. Only applies to the initial sync — subsequent syncs are incremental from the last cursor. */
29
36
  lookbackDays?: number;
30
37
  /** Resources to activate for this connector. Each item corresponds to one entry from the Discover endpoint. */
@@ -60,7 +60,7 @@ export declare class ContextClient {
60
60
  chunks(request: HydraDB.ChunksContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeSearchChunkInspectResult>;
61
61
  private __chunks;
62
62
  /**
63
- * Ingest content for a database. `items` is the unified shape (text or a conversation per item) and the only one a unified database accepts; a split database still takes the deprecated `documents`, `app_knowledge` and `memories` fields selected by `type`. The same `items` array may also be sent as an application/json body.
63
+ * Ingest content for a database. `context` is the preferred shape (text or a conversation per item); the deprecated `documents`, `app_knowledge` and `memories` fields are selected by `type`. The same `context` array may also be sent as an application/json body.
64
64
  *
65
65
  * @param {HydraDB.IngestContextRequest} request
66
66
  * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -100,7 +100,7 @@ export declare class ContextClient {
100
100
  inspect(request: HydraDB.InspectContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeFetchV2SourceFetchResponse>;
101
101
  private __inspect;
102
102
  /**
103
- * List items (id + metadata) for a database. Split database: knowledge sources (default) or memories, selected by `type`. Unified database: every item in one page (type=unified, the default).
103
+ * List items (id + metadata) for a database: knowledge sources (default) or memories, selected by `type`.
104
104
  *
105
105
  * @param {HydraDB.ListV2ListContentRequest} request
106
106
  * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -232,7 +232,7 @@ class ContextClient {
232
232
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/context/chunks");
233
233
  }
234
234
  /**
235
- * Ingest content for a database. `items` is the unified shape (text or a conversation per item) and the only one a unified database accepts; a split database still takes the deprecated `documents`, `app_knowledge` and `memories` fields selected by `type`. The same `items` array may also be sent as an application/json body.
235
+ * Ingest content for a database. `context` is the preferred shape (text or a conversation per item); the deprecated `documents`, `app_knowledge` and `memories` fields are selected by `type`. The same `context` array may also be sent as an application/json body.
236
236
  *
237
237
  * @param {HydraDB.IngestContextRequest} request
238
238
  * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -259,6 +259,9 @@ class ContextClient {
259
259
  if (request.collection != null) {
260
260
  _body.append("collection", request.collection);
261
261
  }
262
+ if (request.context != null) {
263
+ _body.append("context", request.context);
264
+ }
262
265
  _body.append("database", request.database);
263
266
  if (request.documentMetadata != null) {
264
267
  _body.append("document_metadata", request.documentMetadata);
@@ -268,11 +271,14 @@ class ContextClient {
268
271
  await _body.appendFile("documents", _file);
269
272
  }
270
273
  }
274
+ if (request.enrich != null) {
275
+ _body.append("enrich", request.enrich);
276
+ }
271
277
  if (request.graphPayload != null) {
272
278
  _body.append("graph_payload", request.graphPayload);
273
279
  }
274
- if (request.items != null) {
275
- _body.append("items", request.items);
280
+ if (request.instructions != null) {
281
+ _body.append("instructions", request.instructions);
276
282
  }
277
283
  if (request.memories != null) {
278
284
  _body.append("memories", request.memories);
@@ -458,7 +464,7 @@ class ContextClient {
458
464
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/context/inspect");
459
465
  }
460
466
  /**
461
- * List items (id + metadata) for a database. Split database: knowledge sources (default) or memories, selected by `type`. Unified database: every item in one page (type=unified, the default).
467
+ * List items (id + metadata) for a database: knowledge sources (default) or memories, selected by `type`.
462
468
  *
463
469
  * @param {HydraDB.ListV2ListContentRequest} request
464
470
  * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -22,7 +22,7 @@ export interface ChunksContextRequest {
22
22
  id?: string;
23
23
  /** Chunk IDs to return. Repeated (chunk_ids=a&chunk_ids=b) or comma-separated. Takes precedence over id. */
24
24
  chunkIds?: string | string[];
25
- /** Corpus type. Split database: 'knowledge' (default), 'memory', or 'all'. Unified database: 'unified' (default); knowledge/memory are rejected. This read addresses one corpus, so 'all' answers from knowledge and meta.source_type reports which corpus answered. */
25
+ /** Deprecated: kept for split databases. Corpus type: 'knowledge' (default), 'memory', or 'all'. This read addresses one corpus, so 'all' answers from knowledge and meta.source_type reports which corpus answered. */
26
26
  type?: HydraDB.ChunksContextRequestType;
27
27
  /** Max chunks to return */
28
28
  limit?: number;
@@ -10,13 +10,15 @@ export interface IngestContextRequest {
10
10
  /** App-knowledge items as a JSON array (type=knowledge). Per item, `metadata` is capped at 16 KiB and `additional_metadata` at 1 KiB, measured on the compact JSON encoding of the whole map in UTF-8 bytes (keys and punctuation count). The deprecated `tenant_metadata` / `document_metadata` spellings are accepted here and held to the same caps. Over-cap returns 400 with the actual byte count. Each item may also carry `acl`, a list of principals (`user_email:<email>`, a bare email, `group:<provider>:<id>`, `domain:<domain>`, or `__public__`) restricting who may retrieve it; omit it to leave the document unrestricted, and send an empty list to restrict it to nobody. A malformed principal rejects the whole request with 400. Items may also carry `evidence_kind`/`evidence_subject` provenance labels (see document_metadata); an unknown kind returns 400. */
11
11
  appKnowledge?: string;
12
12
  collection?: string;
13
+ /** JSON-encoded array of contexts -- text or a conversation per item. The same array may also be POSTed as an application/json body under `context`; that variant is not listed here so SDK generators emit this form, which carries every field. */
14
+ context?: string;
13
15
  database: string;
14
16
  /** Per-document metadata as a JSON array (type=knowledge). Per item, `metadata` is capped at 16 KiB and `additional_metadata` at 1 KiB. Both caps are measured on the compact JSON encoding of the whole map in UTF-8 bytes, so keys, quotes, commas and braces count toward the budget. Over-cap returns 400 with the actual byte count. Each item may also carry evidence labels (`evidence_kind`: one of assertion, record, said, done, third_party, inferred; `evidence_subject`: a stable handle for who the evidence is about, e.g. `user:kiran@acme.com`) declaring the content's provenance for entity understanding; an unknown kind returns 400. */
15
17
  documentMetadata?: string;
16
18
  documents?: core.file.Uploadable[] | undefined;
19
+ enrich?: string;
17
20
  graphPayload?: string;
18
- /** JSON-encoded array of ingest items -- the unified shape (text or a conversation per item), and the only one a unified database accepts. The same array may also be POSTed as an application/json body; that variant is not listed here so SDK generators emit this form, which carries every field. */
19
- items?: string;
21
+ instructions?: string;
20
22
  /** Memory items as a JSON array (type=memory). Per item, `metadata` is capped at 16 KiB and `additional_metadata` at 1 KiB, measured on the compact JSON encoding of the whole map in UTF-8 bytes (keys and punctuation count). Over-cap returns 400 with the actual byte count. Items may also carry `evidence_kind`/`evidence_subject` provenance labels (see document_metadata); an unknown kind returns 400. */
21
23
  memories?: string;
22
24
  subTenantId?: string;
@@ -36,9 +36,8 @@ export interface ListV2ListContentRequest {
36
36
  /** deprecated: use database */
37
37
  tenantId?: string;
38
38
  /**
39
- * Type names the corpus. Split database: knowledge (default) or memory.
40
- * Unified database: unified (default), every item in one page;
41
- * knowledge/memory are rejected there.
39
+ * Deprecated: kept for split databases.
40
+ * Type names the corpus: knowledge (default) or memory.
42
41
  */
43
42
  type?: HydraDB.ListV2ListContentRequestType;
44
43
  }
@@ -20,7 +20,7 @@ export interface RelationsContextRequest {
20
20
  subTenantId?: string;
21
21
  /** Source ID (omit for database-wide relations) */
22
22
  id?: string;
23
- /** Corpus type. Split database: 'knowledge' (default), 'memory', or 'all'. Unified database: 'unified' (default); knowledge/memory are rejected. This read addresses one corpus, so 'all' answers from knowledge and meta.source_type reports which corpus answered. */
23
+ /** Deprecated: kept for split databases. Corpus type: 'knowledge' (default), 'memory', or 'all'. This read addresses one corpus, so 'all' answers from knowledge and meta.source_type reports which corpus answered. */
24
24
  type?: HydraDB.RelationsContextRequestType;
25
25
  /** Max relations to return */
26
26
  limit?: number;
@@ -21,8 +21,8 @@ export interface SourcesV2SourceDeleteRequest {
21
21
  /** deprecated: use database */
22
22
  tenantId?: string;
23
23
  /**
24
- * Type names the corpus. Split database: knowledge (default) or memory.
25
- * Unified database: unified (default); knowledge/memory are rejected there.
24
+ * Deprecated: kept for split databases.
25
+ * Type names the corpus: knowledge (default) or memory.
26
26
  */
27
27
  type?: HydraDB.SourcesV2SourceDeleteRequestType;
28
28
  }
@@ -20,7 +20,7 @@ export interface SubgraphContextRequest {
20
20
  tenantId?: string;
21
21
  /** Deprecated alias for collection */
22
22
  subTenantId?: string;
23
- /** Corpus type. Split database: 'knowledge' (default), 'memory', or 'all'. Unified database: 'unified' (default); knowledge/memory are rejected. This read addresses one corpus, so 'all' answers from knowledge and meta.source_type reports which corpus answered. */
23
+ /** Deprecated: kept for split databases. Corpus type: 'knowledge' (default), 'memory', or 'all'. This read addresses one corpus, so 'all' answers from knowledge and meta.source_type reports which corpus answered. */
24
24
  type?: HydraDB.SubgraphContextRequestType;
25
25
  /** Max traversal depth in hops */
26
26
  depth?: number;
@@ -1,7 +1,6 @@
1
1
  export declare const ChunksContextRequestType: {
2
2
  readonly Knowledge: "knowledge";
3
3
  readonly Memory: "memory";
4
- readonly Unified: "unified";
5
4
  readonly All: "all";
6
5
  };
7
6
  export type ChunksContextRequestType = (typeof ChunksContextRequestType)[keyof typeof ChunksContextRequestType];
@@ -5,6 +5,5 @@ exports.ChunksContextRequestType = void 0;
5
5
  exports.ChunksContextRequestType = {
6
6
  Knowledge: "knowledge",
7
7
  Memory: "memory",
8
- Unified: "unified",
9
8
  All: "all",
10
9
  };
@@ -1,6 +1,5 @@
1
1
  export declare const IngestContextRequestType: {
2
2
  readonly Knowledge: "knowledge";
3
3
  readonly Memory: "memory";
4
- readonly Unified: "unified";
5
4
  };
6
5
  export type IngestContextRequestType = (typeof IngestContextRequestType)[keyof typeof IngestContextRequestType];
@@ -5,5 +5,4 @@ exports.IngestContextRequestType = void 0;
5
5
  exports.IngestContextRequestType = {
6
6
  Knowledge: "knowledge",
7
7
  Memory: "memory",
8
- Unified: "unified",
9
8
  };
@@ -1,12 +1,10 @@
1
1
  /**
2
- * Type names the corpus. Split database: knowledge (default) or memory.
3
- * Unified database: unified (default), every item in one page;
4
- * knowledge/memory are rejected there.
2
+ * Deprecated: kept for split databases.
3
+ * Type names the corpus: knowledge (default) or memory.
5
4
  */
6
5
  export declare const ListV2ListContentRequestType: {
7
6
  readonly Knowledge: "knowledge";
8
7
  readonly Memory: "memory";
9
- readonly Unified: "unified";
10
8
  readonly All: "all";
11
9
  };
12
10
  export type ListV2ListContentRequestType = (typeof ListV2ListContentRequestType)[keyof typeof ListV2ListContentRequestType];
@@ -3,13 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ListV2ListContentRequestType = void 0;
5
5
  /**
6
- * Type names the corpus. Split database: knowledge (default) or memory.
7
- * Unified database: unified (default), every item in one page;
8
- * knowledge/memory are rejected there.
6
+ * Deprecated: kept for split databases.
7
+ * Type names the corpus: knowledge (default) or memory.
9
8
  */
10
9
  exports.ListV2ListContentRequestType = {
11
10
  Knowledge: "knowledge",
12
11
  Memory: "memory",
13
- Unified: "unified",
14
12
  All: "all",
15
13
  };
@@ -1,7 +1,6 @@
1
1
  export declare const RelationsContextRequestType: {
2
2
  readonly Knowledge: "knowledge";
3
3
  readonly Memory: "memory";
4
- readonly Unified: "unified";
5
4
  readonly All: "all";
6
5
  };
7
6
  export type RelationsContextRequestType = (typeof RelationsContextRequestType)[keyof typeof RelationsContextRequestType];
@@ -5,6 +5,5 @@ exports.RelationsContextRequestType = void 0;
5
5
  exports.RelationsContextRequestType = {
6
6
  Knowledge: "knowledge",
7
7
  Memory: "memory",
8
- Unified: "unified",
9
8
  All: "all",
10
9
  };
@@ -1,11 +1,10 @@
1
1
  /**
2
- * Type names the corpus. Split database: knowledge (default) or memory.
3
- * Unified database: unified (default); knowledge/memory are rejected there.
2
+ * Deprecated: kept for split databases.
3
+ * Type names the corpus: knowledge (default) or memory.
4
4
  */
5
5
  export declare const SourcesV2SourceDeleteRequestType: {
6
6
  readonly Knowledge: "knowledge";
7
7
  readonly Memory: "memory";
8
- readonly Unified: "unified";
9
8
  readonly All: "all";
10
9
  };
11
10
  export type SourcesV2SourceDeleteRequestType = (typeof SourcesV2SourceDeleteRequestType)[keyof typeof SourcesV2SourceDeleteRequestType];
@@ -3,12 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.SourcesV2SourceDeleteRequestType = void 0;
5
5
  /**
6
- * Type names the corpus. Split database: knowledge (default) or memory.
7
- * Unified database: unified (default); knowledge/memory are rejected there.
6
+ * Deprecated: kept for split databases.
7
+ * Type names the corpus: knowledge (default) or memory.
8
8
  */
9
9
  exports.SourcesV2SourceDeleteRequestType = {
10
10
  Knowledge: "knowledge",
11
11
  Memory: "memory",
12
- Unified: "unified",
13
12
  All: "all",
14
13
  };
@@ -1,7 +1,6 @@
1
1
  export declare const SubgraphContextRequestType: {
2
2
  readonly Knowledge: "knowledge";
3
3
  readonly Memory: "memory";
4
- readonly Unified: "unified";
5
4
  readonly All: "all";
6
5
  };
7
6
  export type SubgraphContextRequestType = (typeof SubgraphContextRequestType)[keyof typeof SubgraphContextRequestType];
@@ -5,6 +5,5 @@ exports.SubgraphContextRequestType = void 0;
5
5
  exports.SubgraphContextRequestType = {
6
6
  Knowledge: "knowledge",
7
7
  Memory: "memory",
8
- Unified: "unified",
9
8
  All: "all",
10
9
  };
@@ -1,13 +1,11 @@
1
1
  /**
2
- * StorageLayout is the physical storage layout the database is created with
3
- * (PRO-1618), from the request's `type` field. Absent or "split" keeps the
4
- * two-collection layout every existing database uses; "unified" is the
5
- * single-collection layout. Fixed at creation and IMMUTABLE thereafter: the
6
- * layout decides how every entity id is hashed, so a database that changed
2
+ * StorageLayout is the physical storage layout the database is created with,
3
+ * from the request's `type` field. "split" is the two-collection layout every
4
+ * database uses, and the default. Fixed at creation and IMMUTABLE thereafter:
5
+ * the layout decides how every entity id is hashed, so a database that changed
7
6
  * its mind would orphan everything already stored.
8
7
  */
9
8
  export declare const GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout: {
10
- readonly Split: "split";
11
- readonly Unified: "unified";
9
+ readonly LayoutSplit: "split";
12
10
  };
13
11
  export type GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout = (typeof GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout)[keyof typeof GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout];
@@ -3,14 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout = void 0;
5
5
  /**
6
- * StorageLayout is the physical storage layout the database is created with
7
- * (PRO-1618), from the request's `type` field. Absent or "split" keeps the
8
- * two-collection layout every existing database uses; "unified" is the
9
- * single-collection layout. Fixed at creation and IMMUTABLE thereafter: the
10
- * layout decides how every entity id is hashed, so a database that changed
6
+ * StorageLayout is the physical storage layout the database is created with,
7
+ * from the request's `type` field. "split" is the two-collection layout every
8
+ * database uses, and the default. Fixed at creation and IMMUTABLE thereafter:
9
+ * the layout decides how every entity id is hashed, so a database that changed
11
10
  * its mind would orphan everything already stored.
12
11
  */
13
12
  exports.GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout = {
14
- Split: "split",
15
- Unified: "unified",
13
+ LayoutSplit: "split",
16
14
  };
@@ -7,6 +7,13 @@ export interface GraphRelationEvidence {
7
7
  confidence?: number;
8
8
  /** Verbatim passage from the source that evidences the relationship. */
9
9
  context?: string;
10
+ /**
11
+ * Properties are the caller's own properties on a forceful_relation edge,
12
+ * exactly as declared at ingest (`forceful_relations.properties`). Flat
13
+ * scalars. Omitted on every other edge and on a forceful relation that
14
+ * declared none.
15
+ */
16
+ properties?: Record<string, unknown>;
10
17
  /** As-extracted predicate before normalization. */
11
18
  rawPredicate?: string;
12
19
  /** Unique identifier for this relationship instance. */
@@ -0,0 +1,15 @@
1
+ /**
2
+ * ConnectorLimit is present when the org has used its plan's connector
3
+ * allowance (Free: 3) and the caps mode enforces it: creating another
4
+ * connector is refused with 402. Connectors already past the allowance
5
+ * keep syncing; the limit applies to creating one. Absent otherwise, and
6
+ * sent with the health rollups only.
7
+ */
8
+ export interface HandlerConnectorLimitView {
9
+ /** Total number of items returned. */
10
+ count?: number;
11
+ limit?: number;
12
+ /** Human-readable result message. */
13
+ message?: string;
14
+ plan?: string;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  import type * as HydraDB from "../index.js";
2
2
  export interface HandlerConnectorListResponse {
3
+ connectorLimit?: HydraDB.HandlerConnectorLimitView;
3
4
  connectors?: HydraDB.HandlerConnectorApiView[];
4
5
  /**
5
6
  * Health maps connector_id to its rollup (healthy | degraded | failed |
@@ -1,6 +1,7 @@
1
1
  import type * as HydraDB from "../index.js";
2
2
  export interface HandlerEnvelopeSearchV2RetrievalResult {
3
- data?: HydraDB.SearchV2RetrievalResult;
3
+ /** The response body, in the shape the database answers with: the v2 body (chunks, graph_context, sources and related fields), or the four-key body (chunks, graph, forceful_relations, llm_prompt). */
4
+ data?: HydraDB.HandlerEnvelopeSearchV2RetrievalResultData;
4
5
  /** Error message, empty string on success. */
5
6
  error?: HydraDB.HandlerApiError;
6
7
  meta?: HydraDB.HandlerResponseMeta;
@@ -0,0 +1,5 @@
1
+ import type * as HydraDB from "../index.js";
2
+ /**
3
+ * The response body, in the shape the database answers with: the v2 body (chunks, graph_context, sources and related fields), or the four-key body (chunks, graph, forceful_relations, llm_prompt).
4
+ */
5
+ export type HandlerEnvelopeSearchV2RetrievalResultData = HydraDB.SearchV2RetrievalResult | HydraDB.SearchQueryResult;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface IngestionGraphEntity {
2
+ identifier?: string;
3
+ /** Human-readable label for this resource. */
4
+ name?: string;
5
+ /** Namespace grouping for the entity (e.g. `organization`, `person`). */
6
+ namespace?: string;
7
+ type?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as HydraDB from "../index.js";
2
+ export interface IngestionGraphPayload {
3
+ entities?: Record<string, HydraDB.IngestionGraphEntity>;
4
+ relations?: HydraDB.IngestionGraphRelation[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export interface IngestionGraphRelation {
2
+ /** Verbatim passage from the source that evidences the relationship. */
3
+ context?: string;
4
+ predicate?: string;
5
+ source?: string;
6
+ target?: string;
7
+ /** Temporal context extracted alongside the relationship (e.g. `since 2024`). Serialized as null rather than omitted. */
8
+ temporalDetails?: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -35,6 +35,14 @@ export interface ListV2MemoryItem {
35
35
  */
36
36
  comments?: Record<string, unknown>[];
37
37
  commentsTruncated?: boolean;
38
+ /**
39
+ * ContextCategory is the context category the caller pinned on ingest:
40
+ * one of user_preference, business_knowledge or decision_trace, written
41
+ * onto the source row by the ingestion pipeline (PRO-1618). Absent when no
42
+ * category was pinned, on rows ingested before the category existed, and
43
+ * on every split-database row, which carries no category.
44
+ */
45
+ contextCategory?: string;
38
46
  /** Database is the canonical name for the scope this row was listed from. */
39
47
  database: string;
40
48
  /** Human-readable description of the source. */
@@ -38,6 +38,14 @@ export interface ListV2SourceItem {
38
38
  comments?: Record<string, unknown>[];
39
39
  /** True when the inline `comments` array hit the per-parent cap and more children exist. Fetch them via `filters.additional_metadata` on the parent's external ID. */
40
40
  commentsTruncated?: boolean;
41
+ /**
42
+ * ContextCategory is the context category the caller pinned on ingest:
43
+ * one of user_preference, business_knowledge or decision_trace, written
44
+ * onto the source row by the ingestion pipeline (PRO-1618). Absent when no
45
+ * category was pinned, on rows ingested before the category existed, and
46
+ * on every split-database row, which carries no category.
47
+ */
48
+ contextCategory?: string;
41
49
  /** Database is the canonical name for the scope this row was listed from. */
42
50
  database: string;
43
51
  /** Human-readable description of the source. */
@@ -1,7 +1,5 @@
1
1
  export interface MemoriesConversationTurn {
2
2
  /** Extracted text content of the source document. */
3
3
  content?: string;
4
- /** Human-readable label for this resource. */
5
- name?: string;
6
4
  role?: string;
7
5
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * ForcefulRelations are the contexts the caller says this one relates to,
3
+ * by context_id, with optional properties stored on each edge. They are
4
+ * followed at query time (follow_forceful_relations) and returned as
5
+ * `forceful_relations[]`. Any item may declare them; on the split surface
6
+ * only a knowledge item could.
7
+ */
8
+ export interface MemoriesForcefulRelations {
9
+ contextIds?: string[];
10
+ properties?: Record<string, unknown>;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });