Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
TypeScript
import type { Settings } from 'claude-code'
import { ownOption } from './own-option'
/**
* Whether managed policy limits mods to the organization's: this plugin's
* own option `allowManagedModsOnly` in managed settings.
*
* On unless absent or `false`: a value mistyped (`"true"`, `1`) still
* locks, as the CLI's own managed locks read.
*
* @param policy the managed settings, as `$.settings.read` answers them
* @returns true when the person's own mods are not to load
*/
export function isManagedModsOnly(policy: Settings) {
const value = ownOption(policy, 'allowManagedModsOnly')
return value !== undefined && value !== false
}