Introducing a new way to review your PRs.

Read the announcement

kenryu42 / cc-safety-net

A pre-execution guard for AI coding agents. It blocks destructive Git and file system commands, plus common attempts to access sensitive files, before a tool call runs. Supports Amp Code, Antigravity CLI, Claude Code, Codex, Cursor, DeepSeek Harness, Devin CLI, GitHub Copilot CLI, Grok Build, Hermes Agent, Kimi Code, OpenClaw, OpenCode, and Pi.

View on GitHub

20 documents · Updated Nov 23, 2026

docs / integration-installation-and-detection

Integration installation and detection

CC Safety Net connects to coding agent CLIs through host plugins, extensions, packages, or hook configuration. This page explains how the system finds usable targets, installs or removes the right artifact, checks that the host can load it, and reports the result without treating an unreadable or user-owned file as a valid install. See Agent integrations for the wider integration model, Hook routing and tool adapters for hook request handling, and Agent connector implementations for connector behavior.

Integration catalog

The integration catalog is the shared source for names, command flags, install order, artifact type, host probe, and runtime-hook metadata. Install selection, detection order, doctor output, and system version checks use the same catalog so a new integration cannot be offered by one surface and omitted from another. References: src/…/catalog.ts• L1-23, src/…/catalog.ts• L284-317

The catalog currently describes these install forms:

Install formSystem goalExamples
Native host integrationLet the agent's own CLI register, update, enable, or remove the integration.Claude Code, Codex, GitHub Copilot CLI, Gemini CLI, OpenClaw, OpenCode, Pi
Hook configurationAdd a command that the host calls before a tool action.Antigravity CLI, Cursor, Devin CLI, Factory Droid, Grok Build, Kimi Code
Managed artifactPublish or write a generated plugin that the host discovers.Amp, Hermes Agent
Package installationAdd CC Safety Net to a host-managed package profile.DeepSeek Harness

Runtime metadata is separate from install metadata. It marks integrations that can receive a runtime hook and records their public flags and display text. The install list can therefore include agents that use a package or native plugin without exposing a top-level runtime flag. References: src/…/catalog.ts• L17-23, src/…/catalog.ts• L289-309

Target selection

The install command accepts one target flag in a direct invocation, such as cc-safety-net install --cursor. In a terminal without a target flag, it probes each catalog target and inspects configured integrations before it opens a selector. Cursor is available when either its normal probe or the cursor-agent --version probe succeeds. The selector can install or uninstall several targets, and it can hand off to the update flow. References: src/…/install.ts• L4-18, src/…/index.ts• L390-409, src/…/index.ts• L463-505, src/…/choices.ts• L24-70

The selector uses different evidence for each action:

ActionAvailable targetMain purpose
InstallThe host CLI responds and the integration is not already configured.Avoid a needless install and show missing host tools clearly.
UninstallDetection finds an installed or inspectable integration.Keep stale or disabled installs removable even when the host CLI is no longer present.
UpdateDetection finds an installed integration.Refresh existing integrations without creating new ones.

All selected targets use the catalog order. A normal install or uninstall runs targets in sequence so each host command has a clear result. An update detects all targets first, then runs independent updates together; one target can fail without hiding the result for the others. References: src/…/choices.ts• L53-100, src/…/targets.ts• L11-34, src/…/index.ts• L829-935

DeepSeek Harness adds a second level of target choice inside one integration. The installer can target a local Desktop profile when the desktop CLI is in its default location, and it can target the web profile through npx. If the Desktop app exists but its CLI is not found, the system tells the user to install from the app's Plugins page instead of claiming that the desktop target is available. References: src/…/install.ts• L27-65, src/…/install.ts• L188-199

Installation workflow

Installation first resolves the target, then chooses the target's transport, writes or asks the host CLI to write the integration, and reports whether the action changed state. A target can be already installed, disabled, outdated, or blocked by an unsafe path; these states affect the action rather than being silently treated as success. References: src/…/index.ts• L508-650, src/…/index.ts• L653-744

