@indigoai-us/hq-cli 5.345.18 → 5.345.20

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.
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk';
2
2
  import { peekHqApiKey, requireApiKeyCapability, } from '../utils/resolve-vault-credential.js';
3
- import { MARKETPLACE_PREFIX, installPack, sourceMatchesPackPattern, } from './pack-install.js';
3
+ import { MARKETPLACE_PREFIX, PINNED_HQ_ANYWHERE_SOURCE, installPack, sourceMatchesPackPattern, } from './pack-install.js';
4
4
  import { anywhereRuntimeEnabled } from './anywhere-runtime-flag.js';
5
5
  /**
6
6
  * True when `source` installs through the marketplace — an explicit
@@ -99,11 +99,12 @@ export function registerPackageInstallCommand(parent) {
99
99
  console.error(chalk.red('Install failed:'), 'HQ Anywhere installation is disabled by the hq-anywhere-runtime flag.');
100
100
  process.exit(1);
101
101
  }
102
- await installPack('github:indigoai-us/hq-packages#packages/hq-pack-hq-anywhere', {
102
+ await installPack(PINNED_HQ_ANYWHERE_SOURCE, {
103
103
  company: opts.company,
104
104
  allowHooks: opts.allowHooks,
105
105
  allowMcp: opts.allowMcp,
106
106
  followBranch: opts.branch,
107
+ allowPinnedHqAnywhereName: true,
107
108
  });
108
109
  return;
109
110
  }
@@ -21,8 +21,8 @@ export interface DaemonLockConflictOutcome {
21
21
  }
22
22
  /** Preserve the legacy lock failure unless Anywhere explicitly enables the no-op behavior. */
23
23
  export declare function daemonLockConflictOutcome(lock: DaemonLockResult, anywhereEnabled: boolean): DaemonLockConflictOutcome | null;
24
- /** Node's Windows named-pipe API uses a default DACL that is not user-scoped. */
25
- export declare function hqdStartupRefusal(platform: NodeJS.Platform, anywhereEnabled: boolean): string | null;
24
+ /** hqd is available on every platform while Anywhere is enabled; its listener fails closed if setup is unsafe. */
25
+ export declare function shouldStartHqd(anywhereEnabled: boolean): boolean;
26
26
  /** Route an updater request through the daemon's existing graceful handoff. */
27
27
  export declare function handoffForPackageUpdateRequest(requested: boolean, restartDaemon: () => void): void;
28
28
  export interface RunDaemonOptions {
@@ -63,11 +63,9 @@ export function daemonLockConflictOutcome(lock, anywhereEnabled) {
63
63
  : "another hq daemon is starting up.\n",
64
64
  };
65
65
  }
66
- /** Node's Windows named-pipe API uses a default DACL that is not user-scoped. */
67
- export function hqdStartupRefusal(platform, anywhereEnabled) {
68
- if (platform !== "win32" || !anywhereEnabled)
69
- return null;
70
- return "hqd is disabled on Windows because the default named-pipe ACL grants read access to Everyone and Anonymous accounts.";
66
+ /** hqd is available on every platform while Anywhere is enabled; its listener fails closed if setup is unsafe. */
67
+ export function shouldStartHqd(anywhereEnabled) {
68
+ return anywhereEnabled;
71
69
  }
72
70
  /** Route an updater request through the daemon's existing graceful handoff. */
73
71
  export function handoffForPackageUpdateRequest(requested, restartDaemon) {
@@ -838,8 +836,7 @@ export async function runDaemon(opts) {
838
836
  // hqd: the session/company socket every runtime talks to (hq-anywhere US-008).
839
837
  let hqd = null;
840
838
  let hqdShutdown = null;
841
- if (anywhereRuntimeEnabled()) {
842
- const refusal = hqdStartupRefusal(platform, true);
839
+ if (shouldStartHqd(anywhereRuntimeEnabled())) {
843
840
  try {
844
841
  const startConfig = readDaemonConfig(paths.configPath);
845
842
  hqd = await startHqdServer({
@@ -852,10 +849,7 @@ export async function runDaemon(opts) {
852
849
  });
853
850
  }
854
851
  catch (err) {
855
- if (refusal && err.message === refusal)
856
- log("error", refusal);
857
- else
858
- log("error", `hqd socket did not start; services run without it: ${err.message}`);
852
+ log("error", `hqd socket did not start; services run without it: ${err.message}`);
859
853
  }
860
854
  }
861
855
  // US-012: 60s presence heartbeat with version and session count.
@@ -182,7 +182,7 @@ function runtimeHealthCheck(health, healthUnsupported = false, serviceState) {
182
182
  ? "Windows named pipe (mode and owner are not reported)"
183
183
  : `mode ${socket.mode ?? "unknown"}; owner matches current user: ${socket.ownerMatchesUser === null ? "unknown" : socket.ownerMatchesUser ? "yes" : "no"}; user-only: ${socket.userOnly === null ? "unknown" : socket.userOnly ? "yes" : "no"}`;
184
184
  const unreachableMessage = socket.transport === "windows_named_pipe"
185
- ? `hqd is not reachable on ${socket.path}; Windows daemon startup is refused because named-pipe ACLs are unsupported`
185
+ ? `hqd is not reachable on ${socket.path}; secure Windows named-pipe setup may have refused an unsafe ACL`
186
186
  : `hqd is not reachable on ${socket.path}; version, uptime, flag state, and cwd binding are unavailable`;
187
187
  const socketNotUserOnly = health.reachable && socket.transport === "unix_socket" && (socket.userOnly !== true || socket.ownerMatchesUser !== true);
188
188
  const warningNotes = [
@@ -192,7 +192,7 @@ function runtimeHealthCheck(health, healthUnsupported = false, serviceState) {
192
192
  const message = health.reachable
193
193
  ? `hqd reachable; version ${health.version ?? "unknown"}; uptime ${health.uptimeMs === null ? "unknown" : `${new Intl.NumberFormat("en-US").format(health.uptimeMs)} ms`}; runtime flag ${flagLabel}; last successful flag read ${age} ago; held through read error: ${flag.heldThroughReadError ? "yes" : "no"}; cwd binding ${binding}; socket ${socket.path}; ${socketSecurity}${warningNotes.length ? `; ${warningNotes.join("; ")}` : ""}`
194
194
  : unreachableMessage;
195
- const remediation = !health.reachable && socket.transport === "unix_socket" && serviceState
195
+ const remediation = !health.reachable && serviceState
196
196
  ? serviceState.installed ? REMEDIATION.daemonRestart : REMEDIATION.daemonInstall
197
197
  : healthUnsupported || socketNotUserOnly ? REMEDIATION.daemonRestart : undefined;
198
198
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.345.18",
3
+ "version": "5.345.20",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {