Skip to content

PromptScript API


Interface: ValidateOptions

Defined in: validator/src/types.ts:167

Options for standalone validate function.

Extends

Properties

allowedPatterns?

optional allowedPatterns?: (string | RegExp)[]

Defined in: validator/src/types.ts:138

Pattern sources exempt from blocked-patterns detection. A blocked pattern is subtracted from the active set when its source text matches an entry exactly.

Inherited from

ValidatorConfig.allowedPatterns


blockedPatterns?

optional blockedPatterns?: (string | RegExp)[]

Defined in: validator/src/types.ts:97

Patterns to block in content (strings are converted to RegExp)

Inherited from

ValidatorConfig.blockedPatterns


customRules?

optional customRules?: ValidationRule[]

Defined in: validator/src/types.ts:101

Custom validation rules to add

Inherited from

ValidatorConfig.customRules


disableRules?

optional disableRules?: string[]

Defined in: validator/src/types.ts:99

Array of rule names to disable

Inherited from

ValidatorConfig.disableRules


excludes?

optional excludes?: ValidationExclude[]

Defined in: validator/src/types.ts:132

Rule exclusions for specific imports, bound to the commit pinned in the lockfile. Declared by the consumer in promptscript.yaml; an imported file can never mute its own scan.

Inherited from

ValidatorConfig.excludes


externalRoots?

optional externalRoots?: string[]

Defined in: validator/src/types.ts:120

Absolute path roots holding imported (registry cache, vendored) content. Heuristic content rules skip text located under these roots by default.

Inherited from

ValidatorConfig.externalRoots


ignoreHashes?

optional ignoreHashes?: boolean

Defined in: validator/src/types.ts:115

Skip reference integrity checks

Inherited from

ValidatorConfig.ignoreHashes


importRoots?

optional importRoots?: ImportRoot[]

Defined in: validator/src/types.ts:144

Absolute roots holding imported content, keyed by import source and the commit the lockfile pins for it. Computed by the compiler from the lockfile (registry cache, vendor directory, reference roots).

Inherited from

ValidatorConfig.importRoots


lockfile?

optional lockfile?: Lockfile

Defined in: validator/src/types.ts:109

Lockfile for reference integrity checks

Inherited from

ValidatorConfig.lockfile


logger?

optional logger?: Logger

Defined in: validator/src/types.ts:103

Logger for verbose/debug output

Inherited from

ValidatorConfig.logger


models?

optional models?: ModelsConfig

Defined in: validator/src/types.ts:149

Model catalog settings from promptscript.yaml (models). Custom profiles extend the catalog; supported enables model set checks.

Inherited from

ValidatorConfig.models


policies?

optional policies?: PolicyDefinition[]

Defined in: validator/src/types.ts:105

Extension compliance policies

Inherited from

ValidatorConfig.policies


registryReferencePaths?

optional registryReferencePaths?: Map\<string, Map\<string, string>>

Defined in: validator/src/types.ts:113

Canonical lock keys keyed by source file and declared reference

Inherited from

ValidatorConfig.registryReferencePaths


registryReferences?

optional registryReferences?: Set\<string>

Defined in: validator/src/types.ts:111

Set of resolved absolute paths that came from registry cache

Inherited from

ValidatorConfig.registryReferences


requiredGuards?

optional requiredGuards?: string[]

Defined in: validator/src/types.ts:95

List of guards that must be present in

Guards

block

Inherited from

ValidatorConfig.requiredGuards


rules?

optional rules?: Record\<string, "off" | Severity>

Defined in: validator/src/types.ts:93

Override severity for specific rules (rule name -> severity or 'off')

Inherited from

ValidatorConfig.rules


scanExternalContent?

optional scanExternalContent?: boolean

Defined in: validator/src/types.ts:126

Scan imported content under externalRoots with heuristic rules anyway. Concrete security findings (decoded payloads, suspicious URLs) always scan.

Default

false

Inherited from

ValidatorConfig.scanExternalContent


skipPolicies?

optional skipPolicies?: boolean

Defined in: validator/src/types.ts:107

Skip policy evaluation

Inherited from

ValidatorConfig.skipPolicies


validator?

optional validator?: Validator

Defined in: validator/src/types.ts:169

Reuse an existing validator instance