The main flow is:

flowchart TD
    A[Install or uninstall request] --> B[Resolve target selection]
    B --> C[Probe host and inspect current state]
    C --> D{Target transport}
    D -->|Native host CLI| E[Run ordered host commands]
    D -->|Hook configuration| F[Edit host config]
    D -->|Managed artifact| G[Write or publish generated artifact]
    D -->|Package profile| H[Install or remove package in host profile]
    E --> I[Run cleanup or enable steps]
    F --> J[Return path and state result]
    G --> K[Verify host runtime when required]
    H --> L[Verify enabled package profiles]
    I --> M[Report result]
    J --> M
    K --> M
    L --> M

Native host installation

Native installation delegates ownership of plugin or extension state to the host CLI. It refreshes a registered marketplace when needed, installs or updates the current artifact, enables a disabled integration, and performs legacy cleanup as a best-effort follow-up. Host command failures stop that target and include captured output; a stalled command is bounded by a timeout. References: src/…/index.ts• L170-320, src/…/native.ts• L36-103

Some native integrations need a final host action before they are useful. OpenClaw installs the packaged plugin with its declared capabilities accepted in the non-interactive command, then checks the host's runtime load state and enables the plugin when the host reports it as disabled. Hermes enables its generated plugin. Pi removes a stale disabled-extension filter. Copilot can turn its plugin back on in its settings. These steps keep “installed” from meaning only “files or a package exist.” References: src/…/index.ts• L575-625, src/…/index.ts• L674-733, src/…/install.ts• L107-110, src/…/install.ts• L125-159

OpenCode uses a version-aware native path. Supported 1.x releases use a global plugin install, while supported 2.x releases use the host's add or update flow and then check the active plugin inventory. The installer rejects unsupported host versions before it changes the configuration. For 2.x, it also rejects a conflicting managed package specification because a second specification could create a duplicate plugin identity. References: src/…/install.ts• L62-135

Hook configuration installation

Hook configuration installation places a command such as npx -y cc-safety-net hook --cursor in the host's pre-tool hook settings. It creates missing parent directories, adds the managed entry beside user entries, repairs a disabled or drifted managed entry, and removes only the managed entry during uninstall. Cursor requires a versioned JSON object and writes one canonical entry with a fixed timeout and fail-closed behavior. The result includes the path that the host will read. References: src/…/install.ts• L103-164, src/…/install.ts• L71-168, src/…/install.ts• L123-152

Cursor also has cleanup for a separately installed native marketplace plugin. Uninstall asks cursor-agent to remove the marketplace and removes its local cache and checkout when they exist. Cursor account state can still require manual removal from the host's plugin screen. References: src/…/install.ts• L29-47

Devin CLI stores its hook in a user config path that follows XDG_CONFIG_HOME on Unix-like systems and APPDATA on Windows. Factory Droid reads its dedicated hooks file and can use hook settings from the broader settings file when that hooks file does not yet exist. Both installers preserve unrelated handlers, replace duplicate managed entries with one canonical entry, and remove only CC Safety Net's handler during uninstall. References: src/…/install.ts• L14-30, src/…/install.ts• L65-96, src/…/install.ts• L16-22, src/…/install.ts• L47-108

Grok Build uses a dedicated global hook file under GROK_HOME or the user's .grok directory. Its managed PreToolUse entry has no matcher, so every tool call reaches the safety hook. Install replaces only earlier managed entries and preserves other handlers; uninstall removes the file only when it contains no other user configuration. References: src/…/install.ts• L13-25, src/…/install.ts• L48-110

The configuration editors match the host format instead of replacing unrelated settings. JSON and JSONC support requires comment-aware parsing. OpenCode removes managed values from its root plugin array, while Kimi Code handles both an inline hook array and separate TOML hook tables. A malformed file fails before the system rewrites it. Grok Build repairs an invalid file that it owns during install, but leaves invalid content in place during uninstall because ownership cannot be proved. References: src/…/install.ts• L204-267, src/…/config-edit.ts• L35-101, src/…/jsonc.ts• L1-79, src/…/install.ts• L34-56, src/…/install.ts• L87-110

