@hediet/linkrpc-cli 0.0.3-next.20261104.3 → 0.0.3-next.20261104.4
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 -0
- package/dist/chunks/{cli-Bpe0_qmw.js → cli-DlRKUZEu.js} +72 -15
- package/dist/chunks/cli-DlRKUZEu.js.map +1 -0
- package/dist/chunks/{runApprovalUi-DFPbTQBs.js → runApprovalUi-BLZTrXDW.js} +3 -3
- package/dist/chunks/{runApprovalUi-DFPbTQBs.js.map → runApprovalUi-BLZTrXDW.js.map} +1 -1
- package/dist/chunks/{runComplete-DegvES4g.js → runComplete-D9FsRgZ1.js} +32 -1
- package/dist/chunks/runComplete-D9FsRgZ1.js.map +1 -0
- package/dist/chunks/{runUi-CXojz1Yf.js → runUi-BusCK0Ka.js} +4 -4
- package/dist/chunks/{runUi-CXojz1Yf.js.map → runUi-BusCK0Ka.js.map} +1 -1
- package/dist/chunks/{scroll-Eli5gGzi.js → scroll-XTaYmTi0.js} +2 -2
- package/dist/chunks/{scroll-Eli5gGzi.js.map → scroll-XTaYmTi0.js.map} +1 -1
- package/dist/chunks/{src-BMOjXlN5.js → src-B7DEaKGS.js} +2 -2
- package/dist/chunks/{src-BMOjXlN5.js.map → src-B7DEaKGS.js.map} +1 -1
- package/dist/hub.js +1 -1
- package/dist/index.js +1 -1
- package/dist/linkrpc.js +1 -1
- package/dist/rpc.js +1 -1
- package/package.json +6 -6
- package/dist/chunks/cli-Bpe0_qmw.js.map +0 -1
- package/dist/chunks/runComplete-DegvES4g.js.map +0 -1
package/README.md
CHANGED
|
@@ -978,6 +978,35 @@ remaining unique and MCP-safe even for long service paths. Descriptions identify
|
|
|
978
978
|
the source service. Disconnecting stdio closes this client's forwarding sessions.
|
|
979
979
|
This version aggregates tools, not resources, prompts, or sampling.
|
|
980
980
|
|
|
981
|
+
`mcp-export` serves the same over Streamable HTTP on a loopback port, so all
|
|
982
|
+
agents of a machine share one process and one hub connection instead of
|
|
983
|
+
starting `hub mcp` per session. Run it as a hub daemon service and point the
|
|
984
|
+
agents at it, e.g. in `~/.copilot/mcp-config.json`:
|
|
985
|
+
|
|
986
|
+
```sh
|
|
987
|
+
LINKRPC_MCP_EXPORT_TOKEN=<secret> linkrpc hub mcp-export --port 8124
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
```json
|
|
991
|
+
{
|
|
992
|
+
"mcpServers": {
|
|
993
|
+
"hub": {
|
|
994
|
+
"type": "http",
|
|
995
|
+
"url": "http://127.0.0.1:8124/mcp",
|
|
996
|
+
"headers": { "Authorization": "Bearer <secret>" }
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
```
|
|
1001
|
+
|
|
1002
|
+
Clients must send the bearer token from the environment variable named by
|
|
1003
|
+
`--token-env` (default `LINKRPC_MCP_EXPORT_TOKEN`). Each MCP session has its own
|
|
1004
|
+
aggregator, forwarded sessions, and script state (`lastResultVal`, parked
|
|
1005
|
+
tasks); all sessions sign as the export's identity and share its grants.
|
|
1006
|
+
`--idle-timeout <minutes>` closes sessions without requests; a client then gets
|
|
1007
|
+
HTTP 404 and must initialize again. The export exits when its hub connection
|
|
1008
|
+
closes, so the daemon restarts it.
|
|
1009
|
+
|
|
981
1010
|
### Publishing MCP servers
|
|
982
1011
|
|
|
983
1012
|
Producers stay separate. `mcp-publish` publishes one MCP server, given as a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as proxyCommand, Ct as mergeParams, F as disconnectBroker, G as parseConnectionLimit, H as claimServiceId, I as getBrokerStatus, K as parseConnectionLimitMilliseconds, L as readBrokerNotifications, M as readEndpointDiscovery, N as ContextStore, P as formatContextReference, R as stopConnectionBroker, Tt as MethodRefWithOptHash, U as resolveServiceIdToClaim, V as tunnelCommand, W as withStaticHubReflection, Y as resolveCliInvocation, _t as resolvedEndpointToConfig, a as resolveInvocationEndpoint, at as findMethodInSchema, bt as explainValidation, c as resolveLocalEndpoint, ct as cliIdentityTarget, dt as formatPrincipalSource, et as requestReflectionAccess, ft as parsePrincipalSpec, gt as resolveTargetEndpoint, ht as connectViaTransport, i as resolveInvocationContext, it as fetchSchema$1, lt as deleteCliIdentity, m as managedEndpointsInterface, mt as connectViaRootOverlay, n as loadStaticHubSchema, nt as setupSigning, o as resolveSigning, ot as walkHub, pt as connect, q as parseDuration, r as resolveStaticHubSchemaSource, rt as fetchDefaults, s as validationDefault, t as completeForLine, tt as requestTopologyAccess, ut as readCliIdentity, vt as describeObjectParams, wt as parseParamOverride, xt as validateValueAgainstSchema, y as HubHome, yt as describeSchema, z as ConnectionBroker } from "./runComplete-
|
|
1
|
+
import { B as proxyCommand, Ct as mergeParams, F as disconnectBroker, G as parseConnectionLimit, H as claimServiceId, I as getBrokerStatus, K as parseConnectionLimitMilliseconds, L as readBrokerNotifications, M as readEndpointDiscovery, N as ContextStore, P as formatContextReference, R as stopConnectionBroker, Tt as MethodRefWithOptHash, U as resolveServiceIdToClaim, V as tunnelCommand, W as withStaticHubReflection, Y as resolveCliInvocation, _t as resolvedEndpointToConfig, a as resolveInvocationEndpoint, at as findMethodInSchema, bt as explainValidation, c as resolveLocalEndpoint, ct as cliIdentityTarget, dt as formatPrincipalSource, et as requestReflectionAccess, ft as parsePrincipalSpec, gt as resolveTargetEndpoint, ht as connectViaTransport, i as resolveInvocationContext, it as fetchSchema$1, lt as deleteCliIdentity, m as managedEndpointsInterface, mt as connectViaRootOverlay, n as loadStaticHubSchema, nt as setupSigning, o as resolveSigning, ot as walkHub, pt as connect, q as parseDuration, r as resolveStaticHubSchemaSource, rt as fetchDefaults, s as validationDefault, t as completeForLine, tt as requestTopologyAccess, ut as readCliIdentity, vt as describeObjectParams, wt as parseParamOverride, xt as validateValueAgainstSchema, y as HubHome, yt as describeSchema, z as ConnectionBroker } from "./runComplete-D9FsRgZ1.js";
|
|
2
2
|
import { HubMcpAggregator, McpToolHost, hostMcpServer, mcpExposeConfigSchema, mcpServerConfigSchema, serveMcpForwardInstance, streamInstanceTransport } from "@hediet/linkrpc-mcp/hub";
|
|
3
3
|
import { ErrorCode, INTERFACE_TEMPLATES_EXTENSION, LinkRpcConnection, RpcError, computeInterfaceHash, connectTransports, createSchemaToZod, directoryInterface, exportStaticHubSchema, generateTsContract, generateTsInterface, interfaceTemplateArgumentsEquivalent, interfaceTemplateMemberName, interfaceTemplatesEqual, isAssignable, jcsCanonicalize, matchParams, schemaToZod, validateInterfaceTemplates } from "@hediet/linkrpc";
|
|
4
4
|
import { WebSocketTransport, connectNdjson, connectToHub, formatEndpointUri, isHubEndpoint, openWebSocket, parseEndpointUri, runInitializeHandshake, traceMessageTransport as traceMessageTransport$1 } from "@hediet/linkrpc/node";
|
|
@@ -412,7 +412,7 @@ function contextNamespace(reference) {
|
|
|
412
412
|
async function useLocalManagement(start, action) {
|
|
413
413
|
const home = HubHome.resolve();
|
|
414
414
|
if (start) {
|
|
415
|
-
const { startDaemon, nodeDaemonLaunch } = await import("./src-
|
|
415
|
+
const { startDaemon, nodeDaemonLaunch } = await import("./src-B7DEaKGS.js");
|
|
416
416
|
if (await startDaemon({
|
|
417
417
|
home,
|
|
418
418
|
launch: nodeDaemonLaunch(home)
|
|
@@ -432,7 +432,7 @@ async function useLocalManagement(start, action) {
|
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
async function restartLocalDaemon() {
|
|
435
|
-
const { startDaemon, stopDaemon, nodeDaemonLaunch } = await import("./src-
|
|
435
|
+
const { startDaemon, stopDaemon, nodeDaemonLaunch } = await import("./src-B7DEaKGS.js");
|
|
436
436
|
const home = HubHome.resolve();
|
|
437
437
|
process.stderr.write("Restarting the local Hub daemon: clients will disconnect and managed workloads will stop. OS autostart settings are unchanged.\n");
|
|
438
438
|
await stopDaemon(home);
|
|
@@ -3552,6 +3552,42 @@ const unsignedAccess = {
|
|
|
3552
3552
|
reason: "This connection does not sign calls."
|
|
3553
3553
|
})
|
|
3554
3554
|
};
|
|
3555
|
+
/**
|
|
3556
|
+
* Serve what {@link mcpCommand} serves over Streamable HTTP on a loopback port,
|
|
3557
|
+
* so many MCP clients share one process and one hub connection. Every MCP
|
|
3558
|
+
* session gets its own aggregator, forwarded sessions, and script state.
|
|
3559
|
+
*/
|
|
3560
|
+
async function mcpExportCommand(channel, options) {
|
|
3561
|
+
const log = options.log ?? ((message) => {
|
|
3562
|
+
process.stderr.write(`linkrpc mcp-export: ${message}\n`);
|
|
3563
|
+
});
|
|
3564
|
+
const { singleConnectionPool } = await import("@hediet/linkrpc-mcp");
|
|
3565
|
+
const { McpSocketHost } = await import("@hediet/linkrpc-mcp/node");
|
|
3566
|
+
const access = options.access ?? unsignedAccess;
|
|
3567
|
+
const host = await McpSocketHost.start({
|
|
3568
|
+
transport: "http",
|
|
3569
|
+
port: options.port,
|
|
3570
|
+
authorizationToken: options.authorizationToken,
|
|
3571
|
+
...options.idleSessionTimeoutMs !== void 0 ? { idleSessionTimeoutMs: options.idleSessionTimeoutMs } : {},
|
|
3572
|
+
log,
|
|
3573
|
+
createSession: async ({ sessionId }) => ({ serverOptions: {
|
|
3574
|
+
pool: singleConnectionPool(channel, access, `mcp-export:${sessionId}`),
|
|
3575
|
+
scriptTools: options.scripts !== false,
|
|
3576
|
+
hubTools: {
|
|
3577
|
+
requestDirectoryAccess: options.requestDirectoryAccess,
|
|
3578
|
+
log: (message) => log(`[${sessionId.slice(0, 8)}] ${message}`),
|
|
3579
|
+
...options.mcpIdentities !== void 0 ? { mcpIdentityFor: (serviceId) => options.mcpIdentities?.[serviceId] } : {}
|
|
3580
|
+
}
|
|
3581
|
+
} })
|
|
3582
|
+
});
|
|
3583
|
+
const endpoint = host.endpoint;
|
|
3584
|
+
if (endpoint.kind === "tcp") log(`listening at http://${endpoint.host}:${endpoint.port}${endpoint.requestPath}`);
|
|
3585
|
+
try {
|
|
3586
|
+
await options.stop;
|
|
3587
|
+
} finally {
|
|
3588
|
+
host.dispose();
|
|
3589
|
+
}
|
|
3590
|
+
}
|
|
3555
3591
|
//#endregion
|
|
3556
3592
|
//#region src/commands/jsonRpcStdio.ts
|
|
3557
3593
|
/** Expose a remote `jsonRpcConnection` service as an NDJSON stdio endpoint. */
|
|
@@ -8582,7 +8618,7 @@ async function main(rawArgv, executableName = "linkrpc") {
|
|
|
8582
8618
|
const profile = cliInvocation.profile;
|
|
8583
8619
|
const program = new Command();
|
|
8584
8620
|
program.configureHelp({ showGlobalOptions: true });
|
|
8585
|
-
program.name(cliInvocation.programName).description(profile === "hub" ? "CLI / TUI for LinkRPC hubs. Shared RPC commands use hub initialization, signing, capability negotiation, and required schema validation by default." : "CLI / TUI for JSON-RPC and LinkRPC endpoints. Shared commands use the RPC profile with automatic schema validation and no endpoint environment override by default.").option("--endpoint <uri>", "endpoint URI (linkrpc:local, unix:/path?token
|
|
8621
|
+
program.name(cliInvocation.programName).description(profile === "hub" ? "CLI / TUI for LinkRPC hubs. Shared RPC commands use hub initialization, signing, capability negotiation, and required schema validation by default." : "CLI / TUI for JSON-RPC and LinkRPC endpoints. Shared commands use the RPC profile with automatic schema validation and no endpoint environment override by default.").option("--endpoint <uri>", "endpoint URI (linkrpc:local, unix:/path?token=…, npipe://./pipe/…, ws[s]://host?token=…, ws-no-init://host?…, cmd:?command=… or cmd-stdio:?command=…)").option("--endpoint-cmd <command>", "spawn a server, connect via an injected env socket").option("--endpoint-cmd-stdio <command>", "spawn a child and talk over its stdio").option("--endpoint-cmd-env <key=value>", "env var for the --endpoint-cmd / --endpoint-cmd-stdio child (repeatable)", (val, acc) => {
|
|
8586
8622
|
const eq = val.indexOf("=");
|
|
8587
8623
|
if (eq === -1) throw new InvalidArgumentError(`expected key=value, got '${val}'`);
|
|
8588
8624
|
const next = acc ?? {};
|
|
@@ -8715,7 +8751,7 @@ async function main(rawArgv, executableName = "linkrpc") {
|
|
|
8715
8751
|
return result;
|
|
8716
8752
|
}
|
|
8717
8753
|
});
|
|
8718
|
-
program.command("attach [serviceId]").description("Attach to a console of any service implementing the `linkrpc.console.v1` interface template (found through the `linkrpc.console` directory tag). Without a service, list available consoles. Pipe consoles: Ctrl+D on an empty line detaches. TTY consoles: keys go to the program; the detach keys (default Ctrl+B, then d) detach.").option("--params <json>", "params of the console template instance, e.g. '{\"namespace\":\"
|
|
8754
|
+
program.command("attach [serviceId]").description("Attach to a console of any service implementing the `linkrpc.console.v1` interface template (found through the `linkrpc.console` directory tag). Without a service, list available consoles. Pipe consoles: Ctrl+D on an empty line detaches. TTY consoles: keys go to the program; the detach keys (default Ctrl+B, then d) detach.").option("--params <json>", "params of the console template instance, e.g. '{\"namespace\":\"…\",\"id\":\"main\"}'", "{}").option("--interface <id>", "interface containing the console instance").option("--instance <name>", "console template instance name, when an interface has several").option("--read-only", "observe output without sending input").action(async (serviceId, opts) => {
|
|
8719
8755
|
await withChannel(endpoint, getPrincipalSpec(), async (channel) => {
|
|
8720
8756
|
if (serviceId === void 0) {
|
|
8721
8757
|
process.stdout.write(`${await listConsoleTargets(channel)}\n`);
|
|
@@ -9331,6 +9367,27 @@ Batch options:
|
|
|
9331
9367
|
autoNegotiatePerCall: true
|
|
9332
9368
|
});
|
|
9333
9369
|
});
|
|
9370
|
+
program.command("mcp-export").description("Serve what `mcp` serves over Streamable HTTP on a loopback port (http://127.0.0.1:<port>/mcp), so many MCP clients share one process. Clients send `Authorization: Bearer <token>`; the token is read from an environment variable.").requiredOption("--port <n>", "loopback port to listen on", (value) => parsePositiveInteger(value, "--port")).option("--token-env <name>", "environment variable holding the bearer token", "LINKRPC_MCP_EXPORT_TOKEN").option("--no-scripts", "serve only the aggregated MCP tools, without loading the script sandbox").option("--mcp-identity <serviceId=identity>", "use this MCP identity (account) of a published MCP server instead of its default (repeatable)", collectKeyValue).option("--idle-timeout <minutes>", "close MCP sessions without requests for this long (clients must then initialize again)", (value) => parsePositiveInteger(value, "--idle-timeout")).action(async (cmdOpts) => {
|
|
9371
|
+
const token = process.env[cmdOpts.tokenEnv];
|
|
9372
|
+
if (!token) throw new Error(`mcp-export: set the bearer token in $${cmdOpts.tokenEnv}`);
|
|
9373
|
+
await withChannel(endpoint, getPrincipalSpec(), async (channel, session, closed) => {
|
|
9374
|
+
await mcpExportCommand(channel, {
|
|
9375
|
+
port: cmdOpts.port,
|
|
9376
|
+
authorizationToken: token,
|
|
9377
|
+
scripts: cmdOpts.scripts !== false,
|
|
9378
|
+
...cmdOpts.mcpIdentity !== void 0 ? { mcpIdentities: cmdOpts.mcpIdentity } : {},
|
|
9379
|
+
...cmdOpts.idleTimeout !== void 0 ? { idleSessionTimeoutMs: cmdOpts.idleTimeout * 6e4 } : {},
|
|
9380
|
+
requestDirectoryAccess: session === void 0 ? void 0 : (serviceId) => requestDirectoryAccess(session, serviceId, { watch: true }),
|
|
9381
|
+
...session !== void 0 ? { access: session } : {},
|
|
9382
|
+
stop: Promise.race([_untilSignalled(), closed.then(() => {
|
|
9383
|
+
throw new Error("mcp-export: the hub connection closed");
|
|
9384
|
+
})])
|
|
9385
|
+
});
|
|
9386
|
+
}, {
|
|
9387
|
+
requestReflectionAccess: false,
|
|
9388
|
+
autoNegotiatePerCall: true
|
|
9389
|
+
});
|
|
9390
|
+
});
|
|
9334
9391
|
program.command("json-rpc-stdio <serviceId>").description("Expose <serviceId>::jsonRpcConnection::connectRaw as a newline-delimited JSON-RPC endpoint on this process's stdin/stdout.").option("--params <json>", "JSON value passed to the remote transport factory").action(async (serviceId, opts) => {
|
|
9335
9392
|
const localEp = needEndpoint(endpoint);
|
|
9336
9393
|
let params;
|
|
@@ -9450,7 +9507,7 @@ Batch options:
|
|
|
9450
9507
|
hub.close();
|
|
9451
9508
|
}
|
|
9452
9509
|
});
|
|
9453
|
-
program.command("connect-as <binderServiceId> <slot>").description("Mint a single-use identity token for <slot> from the <binderServiceId> (a service implementing connectionTokenBinder, typically the hub service id), then splice a target endpoint onto the hub as a first-class participant with that slot's managed identity and a granted serviceId namespace (--granted-service-id, defaulting to <slot>). No local hub is started: the CLI proxies the connection (target
|
|
9510
|
+
program.command("connect-as <binderServiceId> <slot>").description("Mint a single-use identity token for <slot> from the <binderServiceId> (a service implementing connectionTokenBinder, typically the hub service id), then splice a target endpoint onto the hub as a first-class participant with that slot's managed identity and a granted serviceId namespace (--granted-service-id, defaulting to <slot>). No local hub is started: the CLI proxies the connection (target ⟷ CLI ⟷ hub), so it works with every target kind and --log-messages taps the full flow. The hub-facing bound-token listener is --hub-endpoint (defaults to --endpoint when that is a ws/socket). Runs until Ctrl-C.").option("--hub-endpoint <uri>", "ws/socket bound-token listener to splice the target onto (default: --endpoint)").option("--target-endpoint <uri>", "target endpoint URI (unix:/…, ws[s]://…)").option("--target-endpoint-cmd <command>", "spawn the target as a server; it dials the CLI back").option("--target-endpoint-cmd-stdio <command>", "spawn the target and talk linkrpc over its stdio").option("--target-endpoint-cmd-env <key=value>", "env var for the --target-endpoint-cmd / --target-endpoint-cmd-stdio child (repeatable)", (val, acc) => {
|
|
9454
9511
|
const eq = val.indexOf("=");
|
|
9455
9512
|
if (eq === -1) throw new InvalidArgumentError(`expected key=value, got '${val}'`);
|
|
9456
9513
|
const next = acc ?? {};
|
|
@@ -9573,7 +9630,7 @@ Batch options:
|
|
|
9573
9630
|
process.once("SIGINT", onSignal);
|
|
9574
9631
|
process.once("SIGTERM", onSignal);
|
|
9575
9632
|
try {
|
|
9576
|
-
const { runApprovalUi } = await import("./runApprovalUi-
|
|
9633
|
+
const { runApprovalUi } = await import("./runApprovalUi-BLZTrXDW.js");
|
|
9577
9634
|
await runApprovalUi({
|
|
9578
9635
|
client,
|
|
9579
9636
|
signal: stop.signal
|
|
@@ -9588,7 +9645,7 @@ Batch options:
|
|
|
9588
9645
|
registerViewCommands(program, (action) => withChannel(endpoint, getPrincipalSpec(), action));
|
|
9589
9646
|
program.command("ui").description("Launch the terminal UI (form-based browser of services + methods).").action(async () => {
|
|
9590
9647
|
const acquired = await acquireConnection(endpoint);
|
|
9591
|
-
const { runUi } = await import("./runUi-
|
|
9648
|
+
const { runUi } = await import("./runUi-BusCK0Ka.js");
|
|
9592
9649
|
try {
|
|
9593
9650
|
await runUi({
|
|
9594
9651
|
endpoint: acquired.ep,
|
|
@@ -9850,11 +9907,11 @@ async function withChannel(endpoint, principalSpec, fn, opts = {}) {
|
|
|
9850
9907
|
const channel = schemaSource === void 0 ? conn.channel : withStaticHubReflection(conn.channel, await loadStaticHubSchema(schemaSource));
|
|
9851
9908
|
if (acquired.ep.kind === "ws-no-init" || acquired.ep.kind === "socket" && acquired.ep.brokerMode === "raw") {
|
|
9852
9909
|
if (opts.requireSigning || g_invocation?.values.sign === true) throw new Error("Signing requires an initialized LinkRPC endpoint.");
|
|
9853
|
-
await fn(channel);
|
|
9910
|
+
await fn(channel, void 0, conn.closed);
|
|
9854
9911
|
return;
|
|
9855
9912
|
}
|
|
9856
9913
|
if (!sign) {
|
|
9857
|
-
await fn(channel);
|
|
9914
|
+
await fn(channel, void 0, conn.closed);
|
|
9858
9915
|
return;
|
|
9859
9916
|
}
|
|
9860
9917
|
const session = await setupSigning(conn.channel, conn.signing, principalSpec, {
|
|
@@ -9868,7 +9925,7 @@ async function withChannel(endpoint, principalSpec, fn, opts = {}) {
|
|
|
9868
9925
|
if (opts.requestTopologyAccess !== void 0 && (acquired.running !== void 0 || isHubEndpoint(acquired.ep))) {
|
|
9869
9926
|
if (await requestTopologyAccess(session, opts.requestTopologyAccess) === "denied") process.stderr.write("linkrpc: topology access denied; topology sources may be inaccessible.\n");
|
|
9870
9927
|
}
|
|
9871
|
-
await fn(channel, session);
|
|
9928
|
+
await fn(channel, session, conn.closed);
|
|
9872
9929
|
} finally {
|
|
9873
9930
|
conn.close();
|
|
9874
9931
|
acquired.running?.dispose();
|
|
@@ -9941,7 +9998,7 @@ let g_logTransport = false;
|
|
|
9941
9998
|
/**
|
|
9942
9999
|
* Build the wire-tap options for a direct {@link connect}, or `undefined` when
|
|
9943
10000
|
* `--log-messages` is off. Logs every JSON-RPC message crossing the client
|
|
9944
|
-
* transport to stderr, rendered like the hub "Flows" view
|
|
10001
|
+
* transport to stderr, rendered like the hub "Flows" view — the way to observe
|
|
9945
10002
|
* a connection that never routes through a local hub.
|
|
9946
10003
|
*/
|
|
9947
10004
|
function wireLog(remoteLabel) {
|
|
@@ -10005,7 +10062,7 @@ function ignoredEndpointEnvironmentHint() {
|
|
|
10005
10062
|
}
|
|
10006
10063
|
/** The `--target-endpoint*` options shared by `tunnel` and `proxy`. */
|
|
10007
10064
|
function addTargetEndpointOptions(command) {
|
|
10008
|
-
return command.option("--target-endpoint <uri>", "target endpoint URI (unix:/path?token
|
|
10065
|
+
return command.option("--target-endpoint <uri>", "target endpoint URI (unix:/path?token=…, npipe://./pipe/…, ws[s]://host?token=…, cmd:?command=… or cmd-stdio:?command=…)").option("--target-endpoint-cmd <command>", "spawn the target as a server, connect via an injected env socket; the child sees the claimed service id as grantedServiceIdNamespace via hubGrantedServiceId::get").option("--target-endpoint-cmd-stdio <command>", "spawn the target and talk linkrpc over its stdio").option("--target-endpoint-cmd-env <key=value>", "env var for the --target-endpoint-cmd / --target-endpoint-cmd-stdio child (repeatable)", (val, acc) => {
|
|
10009
10066
|
const eq = val.indexOf("=");
|
|
10010
10067
|
if (eq === -1) throw new InvalidArgumentError(`expected key=value, got '${val}'`);
|
|
10011
10068
|
const next = acc ?? {};
|
|
@@ -10038,7 +10095,7 @@ function resolveTargetEndpointOrExit(opts, globalOpts, commandName) {
|
|
|
10038
10095
|
} : targetEp;
|
|
10039
10096
|
}
|
|
10040
10097
|
/**
|
|
10041
|
-
* Connect straight to a target endpoint
|
|
10098
|
+
* Connect straight to a target endpoint — no routing hub. A spawned cmd-env
|
|
10042
10099
|
* child is fronted with a RootOverlay: its root-form calls (identity::*,
|
|
10043
10100
|
* hubGrantedServiceId::*, reflection, hubAccess) are served locally while every
|
|
10044
10101
|
* forwarded request is relayed to the child through the overlay splitter. This
|
|
@@ -10168,4 +10225,4 @@ function definedEnv(env) {
|
|
|
10168
10225
|
//#endregion
|
|
10169
10226
|
export { formatCondition as _, formatCommandLegend as a, targetId as b, safeTerminalText as c, ObservablePromise as d, observableValue as f, resolveViewTarget as g, Disposable as h, dispatchHostKey as i, approvalDetailLines as l, derived as m, views as n, hostCommands as o, autorun as p, ViewFrame as r, matchesKey as s, runCli as t, ObservableLazyPromise as u, interfaceTarget as v, matchesTarget as y };
|
|
10170
10227
|
|
|
10171
|
-
//# sourceMappingURL=cli-
|
|
10228
|
+
//# sourceMappingURL=cli-DlRKUZEu.js.map
|