weave-typescript 0.26.0 → 0.28.0

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 (27) hide show
  1. package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +134 -0
  2. package/dist/weaveapi/consolidation/v1/consolidation.pb.js +1620 -0
  3. package/dist/weaveapi/consolidation/v1/service.pb.d.ts +93 -0
  4. package/dist/weaveapi/consolidation/v1/service.pb.js +427 -0
  5. package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +433 -0
  6. package/dist/weaveapi/ingestion/v1/ingestion.pb.js +5626 -0
  7. package/dist/weaveapi/ingestion/v1/service.pb.d.ts +181 -0
  8. package/dist/weaveapi/ingestion/v1/service.pb.js +917 -0
  9. package/dist/weaveapi/model/v1/model.pb.d.ts +10 -0
  10. package/dist/weaveapi/model/v1/model.pb.js +181 -1
  11. package/dist/weaveapi/model/v1/service.pb.d.ts +50 -1
  12. package/dist/weaveapi/model/v1/service.pb.js +464 -1
  13. package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +161 -0
  14. package/dist/weaveapi/retrieval/v1/retrieval.pb.js +1885 -0
  15. package/dist/weaveapi/retrieval/v1/service.pb.d.ts +51 -0
  16. package/dist/weaveapi/retrieval/v1/service.pb.js +164 -0
  17. package/dist/weavesql/weavedb/chat_sql.d.ts +12 -5
  18. package/dist/weavesql/weavedb/chat_sql.js +21 -14
  19. package/dist/weavesql/weavedb/consolidation_sql.d.ts +212 -0
  20. package/dist/weavesql/weavedb/consolidation_sql.js +470 -0
  21. package/dist/weavesql/weavedb/document_security_sql.d.ts +128 -0
  22. package/dist/weavesql/weavedb/document_security_sql.js +284 -0
  23. package/dist/weavesql/weavedb/ingestion_sql.d.ts +1108 -0
  24. package/dist/weavesql/weavedb/ingestion_sql.js +2503 -0
  25. package/dist/weavesql/weavedb/retrieval_sql.d.ts +284 -0
  26. package/dist/weavesql/weavedb/retrieval_sql.js +769 -0
  27. package/package.json +2 -2
@@ -5,7 +5,7 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/model/v1/service.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ModelCatalogServiceDefinition = exports.ModelCatalogServiceClientImpl = exports.ModelCatalogServiceServiceName = exports.SetChatDefaultsResponse = exports.SetChatDefaultsRequest = exports.GetChatDefaultsResponse = exports.GetChatDefaultsRequest = exports.OrganizationChatSettings = exports.UnapproveModelResponse = exports.UnapproveModelRequest = exports.ApproveModelResponse = exports.ApproveModelRequest = exports.ListOrganizationApprovedModelsResponse = exports.ListOrganizationApprovedModelsRequest = exports.OrganizationApprovedModel = exports.ListCatalogProvidersResponse = exports.ListCatalogProvidersRequest = exports.GetModelResponse = exports.GetModelRequest = exports.ListModelsResponse = exports.ListModelsRequest = exports.protobufPackage = void 0;
8
+ exports.ModelCatalogServiceDefinition = exports.ModelCatalogServiceClientImpl = exports.ModelCatalogServiceServiceName = exports.SetIngestionSettingsResponse = exports.SetIngestionSettingsRequest = exports.GetIngestionSettingsResponse = exports.GetIngestionSettingsRequest = exports.SetChatDefaultsResponse = exports.SetChatDefaultsRequest = exports.GetChatDefaultsResponse = exports.GetChatDefaultsRequest = exports.OrganizationChatSettings = exports.UnapproveModelResponse = exports.UnapproveModelRequest = exports.ApproveModelResponse = exports.ApproveModelRequest = exports.ListOrganizationApprovedModelsResponse = exports.ListOrganizationApprovedModelsRequest = exports.OrganizationApprovedModel = exports.ListCatalogProvidersResponse = exports.ListCatalogProvidersRequest = exports.GetModelResponse = exports.GetModelRequest = exports.ListModelsResponse = exports.ListModelsRequest = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
@@ -1371,6 +1371,330 @@ exports.SetChatDefaultsResponse = {
1371
1371
  return message;
1372
1372
  },