Npx hook execution

The hook configurations use npx to obtain and run the published CC Safety Net package at tool-call time. This keeps the host configuration small and lets the same hook entry work without a local source checkout. Because an old npx cache can keep an old package running, installation and update clear only CC Safety Net entries from the effective npx cache before cache-dependent targets run. References: src/…/install.ts• L1-8, src/…/install.ts• L1-9, src/…/npx-cache.ts• L4-25, src/…/index.ts• L889-899

The update flow also clears matching CC Safety Net entries from Bun's temporary bunx cache. It leaves the cache entry used by the running process in place and limits deletion by platform and package name. This refreshes the next bunx cc-safety-net run without deleting another package that only happens to contain CC Safety Net as a dependency. References: src/…/bunx-cache.ts• L4-32, src/…/index.ts• L921-930

Kimi Code also offers a native plugin path. In that path the command prints steps for the user to run inside Kimi Code, because the trust prompt and session reload belong to the host. In a non-interactive session, the command uses the global hook path instead of waiting for an unanswered method prompt. References: src/…/index.ts• L746-811

DeepSeek Harness package installation

DeepSeek Harness installation adds the published cc-safety-net package to each selected profile. The web profile runs through npx -y @deepseek-ai/dsh, while the Desktop profile uses the app's bundled dsh executable when the app is installed in its supported location. The command includes the current CC Safety Net package version so the host receives the intended release. References: src/…/install.ts• L18-25, src/…/install.ts• L101-127

The installer refuses to change a detected Desktop profile while the Desktop app is running. After the host command completes, it reads the profiles again and requires each selected profile to have an enabled bundle. An installed but disabled profile produces an actionable error that points the user to the Plugins page. Uninstall removes only profiles that contain the package and reports when a Desktop installation remains because its app CLI is not available. References: src/…/install.ts• L67-82, src/…/install.ts• L129-145, src/…/install.ts• L153-185

Managed artifact installation

Managed artifact installation writes an artifact that the host discovers outside the host's normal package command. Amp resolves its packaged plugin from supported distribution locations, publishes it to the user's hosted Personal Plugins repository through a temporary checkout, and embeds the current user policy in that artifact. Hermes writes its generated plugin files into the active Hermes profile. Both paths use ownership markers so the installer can refuse to overwrite user files. References: src/…/install.ts• L30-47, src/…/install.ts• L78-123, src/…/install.ts• L243-284, src/…/install.ts• L26-84

Amp also removes a managed local copy that could mask the published Personal Plugins copy. It refuses to remove an unmanaged local plugin, because that file may belong to the user. The remote install is therefore complete only when the published artifact is current and no unsafe local copy hides it. References: src/…/install.ts• L199-241, src/…/install.ts• L262-282

The generated artifact is a product of the installed CC Safety Net version. Hermes needs its generated module files. OpenClaw uses a runtime entry plus manifest files, and its package manifest points the host at that entry. The OpenClaw installer locates the packaged artifact from supported package or distribution paths before it gives the path to the host CLI. Version stamps and managed headers let detection distinguish a current artifact, an old artifact, and an edited or unmanaged file. References: src/…/artifact.ts• L1-7, src/…/artifact.ts• L181-191, src/…/artifact.ts• L1-79, src/…/install.ts• L39-47, src/…/install.ts• L80-110

Release preparation keeps the package and host plugin manifests on one stable version before generated artifacts are published. The release transaction accepts only the versioned manifests, schema, and distribution output, then creates and publishes one tagged release after the repository state passes its checks. Release commands use the project-pinned Bun runtime so nested build steps use the same tool version. References: scripts/prepare-release-files.ts• L7-24, scripts/release-state.ts• L1-50, scripts/release-transaction.ts• L8-15, scripts/release-transaction.ts• L78-140, scripts/project-bun.ts• L1-20

