@ganju/utils 0.0.10 → 0.0.12
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/constants.d.ts +12 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +75 -0
- package/dist/index.d.ts +153 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/schema.d.ts +67 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +30 -4
- package/dist/syncableResource.d.ts +5 -0
- package/dist/syncableResource.d.ts.map +1 -1
- package/dist/syncableResource.js +13 -1
- package/dist/toolCatalog.d.ts +69 -0
- package/dist/toolCatalog.d.ts.map +1 -1
- package/dist/toolCatalog.js +150 -62
- package/dist/toolConfirmation.d.ts +58 -0
- package/dist/toolConfirmation.d.ts.map +1 -0
- package/dist/toolConfirmation.js +239 -0
- package/dist/toolLint.d.ts +35 -0
- package/dist/toolLint.d.ts.map +1 -0
- package/dist/toolLint.js +211 -0
- package/package.json +6 -1
- package/src/constants.ts +81 -0
- package/src/index.ts +58 -1
- package/src/schema.ts +41 -6
- package/src/syncableResource.ts +20 -0
- package/src/toolCatalog.ts +169 -62
- package/src/toolConfirmation.ts +291 -0
- package/src/toolLint.ts +277 -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,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAyCvD,OAA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oB,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
|
@@ -47,6 +47,8 @@ const retry_1 = require("./retry");
|
|
|
47
47
|
const processQueueBatch_1 = require("./processQueueBatch");
|
|
48
48
|
const channelNotifier_1 = require("./channelNotifier");
|
|
49
49
|
const channelDebounce_1 = require("./channelDebounce");
|
|
50
|
+
const toolConfirmation_1 = require("./toolConfirmation");
|
|
51
|
+
const toolLint_1 = require("./toolLint");
|
|
50
52
|
const sources_1 = require("./sources");
|
|
51
53
|
const oauth_1 = require("./oauth");
|
|
52
54
|
const vendorTimeZone_1 = require("./vendorTimeZone");
|
|
@@ -103,6 +105,7 @@ exports.utils = {
|
|
|
103
105
|
resolveAttachment: attachment_1.resolveAttachment,
|
|
104
106
|
isExposedResource: exposedResource_1.isExposedResource,
|
|
105
107
|
isSyncableResource: syncableResource_1.isSyncableResource,
|
|
108
|
+
isResourceSyncInProgress: syncableResource_1.isResourceSyncInProgress,
|
|
106
109
|
resourceSyncProvider: syncableResource_1.resourceSyncProvider,
|
|
107
110
|
describeVendorError: vendorError_1.describeVendorError,
|
|
108
111
|
withDeadline: deadline_1.withDeadline,
|
|
@@ -160,6 +163,20 @@ exports.utils = {
|
|
|
160
163
|
channelBufferKey: channelDebounce_1.channelBufferKey,
|
|
161
164
|
batchCommand: channelDebounce_1.batchCommand,
|
|
162
165
|
joinBufferedMessages: channelDebounce_1.joinBufferedMessages,
|
|
166
|
+
isConfirmationReply: toolConfirmation_1.isConfirmationReply,
|
|
167
|
+
confirmationButtonLabels: toolConfirmation_1.confirmationButtonLabels,
|
|
168
|
+
confirmationButtonId: toolConfirmation_1.confirmationButtonId,
|
|
169
|
+
parseConfirmationButton: toolConfirmation_1.parseConfirmationButton,
|
|
170
|
+
languageFromPhoneNumber: toolConfirmation_1.languageFromPhoneNumber,
|
|
171
|
+
formatConfirmationSummary: toolConfirmation_1.formatConfirmationSummary,
|
|
172
|
+
annotationsForEffect: toolConfirmation_1.annotationsForEffect,
|
|
173
|
+
TOOL_EFFECTS: toolConfirmation_1.TOOL_EFFECTS,
|
|
174
|
+
isSensitiveTool: toolConfirmation_1.isSensitiveTool,
|
|
175
|
+
stableJson: toolConfirmation_1.stableJson,
|
|
176
|
+
lintTools: toolLint_1.lintTools,
|
|
177
|
+
TOOL_LINT_RULES: toolLint_1.TOOL_LINT_RULES,
|
|
178
|
+
TOOL_LINT_MAX_TOOLS: toolLint_1.TOOL_LINT_MAX_TOOLS,
|
|
179
|
+
TOOL_LINT_MIN_DESCRIPTION_LENGTH: toolLint_1.TOOL_LINT_MIN_DESCRIPTION_LENGTH,
|
|
163
180
|
isResourceSourceEnabled: sources_1.isResourceSourceEnabled,
|
|
164
181
|
isDownloadableSource: sources_1.isDownloadableSource,
|
|
165
182
|
safeHostname: sources_1.safeHostname,
|
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;
|
|
@@ -1450,6 +1476,11 @@ export declare const Schema: {
|
|
|
1450
1476
|
jsonPath: z.ZodOptional<z.ZodString>;
|
|
1451
1477
|
successStatus: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1452
1478
|
}, z.core.$strip>>;
|
|
1479
|
+
effect: z.ZodOptional<z.ZodEnum<{
|
|
1480
|
+
read: "read";
|
|
1481
|
+
write: "write";
|
|
1482
|
+
sensitive: "sensitive";
|
|
1483
|
+
}>>;
|
|
1453
1484
|
auth: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1454
1485
|
kind: z.ZodLiteral<"none">;
|
|
1455
1486
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1538,6 +1569,7 @@ export declare const Schema: {
|
|
|
1538
1569
|
pattern?: string | undefined;
|
|
1539
1570
|
enum?: any[] | undefined;
|
|
1540
1571
|
} | undefined;
|
|
1572
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1541
1573
|
allowedHosts?: string[] | undefined;
|
|
1542
1574
|
}, {
|
|
1543
1575
|
name: string;
|
|
@@ -1605,6 +1637,7 @@ export declare const Schema: {
|
|
|
1605
1637
|
pattern?: string | undefined;
|
|
1606
1638
|
enum?: any[] | undefined;
|
|
1607
1639
|
} | undefined;
|
|
1640
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1608
1641
|
allowedHosts?: string[] | undefined;
|
|
1609
1642
|
}>>;
|
|
1610
1643
|
HTTP_ENDPOINT_CONFIG_WRITE: z.ZodPipe<z.ZodObject<{
|
|
@@ -1674,6 +1707,11 @@ export declare const Schema: {
|
|
|
1674
1707
|
jsonPath: z.ZodOptional<z.ZodString>;
|
|
1675
1708
|
successStatus: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1676
1709
|
}, z.core.$strip>>;
|
|
1710
|
+
effect: z.ZodOptional<z.ZodEnum<{
|
|
1711
|
+
read: "read";
|
|
1712
|
+
write: "write";
|
|
1713
|
+
sensitive: "sensitive";
|
|
1714
|
+
}>>;
|
|
1677
1715
|
auth: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1678
1716
|
kind: z.ZodLiteral<"none">;
|
|
1679
1717
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1762,6 +1800,7 @@ export declare const Schema: {
|
|
|
1762
1800
|
pattern?: string | undefined;
|
|
1763
1801
|
enum?: any[] | undefined;
|
|
1764
1802
|
} | undefined;
|
|
1803
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1765
1804
|
allowedHosts?: string[] | undefined;
|
|
1766
1805
|
}, {
|
|
1767
1806
|
name: string;
|
|
@@ -1829,6 +1868,7 @@ export declare const Schema: {
|
|
|
1829
1868
|
pattern?: string | undefined;
|
|
1830
1869
|
enum?: any[] | undefined;
|
|
1831
1870
|
} | undefined;
|
|
1871
|
+
effect?: "read" | "write" | "sensitive" | undefined;
|
|
1832
1872
|
allowedHosts?: string[] | undefined;
|
|
1833
1873
|
}>>;
|
|
1834
1874
|
MCP_PROXY_CONFIG: z.ZodObject<{
|
|
@@ -1911,7 +1951,19 @@ export declare const Schema: {
|
|
|
1911
1951
|
pattern: z.ZodOptional<z.ZodString>;
|
|
1912
1952
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
1913
1953
|
}, z.core.$strip>>;
|
|
1914
|
-
|
|
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>;
|
|
1915
1967
|
CUSTOM_CODE_MANIFEST: z.ZodObject<{
|
|
1916
1968
|
tools: z.ZodArray<z.ZodObject<{
|
|
1917
1969
|
name: z.ZodString;
|
|
@@ -1945,6 +1997,12 @@ export declare const Schema: {
|
|
|
1945
1997
|
pattern: z.ZodOptional<z.ZodString>;
|
|
1946
1998
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
1947
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>>;
|
|
1948
2006
|
}, z.core.$strip>>;
|
|
1949
2007
|
}, z.core.$strip>;
|
|
1950
2008
|
ARTIFACT_CUSTOM_CODE_CREATE_VERSION: z.ZodObject<{
|
|
@@ -1981,6 +2039,12 @@ export declare const Schema: {
|
|
|
1981
2039
|
pattern: z.ZodOptional<z.ZodString>;
|
|
1982
2040
|
enum: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
1983
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>>;
|
|
1984
2048
|
}, z.core.$strip>>;
|
|
1985
2049
|
}, z.core.$strip>;
|
|
1986
2050
|
config: z.ZodOptional<z.ZodObject<{
|
|
@@ -2182,6 +2246,7 @@ export interface McpProxyDiscoveredTool {
|
|
|
2182
2246
|
title?: string;
|
|
2183
2247
|
description?: string;
|
|
2184
2248
|
inputSchema: unknown;
|
|
2249
|
+
annotations?: z.infer<typeof TOOL_ANNOTATIONS>;
|
|
2185
2250
|
}
|
|
2186
2251
|
export interface McpProxyDiscoveredResource {
|
|
2187
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGrB,CAAC;AAyDN,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCpB,CAAC;AAWH,QAAA,MAAM,kBAAkB;;;;;;;;;;iBA+CtB,CAAC;AAqCH,QAAA,MAAM,gBAAgB;;;;;kBAOX,CAAC;AAEZ,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAcpB,CAAC;AAYH,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAE,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
|
|
@@ -1446,6 +1471,7 @@ exports.Schema = {
|
|
|
1446
1471
|
CUSTOM_CODE_CONFIG,
|
|
1447
1472
|
CUSTOM_CODE_CONFIG_WRITE,
|
|
1448
1473
|
CUSTOM_CODE_TOOL,
|
|
1474
|
+
TOOL_ANNOTATIONS,
|
|
1449
1475
|
CUSTOM_CODE_MANIFEST,
|
|
1450
1476
|
ARTIFACT_CUSTOM_CODE_CREATE_VERSION,
|
|
1451
1477
|
ARTIFACT_CUSTOM_CODE_UPLOAD_BUNDLE,
|
|
@@ -6,4 +6,9 @@ export interface SyncableResource {
|
|
|
6
6
|
export type ResourceSyncProvider = 'website' | 'google-drive' | 'one-drive';
|
|
7
7
|
export declare const resourceSyncProvider: (resource: SyncableResource) => ResourceSyncProvider | null;
|
|
8
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;
|
|
9
14
|
//# sourceMappingURL=syncableResource.d.ts.map
|
|
@@ -1 +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"}
|
|
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"}
|
package/dist/syncableResource.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSyncableResource = exports.resourceSyncProvider = void 0;
|
|
3
|
+
exports.isResourceSyncInProgress = exports.isSyncableResource = exports.resourceSyncProvider = void 0;
|
|
4
4
|
const constants_1 = require("./constants");
|
|
5
5
|
const resourceSyncProvider = (resource) => {
|
|
6
6
|
if (resource.parentResourceId)
|
|
@@ -29,3 +29,15 @@ const resourceSyncProvider = (resource) => {
|
|
|
29
29
|
exports.resourceSyncProvider = resourceSyncProvider;
|
|
30
30
|
const isSyncableResource = (resource) => (0, exports.resourceSyncProvider)(resource) !== null;
|
|
31
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;
|