Repository navigation
Add wp-config-list ability to list and categorize wp-config.php constants - #160
Merged
Merged
Conversation
…stants JS-only ability that delegates to read-file for path resolution, ABSPATH security checks, and sensitive-value redaction, then parses define() calls and groups constants by category (database, debug, security, performance, URLs, keys/salts, multisite, custom). Closes #51 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
pluginslab
approved these changes
Mar 21, 2026
pluginslab
left a comment
Owner
There was a problem hiding this comment.
Smart approach — delegates to read-file for redaction, parses define() calls client-side, categorizes into 8 groups. preferSummarize bypasses LLM truncation. Fixes #51 from Day 1. LGTM!
This was referenced Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wp-agentic-admin/wp-config-listability that lists all PHPdefine()constants fromwp-config.php, grouped by category (Database, Debug, Security, Performance, URLs & Paths, Auth Keys & Salts, Multisite, Custom)read-fileability, reusing its PHP backend for path resolution, ABSPATH security checks, andwp_agentic_admin_redact_sensitive_data()redaction (no new PHP file needed)Changes
src/extensions/abilities/wp-config-list.js— new abilitysrc/extensions/abilities/index.js— import and registrationtests/abilities/core-abilities.test.js— 3 new test casesTesting
npm test)npm run test:abilities -- --file tests/abilities/core-abilities.test.js)npm run lint:js)composer lint)Notes
execute()callsexecuteAbility('wp-agentic-admin/read-file', { file_path: 'wp-config.php', lines: 500 })directly, so all security and redaction logic is inherited from the existing backendpreferSummarize: trueto bypass LLM and render the grouped constant list directlysite-healthorerror-log-readwith the 1.7B model — both are valid answers; the reliable trigger phrases are those containing "constants" or "defined"