The repository plugin check also confirms that the packaged Claude and Codex plugins point to the expected hook files and runtime commands. It checks the generated JavaScript and required packaged files before the plugin is treated as a valid release artifact. References: scripts/verify-repository-plugin.ts• L11-51

Configuration safety

Configuration changes aim to preserve user state and to avoid leaving a half-written file after an interruption. The system validates the existing shape before it edits, changes only the managed part, and uses a sibling temporary file followed by a rename for file replacement. References: src/…/atomic-write.ts• L1-7, src/…/index.ts• L327-365, src/…/install.ts• L230-287

Atomic writes protect the old file from a truncated write. The temporary file stays beside the destination so the final rename remains atomic within one file system. Artifact installers also validate all managed files before writing where a partial set could leave a discoverable but unusable plugin. References: src/…/atomic-write.ts• L3-7, src/…/install.ts• L324-345, src/…/install.ts• L60-84

Ownership checks are stricter when a host command can overwrite or delete a whole directory. OpenClaw requires the managed directory to contain only its own expected files, and it rejects a symlink or an entry file without the managed header. Its state and config locations follow the host's state and config environment settings when present. Hermes and Amp reject symlinks, non-regular files, or content without the managed marker. This prevents an install or uninstall from taking control of a user's unrelated plugin. References: src/…/install.ts• L26-76, src/…/install.ts• L89-110, src/…/install.ts• L26-69, src/…/install.ts• L128-166, src/…/install.ts• L199-241

Detection and inspection

Detection answers whether an integration is present and whether the host is likely to use it. The system reads the state that the host already writes whenever possible. Codex and Amp are exceptions because their list commands expose plugin state that is not available in a local file. Shared detection context carries the environment, working directory, command output, and common result shape needed by host-specific detectors. References: src/…/context.ts• L6-25, src/…/context.ts• L27-73

The inspection flow is:

flowchart TD
    A[Doctor or install state check] --> B[Build shared detection context]
    B --> C[Run one detector per catalog integration]
    C --> D{State evidence}
    D -->|Host state file| E[Read and validate file]
    D -->|Host list output| F[Parse supplied command output]
    D -->|Managed artifact| G[Check ownership, shape, version, enablement]
    E --> H[Configured, disabled, absent, or not inspected]
    F --> H
    G --> H
    H --> I[Ordered hook status for doctor and install selection]

The detection entry point builds one shared context, runs each catalog detector in doctor order, and converts the detector result into the status shape used by doctor and install selection. The registry includes every catalog integration, including Devin CLI and Factory Droid. A detector that cannot inspect its state returns not-inspected instead of allowing the aggregator to claim that the integration is absent. References: src/…/index.ts• L22-74, src/…/catalog.ts• L284-287

Detection states

Detection separates presence from use. A configured integration is present and enabled. A disabled integration is present but will not run. n/a means no usable managed integration was found or the host does not apply. not-inspected means a state file exists but cannot be read, so the system does not claim that the integration is absent. References: src/…/context.ts• L6-15, src/…/doctor-types.ts• L11-24

Detectors apply the host's own enablement rules instead of treating a file or package as proof that the hook will run. The host detectors use these main signals:

