Local Agent Safety and Availability

Detects usable local agents, checks authentication, and refuses launches whose required tool restrictions cannot be enforced.

Overview

Description

Local Agent Safety and Availability determines which locally installed providers Dots can honestly offer and whether a requested run can obey its tool policy. At startup, the probe resolves each binary from an explicit path, shell PATH, or supported Windows install location, then runs the provider's authentication check. The result distinguishes detected and authenticated, detected but invalid, and unavailable or unknown without throwing the whole composition offline.

Before a real spawn, the adapter builds a controlled environment that neutralizes host API keys so the CLI uses the user's subscription login unless an explicit provider configuration overrides it. Read-only policies deny native shell and file-writing tools as well as editors. If a non-empty enforced deny set cannot be expressed by that CLI, the adapter raises a typed unenforceable-policy error and refuses to launch. Diagnostics are clamped and scrubbed so failures remain actionable without echoing prompts or secrets.

Selling Points

  • Users see only providers that are actually installed and have a meaningful authentication verdict on the current host.
  • Windows fallback discovery supports packaged or GUI-launched Dots sessions that do not inherit a developer shell PATH.
  • Subscription authentication is protected from accidental host API-key takeover.
  • Fail-closed tool policy prevents a nominally read-only agent from escaping through shell or file-write commands.
  • Scrubbed, bounded diagnostics explain installation, auth, process, and parse failures without dumping sensitive request content.

User Story

A user opens provider selection on Windows after installing Codex through the desktop distribution. Dots finds the executable outside the inherited PATH, checks login status, and offers it. The user then sends a Plan-mode request with read-only posture. If the installed CLI version cannot enforce the required native denials, Dots refuses the spawn with a clear policy error instead of silently running an agent that could edit files.

Extension Surface

This feature is configurable. packages/local-agent-adapters/src/availability/probe.ts honors explicit provider-path environment settings and configurable working directories, while provider input supplies the enforced deny posture. The probe registry is code-owned and adding a provider requires implementation work, so this feature is not an external discovery plugin.

Capabilities & Limits

  • It resolves binaries, probes authentication, and emits normalized availability records without throwing.
  • It neutralizes conflicting SDK credentials and enforces provider-native denied tools.
  • It tracks processes, timeouts, cancellation, and scrubbed diagnostics.
  • Limit: availability is a host snapshot; a binary or login can change afterward, and some CLIs cannot enforce every posture or expose a reliable auth signal.

Implementation Map

  • packages/local-agent-adapters/src/availability/probe.ts
  • packages/local-agent-adapters/src/spawn/env.ts
  • packages/local-agent-adapters/src/spawn/run-child-process.ts
  • packages/local-agent-adapters/src/errors.ts
  • packages/local-agent-adapters/src/util/diagnostic.ts

Properties

Property
Value
product
dots-platform
extensibility
configurable
module
Chat, Access
packages
local-agent-adapters
status
shipped
surface
cross-cutting
summary
Detects usable local agents, checks authentication, and refuses launches whose required tool restrictions cannot be enforced.

Connections

Local Agent Safety and Availability · Explore connections

  • requirestoLocal Coding Agent Providers
  • complementstoLocal Agent MCP Tool Bridge
  • implementstoDS_Conversations — Conversations Foundational Dotabase (Sub-Phase 7.1)
  • implemented bytopackages/local-agent-adapters/src/spawn/run-child-process.ts
  • implemented bytopackages/local-agent-adapters/src/spawn/env.ts
  • implemented bytopackages/local-agent-adapters/src/util/diagnostic.ts
  • implemented bytopackages/local-agent-adapters/src/availability/probe.ts
  • implemented bytopackages/local-agent-adapters/src/errors.ts

Connected Records8

Complements
Implemented by
packages/local-agent-adapters/src/availability/probe.ts
packages/local-agent-adapters/src/errors.ts
packages/local-agent-adapters/src/spawn/env.ts
packages/local-agent-adapters/src/spawn/run-child-process.ts
packages/local-agent-adapters/src/util/diagnostic.ts
Implements
DS_Conversations — Conversations Foundational Dotabase (Sub-Phase 7.1)
Requires
8 connections.