@hediet/linkrpc-cli 0.0.3-next.20261030.2 → 0.0.3-next.20261101.1
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 +45 -7
- package/dist/chunks/{cli-BgL686Mo.js → cli-CUctSk0X.js} +196 -361
- package/dist/chunks/cli-CUctSk0X.js.map +1 -0
- package/dist/chunks/{runApprovalUi-C1jx0OKK.js → runApprovalUi-BHomYhFQ.js} +3 -3
- package/dist/chunks/{runApprovalUi-C1jx0OKK.js.map → runApprovalUi-BHomYhFQ.js.map} +1 -1
- package/dist/chunks/{runComplete-CHZWS4m_.js → runComplete-haCYSPzH.js} +83 -64
- package/dist/chunks/runComplete-haCYSPzH.js.map +1 -0
- package/dist/chunks/{runUi-9n8WFze2.js → runUi-cl0J7cZB.js} +4 -4
- package/dist/chunks/{runUi-9n8WFze2.js.map → runUi-cl0J7cZB.js.map} +1 -1
- package/dist/chunks/{scroll-HZ3e1IfU.js → scroll-BQIZS-de.js} +2 -2
- package/dist/chunks/{scroll-HZ3e1IfU.js.map → scroll-BQIZS-de.js.map} +1 -1
- package/dist/chunks/{src-u4eOE1Iz.js → src-DSdS3hm7.js} +3 -3
- package/dist/chunks/{src-u4eOE1Iz.js.map → src-DSdS3hm7.js.map} +1 -1
- package/dist/hub.js +1 -1
- package/dist/index.d.ts +2 -33
- package/dist/index.js +3 -2
- package/dist/linkrpc.js +1 -1
- package/dist/rpc.js +1 -1
- package/package.json +6 -5
- package/dist/chunks/cli-BgL686Mo.js.map +0 -1
- package/dist/chunks/runComplete-CHZWS4m_.js.map +0 -1
package/README.md
CHANGED
|
@@ -935,9 +935,11 @@ idle minutes.
|
|
|
935
935
|
|
|
936
936
|
### Hub MCP aggregation
|
|
937
937
|
|
|
938
|
-
`linkrpc hub mcp` is a lightweight stdio MCP server that discovers
|
|
939
|
-
|
|
940
|
-
|
|
938
|
+
`linkrpc hub mcp` is a lightweight stdio MCP server that discovers every MCP
|
|
939
|
+
server published in the selected Hub and aggregates their tools: MCP services
|
|
940
|
+
(`mcp.tools`) and forwarded servers (`mcp.forward`, or the legacy
|
|
941
|
+
`vscode.mcp-forward`). No service IDs, filters, or principal overrides are
|
|
942
|
+
required:
|
|
941
943
|
|
|
942
944
|
```json
|
|
943
945
|
{
|
|
@@ -955,8 +957,15 @@ Endpoint/context/environment and identity selection follow the normal Hub CLI
|
|
|
955
957
|
rules. An explicit endpoint can be supplied before `mcp`, for example
|
|
956
958
|
`linkrpc hub --endpoint npipe://./pipe/my-hub mcp`. Signing and capability
|
|
957
959
|
negotiation remain enabled by default; discovery does not bypass authorization.
|
|
958
|
-
|
|
959
|
-
|
|
960
|
+
Service tools are called through their generated methods, so capabilities and
|
|
961
|
+
consent apply per tool; a forwarded server needs one capability for all its
|
|
962
|
+
tools. Inaccessible directories and failed servers are reported on stderr;
|
|
963
|
+
stdout contains only MCP protocol frames.
|
|
964
|
+
|
|
965
|
+
`--scripts` additionally serves the LinkRPC script tools (`runLinkRpcScript`,
|
|
966
|
+
`awaitLinkRpcTask`, `cancelLinkRpcTask`) of `@hediet/linkrpc-mcp` on the same
|
|
967
|
+
connection, so one MCP entry gives both the hub's MCP tools and scripted access
|
|
968
|
+
to every hub service.
|
|
960
969
|
|
|
961
970
|
The command watches directory changes, refreshes changed tool lists (including
|
|
962
971
|
paginated lists), and retries failed connections while they remain advertised.
|
|
@@ -965,17 +974,46 @@ remaining unique and MCP-safe even for long service paths. Descriptions identify
|
|
|
965
974
|
the source service. Disconnecting stdio closes this client's forwarding sessions.
|
|
966
975
|
This version aggregates tools, not resources, prompts, or sampling.
|
|
967
976
|
|
|
968
|
-
|
|
977
|
+
### Publishing MCP servers
|
|
978
|
+
|
|
979
|
+
Producers stay separate. `mcp-publish` publishes one MCP server, given as a
|
|
980
|
+
command after `--`, as a Streamable HTTP `--url` (with repeatable `--header`),
|
|
981
|
+
or (forward only) as `--stdio`:
|
|
982
|
+
|
|
983
|
+
```sh
|
|
984
|
+
linkrpc hub mcp-publish --service --forward --serviceId <authorized-service-id> -- npx -y @modelcontextprotocol/server-everything
|
|
985
|
+
```
|
|
986
|
+
|
|
987
|
+
- `--service` publishes the MCP server as a LinkRPC service: every MCP tool is
|
|
988
|
+
a method of a generated `mcp.tools.<name>` interface (`--name`, derived from
|
|
989
|
+
the service ID by default), and `mcp.tools::listTools`/`callTool` list and
|
|
990
|
+
call tools by name. All callers share one MCP session; a caller can open an
|
|
991
|
+
exclusive one with `mcp.server::openSession`. Repeatable
|
|
992
|
+
`--group <group>=<keyword,...>` moves tools whose name contains a keyword into
|
|
993
|
+
`mcp.tools.<name>.<group>`, so capabilities can cover a whole group, e.g.
|
|
994
|
+
`--group admin=delete,merge`.
|
|
995
|
+
- `--forward` relays MCP verbatim over `mcp.forward`. Each connection gets its
|
|
996
|
+
own MCP session: a fresh child process, or a new HTTP session.
|
|
997
|
+
- `--stdio` forwards an MCP server that is already running and attached to this
|
|
998
|
+
process's stdin/stdout, one connection at a time. Later connections reach the
|
|
999
|
+
same server; the command exits when stdin ends.
|
|
1000
|
+
|
|
1001
|
+
`mcp-forward` is shorthand for `mcp-publish --forward`:
|
|
969
1002
|
|
|
970
1003
|
```sh
|
|
971
1004
|
linkrpc hub mcp-forward --serviceId <authorized-service-id> -- component-explorer mcp -p <config> --use-daemon --no-daemon-autostart
|
|
972
1005
|
```
|
|
973
1006
|
|
|
1007
|
+
To forward a server that must not be restarted per connection, start it
|
|
1008
|
+
yourself and connect its stdio, e.g. with a named pipe pair or a supervisor:
|
|
1009
|
+
`linkrpc hub mcp-forward --stdio --serviceId <id>`.
|
|
1010
|
+
|
|
974
1011
|
Manage that producer and `component-explorer serve -p <same-config>` with your
|
|
975
1012
|
workspace daemon. The aggregator opens lightweight MCP connections; it does not
|
|
976
1013
|
start workspace builds or explorer daemons. Each forwarded connection spawns
|
|
977
1014
|
the configured MCP child, so producers must use attach-only commands when
|
|
978
|
-
heavyweight services are managed separately.
|
|
1015
|
+
heavyweight services are managed separately. Children inherit the producer's
|
|
1016
|
+
environment plus `--env` values.
|
|
979
1017
|
|
|
980
1018
|
### Participant proxy
|
|
981
1019
|
|