@indigoai-us/hq-cli 5.341.1 → 5.341.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/CHANGELOG.md +17 -0
- package/assets/hqd/windows-pipe-host.ps1 +282 -0
- package/dist/bin/hq-auth-refresh.d.ts +1 -1
- package/dist/bin/hq-auth-refresh.js +11 -2
- package/dist/commands/billing-sponsor.js +20 -1
- package/dist/commands/core-derive-trigger-facts-native.d.ts +2 -0
- package/dist/commands/core-derive-trigger-facts-native.js +92 -25
- package/dist/commands/core-migrate-policy-triggers-native.d.ts +1 -0
- package/dist/commands/core-migrate-policy-triggers-native.js +26 -12
- package/dist/commands/doctor.js +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +17 -1
- package/dist/lib/aws-sdk-node-warning-output.js +2 -3
- package/dist/lib/billing/plan-lock.js +19 -2
- package/dist/lib/bot/owner-context.d.ts +2 -0
- package/dist/lib/bot/owner-context.js +19 -1
- package/dist/lib/daemon/flag-monitor.d.ts +23 -0
- package/dist/lib/daemon/flag-monitor.js +99 -0
- package/dist/lib/daemon/flag.d.ts +2 -0
- package/dist/lib/daemon/flag.js +10 -1
- package/dist/lib/daemon/protocol.d.ts +26 -3
- package/dist/lib/daemon/protocol.js +9 -5
- package/dist/lib/daemon/run.js +14 -16
- package/dist/lib/daemon/server.d.ts +23 -2
- package/dist/lib/daemon/server.js +397 -52
- package/dist/lib/daemon/windows-pipe-host.d.ts +17 -0
- package/dist/lib/daemon/windows-pipe-host.js +218 -0
- package/dist/lib/diagnostics.d.ts +9 -0
- package/dist/lib/diagnostics.js +12 -0
- package/dist/lib/doctor/checks/anywhere.d.ts +6 -1
- package/dist/lib/doctor/checks/anywhere.js +131 -13
- package/dist/lib/doctor/json-output.d.ts +2 -0
- package/dist/lib/doctor/json-output.js +1 -0
- package/dist/lib/doctor/registry.js +1 -3
- package/dist/lib/doctor/types.d.ts +4 -0
- package/dist/utils/package-use-lease.d.ts +4 -0
- package/dist/utils/package-use-lease.js +28 -0
- package/dist/utils/run-bundled-script.d.ts +2 -0
- package/dist/utils/run-bundled-script.js +10 -1
- package/dist/utils/vault-api.js +12 -12
- package/docs/anywhere-runtime.md +49 -5
- package/package.json +2 -1
package/docs/anywhere-runtime.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# HQ Anywhere runtime
|
|
2
2
|
|
|
3
3
|
HQ Anywhere installs global hooks for supported agent runtimes and uses the
|
|
4
|
-
local hqd daemon on macOS and
|
|
5
|
-
|
|
4
|
+
local hqd daemon on macOS, Linux, and Windows. On Windows, hqd uses a bundled
|
|
5
|
+
PowerShell pipe host that applies and verifies a user-only named-pipe DACL
|
|
6
|
+
before becoming ready. A per-user
|
|
6
7
|
registry links repositories to HQ companies. The `hq-anywhere-runtime` flag
|
|
7
8
|
controls these features and is off by default.
|
|
8
9
|
|
|
@@ -26,14 +27,57 @@ The CLI stores the HQ root at `~/.hq/root` and keeps the folder registry in
|
|
|
26
27
|
`~/.hq/registry.json`. These files belong to the current host. They are not
|
|
27
28
|
stored in a repository or synced HQ folder.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
Windows requires Windows PowerShell 5.1 or PowerShell 7 for the bundled pipe
|
|
31
|
+
host. If it is unavailable, the pipe cannot be created with a verified
|
|
32
|
+
current-user-only DACL, or another process already owns the pipe name, hqd
|
|
33
|
+
refuses to start. The `hq-anywhere-runtime` flag remains off by default on all
|
|
34
|
+
platforms.
|
|
35
|
+
|
|
36
|
+
On macOS and Linux, hqd checks the socket directory and socket path with
|
|
37
|
+
`lstat` before serving. It refuses symlinked, shared, or foreign-owned paths.
|
|
38
|
+
The default socket is under `~/.hq/daemon/`, separate from the registry directory;
|
|
39
|
+
a directory created for the socket is set to `0700`. hqd replaces a stale
|
|
40
|
+
socket only when the current user owns it, then verifies the listening socket
|
|
41
|
+
is `0600`. If a check fails, hqd reports the path and stops without removing an
|
|
42
|
+
unexpected file.
|
|
32
43
|
|
|
33
44
|
When the flag is enabled, the global hook uses hqd for events outside the HQ
|
|
34
45
|
root. Inside the root, the project hook routes through hqd when it is running
|
|
35
46
|
and uses the direct master hook when it is stopped.
|
|
36
47
|
|
|
48
|
+
## Flag revocation
|
|
49
|
+
|
|
50
|
+
While hqd is running, it refreshes `hq-anywhere-runtime` every 30 seconds.
|
|
51
|
+
Successful reads are never trusted for more than 60 seconds. This gives a
|
|
52
|
+
healthy flag service a 30-second revocation window while limiting reads to two
|
|
53
|
+
per minute per daemon; the five-second flag request timeout bounds the work
|
|
54
|
+
when the service is slow. Staleness uses elapsed monotonic time, so wall-clock
|
|
55
|
+
corrections cannot extend an ON decision.
|
|
56
|
+
|
|
57
|
+
When a read fails, hqd keeps the last successful value only until it is 60
|
|
58
|
+
seconds old. After that, it fails closed. An OFF decision refuses new daemon
|
|
59
|
+
login and hosted MCP calls with `anywhere_disabled` and clears any stdin machine
|
|
60
|
+
token held in memory. `auth.status` remains available and reports signed out.
|
|
61
|
+
An authentication still in progress when revocation arrives fails cleanly;
|
|
62
|
+
hosted MCP calls already forwarded are allowed to finish or return their normal
|
|
63
|
+
request error. The daemon process itself does not terminate.
|
|
64
|
+
|
|
65
|
+
## Diagnose the runtime
|
|
66
|
+
|
|
67
|
+
`hq doctor` reports hqd reachability, version and uptime, the last successful
|
|
68
|
+
runtime-flag read and its age, and whether hqd is holding that decision after a
|
|
69
|
+
read error. It also reports the company selected for the current directory or
|
|
70
|
+
the reason it fell back to personal context. On Unix, the socket line includes
|
|
71
|
+
its permission mode, owner check and whether it is user-only. Windows reports
|
|
72
|
+
the named-pipe transport without Unix mode or owner fields. Use `hq doctor
|
|
73
|
+
--json` for the same fields as structured details. The hqd health operation is
|
|
74
|
+
read-only and available while the runtime flag is off; it reports only the
|
|
75
|
+
current directory's binding and never returns authentication tokens. A Unix
|
|
76
|
+
socket that cannot be verified as user-only produces a warning. If an older
|
|
77
|
+
resident daemon does not support the health operation, doctor falls back to
|
|
78
|
+
`ping` for reachability, version and uptime, then warns that a restart is needed
|
|
79
|
+
for full diagnostics.
|
|
80
|
+
|
|
37
81
|
## Link a repository
|
|
38
82
|
|
|
39
83
|
Run `hq link <company>` from a repository to associate it with a company. The
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoai-us/hq-cli",
|
|
3
|
-
"version": "5.341.
|
|
3
|
+
"version": "5.341.3",
|
|
4
4
|
"description": "HQ by Indigo management CLI — modules and cloud sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"assets/scaffold",
|
|
14
14
|
"assets/bot-workers",
|
|
15
15
|
"assets/mesh-daemon",
|
|
16
|
+
"assets/hqd",
|
|
16
17
|
"assets/lanes-reconcile",
|
|
17
18
|
"assets/lanes-hooks",
|
|
18
19
|
"templates",
|