HostDetection signalImportant distinction
Claude CodeInstalled plugin record and enabled-plugin setting.Installed but not enabled is disabled.
CodexThe codex plugin list row for the CC Safety Net source.An enabled row can still need user trust, which doctor cannot verify.
GitHub Copilot CLIPlugin state plus repository and user hook sources.Supported sources depend on the CLI version, and disableAllHooks can disable them.
AmpThe user's plugin list row.A present plugin can be disabled and needs a host reload or reinstall.
CursorThe managed hook entry plus any native Cursor or imported Claude Code plugin.A second route can run the check twice, and account-side plugin state is not fully visible to doctor.
OpenClawManaged artifact shape, version, and host allow, deny, and enable settings.A valid artifact remains unusable when the host blocks or disables it.
OpenCodeConfigured plugin entry and host plugin inventory.A configured entry can still have a reported plugin failure.
PiPackage source and extension state in the agent settings.An installed package is disabled when its extension is marked off.
Hermes AgentGenerated files, version stamp, and enabled plugin list.All required files must be usable before the integration is reported.
DeepSeek HarnessPackage dependency and bundle list in each profile manifest.An installed package is disabled when its bundle is not enabled; an unreadable profile leaves detection at not-inspected.
Devin CLIThe managed entry in hooks.PreToolUse.A present entry can report drift when its matcher, type, or timeout narrows or changes hook behavior.
Factory DroidThe managed entry in .factory/hooks.json PreToolUse.A present entry can report a narrowing commandRegex or other hook drift.
Grok BuildThe managed entry in its global hooks file.Invalid JSON cannot prove that the managed hook is present.

These checks explain why a plugin directory, package, or hook command alone is not always enough for a configured result. DeepSeek Harness detection scans the configured profiles directory, ignores node_modules, and uses DSH_HOME when set before it checks each profile's package manifest. Cursor reports a native or imported plugin route as an additional active route and exposes duplicate-run or account-state caveats. Devin, Factory Droid, and Grok Build report the managed hook as configured while exposing drift errors instead of hiding a non-canonical entry. References: src/…/detect.ts• L30-63, src/…/detect.ts• L8-41, src/…/detect.ts• L214-385, src/…/detect.ts• L7-33, src/…/detect.ts• L61-109, src/…/detect.ts• L140-183, src/…/detect.ts• L12-55, src/…/detect.ts• L24-61, src/…/detect.ts• L106-144, src/…/detect.ts• L15-51, src/…/detect.ts• L11-31, src/…/detect.ts• L6-49, src/…/detect.ts• L14-53

Artifact validation

Artifact detection checks more than a marker. It verifies the files needed for host discovery, compares current-version artifacts with the packaged counterpart when available, and reports old versions as outdated. A missing, edited, malformed, symlinked, or unmanaged artifact is not reported as a working integration. References: src/…/detect.ts• L73-144, src/…/detect.ts• L110-183

Runtime verification

Some hosts can accept an install while still failing to load the plugin. OpenCode and OpenClaw therefore perform a post-install runtime check that follows the host's load path and requires an active or callable plugin. A failed check returns an install error instead of reporting protection that the host will not provide. References: src/…/install.ts• L102-135, src/…/install.ts• L182-201, src/…/install.ts• L135-159, src/…/index.ts• L707-725

The OpenClaw check asks the host for a runtime inspection report and accepts only the loaded status. If the report says the plugin is disabled, the check can enable it and inspect again. An unreadable report or another status produces an actionable error rather than a successful install. References: src/…/install.ts• L113-159

The runtime check is separate from hook detection. Detection reports host configuration and artifact state. Runtime verification proves that a newly installed artifact can load in the host's own runtime environment. This distinction matters for hosts that fail open when a configured plugin cannot load. References: src/…/install.ts• L182-201, src/…/install.ts• L135-159

Self-test and system information

The doctor report includes an engine self-test that checks the core guard with representative destructive and safe commands. It does not run once per integration, and hook discovery does not attach a self-test to each hook status. This keeps integration presence checks separate from proof that the shared guard applies its policy. References: src/…/self-test.ts• L7-34, src/…/self-test.ts• L74-117, tests/…/index.test.ts• L155-214

System information supplies the package version, host CLI versions, Node.js, npm, Bun, platform, and the command output needed for Codex and Amp detection. Version probes run in parallel and return unavailable rather than failing the full report when a host is missing or slow. Host list commands that can refresh network state receive a longer limit. References: src/…/system-info.ts• L21-33, src/…/system-info.ts• L172-232, src/…/doctor-types.ts• L136-155

