Aller au contenu

Installed harness detection

This directory detects only the explicit codex, cursor-agent, grok, vibe / mistral-vibe, and pi executable names. It never inventories PATH, reads credentials, inspects authentication, trusts the current workspace, selects a runtime, or grants execution authority.

The filesystem-only scanInstalledHarnesses observation is the public-ready internal inventory. It uses one immutable PATH snapshot supplied at construction, never a request, project, or live process.env reread. The scan resolves the closed catalog with concurrency two, a three-second whole-scan deadline, fail-closed first-shadow handling, and redacted detected / not_detected / unsupported / indeterminate results. Batch telemetry records the Effect-measured started and completed catalog lookups, not catalog length or unmeasured filesystem candidate checks. The scanner's scoped Effect layer also owns one node-lifetime, four-slot native-filesystem admission bound across every request while retaining the two-lookups-per-scan bound. Admission has no waiting queue and a zero-millisecond producer wait: when all four slots are occupied, the caller receives the fixed ordered five-item indeterminate / deadline_exceeded projection and batch telemetry records the distinct saturated outcome. Telemetry reports only bounded outstanding, supervised, and saturation counts plus the fixed capacity/deadline; it contains no PATH, executable path, filesystem identity, or caller identity.

A slot is released only by the actual native Promise settlement callback, not by request-fiber timeout or interruption. Effect Deferred values isolate each request awaiter, and a scoped FiberSet supervises settlement waiters while the node is running. This narrow Promise-to-Effect callback bridge is required because the Node lstat / realpath / stat / access promises used here do not accept Effect's AbortSignal; wrapping the work only in Effect.promise would return a permit when the Effect fiber exits even though native work is still unresolved. No Promise race, raw timer, daemon fiber, detached Effect fiber, local queue, or alternate scheduler is used.

Scanner shutdown never waits indefinitely for non-abortable native work. Its bounded finalizer first emits settled when no operation remains or cleanup_unavailable with the exact remaining admitted/supervised counts, then the scoped FiberSet interrupts only its waiters. Any already-started native Promise remains represented by its closed-over admission record and releases the slot only when it really settles; process exit is the final cleanup boundary. Per-item observations are logged only after the final batch outcome is known, so a partial completion that then exceeds the deadline emits only deadline_exceeded item logs. The scan does not execute --version, call the version runner or resource manager, inspect credentials, persist state, cache, select, authorize, or launch a process.

Resolution and deterministic catalog transforms remain plain TypeScript where they are synchronous. Filesystem work, concurrency, admission, deadlines, interruption, supervision, and cleanup truth are Effect-owned. The obsolete installed-harness version-process detector has been removed; registered runtime probes own their own exact executable validation and process authority.

No file here is exported from @maiaos/node, registered as a node handler, or a public/release-qualified surface. See the parent boundary, the architecture, the Node architecture, and the process-tier decision.

Imported from Maia OS docs at a2175bb