PromptShield logo PromptShield
PromptShield WorkspaceAPI DocsInterfaces

WorkspaceScanConfig

Defined in: workspace.ts:35

Configuration for workspace scan orchestration.

Properties

cacheMode?

optional cacheMode: CacheMode | "none"

Defined in: workspace.ts:88

Cache storage strategy.

  • "none" → disable persistent cache
  • "single" → one cache.json file
  • "split" → per-file hashed cache entries
  • "auto" → strategy selected via repository size heuristic

When enabled (cacheMode !== "none"), cache stores baseline filtered results computed using:

  • minSeverity: "LOW"
  • inline ignore directives enabled

Severity filtering and noInlineIgnore are applied after cache retrieval.

Default

"auto"

concurrency?

optional concurrency: number

Defined in: workspace.ts:68

Maximum number of files processed concurrently.

Default

4

debug?

optional debug: (msg) => void | null

Defined in: workspace.ts:102

Optional debug logger hook.

forceFullScan?

optional forceFullScan: boolean

Defined in: workspace.ts:97

Forces a full rescan of all files and refreshes cache entries.

Ignored when cacheMode === "none".

Default

false

minSeverity?

optional minSeverity: Severity

Defined in: workspace.ts:46

Minimum severity threshold to report.

Note: When caching is enabled (cacheMode !== "none"), scanning is always performed with minSeverity: "LOW" internally. This threshold is applied after cache retrieval.

Default

"LOW"

noInlineIgnore?

optional noInlineIgnore: boolean

Defined in: workspace.ts:61

Disable inline promptshield-ignore directives.

Does NOT affect file-level ignore rules defined in .gitignore, .promptshieldignore, or .psignore.

Note: When caching is enabled (cacheMode !== "none"), inline ignore directives are always computed internally. This flag only affects how results are presented.

Default

false

shouldApplyFixes?

optional shouldApplyFixes: boolean

Defined in: workspace.ts:110

Internal flag used by scanAndFixWorkspace. Consumers should prefer the dedicated fix API.

Default

false

write?

optional write: boolean

Defined in: workspace.ts:117

Write fixed files to disk. Only relevant when shouldApplyFixes is enabled.

Default

false

On this page