The same command boundary supports installation and inspection on Windows. It resolves executable extensions and runs npm-distributed .cmd shims through COMSPEC. This gives probes and host actions the same view of installed CLIs across supported platforms. References: src/…/system-info.ts• L44-95, src/…/native.ts• L40-73

Change checklist

When these files or sections are changed, remember to consider these:

  • Add or change an integration in the catalog and confirm target selection, detector coverage, doctor order, version probing, and runtime metadata still agree.
  • Change a hook command or plugin id only with its detector, uninstall path, migration cleanup, and any generated ownership marker.
  • Change a generated artifact's files or version stamp with its installer, host load check, and detector comparison.
  • Change a host config shape with both the editor and the detector. Preserve the host's scope and enablement rules.
  • Change a command used by a hook or native installer with the npx and bunx cache policies and Windows command boundary in mind.
  • Change Cursor's hook entry or native marketplace cleanup with its alternate cursor-agent probe, detector route, duplicate-run warning, and account-side uninstall caveat in mind.
  • Change Devin, Factory Droid, or Grok Build hook shape, path, or fallback behavior with the matching detector and managed-entry drift rules in mind.
  • Change DeepSeek Harness profile selection, package commands, or Desktop detection with the DSH_HOME path, running-app guard, profile enablement check, and uninstall behavior in mind.
  • Change OpenClaw's packaged artifact path, capability requirements, or enablement behavior with its ownership check, runtime inspection, and host reload behavior in mind.
  • Change the release package or plugin manifests with the stable-version checks, release path allowlist, and repository plugin hook checks in mind.
  • Change the repository plugin hook path or command only with its packaged files, generated distribution, and host runtime entry.
  • Change the detection evidence for Codex or Amp with the longer list-command path used by install selection and system information.
  • Change Copilot CLI source support or disablement precedence with the CLI version thresholds and repository-versus-user scope in mind.
  • Change OpenCode's supported versions or plugin package shape with both version-specific install paths, duplicate-plugin checks, and runtime checks in mind.
  • Change Hermes profile resolution or generated file sets with detection, ownership checks, and active-profile behavior in mind.

Important failure modes

TriggerConsequenceGuard
A host CLI is missing or does not finish its probe in timeThe target is unavailable for install, or its version is reported as unavailable.Parallel probes have bounded timeouts and treat spawn failure as unavailable.
Cursor is installed only through a route that the host account still controlsLocal files can be removed while the account still lists the plugin, or doctor cannot verify the account state.Cursor removes local marketplace data, reports the host plugin screen, and surfaces the account-state caveat.
Cursor has both the hook and a native or imported plugin routeEvery tool call can run the check twice.Detection reports the duplicate route and gives the uninstall action for the hook.
DeepSeek Harness Desktop is running during a Desktop profile changeThe install or uninstall stops before the host can change a live profile.The installer checks the Desktop lock or process state and asks the user to quit the app.
DeepSeek Harness Desktop is installed outside its supported default locationThe Desktop profile cannot be changed by the bundled CLI.The action reports the Plugins page as the supported add or remove path.
DeepSeek Harness installs the package but does not enable its bundleThe package exists but the host will not use it.The post-install check reads each selected profile and reports the disabled profile.
OpenClaw cannot resolve its packaged plugin directoryNative installation stops before it gives an invalid artifact path to OpenClaw.The installer searches supported packaged and distribution locations and reports that the package must be reinstalled when none exists.
OpenClaw rejects capability acceptance or its plugin does not finish loadingThe host may have a partial install, but the command reports failure instead of claiming protection.The install passes non-interactive capability acceptance and the runtime check requires loaded.
Codex shows the plugin as enabled but the user has not trusted its hookCodex can still skip the hook even though detection reports an enabled plugin.Detection reports the trust limit and gives the user the /hooks trust action.
Copilot CLI cannot use a discovered hook source for its installed versionThe hook can be present in a file but remain inactive.Detection checks source support against the CLI version and reports unsupported sources.
A required config file is malformedInstall or uninstall stops without rewriting that file. Detection reports an inspection error or unknown state.Config parsing occurs before editing, and detector errors remain visible.
Devin CLI or Factory Droid has a malformed hook configThe related action cannot safely preserve the host settings or prove that the hook is present.The editor validates the JSON shape before writing, and detection returns an error instead of configured.
A Grok Build hook file is invalid JSONInstall repairs the named file, but uninstall leaves it in place because its ownership is not provable.Install and uninstall use different safety rules for unparsable content.
A managed path is a symlink or contains user-owned contentThe action refuses to modify or remove the path.Ownership markers, regular-file checks, and directory content checks protect destructive operations.
A stale npx or bunx cache remains for a cache-dependent targetA hook or generated plugin can run an older package after install or update.Cache clearing removes only CC Safety Net entries and preserves the active bunx entry.
OpenCode or OpenClaw accepts the install but cannot load the pluginThe host continues without CC Safety Net protection.Post-install verification requires an active or callable OpenCode plugin and OpenClaw loaded status.
A state file exists but cannot be readA valid install can be mistaken for absence if the result is guessed.Detection returns not-inspected or an explicit error rather than claiming n/a.
Release manifests or packaged plugin hooks disagreeA release can be stopped before publication instead of producing mismatched host artifacts.Stable version checks, release path checks, and repository plugin verification run before the release is published.

