/** * register-authored-tools — admission + discovery for AUTHORED Tool sidecars * (project-local + user-global), extracted from register-tools-discovery.ts so * the installed-package discovery path stays a focused module under the * file-length soft limit. * * Authored tools are authored CONTENT (a JSON sidecar, not an installed npm * package): project-local is deny-by-default (trusted through `tools.trusted` * or the `OPENSIP_CLI_ALLOW_PROJECT_TOOLS` override), user-global is * trusted-by-default. Both are EXTERNAL provenance, so ADR-0054 M4-G applies: in the HOST the registration * registers a manifest-derived synthetic `Tool` (no runtime import); the dispatch * WORKER (the prevalidated exact command/marker mode) imports the real runtime. */ import { type ToolPluginManifest, type ToolProvenance, type ToolRegistry } from '@opensip-cli/core'; import { type PolicyAuditCollector } from './policy-audit.js'; import type { ToolAdmission } from './tool-admission-types.js'; import type { ToolRuntimeExecutionMode } from './worker-datastore.js'; import type { ResolvedTrustPolicy } from '@opensip-cli/config'; export type AuthoredAdmission = ToolAdmission; /** * Admit or reject a PROJECT-LOCAL authored tool under the deny-by-default trust * policy. The trust decision always precedes module import; an untrusted * tool fails closed before any authored code can run. * * @throws {PluginIncompatibleError} When the sidecar manifest is missing, * malformed, incompatible, or not trusted by project config / override. */ export declare function admitProjectLocalTool(args: { readonly dir: string; readonly env?: NodeJS.ProcessEnv; readonly projectTrustedTools?: ReadonlySet; readonly trustPolicy?: ResolvedTrustPolicy; readonly policyAudit?: PolicyAuditCollector; }): AuthoredAdmission; /** * Admit a USER-GLOBAL authored tool — trusted-by-default because the user placed * it in their own home-dir tool host, but still fail-closed on a missing or * incompatible manifest. */ export declare function admitUserGlobalTool(args: { readonly dir: string; }): AuthoredAdmission; /** * Discover + admit + register AUTHORED Tool sidecars from the two authored * roots. ADR-0054 M4-G: authored tools are always EXTERNAL provenance, so the * HOST registers a manifest-derived synthetic Tool (no runtime import); the * prevalidated dispatch WORKER imports the real runtime via the shared * `importToolRuntime` seam. */ export declare function discoverAndRegisterAuthoredTools(registry: ToolRegistry, opts: { readonly projectAuthoredDir?: string; readonly globalAuthoredDir: string; readonly env?: NodeJS.ProcessEnv; readonly projectTrustedTools?: ReadonlySet; readonly trustPolicy?: ResolvedTrustPolicy; readonly policyAudit?: PolicyAuditCollector; readonly runtimeMode: ToolRuntimeExecutionMode; }, builtInIds: ReadonlySet, provenance?: ToolProvenance[], manifests?: ToolPluginManifest[]): Promise; //# sourceMappingURL=register-authored-tools.d.ts.map