@ganju/utils 0.0.9 → 0.0.11
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/channelDebounce.d.ts +11 -0
- package/dist/channelDebounce.d.ts.map +1 -1
- package/dist/channelDebounce.js +12 -1
- package/dist/chunking.d.ts +17 -3
- package/dist/chunking.d.ts.map +1 -1
- package/dist/chunking.js +125 -19
- package/dist/constants.d.ts +30 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +136 -5
- package/dist/index.d.ts +207 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -0
- package/dist/resourceRerank.d.ts +20 -0
- package/dist/resourceRerank.d.ts.map +1 -0
- package/dist/resourceRerank.js +37 -0
- package/dist/schema.d.ts +106 -24
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +45 -4
- package/dist/syncableResource.d.ts +14 -0
- package/dist/syncableResource.d.ts.map +1 -0
- package/dist/syncableResource.js +43 -0
- package/dist/toolCatalog.d.ts +70 -1
- package/dist/toolCatalog.d.ts.map +1 -1
- package/dist/toolCatalog.js +151 -63
- package/dist/toolConfirmation.d.ts +47 -0
- package/dist/toolConfirmation.d.ts.map +1 -0
- package/dist/toolConfirmation.js +217 -0
- package/package.json +1 -1
- package/src/channelDebounce.ts +36 -0
- package/src/chunking.ts +166 -23
- package/src/constants.ts +149 -5
- package/src/index.ts +51 -1
- package/src/resourceRerank.ts +54 -0
- package/src/schema.ts +58 -6
- package/src/syncableResource.ts +68 -0
- package/src/toolCatalog.ts +170 -63
- package/src/toolConfirmation.ts +261 -0
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB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wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACX,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const containmentToken_1 = require("./containmentToken");
|
|
|
22
22
|
const oauthProviders_1 = require("./oauthProviders");
|
|
23
23
|
const attachment_1 = require("./attachment");
|
|
24
24
|
const exposedResource_1 = require("./exposedResource");
|
|
25
|
+
const syncableResource_1 = require("./syncableResource");
|
|
25
26
|
const vendorError_1 = require("./vendorError");
|
|
26
27
|
const deadline_1 = require("./deadline");
|
|
27
28
|
const customCodeProject_1 = require("./customCodeProject");
|
|
@@ -41,10 +42,12 @@ const sanitize_1 = require("./sanitize");
|
|
|
41
42
|
const chunking_1 = require("./chunking");
|
|
42
43
|
const embeddable_1 = require("./embeddable");
|
|
43
44
|
const l2Normalize_1 = require("./l2Normalize");
|
|
45
|
+
const resourceRerank_1 = require("./resourceRerank");
|
|
44
46
|
const retry_1 = require("./retry");
|
|
45
47
|
const processQueueBatch_1 = require("./processQueueBatch");
|
|
46
48
|
const channelNotifier_1 = require("./channelNotifier");
|
|
47
49
|
const channelDebounce_1 = require("./channelDebounce");
|
|
50
|
+
const toolConfirmation_1 = require("./toolConfirmation");
|
|
48
51
|
const sources_1 = require("./sources");
|
|
49
52
|
const oauth_1 = require("./oauth");
|
|
50
53
|
const vendorTimeZone_1 = require("./vendorTimeZone");
|
|
@@ -100,6 +103,9 @@ exports.utils = {
|
|
|
100
103
|
oauthProviders: oauthProviders_1.oauthProviders,
|
|
101
104
|
resolveAttachment: attachment_1.resolveAttachment,
|
|
102
105
|
isExposedResource: exposedResource_1.isExposedResource,
|
|
106
|
+
isSyncableResource: syncableResource_1.isSyncableResource,
|
|
107
|
+
isResourceSyncInProgress: syncableResource_1.isResourceSyncInProgress,
|
|
108
|
+
resourceSyncProvider: syncableResource_1.resourceSyncProvider,
|
|
103
109
|
describeVendorError: vendorError_1.describeVendorError,
|
|
104
110
|
withDeadline: deadline_1.withDeadline,
|
|
105
111
|
isDeadlineError: deadline_1.isDeadlineError,
|
|
@@ -146,6 +152,7 @@ exports.utils = {
|
|
|
146
152
|
prepareChunks: chunking_1.prepareChunks,
|
|
147
153
|
isEmbeddableMimeType: embeddable_1.isEmbeddableMimeType,
|
|
148
154
|
l2Normalize: l2Normalize_1.l2Normalize,
|
|
155
|
+
createResourceReranker: resourceRerank_1.createResourceReranker,
|
|
149
156
|
sleep: retry_1.sleep,
|
|
150
157
|
isRateLimitError: retry_1.isRateLimitError,
|
|
151
158
|
withRateLimitRetry: retry_1.withRateLimitRetry,
|
|
@@ -153,7 +160,16 @@ exports.utils = {
|
|
|
153
160
|
getToolStatusMessage: channelNotifier_1.getToolStatusMessage,
|
|
154
161
|
resolveDebounceMs: channelDebounce_1.resolveDebounceMs,
|
|
155
162
|
channelBufferKey: channelDebounce_1.channelBufferKey,
|
|
163
|
+
batchCommand: channelDebounce_1.batchCommand,
|
|
156
164
|
joinBufferedMessages: channelDebounce_1.joinBufferedMessages,
|
|
165
|
+
isConfirmationReply: toolConfirmation_1.isConfirmationReply,
|
|
166
|
+
confirmationButtonLabels: toolConfirmation_1.confirmationButtonLabels,
|
|
167
|
+
confirmationButtonId: toolConfirmation_1.confirmationButtonId,
|
|
168
|
+
parseConfirmationButton: toolConfirmation_1.parseConfirmationButton,
|
|
169
|
+
languageFromPhoneNumber: toolConfirmation_1.languageFromPhoneNumber,
|
|
170
|
+
formatConfirmationSummary: toolConfirmation_1.formatConfirmationSummary,
|
|
171
|
+
annotationsForEffect: toolConfirmation_1.annotationsForEffect,
|
|
172
|
+
TOOL_EFFECTS: toolConfirmation_1.TOOL_EFFECTS,
|
|
157
173
|
isResourceSourceEnabled: sources_1.isResourceSourceEnabled,
|
|
158
174
|
isDownloadableSource: sources_1.isDownloadableSource,
|
|
159
175
|
safeHostname: sources_1.safeHostname,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EnvSource } from './getEnv';
|
|
2
|
+
export interface RerankAiBinding {
|
|
3
|
+
run(model: string, input: {
|
|
4
|
+
query: string;
|
|
5
|
+
contexts: Array<{
|
|
6
|
+
text: string;
|
|
7
|
+
}>;
|
|
8
|
+
top_k?: number;
|
|
9
|
+
}): Promise<unknown>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The cross-encoder second stage for resource search, or undefined when the
|
|
13
|
+
* Worker has no `AI` binding — local dev without Workers AI keeps plain fusion.
|
|
14
|
+
*
|
|
15
|
+
* Returns one score per document, in input order. A response that doesn't
|
|
16
|
+
* cover every document returns null, which keeps the fused order — a partial
|
|
17
|
+
* ranking would silently drop the chunks it left out.
|
|
18
|
+
*/
|
|
19
|
+
export declare const createResourceReranker: (source: EnvSource) => ((query: string, documents: string[]) => Promise<number[] | null>) | undefined;
|
|
20
|
+
//# sourceMappingURL=resourceRerank.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceRerank.d.ts","sourceRoot":"","sources":["../src/resourceRerank.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C,MAAM,WAAW,eAAe;IAC9B,GAAG,CACD,KAAK,EAAE,MAAM,EACb,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAC1E,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,SAAS,KAEf,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,GAClE,SAyBH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createResourceReranker = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
/**
|
|
6
|
+
* The cross-encoder second stage for resource search, or undefined when the
|
|
7
|
+
* Worker has no `AI` binding — local dev without Workers AI keeps plain fusion.
|
|
8
|
+
*
|
|
9
|
+
* Returns one score per document, in input order. A response that doesn't
|
|
10
|
+
* cover every document returns null, which keeps the fused order — a partial
|
|
11
|
+
* ranking would silently drop the chunks it left out.
|
|
12
|
+
*/
|
|
13
|
+
const createResourceReranker = (source) => {
|
|
14
|
+
const ai = source.env?.AI;
|
|
15
|
+
if (!ai)
|
|
16
|
+
return undefined;
|
|
17
|
+
return async (query, documents) => {
|
|
18
|
+
const result = (await ai.run(constants_1.constants.RESOURCE_SEARCH_RERANK_MODEL, {
|
|
19
|
+
query,
|
|
20
|
+
contexts: documents.map(text => ({ text })),
|
|
21
|
+
top_k: documents.length
|
|
22
|
+
}));
|
|
23
|
+
const scores = new Array(documents.length);
|
|
24
|
+
for (const item of result?.response ?? []) {
|
|
25
|
+
if (typeof item.id === 'number' &&
|
|
26
|
+
typeof item.score === 'number' &&
|
|
27
|
+
item.id >= 0 &&
|
|
28
|
+
item.id < documents.length) {
|
|
29
|
+
scores[item.id] = item.score;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (scores.some(score => score === undefined))
|
|
33
|
+
return null;
|
|
34
|
+
return scores;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
exports.createResourceReranker = createResourceReranker;
|
package/dist/schema.d.ts
CHANGED
|
@@ -66,6 +66,11 @@ declare const HTTP_ENDPOINT_CONFIG: z.ZodPipe<z.ZodObject<{
|
|
|
66
66
|
jsonPath: z.ZodOptional<z.ZodString>;
|
|
67
67
|
successStatus: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
68
68
|
}, z.core.$strip>>;
|
|
69
|
+
effect: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
read: "read";
|
|
71
|
+
write: "write";
|
|
72
|
+
sensitive: "sensitive";
|
|
73
|
+
}>>;
|
|
69
74
|
auth: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
70
75
|
kind: z.ZodLiteral<"none">;
|
|
71
76
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -154,6 +159,7 @@ declare const HTTP_ENDPOINT_CONFIG: z.ZodPipe<z.ZodObject<{
|
|
|
154
159
|
pattern?: string | undefined;
|
|
155
160
|
enum?: any[] | undefined;
|
|
156
161
|
} | undefined;
|
|
162
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
157
163
|
allowedHosts?: string[] | undefined;
|
|
158
164
|
}, {
|
|
159
165
|
name: string;
|
|
@@ -221,6 +227,7 @@ declare const HTTP_ENDPOINT_CONFIG: z.ZodPipe<z.ZodObject<{
|
|
|
221
227
|
pattern?: string | undefined;
|
|
222
228
|
enum?: any[] | undefined;
|
|
223
229
|
} | undefined;
|
|
230
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
224
231
|
allowedHosts?: string[] | undefined;
|
|
225
232
|
}>>;
|
|
226
233
|
declare const MCP_PROXY_CONFIG: z.ZodObject<{
|
|
@@ -260,6 +267,12 @@ declare const CUSTOM_CODE_CONFIG: z.ZodObject<{
|
|
|
260
267
|
own: "own";
|
|
261
268
|
}>>;
|
|
262
269
|
}, z.core.$strip>;
|
|
270
|
+
declare const TOOL_ANNOTATIONS: z.ZodObject<{
|
|
271
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
273
|
+
idempotentHint: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
openWorldHint: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
}, z.core.$strict>;
|
|
263
276
|
declare const CUSTOM_CODE_TOOL: z.ZodObject<{
|
|
264
277
|
name: z.ZodString;
|
|
265
278
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -292,6 +305,12 @@ declare const CUSTOM_CODE_TOOL: z.ZodObject<{
|
|
|
292
305
|
pattern: z.ZodOptional<z.ZodString>;
|
|
293
306
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
294
307
|
}, z.core.$strip>>;
|
|
308
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
309
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
+
idempotentHint: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
openWorldHint: z.ZodOptional<z.ZodBoolean>;
|
|
313
|
+
}, z.core.$strict>>;
|
|
295
314
|
}, z.core.$strip>;
|
|
296
315
|
declare const CUSTOM_CODE_MANIFEST: z.ZodObject<{
|
|
297
316
|
tools: z.ZodArray<z.ZodObject<{
|
|
@@ -326,6 +345,12 @@ declare const CUSTOM_CODE_MANIFEST: z.ZodObject<{
|
|
|
326
345
|
pattern: z.ZodOptional<z.ZodString>;
|
|
327
346
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
328
347
|
}, z.core.$strip>>;
|
|
348
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
349
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
idempotentHint: z.ZodOptional<z.ZodBoolean>;
|
|
352
|
+
openWorldHint: z.ZodOptional<z.ZodBoolean>;
|
|
353
|
+
}, z.core.$strict>>;
|
|
329
354
|
}, z.core.$strip>>;
|
|
330
355
|
}, z.core.$strip>;
|
|
331
356
|
declare const CUSTOM_CODE_BROKER_RESOURCE_CREATE: z.ZodObject<{
|
|
@@ -437,7 +462,8 @@ export declare const Schema: {
|
|
|
437
462
|
ORGANIZATION_UPDATE: z.ZodObject<{
|
|
438
463
|
id: z.ZodUUID;
|
|
439
464
|
userId: z.ZodUUID;
|
|
440
|
-
name: z.ZodString
|
|
465
|
+
name: z.ZodOptional<z.ZodString>;
|
|
466
|
+
requireToolConfirmation: z.ZodOptional<z.ZodBoolean>;
|
|
441
467
|
}, z.core.$strip>;
|
|
442
468
|
ORGANIZATION_GET: z.ZodObject<{
|
|
443
469
|
id: z.ZodUUID;
|
|
@@ -740,18 +766,6 @@ export declare const Schema: {
|
|
|
740
766
|
organizationId: z.ZodUUID;
|
|
741
767
|
}, z.core.$strip>;
|
|
742
768
|
ARTIFACT_CREATE_RESOURCE_VIEW: z.ZodObject<{
|
|
743
|
-
content: z.ZodOptional<z.ZodString>;
|
|
744
|
-
type: z.ZodDefault<z.ZodEnum<{
|
|
745
|
-
static: "static";
|
|
746
|
-
template: "template";
|
|
747
|
-
}>>;
|
|
748
|
-
description: z.ZodOptional<z.ZodString>;
|
|
749
|
-
title: z.ZodString;
|
|
750
|
-
uri: z.ZodString;
|
|
751
|
-
crawlConfig: z.ZodOptional<z.ZodObject<{
|
|
752
|
-
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
753
|
-
maxDepth: z.ZodDefault<z.ZodNumber>;
|
|
754
|
-
}, z.core.$strip>>;
|
|
755
769
|
mimeType: z.ZodEnum<{
|
|
756
770
|
"text/plain": "text/plain";
|
|
757
771
|
"text/csv": "text/csv";
|
|
@@ -792,6 +806,19 @@ export declare const Schema: {
|
|
|
792
806
|
"application/x-perl": "application/x-perl";
|
|
793
807
|
"application/octet-stream": "application/octet-stream";
|
|
794
808
|
}>;
|
|
809
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
810
|
+
content: z.ZodOptional<z.ZodString>;
|
|
811
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
812
|
+
static: "static";
|
|
813
|
+
template: "template";
|
|
814
|
+
}>>;
|
|
815
|
+
description: z.ZodOptional<z.ZodString>;
|
|
816
|
+
title: z.ZodString;
|
|
817
|
+
uri: z.ZodString;
|
|
818
|
+
crawlConfig: z.ZodOptional<z.ZodObject<{
|
|
819
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
820
|
+
maxDepth: z.ZodDefault<z.ZodNumber>;
|
|
821
|
+
}, z.core.$strip>>;
|
|
795
822
|
size: z.ZodOptional<z.ZodNumber>;
|
|
796
823
|
sourceType: z.ZodDefault<z.ZodEnum<{
|
|
797
824
|
FILE: "FILE";
|
|
@@ -802,7 +829,6 @@ export declare const Schema: {
|
|
|
802
829
|
}>>;
|
|
803
830
|
encoding: z.ZodOptional<z.ZodString>;
|
|
804
831
|
fileKey: z.ZodOptional<z.ZodString>;
|
|
805
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
806
832
|
annotations: z.ZodOptional<z.ZodObject<{
|
|
807
833
|
audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
808
834
|
user: "user";
|
|
@@ -1001,14 +1027,6 @@ export declare const Schema: {
|
|
|
1001
1027
|
organizationId: z.ZodUUID;
|
|
1002
1028
|
}, z.core.$strip>;
|
|
1003
1029
|
ARTIFACT_UPDATE_RESOURCE_VIEW: z.ZodObject<{
|
|
1004
|
-
content: z.ZodOptional<z.ZodString>;
|
|
1005
|
-
type: z.ZodDefault<z.ZodEnum<{
|
|
1006
|
-
static: "static";
|
|
1007
|
-
template: "template";
|
|
1008
|
-
}>>;
|
|
1009
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1010
|
-
title: z.ZodString;
|
|
1011
|
-
uri: z.ZodString;
|
|
1012
1030
|
mimeType: z.ZodEnum<{
|
|
1013
1031
|
"text/plain": "text/plain";
|
|
1014
1032
|
"text/csv": "text/csv";
|
|
@@ -1049,6 +1067,15 @@ export declare const Schema: {
|
|
|
1049
1067
|
"application/x-perl": "application/x-perl";
|
|
1050
1068
|
"application/octet-stream": "application/octet-stream";
|
|
1051
1069
|
}>;
|
|
1070
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
1071
|
+
content: z.ZodOptional<z.ZodString>;
|
|
1072
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
1073
|
+
static: "static";
|
|
1074
|
+
template: "template";
|
|
1075
|
+
}>>;
|
|
1076
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1077
|
+
title: z.ZodString;
|
|
1078
|
+
uri: z.ZodString;
|
|
1052
1079
|
size: z.ZodOptional<z.ZodNumber>;
|
|
1053
1080
|
sourceType: z.ZodDefault<z.ZodEnum<{
|
|
1054
1081
|
FILE: "FILE";
|
|
@@ -1059,7 +1086,6 @@ export declare const Schema: {
|
|
|
1059
1086
|
}>>;
|
|
1060
1087
|
encoding: z.ZodOptional<z.ZodString>;
|
|
1061
1088
|
fileKey: z.ZodOptional<z.ZodString>;
|
|
1062
|
-
fileName: z.ZodOptional<z.ZodString>;
|
|
1063
1089
|
annotations: z.ZodOptional<z.ZodObject<{
|
|
1064
1090
|
audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1065
1091
|
user: "user";
|
|
@@ -1366,6 +1392,23 @@ export declare const Schema: {
|
|
|
1366
1392
|
userId: z.ZodUUID;
|
|
1367
1393
|
organizationId: z.ZodUUID;
|
|
1368
1394
|
}, z.core.$strip>;
|
|
1395
|
+
ARTIFACT_UPDATE_RESOURCE_SYNC_INTERVAL: z.ZodObject<{
|
|
1396
|
+
resourceId: z.ZodUUID;
|
|
1397
|
+
syncInterval: z.ZodEnum<{
|
|
1398
|
+
off: "off";
|
|
1399
|
+
daily: "daily";
|
|
1400
|
+
weekly: "weekly";
|
|
1401
|
+
}>;
|
|
1402
|
+
projectId: z.ZodUUID;
|
|
1403
|
+
userId: z.ZodUUID;
|
|
1404
|
+
organizationId: z.ZodUUID;
|
|
1405
|
+
}, z.core.$strip>;
|
|
1406
|
+
ARTIFACT_SYNC_RESOURCE: z.ZodObject<{
|
|
1407
|
+
resourceId: z.ZodUUID;
|
|
1408
|
+
projectId: z.ZodUUID;
|
|
1409
|
+
userId: z.ZodUUID;
|
|
1410
|
+
organizationId: z.ZodUUID;
|
|
1411
|
+
}, z.core.$strip>;
|
|
1369
1412
|
HTTP_ENDPOINT_CONFIG: z.ZodPipe<z.ZodObject<{
|
|
1370
1413
|
name: z.ZodString;
|
|
1371
1414
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -1433,6 +1476,11 @@ export declare const Schema: {
|
|
|
1433
1476
|
jsonPath: z.ZodOptional<z.ZodString>;
|
|
1434
1477
|
successStatus: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1435
1478
|
}, z.core.$strip>>;
|
|
1479
|
+
effect: z.ZodOptional<z.ZodEnum<{
|
|
1480
|
+
read: "read";
|
|
1481
|
+
write: "write";
|
|
1482
|
+
sensitive: "sensitive";
|
|
1483
|
+
}>>;
|
|
1436
1484
|
auth: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1437
1485
|
kind: z.ZodLiteral<"none">;
|
|
1438
1486
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1521,6 +1569,7 @@ export declare const Schema: {
|
|
|
1521
1569
|
pattern?: string | undefined;
|
|
1522
1570
|
enum?: any[] | undefined;
|
|
1523
1571
|
} | undefined;
|
|
1572
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1524
1573
|
allowedHosts?: string[] | undefined;
|
|
1525
1574
|
}, {
|
|
1526
1575
|
name: string;
|
|
@@ -1588,6 +1637,7 @@ export declare const Schema: {
|
|
|
1588
1637
|
pattern?: string | undefined;
|
|
1589
1638
|
enum?: any[] | undefined;
|
|
1590
1639
|
} | undefined;
|
|
1640
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1591
1641
|
allowedHosts?: string[] | undefined;
|
|
1592
1642
|
}>>;
|
|
1593
1643
|
HTTP_ENDPOINT_CONFIG_WRITE: z.ZodPipe<z.ZodObject<{
|
|
@@ -1657,6 +1707,11 @@ export declare const Schema: {
|
|
|
1657
1707
|
jsonPath: z.ZodOptional<z.ZodString>;
|
|
1658
1708
|
successStatus: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1659
1709
|
}, z.core.$strip>>;
|
|
1710
|
+
effect: z.ZodOptional<z.ZodEnum<{
|
|
1711
|
+
read: "read";
|
|
1712
|
+
write: "write";
|
|
1713
|
+
sensitive: "sensitive";
|
|
1714
|
+
}>>;
|
|
1660
1715
|
auth: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1661
1716
|
kind: z.ZodLiteral<"none">;
|
|
1662
1717
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1745,6 +1800,7 @@ export declare const Schema: {
|
|
|
1745
1800
|
pattern?: string | undefined;
|
|
1746
1801
|
enum?: any[] | undefined;
|
|
1747
1802
|
} | undefined;
|
|
1803
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1748
1804
|
allowedHosts?: string[] | undefined;
|
|
1749
1805
|
}, {
|
|
1750
1806
|
name: string;
|
|
@@ -1812,6 +1868,7 @@ export declare const Schema: {
|
|
|
1812
1868
|
pattern?: string | undefined;
|
|
1813
1869
|
enum?: any[] | undefined;
|
|
1814
1870
|
} | undefined;
|
|
1871
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1815
1872
|
allowedHosts?: string[] | undefined;
|
|
1816
1873
|
}>>;
|
|
1817
1874
|
MCP_PROXY_CONFIG: z.ZodObject<{
|
|
@@ -1894,7 +1951,19 @@ export declare const Schema: {
|
|
|
1894
1951
|
pattern: z.ZodOptional<z.ZodString>;
|
|
1895
1952
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
1896
1953
|
}, z.core.$strip>>;
|
|
1897
|
-
|
|
1954
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
1955
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
1956
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
1957
|
+
idempotentHint: z.ZodOptional<z.ZodBoolean>;
|
|
1958
|
+
openWorldHint: z.ZodOptional<z.ZodBoolean>;
|
|
1959
|
+
}, z.core.$strict>>;
|
|
1960
|
+
}, z.core.$strip>;
|
|
1961
|
+
TOOL_ANNOTATIONS: z.ZodObject<{
|
|
1962
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
1963
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
1964
|
+
idempotentHint: z.ZodOptional<z.ZodBoolean>;
|
|
1965
|
+
openWorldHint: z.ZodOptional<z.ZodBoolean>;
|
|
1966
|
+
}, z.core.$strict>;
|
|
1898
1967
|
CUSTOM_CODE_MANIFEST: z.ZodObject<{
|
|
1899
1968
|
tools: z.ZodArray<z.ZodObject<{
|
|
1900
1969
|
name: z.ZodString;
|
|
@@ -1928,6 +1997,12 @@ export declare const Schema: {
|
|
|
1928
1997
|
pattern: z.ZodOptional<z.ZodString>;
|
|
1929
1998
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
1930
1999
|
}, z.core.$strip>>;
|
|
2000
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
2001
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
2002
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
2003
|
+
idempotentHint: z.ZodOptional<z.ZodBoolean>;
|
|
2004
|
+
openWorldHint: z.ZodOptional<z.ZodBoolean>;
|
|
2005
|
+
}, z.core.$strict>>;
|
|
1931
2006
|
}, z.core.$strip>>;
|
|
1932
2007
|
}, z.core.$strip>;
|
|
1933
2008
|
ARTIFACT_CUSTOM_CODE_CREATE_VERSION: z.ZodObject<{
|
|
@@ -1964,6 +2039,12 @@ export declare const Schema: {
|
|
|
1964
2039
|
pattern: z.ZodOptional<z.ZodString>;
|
|
1965
2040
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
1966
2041
|
}, z.core.$strip>>;
|
|
2042
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
2043
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
2044
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
2045
|
+
idempotentHint: z.ZodOptional<z.ZodBoolean>;
|
|
2046
|
+
openWorldHint: z.ZodOptional<z.ZodBoolean>;
|
|
2047
|
+
}, z.core.$strict>>;
|
|
1967
2048
|
}, z.core.$strip>>;
|
|
1968
2049
|
}, z.core.$strip>;
|
|
1969
2050
|
config: z.ZodOptional<z.ZodObject<{
|
|
@@ -2165,6 +2246,7 @@ export interface McpProxyDiscoveredTool {
|
|
|
2165
2246
|
title?: string;
|
|
2166
2247
|
description?: string;
|
|
2167
2248
|
inputSchema: unknown;
|
|
2249
|
+
annotations?: z.infer<typeof TOOL_ANNOTATIONS>;
|
|
2168
2250
|
}
|
|
2169
2251
|
export interface McpProxyDiscoveredResource {
|
|
2170
2252
|
uri: string;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2xBxB,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAKD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAC1E;AAMD,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACzC,OAAO,CAAC,EAAE,wBAAwB,EAAE,CAAC;CACtC"}
|
package/dist/schema.js
CHANGED
|
@@ -7,6 +7,7 @@ const llmBaseUrl_1 = require("./llmBaseUrl");
|
|
|
7
7
|
const slug_1 = require("./slug");
|
|
8
8
|
const reservedToolName_1 = require("./reservedToolName");
|
|
9
9
|
const slugifyTitle_1 = require("./slugifyTitle");
|
|
10
|
+
const toolConfirmation_1 = require("./toolConfirmation");
|
|
10
11
|
// A prompt title becomes a slash command; it must not collide with a command
|
|
11
12
|
// the channel runner handles itself (e.g. `/link`).
|
|
12
13
|
const PROMPT_TITLE = zod_1.z
|
|
@@ -37,11 +38,16 @@ const ORGANIZATION_CREATE_VIEW = zod_1.z.object({
|
|
|
37
38
|
projectName: zod_1.z.string().min(3).max(100),
|
|
38
39
|
projectDescription: zod_1.z.string().max(500)
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
+
// Each setting is saved on its own — the name from its form, the switches the
|
|
42
|
+
// moment they're flipped — so every field is optional, but not all at once.
|
|
43
|
+
const ORGANIZATION_UPDATE = zod_1.z
|
|
44
|
+
.object({
|
|
41
45
|
id: zod_1.z.uuid(),
|
|
42
46
|
userId: zod_1.z.uuid(),
|
|
43
|
-
name: zod_1.z.string().min(3).max(100)
|
|
44
|
-
|
|
47
|
+
name: zod_1.z.string().min(3).max(100).optional(),
|
|
48
|
+
requireToolConfirmation: zod_1.z.boolean().optional()
|
|
49
|
+
})
|
|
50
|
+
.refine(value => value.name !== undefined || value.requireToolConfirmation !== undefined, { message: 'Nothing to update' });
|
|
45
51
|
const ORGANIZATION_GET = zod_1.z.object({
|
|
46
52
|
id: zod_1.z.uuid(),
|
|
47
53
|
userId: zod_1.z.uuid()
|
|
@@ -716,6 +722,12 @@ const HTTP_ENDPOINT_CONFIG = zod_1.z
|
|
|
716
722
|
contentType: constants_1.constants.HTTP_ENDPOINT_RESPONSE_CONTENT_TYPE_AUTO,
|
|
717
723
|
maxBytes: constants_1.constants.HTTP_ENDPOINT_DEFAULT_MAX_BYTES
|
|
718
724
|
}),
|
|
725
|
+
// What the endpoint does, as its owner says (`read`, `write` or
|
|
726
|
+
// `sensitive`). Absent means the method decides: GET and HEAD read,
|
|
727
|
+
// anything else is sensitive — right for most, but a POST that only
|
|
728
|
+
// searches needs its owner to say so, or a confirming channel asks
|
|
729
|
+
// before every search.
|
|
730
|
+
effect: zod_1.z.enum(toolConfirmation_1.TOOL_EFFECTS).optional(),
|
|
719
731
|
// Auth — credentials referenced by id, never inlined.
|
|
720
732
|
auth: HTTP_ENDPOINT_AUTH.default({
|
|
721
733
|
kind: constants_1.constants.HTTP_ENDPOINT_AUTH_KIND_NONE
|
|
@@ -909,6 +921,18 @@ const CUSTOM_CODE_CONFIG_WRITE = CUSTOM_CODE_CONFIG.superRefine((cfg, ctx) => {
|
|
|
909
921
|
// that version registering, and the owner would see tools quietly disappear with
|
|
910
922
|
// only a log line to explain it. Reservation belongs to the manifest below,
|
|
911
923
|
// which is the write path.
|
|
924
|
+
// MCP tool annotations as a tool's author declares them — every hint optional,
|
|
925
|
+
// with the spec's own defaults for what is left out. The channel runner reads
|
|
926
|
+
// them to decide what to confirm, so a tool that doesn't say it is read-only
|
|
927
|
+
// is treated as one that may change things.
|
|
928
|
+
const TOOL_ANNOTATIONS = zod_1.z
|
|
929
|
+
.object({
|
|
930
|
+
readOnlyHint: zod_1.z.boolean().optional(),
|
|
931
|
+
destructiveHint: zod_1.z.boolean().optional(),
|
|
932
|
+
idempotentHint: zod_1.z.boolean().optional(),
|
|
933
|
+
openWorldHint: zod_1.z.boolean().optional()
|
|
934
|
+
})
|
|
935
|
+
.strict();
|
|
912
936
|
const CUSTOM_CODE_TOOL = zod_1.z.object({
|
|
913
937
|
name: zod_1.z
|
|
914
938
|
.string()
|
|
@@ -918,7 +942,8 @@ const CUSTOM_CODE_TOOL = zod_1.z.object({
|
|
|
918
942
|
title: zod_1.z.string().min(1).max(200).optional(),
|
|
919
943
|
description: zod_1.z.string().max(2000).optional(),
|
|
920
944
|
inputSchema: SCHEMA_DEFINITION.default({ type: 'object', properties: {} }),
|
|
921
|
-
outputSchema: SCHEMA_DEFINITION.optional()
|
|
945
|
+
outputSchema: SCHEMA_DEFINITION.optional(),
|
|
946
|
+
annotations: TOOL_ANNOTATIONS.optional()
|
|
922
947
|
});
|
|
923
948
|
// The manifest a `ganju deploy` (or the dashboard) uploads alongside a bundle.
|
|
924
949
|
// Names must be unique within one script: apps/mcp registers them into a single
|
|
@@ -1263,6 +1288,19 @@ const ARTIFACT_UPDATE_RESOURCE_SHOW_SOURCE = zod_1.z.object({
|
|
|
1263
1288
|
userId: zod_1.z.uuid(),
|
|
1264
1289
|
organizationId: zod_1.z.uuid()
|
|
1265
1290
|
});
|
|
1291
|
+
const ARTIFACT_UPDATE_RESOURCE_SYNC_INTERVAL = zod_1.z.object({
|
|
1292
|
+
resourceId: zod_1.z.uuid(),
|
|
1293
|
+
syncInterval: zod_1.z.enum(constants_1.constants.RESOURCE_SYNC_INTERVALS),
|
|
1294
|
+
projectId: zod_1.z.uuid(),
|
|
1295
|
+
userId: zod_1.z.uuid(),
|
|
1296
|
+
organizationId: zod_1.z.uuid()
|
|
1297
|
+
});
|
|
1298
|
+
const ARTIFACT_SYNC_RESOURCE = zod_1.z.object({
|
|
1299
|
+
resourceId: zod_1.z.uuid(),
|
|
1300
|
+
projectId: zod_1.z.uuid(),
|
|
1301
|
+
userId: zod_1.z.uuid(),
|
|
1302
|
+
organizationId: zod_1.z.uuid()
|
|
1303
|
+
});
|
|
1266
1304
|
const ARTIFACT_GET = zod_1.z.object({
|
|
1267
1305
|
projectId: zod_1.z.uuid(),
|
|
1268
1306
|
userId: zod_1.z.uuid(),
|
|
@@ -1425,12 +1463,15 @@ exports.Schema = {
|
|
|
1425
1463
|
CHANNEL_LIST_CONVERSATIONS,
|
|
1426
1464
|
CHANNEL_LIST_MESSAGES,
|
|
1427
1465
|
ARTIFACT_UPDATE_RESOURCE_SHOW_SOURCE,
|
|
1466
|
+
ARTIFACT_UPDATE_RESOURCE_SYNC_INTERVAL,
|
|
1467
|
+
ARTIFACT_SYNC_RESOURCE,
|
|
1428
1468
|
HTTP_ENDPOINT_CONFIG,
|
|
1429
1469
|
HTTP_ENDPOINT_CONFIG_WRITE,
|
|
1430
1470
|
MCP_PROXY_CONFIG,
|
|
1431
1471
|
CUSTOM_CODE_CONFIG,
|
|
1432
1472
|
CUSTOM_CODE_CONFIG_WRITE,
|
|
1433
1473
|
CUSTOM_CODE_TOOL,
|
|
1474
|
+
TOOL_ANNOTATIONS,
|
|
1434
1475
|
CUSTOM_CODE_MANIFEST,
|
|
1435
1476
|
ARTIFACT_CUSTOM_CODE_CREATE_VERSION,
|
|
1436
1477
|
ARTIFACT_CUSTOM_CODE_UPLOAD_BUNDLE,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface SyncableResource {
|
|
2
|
+
sourceType?: string | null;
|
|
3
|
+
parentResourceId?: string | null;
|
|
4
|
+
metadata?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export type ResourceSyncProvider = 'website' | 'google-drive' | 'one-drive';
|
|
7
|
+
export declare const resourceSyncProvider: (resource: SyncableResource) => ResourceSyncProvider | null;
|
|
8
|
+
export declare const isSyncableResource: (resource: SyncableResource) => boolean;
|
|
9
|
+
export declare const isResourceSyncInProgress: (resource: {
|
|
10
|
+
status: string;
|
|
11
|
+
syncStartedAt?: Date | string | null;
|
|
12
|
+
createdAt: Date | string;
|
|
13
|
+
}, now?: number) => boolean;
|
|
14
|
+
//# sourceMappingURL=syncableResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncableResource.d.ts","sourceRoot":"","sources":["../src/syncableResource.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,cAAc,GAAG,WAAW,CAAC;AAE5E,eAAO,MAAM,oBAAoB,GAC/B,UAAU,gBAAgB,KACzB,oBAAoB,GAAG,IAqBzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,gBAAgB,KAAG,OACvB,CAAC;AAO1C,eAAO,MAAM,wBAAwB,GACnC,UAAU;IACR,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;CAC1B,EACD,MAAK,MAAmB,KACvB,OAMF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isResourceSyncInProgress = exports.isSyncableResource = exports.resourceSyncProvider = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const resourceSyncProvider = (resource) => {
|
|
6
|
+
if (resource.parentResourceId)
|
|
7
|
+
return null;
|
|
8
|
+
switch (resource.sourceType) {
|
|
9
|
+
case constants_1.constants.RESOURCE_SOURCE_TYPE_WEBSITE:
|
|
10
|
+
return 'website';
|
|
11
|
+
case constants_1.constants.RESOURCE_SOURCE_TYPE_GOOGLE_DRIVE_FOLDER:
|
|
12
|
+
return 'google-drive';
|
|
13
|
+
case constants_1.constants.RESOURCE_SOURCE_TYPE_ONE_DRIVE_FOLDER:
|
|
14
|
+
return 'one-drive';
|
|
15
|
+
case constants_1.constants.RESOURCE_SOURCE_TYPE_FILE: {
|
|
16
|
+
const meta = resource.metadata && typeof resource.metadata === 'object'
|
|
17
|
+
? resource.metadata
|
|
18
|
+
: null;
|
|
19
|
+
if (typeof meta?.driveFileId === 'string')
|
|
20
|
+
return 'google-drive';
|
|
21
|
+
if (typeof meta?.oneDriveItemId === 'string')
|
|
22
|
+
return 'one-drive';
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
default:
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.resourceSyncProvider = resourceSyncProvider;
|
|
30
|
+
const isSyncableResource = (resource) => (0, exports.resourceSyncProvider)(resource) !== null;
|
|
31
|
+
exports.isSyncableResource = isSyncableResource;
|
|
32
|
+
// Whether a sync root is still genuinely syncing: PENDING, and started within
|
|
33
|
+
// RESOURCE_SYNC_STALE_MS. Past that, a PENDING root is stuck — a job was lost
|
|
34
|
+
// or gave up — and may be synced again, which re-queues whatever it left
|
|
35
|
+
// unfinished. A root that never synced counts from its creation, so a first
|
|
36
|
+
// import that stalled recovers too.
|
|
37
|
+
const isResourceSyncInProgress = (resource, now = Date.now()) => {
|
|
38
|
+
if (resource.status !== constants_1.constants.STATUS_PENDING)
|
|
39
|
+
return false;
|
|
40
|
+
const startedAt = new Date(resource.syncStartedAt ?? resource.createdAt).getTime();
|
|
41
|
+
return now - startedAt < constants_1.constants.RESOURCE_SYNC_STALE_MS;
|
|
42
|
+
};
|
|
43
|
+
exports.isResourceSyncInProgress = isResourceSyncInProgress;
|