Key files

FileWhy to read it
src/…/catalog.tsShared identity and ordering for every install and detection surface.
src/…/index.tsEnd-to-end target resolution, install, uninstall, update, and result handling.
src/…/choices.ts and src/…/targets.tsTarget probing, Cursor's alternate CLI probe, availability rules, and deterministic execution order.
src/…/native.tsCommon boundary for host CLI commands, output, timeouts, and cleanup.
src/…/install.ts and src/…/detect.tsCursor hook editing, native marketplace cleanup, alternate plugin routes, and duplicate-run detection.
src/…/install.ts and src/…/detect.tsDevin CLI hook path, safe config editing, and drift-aware detection.
src/…/install.ts and src/…/detect.tsFactory Droid hook fallback, cleanup, and detection of narrowing hook settings.
src/…/install.ts and src/…/detect.tsDeepSeek Harness Desktop and web profile selection, package installation, enablement checks, and profile detection.
src/…/install.tsOpenClaw state and artifact paths, ownership checks, native install command, and runtime load verification.
src/…/atomic-write.ts and src/…/config-edit.tsShared safety rules for replacing files and removing entries from structured text.
src/…/npx-cache.ts and src/…/bunx-cache.tsCache refresh rules for package execution through npx and bunx.
src/…/context.ts and src/…/index.tsShared detection inputs, state-file reads, managed-directory checks, detector order, and status conversion.
src/…/install.ts and src/…/detect.tsExample of a global hook-file install that preserves user handlers and reports drift.
src/…/system-info.tsHost probing, version data, platform data, and command launch behavior.
src/…/install.ts and src/…/detect.tsVersion-aware OpenCode installation, config editing, duplicate handling, runtime checks, and detection.
src/…/install.ts and src/…/detect.tsOpenClaw artifact ownership, native installation, enablement, runtime checks, and detection.
src/…/install.ts and src/…/install.tsExamples of packaged artifact resolution, policy embedding, remote publication, and local managed artifact installation.
src/…/install.ts, src/…/detect.ts, src/…/detect.ts, src/…/detect.ts, and src/…/detect.tsHost-specific examples of remote publication, state-file detection, list-output detection, version-aware hook detection, and package detection.
src/…/self-test.tsShared engine check used by doctor, separate from integration detection.
scripts/prepare-release-files.ts, scripts/release-state.ts, and scripts/release-transaction.tsRelease version agreement and the controlled path from prepared manifests to published artifacts.
scripts/verify-repository-plugin.ts and scripts/project-bun.tsPackaged plugin checks and the pinned runtime used by release commands.