@agentmesh-md/mcp-server 0.3.7 → 0.3.9
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/README.md +25 -14
- package/dist/agy-config.js +22 -57
- package/dist/agy-connect.js +67 -10
- package/dist/agy-hooks.js +79 -0
- package/dist/agy-monitor.js +207 -0
- package/dist/agy-proxy.js +41 -11
- package/dist/agy-storage.js +8 -11
- package/dist/client.js +8 -22
- package/dist/connect.js +0 -5
- package/dist/context.js +6 -0
- package/dist/contract.js +2 -0
- package/dist/index.js +13 -0
- package/dist/legacy.js +1 -1
- package/dist/plugin-proxy.js +7 -2
- package/dist/schemas.js +1 -1
- package/dist/server.js +11 -3
- package/dist/terminal-diagnostic.js +1 -1
- package/dist/tools.js +17 -7
- package/package.json +1 -1
- package/plugin-marketplace/plugins/agentmesh/.claude-plugin/plugin.json +2 -2
- package/plugin-marketplace/plugins/agentmesh/README.md +3 -2
- package/plugin-marketplace/plugins/agentmesh/mcp.json +1 -1
- package/plugin-marketplace/plugins/agentmesh/monitors/monitors.json +2 -2
- package/plugin-marketplace/plugins/agentmesh/plugin.json +1 -1
- package/plugin-marketplace/plugins/agentmesh/release.json +1 -1
- package/plugin-marketplace/plugins/agentmesh/server/lib/agentmesh-mcp.js +597 -146
- package/plugin-marketplace/plugins/agentmesh/server/schemas/tools.json +246 -8
- package/schemas/tools.json +246 -8
package/dist/tools.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { terminalDiagnostic } from './terminal-diagnostic.js';
|
|
1
2
|
/**
|
|
2
3
|
* The 9 AgentMesh MCP tools: argument mapping to `/api/v1` + response
|
|
3
4
|
* shaping into MCP `CallToolResult`s.
|
|
@@ -34,7 +35,7 @@ import { callApi } from "./client.js";
|
|
|
34
35
|
import { HOSTED_TOOL_NAMES, validateOutput } from "./schemas.js";
|
|
35
36
|
import { formatToolErrorText } from "./errors.js";
|
|
36
37
|
import { redact, redactDeep } from "./redact.js";
|
|
37
|
-
import { runWithWakeAction } from "./context.js";
|
|
38
|
+
import { runWithWakeAction, runWithSelectedWorkspace } from "./context.js";
|
|
38
39
|
// ---- small, defensive arg readers ----
|
|
39
40
|
function stringArg(args, key) {
|
|
40
41
|
const value = args[key];
|
|
@@ -124,8 +125,8 @@ async function listAsks(args, signal) {
|
|
|
124
125
|
async function getMyInstructions(_args, signal) {
|
|
125
126
|
return finish("get_my_instructions", await callApi({ method: "GET", path: "/me/instructions", signal }));
|
|
126
127
|
}
|
|
127
|
-
async function whoami(
|
|
128
|
-
const result = await callApi({ method: "GET", path: "/me", signal });
|
|
128
|
+
async function whoami(args, signal) {
|
|
129
|
+
const result = await callApi({ method: "GET", path: "/me", query: args.include_memberships === true ? { include_memberships: 1 } : undefined, signal });
|
|
129
130
|
return finish("whoami", result);
|
|
130
131
|
}
|
|
131
132
|
async function postMessage(args, signal) {
|
|
@@ -484,11 +485,20 @@ export { TOOL_ANNOTATIONS } from './tool-annotations.js';
|
|
|
484
485
|
export const TOOLS = Object.fromEntries(Object.entries(REGISTRY).map(([name, tool]) => [name, {
|
|
485
486
|
...tool,
|
|
486
487
|
async run(args, signal) {
|
|
487
|
-
const { wake_context: value, ...body } = args;
|
|
488
|
+
const { wake_context: value, workspace_id: selected, ...body } = args;
|
|
489
|
+
const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
490
|
+
if (Object.hasOwn(args, "workspace_id") && (name.startsWith("terminal_wake_") || typeof selected !== "string" || !uuid.test(selected))) {
|
|
491
|
+
process.stderr.write(terminalDiagnostic(new TypeError(), "tools.js", "run") + "\n");
|
|
492
|
+
return errorResult({ ok: false, code: "VALIDATION", message: "workspace_id must be a UUID on an ordinary tool; terminal wakes are home-only", status: 400 });
|
|
493
|
+
}
|
|
494
|
+
if (name === "whoami" && Object.hasOwn(args, "include_memberships") && typeof body.include_memberships !== "boolean") {
|
|
495
|
+
process.stderr.write(terminalDiagnostic(new TypeError(), "tools.js", "run") + "\n");
|
|
496
|
+
return errorResult({ ok: false, code: "VALIDATION", message: "include_memberships must be a boolean", status: 400 });
|
|
497
|
+
}
|
|
498
|
+
const run = () => runWithSelectedWorkspace(typeof selected === "string" ? selected.toLowerCase() : undefined, () => tool.run(body, signal));
|
|
488
499
|
if (value === undefined)
|
|
489
|
-
return
|
|
500
|
+
return run();
|
|
490
501
|
const context = value;
|
|
491
|
-
const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
492
502
|
if (!context || typeof context !== "object" || Array.isArray(context)
|
|
493
503
|
|| Object.keys(context).some(k => !["event_id", "claim_id", "action_id"].includes(k))
|
|
494
504
|
|| typeof context.event_id !== "string" || !uuid.test(context.event_id)
|
|
@@ -497,7 +507,7 @@ export const TOOLS = Object.fromEntries(Object.entries(REGISTRY).map(([name, too
|
|
|
497
507
|
|| TOOL_ANNOTATIONS[tool.name].readOnlyHint || name.startsWith("terminal_wake_")) {
|
|
498
508
|
return errorResult({ ok: false, code: "VALIDATION", message: "wake_context requires valid event, claim and stable action IDs on a business write", status: 400 });
|
|
499
509
|
}
|
|
500
|
-
return runWithWakeAction(context,
|
|
510
|
+
return runWithWakeAction(context, run);
|
|
501
511
|
},
|
|
502
512
|
}]));
|
|
503
513
|
function isToolName(name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentmesh-md/mcp-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"mcpName": "md.agentmesh/agentmesh",
|
|
5
5
|
"description": "AgentMesh MCP server — board/channels/asks tools over stdio (local) and loopback HTTP; Bearer auth against the AgentMesh API",
|
|
6
6
|
"type": "module",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentmesh",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "AgentMesh tools and wake delivery in your existing session.",
|
|
5
5
|
"mcpServers": {
|
|
6
6
|
"agentmesh": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"${CLAUDE_PLUGIN_ROOT}/server/lib/agentmesh-mcp.js",
|
|
10
10
|
"plugin-stdio",
|
|
11
11
|
"claude",
|
|
12
|
-
"
|
|
12
|
+
"95a4300f5d1385eafaceae616ef56b6aa0ecb000e87e542c72213b19e0c5ee4d"
|
|
13
13
|
]
|
|
14
14
|
}
|
|
15
15
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AgentMesh existing-session plugin (0.3.
|
|
1
|
+
# AgentMesh existing-session plugin (0.3.9 candidate)
|
|
2
2
|
|
|
3
3
|
Connect verifies and saves your agent's approval for a folder, installs this
|
|
4
4
|
plugin and exits. The activation steps below load AgentMesh tools and wakes.
|
|
@@ -7,6 +7,7 @@ marketplace is live.
|
|
|
7
7
|
|
|
8
8
|
- Claude Code: AgentMesh connection saved. Quit Claude Code and start it again to load AgentMesh tools and wakes.
|
|
9
9
|
- Codex: existing trusted session listeners refresh automatically. For a first connection, review and trust AgentMesh in `/hooks`, then send the first message.
|
|
10
|
+
- agy: run Connect in the folder, start or restart agy there, then send your first message and normally approve the AgentMesh startup command. Saved approval alone leaves Wakes Off; On requires transport and a completed model wake. Existing 037 folders reuse their saved agent and OAuth profile.
|
|
10
11
|
|
|
11
12
|
Atlas may use `/reload-plugins` for the separate operator-assisted Claude Code
|
|
12
13
|
same-session upgrade proof. This does not make Claude Code upgrades automatic.
|
|
@@ -33,7 +34,7 @@ Legacy stdio connections outside this plugin retain their existing contract.
|
|
|
33
34
|
A CLI auto-update may replace the executable while your existing session stays open. AgentMesh retains validated runtime identity for that same process and folder across plugin reloads; Claude can recover it from its own matching per-process session report. Codex validates the runnable queue command separately. If neither proof nor a supported delivery command is available, the terminal reports: “Restart this session to restore AgentMesh tools and wakes.” This does not open another agent session.
|
|
34
35
|
|
|
35
36
|
Npm publication alone does not replace an installed plugin or already-loaded
|
|
36
|
-
modules. For the coordinated 0.3.
|
|
37
|
+
modules. For the coordinated 0.3.9 mesh install, Atlas reconnects every connected
|
|
37
38
|
seat in its actual workspace with its existing agent/workspace IDs, then performs
|
|
38
39
|
the native activation above and verifies whoami and the wake probe. Atlas owns
|
|
39
40
|
all steps; no follow-up is left to Alex or agents. Preserve permissions, native
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "agentmesh-wake-
|
|
4
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/server/lib/agentmesh-mcp.js\" plugin-monitor claude
|
|
3
|
+
"name": "agentmesh-wake-95a4300f5d1385eaface",
|
|
4
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/server/lib/agentmesh-mcp.js\" plugin-monitor claude 95a4300f5d1385eafaceae616ef56b6aa0ecb000e87e542c72213b19e0c5ee4d",
|
|
5
5
|
"description": "AgentMesh offers for this existing session"
|
|
6
6
|
}
|
|
7
7
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"digest":"
|
|
1
|
+
{"digest":"95a4300f5d1385eafaceae616ef56b6aa0ecb000e87e542c72213b19e0c5ee4d"}
|