@orq-ai/node 3.3.0-rc.17 → 3.3.0-rc.19
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/README.md +4 -0
- package/bin/mcp-server.js +540 -123
- package/bin/mcp-server.js.map +30 -24
- package/docs/sdks/knowledge/README.md +166 -0
- package/funcs/knowledgeRetrieveChunk.d.ts +13 -0
- package/funcs/knowledgeRetrieveChunk.d.ts.map +1 -0
- package/funcs/knowledgeRetrieveChunk.js +122 -0
- package/funcs/knowledgeRetrieveChunk.js.map +1 -0
- package/funcs/knowledgeUpdateDatasource.d.ts +13 -0
- package/funcs/knowledgeUpdateDatasource.d.ts.map +1 -0
- package/funcs/knowledgeUpdateDatasource.js +119 -0
- package/funcs/knowledgeUpdateDatasource.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +5 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/knowledgeRetrieveChunk.d.ts +8 -0
- package/mcp-server/tools/knowledgeRetrieveChunk.d.ts.map +1 -0
- package/mcp-server/tools/knowledgeRetrieveChunk.js +62 -0
- package/mcp-server/tools/knowledgeRetrieveChunk.js.map +1 -0
- package/mcp-server/tools/knowledgeUpdateDatasource.d.ts +8 -0
- package/mcp-server/tools/knowledgeUpdateDatasource.d.ts.map +1 -0
- package/mcp-server/tools/knowledgeUpdateDatasource.js +62 -0
- package/mcp-server/tools/knowledgeUpdateDatasource.js.map +1 -0
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createchunk.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getonechunk.d.ts +158 -0
- package/models/operations/getonechunk.d.ts.map +1 -0
- package/models/operations/getonechunk.js +166 -0
- package/models/operations/getonechunk.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.d.ts +177 -0
- package/models/operations/updatedatasource.d.ts.map +1 -0
- package/models/operations/updatedatasource.js +210 -0
- package/models/operations/updatedatasource.js.map +1 -0
- package/package.json +1 -1
- package/sdk/knowledge.d.ts +8 -0
- package/sdk/knowledge.d.ts.map +1 -1
- package/sdk/knowledge.js +14 -0
- package/sdk/knowledge.js.map +1 -1
- package/src/funcs/knowledgeRetrieveChunk.ts +167 -0
- package/src/funcs/knowledgeUpdateDatasource.ts +164 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/knowledgeRetrieveChunk.ts +35 -0
- package/src/mcp-server/tools/knowledgeUpdateDatasource.ts +35 -0
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createchunk.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getonechunk.ts +265 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +345 -0
- package/src/sdk/knowledge.ts +30 -0
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
* [createDatasource](#createdatasource) - Create a new datasource
|
|
16
16
|
* [retrieveDatasource](#retrievedatasource) - Retrieve a datasource
|
|
17
17
|
* [deleteDatasource](#deletedatasource) - Deletes a datasource
|
|
18
|
+
* [updateDatasource](#updatedatasource) - Update a datasource
|
|
18
19
|
* [createChunks](#createchunks) - Create chunks for a datasource
|
|
19
20
|
* [listChunks](#listchunks) - List all chunks for a datasource
|
|
20
21
|
* [updateChunk](#updatechunk) - Update a chunk
|
|
21
22
|
* [deleteChunk](#deletechunk) - Delete a chunk
|
|
23
|
+
* [retrieveChunk](#retrievechunk) - Retrieve a chunk
|
|
22
24
|
|
|
23
25
|
## list
|
|
24
26
|
|
|
@@ -796,6 +798,90 @@ run();
|
|
|
796
798
|
| --------------- | --------------- | --------------- |
|
|
797
799
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
798
800
|
|
|
801
|
+
## updateDatasource
|
|
802
|
+
|
|
803
|
+
Update a datasource
|
|
804
|
+
|
|
805
|
+
### Example Usage
|
|
806
|
+
|
|
807
|
+
```typescript
|
|
808
|
+
import { Orq } from "@orq-ai/node";
|
|
809
|
+
|
|
810
|
+
const orq = new Orq({
|
|
811
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
async function run() {
|
|
815
|
+
const result = await orq.knowledge.updateDatasource({
|
|
816
|
+
knowledgeId: "<id>",
|
|
817
|
+
datasourceId: "<id>",
|
|
818
|
+
requestBody: {
|
|
819
|
+
displayName: "Haylee_Braun",
|
|
820
|
+
},
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
// Handle the result
|
|
824
|
+
console.log(result);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
run();
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
### Standalone function
|
|
831
|
+
|
|
832
|
+
The standalone function version of this method:
|
|
833
|
+
|
|
834
|
+
```typescript
|
|
835
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
836
|
+
import { knowledgeUpdateDatasource } from "@orq-ai/node/funcs/knowledgeUpdateDatasource.js";
|
|
837
|
+
|
|
838
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
839
|
+
// You can create one instance of it to use across an application.
|
|
840
|
+
const orq = new OrqCore({
|
|
841
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
async function run() {
|
|
845
|
+
const res = await knowledgeUpdateDatasource(orq, {
|
|
846
|
+
knowledgeId: "<id>",
|
|
847
|
+
datasourceId: "<id>",
|
|
848
|
+
requestBody: {
|
|
849
|
+
displayName: "Haylee_Braun",
|
|
850
|
+
},
|
|
851
|
+
});
|
|
852
|
+
|
|
853
|
+
if (!res.ok) {
|
|
854
|
+
throw res.error;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
const { value: result } = res;
|
|
858
|
+
|
|
859
|
+
// Handle the result
|
|
860
|
+
console.log(result);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
run();
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
### Parameters
|
|
867
|
+
|
|
868
|
+
| Parameter | Type | Required | Description |
|
|
869
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
870
|
+
| `request` | [operations.UpdateDatasourceRequest](../../models/operations/updatedatasourcerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
871
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
872
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
873
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
874
|
+
|
|
875
|
+
### Response
|
|
876
|
+
|
|
877
|
+
**Promise\<[operations.UpdateDatasourceResponseBody](../../models/operations/updatedatasourceresponsebody.md)\>**
|
|
878
|
+
|
|
879
|
+
### Errors
|
|
880
|
+
|
|
881
|
+
| Error Type | Status Code | Content Type |
|
|
882
|
+
| --------------- | --------------- | --------------- |
|
|
883
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
884
|
+
|
|
799
885
|
## createChunks
|
|
800
886
|
|
|
801
887
|
Create chunks for a datasource
|
|
@@ -1108,6 +1194,86 @@ run();
|
|
|
1108
1194
|
|
|
1109
1195
|
### Errors
|
|
1110
1196
|
|
|
1197
|
+
| Error Type | Status Code | Content Type |
|
|
1198
|
+
| --------------- | --------------- | --------------- |
|
|
1199
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
1200
|
+
|
|
1201
|
+
## retrieveChunk
|
|
1202
|
+
|
|
1203
|
+
Retrieve a chunk
|
|
1204
|
+
|
|
1205
|
+
### Example Usage
|
|
1206
|
+
|
|
1207
|
+
```typescript
|
|
1208
|
+
import { Orq } from "@orq-ai/node";
|
|
1209
|
+
|
|
1210
|
+
const orq = new Orq({
|
|
1211
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
1212
|
+
});
|
|
1213
|
+
|
|
1214
|
+
async function run() {
|
|
1215
|
+
const result = await orq.knowledge.retrieveChunk({
|
|
1216
|
+
chunkId: "<id>",
|
|
1217
|
+
datasourceId: "<id>",
|
|
1218
|
+
knowledgeId: "<id>",
|
|
1219
|
+
});
|
|
1220
|
+
|
|
1221
|
+
// Handle the result
|
|
1222
|
+
console.log(result);
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
run();
|
|
1226
|
+
```
|
|
1227
|
+
|
|
1228
|
+
### Standalone function
|
|
1229
|
+
|
|
1230
|
+
The standalone function version of this method:
|
|
1231
|
+
|
|
1232
|
+
```typescript
|
|
1233
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
1234
|
+
import { knowledgeRetrieveChunk } from "@orq-ai/node/funcs/knowledgeRetrieveChunk.js";
|
|
1235
|
+
|
|
1236
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
1237
|
+
// You can create one instance of it to use across an application.
|
|
1238
|
+
const orq = new OrqCore({
|
|
1239
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
1240
|
+
});
|
|
1241
|
+
|
|
1242
|
+
async function run() {
|
|
1243
|
+
const res = await knowledgeRetrieveChunk(orq, {
|
|
1244
|
+
chunkId: "<id>",
|
|
1245
|
+
datasourceId: "<id>",
|
|
1246
|
+
knowledgeId: "<id>",
|
|
1247
|
+
});
|
|
1248
|
+
|
|
1249
|
+
if (!res.ok) {
|
|
1250
|
+
throw res.error;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
const { value: result } = res;
|
|
1254
|
+
|
|
1255
|
+
// Handle the result
|
|
1256
|
+
console.log(result);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
run();
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
### Parameters
|
|
1263
|
+
|
|
1264
|
+
| Parameter | Type | Required | Description |
|
|
1265
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1266
|
+
| `request` | [operations.GetOneChunkRequest](../../models/operations/getonechunkrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1267
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1268
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1269
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1270
|
+
|
|
1271
|
+
### Response
|
|
1272
|
+
|
|
1273
|
+
**Promise\<[operations.GetOneChunkResponseBody](../../models/operations/getonechunkresponsebody.md)\>**
|
|
1274
|
+
|
|
1275
|
+
### Errors
|
|
1276
|
+
|
|
1111
1277
|
| Error Type | Status Code | Content Type |
|
|
1112
1278
|
| --------------- | --------------- | --------------- |
|
|
1113
1279
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
6
|
+
import * as operations from "../models/operations/index.js";
|
|
7
|
+
import { APIPromise } from "../types/async.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a chunk
|
|
11
|
+
*/
|
|
12
|
+
export declare function knowledgeRetrieveChunk(client: OrqCore, request: operations.GetOneChunkRequest, options?: RequestOptions): APIPromise<Result<operations.GetOneChunkResponseBody, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
13
|
+
//# sourceMappingURL=knowledgeRetrieveChunk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledgeRetrieveChunk.d.ts","sourceRoot":"","sources":["../src/funcs/knowledgeRetrieveChunk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,uBAAuB,EAChC,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.knowledgeRetrieveChunk = knowledgeRetrieveChunk;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
+
const async_js_1 = require("../types/async.js");
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve a chunk
|
|
50
|
+
*/
|
|
51
|
+
function knowledgeRetrieveChunk(client, request, options) {
|
|
52
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
53
|
+
}
|
|
54
|
+
async function $do(client, request, options) {
|
|
55
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.GetOneChunkRequest$outboundSchema.parse(value), "Input validation failed");
|
|
56
|
+
if (!parsed.ok) {
|
|
57
|
+
return [parsed, { status: "invalid" }];
|
|
58
|
+
}
|
|
59
|
+
const payload = parsed.value;
|
|
60
|
+
const body = null;
|
|
61
|
+
const pathParams = {
|
|
62
|
+
chunk_id: (0, encodings_js_1.encodeSimple)("chunk_id", payload.chunk_id, {
|
|
63
|
+
explode: false,
|
|
64
|
+
charEncoding: "percent",
|
|
65
|
+
}),
|
|
66
|
+
datasource_id: (0, encodings_js_1.encodeSimple)("datasource_id", payload.datasource_id, {
|
|
67
|
+
explode: false,
|
|
68
|
+
charEncoding: "percent",
|
|
69
|
+
}),
|
|
70
|
+
knowledge_id: (0, encodings_js_1.encodeSimple)("knowledge_id", payload.knowledge_id, {
|
|
71
|
+
explode: false,
|
|
72
|
+
charEncoding: "percent",
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
const path = (0, url_js_1.pathToFunc)("/v2/knowledge/{knowledge_id}/datasources/{datasource_id}/chunks/{chunk_id}")(pathParams);
|
|
76
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
77
|
+
Accept: "application/json",
|
|
78
|
+
}));
|
|
79
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
80
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
81
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
82
|
+
const context = {
|
|
83
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
84
|
+
operationID: "GetOneChunk",
|
|
85
|
+
oAuth2Scopes: [],
|
|
86
|
+
resolvedSecurity: requestSecurity,
|
|
87
|
+
securitySource: client._options.apiKey,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
const requestRes = client._createRequest(context, {
|
|
94
|
+
security: requestSecurity,
|
|
95
|
+
method: "GET",
|
|
96
|
+
baseURL: options?.serverURL,
|
|
97
|
+
path: path,
|
|
98
|
+
headers: headers,
|
|
99
|
+
body: body,
|
|
100
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
101
|
+
}, options);
|
|
102
|
+
if (!requestRes.ok) {
|
|
103
|
+
return [requestRes, { status: "invalid" }];
|
|
104
|
+
}
|
|
105
|
+
const req = requestRes.value;
|
|
106
|
+
const doResult = await client._do(req, {
|
|
107
|
+
context,
|
|
108
|
+
errorCodes: ["4XX", "5XX"],
|
|
109
|
+
retryConfig: context.retryConfig,
|
|
110
|
+
retryCodes: context.retryCodes,
|
|
111
|
+
});
|
|
112
|
+
if (!doResult.ok) {
|
|
113
|
+
return [doResult, { status: "request-error", request: req }];
|
|
114
|
+
}
|
|
115
|
+
const response = doResult.value;
|
|
116
|
+
const [result] = await M.match(M.json(200, operations.GetOneChunkResponseBody$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response);
|
|
117
|
+
if (!result.ok) {
|
|
118
|
+
return [result, { status: "complete", request: req, response }];
|
|
119
|
+
}
|
|
120
|
+
return [result, { status: "complete", request: req, response }];
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=knowledgeRetrieveChunk.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,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
6
|
+
import * as operations from "../models/operations/index.js";
|
|
7
|
+
import { APIPromise } from "../types/async.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Update a datasource
|
|
11
|
+
*/
|
|
12
|
+
export declare function knowledgeUpdateDatasource(client: OrqCore, request: operations.UpdateDatasourceRequest, options?: RequestOptions): APIPromise<Result<operations.UpdateDatasourceResponseBody, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
13
|
+
//# sourceMappingURL=knowledgeUpdateDatasource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledgeUpdateDatasource.d.ts","sourceRoot":"","sources":["../src/funcs/knowledgeUpdateDatasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,4BAA4B,EACrC,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.knowledgeUpdateDatasource = knowledgeUpdateDatasource;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
+
const async_js_1 = require("../types/async.js");
|
|
48
|
+
/**
|
|
49
|
+
* Update a datasource
|
|
50
|
+
*/
|
|
51
|
+
function knowledgeUpdateDatasource(client, request, options) {
|
|
52
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
53
|
+
}
|
|
54
|
+
async function $do(client, request, options) {
|
|
55
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.UpdateDatasourceRequest$outboundSchema.parse(value), "Input validation failed");
|
|
56
|
+
if (!parsed.ok) {
|
|
57
|
+
return [parsed, { status: "invalid" }];
|
|
58
|
+
}
|
|
59
|
+
const payload = parsed.value;
|
|
60
|
+
const body = (0, encodings_js_1.encodeJSON)("body", payload.RequestBody, { explode: true });
|
|
61
|
+
const pathParams = {
|
|
62
|
+
datasource_id: (0, encodings_js_1.encodeSimple)("datasource_id", payload.datasource_id, {
|
|
63
|
+
explode: false,
|
|
64
|
+
charEncoding: "percent",
|
|
65
|
+
}),
|
|
66
|
+
knowledge_id: (0, encodings_js_1.encodeSimple)("knowledge_id", payload.knowledge_id, {
|
|
67
|
+
explode: false,
|
|
68
|
+
charEncoding: "percent",
|
|
69
|
+
}),
|
|
70
|
+
};
|
|
71
|
+
const path = (0, url_js_1.pathToFunc)("/v2/knowledge/{knowledge_id}/datasources/{datasource_id}")(pathParams);
|
|
72
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
73
|
+
"Content-Type": "application/json",
|
|
74
|
+
Accept: "application/json",
|
|
75
|
+
}));
|
|
76
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
77
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
78
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
79
|
+
const context = {
|
|
80
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
81
|
+
operationID: "UpdateDatasource",
|
|
82
|
+
oAuth2Scopes: [],
|
|
83
|
+
resolvedSecurity: requestSecurity,
|
|
84
|
+
securitySource: client._options.apiKey,
|
|
85
|
+
retryConfig: options?.retries
|
|
86
|
+
|| client._options.retryConfig
|
|
87
|
+
|| { strategy: "none" },
|
|
88
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
89
|
+
};
|
|
90
|
+
const requestRes = client._createRequest(context, {
|
|
91
|
+
security: requestSecurity,
|
|
92
|
+
method: "PATCH",
|
|
93
|
+
baseURL: options?.serverURL,
|
|
94
|
+
path: path,
|
|
95
|
+
headers: headers,
|
|
96
|
+
body: body,
|
|
97
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
98
|
+
}, options);
|
|
99
|
+
if (!requestRes.ok) {
|
|
100
|
+
return [requestRes, { status: "invalid" }];
|
|
101
|
+
}
|
|
102
|
+
const req = requestRes.value;
|
|
103
|
+
const doResult = await client._do(req, {
|
|
104
|
+
context,
|
|
105
|
+
errorCodes: ["4XX", "5XX"],
|
|
106
|
+
retryConfig: context.retryConfig,
|
|
107
|
+
retryCodes: context.retryCodes,
|
|
108
|
+
});
|
|
109
|
+
if (!doResult.ok) {
|
|
110
|
+
return [doResult, { status: "request-error", request: req }];
|
|
111
|
+
}
|
|
112
|
+
const response = doResult.value;
|
|
113
|
+
const [result] = await M.match(M.json(200, operations.UpdateDatasourceResponseBody$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response);
|
|
114
|
+
if (!result.ok) {
|
|
115
|
+
return [result, { status: "complete", request: req, response }];
|
|
116
|
+
}
|
|
117
|
+
return [result, { status: "complete", request: req, response }];
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=knowledgeUpdateDatasource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledgeUpdateDatasource.js","sourceRoot":"","sources":["../src/funcs/knowledgeUpdateDatasource.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BH,8DAqBC;AA5CD,sDAA+D;AAC/D,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAC5D,gDAAwD;AAGxD;;GAEG;AACH,SAAgB,yBAAyB,CACvC,MAAe,EACf,OAA2C,EAC3C,OAAwB;IAaxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAA2C,EAC3C,OAAwB;IAgBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,sCAAsC,CAAC,KAAK,CAAC,KAAK,CAAC,EACzE,yBAAyB,CAC1B,CAAC;IAC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GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAU5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,0CAA0C,CAAC,EAClE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,CAAC,CAAC;IACZ,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
package/jsr.json
CHANGED
package/lib/config.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
35
35
|
export declare const SDK_METADATA: {
|
|
36
36
|
readonly language: "typescript";
|
|
37
37
|
readonly openapiDocVersion: "2.0";
|
|
38
|
-
readonly sdkVersion: "3.3.0-rc.
|
|
38
|
+
readonly sdkVersion: "3.3.0-rc.19";
|
|
39
39
|
readonly genVersion: "2.563.1";
|
|
40
|
-
readonly userAgent: "speakeasy-sdk/typescript 3.3.0-rc.
|
|
40
|
+
readonly userAgent: "speakeasy-sdk/typescript 3.3.0-rc.19 2.563.1 2.0 @orq-ai/node";
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -28,8 +28,8 @@ function serverURLFromOptions(options) {
|
|
|
28
28
|
exports.SDK_METADATA = {
|
|
29
29
|
language: "typescript",
|
|
30
30
|
openapiDocVersion: "2.0",
|
|
31
|
-
sdkVersion: "3.3.0-rc.
|
|
31
|
+
sdkVersion: "3.3.0-rc.19",
|
|
32
32
|
genVersion: "2.563.1",
|
|
33
|
-
userAgent: "speakeasy-sdk/typescript 3.3.0-rc.
|
|
33
|
+
userAgent: "speakeasy-sdk/typescript 3.3.0-rc.19 2.563.1 2.0 @orq-ai/node",
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=config.js.map
|
package/mcp-server/mcp-server.js
CHANGED
|
@@ -22,7 +22,7 @@ const routes = (0, core_1.buildRouteMap)({
|
|
|
22
22
|
exports.app = (0, core_1.buildApplication)(routes, {
|
|
23
23
|
name: "mcp",
|
|
24
24
|
versionInfo: {
|
|
25
|
-
currentVersion: "3.3.0-rc.
|
|
25
|
+
currentVersion: "3.3.0-rc.19",
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
(0, core_1.run)(exports.app, node_process_1.default.argv.slice(2), (0, cli_js_1.buildContext)(node_process_1.default));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/mcp-server/server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,OAAO,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/mcp-server/server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,OAAO,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAC;AAkDlD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACpC,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IAC1C,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAChD,WAAW,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC;IACpD,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;CACjD,aAoFA"}
|
package/mcp-server/server.js
CHANGED
|
@@ -43,10 +43,12 @@ const knowledgeList_js_1 = require("./tools/knowledgeList.js");
|
|
|
43
43
|
const knowledgeListChunks_js_1 = require("./tools/knowledgeListChunks.js");
|
|
44
44
|
const knowledgeListDatasources_js_1 = require("./tools/knowledgeListDatasources.js");
|
|
45
45
|
const knowledgeRetrieve_js_1 = require("./tools/knowledgeRetrieve.js");
|
|
46
|
+
const knowledgeRetrieveChunk_js_1 = require("./tools/knowledgeRetrieveChunk.js");
|
|
46
47
|
const knowledgeRetrieveDatasource_js_1 = require("./tools/knowledgeRetrieveDatasource.js");
|
|
47
48
|
const knowledgeSearch_js_1 = require("./tools/knowledgeSearch.js");
|
|
48
49
|
const knowledgeUpdate_js_1 = require("./tools/knowledgeUpdate.js");
|
|
49
50
|
const knowledgeUpdateChunk_js_1 = require("./tools/knowledgeUpdateChunk.js");
|
|
51
|
+
const knowledgeUpdateDatasource_js_1 = require("./tools/knowledgeUpdateDatasource.js");
|
|
50
52
|
const promptsCreate_js_1 = require("./tools/promptsCreate.js");
|
|
51
53
|
const promptsDelete_js_1 = require("./tools/promptsDelete.js");
|
|
52
54
|
const promptsGetVersion_js_1 = require("./tools/promptsGetVersion.js");
|
|
@@ -58,7 +60,7 @@ const remoteconfigsRetrieve_js_1 = require("./tools/remoteconfigsRetrieve.js");
|
|
|
58
60
|
function createMCPServer(deps) {
|
|
59
61
|
const server = new mcp_js_1.McpServer({
|
|
60
62
|
name: "Orq",
|
|
61
|
-
version: "3.3.0-rc.
|
|
63
|
+
version: "3.3.0-rc.19",
|
|
62
64
|
});
|
|
63
65
|
const client = new core_js_1.OrqCore({
|
|
64
66
|
apiKey: deps.apiKey,
|
|
@@ -115,10 +117,12 @@ function createMCPServer(deps) {
|
|
|
115
117
|
tool(knowledgeCreateDatasource_js_1.tool$knowledgeCreateDatasource);
|
|
116
118
|
tool(knowledgeRetrieveDatasource_js_1.tool$knowledgeRetrieveDatasource);
|
|
117
119
|
tool(knowledgeDeleteDatasource_js_1.tool$knowledgeDeleteDatasource);
|
|
120
|
+
tool(knowledgeUpdateDatasource_js_1.tool$knowledgeUpdateDatasource);
|
|
118
121
|
tool(knowledgeCreateChunks_js_1.tool$knowledgeCreateChunks);
|
|
119
122
|
tool(knowledgeListChunks_js_1.tool$knowledgeListChunks);
|
|
120
123
|
tool(knowledgeUpdateChunk_js_1.tool$knowledgeUpdateChunk);
|
|
121
124
|
tool(knowledgeDeleteChunk_js_1.tool$knowledgeDeleteChunk);
|
|
125
|
+
tool(knowledgeRetrieveChunk_js_1.tool$knowledgeRetrieveChunk);
|
|
122
126
|
tool(deploymentsMetricsCreate_js_1.tool$deploymentsMetricsCreate);
|
|
123
127
|
return server;
|
|
124
128
|
}
|
package/mcp-server/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/mcp-server/server.ts"],"names":[],"mappings":";AAAA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/mcp-server/server.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA6DH,0CA6FC;AAxJD,oEAAoE;AACpE,wCAAqC;AAGrC,6CAAoD;AACpD,iDAGwB;AACxB,2CAAkD;AAClD,yCAAgD;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AC;AAChB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as operations from "../../models/operations/index.js";
|
|
2
|
+
import { ToolDefinition } from "../tools.js";
|
|
3
|
+
declare const args: {
|
|
4
|
+
request: import("zod").ZodType<operations.GetOneChunkRequest, import("zod").ZodTypeDef, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare const tool$knowledgeRetrieveChunk: ToolDefinition<typeof args>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=knowledgeRetrieveChunk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledgeRetrieveChunk.d.ts","sourceRoot":"","sources":["../../src/mcp-server/tools/knowledgeRetrieveChunk.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,OAAO,IAAI,CAsBnE,CAAC"}
|