Ensure Index
index.ensureBuild or refresh a local workspace regex index to enable fast literal and regex search, returning the active base revision and overlay state.
Instructions
Build or refresh the local regex index for a workspace and return the active base revision plus overlay state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| excludeGlobs | No | Glob patterns that should be excluded before indexing. | |
| forceRebuild | No | Rebuild the immutable base index even when the active revision already exists. | |
| includeGlobs | No | Glob patterns that define which files belong to the corpus. Defaults to `**/*`. | |
| workspaceRoot | No | Absolute workspace root to index. Defaults to the server workspace. | |
| refreshOverlay | No | Refresh the writable overlay after resolving the base index. Defaults to true. | |
| bootstrapGitignore | No | When true, add the cache directory to the workspace .gitignore if the cache lives inside the workspace. Defaults to true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elapsedMs | Yes | ||
| sourceMode | Yes | ||
| storageDir | Yes | ||
| baseIndexId | Yes | ||
| workspaceId | Yes | ||
| gitignorePath | Yes | ||
| gitignoreEntry | Yes | ||
| sourceRevision | Yes | ||
| overlayRevision | Yes | ||
| gitignoreUpdated | Yes | ||
| overlayFileCount | Yes | ||
| trackedFileCount | Yes |