1373
1373
  };
1374
+ function createBaseGetIngestionSettingsRequest() {
1375
+ return { organizationId: "" };
1376
+ }
1377
+ exports.GetIngestionSettingsRequest = {
1378
+ encode(message, writer = new wire_1.BinaryWriter()) {
1379
+ if (message.organizationId !== "") {
1380
+ writer.uint32(10).string(message.organizationId);
1381
+ }
1382
+ return writer;
1383
+ },
1384
+ decode(input, length) {
1385
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1386
+ const end = length === undefined ? reader.len : reader.pos + length;
1387
+ const message = createBaseGetIngestionSettingsRequest();
1388
+ while (reader.pos < end) {
1389
+ const tag = reader.uint32();
1390
+ switch (tag >>> 3) {
1391
+ case 1: {
1392
+ if (tag !== 10) {
1393
+ break;
1394
+ }
1395
+ message.organizationId = reader.string();
1396
+ continue;
1397
+ }
1398
+ }
1399
+ if ((tag & 7) === 4 || tag === 0) {
1400
+ break;
1401
+ }
1402
+ reader.skip(tag & 7);
1403
+ }
1404
+ return message;
1405
+ },
1406
+ fromJSON(object) {
1407
+ return {
1408
+ organizationId: isSet(object.organizationId)
1409
+ ? globalThis.String(object.organizationId)
1410
+ : isSet(object.organization_id)
1411
+ ? globalThis.String(object.organization_id)
1412
+ : "",
1413
+ };
1414
+ },
1415
+ toJSON(message) {
1416
+ const obj = {};
1417
+ if (message.organizationId !== "") {
1418
+ obj.organizationId = message.organizationId;
1419
+ }
1420
+ return obj;
1421
+ },
1422
+ create(base) {
1423
+ return exports.GetIngestionSettingsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1424
+ },
1425
+ fromPartial(object) {
1426
+ var _a;
1427
+ const message = createBaseGetIngestionSettingsRequest();
1428
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1429
+ return message;
1430
+ },
1431
+ };
1432
+ function createBaseGetIngestionSettingsResponse() {
1433
+ return { settings: undefined };
1434
+ }
1435
+ exports.GetIngestionSettingsResponse = {
1436
+ encode(message, writer = new wire_1.BinaryWriter()) {
1437
+ if (message.settings !== undefined) {
1438
+ model_pb_1.OrganizationIngestionSettings.encode(message.settings, writer.uint32(10).fork()).join();
1439
+ }
1440
+ return writer;
1441
+ },
1442
+ decode(input, length) {
1443
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1444
+ const end = length === undefined ? reader.len : reader.pos + length;
1445
+ const message = createBaseGetIngestionSettingsResponse();
1446
+ while (reader.pos < end) {
1447
+ const tag = reader.uint32();
1448
+ switch (tag >>> 3) {
1449
+ case 1: {
1450
+ if (tag !== 10) {
1451
+ break;
1452
+ }
1453
+ message.settings = model_pb_1.OrganizationIngestionSettings.decode(reader, reader.uint32());
1454
+ continue;
1455
+ }
1456
+ }
1457
+ if ((tag & 7) === 4 || tag === 0) {
1458
+ break;
1459
+ }
1460
+ reader.skip(tag & 7);
1461
+ }
1462
+ return message;
1463
+ },
1464
+ fromJSON(object) {
1465
+ return { settings: isSet(object.settings) ? model_pb_1.OrganizationIngestionSettings.fromJSON(object.settings) : undefined };
1466
+ },
1467
+ toJSON(message) {
1468
+ const obj = {};
1469
+ if (message.settings !== undefined) {
1470
+ obj.settings = model_pb_1.OrganizationIngestionSettings.toJSON(message.settings);
1471
+ }
1472
+ return obj;
1473
+ },
1474
+ create(base) {
1475
+ return exports.GetIngestionSettingsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1476
+ },
1477
+ fromPartial(object) {
1478
+ const message = createBaseGetIngestionSettingsResponse();
1479
+ message.settings = (object.settings !== undefined && object.settings !== null)
1480
+ ? model_pb_1.OrganizationIngestionSettings.fromPartial(object.settings)
1481
+ : undefined;
1482
+ return message;
1483
+ },
1484
+ };
1485
+ function createBaseSetIngestionSettingsRequest() {
1486
+ return {
1487
+ organizationId: "",
1488
+ reasoningModelId: "",
1489
+ reasoningProviderConfigurationId: "",
1490
+ embeddingModelId: "",
1491
+ embeddingProviderConfigurationId: "",
1492
+ embeddingDimensions: 0,
1493
+ };
1494
+ }
1495
+ exports.SetIngestionSettingsRequest = {
1496
+ encode(message, writer = new wire_1.BinaryWriter()) {
1497
+ if (message.organizationId !== "") {
1498
+ writer.uint32(10).string(message.organizationId);
1499
+ }
1500
+ if (message.reasoningModelId !== "") {
1501
+ writer.uint32(18).string(message.reasoningModelId);
1502
+ }
1503
+ if (message.reasoningProviderConfigurationId !== "") {
1504
+ writer.uint32(26).string(message.reasoningProviderConfigurationId);
1505
+ }
1506
+ if (message.embeddingModelId !== "") {
1507
+ writer.uint32(34).string(message.embeddingModelId);
1508
+ }
1509
+ if (message.embeddingProviderConfigurationId !== "") {
1510
+ writer.uint32(42).string(message.embeddingProviderConfigurationId);
1511
+ }
1512
+ if (message.embeddingDimensions !== 0) {
1513
+ writer.uint32(48).int32(message.embeddingDimensions);
1514
+ }
1515
+ return writer;
1516
+ },
1517
+ decode(input, length) {
1518
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1519
+ const end = length === undefined ? reader.len : reader.pos + length;
1520
+ const message = createBaseSetIngestionSettingsRequest();
1521
+ while (reader.pos < end) {
1522
+ const tag = reader.uint32();
1523
+ switch (tag >>> 3) {
1524
+ case 1: {
1525
+ if (tag !== 10) {
1526
+ break;
1527
+ }
1528
+ message.organizationId = reader.string();
1529
+ continue;
1530
+ }
1531
+ case 2: {
1532
+ if (tag !== 18) {
1533
+ break;
1534
+ }
1535
+ message.reasoningModelId = reader.string();
1536
+ continue;
1537
+ }
1538
+ case 3: {
1539
+ if (tag !== 26) {
1540
+ break;
1541
+ }
1542
+ message.reasoningProviderConfigurationId = reader.string();
1543
+ continue;
1544
+ }
1545
+ case 4: {
1546
+ if (tag !== 34) {
1547
+ break;
1548
+ }
1549
+ message.embeddingModelId = reader.string();
1550
+ continue;
1551
+ }
1552
+ case 5: {
1553
+ if (tag !== 42) {
1554
+ break;
1555
+ }
1556
+ message.embeddingProviderConfigurationId = reader.string();
1557
+ continue;
1558
+ }
1559
+ case 6: {
1560
+ if (tag !== 48) {
1561
+ break;
1562
+ }
1563
+ message.embeddingDimensions = reader.int32();
1564
+ continue;
1565
+ }
1566
+ }
1567
+ if ((tag & 7) === 4 || tag === 0) {
1568
+ break;
1569
+ }
1570
+ reader.skip(tag & 7);
1571
+ }
1572
+ return message;
1573
+ },
1574
+ fromJSON(object) {
1575
+ return {
1576
+ organizationId: isSet(object.organizationId)
1577
+ ? globalThis.String(object.organizationId)
1578
+ : isSet(object.organization_id)
1579
+ ? globalThis.String(object.organization_id)
1580
+ : "",
1581
+ reasoningModelId: isSet(object.reasoningModelId)
1582
+ ? globalThis.String(object.reasoningModelId)
1583
+ : isSet(object.reasoning_model_id)
1584
+ ? globalThis.String(object.reasoning_model_id)
1585
+ : "",
1586
+ reasoningProviderConfigurationId: isSet(object.reasoningProviderConfigurationId)
1587
+ ? globalThis.String(object.reasoningProviderConfigurationId)
1588
+ : isSet(object.reasoning_provider_configuration_id)
1589
+ ? globalThis.String(object.reasoning_provider_configuration_id)
1590
+ : "",
1591
+ embeddingModelId: isSet(object.embeddingModelId)
1592
+ ? globalThis.String(object.embeddingModelId)
1593
+ : isSet(object.embedding_model_id)
1594
+ ? globalThis.String(object.embedding_model_id)
1595
+ : "",
1596
+ embeddingProviderConfigurationId: isSet(object.embeddingProviderConfigurationId)
1597
+ ? globalThis.String(object.embeddingProviderConfigurationId)
1598
+ : isSet(object.embedding_provider_configuration_id)
1599
+ ? globalThis.String(object.embedding_provider_configuration_id)
1600
+ : "",
1601
+ embeddingDimensions: isSet(object.embeddingDimensions)
1602
+ ? globalThis.Number(object.embeddingDimensions)
1603
+ : isSet(object.embedding_dimensions)
1604
+ ? globalThis.Number(object.embedding_dimensions)
1605
+ : 0,
1606
+ };
1607
+ },
1608
+ toJSON(message) {
1609
+ const obj = {};
1610
+ if (message.organizationId !== "") {
1611
+ obj.organizationId = message.organizationId;
1612
+ }
1613
+ if (message.reasoningModelId !== "") {
1614
+ obj.reasoningModelId = message.reasoningModelId;
1615
+ }
1616
+ if (message.reasoningProviderConfigurationId !== "") {
1617
+ obj.reasoningProviderConfigurationId = message.reasoningProviderConfigurationId;
1618
+ }
1619
+ if (message.embeddingModelId !== "") {
1620
+ obj.embeddingModelId = message.embeddingModelId;
1621
+ }
1622
+ if (message.embeddingProviderConfigurationId !== "") {
1623
+ obj.embeddingProviderConfigurationId = message.embeddingProviderConfigurationId;
1624
+ }
1625
+ if (message.embeddingDimensions !== 0) {
1626
+ obj.embeddingDimensions = Math.round(message.embeddingDimensions);
1627
+ }
1628
+ return obj;
1629
+ },
1630
+ create(base) {
1631
+ return exports.SetIngestionSettingsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1632
+ },
1633
+ fromPartial(object) {
1634
+ var _a, _b, _c, _d, _e, _f;
1635
+ const message = createBaseSetIngestionSettingsRequest();
1636
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1637
+ message.reasoningModelId = (_b = object.reasoningModelId) !== null && _b !== void 0 ? _b : "";
1638
+ message.reasoningProviderConfigurationId = (_c = object.reasoningProviderConfigurationId) !== null && _c !== void 0 ? _c : "";
1639
+ message.embeddingModelId = (_d = object.embeddingModelId) !== null && _d !== void 0 ? _d : "";
1640
+ message.embeddingProviderConfigurationId = (_e = object.embeddingProviderConfigurationId) !== null && _e !== void 0 ? _e : "";
1641
+ message.embeddingDimensions = (_f = object.embeddingDimensions) !== null && _f !== void 0 ? _f : 0;
1642
+ return message;
1643
+ },
1644
+ };
1645
+ function createBaseSetIngestionSettingsResponse() {
1646
+ return { settings: undefined };
1647
+ }
1648
+ exports.SetIngestionSettingsResponse = {
1649
+ encode(message, writer = new wire_1.BinaryWriter()) {
1650
+ if (message.settings !== undefined) {
1651
+ model_pb_1.OrganizationIngestionSettings.encode(message.settings, writer.uint32(10).fork()).join();
1652
+ }
1653
+ return writer;
1654
+ },
1655
+ decode(input, length) {
1656
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1657
+ const end = length === undefined ? reader.len : reader.pos + length;
1658
+ const message = createBaseSetIngestionSettingsResponse();
1659
+ while (reader.pos < end) {
1660
+ const tag = reader.uint32();
1661
+ switch (tag >>> 3) {
1662
+ case 1: {
1663
+ if (tag !== 10) {
1664
+ break;
1665
+ }
1666
+ message.settings = model_pb_1.OrganizationIngestionSettings.decode(reader, reader.uint32());
1667
+ continue;
1668
+ }
1669
+ }
1670
+ if ((tag & 7) === 4 || tag === 0) {
1671
+ break;
1672
+ }
1673
+ reader.skip(tag & 7);
1674
+ }
1675
+ return message;
1676
+ },
1677
+ fromJSON(object) {
1678
+ return { settings: isSet(object.settings) ? model_pb_1.OrganizationIngestionSettings.fromJSON(object.settings) : undefined };
1679
+ },
1680
+ toJSON(message) {
1681
+ const obj = {};
1682
+ if (message.settings !== undefined) {
1683
+ obj.settings = model_pb_1.OrganizationIngestionSettings.toJSON(message.settings);
1684
+ }
1685
+ return obj;
1686
+ },
1687
+ create(base) {
1688
+ return exports.SetIngestionSettingsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1689
+ },
1690
+ fromPartial(object) {
1691
+ const message = createBaseSetIngestionSettingsResponse();
1692
+ message.settings = (object.settings !== undefined && object.settings !== null)
1693
+ ? model_pb_1.OrganizationIngestionSettings.fromPartial(object.settings)
1694
+ : undefined;
1695
+ return message;
1696
+ },
1697
+ };
1374
1698
  exports.ModelCatalogServiceServiceName = "weaveapi.model.v1.ModelCatalogService";
