/** * `tools list` — the read-only effective-tool inventory (ADR-0041). * * HARD RULE: this command performs ZERO dynamic imports of tool runtimes. A * listing command that executes plugin code is both slow and a consent * violation (the trust posture reserves code execution for validate/install). * Every row derives from * * - the CURRENT RUN's admitted set — the provenance + manifest pairs the * bootstrap recorded, passed in by the command handler from the entered * RunScope (`currentScope().toolProvenance` / `?.toolManifests`), * status `loaded`; and * - marker scans of the two install hosts (user-global + project * `.runtime`), `loadToolManifest` only (a file read), status * `manifest-only` — covering installed-but-not-loaded packages (and, by * construction, a package whose module top-level would throw). * * Shadow-marking: discovery is first-occurrence-wins (project before global in * `buildToolDiscoverySources`), so when a project row and a global row share a * tool id the GLOBAL row is marked shadowed. */ import { type ResolvedTrustPolicy } from '@opensip-cli/config'; import { type ToolPluginManifest, type ToolProvenance } from '@opensip-cli/core'; import type { ToolsListResult } from '@opensip-cli/contracts'; /** Options for {@link toolsList}. */ export interface ToolsListOptions { readonly cwd: string; /** Restrict to one install scope (mutually exclusive; neither = effective set). */ readonly global?: boolean; readonly project?: boolean; /** * The admitted-tool provenance + manifests for this run (paired index-wise), * read by the command handler from the entered RunScope and passed in so this * function stays a pure function of its inputs. Default `[]` (no admitted set * — e.g. an isolated unit test). */ readonly provenance?: readonly ToolProvenance[]; readonly manifests?: readonly ToolPluginManifest[]; readonly env?: NodeJS.ProcessEnv; readonly policy?: ResolvedTrustPolicy; } /** Build the effective tool inventory. Read-only; never imports a runtime. */ export declare function toolsList(opts: ToolsListOptions): ToolsListResult; //# sourceMappingURL=list.d.ts.map