agent-lyra 0.13.0 → 0.14.0
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 +29 -24
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/runtime/mcp-tool.d.ts +24 -0
- package/src/runtime/mcp-tool.js +39 -0
- package/src/studio/browser.js +5 -0
- package/src/studio/export.js +1 -1
- package/src/studio/index.html +16 -0
- package/src/studio/mcp-bridge.mjs +11 -0
- package/src/studio/mcp-connection.js +167 -0
- package/src/studio/mcp-panel.js +97 -0
- package/src/studio/programmatic.js +13 -1
- package/src/studio/server.js +27 -0
- package/src/studio/studio.css +10 -0
package/README.md
CHANGED
|
@@ -59,10 +59,10 @@ Values in angle brackets are placeholders. Use `--help` to check arguments for t
|
|
|
59
59
|
| Command | Availability | Purpose |
|
|
60
60
|
| --- | --- | --- |
|
|
61
61
|
| `--help` | All editions | Show the CLI entry points |
|
|
62
|
-
| `init [--
|
|
62
|
+
| `init [--dir <folder>]` | All editions | Initialize a workspace from your project folder |
|
|
63
63
|
| `init --domains <ids> [--stack <names> or --detect]` | npm, Python | Select domains and optionally configure a coding stack. The registry wizard also supports hosted setup |
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Use `init --help` for advanced options. To connect Cloud after setup, run `connect-cloud` and enter your AgentLyra API key at the hidden prompt.
|
|
66
66
|
|
|
67
67
|
### VS Code agent discovery
|
|
68
68
|
|
|
@@ -124,13 +124,9 @@ npx agent-lyra setup coding export --to claude,codex,copilot --preview
|
|
|
124
124
|
|
|
125
125
|
These commands are available in npm and Python. Both setup commands accept `--dir <folder>`. After setup, you can run `node .lyra/scripts/detect-stack.mjs` for a read-only JSON report. The GitHub source edition includes the guide files for reading and reuse.
|
|
126
126
|
|
|
127
|
-
##
|
|
127
|
+
## Register an existing agent
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
The endpoint handles an authenticated JSON POST. Verify the bearer token before running code. The request carries `schemaVersion: 1`, `agentId`, `traceId`, and `input`. Return JSON with the same `traceId` and an `output` matching the registered text or JSON type. The endpoint has 25 seconds to respond. Use the incoming trace ID in your runtime logs. Cloud retains status, timing and failure category for 30 days. The trace history excludes prompts and replies.
|
|
132
|
-
|
|
133
|
-
## Register a TypeScript Managed Deep Agent
|
|
129
|
+
### TypeScript Managed Deep Agents
|
|
134
130
|
|
|
135
131
|
Start your existing Managed Deep Agents project with `npx mda dev` and leave that terminal running. In a second terminal in the same project, save `mda-registration.json` with the source export and the assistant or graph ID shown by the MDA dev server.
|
|
136
132
|
|
|
@@ -145,7 +141,7 @@ Start your existing Managed Deep Agents project with `npx mda dev` and leave tha
|
|
|
145
141
|
|
|
146
142
|
Run `agent register mda-registration.json` using either SDK CLI, then open Workbench and choose **Agent Registry → Reload agents**. Select the new card and use **Run now**. Workbench sends a text run to the local MDA server. Set `LYRA_MDA_PORT` before launching Workbench if your server uses a port other than 2024. If the dev server requires an API key, set `LYRA_MDA_API_KEY` in Workbench's terminal environment for that trusted local server. The MDA server owns provider credentials and agent behavior. Workbench records the Lyra trace ID and sends it in run metadata. Continue any approval prompts in the MDA interface.
|
|
147
143
|
|
|
148
|
-
|
|
144
|
+
### Python framework agents
|
|
149
145
|
|
|
150
146
|
Keep the agent in its existing repository and install its framework in the Python environment Workbench uses. Set `LYRA_PYTHON` to that interpreter if needed.
|
|
151
147
|
|
|
@@ -182,15 +178,20 @@ These commands work in the npm and Python distributions. Launch Workbench and re
|
|
|
182
178
|
|
|
183
179
|
## Lyra Workbench
|
|
184
180
|
|
|
185
|
-
Workbench is
|
|
181
|
+
Workbench is the local dashboard for running agents, inspecting executions, and building apps. Launch it from your project root.
|
|
186
182
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
| Install | Launch |
|
|
184
|
+
| --- | --- |
|
|
185
|
+
| npm | `npx agent-lyra workbench` |
|
|
186
|
+
| PyPI | `python -m lyra workbench` |
|
|
190
187
|
|
|
191
|
-
|
|
188
|
+
- **Mission Control** shows recent project runs, status, and duration. Open a run to inspect steps, activity, token counts when reported, and evaluations, or download its JSON report.
|
|
189
|
+
- **Agent Registry** lets you search and run agents from the project and connected account. Choose **Review and add** to register detected Lyra JavaScript, TypeScript, or Python agents. The scan reads source without importing it. Registration saves a local descriptor and leaves your source file in place. See [register an existing agent](#register-an-existing-agent) for framework adapters.
|
|
190
|
+
- **Tools** inspects a local Streamable HTTP MCP server and saves selected tools for executable agents using the Workbench MCP helpers.
|
|
191
|
+
- **App Builder** contains the layout canvas and workflow editor.
|
|
192
|
+
- **Cloud Sync** lets you connect an account or pull selected resources. Local and Cloud-connected projects use the same dashboard.
|
|
192
193
|
|
|
193
|
-
|
|
194
|
+
Install from npm or PyPI to use Workbench. It opens at `http://127.0.0.1:4174/`. Set `LYRA_STUDIO_PORT` to change the port, or use `0` to select a free port.
|
|
194
195
|
|
|
195
196
|
### Provider switching and run records
|
|
196
197
|
|
|
@@ -198,16 +199,16 @@ In Workbench's run drawer, select an execution provider for text agents. The **E
|
|
|
198
199
|
|
|
199
200
|
| Provider | Requirements |
|
|
200
201
|
| --- | --- |
|
|
201
|
-
| Local OpenAI API |
|
|
202
|
+
| Local OpenAI API | Choose **Add OpenAI API key** in the run drawer or set `OPENAI_API_KEY` before launching Workbench |
|
|
203
|
+
| VS Code model | In a trusted local workspace, use the AgentLyra extension command **AgentLyra: Open Workbench with VS Code Model**, then select and authorize a model |
|
|
204
|
+
| Local model server | Set `LYRA_LOCAL_MODEL_URL` to a loopback OpenAI-compatible base URL ending in `/v1` and `LYRA_LOCAL_MODELS` to the installed model IDs |
|
|
202
205
|
| Lyra Cloud | Connect an SDK key and configure your own OpenAI key in Cloud Models |
|
|
203
206
|
| Codex CLI | Install the authenticated Codex CLI on PATH. Workbench requests a read-only sandbox |
|
|
204
207
|
| Claude Code CLI | Install the authenticated Claude Code CLI on PATH. Workbench requests tool-free execution |
|
|
205
208
|
|
|
206
|
-
On Windows,
|
|
207
|
-
|
|
208
|
-
Hosted Workbench text runs record their status, model, duration, and step trace ID in Mission Control. The run drawer and terminal show the matching trace and run IDs. Local-only steps remain local. These SDK execution records store execution metadata and omit prompts and replies.
|
|
209
|
+
On Windows, CLI providers are discovered as native executables on PATH. A terminal-provided OpenAI key takes precedence over a key saved by Workbench. A connected account with resource sync permission can fetch a saved Cloud text agent definition for local execution. Choosing **Lyra Cloud** sends the instructions and input to Cloud. Registered executable agents use the runtime configured by the agent.
|
|
209
210
|
|
|
210
|
-
|
|
211
|
+
Mission Control records run metadata such as status, duration, and trace IDs. SDK execution records omit prompts and replies.
|
|
211
212
|
|
|
212
213
|
In **Workflow**, create a sequence of agents between **Trigger** and **Output**. Give each step a task and optionally name its output so a later step can read it. Save to `.lyra/workflows`, test the sequence, then use **Layout** to bind a run button to the saved workflow. The run drawer shows each step's result, status, duration, and Workbench trace ID. Cloud-only workflows open for inspection and run in the Cloud console. Use **Duplicate locally** to customize a pulled workflow that can run in Workbench.
|
|
213
214
|
|
|
@@ -231,9 +232,8 @@ Choose **Build a local GraphSnip graph and report** during `agent-lyra init`, or
|
|
|
231
232
|
Open **Intelligence → Knowledge Graph** in Workbench to view the report or choose **Build graph and report**. The embedded dashboard is a local, read-only preview with scripts and external resources disabled. For the full interactive dashboard, use `graph report --open`.
|
|
232
233
|
|
|
233
234
|
Set `LYRA_GRAPHSNIP=on` before launching Workbench to attach bounded repository context to supported model calls. Mission Control shows when context was attached and lists provider token usage when available. **Token Intelligence** separately shows GraphSnip ledger estimates for project and benchmark activity. Those estimates compare GraphSnip's returned context with its baseline and do not measure provider billing.
|
|
234
|
-
## Lyra App Builder
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
## Lyra App Builder
|
|
237
237
|
|
|
238
238
|
Open **App Builder → Layout** in Workbench to build your app interface. Use **App Builder → Workflow** to design the workflow it runs. To scaffold a named manifest from a terminal, use `app init --name "My app"`. Add components, drag to reorder, or set component widths in the inspector. Bind agent cards and run buttons to agents or runnable workflows from your project. Save to `manifest.json`, then preview or export the same layout.
|
|
239
239
|
|
|
@@ -243,7 +243,7 @@ Open **App Builder → Layout** in Workbench to build your app interface. Use **
|
|
|
243
243
|
| `app init --template agent` | Start with a side-by-side input and result and a run button ready to bind |
|
|
244
244
|
| `app init --saved-agents [manifest.json]` | Create the guided Cloud chat using two saved agents |
|
|
245
245
|
| `app validate <manifest.json>` | Check the manifest |
|
|
246
|
-
| `app preview [manifest.json]` | Run the saved layout at `http://127.0.0.1:4173/`. Set `LYRA_PREVIEW_PORT` to override it |
|
|
246
|
+
| `app preview [manifest.json]` | Run the saved layout at `http://127.0.0.1:4173/`. Set `LYRA_PREVIEW_PORT` to override it, or use `0` to select a free port |
|
|
247
247
|
| `app export <manifest.json> <new-directory>` | Export editable source to a new directory |
|
|
248
248
|
|
|
249
249
|
These commands are available in npm and Python. To import an app or preview a public listing, see [Marketplace](#marketplace).
|
|
@@ -291,6 +291,7 @@ These commands work in Source, npm, and Python. Approving a proposal requires in
|
|
|
291
291
|
Workbench includes Memory Engine 0.1.0 from the [pinned upstream revision](https://github.com/naubadnithinkumar/memory-engine/tree/befb5607a7109d8bcc8160a1947878de09a3d807) in both the npm and PyPI distributions. Launch Workbench from your project to use the existing `.lyra/memory/memory.db` database or create it on first use. Node.js 22.13 or newer provides the SQLite runtime for Workbench. Python applications can also use the native memory API, which uses Python’s built-in SQLite module. Maintainers testing the pinned upstream checkout can set `LYRA_MEMORY_ENGINE_DIR` to its directory. Lyra verifies the checkout before loading it.
|
|
292
292
|
|
|
293
293
|
In **Mission Control**, select a completed run and choose **Record learning**. Workbench links the run ID as provenance and saves your write-up as a candidate. Evidence review is a separate action in **Memory & Learnings** before a record can be retrieved for future work.
|
|
294
|
+
|
|
294
295
|
## AgentLyra Cloud and Marketplace
|
|
295
296
|
|
|
296
297
|
[Open the AgentLyra console](https://console.agentlyra.in/) to run hosted agents, manage a workspace, and view synced records. Create one AgentLyra API key under [API Keys](https://console.agentlyra.in/mcp-servers). Enable the permissions you need for hosted runs, resource sync, and verified memory sync.
|
|
@@ -300,7 +301,7 @@ In **Mission Control**, select a completed run and choose **Record learning**. W
|
|
|
300
301
|
| `connect-cloud [--replace-key]` | Connect once from the IDE. Use `--replace-key` to enter a new key |
|
|
301
302
|
| `work-locally` | Pause Cloud actions while keeping project files |
|
|
302
303
|
|
|
303
|
-
These commands are available in npm and Python.
|
|
304
|
+
These commands are available in npm and Python. Hosted models may require a separate model provider credential.
|
|
304
305
|
|
|
305
306
|
### Sync project resources
|
|
306
307
|
|
|
@@ -318,6 +319,10 @@ These commands work in the npm and Python distributions with a key that has Clou
|
|
|
318
319
|
| `workbench push-skill <skill-id>` | Push a local text skill |
|
|
319
320
|
| `workbench pull-skill <skill-id>` | Pull changes to a linked text skill |
|
|
320
321
|
|
|
322
|
+
### Run a registered agent in Cloud
|
|
323
|
+
|
|
324
|
+
Syncing a framework registration creates a private Cloud card. Cloud execution requires an authenticated HTTPS runtime configured for that registration. Keep provider credentials in the runtime. The Cloud integration uses a JSON POST and passes a trace ID for correlating runs. See the [AgentLyra documentation](https://agentlyra.in/docs) for Cloud setup.
|
|
325
|
+
|
|
321
326
|
### Sync verified memories
|
|
322
327
|
|
|
323
328
|
Cloud memory commands work in the npm and Python distributions. They require an AgentLyra API key with Memory sync permission.
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * as standalone from "./standalone/index.js";
|
|
2
2
|
export * as gated from "./gated/index.js";
|
|
3
3
|
export { Agent, AgentRegistry, Evaluator, Guardrail, Skill, Tool } from "./runtime/programmatic.js";
|
|
4
|
+
export { createMcpTool, createWorkbenchMcpTool } from "./runtime/mcp-tool.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Tool, ValueSchema } from "./programmatic.js";
|
|
2
|
+
|
|
3
|
+
type McpResult = {
|
|
4
|
+
content: readonly unknown[];
|
|
5
|
+
structuredContent?: unknown;
|
|
6
|
+
structured_content?: unknown;
|
|
7
|
+
isError?: boolean;
|
|
8
|
+
is_error?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export function createMcpTool(options: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
callTool(
|
|
15
|
+
request: { name: string; arguments: Record<string, unknown> },
|
|
16
|
+
context: { signal?: AbortSignal },
|
|
17
|
+
): Promise<McpResult>;
|
|
18
|
+
inputSchema?: ValueSchema;
|
|
19
|
+
outputSchema?: ValueSchema;
|
|
20
|
+
}): Tool;
|
|
21
|
+
|
|
22
|
+
export function createWorkbenchMcpTool(
|
|
23
|
+
options: Omit<Parameters<typeof createMcpTool>[0], "callTool">,
|
|
24
|
+
): Tool;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Tool } from "./programmatic.js";
|
|
2
|
+
|
|
3
|
+
/** Bind one named MCP tool to a Lyra Tool. The caller manages the MCP connection. */
|
|
4
|
+
export function createMcpTool({ id, name, callTool, inputSchema, outputSchema }) {
|
|
5
|
+
if (typeof name !== "string" || !name.trim() || typeof callTool !== "function") {
|
|
6
|
+
throw new TypeError("Provide an MCP tool name and a callTool function.");
|
|
7
|
+
}
|
|
8
|
+
return new Tool({
|
|
9
|
+
id, inputSchema, outputSchema,
|
|
10
|
+
async execute(args, { signal }) {
|
|
11
|
+
if (args === null || typeof args !== "object" || Array.isArray(args) ||
|
|
12
|
+
![Object.prototype, null].includes(Object.getPrototypeOf(args))) {
|
|
13
|
+
throw new TypeError("MCP tools require a named arguments object.");
|
|
14
|
+
}
|
|
15
|
+
let result;
|
|
16
|
+
try {
|
|
17
|
+
result = await callTool({ name, arguments: args }, { signal });
|
|
18
|
+
} catch {
|
|
19
|
+
signal?.throwIfAborted();
|
|
20
|
+
throw new Error("MCP tool call failed.");
|
|
21
|
+
}
|
|
22
|
+
if (!result || result.isError || result.is_error || !Array.isArray(result.content)) {
|
|
23
|
+
throw new Error("MCP tool returned an error or invalid result.");
|
|
24
|
+
}
|
|
25
|
+
return result.structuredContent ?? result.structured_content ?? result.content;
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createWorkbenchMcpTool(options) {
|
|
31
|
+
return createMcpTool({
|
|
32
|
+
...options,
|
|
33
|
+
async callTool(request, { signal }) {
|
|
34
|
+
const { callGrantedMcpTool } = await import("../studio/mcp-connection.js");
|
|
35
|
+
const config = JSON.parse(process.env.LYRA_WORKBENCH_MCP_GRANT ?? "null");
|
|
36
|
+
return callGrantedMcpTool(config, request.name, request.arguments, signal);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
package/src/studio/browser.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mountMcpPanel } from "./mcp-panel.js";
|
|
1
2
|
import { mountIntelligence } from "./intelligence.js";
|
|
2
3
|
import { mountWorkflowEditor } from "./workflow-editor.js";
|
|
3
4
|
import { mountHistoryPanel } from "./history-panel.js";
|
|
@@ -48,12 +49,14 @@ async function api(path, data) {
|
|
|
48
49
|
return payload;
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
const openMcpPanel = mountMcpPanel(api, () => project);
|
|
51
53
|
const openMemoryPanel = mountMemoryPanel(api);
|
|
52
54
|
const workbenchViews = {
|
|
53
55
|
mission: ["open-history", "history-panel"],
|
|
54
56
|
registry: ["show-registry", "library"],
|
|
55
57
|
layout: ["show-layout", "canvas-panel"],
|
|
56
58
|
workflow: ["show-workflow", "workflow-panel"],
|
|
59
|
+
tools: ["show-tools", "mcp-panel"],
|
|
57
60
|
cloud: ["show-cloud", "cloud-settings"],
|
|
58
61
|
graph: ["show-graph", "graph-panel"],
|
|
59
62
|
tokens: ["show-tokens", "token-panel"],
|
|
@@ -150,6 +153,7 @@ function showView(next) {
|
|
|
150
153
|
$("#library-tabs").hidden = next === "registry";
|
|
151
154
|
$("#discovery-status").hidden = next !== "registry";
|
|
152
155
|
if (next === "registry") void refreshDiscovery();
|
|
156
|
+
if (next === "tools") void openMcpPanel();
|
|
153
157
|
$("#refresh").hidden = next !== "registry";
|
|
154
158
|
$("#save").hidden = next !== "layout";
|
|
155
159
|
if (next !== "layout") closeInspector();
|
|
@@ -789,6 +793,7 @@ $("#canvas").ondrop = event => {
|
|
|
789
793
|
change();
|
|
790
794
|
};
|
|
791
795
|
$("#show-registry").onclick = () => showView("registry");
|
|
796
|
+
$("#show-tools").onclick = () => showView("tools");
|
|
792
797
|
$("#show-cloud").onclick = () => showView("cloud");
|
|
793
798
|
$("#refresh").onclick = () => load({ catalogOnly: true }).then(() => { announce("Project refreshed."); if (view === "registry") void refreshDiscovery(); }).catch(error => announce(error.message));
|
|
794
799
|
function openCloudSetup() {
|
package/src/studio/export.js
CHANGED
|
@@ -5,7 +5,7 @@ import { readCatalog, resolveSequence, validateLayout, validateRunBindings } fro
|
|
|
5
5
|
|
|
6
6
|
const runtime = [
|
|
7
7
|
"resource-files.js",
|
|
8
|
-
"studio/server.js", "studio/memory-actions.js", "studio/memory-panel.js", "studio/history-panel.js", "studio/intelligence.js", "studio/graphsnip-workbench.js", "studio/mission-ui.js", "studio/mission-ui.css", "studio/project.js", "studio/sync.js", "studio/index.html", "studio/lyra-icon.png",
|
|
8
|
+
"studio/server.js", "studio/mcp-connection.js", "studio/mcp-panel.js", "studio/mcp-bridge.mjs", "studio/memory-actions.js", "studio/memory-panel.js", "studio/history-panel.js", "studio/intelligence.js", "studio/graphsnip-workbench.js", "studio/mission-ui.js", "studio/mission-ui.css", "studio/project.js", "studio/sync.js", "studio/index.html", "studio/lyra-icon.png",
|
|
9
9
|
"studio/browser.js", "studio/workflow-editor.js", "studio/cli-providers.js", "studio/ide-provider.js", "studio/local-provider.js", "studio/run-history.js", "studio/studio.css", "studio/agent-ui.js", "studio/agent-ui.css", "studio/code-discovery.js", "app-builder/saved-app.js",
|
|
10
10
|
"memory/index.js", "memory/external-engine.js", "memory/UPSTREAM.json", "memory/local-store.js", "memory/cloud-sync-actions.js", "memory/validation.js", "memory/proposals.js", "memory/sync.js", "memory/lifecycle.js", "memory/contract.json",
|
|
11
11
|
"framework/agent.js", "framework/run.py", "framework/mda.js",
|
package/src/studio/index.html
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<div role="group" aria-labelledby="nav-development">
|
|
17
17
|
<span id="nav-development">Development</span>
|
|
18
18
|
<button id="show-registry" type="button" aria-pressed="false">Agent Registry</button>
|
|
19
|
+
<button id="show-tools" type="button" aria-pressed="false">Tools</button>
|
|
19
20
|
</div>
|
|
20
21
|
<div role="group" aria-labelledby="nav-app-builder">
|
|
21
22
|
<span id="nav-app-builder">App Builder</span>
|
|
@@ -67,6 +68,21 @@
|
|
|
67
68
|
<p>GraphSnip estimates context tokens against its baseline. Provider-reported usage is shown per run in Mission Control.</p>
|
|
68
69
|
<div id="token-content" aria-live="polite"></div>
|
|
69
70
|
</section>
|
|
71
|
+
<section id="mcp-panel" aria-labelledby="mcp-title" hidden>
|
|
72
|
+
<h1 id="mcp-title">Tools</h1>
|
|
73
|
+
<p>Inspect a local MCP server and grant specific tools to a registered executable agent.</p>
|
|
74
|
+
<form id="mcp-connect" class="mcp-connect">
|
|
75
|
+
<label for="mcp-endpoint">Local MCP server URL</label>
|
|
76
|
+
<input id="mcp-endpoint" type="url" required maxlength="512" placeholder="http://127.0.0.1:3001/mcp">
|
|
77
|
+
<div class="actions"><button id="mcp-inspect" class="primary" type="submit">Inspect server</button>
|
|
78
|
+
<button id="mcp-disconnect" type="button" hidden>Disconnect</button></div>
|
|
79
|
+
</form>
|
|
80
|
+
<p id="mcp-status" role="status"></p>
|
|
81
|
+
<label for="mcp-agent">Executable agent</label>
|
|
82
|
+
<select id="mcp-agent"></select>
|
|
83
|
+
<div id="mcp-tool-list"></div>
|
|
84
|
+
<button type="button" id="mcp-save" class="primary" disabled>Save tool access</button>
|
|
85
|
+
</section>
|
|
70
86
|
<section id="cloud-settings" aria-labelledby="cloud-settings-title" hidden>
|
|
71
87
|
<h1 id="cloud-settings-title">Cloud Sync</h1>
|
|
72
88
|
<p id="cloud-settings-description"></p>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { callGrantedMcpTool } from "./mcp-connection.js";
|
|
2
|
+
|
|
3
|
+
try {
|
|
4
|
+
let input = "";
|
|
5
|
+
for await (const chunk of process.stdin.setEncoding("utf8")) input += chunk;
|
|
6
|
+
const { name, arguments: args } = JSON.parse(input);
|
|
7
|
+
const config = JSON.parse(process.env.LYRA_WORKBENCH_MCP_GRANT ?? "null");
|
|
8
|
+
process.stdout.write(JSON.stringify(await callGrantedMcpTool(config, name, args)));
|
|
9
|
+
} catch {
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { lstat, mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
const protocol = "2025-06-18";
|
|
6
|
+
const limit = 256 * 1024;
|
|
7
|
+
const safeName = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
8
|
+
|
|
9
|
+
export function mcpEndpoint(value) {
|
|
10
|
+
let url;
|
|
11
|
+
try { url = new URL(value); } catch {}
|
|
12
|
+
if (url?.protocol !== "http:" || url.hostname !== "127.0.0.1" || !url.port ||
|
|
13
|
+
url.username || url.password || url.search || url.hash || url.href.length > 512) {
|
|
14
|
+
throw new Error("Enter a local MCP HTTP URL with an explicit port, such as http://127.0.0.1:3001/mcp.");
|
|
15
|
+
}
|
|
16
|
+
return url.href;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function withSession(endpoint, action, signal) {
|
|
20
|
+
const url = mcpEndpoint(endpoint);
|
|
21
|
+
const timeout = AbortSignal.timeout(8000);
|
|
22
|
+
const requestSignal = signal ? AbortSignal.any([signal, timeout]) : timeout;
|
|
23
|
+
let negotiated = protocol;
|
|
24
|
+
let sessionId;
|
|
25
|
+
let id = 0;
|
|
26
|
+
const headers = () => ({
|
|
27
|
+
"Content-Type": "application/json", Accept: "application/json, text/event-stream",
|
|
28
|
+
"MCP-Protocol-Version": negotiated, ...(sessionId ? { "Mcp-Session-Id": sessionId } : {}),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
async function request(method, params, notification = false) {
|
|
32
|
+
const messageId = notification ? undefined : ++id;
|
|
33
|
+
const response = await fetch(url, {
|
|
34
|
+
method: "POST", redirect: "error", headers: headers(), signal: requestSignal,
|
|
35
|
+
body: JSON.stringify({ jsonrpc: "2.0", id: messageId, method, params }),
|
|
36
|
+
});
|
|
37
|
+
try {
|
|
38
|
+
if (!response.ok) throw new Error("MCP HTTP request failed.");
|
|
39
|
+
if (method === "initialize") sessionId = response.headers.get("mcp-session-id") || undefined;
|
|
40
|
+
if (notification) return;
|
|
41
|
+
const reader = response.body?.getReader();
|
|
42
|
+
if (!reader) throw new Error("Empty MCP response.");
|
|
43
|
+
try {
|
|
44
|
+
const decoder = new TextDecoder();
|
|
45
|
+
const stream = response.headers.get("content-type")?.startsWith("text/event-stream");
|
|
46
|
+
let buffer = "";
|
|
47
|
+
let bytes = 0;
|
|
48
|
+
for (;;) {
|
|
49
|
+
const { value, done } = await reader.read();
|
|
50
|
+
bytes += value?.byteLength ?? 0;
|
|
51
|
+
if (bytes > limit) throw new Error("MCP response exceeded size limit.");
|
|
52
|
+
buffer += decoder.decode(value, { stream: !done });
|
|
53
|
+
if (stream) {
|
|
54
|
+
const frames = buffer.split(/\r?\n\r?\n/);
|
|
55
|
+
buffer = frames.pop();
|
|
56
|
+
if (done && buffer.trim()) frames.push(buffer);
|
|
57
|
+
for (const frame of frames) {
|
|
58
|
+
const data = frame.split(/\r?\n/).filter(line => line.startsWith("data:"))
|
|
59
|
+
.map(line => line.slice(5).trimStart()).join("\n");
|
|
60
|
+
if (!data) continue;
|
|
61
|
+
const result = JSON.parse(data);
|
|
62
|
+
if (result.id === messageId) return rpcResult(result, messageId);
|
|
63
|
+
}
|
|
64
|
+
if (done) throw new Error("MCP response did not contain the tool result.");
|
|
65
|
+
} else if (done) return rpcResult(JSON.parse(buffer), messageId);
|
|
66
|
+
}
|
|
67
|
+
} finally { void reader.cancel().catch(() => {}); }
|
|
68
|
+
} finally {
|
|
69
|
+
if (!response.bodyUsed) void response.body?.cancel().catch(() => {});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
const init = await request("initialize", {
|
|
75
|
+
protocolVersion: protocol, capabilities: {}, clientInfo: { name: "AgentLyra Workbench", version: "1" },
|
|
76
|
+
});
|
|
77
|
+
if (init.protocolVersion !== protocol && init.protocolVersion !== "2025-11-25") {
|
|
78
|
+
throw new Error("Unsupported MCP protocol version.");
|
|
79
|
+
}
|
|
80
|
+
negotiated = init.protocolVersion;
|
|
81
|
+
await request("notifications/initialized", undefined, true);
|
|
82
|
+
return await action(request);
|
|
83
|
+
} catch {
|
|
84
|
+
signal?.throwIfAborted();
|
|
85
|
+
throw new Error("The MCP request failed. Check the local server URL, protocol support, and server logs.");
|
|
86
|
+
} finally {
|
|
87
|
+
if (sessionId) {
|
|
88
|
+
try {
|
|
89
|
+
const response = await fetch(url, { method: "DELETE", redirect: "error", headers: headers(), signal: AbortSignal.timeout(1000) });
|
|
90
|
+
void response.body?.cancel().catch(() => {});
|
|
91
|
+
} catch { /* Session cleanup is best effort. */ }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function rpcResult(message, id) {
|
|
97
|
+
if (message?.jsonrpc !== "2.0" || message.id !== id || !message.result || message.error) {
|
|
98
|
+
throw new Error("Invalid MCP response.");
|
|
99
|
+
}
|
|
100
|
+
return message.result;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export async function inspectMcp(endpoint) {
|
|
104
|
+
return withSession(endpoint, async request => {
|
|
105
|
+
const tools = new Map();
|
|
106
|
+
let cursor;
|
|
107
|
+
for (let page = 0; page < 8; page++) {
|
|
108
|
+
const result = await request("tools/list", cursor ? { cursor } : {});
|
|
109
|
+
if (!Array.isArray(result.tools)) throw new Error("Invalid MCP tools list.");
|
|
110
|
+
for (const tool of result.tools) {
|
|
111
|
+
if (typeof tool?.name !== "string" || !safeName.test(tool.name)) continue;
|
|
112
|
+
const input = tool.inputSchema;
|
|
113
|
+
if (input?.type !== "object") continue;
|
|
114
|
+
if (tools.size >= 100) throw new Error("Too many MCP tools.");
|
|
115
|
+
tools.set(tool.name, {
|
|
116
|
+
name: tool.name,
|
|
117
|
+
description: typeof tool.description === "string" ? tool.description.slice(0, 512) : "",
|
|
118
|
+
inputSchema: JSON.stringify(input).length <= 8192 ? input : { type: "object" },
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
cursor = result.nextCursor;
|
|
122
|
+
if (!cursor) return [...tools.values()];
|
|
123
|
+
if (typeof cursor !== "string" || cursor.length > 1024) break;
|
|
124
|
+
}
|
|
125
|
+
throw new Error("MCP tool listing exceeded the page limit.");
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export async function readMcpConfig(root) {
|
|
130
|
+
const directory = join(root, ".lyra");
|
|
131
|
+
const filename = join(directory, "workbench-mcp.json");
|
|
132
|
+
const directoryStat = await lstat(directory).catch(error => { if (error.code !== "ENOENT") throw error; });
|
|
133
|
+
if (!directoryStat) return null;
|
|
134
|
+
if (!directoryStat.isDirectory()) throw new Error("Use a regular .lyra directory.");
|
|
135
|
+
const stat = await lstat(filename).catch(error => { if (error.code !== "ENOENT") throw error; });
|
|
136
|
+
if (!stat) return null;
|
|
137
|
+
if (!stat.isFile() || stat.size > limit) throw new Error("Invalid Workbench MCP configuration.");
|
|
138
|
+
const config = JSON.parse(await readFile(filename, "utf8"));
|
|
139
|
+
if (config?.version !== 1 || !Array.isArray(config.grants) ||
|
|
140
|
+
config.grants.some(grant => typeof grant?.agentId !== "string" || !Array.isArray(grant.tools) ||
|
|
141
|
+
grant.tools.some(name => typeof name !== "string" || !safeName.test(name)))) {
|
|
142
|
+
throw new Error("Invalid Workbench MCP configuration.");
|
|
143
|
+
}
|
|
144
|
+
return { version: 1, endpoint: mcpEndpoint(config.endpoint), grants: config.grants };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export async function saveMcpConfig(root, config) {
|
|
148
|
+
const directory = join(root, ".lyra");
|
|
149
|
+
await mkdir(directory, { recursive: true });
|
|
150
|
+
if (!(await lstat(directory)).isDirectory()) throw new Error("Use a regular .lyra directory.");
|
|
151
|
+
const data = JSON.stringify(config, null, 2) + "\n";
|
|
152
|
+
if (Buffer.byteLength(data) > limit) throw new Error("Too many tool grants in this project.");
|
|
153
|
+
const temporary = join(directory, ".workbench-mcp-" + randomUUID());
|
|
154
|
+
try {
|
|
155
|
+
await writeFile(temporary, data, { flag: "wx", mode: 0o600 });
|
|
156
|
+
await rename(temporary, join(directory, "workbench-mcp.json"));
|
|
157
|
+
} finally { await rm(temporary, { force: true }); }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export async function callGrantedMcpTool(config, name, args, signal) {
|
|
161
|
+
if (!config?.tools?.includes(name)) throw new Error("This MCP tool has not been granted to the agent.");
|
|
162
|
+
return withSession(config.endpoint, request => request("tools/call", { name, arguments: args }), signal);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export async function clearMcpConfig(root) {
|
|
166
|
+
if (await readMcpConfig(root)) await rm(join(root, ".lyra", "workbench-mcp.json"));
|
|
167
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export function mountMcpPanel(api, project) {
|
|
2
|
+
const $ = id => document.getElementById(id);
|
|
3
|
+
const form = $("mcp-connect");
|
|
4
|
+
const endpoint = $("mcp-endpoint");
|
|
5
|
+
const connect = $("mcp-inspect");
|
|
6
|
+
const disconnect = $("mcp-disconnect");
|
|
7
|
+
const status = $("mcp-status");
|
|
8
|
+
const agent = $("mcp-agent");
|
|
9
|
+
const list = $("mcp-tool-list");
|
|
10
|
+
const save = $("mcp-save");
|
|
11
|
+
let config;
|
|
12
|
+
let tools;
|
|
13
|
+
let busy = false;
|
|
14
|
+
|
|
15
|
+
const create = (tag, text) => Object.assign(document.createElement(tag), { textContent: text });
|
|
16
|
+
function render() {
|
|
17
|
+
const selected = agent.value;
|
|
18
|
+
const agents = project().agents.filter(item => item.source === "programmatic");
|
|
19
|
+
agent.replaceChildren(new Option("Choose an executable agent", ""), ...agents.map(item => new Option(item.name, item.id)));
|
|
20
|
+
if (agents.some(item => item.id === selected)) agent.value = selected;
|
|
21
|
+
agent.disabled = busy || !config || !agents.length;
|
|
22
|
+
connect.disabled = disconnect.disabled = endpoint.disabled = busy;
|
|
23
|
+
disconnect.hidden = !config;
|
|
24
|
+
save.disabled = busy || !agent.value || !tools;
|
|
25
|
+
list.replaceChildren();
|
|
26
|
+
if (!config) return;
|
|
27
|
+
if (!tools) {
|
|
28
|
+
list.append(create("p", "Server saved. Select Inspect server to refresh its tools and edit access."));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!tools.length) list.append(create("p", "This server advertised no compatible tools."));
|
|
32
|
+
const granted = config.grants.find(item => item.agentId === agent.value)?.tools ?? [];
|
|
33
|
+
for (const tool of tools) {
|
|
34
|
+
const row = create("article", "");
|
|
35
|
+
row.className = "mcp-tool";
|
|
36
|
+
const label = create("label", "");
|
|
37
|
+
const check = document.createElement("input");
|
|
38
|
+
check.type = "checkbox";
|
|
39
|
+
check.value = tool.name;
|
|
40
|
+
check.disabled = busy || !agent.value;
|
|
41
|
+
check.checked = granted.includes(tool.name);
|
|
42
|
+
label.append(check, create("strong", tool.name));
|
|
43
|
+
const details = create("details", "");
|
|
44
|
+
details.append(create("summary", "Input schema"), create("pre", JSON.stringify(tool.inputSchema, null, 2)));
|
|
45
|
+
row.append(label);
|
|
46
|
+
if (tool.description) row.append(create("p", tool.description));
|
|
47
|
+
row.append(details);
|
|
48
|
+
list.append(row);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function update(message, task) {
|
|
53
|
+
if (busy) return;
|
|
54
|
+
const checks = [...list.querySelectorAll("input[type=checkbox]:checked")].map(input => input.value);
|
|
55
|
+
busy = true;
|
|
56
|
+
status.textContent = message;
|
|
57
|
+
render();
|
|
58
|
+
try { status.textContent = await task(checks); }
|
|
59
|
+
catch (error) { status.textContent = error.message; }
|
|
60
|
+
finally { busy = false; render(); }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
form.onsubmit = event => {
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
const url = endpoint.value;
|
|
66
|
+
if (config && url !== config.endpoint && config.grants.length &&
|
|
67
|
+
!window.confirm("Replace this server and clear its saved agent grants?")) return;
|
|
68
|
+
void update("Inspecting the local server…", async () => {
|
|
69
|
+
({ config, tools } = await api("mcp/connect", { endpoint: url }));
|
|
70
|
+
endpoint.value = config.endpoint;
|
|
71
|
+
return "Server saved. " + tools.length + (tools.length === 1 ? " tool found." : " tools found.");
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
agent.onchange = render;
|
|
75
|
+
save.onclick = () => update("Saving tool access…", async selected => {
|
|
76
|
+
({ config } = await api("mcp/grant", { agentId: agent.value, tools: selected }));
|
|
77
|
+
return "Tool access saved.";
|
|
78
|
+
});
|
|
79
|
+
disconnect.onclick = () => {
|
|
80
|
+
if (!window.confirm("Disconnect this server and clear its saved agent grants?")) return;
|
|
81
|
+
void update("Disconnecting…", async () => {
|
|
82
|
+
await api("mcp/disconnect", {});
|
|
83
|
+
config = tools = undefined;
|
|
84
|
+
endpoint.value = "";
|
|
85
|
+
return "Server disconnected.";
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return () => {
|
|
90
|
+
if (config) return render();
|
|
91
|
+
return update("Loading tool connections…", async () => {
|
|
92
|
+
({ config } = await api("mcp"));
|
|
93
|
+
if (config) endpoint.value = config.endpoint;
|
|
94
|
+
return "";
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readMcpConfig } from "./mcp-connection.js";
|
|
1
2
|
import { execFile } from "node:child_process";
|
|
2
3
|
import { resolveAgentSource } from "./code-discovery.js";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -22,9 +23,20 @@ export async function runProgrammatic(root, agent, input, onActivity, onLearning
|
|
|
22
23
|
const runner = fileURLToPath(new URL(python ? "./python-agent.py" : "./programmatic-runner.mjs", import.meta.url));
|
|
23
24
|
const args = python ? [runner, source, "--programmatic"]
|
|
24
25
|
: [...(/\.m?ts$/.test(source) ? ["--experimental-strip-types"] : []), runner, source];
|
|
26
|
+
const config = await readMcpConfig(root);
|
|
27
|
+
const grant = config?.grants.find(item => item.agentId === agent.id);
|
|
28
|
+
const env = { ...process.env };
|
|
29
|
+
delete env.LYRA_WORKBENCH_MCP_GRANT;
|
|
30
|
+
delete env.LYRA_WORKBENCH_MCP_BRIDGE;
|
|
31
|
+
delete env.LYRA_WORKBENCH_MCP_NODE;
|
|
32
|
+
if (grant) {
|
|
33
|
+
env.LYRA_WORKBENCH_MCP_GRANT = JSON.stringify({ endpoint: config.endpoint, tools: grant.tools });
|
|
34
|
+
env.LYRA_WORKBENCH_MCP_BRIDGE = fileURLToPath(new URL("./mcp-bridge.mjs", import.meta.url));
|
|
35
|
+
env.LYRA_WORKBENCH_MCP_NODE = process.execPath;
|
|
36
|
+
}
|
|
25
37
|
return new Promise((resolve, reject) => {
|
|
26
38
|
const child = execFile(executable, args, {
|
|
27
|
-
cwd: root, timeout: 60_000, maxBuffer: 1024 * 1024, windowsHide: true,
|
|
39
|
+
cwd: root, env, timeout: 60_000, maxBuffer: 1024 * 1024, windowsHide: true,
|
|
28
40
|
}, (error, stdout) => {
|
|
29
41
|
if (error?.code === "ENOENT" && python) {
|
|
30
42
|
return reject(new Error("Install the Python SDK in your environment and set LYRA_PYTHON to its interpreter."));
|
package/src/studio/server.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clearMcpConfig, inspectMcp, mcpEndpoint, readMcpConfig, saveMcpConfig } from "./mcp-connection.js";
|
|
1
2
|
import { discoverFrameworkAgents, syncFrameworkAgent } from "../framework/agent.js";
|
|
2
3
|
import { memoryActions } from "./memory-actions.js";
|
|
3
4
|
import { discoverCodeAgents, registerCodeAgents } from "./code-discovery.js";
|
|
@@ -17,6 +18,7 @@ export async function startStudio(root, { port = 0, run = runSelection, pull = p
|
|
|
17
18
|
for (const [route, name, mime] of [
|
|
18
19
|
["/lyra-icon.png", "lyra-icon.png", "image/png"],
|
|
19
20
|
["/mission-ui.js", "mission-ui.js", "text/javascript"], ["/mission-ui.css", "mission-ui.css", "text/css"],
|
|
21
|
+
["/mcp-panel.js", "mcp-panel.js", "text/javascript"],
|
|
20
22
|
["/intelligence.js", "intelligence.js", "text/javascript"],
|
|
21
23
|
["/history-panel.js", "history-panel.js", "text/javascript"],
|
|
22
24
|
["/memory-panel.js", "memory-panel.js", "text/javascript"],
|
|
@@ -36,6 +38,30 @@ export async function startStudio(root, { port = 0, run = runSelection, pull = p
|
|
|
36
38
|
await saveOpenAIKey(key);
|
|
37
39
|
return { configured: true };
|
|
38
40
|
}],
|
|
41
|
+
["/api/mcp/connect", async ({ endpoint }) => {
|
|
42
|
+
endpoint = mcpEndpoint(endpoint);
|
|
43
|
+
const tools = await inspectMcp(endpoint);
|
|
44
|
+
const current = await readMcpConfig(root);
|
|
45
|
+
const config = current?.endpoint === endpoint ? current : { version: 1, endpoint, grants: [] };
|
|
46
|
+
await saveMcpConfig(root, config);
|
|
47
|
+
return { config, tools };
|
|
48
|
+
}],
|
|
49
|
+
["/api/mcp/disconnect", async () => {
|
|
50
|
+
await clearMcpConfig(root);
|
|
51
|
+
return {};
|
|
52
|
+
}],
|
|
53
|
+
["/api/mcp/grant", async ({ agentId, tools }) => {
|
|
54
|
+
const config = await readMcpConfig(root);
|
|
55
|
+
const agent = (await readCatalog(root)).agents.get(agentId);
|
|
56
|
+
if (!config || agent?.source !== "programmatic") throw new Error("Choose a registered executable agent and connect a server.");
|
|
57
|
+
if (!Array.isArray(tools) || tools.length > 100) throw new Error("Choose tools from the connected server.");
|
|
58
|
+
const advertised = tools.length ? new Set((await inspectMcp(config.endpoint)).map(tool => tool.name)) : new Set();
|
|
59
|
+
if (tools.some(name => !advertised.has(name))) throw new Error("The server tool list changed. Inspect the server again.");
|
|
60
|
+
config.grants = config.grants.filter(grant => grant.agentId !== agentId);
|
|
61
|
+
if (tools.length) config.grants.push({ agentId, tools: [...new Set(tools)] });
|
|
62
|
+
await saveMcpConfig(root, config);
|
|
63
|
+
return { config };
|
|
64
|
+
}],
|
|
39
65
|
["/api/code-agents/add", async ({ ids }) => registerCodeAgents(root, ids, (await readCatalog(root)).agents)],
|
|
40
66
|
["/api/graphsnip/build", () => buildKnowledgeGraph(root)],
|
|
41
67
|
["/api/work-locally", async () => {
|
|
@@ -121,6 +147,7 @@ export async function startStudio(root, { port = 0, run = runSelection, pull = p
|
|
|
121
147
|
});
|
|
122
148
|
}
|
|
123
149
|
if (!readOnly && req.method === "GET") {
|
|
150
|
+
if (req.url === "/api/mcp") return send(200, { config: await readMcpConfig(root) });
|
|
124
151
|
if (req.url === "/api/code-agents") return send(200, { candidates: await discoverCodeAgents(root, (await readCatalog(root)).agents) });
|
|
125
152
|
if (req.url === "/api/graphsnip/report") {
|
|
126
153
|
const report = await readGraphReport(root);
|
package/src/studio/studio.css
CHANGED
|
@@ -586,3 +586,13 @@ body { font-family: "Inter", "Segoe UI", system-ui, sans-serif; }
|
|
|
586
586
|
#studio-views button { text-align:left; }
|
|
587
587
|
#library { top:5rem; }
|
|
588
588
|
}
|
|
589
|
+
|
|
590
|
+
#mcp-panel { grid-column:1 / -1; }
|
|
591
|
+
.mcp-connect { display:grid; gap:.55rem; max-width:35rem; }
|
|
592
|
+
#mcp-agent { display:block; max-width:35rem; margin:.35rem 0 1rem; }
|
|
593
|
+
#mcp-tool-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr)); gap:.7rem; margin-bottom:1rem; }
|
|
594
|
+
.mcp-tool { padding:1rem; border:1px solid var(--wb-line); border-radius:.65rem; }
|
|
595
|
+
.mcp-tool label { display:flex; align-items:center; gap:.6rem; overflow-wrap:anywhere; }
|
|
596
|
+
.mcp-tool input { width:auto; }
|
|
597
|
+
.mcp-tool p { overflow-wrap:anywhere; }
|
|
598
|
+
.mcp-tool pre { max-height:14rem; overflow:auto; font-size:.8rem; }
|