1375
1699
  class ModelCatalogServiceClientImpl {
1376
1700
  constructor(rpc, opts) {
@@ -1384,6 +1708,8 @@ class ModelCatalogServiceClientImpl {
1384
1708
  this.UnapproveModel = this.UnapproveModel.bind(this);
1385
1709
  this.GetChatDefaults = this.GetChatDefaults.bind(this);
1386
1710
  this.SetChatDefaults = this.SetChatDefaults.bind(this);
1711
+ this.GetIngestionSettings = this.GetIngestionSettings.bind(this);
1712
+ this.SetIngestionSettings = this.SetIngestionSettings.bind(this);
1387
1713
  }
1388
1714
  ListModels(request) {
1389
1715
  const data = exports.ListModelsRequest.encode(request).finish();
@@ -1425,6 +1751,16 @@ class ModelCatalogServiceClientImpl {
1425
1751
  const promise = this.rpc.request(this.service, "SetChatDefaults", data);
1426
1752
  return promise.then((data) => exports.SetChatDefaultsResponse.decode(new wire_1.BinaryReader(data)));
1427
1753
  }
1754
+ GetIngestionSettings(request) {
1755
+ const data = exports.GetIngestionSettingsRequest.encode(request).finish();
1756
+ const promise = this.rpc.request(this.service, "GetIngestionSettings", data);
1757
+ return promise.then((data) => exports.GetIngestionSettingsResponse.decode(new wire_1.BinaryReader(data)));
1758
+ }
1759
+ SetIngestionSettings(request) {
1760
+ const data = exports.SetIngestionSettingsRequest.encode(request).finish();
1761
+ const promise = this.rpc.request(this.service, "SetIngestionSettings", data);
1762
+ return promise.then((data) => exports.SetIngestionSettingsResponse.decode(new wire_1.BinaryReader(data)));
1763
+ }
1428
1764
  }
1429
1765
  exports.ModelCatalogServiceClientImpl = ModelCatalogServiceClientImpl;
1430
1766
  exports.ModelCatalogServiceDefinition = {
@@ -1882,6 +2218,133 @@ exports.ModelCatalogServiceDefinition = {
1882
2218
  },
1883
2219
  },
1884
2220
  },
2221
+ getIngestionSettings: {
2222
+ name: "GetIngestionSettings",
2223
+ requestType: exports.GetIngestionSettingsRequest,
2224
+ requestStream: false,
2225
+ responseType: exports.GetIngestionSettingsResponse,
2226
+ responseStream: false,
2227
+ options: {
2228
+ _unknownFields: {
2229
+ 578365826: [
2230
+ new Uint8Array([
2231
+ 46,
2232
+ 18,
2233
+ 44,
2234
+ 47,
2235
+ 118,
2236
+ 49,
2237
+ 47,
2238
+ 111,
2239
+ 114,
2240
+ 103,
2241
+ 47,
2242
+ 123,
2243
+ 111,
2244
+ 114,
2245
+ 103,
2246
+ 97,
2247
+ 110,
2248
+ 105,
2249
+ 122,
2250
+ 97,
2251
+ 116,
2252
+ 105,
2253
+ 111,
2254
+ 110,
2255
+ 95,
2256
+ 105,
2257
+ 100,
2258
+ 125,
2259
+ 47,
2260
+ 115,
2261
+ 101,
2262
+ 116,
2263
+ 116,
2264
+ 105,
2265
+ 110,
2266
+ 103,
2267
+ 115,
2268
+ 47,
2269
+ 105,
2270
+ 110,
2271
+ 103,
2272
+ 101,
2273
+ 115,
2274
+ 116,
2275
+ 105,
2276
+ 111,
2277
+ 110,
2278
+ ]),
2279
+ ],
2280
+ },
2281
+ },
2282
+ },
2283
+ setIngestionSettings: {
2284
+ name: "SetIngestionSettings",
2285
+ requestType: exports.SetIngestionSettingsRequest,
2286
+ requestStream: false,
2287
+ responseType: exports.SetIngestionSettingsResponse,
2288
+ responseStream: false,
2289
+ options: {
2290
+ _unknownFields: {
2291
+ 578365826: [
2292
+ new Uint8Array([
2293
+ 49,
2294
+ 58,
2295
+ 1,
2296
+ 42,
2297
+ 50,
2298
+ 44,
2299
+ 47,
2300
+ 118,
2301
+ 49,
2302
+ 47,
2303
+ 111,
2304
+ 114,
2305
+ 103,
2306
+ 47,
2307
+ 123,
2308
+ 111,
2309
+ 114,
2310
+ 103,
2311
+ 97,
2312
+ 110,
2313
+ 105,
2314
+ 122,
2315
+ 97,
2316
+ 116,
2317
+ 105,
2318
+ 111,
2319
+ 110,
2320
+ 95,
2321
+ 105,
2322
+ 100,
2323
+ 125,
2324
+ 47,
2325
+ 115,
2326
+ 101,
2327
+ 116,
2328
+ 116,
2329
+ 105,
2330
+ 110,
2331
+ 103,
2332
+ 115,
2333
+ 47,
2334
+ 105,
2335
+ 110,
2336
+ 103,
2337
+ 101,
2338
+ 115,
2339
+ 116,
2340
+ 105,
2341
+ 111,
2342
+ 110,
2343
+ ]),
2344
+ ],
2345
+ },
2346
+ },
2347
+ },
1885
2348
  },
