@hediet/linkrpc-cli 0.0.3-next.20261025.1 → 0.0.3-next.20261025.2

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 CHANGED
@@ -940,7 +940,7 @@ Value-taking options support both `--option=value` and `--option value`.
940
940
  Parameter assignment itself still uses `key=value`, e.g.
941
941
  `--param path=/docs/a` or `--param=path=/docs/a`. Use the equals form for
942
942
  dash-prefixed values. Quote JSON and strings containing spaces.
943
- `--cap:request`, `--cap:allow-any`, and `--cap:delegate` are switches with no value.
943
+ `--cap:request` and `--cap:allow-any` are switches with no value.
944
944
  The older `--request-cap`, `--allow-param`, and `--duration` spellings have
945
945
  been replaced by the `--cap:` options.
946
946
 
@@ -950,9 +950,6 @@ Schema validation is mandatory for explicit requests: `--no-validate` and
950
950
  the permission; signed calls include that hash in their signed metadata.
951
951
  The default requested duration is `persistent`; `--cap:duration shortLived` and
952
952
  `--cap:duration longLived` are also supported. The Hub still decides what to grant.
953
- `--cap:delegate` also requests `canDelegate`, so the identity can issue narrower
954
- capabilities for that scope to other identities, e.g. a service it runs; a
955
- stored grant without delegation does not satisfy such a request.
956
953
  One-shot approval cannot satisfy a reusable scope and is rejected.
957
954
 
958
955
  Fresh durable grants for the selected principal are reused when they cover
@@ -1,4 +1,4 @@
1
- import { $ as requestTopologyAccess, B as proxyCommand, Ct as MethodRefWithOptHash, F as disconnectBroker, G as parseDuration, H as withStaticHubReflection, I as getBrokerStatus, L as readBrokerNotifications, M as readEndpointDiscovery, N as ContextStore, P as formatContextReference, Q as requestReflectionAccess, R as stopConnectionBroker, St as parseParamOverride, U as parseConnectionLimit, V as tunnelCommand, W as parseConnectionLimitMilliseconds, _t as describeSchema, a as resolveInvocationEndpoint, c as resolveLocalEndpoint, ct as readCliIdentity, dt as connect, et as setupSigning, ft as connectViaRootOverlay, gt as describeObjectParams, ht as resolvedEndpointToConfig, i as resolveInvocationContext, it as walkHub, lt as formatPrincipalSource, m as managedEndpointsInterface, mt as resolveTargetEndpoint, n as loadStaticHubSchema, nt as fetchSchema$1, o as resolveSigning, ot as cliIdentityTarget, pt as connectViaTransport, q as resolveCliInvocation, r as resolveStaticHubSchemaSource, rt as findMethodInSchema, s as validationDefault, st as deleteCliIdentity, t as completeForLine, tt as fetchDefaults, ut as parsePrincipalSpec, vt as explainValidation, wt as mcpForwardInterface, xt as mergeParams, y as HubHome, yt as validateValueAgainstSchema, z as ConnectionBroker } from "./runComplete-bFjlzR3Y.js";
1
+ import { $ as requestTopologyAccess, B as proxyCommand, Ct as MethodRefWithOptHash, F as disconnectBroker, G as parseDuration, H as withStaticHubReflection, I as getBrokerStatus, L as readBrokerNotifications, M as readEndpointDiscovery, N as ContextStore, P as formatContextReference, Q as requestReflectionAccess, R as stopConnectionBroker, St as parseParamOverride, U as parseConnectionLimit, V as tunnelCommand, W as parseConnectionLimitMilliseconds, _t as describeSchema, a as resolveInvocationEndpoint, c as resolveLocalEndpoint, ct as readCliIdentity, dt as connect, et as setupSigning, ft as connectViaRootOverlay, gt as describeObjectParams, ht as resolvedEndpointToConfig, i as resolveInvocationContext, it as walkHub, lt as formatPrincipalSource, m as managedEndpointsInterface, mt as resolveTargetEndpoint, n as loadStaticHubSchema, nt as fetchSchema$1, o as resolveSigning, ot as cliIdentityTarget, pt as connectViaTransport, q as resolveCliInvocation, r as resolveStaticHubSchemaSource, rt as findMethodInSchema, s as validationDefault, st as deleteCliIdentity, t as completeForLine, tt as fetchDefaults, ut as parsePrincipalSpec, vt as explainValidation, wt as mcpForwardInterface, xt as mergeParams, y as HubHome, yt as validateValueAgainstSchema, z as ConnectionBroker } from "./runComplete-1DjMsU_0.js";
2
2
  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";
3
3
  import { z } from "zod";
4
4
  import { WebSocketTransport, connectNdjson, connectToHub, formatEndpointUri, isHubEndpoint, openWebSocket, parseEndpointUri, runInitializeHandshake, traceMessageTransport as traceMessageTransport$1 } from "@hediet/linkrpc/node";
