@ngockhoale/ukit 2.4.0 → 2.4.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to UKit are documented here.
4
4
 
5
+ ## 2.4.1 - 2026-09-14
6
+
7
+ Fix: the skill-router hook could hang the session and leak an orphaned process. `skill-router.sh`
8
+ runs on the `UserPromptSubmit`/`PreToolUse` hot path. Unlike its sibling hooks
9
+ (`task-watchdog.sh`, `handoff-resume.sh`), its node heredoc had no self-deadline watchdog: when
10
+ indexed-context resolution hung (a wedged import, a stalled mount), the host killed only the bash
11
+ wrapper with the node grandchild reparented to launchd and spinning forever — one orphan per run,
12
+ hundreds accumulated over days, adding sustained RSS pressure that presented as UKit freezing with
13
+ no message. The hook now arms the same wall-clock watchdog its siblings carry
14
+ (`setTimeout(() => process.exit(0), HOOK_DEADLINE_MS).unref()`, default 3000 ms, overridable via
15
+ `UKIT_HOOK_DEADLINE_MS`), so a hang can never outlive the hook. Early exit only drops the routing
16
+ hint — the same posture as a cache miss, and advisory-only as the hook already is. Applied
17
+ byte-identically to the live and shipped (template) copies.
18
+
5
19
  ## 2.4.0 - 2026-09-14
6
20
 
7
21
  Solution-discipline wording + offline instruments. This release is **additive**: it changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngockhoale/ukit",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Install/update an index-first AI workspace for Claude Code, OpenAI Codex, OpenCode, and omp (Oh My Pi).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -102,6 +102,17 @@ const path = require('path');
102
102
  const crypto = require('crypto');
103
103
  const { pathToFileURL } = require('url');
104
104
 
105
+ // Wall-clock watchdog. This hook runs on the UserPromptSubmit/PreToolUse hot path but has
106
+ // no host-side process-group kill: when indexed-context resolution hangs (a wedged import,
107
+ // a stalled mount), the host kills only THIS bash wrapper, the node grandchild below is
108
+ // reparented to launchd, and it spins forever. Verified: exactly one orphan leaked per run
109
+ // of the router timeout test, 200+ accumulated over days. Self-exit at the deadline so a
110
+ // hang can never outlive the hook. Advisory only — an early exit just drops the routing
111
+ // hint, the same posture as a cache miss. Same watchdog task-watchdog.sh/handoff-resume.sh
112
+ // already carry; keep this one aligned with them.
113
+ const HOOK_DEADLINE_MS = Number.parseInt(process.env.UKIT_HOOK_DEADLINE_MS || '', 10) || 3000;
114
+ setTimeout(() => process.exit(0), HOOK_DEADLINE_MS).unref();
115
+
105
116
  (async () => {
106
117
  const STOPWORDS = new Set([
107
118
  'the', 'a', 'an', 'and', 'or', 'to', 'for', 'of', 'with', 'in', 'on', 'is', 'are',