1886
2349
  };
1887
2350
  function toTimestamp(date) {
@@ -0,0 +1,161 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { SourceLocation, TemporalValidity, ThreadClassification } from "../../ingestion/v1/ingestion.pb";
3
+ export declare const protobufPackage = "weaveapi.retrieval.v1";
4
+ export declare enum IntentType {
5
+ INTENT_TYPE_UNSPECIFIED = 0,
6
+ INTENT_TYPE_FACTUAL_LOOKUP = 1,
7
+ INTENT_TYPE_COMPARISON = 2,
8
+ INTENT_TYPE_TEMPORAL_QUERY = 3,
9
+ INTENT_TYPE_PROCEDURAL = 4,
10
+ INTENT_TYPE_ENTITY_EXPLORATION = 5,
11
+ INTENT_TYPE_CONSTRAINT_CHECK = 6,
12
+ INTENT_TYPE_MULTI_SOURCE_SYNTHESIS = 7,
13
+ UNRECOGNIZED = -1
14
+ }
15
+ export declare function intentTypeFromJSON(object: any): IntentType;
16
+ export declare function intentTypeToJSON(object: IntentType): string;
17
+ export declare enum RetrievalTimeScope {
18
+ RETRIEVAL_TIME_SCOPE_UNSPECIFIED = 0,
19
+ RETRIEVAL_TIME_SCOPE_CURRENT = 1,
20
+ RETRIEVAL_TIME_SCOPE_HISTORICAL = 2,
21
+ RETRIEVAL_TIME_SCOPE_ALL = 3,
22
+ UNRECOGNIZED = -1
23
+ }
24
+ export declare function retrievalTimeScopeFromJSON(object: any): RetrievalTimeScope;
25
+ export declare function retrievalTimeScopeToJSON(object: RetrievalTimeScope): string;
26
+ export declare enum SubQueryStrategy {
27
+ SUB_QUERY_STRATEGY_UNSPECIFIED = 0,
28
+ SUB_QUERY_STRATEGY_CONCEPT_HIERARCHY = 1,
29
+ SUB_QUERY_STRATEGY_SEMANTIC = 2,
30
+ SUB_QUERY_STRATEGY_ENTITY_GRAPH = 3,
31
+ SUB_QUERY_STRATEGY_FACET_FILTERED = 4,
32
+ SUB_QUERY_STRATEGY_TEMPORAL = 5,
33
+ SUB_QUERY_STRATEGY_HYBRID = 6,
34
+ UNRECOGNIZED = -1
35
+ }
36
+ export declare function subQueryStrategyFromJSON(object: any): SubQueryStrategy;
37
+ export declare function subQueryStrategyToJSON(object: SubQueryStrategy): string;
38
+ export interface KnowledgeTypeBias {
39
+ knowledgeType: string;
40
+ weight: number;
41
+ }
42
+ export interface IntentSignal {
43
+ type: IntentType;
44
+ entities: string[];
45
+ timeScope: RetrievalTimeScope;
46
+ confidence: number;
47
+ knowledgeTypeBias: KnowledgeTypeBias[];
48
+ }
49
+ export interface RetrievalConstraints {
50
+ actingUserId: string;
51
+ maxResults: number;
52
+ minSimilarity: number;
53
+ recencyBias: number;
54
+ sessionContextThreadIds: string[];
55
+ }
56
+ export interface SubQuery {
57
+ strategy: SubQueryStrategy;
58
+ queryText: string;
59
+ embedding: number[];
60
+ filters: {
61
+ [key: string]: any;
62
+ } | undefined;
63
+ limit: number;
64
+ weight: number;
65
+ conceptIds: string[];
66
+ }
67
+ export interface RerankerConfig {
68
+ recencyBias: number;
69
+ reinforcementBoost: number;
70
+ entityOverlapBoost: number;
71
+ diversityTarget: number;
72
+ sessionDeduplication: boolean;
73
+ }
74
+ export interface RetrievalPlan {
75
+ queryId: string;
76
+ originalQuery: string;
77
+ intent: IntentSignal | undefined;
78
+ constraints: RetrievalConstraints | undefined;
79
+ subQueries: SubQuery[];
80
+ rerankerConfig: RerankerConfig | undefined;
81
+ createdAt: Date | undefined;
82
+ }
83
+ export interface Citation {
84
+ documentId: string;
85
+ documentName: string;
86
+ sourceLocation: SourceLocation | undefined;
87
+ approvedAt: Date | undefined;
88
+ conceptCluster: string;
89
+ }
90
+ export interface RetrievedThread {
91
+ threadId: string;
92
+ text: string;
93
+ knowledgeType: string;
94
+ facetFields: {
95
+ [key: string]: any;
96
+ } | undefined;
97
+ score: number;
98
+ classification: ThreadClassification;
99
+ citation: Citation | undefined;
100
+ temporalValidity: TemporalValidity | undefined;
101
+ entities: string[];
102
+ reinforcementCount: number;
103
+ sessionTurn: number;
104
+ }
105
+ export interface RetrieveRequest {
106
+ organizationId: string;
107
+ query: string;
108
+ constraints: RetrievalConstraints | undefined;
109
+ sessionId: string;
110
+ }
111
+ export interface RetrieveResponse {
112
+ threads: RetrievedThread[];
113
+ plan: RetrievalPlan | undefined;
114
+ }
115
+ export interface ExplainRetrievalRequest {
116
+ organizationId: string;
117
+ query: string;
118
+ constraints: RetrievalConstraints | undefined;
119
+ sessionId: string;
120
+ }
121
+ export interface SubQueryResult {
122
+ subQuery: SubQuery | undefined;
123
+ threads: RetrievedThread[];
124
+ }
125
+ export interface ExplainRetrievalResponse {
126
+ plan: RetrievalPlan | undefined;
127
+ subQueryResults: SubQueryResult[];
128
+ finalThreads: RetrievedThread[];
129
+ }
130
+ export declare const KnowledgeTypeBias: MessageFns<KnowledgeTypeBias>;
131
+ export declare const IntentSignal: MessageFns<IntentSignal>;
132
+ export declare const RetrievalConstraints: MessageFns<RetrievalConstraints>;
133
+ export declare const SubQuery: MessageFns<SubQuery>;
134
+ export declare const RerankerConfig: MessageFns<RerankerConfig>;
135
+ export declare const RetrievalPlan: MessageFns<RetrievalPlan>;
136
+ export declare const Citation: MessageFns<Citation>;
137
+ export declare const RetrievedThread: MessageFns<RetrievedThread>;
138
+ export declare const RetrieveRequest: MessageFns<RetrieveRequest>;
139
+ export declare const RetrieveResponse: MessageFns<RetrieveResponse>;
140
+ export declare const ExplainRetrievalRequest: MessageFns<ExplainRetrievalRequest>;
141
+ export declare const SubQueryResult: MessageFns<SubQueryResult>;
142
+ export declare const ExplainRetrievalResponse: MessageFns<ExplainRetrievalResponse>;
143
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
144
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
145
+ [K in keyof T]?: DeepPartial<T[K]>;
146
+ } : Partial<T>;
147
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
148
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
149
+ [K in keyof P]: Exact<P[K], I[K]>;
150
+ } & {
151
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
152
+ };
153
+ export interface MessageFns<T> {
154
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
155
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
156
+ fromJSON(object: any): T;
157
+ toJSON(message: T): unknown;
158
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
159
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
160
+ }
161
+ export {};