@hediet/linkrpc-cli 0.0.3-next.20261104.2 → 0.0.3-next.20261104.3
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 +0 -29
- package/dist/chunks/{cli-DlRKUZEu.js → cli-Bpe0_qmw.js} +15 -72
- package/dist/chunks/cli-Bpe0_qmw.js.map +1 -0
- package/dist/chunks/{runApprovalUi-BLZTrXDW.js → runApprovalUi-DFPbTQBs.js} +3 -3
- package/dist/chunks/{runApprovalUi-BLZTrXDW.js.map → runApprovalUi-DFPbTQBs.js.map} +1 -1
- package/dist/chunks/{runComplete-D9FsRgZ1.js → runComplete-DegvES4g.js} +1 -32
- package/dist/chunks/runComplete-DegvES4g.js.map +1 -0
- package/dist/chunks/{runUi-BusCK0Ka.js → runUi-CXojz1Yf.js} +4 -4
- package/dist/chunks/{runUi-BusCK0Ka.js.map → runUi-CXojz1Yf.js.map} +1 -1
- package/dist/chunks/{scroll-XTaYmTi0.js → scroll-Eli5gGzi.js} +2 -2
- package/dist/chunks/{scroll-XTaYmTi0.js.map → scroll-Eli5gGzi.js.map} +1 -1
- package/dist/chunks/{src-B7DEaKGS.js → src-BMOjXlN5.js} +2 -2
- package/dist/chunks/{src-B7DEaKGS.js.map → src-BMOjXlN5.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-DlRKUZEu.js.map +0 -1
- package/dist/chunks/runComplete-D9FsRgZ1.js.map +0 -1
package/README.md
CHANGED
|
@@ -978,35 +978,6 @@ 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
|
-
|
|
1010
981
|
### Publishing MCP servers
|
|
1011
982
|
|
|
1012
983
|
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-DegvES4g.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-BMOjXlN5.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-BMOjXlN5.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,42 +3552,6 @@ 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
|
-
}
|
|
3591
3555
|
//#endregion
|
|
3592
3556
|
//#region src/commands/jsonRpcStdio.ts
|
|
3593
3557
|
/** Expose a remote `jsonRpcConnection` service as an NDJSON stdio endpoint. */
|
|
@@ -8618,7 +8582,7 @@ async function main(rawArgv, executableName = "linkrpc") {
|
|
|
8618
8582
|
const profile = cliInvocation.profile;
|
|
8619
8583
|
const program = new Command();
|
|
8620
8584
|
program.configureHelp({ showGlobalOptions: true });
|
|
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
|
|
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=…, 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) => {
|
|
8622
8586
|
const eq = val.indexOf("=");
|
|
8623
8587
|
if (eq === -1) throw new InvalidArgumentError(`expected key=value, got '${val}'`);
|
|
8624
8588
|
const next = acc ?? {};
|
|
@@ -8751,7 +8715,7 @@ async function main(rawArgv, executableName = "linkrpc") {
|
|
|
8751
8715
|
return result;
|
|
8752
8716
|
}
|
|
8753
8717
|
});
|
|
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\":\"
|
|
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\":\"…\",\"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) => {
|
|
8755
8719
|
await withChannel(endpoint, getPrincipalSpec(), async (channel) => {
|
|
8756
8720
|
if (serviceId === void 0) {
|
|
8757
8721
|
process.stdout.write(`${await listConsoleTargets(channel)}\n`);
|
|
@@ -9367,27 +9331,6 @@ Batch options:
|
|
|
9367
9331
|
autoNegotiatePerCall: true
|
|
9368
9332
|
});
|
|
9369
9333
|
});
|
|
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
|
-
});
|
|
9391
9334
|
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) => {
|
|
9392
9335
|
const localEp = needEndpoint(endpoint);
|
|
9393
9336
|
let params;
|
|
@@ -9507,7 +9450,7 @@ Batch options:
|
|
|
9507
9450
|
hub.close();
|
|
9508
9451
|
}
|
|
9509
9452
|
});
|
|
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
|
|
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 ⟷ 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) => {
|
|
9511
9454
|
const eq = val.indexOf("=");
|
|
9512
9455
|
if (eq === -1) throw new InvalidArgumentError(`expected key=value, got '${val}'`);
|
|
9513
9456
|
const next = acc ?? {};
|
|
@@ -9630,7 +9573,7 @@ Batch options:
|
|
|
9630
9573
|
process.once("SIGINT", onSignal);
|
|
9631
9574
|
process.once("SIGTERM", onSignal);
|
|
9632
9575
|
try {
|
|
9633
|
-
const { runApprovalUi } = await import("./runApprovalUi-
|
|
9576
|
+
const { runApprovalUi } = await import("./runApprovalUi-DFPbTQBs.js");
|
|
9634
9577
|
await runApprovalUi({
|
|
9635
9578
|
client,
|
|
9636
9579
|
signal: stop.signal
|
|
@@ -9645,7 +9588,7 @@ Batch options:
|
|
|
9645
9588
|
registerViewCommands(program, (action) => withChannel(endpoint, getPrincipalSpec(), action));
|
|
9646
9589
|
program.command("ui").description("Launch the terminal UI (form-based browser of services + methods).").action(async () => {
|
|
9647
9590
|
const acquired = await acquireConnection(endpoint);
|
|
9648
|
-
const { runUi } = await import("./runUi-
|
|
9591
|
+
const { runUi } = await import("./runUi-CXojz1Yf.js");
|
|
9649
9592
|
try {
|
|
9650
9593
|
await runUi({
|
|
9651
9594
|
endpoint: acquired.ep,
|
|
@@ -9907,11 +9850,11 @@ async function withChannel(endpoint, principalSpec, fn, opts = {}) {
|
|
|
9907
9850
|
const channel = schemaSource === void 0 ? conn.channel : withStaticHubReflection(conn.channel, await loadStaticHubSchema(schemaSource));
|
|
9908
9851
|
if (acquired.ep.kind === "ws-no-init" || acquired.ep.kind === "socket" && acquired.ep.brokerMode === "raw") {
|
|
9909
9852
|
if (opts.requireSigning || g_invocation?.values.sign === true) throw new Error("Signing requires an initialized LinkRPC endpoint.");
|
|
9910
|
-
await fn(channel
|
|
9853
|
+
await fn(channel);
|
|
9911
9854
|
return;
|
|
9912
9855
|
}
|
|
9913
9856
|
if (!sign) {
|
|
9914
|
-
await fn(channel
|
|
9857
|
+
await fn(channel);
|
|
9915
9858
|
return;
|
|
9916
9859
|
}
|
|
9917
9860
|
const session = await setupSigning(conn.channel, conn.signing, principalSpec, {
|
|
@@ -9925,7 +9868,7 @@ async function withChannel(endpoint, principalSpec, fn, opts = {}) {
|
|
|
9925
9868
|
if (opts.requestTopologyAccess !== void 0 && (acquired.running !== void 0 || isHubEndpoint(acquired.ep))) {
|
|
9926
9869
|
if (await requestTopologyAccess(session, opts.requestTopologyAccess) === "denied") process.stderr.write("linkrpc: topology access denied; topology sources may be inaccessible.\n");
|
|
9927
9870
|
}
|
|
9928
|
-
await fn(channel, session
|
|
9871
|
+
await fn(channel, session);
|
|
9929
9872
|
} finally {
|
|
9930
9873
|
conn.close();
|
|
9931
9874
|
acquired.running?.dispose();
|
|
@@ -9998,7 +9941,7 @@ let g_logTransport = false;
|
|
|
9998
9941
|
/**
|
|
9999
9942
|
* Build the wire-tap options for a direct {@link connect}, or `undefined` when
|
|
10000
9943
|
* `--log-messages` is off. Logs every JSON-RPC message crossing the client
|
|
10001
|
-
* transport to stderr, rendered like the hub "Flows" view
|
|
9944
|
+
* transport to stderr, rendered like the hub "Flows" view — the way to observe
|
|
10002
9945
|
* a connection that never routes through a local hub.
|
|
10003
9946
|
*/
|
|
10004
9947
|
function wireLog(remoteLabel) {
|
|
@@ -10062,7 +10005,7 @@ function ignoredEndpointEnvironmentHint() {
|
|
|
10062
10005
|
}
|
|
10063
10006
|
/** The `--target-endpoint*` options shared by `tunnel` and `proxy`. */
|
|
10064
10007
|
function addTargetEndpointOptions(command) {
|
|
10065
|
-
return command.option("--target-endpoint <uri>", "target endpoint URI (unix:/path?token
|
|
10008
|
+
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) => {
|
|
10066
10009
|
const eq = val.indexOf("=");
|
|
10067
10010
|
if (eq === -1) throw new InvalidArgumentError(`expected key=value, got '${val}'`);
|
|
10068
10011
|
const next = acc ?? {};
|
|
@@ -10095,7 +10038,7 @@ function resolveTargetEndpointOrExit(opts, globalOpts, commandName) {
|
|
|
10095
10038
|
} : targetEp;
|
|
10096
10039
|
}
|
|
10097
10040
|
/**
|
|
10098
|
-
* Connect straight to a target endpoint
|
|
10041
|
+
* Connect straight to a target endpoint — no routing hub. A spawned cmd-env
|
|
10099
10042
|
* child is fronted with a RootOverlay: its root-form calls (identity::*,
|
|
10100
10043
|
* hubGrantedServiceId::*, reflection, hubAccess) are served locally while every
|
|
10101
10044
|
* forwarded request is relayed to the child through the overlay splitter. This
|
|
@@ -10225,4 +10168,4 @@ function definedEnv(env) {
|
|
|
10225
10168
|
//#endregion
|
|
10226
10169
|
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 };
|
|
10227
10170
|
|
|
10228
|
-
//# sourceMappingURL=cli-
|
|
10171
|
+
//# sourceMappingURL=cli-Bpe0_qmw.js.map
|