@caelo-cms/mcp-server 0.10.32 → 0.10.34
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-server.d.ts","sourceRoot":"","sources":["../src/admin-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-server.d.ts","sourceRoot":"","sources":["../src/admin-server.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAM/E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;CAChC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,QAMvB,CAAC;AAiFb,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA0I7E"}
|
package/dist/admin-server.js
CHANGED
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
* Local companion tools:
|
|
12
12
|
*
|
|
13
13
|
* - `caelo_upload_images` — uploads local or base64 image references to the media library.
|
|
14
|
-
* - `caelo_open_session` —
|
|
14
|
+
* - `caelo_open_session` — resumes the operator's most recent open work
|
|
15
|
+
* session (issue #620; `newSession: true` opens a fresh one) whose
|
|
15
16
|
* preview branch every subsequent tool call writes to. The session id
|
|
16
17
|
* is held here in process state so the agent doesn't thread it through
|
|
17
18
|
* every call; it also rides the response so a restarted server can
|
|
18
|
-
* resume via `chatSessionId`.
|
|
19
|
+
* resume a specific session via `chatSessionId`.
|
|
19
20
|
* - `caelo_get_context` — the composed site context (module model, tool
|
|
20
21
|
* playbook, staging rules, site memory, skills index) the agent should
|
|
21
22
|
* load once before working. For a checked-in variant, see
|
|
@@ -36,7 +37,7 @@ import { UPLOAD_IMAGES_TOOL, uploadImages } from "./image-upload.js";
|
|
|
36
37
|
*/
|
|
37
38
|
export const ADMIN_MCP_INSTRUCTIONS = [
|
|
38
39
|
"This server edits a Caelo CMS site. Before any other caelo tool:",
|
|
39
|
-
"1. Call caelo_open_session once (pass chatSessionId
|
|
40
|
+
"1. Call caelo_open_session once. It resumes the operator's most recent open session (pass newSession: true only when the operator asks for a fresh one; chatSessionId resumes a specific one). Every write lands on that session's preview branch; nothing reaches the live site until the operator reviews and publishes in the Caelo admin.",
|
|
40
41
|
"2. Call caelo_get_context once and follow it: it carries the site model, tool playbook, staging rules, site memory (brand voice, glossary) and the skills index.",
|
|
41
42
|
"3. Load every skill the context marks ALWAYS APPLIES with load_skill before the work it covers (e.g. before writing any visitor-facing copy).",
|
|
42
43
|
"Tool errors name the next step to take; follow them instead of retrying unchanged.",
|
|
@@ -46,14 +47,17 @@ const openSessionInput = z
|
|
|
46
47
|
title: z.string().min(1).max(200).optional(),
|
|
47
48
|
pageId: z.string().uuid().optional(),
|
|
48
49
|
chatSessionId: z.string().uuid().optional(),
|
|
50
|
+
newSession: z.boolean().optional(),
|
|
49
51
|
})
|
|
50
52
|
.strict();
|
|
51
53
|
const OPEN_SESSION_TOOL = {
|
|
52
54
|
name: "caelo_open_session",
|
|
53
|
-
description: "Open
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"session
|
|
55
|
+
description: "Open the Caelo work session your subsequent tool calls run in. Every write lands on the session's " +
|
|
56
|
+
"preview branch — invisible to the live site until the operator reviews and publishes in the Caelo admin. " +
|
|
57
|
+
"Call this ONCE before any other caelo tool. By default it RESUMES the operator's own most recent open " +
|
|
58
|
+
"session (so earlier unstaged work continues in the same chat); pass newSession: true only when the " +
|
|
59
|
+
"operator wants a separate fresh session, or chatSessionId to resume a specific one. Optional pageId " +
|
|
60
|
+
"resumes (or opens) that page's session.",
|
|
57
61
|
inputSchema: {
|
|
58
62
|
type: "object",
|
|
59
63
|
properties: {
|
|
@@ -61,7 +65,11 @@ const OPEN_SESSION_TOOL = {
|
|
|
61
65
|
pageId: { type: "string", description: "Optional page UUID to bind the session to." },
|
|
62
66
|
chatSessionId: {
|
|
63
67
|
type: "string",
|
|
64
|
-
description: "Resume this
|
|
68
|
+
description: "Resume this specific session instead of the most recent one.",
|
|
69
|
+
},
|
|
70
|
+
newSession: {
|
|
71
|
+
type: "boolean",
|
|
72
|
+
description: "Open a fresh session instead of resuming the most recent open one.",
|
|
65
73
|
},
|
|
66
74
|
},
|
|
67
75
|
},
|
|
@@ -120,7 +128,10 @@ export async function startAdminMcpServer(opts) {
|
|
|
120
128
|
{
|
|
121
129
|
type: "text",
|
|
122
130
|
text: JSON.stringify(currentSession, null, 2) +
|
|
123
|
-
|
|
131
|
+
(currentSession.resumed
|
|
132
|
+
? `\nResumed the operator's session '${currentSession.title}' — its earlier unstaged work continues here. `
|
|
133
|
+
: `\nOpened a new session '${currentSession.title}'. `) +
|
|
134
|
+
"Subsequent caelo tool calls run on its preview branch. " +
|
|
124
135
|
"The operator reviews + publishes in the Caelo admin.",
|
|
125
136
|
},
|
|
126
137
|
],
|
package/dist/admin-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-server.js","sourceRoot":"","sources":["../src/admin-server.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC
|
|
1
|
+
{"version":3,"file":"admin-server.js","sourceRoot":"","sources":["../src/admin-server.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,gBAA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AAW,CAAC,IAAY;IAI/B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAC9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caelo-cms/mcp-server",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.34",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"description": "MCP servers for Caelo CMS: `caelo_chat` (talk to Caelo's own AI) and the admin-scoped Power-MCP (the full chat-runner tool catalogue, driven by your own agent). Lets Claude Code (or any MCP-aware client) drive a Caelo install from outside the browser.",
|