@@ -407,7 +407,7 @@ function contextNamespace(reference) {
407
407
  async function useLocalManagement(start, action) {
408
408
  const home = HubHome.resolve();
409
409
  if (start) {
410
- const { startDaemon, nodeDaemonLaunch } = await import("./src-B71xYgEO.js");
410
+ const { startDaemon, nodeDaemonLaunch } = await import("./src-DPg65Jd1.js");
411
411
  if (await startDaemon({
412
412
  home,
413
413
  launch: nodeDaemonLaunch(home)
@@ -427,7 +427,7 @@ async function useLocalManagement(start, action) {
427
427
  }
428
428
  }
429
429
  async function restartLocalDaemon() {
430
- const { startDaemon, stopDaemon, nodeDaemonLaunch } = await import("./src-B71xYgEO.js");
430
+ const { startDaemon, stopDaemon, nodeDaemonLaunch } = await import("./src-DPg65Jd1.js");
431
431
  const home = HubHome.resolve();
432
432
  process.stderr.write("Restarting the local Hub daemon: clients will disconnect and managed workloads will stop. OS autostart settings are unchanged.\n");
433
433
  await stopDaemon(home);
@@ -947,7 +947,6 @@ async function requestCallCapability(channel, session, ref, params, schema, opts
947
947
  ...ref.hash !== void 0 ? { interfaceHash: ref.hash } : {}
948
948
  },
949
949
  canInvoke: true,
950
- ...opts.delegate === true ? { canDelegate: true } : {},
951
950
  params: matchers
952
951
  };
953
952
  const coverageOptions = {
@@ -8780,7 +8779,7 @@ async function main(rawArgv, executableName = "linkrpc") {
8780
8779
  "shortLived",
8781
8780
  "longLived",
8782
8781
  "persistent"
8783
- ]).default("persistent")).option("--cap:delegate", "also request the right to delegate this authority (canDelegate) to other identities");
8782
+ ]).default("persistent"));
8784
8783
  const configureCall = (cmd, capabilityOnly) => {
8785
8784
  cmd.description((capabilityOnly ? "Request a capability without executing a call. " : "Invoke a request. ") + "`<methodRef>` is `[svc::][iface::]method[@hash]`. Use `--p:<name> <value>` (or `--p:<name>=<value>`) as a shortcut for `--param <name>=<value>`. Run `hub call <methodRef> --help` to see the method-specific `--p:` flags derived from the live schema.").option("--params <json>", "inline params JSON, or \"-\" to read stdin").option("--param <kv...>", "param override, key=value (JSON or string)").option("--no-validate", "skip schema-based param validation").helpOption(false).option("-h, --help", "show help (includes method params when reachable)").action(async (methodRef, opts, cmd) => {
8786
8785
  if (opts.help) {
@@ -8796,7 +8795,6 @@ async function main(rawArgv, executableName = "linkrpc") {
8796
8795
  const allowParams = opts["cap:allowParam"];
8797
8796
  if (!capabilityOnly && allowParams !== void 0 && !requestCap) throw new Error("--cap:allow-param requires --cap:request.");
8798
8797
  if (!capabilityOnly && cmd.getOptionValueSource("cap:duration") === "cli" && !requestCap) throw new Error("--cap:duration requires --cap:request.");
8799
- if (!capabilityOnly && opts["cap:delegate"] === true && !requestCap) throw new Error("--cap:delegate requires --cap:request.");
8800
8798
  resolveSigning(profile, g_invocation?.values ?? {}, capabilityOnly || requestCap);
8801
8799
  const validation = opts.validate === false ? "off" : effectiveValidation(profile);
8802
8800
  if ((capabilityOnly || requestCap) && validation === "off") throw new Error("Capability requests require schema validation; remove --no-validate/--validation off.");
@@ -8810,8 +8808,7 @@ async function main(rawArgv, executableName = "linkrpc") {
8810
8808
  requestCap,
8811
8809
  capabilityOnly,
8812
8810
  signingSession: session,
8813
- duration: opts["cap:duration"],
8814
- delegate: opts["cap:delegate"] === true
8811
+ duration: opts["cap:duration"]
8815
8812
  });
8816
8813
  process.stdout.write(out + "\n");
8817
8814
  }, {
@@ -9260,7 +9257,7 @@ Batch options:
9260
9257
  process.once("SIGINT", onSignal);
9261
9258
  process.once("SIGTERM", onSignal);
9262
9259
  try {
9263
- const { runApprovalUi } = await import("./runApprovalUi--TML-1-H.js");
9260
+ const { runApprovalUi } = await import("./runApprovalUi-DTSdmhod.js");
9264
9261
  await runApprovalUi({
9265
9262
  client,
9266
9263
  signal: stop.signal
@@ -9275,7 +9272,7 @@ Batch options:
9275
9272
  registerViewCommands(program, (action) => withChannel(endpoint, getPrincipalSpec(), action));
9276
9273
  program.command("ui").description("Launch the terminal UI (form-based browser of services + methods).").action(async () => {
9277
9274
  const acquired = await acquireConnection(endpoint);
9278
- const { runUi } = await import("./runUi-CziO0efi.js");
9275
+ const { runUi } = await import("./runUi-C8VfjCWT.js");
9279
9276
  try {
9280
9277
  await runUi({
9281
9278
  endpoint: acquired.ep,
@@ -9838,4 +9835,4 @@ function safeJson(value) {
9838
9835
  //#endregion
9839
9836
  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 };
9840
9837
 
9841
- //# sourceMappingURL=cli-DHK9RSd9.js.map
9838
+ //# sourceMappingURL=cli-BZ-4lHyj.js.map