@wrongstack/tools 0.296.4 → 0.297.0
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/dist/audit.js +15 -0
- package/dist/audit.js.map +2 -2
- package/dist/bash.js +15 -0
- package/dist/bash.js.map +2 -2
- package/dist/builtin.js +42 -0
- package/dist/builtin.js.map +2 -2
- package/dist/codebase-index/index.js +27 -0
- package/dist/codebase-index/index.js.map +2 -2
- package/dist/codebase-index/project-server-client.d.ts.map +1 -1
- package/dist/codebase-index/project-server.js +16 -0
- package/dist/codebase-index/project-server.js.map +2 -2
- package/dist/exec.js +15 -0
- package/dist/exec.js.map +2 -2
- package/dist/format.js +15 -0
- package/dist/format.js.map +2 -2
- package/dist/index.js +42 -0
- package/dist/index.js.map +2 -2
- package/dist/install.js +15 -0
- package/dist/install.js.map +2 -2
- package/dist/languages/index.js +15 -0
- package/dist/languages/index.js.map +2 -2
- package/dist/lint.js +15 -0
- package/dist/lint.js.map +2 -2
- package/dist/next-steps.d.ts +23 -0
- package/dist/next-steps.d.ts.map +1 -1
- package/dist/next-steps.js +4 -0
- package/dist/next-steps.js.map +2 -2
- package/dist/outdated.js +15 -0
- package/dist/outdated.js.map +2 -2
- package/dist/pack.js +42 -0
- package/dist/pack.js.map +2 -2
- package/dist/process-registry.d.ts +9 -0
- package/dist/process-registry.d.ts.map +1 -1
- package/dist/process-registry.js +15 -0
- package/dist/process-registry.js.map +2 -2
- package/dist/ps-slash.js +15 -0
- package/dist/ps-slash.js.map +2 -2
- package/dist/read.js +27 -0
- package/dist/read.js.map +2 -2
- package/dist/test.js +15 -0
- package/dist/test.js.map +2 -2
- package/dist/tool-tier.js +42 -0
- package/dist/tool-tier.js.map +2 -2
- package/dist/typecheck.js +15 -0
- package/dist/typecheck.js.map +2 -2
- package/package.json +3 -3
package/dist/typecheck.js
CHANGED
|
@@ -448,6 +448,7 @@ var ProcessRegistryImpl = class {
|
|
|
448
448
|
}
|
|
449
449
|
/** Get all tracked processes. */
|
|
450
450
|
list() {
|
|
451
|
+
this._pruneAllStale();
|
|
451
452
|
return Array.from(this.processes.values());
|
|
452
453
|
}
|
|
453
454
|
/** Get processes filtered by name (e.g. 'bash', 'exec'). */
|
|
@@ -478,6 +479,7 @@ var ProcessRegistryImpl = class {
|
|
|
478
479
|
* Combined stats for observability — used by /ps and the TUI status bar.
|
|
479
480
|
*/
|
|
480
481
|
stats() {
|
|
482
|
+
this._pruneAllStale();
|
|
481
483
|
return {
|
|
482
484
|
activeCount: this.activeCount,
|
|
483
485
|
backgroundCount: this.activeBackgroundCount,
|
|
@@ -717,6 +719,19 @@ var ProcessRegistryImpl = class {
|
|
|
717
719
|
this.processes.delete(pid);
|
|
718
720
|
}
|
|
719
721
|
}
|
|
722
|
+
/**
|
|
723
|
+
* Remove every stale entry, not just one PID. `list()`/`stats()` — the
|
|
724
|
+
* surfaces the TUI status bar and `/ps` poll — must prune too: a child
|
|
725
|
+
* whose 'close' event never fires (e.g. Windows grandchildren holding stdio
|
|
726
|
+
* open) would otherwise linger in the registry until someone looks up its
|
|
727
|
+
* exact PID, and PID reuse meanwhile makes `get()`/`kill()` target the
|
|
728
|
+
* wrong process. RAM-leak audit 2026-07-31, MEDIUM.
|
|
729
|
+
*/
|
|
730
|
+
_pruneAllStale() {
|
|
731
|
+
for (const [pid, entry] of this.processes) {
|
|
732
|
+
if (this._isStaleEntry(entry)) this.processes.delete(pid);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
720
735
|
};
|
|
721
736
|
var _registry;
|
|
722
737
|
function getProcessRegistry() {
|