deepseek-ai/deepseek-harness · error · Error
include must be a positive glob filter; negated patterns ("!
Error message
include must be a positive glob filter; negated patterns ("!…") are not supported What it means
Error "include must be a positive glob filter; negated patterns ("!…") are not supported" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/fs/tool-fs-search/src/grep.ts:70
/** Cooperative tool-call budget (ms) attached as `ToolDefinition.timeoutMs`. */
timeoutMs: number
}
/** Validated `grep` arguments. */
export interface GrepInput {
pattern: string
path?: string
include?: string
}
/**
* Reject an `include` that is not ONE positive glob filter: blank strings,
* negated patterns (`!…`), and comma-separated lists. A comma inside a brace
* group is fine — `*.{ts,tsx}` is one glob with alternation, not a list.
*/
function validateInclude(include: string): void {
if (include.trim().length === 0) throw new Error('include must be a non-empty glob when given')
if (include.startsWith('!')) throw new Error('include must be a positive glob filter; negated patterns ("!…") are not supported')
let braceDepth = 0
for (const char of include) {
if (char === '{') braceDepth++
else if (char === '}') braceDepth = Math.max(0, braceDepth - 1)
else if (char === ',' && braceDepth === 0) {
throw new Error('include must be one glob, not a comma-separated list (use {a,b} alternation instead)')
}
}
}
/**
* Validate value constraints the schema DSL can't express: a non-EMPTY
* `pattern` (whitespace is a legitimate regex), a non-blank `path` when given,
* and a single positive `include` glob ({@link GrepInput}). Throws a plain
* `Error` (an ordinary tool argument error) otherwise.
*
* @param args - the schema-validated `grep` arguments.
* @returns the accepted input, unchanged.View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/fs/tool-fs-search/src/grep.ts:70 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/d887e64634b2af21.
Report an issue: GitHub.