@hediet/linkrpc-cli 0.0.3-next.20260922.2 → 0.0.3-next.20260924.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.
@@ -554,12 +554,7 @@ async function startLocalHub(opts) {
554
554
  * to the child regardless. So `hubGrantedServiceId::register` succeeds as a
555
555
  * no-op through this stub link.
556
556
  */
557
- const _noopUpstream = {
558
- claimPrefix: () => {},
559
- releasePrefix: () => false,
560
- edgeId: "overlay-uplink",
561
- dispose: () => {}
562
- };
557
+ const _noopUpstream = { addPrefixRoute: () => {} };
563
558
  async function startLocalOverlay(opts) {
564
559
  const resolveIdentity = _makeIdentityResolver(opts.provisionSlot);
565
560
  const socketPath = SocketServer.allocSocketPath();
@@ -982,17 +977,18 @@ async function _connectCmdStdio(command, env, cwd, log) {
982
977
  ...cwd !== void 0 ? { cwd } : {}
983
978
  });
984
979
  if (!child.stdin || !child.stdout) throw new Error("connect: child process exposes no stdio");
980
+ const input = child.stdin;
981
+ const close = () => {
982
+ if (!input.destroyed && !input.writableEnded) input.end();
983
+ if (!child.killed) child.kill();
984
+ };
985
985
  const { transport } = await connectNdjson({
986
986
  input: child.stdout,
987
987
  output: child.stdin,
988
- onClose: () => {
989
- if (!child.killed) child.kill();
990
- },
988
+ onClose: close,
991
989
  trace: log?.trace
992
990
  });
993
- return _makeCliConnection(transport, () => {
994
- if (!child.killed) child.kill();
995
- }, log);
991
+ return _makeCliConnection(transport, close, log);
996
992
  }
997
993
  /**
998
994
  * Start a private in-process hub, spawn the child as a participant, then
@@ -3533,7 +3529,8 @@ var StaticHubReflection = class {
3533
3529
  this._directory = (_schema.services ?? []).flatMap((service) => service.interfaces.map((ref) => ({
3534
3530
  serviceId: service.serviceId,
3535
3531
  interfaceId: ref.interfaceId,
3536
- interfaceHash: ref.interfaceHash
3532
+ interfaceHash: ref.interfaceHash,
3533
+ tags: _schema.interfaceSchemas.find((schema) => schema.id === ref.interfaceId && schema.hash === ref.interfaceHash)?.tags
3537
3534
  })));
3538
3535
  for (const schema of _schema.interfaceSchemas) this._schemasByKey.set(interfaceKey(schema.id, schema.hash), schema);
3539
3536
  for (const item of this._directory) {
@@ -3580,19 +3577,24 @@ var StaticHubReflection = class {
3580
3577
  }
3581
3578
  _listDirectory(params) {
3582
3579
  const parsed = parseDirectoryParams(params);
3583
- if ("error" in parsed) return parsed;
3580
+ if ("error" in parsed || "result" in parsed) return parsed;
3584
3581
  const filtered = this._directory.filter((item) => parsed.interfaceId === void 0 || item.interfaceId === parsed.interfaceId).filter((item) => parsed.serviceId === void 0 || item.serviceId === parsed.serviceId);
3585
3582
  const start = parsed.cursor ?? 0;
3586
3583
  if (start > filtered.length) return invalidParams("directory cursor is outside the result set");
3587
3584
  const end = parsed.limit === void 0 ? filtered.length : Math.min(filtered.length, start + parsed.limit);
3588
3585
  return { result: {
3589
- items: filtered.slice(start, end),
3586
+ items: filtered.slice(start, end).map(({ serviceId, interfaceId, interfaceHash, tags }) => ({
3587
+ serviceId,
3588
+ interfaceId,
3589
+ interfaceHash,
3590
+ ...tags === void 0 ? {} : { tags: [...tags] }
3591
+ })),
3590
3592
  ...end < filtered.length ? { nextCursor: String(end) } : {}
3591
3593
  } };
3592
3594
  }
3593
3595
  _watchDirectory(params, signal) {
3594
3596
  const parsed = parseDirectoryParams(params, false);
3595
- if ("error" in parsed) return Promise.resolve(parsed);
3597
+ if ("error" in parsed || "result" in parsed) return Promise.resolve(parsed);
3596
3598
  return new Promise((resolve) => {
3597
3599
  const done = () => resolve({ result: {} });
3598
3600
  if (signal.aborted) {
@@ -3886,4 +3888,4 @@ function _endpointCacheKey(endpoint, staticSchema) {
3886
3888
  //#endregion
3887
3889
  export { connectViaRootOverlay as A, parseParamOverride as B, findMethodInSchema as C, formatPrincipalSource as D, logoutCliIdentity as E, describeSchema as F, mcpForwardInterface as H, explainValidation as I, validateValueAgainstSchema as L, resolveTargetEndpoint as M, resolvedEndpointToConfig as N, parsePrincipalSpec as O, describeObjectParams as P, valueToConstSchema as R, fetchSchema$1 as S, walkHubDetailed as T, MethodRefWithOptHash as V, ChannelDirectorySource as _, resolveStaticHubSchemaSource as a, setupSigning as b, resolveInvocationEndpoint as c, formatContextReference as d, complete as f, parseLine as g, COMMAND_TREE as h, loadStaticHubSchema as i, connectViaTransport as j, connect as k, validationDefault as l, resolveSlot as m, StaticHubReflection as n, mutationReference as o, resolveCliInvocation as p, withStaticHubReflection as r, resolveInvocationContext as s, completeForLine as t, ContextStore as u, requestReflectionAccess as v, walkHub as w, fetchDefaults as x, requestTopologyAccess as y, mergeParams as z };
3888
3890
 
3889
- //# sourceMappingURL=runComplete-Du5wmOdB.js.map
3891
+ //# sourceMappingURL=runComplete-F95L0neY.js.map