@showly/mcp-server 0.4.4 → 0.4.6
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/cli.d.ts +11 -0
- package/dist/cli.js +47 -0
- package/manifest.json +1 -1
- package/package.json +3 -3
package/dist/cli.d.ts
CHANGED
|
@@ -130,6 +130,17 @@ export declare function buildLoginPrompt(input: {
|
|
|
130
130
|
userCode: string;
|
|
131
131
|
expiresAt: Date;
|
|
132
132
|
}): string;
|
|
133
|
+
/**
|
|
134
|
+
* Extra control-plane instructions for agents that launched the device flow.
|
|
135
|
+
*
|
|
136
|
+
* The human-facing approval block is intentionally host-neutral and is often
|
|
137
|
+
* relayed verbatim. Remote agent hosts need one additional instruction that is
|
|
138
|
+
* meant for the executor, not the human: keep ownership of the foreground
|
|
139
|
+
* process and poll it until it exits. Without this, an agent can accurately
|
|
140
|
+
* relay the code, end its turn, and strand the post-approval work even though
|
|
141
|
+
* the CLI itself later receives and stores the credential successfully.
|
|
142
|
+
*/
|
|
143
|
+
export declare function buildRemoteAgentWaitInstruction(target: LoginTarget): string | null;
|
|
133
144
|
/** Claude Code reads a `headers` map on an http MCP server entry. */
|
|
134
145
|
export declare function buildClaudeCodeAuthSnippet(opts: {
|
|
135
146
|
url: string;
|
package/dist/cli.js
CHANGED
|
@@ -454,6 +454,29 @@ export function buildLoginPrompt(input) {
|
|
|
454
454
|
"connected until you approve, and the command can be run again.",
|
|
455
455
|
].join("\n");
|
|
456
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* Extra control-plane instructions for agents that launched the device flow.
|
|
459
|
+
*
|
|
460
|
+
* The human-facing approval block is intentionally host-neutral and is often
|
|
461
|
+
* relayed verbatim. Remote agent hosts need one additional instruction that is
|
|
462
|
+
* meant for the executor, not the human: keep ownership of the foreground
|
|
463
|
+
* process and poll it until it exits. Without this, an agent can accurately
|
|
464
|
+
* relay the code, end its turn, and strand the post-approval work even though
|
|
465
|
+
* the CLI itself later receives and stores the credential successfully.
|
|
466
|
+
*/
|
|
467
|
+
export function buildRemoteAgentWaitInstruction(target) {
|
|
468
|
+
if (target !== "openclaw" && target !== "hermes")
|
|
469
|
+
return null;
|
|
470
|
+
return [
|
|
471
|
+
"[AGENT EXECUTOR - REQUIRED]",
|
|
472
|
+
"The approval block above is an intermediate update, never the final response.",
|
|
473
|
+
"Keep this exact foreground process/session handle alive and repeatedly use your host's wait/poll action until the command exits. No new output means it is still waiting.",
|
|
474
|
+
"Do not append shell `&`, use nohup/disown, redirect this command into a detached job, or close the task that owns its session handle.",
|
|
475
|
+
"After relaying the approval URL and code, your next action in the same turn MUST be another wait/poll call on this handle. A text-only response such as `I'll keep an eye on it` ends the workflow and is a failure.",
|
|
476
|
+
"Do not ask the human to message you after approval, and do not start another login while this process is alive.",
|
|
477
|
+
"Only a terminal exit from this login command permits a final response.",
|
|
478
|
+
].join("\n");
|
|
479
|
+
}
|
|
457
480
|
/** Claude Code reads a `headers` map on an http MCP server entry. */
|
|
458
481
|
export function buildClaudeCodeAuthSnippet(opts) {
|
|
459
482
|
return {
|
|
@@ -914,6 +937,9 @@ export async function performLogin(opts, deps = {}) {
|
|
|
914
937
|
userCode: started.user_code,
|
|
915
938
|
expiresAt,
|
|
916
939
|
}));
|
|
940
|
+
const remoteAgentWaitInstruction = buildRemoteAgentWaitInstruction(opts.target);
|
|
941
|
+
if (remoteAgentWaitInstruction)
|
|
942
|
+
log(remoteAgentWaitInstruction);
|
|
917
943
|
const token = await pollForDeviceToken({
|
|
918
944
|
apiUrl,
|
|
919
945
|
deviceCode: started.device_code,
|
|
@@ -1143,6 +1169,27 @@ export function buildLoginOutput(result, opts = {}) {
|
|
|
1143
1169
|
line: "That line is the credential itself. It is printed here once, and kept out of the config file so the file stays safe to commit.",
|
|
1144
1170
|
});
|
|
1145
1171
|
}
|
|
1172
|
+
if (result.target === "openclaw") {
|
|
1173
|
+
lines.push({
|
|
1174
|
+
stream: "err",
|
|
1175
|
+
line: [
|
|
1176
|
+
"[AGENT EXECUTOR - REQUIRED] Stay in this task: run `openclaw mcp reload`, rediscover Showly's native tools, then make real `list_projects` and `list_sites` calls.",
|
|
1177
|
+
"Do not stop at Connected or tell the human to start a new task while this task can still run. A saved config or successful doctor/probe is not completion.",
|
|
1178
|
+
"If the host already ended the task while approval was pending, use one fresh task as a fallback; do not repeat login.",
|
|
1179
|
+
].join("\n"),
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
if (result.target === "hermes") {
|
|
1183
|
+
lines.push({
|
|
1184
|
+
stream: "err",
|
|
1185
|
+
line: [
|
|
1186
|
+
"[AGENT EXECUTOR - REQUIRED] Activate the live Hermes MCP inventory, then verify with native `mcp__showly__list_projects` and `mcp__showly__list_sites` calls.",
|
|
1187
|
+
"Use `/reload-mcp` only when the host exposes it as a real control command. Do not tell the human to run it and do not send `/reload-mcp` as an ordinary chat/model prompt.",
|
|
1188
|
+
"On managed MyClaw, restart the Hermes instance/container once with the host control, open a fresh task, and make the native calls there. A new task before that restart can reuse the stale worker. Do not repeat login.",
|
|
1189
|
+
"`hermes mcp test` or raw JSON-RPC proves the credential and server, not that the running agent loaded the tools.",
|
|
1190
|
+
].join("\n"),
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1146
1193
|
if (result.expiresAt) {
|
|
1147
1194
|
lines.push({
|
|
1148
1195
|
stream: "err",
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://showly.ai/schemas/skill-manifest-v1.json",
|
|
3
3
|
"name": "showly",
|
|
4
4
|
"displayName": "Showly",
|
|
5
|
-
"version": "0.4.
|
|
5
|
+
"version": "0.4.6",
|
|
6
6
|
"description": "Deploy and manage Showly sites from inside Claude Code / Codex.",
|
|
7
7
|
"homepage": "https://showly.ai/docs/mcp/overview",
|
|
8
8
|
"publisher": "Showly",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@showly/mcp-server",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Connect Claude Code / Codex to the Showly MCP server — preview and deploy sites from your agent.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"claude-code-skill": {
|
|
54
54
|
"name": "showly",
|
|
55
|
-
"version": "0.4.
|
|
55
|
+
"version": "0.4.6",
|
|
56
56
|
"description": "Deploy and manage Showly sites from inside Claude Code.",
|
|
57
57
|
"mcp-server": {
|
|
58
58
|
"url-env": "SHOWLY_MCP_URL",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"codex-plugin": {
|
|
67
67
|
"name": "showly",
|
|
68
|
-
"version": "0.4.
|
|
68
|
+
"version": "0.4.6",
|
|
69
69
|
"type": "mcp-server",
|
|
70
70
|
"manifest": "manifest.json"
|
|
71
71
|
},
|