@caelo-cms/mcp-server 0.10.55 → 0.10.57
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/LICENSE +373 -0
- package/README.md +7 -0
- package/dist/admin-server.d.ts +1 -15
- package/dist/admin-server.d.ts.map +1 -1
- package/dist/admin-server.js +72 -302
- package/dist/admin-server.js.map +1 -1
- package/dist/admin.js +7 -8
- package/dist/admin.js.map +1 -1
- package/dist/chat-bridge.d.ts +1 -1
- package/dist/chat-bridge.d.ts.map +1 -1
- package/dist/image-upload.d.ts +2 -75
- package/dist/image-upload.d.ts.map +1 -1
- package/dist/image-upload.js +40 -134
- package/dist/image-upload.js.map +1 -1
- package/dist/index.js +38 -30
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +0 -6
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +24 -259
- package/dist/server.js.map +1 -1
- package/dist/surfaces/admin-surface.d.ts +106 -0
- package/dist/surfaces/admin-surface.d.ts.map +1 -0
- package/dist/surfaces/admin-surface.js +183 -0
- package/dist/surfaces/admin-surface.js.map +1 -0
- package/dist/surfaces/chat-surface.d.ts +48 -0
- package/dist/surfaces/chat-surface.d.ts.map +1 -0
- package/dist/surfaces/chat-surface.js +190 -0
- package/dist/surfaces/chat-surface.js.map +1 -0
- package/dist/surfaces/index.d.ts +15 -0
- package/dist/surfaces/index.d.ts.map +1 -0
- package/dist/surfaces/index.js +15 -0
- package/dist/surfaces/index.js.map +1 -0
- package/dist/surfaces/upload.d.ts +32 -0
- package/dist/surfaces/upload.d.ts.map +1 -0
- package/dist/surfaces/upload.js +58 -0
- package/dist/surfaces/upload.js.map +1 -0
- package/dist/tool-definitions.d.ts +465 -0
- package/dist/tool-definitions.d.ts.map +1 -0
- package/dist/tool-definitions.js +256 -0
- package/dist/tool-definitions.js.map +1 -0
- package/dist/unconfigured.d.ts +26 -0
- package/dist/unconfigured.d.ts.map +1 -0
- package/dist/unconfigured.js +82 -0
- package/dist/unconfigured.js.map +1 -0
- package/package.json +10 -1
- package/power-catalogue.json +8030 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** What one stored image is described by. */
|
|
2
|
+
export interface StoreImageMeta {
|
|
3
|
+
readonly filename: string;
|
|
4
|
+
readonly alt?: string;
|
|
5
|
+
readonly reference?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface UploadImagesDeps {
|
|
8
|
+
/**
|
|
9
|
+
* Read a local file (at most {@link MAX_IMAGE_BYTES} + 1 bytes). Absent on
|
|
10
|
+
* a remote connection: `filePath` is then refused with `filePathRefusal`.
|
|
11
|
+
*/
|
|
12
|
+
readonly readFile?: (path: string) => Promise<Uint8Array>;
|
|
13
|
+
/** Why `filePath` is refused when `readFile` is absent. */
|
|
14
|
+
readonly filePathRefusal?: string;
|
|
15
|
+
/** Persist the bytes; returns the stored asset's id and sniffed mime. */
|
|
16
|
+
readonly store: (bytes: Uint8Array, meta: StoreImageMeta) => Promise<{
|
|
17
|
+
assetId: unknown;
|
|
18
|
+
mime: unknown;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
/** The tool result: one JSON text block with per-file results (an error only when all failed). */
|
|
22
|
+
export interface UploadImagesResult {
|
|
23
|
+
readonly isError?: boolean;
|
|
24
|
+
readonly content: Array<{
|
|
25
|
+
type: "text";
|
|
26
|
+
text: string;
|
|
27
|
+
}>;
|
|
28
|
+
readonly [key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
/** Upload caller-selected images, returning failures individually without dropping successes. */
|
|
31
|
+
export declare function uploadImagesWith(input: unknown, deps: UploadImagesDeps): Promise<UploadImagesResult>;
|
|
32
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/surfaces/upload.ts"],"names":[],"mappings":"AAaA,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC1D,2DAA2D;IAC3D,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,CACd,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,cAAc,KACjB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACnD;AAED,kGAAkG;AAClG,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAOD,iGAAiG;AACjG,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAmD7B"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
import { MAX_IMAGE_BYTES, uploadedImageSchema, uploadImagesInput } from "../tool-definitions.js";
|
|
3
|
+
/** The base name of a path, on either separator (no node:path in this module). */
|
|
4
|
+
function baseName(path) {
|
|
5
|
+
return path.split(/[\\/]/).filter(Boolean).at(-1) ?? path;
|
|
6
|
+
}
|
|
7
|
+
/** Upload caller-selected images, returning failures individually without dropping successes. */
|
|
8
|
+
export async function uploadImagesWith(input, deps) {
|
|
9
|
+
const parsed = uploadImagesInput.parse(input);
|
|
10
|
+
const results = [];
|
|
11
|
+
for (const [index, image] of parsed.images.entries()) {
|
|
12
|
+
try {
|
|
13
|
+
let bytes;
|
|
14
|
+
if (image.filePath) {
|
|
15
|
+
if (!deps.readFile) {
|
|
16
|
+
throw new Error(deps.filePathRefusal ??
|
|
17
|
+
"filePath is not available on this connection — send the image as base64.");
|
|
18
|
+
}
|
|
19
|
+
bytes = await deps.readFile(image.filePath);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
if (image.base64 === undefined)
|
|
23
|
+
throw new Error("Missing image bytes");
|
|
24
|
+
bytes = Buffer.from(image.base64, "base64");
|
|
25
|
+
}
|
|
26
|
+
if (!bytes.length || bytes.length > MAX_IMAGE_BYTES)
|
|
27
|
+
throw new Error("Image must be at most 5 MiB and non-empty");
|
|
28
|
+
const filename = image.filename ?? (image.filePath ? baseName(image.filePath) : "image");
|
|
29
|
+
const stored = await deps.store(bytes, {
|
|
30
|
+
filename,
|
|
31
|
+
...(image.alt ? { alt: image.alt } : {}),
|
|
32
|
+
...(image.reference ? { reference: true } : {}),
|
|
33
|
+
});
|
|
34
|
+
const attachment = uploadedImageSchema.parse({
|
|
35
|
+
assetId: stored.assetId,
|
|
36
|
+
mime: stored.mime,
|
|
37
|
+
alt: image.alt ?? filename,
|
|
38
|
+
});
|
|
39
|
+
results.push({ index, attachment });
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
results.push({ index, error: e instanceof Error ? e.message : String(e) });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
...(results.every((r) => "error" in r) ? { isError: true } : {}),
|
|
47
|
+
content: [
|
|
48
|
+
{
|
|
49
|
+
type: "text",
|
|
50
|
+
text: JSON.stringify({
|
|
51
|
+
results,
|
|
52
|
+
attachments: results.flatMap((r) => ("attachment" in r ? [r.attachment] : [])),
|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AAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChE,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,OAAO;oBACP,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;iBAC/E,CAAC;aACH;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP tool definitions, input schemas and `instructions` of Caelo's two
|
|
3
|
+
* MCP surfaces — ONE copy, used by the stdio shims in this package and by
|
|
4
|
+
* the admin's remote Streamable HTTP endpoints (issue #806). A connecting
|
|
5
|
+
* agent must see the same names, schemas and instructions whichever way it
|
|
6
|
+
* reaches the site; editing them here changes both.
|
|
7
|
+
*
|
|
8
|
+
* Pure module (zod only): no transport, no filesystem, no network.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
/**
|
|
12
|
+
* MCP `instructions` for the chat-scope server (#552), injected into the
|
|
13
|
+
* connecting agent's context so it uses caelo_chat as a conversation with
|
|
14
|
+
* the site's own agent rather than a one-shot command.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CHAT_MCP_INSTRUCTIONS: string;
|
|
17
|
+
/**
|
|
18
|
+
* MCP `instructions` for the admin server (#552). Clients such as Claude
|
|
19
|
+
* Code put this into the agent's context on connect, so a freshly
|
|
20
|
+
* connected agent knows the session protocol without the operator
|
|
21
|
+
* pasting anything: without a session every write fails, without the
|
|
22
|
+
* context it works without the site's rules and brand voice.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ADMIN_MCP_INSTRUCTIONS: string;
|
|
25
|
+
/** Per-image size cap (matches the admin's chat-attachment cap). */
|
|
26
|
+
export declare const MAX_IMAGE_BYTES: number;
|
|
27
|
+
/** Uploaded media references accepted by caelo_chat; never accept object-store keys. */
|
|
28
|
+
export declare const uploadedImageSchema: z.ZodObject<{
|
|
29
|
+
assetId: z.ZodString;
|
|
30
|
+
mime: z.ZodEnum<{
|
|
31
|
+
"image/png": "image/png";
|
|
32
|
+
"image/jpeg": "image/jpeg";
|
|
33
|
+
"image/webp": "image/webp";
|
|
34
|
+
"image/gif": "image/gif";
|
|
35
|
+
}>;
|
|
36
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
/** A bounded batch; each file has its own success/error result for safe retries. */
|
|
39
|
+
export declare const uploadImagesInput: z.ZodObject<{
|
|
40
|
+
images: z.ZodArray<z.ZodObject<{
|
|
41
|
+
filePath: z.ZodOptional<z.ZodString>;
|
|
42
|
+
base64: z.ZodOptional<z.ZodString>;
|
|
43
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
44
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
45
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
}, z.core.$strict>>;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
/** Exposed in both stdio catalogues, including chat-scoped connections. */
|
|
49
|
+
export declare const UPLOAD_IMAGES_TOOL: {
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: "object";
|
|
54
|
+
required: string[];
|
|
55
|
+
additionalProperties: boolean;
|
|
56
|
+
properties: {
|
|
57
|
+
images: {
|
|
58
|
+
type: string;
|
|
59
|
+
minItems: number;
|
|
60
|
+
maxItems: number;
|
|
61
|
+
items: {
|
|
62
|
+
type: string;
|
|
63
|
+
additionalProperties: boolean;
|
|
64
|
+
properties: {
|
|
65
|
+
filePath: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
base64: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
filename: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
alt: {
|
|
78
|
+
type: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
reference: {
|
|
82
|
+
type: string;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
oneOf: {
|
|
87
|
+
required: string[];
|
|
88
|
+
}[];
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* The same tool over a remote connection (#806): identical name and schema;
|
|
96
|
+
* the description says what differs — the server runs in the Caelo admin,
|
|
97
|
+
* so it cannot read files on the agent's machine and only base64 works.
|
|
98
|
+
*/
|
|
99
|
+
export declare const REMOTE_UPLOAD_IMAGES_TOOL: {
|
|
100
|
+
name: string;
|
|
101
|
+
description: string;
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: "object";
|
|
104
|
+
required: string[];
|
|
105
|
+
additionalProperties: boolean;
|
|
106
|
+
properties: {
|
|
107
|
+
images: {
|
|
108
|
+
type: string;
|
|
109
|
+
minItems: number;
|
|
110
|
+
maxItems: number;
|
|
111
|
+
items: {
|
|
112
|
+
type: string;
|
|
113
|
+
additionalProperties: boolean;
|
|
114
|
+
properties: {
|
|
115
|
+
filePath: {
|
|
116
|
+
type: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
base64: {
|
|
120
|
+
type: string;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
filename: {
|
|
124
|
+
type: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
alt: {
|
|
128
|
+
type: string;
|
|
129
|
+
description: string;
|
|
130
|
+
};
|
|
131
|
+
reference: {
|
|
132
|
+
type: string;
|
|
133
|
+
description: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
oneOf: {
|
|
137
|
+
required: string[];
|
|
138
|
+
}[];
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export declare const caeloChatInputSchema: z.ZodObject<{
|
|
145
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
146
|
+
assetId: z.ZodString;
|
|
147
|
+
mime: z.ZodEnum<{
|
|
148
|
+
"image/png": "image/png";
|
|
149
|
+
"image/jpeg": "image/jpeg";
|
|
150
|
+
"image/webp": "image/webp";
|
|
151
|
+
"image/gif": "image/gif";
|
|
152
|
+
}>;
|
|
153
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, z.core.$strict>>>;
|
|
155
|
+
message: z.ZodString;
|
|
156
|
+
chatSessionId: z.ZodOptional<z.ZodString>;
|
|
157
|
+
pageId: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strict>;
|
|
159
|
+
export type CaeloChatInput = z.infer<typeof caeloChatInputSchema>;
|
|
160
|
+
export declare const CAELO_CHAT_TOOL: {
|
|
161
|
+
name: string;
|
|
162
|
+
description: string;
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: "object";
|
|
165
|
+
required: string[];
|
|
166
|
+
properties: {
|
|
167
|
+
attachments: {
|
|
168
|
+
type: string;
|
|
169
|
+
maxItems: number;
|
|
170
|
+
description: string;
|
|
171
|
+
items: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
172
|
+
assetId: z.ZodString;
|
|
173
|
+
mime: z.ZodEnum<{
|
|
174
|
+
"image/png": "image/png";
|
|
175
|
+
"image/jpeg": "image/jpeg";
|
|
176
|
+
"image/webp": "image/webp";
|
|
177
|
+
"image/gif": "image/gif";
|
|
178
|
+
}>;
|
|
179
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
180
|
+
}, z.core.$strict>>;
|
|
181
|
+
};
|
|
182
|
+
message: {
|
|
183
|
+
type: string;
|
|
184
|
+
description: string;
|
|
185
|
+
};
|
|
186
|
+
chatSessionId: {
|
|
187
|
+
type: string;
|
|
188
|
+
description: string;
|
|
189
|
+
};
|
|
190
|
+
pageId: {
|
|
191
|
+
type: string;
|
|
192
|
+
description: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
export declare const chatAwaitApprovalInput: z.ZodObject<{
|
|
198
|
+
chatSessionId: z.ZodString;
|
|
199
|
+
}, z.core.$strict>;
|
|
200
|
+
/** Issue #658 — keep waiting on the approval cards a caelo_chat turn paused on. */
|
|
201
|
+
export declare const CHAT_AWAIT_APPROVAL_TOOL: {
|
|
202
|
+
name: string;
|
|
203
|
+
description: string;
|
|
204
|
+
inputSchema: {
|
|
205
|
+
type: "object";
|
|
206
|
+
properties: {
|
|
207
|
+
chatSessionId: {
|
|
208
|
+
type: string;
|
|
209
|
+
description: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
required: string[];
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
export declare const openSessionInput: z.ZodObject<{
|
|
216
|
+
title: z.ZodOptional<z.ZodString>;
|
|
217
|
+
pageId: z.ZodOptional<z.ZodString>;
|
|
218
|
+
chatSessionId: z.ZodOptional<z.ZodString>;
|
|
219
|
+
newSession: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
export type OpenSessionInput = z.infer<typeof openSessionInput>;
|
|
222
|
+
export declare const OPEN_SESSION_TOOL: {
|
|
223
|
+
name: string;
|
|
224
|
+
description: string;
|
|
225
|
+
inputSchema: {
|
|
226
|
+
type: "object";
|
|
227
|
+
properties: {
|
|
228
|
+
title: {
|
|
229
|
+
type: string;
|
|
230
|
+
description: string;
|
|
231
|
+
};
|
|
232
|
+
pageId: {
|
|
233
|
+
type: string;
|
|
234
|
+
description: string;
|
|
235
|
+
};
|
|
236
|
+
chatSessionId: {
|
|
237
|
+
type: string;
|
|
238
|
+
description: string;
|
|
239
|
+
};
|
|
240
|
+
newSession: {
|
|
241
|
+
type: string;
|
|
242
|
+
description: string;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
export declare const adminAwaitApprovalInput: z.ZodObject<{
|
|
248
|
+
proposalId: z.ZodString;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
/** Issue #658 — keep waiting for a decision after a gated call's wait timed out. */
|
|
251
|
+
export declare const ADMIN_AWAIT_APPROVAL_TOOL: {
|
|
252
|
+
name: string;
|
|
253
|
+
description: string;
|
|
254
|
+
inputSchema: {
|
|
255
|
+
type: "object";
|
|
256
|
+
properties: {
|
|
257
|
+
proposalId: {
|
|
258
|
+
type: string;
|
|
259
|
+
description: string;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
required: string[];
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
export declare const GET_CONTEXT_TOOL: {
|
|
266
|
+
name: string;
|
|
267
|
+
description: string;
|
|
268
|
+
inputSchema: {
|
|
269
|
+
type: "object";
|
|
270
|
+
properties: {};
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* The chat server's whole tool list (stdio flavour). Static, so it also
|
|
275
|
+
* serves the credential-less listing MCP directories inspect (#841); the
|
|
276
|
+
* remote surface swaps in its own upload tool.
|
|
277
|
+
*/
|
|
278
|
+
export declare const CHAT_TOOLS: readonly [{
|
|
279
|
+
name: string;
|
|
280
|
+
description: string;
|
|
281
|
+
inputSchema: {
|
|
282
|
+
type: "object";
|
|
283
|
+
required: string[];
|
|
284
|
+
additionalProperties: boolean;
|
|
285
|
+
properties: {
|
|
286
|
+
images: {
|
|
287
|
+
type: string;
|
|
288
|
+
minItems: number;
|
|
289
|
+
maxItems: number;
|
|
290
|
+
items: {
|
|
291
|
+
type: string;
|
|
292
|
+
additionalProperties: boolean;
|
|
293
|
+
properties: {
|
|
294
|
+
filePath: {
|
|
295
|
+
type: string;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
298
|
+
base64: {
|
|
299
|
+
type: string;
|
|
300
|
+
description: string;
|
|
301
|
+
};
|
|
302
|
+
filename: {
|
|
303
|
+
type: string;
|
|
304
|
+
description: string;
|
|
305
|
+
};
|
|
306
|
+
alt: {
|
|
307
|
+
type: string;
|
|
308
|
+
description: string;
|
|
309
|
+
};
|
|
310
|
+
reference: {
|
|
311
|
+
type: string;
|
|
312
|
+
description: string;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
oneOf: {
|
|
316
|
+
required: string[];
|
|
317
|
+
}[];
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
}, {
|
|
323
|
+
name: string;
|
|
324
|
+
description: string;
|
|
325
|
+
inputSchema: {
|
|
326
|
+
type: "object";
|
|
327
|
+
properties: {
|
|
328
|
+
chatSessionId: {
|
|
329
|
+
type: string;
|
|
330
|
+
description: string;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
required: string[];
|
|
334
|
+
};
|
|
335
|
+
}, {
|
|
336
|
+
name: string;
|
|
337
|
+
description: string;
|
|
338
|
+
inputSchema: {
|
|
339
|
+
type: "object";
|
|
340
|
+
required: string[];
|
|
341
|
+
properties: {
|
|
342
|
+
attachments: {
|
|
343
|
+
type: string;
|
|
344
|
+
maxItems: number;
|
|
345
|
+
description: string;
|
|
346
|
+
items: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
347
|
+
assetId: z.ZodString;
|
|
348
|
+
mime: z.ZodEnum<{
|
|
349
|
+
"image/png": "image/png";
|
|
350
|
+
"image/jpeg": "image/jpeg";
|
|
351
|
+
"image/webp": "image/webp";
|
|
352
|
+
"image/gif": "image/gif";
|
|
353
|
+
}>;
|
|
354
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strict>>;
|
|
356
|
+
};
|
|
357
|
+
message: {
|
|
358
|
+
type: string;
|
|
359
|
+
description: string;
|
|
360
|
+
};
|
|
361
|
+
chatSessionId: {
|
|
362
|
+
type: string;
|
|
363
|
+
description: string;
|
|
364
|
+
};
|
|
365
|
+
pageId: {
|
|
366
|
+
type: string;
|
|
367
|
+
description: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
}];
|
|
372
|
+
/**
|
|
373
|
+
* The tools Power-MCP adds in front of the admin's catalogue (stdio
|
|
374
|
+
* flavour) — also the head of the credential-less listing (#841).
|
|
375
|
+
*/
|
|
376
|
+
export declare const ADMIN_LOCAL_TOOLS: readonly [{
|
|
377
|
+
name: string;
|
|
378
|
+
description: string;
|
|
379
|
+
inputSchema: {
|
|
380
|
+
type: "object";
|
|
381
|
+
required: string[];
|
|
382
|
+
additionalProperties: boolean;
|
|
383
|
+
properties: {
|
|
384
|
+
images: {
|
|
385
|
+
type: string;
|
|
386
|
+
minItems: number;
|
|
387
|
+
maxItems: number;
|
|
388
|
+
items: {
|
|
389
|
+
type: string;
|
|
390
|
+
additionalProperties: boolean;
|
|
391
|
+
properties: {
|
|
392
|
+
filePath: {
|
|
393
|
+
type: string;
|
|
394
|
+
description: string;
|
|
395
|
+
};
|
|
396
|
+
base64: {
|
|
397
|
+
type: string;
|
|
398
|
+
description: string;
|
|
399
|
+
};
|
|
400
|
+
filename: {
|
|
401
|
+
type: string;
|
|
402
|
+
description: string;
|
|
403
|
+
};
|
|
404
|
+
alt: {
|
|
405
|
+
type: string;
|
|
406
|
+
description: string;
|
|
407
|
+
};
|
|
408
|
+
reference: {
|
|
409
|
+
type: string;
|
|
410
|
+
description: string;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
oneOf: {
|
|
414
|
+
required: string[];
|
|
415
|
+
}[];
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
}, {
|
|
421
|
+
name: string;
|
|
422
|
+
description: string;
|
|
423
|
+
inputSchema: {
|
|
424
|
+
type: "object";
|
|
425
|
+
properties: {
|
|
426
|
+
title: {
|
|
427
|
+
type: string;
|
|
428
|
+
description: string;
|
|
429
|
+
};
|
|
430
|
+
pageId: {
|
|
431
|
+
type: string;
|
|
432
|
+
description: string;
|
|
433
|
+
};
|
|
434
|
+
chatSessionId: {
|
|
435
|
+
type: string;
|
|
436
|
+
description: string;
|
|
437
|
+
};
|
|
438
|
+
newSession: {
|
|
439
|
+
type: string;
|
|
440
|
+
description: string;
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
}, {
|
|
445
|
+
name: string;
|
|
446
|
+
description: string;
|
|
447
|
+
inputSchema: {
|
|
448
|
+
type: "object";
|
|
449
|
+
properties: {};
|
|
450
|
+
};
|
|
451
|
+
}, {
|
|
452
|
+
name: string;
|
|
453
|
+
description: string;
|
|
454
|
+
inputSchema: {
|
|
455
|
+
type: "object";
|
|
456
|
+
properties: {
|
|
457
|
+
proposalId: {
|
|
458
|
+
type: string;
|
|
459
|
+
description: string;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
required: string[];
|
|
463
|
+
};
|
|
464
|
+
}];
|
|
465
|
+
//# sourceMappingURL=tool-definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definitions.d.ts","sourceRoot":"","sources":["../src/tool-definitions.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAKtB,CAAC;AAEb;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,QAQvB,CAAC;AAIb,oEAAoE;AACpE,eAAO,MAAM,eAAe,QAAkB,CAAC;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