@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.
- package/dist/Client.d.ts +1 -1
- package/dist/Client.js +1 -1
- package/dist/api/client/requests/SearchQueryRequest.d.ts +10 -2
- package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.d.ts +7 -0
- package/dist/api/resources/context/client/Client.d.ts +2 -2
- package/dist/api/resources/context/client/Client.js +10 -4
- package/dist/api/resources/context/client/requests/ChunksContextRequest.d.ts +1 -1
- package/dist/api/resources/context/client/requests/IngestContextRequest.d.ts +4 -2
- package/dist/api/resources/context/client/requests/ListV2ListContentRequest.d.ts +2 -3
- package/dist/api/resources/context/client/requests/RelationsContextRequest.d.ts +1 -1
- package/dist/api/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +2 -2
- package/dist/api/resources/context/client/requests/SubgraphContextRequest.d.ts +1 -1
- package/dist/api/resources/context/types/ChunksContextRequestType.d.ts +0 -1
- package/dist/api/resources/context/types/ChunksContextRequestType.js +0 -1
- package/dist/api/resources/context/types/IngestContextRequestType.d.ts +0 -1
- package/dist/api/resources/context/types/IngestContextRequestType.js +0 -1
- package/dist/api/resources/context/types/ListV2ListContentRequestType.d.ts +2 -4
- package/dist/api/resources/context/types/ListV2ListContentRequestType.js +2 -4
- package/dist/api/resources/context/types/RelationsContextRequestType.d.ts +0 -1
- package/dist/api/resources/context/types/RelationsContextRequestType.js +0 -1
- package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +2 -3
- package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.js +2 -3
- package/dist/api/resources/context/types/SubgraphContextRequestType.d.ts +0 -1
- package/dist/api/resources/context/types/SubgraphContextRequestType.js +0 -1
- package/dist/api/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.d.ts +5 -7
- package/dist/api/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.js +5 -7
- package/dist/api/types/GraphRelationEvidence.d.ts +7 -0
- package/dist/api/types/HandlerConnectorLimitView.d.ts +15 -0
- package/dist/api/types/HandlerConnectorLimitView.js +3 -0
- package/dist/api/types/HandlerConnectorListResponse.d.ts +1 -0
- package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResult.d.ts +2 -1
- package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResultData.d.ts +5 -0
- package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResultData.js +3 -0
- package/dist/api/types/IngestionGraphEntity.d.ts +8 -0
- package/dist/api/types/IngestionGraphEntity.js +3 -0
- package/dist/api/types/IngestionGraphPayload.d.ts +5 -0
- package/dist/api/types/IngestionGraphPayload.js +3 -0
- package/dist/api/types/IngestionGraphRelation.d.ts +9 -0
- package/dist/api/types/IngestionGraphRelation.js +3 -0
- package/dist/api/types/ListV2MemoryItem.d.ts +8 -0
- package/dist/api/types/ListV2SourceItem.d.ts +8 -0
- package/dist/api/types/MemoriesConversationTurn.d.ts +0 -2
- package/dist/api/types/MemoriesForcefulRelations.d.ts +11 -0
- package/dist/api/types/MemoriesForcefulRelations.js +3 -0
- package/dist/api/types/MemoriesIngestItem.d.ts +16 -16
- package/dist/api/types/MemoriesUnifiedIngestRequest.d.ts +16 -4
- package/dist/api/types/SearchCodeSearchRepoResult.d.ts +11 -0
- package/dist/api/types/SearchCodeSearchRepoResult.js +3 -0
- package/dist/api/types/SearchCodeSearchResult.d.ts +24 -0
- package/dist/api/types/SearchCodeSearchResult.js +3 -0
- package/dist/api/types/SearchGraphPlane.d.ts +3 -3
- package/dist/api/types/SearchQueryChunk.d.ts +19 -0
- package/dist/api/types/SearchQueryChunk.js +3 -0
- package/dist/api/types/SearchQueryChunkEnrichmentKind.d.ts +7 -0
- package/dist/api/types/SearchQueryChunkEnrichmentKind.js +10 -0
- package/dist/api/types/SearchQueryChunkTemporal.d.ts +8 -0
- package/dist/api/types/SearchQueryChunkTemporal.js +3 -0
- package/dist/api/types/SearchQueryForcefulRelation.d.ts +6 -0
- package/dist/api/types/SearchQueryForcefulRelation.js +3 -0
- package/dist/api/types/SearchQueryGraphEdge.d.ts +13 -0
- package/dist/api/types/SearchQueryGraphEdge.js +3 -0
- package/dist/api/types/SearchQueryGraphEntity.d.ts +4 -0
- package/dist/api/types/SearchQueryGraphEntity.js +3 -0
- package/dist/api/types/SearchQueryGraphPath.d.ts +9 -0
- package/dist/api/types/SearchQueryGraphPath.js +3 -0
- package/dist/api/types/SearchQueryGraphPathOrigin.d.ts +6 -0
- package/dist/api/types/SearchQueryGraphPathOrigin.js +9 -0
- package/dist/api/types/SearchQueryGraphTriplet.d.ts +6 -0
- package/dist/api/types/SearchQueryGraphTriplet.js +3 -0
- package/dist/api/types/SearchQueryResult.d.ts +14 -0
- package/dist/api/types/SearchQueryResult.js +3 -0
- package/dist/api/types/SearchResolvedReference.d.ts +4 -0
- package/dist/api/types/SearchResolvedReference.js +3 -0
- package/dist/api/types/SearchSourceType.d.ts +0 -1
- package/dist/api/types/SearchSourceType.js +0 -1
- package/dist/api/types/SearchV2RetrievalResult.d.ts +20 -0
- package/dist/api/types/TenantsDatabaseDetail.d.ts +2 -2
- package/dist/api/types/TenantsDatabaseDetailType.d.ts +2 -3
- package/dist/api/types/TenantsDatabaseDetailType.js +2 -3
- package/dist/api/types/TenantsInfraStatusResponseV2.d.ts +2 -2
- package/dist/api/types/TenantsInfraStatusResponseV2Type.d.ts +2 -3
- package/dist/api/types/TenantsInfraStatusResponseV2Type.js +2 -3
- package/dist/api/types/TenantsTenantIdsResponse.d.ts +1 -5
- package/dist/api/types/index.d.ts +19 -0
- package/dist/api/types/index.js +19 -0
- package/dist/helpers/buildString.d.ts +9 -3
- package/dist/helpers/buildString.js +28 -3
- package/dist/serialization/client/requests/SearchQueryRequest.d.ts +2 -0
- package/dist/serialization/client/requests/SearchQueryRequest.js +2 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConfigureReq.d.ts +1 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConfigureReq.js +1 -0
- package/dist/serialization/resources/context/types/ChunksContextRequestType.d.ts +1 -1
- package/dist/serialization/resources/context/types/ChunksContextRequestType.js +1 -1
- package/dist/serialization/resources/context/types/IngestContextRequestType.d.ts +1 -1
- package/dist/serialization/resources/context/types/IngestContextRequestType.js +1 -1
- package/dist/serialization/resources/context/types/ListV2ListContentRequestType.d.ts +1 -1
- package/dist/serialization/resources/context/types/ListV2ListContentRequestType.js +1 -1
- package/dist/serialization/resources/context/types/RelationsContextRequestType.d.ts +1 -1
- package/dist/serialization/resources/context/types/RelationsContextRequestType.js +1 -1
- package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +1 -1
- package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.js +1 -1
- package/dist/serialization/resources/context/types/SubgraphContextRequestType.d.ts +1 -1
- package/dist/serialization/resources/context/types/SubgraphContextRequestType.js +1 -1
- package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.d.ts +1 -1
- package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.js +1 -1
- package/dist/serialization/types/GraphRelationEvidence.d.ts +1 -0
- package/dist/serialization/types/GraphRelationEvidence.js +1 -0
- package/dist/serialization/types/HandlerConnectorLimitView.d.ts +12 -0
- package/dist/serialization/types/HandlerConnectorLimitView.js +44 -0
- package/dist/serialization/types/HandlerConnectorListResponse.d.ts +2 -0
- package/dist/serialization/types/HandlerConnectorListResponse.js +2 -0
- package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResult.d.ts +2 -2
- package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResult.js +2 -2
- package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResultData.d.ts +9 -0
- package/dist/serialization/types/HandlerEnvelopeSearchV2RetrievalResultData.js +41 -0
- package/dist/serialization/types/IngestionGraphEntity.d.ts +12 -0
- package/dist/serialization/types/IngestionGraphEntity.js +44 -0
- package/dist/serialization/types/IngestionGraphPayload.d.ts +12 -0
- package/dist/serialization/types/IngestionGraphPayload.js +44 -0
- package/dist/serialization/types/IngestionGraphRelation.d.ts +13 -0
- package/dist/serialization/types/IngestionGraphRelation.js +45 -0
- package/dist/serialization/types/ListV2MemoryItem.d.ts +1 -0
- package/dist/serialization/types/ListV2MemoryItem.js +1 -0
- package/dist/serialization/types/ListV2SourceItem.d.ts +1 -0
- package/dist/serialization/types/ListV2SourceItem.js +1 -0
- package/dist/serialization/types/MemoriesConversationTurn.d.ts +0 -1
- package/dist/serialization/types/MemoriesConversationTurn.js +0 -1
- package/dist/serialization/types/MemoriesForcefulRelations.d.ts +10 -0
- package/dist/serialization/types/MemoriesForcefulRelations.js +42 -0
- package/dist/serialization/types/MemoriesIngestItem.d.ts +4 -4
- package/dist/serialization/types/MemoriesIngestItem.js +4 -4
- package/dist/serialization/types/MemoriesUnifiedIngestRequest.d.ts +7 -2
- package/dist/serialization/types/MemoriesUnifiedIngestRequest.js +7 -2
- package/dist/serialization/types/SearchCodeSearchRepoResult.d.ts +15 -0
- package/dist/serialization/types/SearchCodeSearchRepoResult.js +47 -0
- package/dist/serialization/types/SearchCodeSearchResult.d.ts +14 -0
- package/dist/serialization/types/SearchCodeSearchResult.js +46 -0
- package/dist/serialization/types/SearchQueryChunk.d.ts +18 -0
- package/dist/serialization/types/SearchQueryChunk.js +50 -0
- package/dist/serialization/types/SearchQueryChunkEnrichmentKind.d.ts +7 -0
- package/dist/serialization/types/SearchQueryChunkEnrichmentKind.js +39 -0
- package/dist/serialization/types/SearchQueryChunkTemporal.d.ts +11 -0
- package/dist/serialization/types/SearchQueryChunkTemporal.js +43 -0
- package/dist/serialization/types/SearchQueryForcefulRelation.d.ts +12 -0
- package/dist/serialization/types/SearchQueryForcefulRelation.js +44 -0
- package/dist/serialization/types/SearchQueryGraphEdge.d.ts +14 -0
- package/dist/serialization/types/SearchQueryGraphEdge.js +46 -0
- package/dist/serialization/types/SearchQueryGraphEntity.d.ts +10 -0
- package/dist/serialization/types/SearchQueryGraphEntity.js +42 -0
- package/dist/serialization/types/SearchQueryGraphPath.d.ts +13 -0
- package/dist/serialization/types/SearchQueryGraphPath.js +45 -0
- package/dist/serialization/types/SearchQueryGraphPathOrigin.d.ts +7 -0
- package/dist/serialization/types/SearchQueryGraphPathOrigin.js +39 -0
- package/dist/serialization/types/SearchQueryGraphTriplet.d.ts +13 -0
- package/dist/serialization/types/SearchQueryGraphTriplet.js +45 -0
- package/dist/serialization/types/SearchQueryResult.d.ts +15 -0
- package/dist/serialization/types/SearchQueryResult.js +47 -0
- package/dist/serialization/types/SearchResolvedReference.d.ts +10 -0
- package/dist/serialization/types/SearchResolvedReference.js +42 -0
- package/dist/serialization/types/SearchSourceType.d.ts +1 -1
- package/dist/serialization/types/SearchSourceType.js +1 -1
- package/dist/serialization/types/SearchV2RetrievalResult.d.ts +6 -0
- package/dist/serialization/types/SearchV2RetrievalResult.js +6 -0
- package/dist/serialization/types/TenantsDatabaseDetailType.d.ts +1 -1
- package/dist/serialization/types/TenantsDatabaseDetailType.js +1 -1
- package/dist/serialization/types/TenantsInfraStatusResponseV2Type.d.ts +1 -1
- package/dist/serialization/types/TenantsInfraStatusResponseV2Type.js +1 -1
- package/dist/serialization/types/index.d.ts +19 -0
- package/dist/serialization/types/index.js +19 -0
- 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.
|
|
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.
|
|
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
|
-
/**
|
|
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
|
|
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. `
|
|
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
|
|
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. `
|
|
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.
|
|
275
|
-
_body.append("
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
|
|
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
|
-
*
|
|
40
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
25
|
-
*
|
|
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
|
-
/**
|
|
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];
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
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
|
-
*
|
|
7
|
-
*
|
|
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];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
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
|
-
*
|
|
7
|
-
*
|
|
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];
|
package/dist/api/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* StorageLayout is the physical storage layout the database is created with
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
|
11
|
-
readonly Unified: "unified";
|
|
9
|
+
readonly LayoutSplit: "split";
|
|
12
10
|
};
|
|
13
11
|
export type GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout = (typeof GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout)[keyof typeof GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout];
|
package/dist/api/types/GithubComHydradbHydradbApplicationInternalPlatformStoragelayoutLayout.js
CHANGED
|
@@ -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
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
-
|
|
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
|
+
}
|
|
@@ -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
|
-
|
|
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,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
|
+
}
|
|
@@ -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. */
|
|
@@ -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
|
+
}
|