Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npm run lint:js # JS lint
Every ability needs BOTH PHP (backend) and JS (chat interface):

1. **PHP**: `includes/abilities/{kebab-case}.php` — use `register_agentic_ability()`. Must include `permission_callback` and `input_schema` with top-level `default` for optional-input abilities (GET requests fail without it). Return `{ success: bool, message: string, ... }`.
2. **JS**: `src/extensions/abilities/{kebab-case}.js` — use `registerAbility( 'wp-agentic-admin/{id}', { label, description, keywords, execute, summarize, interpretResult, ... } )`. Keep `label` and `description` as **string literals** (test loader extracts via regex).
2. **JS**: `src/extensions/abilities/{kebab-case}.js` — use `registerAbility( 'agentic-admin/{id}', { label, description, keywords, execute, summarize, interpretResult, ... } )`. Keep `label` and `description` as **string literals** (test loader extracts via regex).
3. **Register**: import and call in `src/extensions/abilities/index.js`
4. **Tests**: ability auto-appears. Add test cases to `tests/abilities/core-abilities.test.js`

Expand All @@ -51,7 +51,7 @@ See [Abilities Guide](docs/ABILITIES-GUIDE.md) for `parseIntent()`, confirmation
## Version Bumping

Update ALL of these:
1. `wp-agentic-admin.php` — header `Version:`, `WP_AGENTIC_ADMIN_VERSION` constant, `activate()` hook
1. `agentic-admin.php` — header `Version:`, `AGENTIC_ADMIN_VERSION` constant, `activate()` hook
2. `package.json` — `version` field
3. `readme.txt` — `Stable tag:` + changelog entry
4. `npm install --package-lock-only` to sync `package-lock.json`
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/build-ability/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Create files in this order:
File: `includes/abilities/{name}.php`

Rules:
- Function names: `wp_agentic_admin_register_{snake}` and `wp_agentic_admin_execute_{snake}`
- Function names: `agentic_admin_register_{snake}` and `agentic_admin_execute_{snake}`
- Always include `permission_callback`
- Always include `input_schema` with top-level `default` for optional/no-input abilities
- Always include `output_schema`
Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/new-ability/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Read these for the full patterns:
## Steps

1. **PHP backend** — create `includes/abilities/$ARGUMENTS.php`:
- Use `register_agentic_ability( 'wp-agentic-admin/$ARGUMENTS', $php_config, $js_config )`
- Use `register_agentic_ability( 'agentic-admin/$ARGUMENTS', $php_config, $js_config )`
- Include `permission_callback` with appropriate `current_user_can()` check
- Include `input_schema` with top-level `default` field
- Include `output_schema`
- Set `annotations`: `readonly`, `destructive`, `idempotent`
- Implement `execute_callback` returning `{ success: bool, message: string, ... }`

2. **JS chat interface** — create `src/extensions/abilities/$ARGUMENTS.js`:
- Use `registerAbility( 'wp-agentic-admin/$ARGUMENTS', { ... } )`
- Use `registerAbility( 'agentic-admin/$ARGUMENTS', { ... } )`
- Include: `label` (string literal), `description` (string literal), `keywords` (array), `initialMessage`, `summarize()`, `interpretResult()`, `execute()`
- Set `requiresConfirmation` based on whether the ability is destructive

Expand Down
8 changes: 4 additions & 4 deletions .claude/skills/playground/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ allowed-tools: "mcp__wp-playground__start_playground, mcp__wp-playground__wp_cli

# Start WordPress Playground

Spin up an ephemeral WordPress Playground with wp-agentic-admin mounted from the local working directory.
Spin up an ephemeral WordPress Playground with agentic-admin mounted from the local working directory.

## Important: Mount + Activation Gotchas

Expand All @@ -18,15 +18,15 @@ Spin up an ephemeral WordPress Playground with wp-agentic-admin mounted from the

1. **Start Playground** with an empty blueprint and mount the plugin:
- Blueprint: `{"steps": []}`
- Options: `{"mount": ["<project-root>:/wordpress/wp-content/plugins/wp-agentic-admin"]}`
- Options: `{"mount": ["<project-root>:/wordpress/wp-content/plugins/agentic-admin"]}`
- Where `<project-root>` is the current working directory

2. **Activate the plugin** via WP-CLI (only after Playground is running):
- `plugin activate wp-agentic-admin`
- `plugin activate agentic-admin`

3. **Report** the URL and credentials to the user:
- Site URL (typically http://127.0.0.1:9400)
- Plugin page: `<site-url>/wp-admin/admin.php?page=wp-agentic-admin`
- Plugin page: `<site-url>/wp-admin/admin.php?page=agentic-admin`
- Credentials: admin / password

4. If any step fails, check logs with `get_playground_logs` and report the error.
2 changes: 1 addition & 1 deletion .claude/skills/release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ allowed-tools: "Bash(npm *), Bash(git *), Bash(gh *), Read, Edit"
## Steps

1. **Version bump** — update ALL of these to `$ARGUMENTS`:
- `wp-agentic-admin.php`: plugin header `Version:`, `WP_AGENTIC_ADMIN_VERSION` constant, `activate()` hook
- `agentic-admin.php`: plugin header `Version:`, `AGENTIC_ADMIN_VERSION` constant, `activate()` hook
- `package.json`: `version` field
- `readme.txt`: `Stable tag:` field
- Run `npm install --package-lock-only` to sync `package-lock.json`
Expand Down
3 changes: 1 addition & 2 deletions .distpackage
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
includes/
wp-agentic-admin.php
sw-loader.php
agentic-admin.php
uninstall.php
build-extensions/
languages/
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
jest: true, // For test files (describe, it, expect, etc.)
},
globals: {
wpAgenticAdmin: 'readonly',
agenticAdmin: 'readonly',
},
rules: {
// Allow console statements (useful for debugging AI agent behavior)
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Welcome, hackathon contributor! This is a quick-start guide to get you up and ru
1. **Fork & clone** the repo
2. `npm install`
3. `npm run start` (watch mode) or `npx wp-scripts build`
4. Copy/symlink the plugin into `wp-content/plugins/wp-agentic-admin/`
4. Copy/symlink the plugin into `wp-content/plugins/agentic-admin/`
5. Activate in WordPress admin

### Requirements
Expand Down
4 changes: 2 additions & 2 deletions .github/templates-full/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDU
```

6. **Set up WordPress**:
- Copy plugin to your local WordPress installation: `wp-content/plugins/wp-agentic-admin/`
- Copy plugin to your local WordPress installation: `wp-content/plugins/agentic-admin/`
- Activate the plugin
- Navigate to "Agentic Admin" in WordPress admin

Expand Down Expand Up @@ -157,7 +157,7 @@ Follow [WordPress PHP Coding Standards](https://developer.wordpress.org/coding-s

```php
// Good
function wp_agentic_admin_example_function( string $param ): bool {
function agentic_admin_example_function( string $param ): bool {
if ( ! current_user_can( 'manage_options' ) ) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion .github/templates-full/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Related to #
- [ ] Example queries provided

**Ability Details:**
- Ability ID: `wp-agentic-admin/`
- Ability ID: `agentic-admin/`
- Category:
- Operation Type: [ ] read-only [ ] write [ ] write-destructive
- Required Capability:
Expand Down
2 changes: 1 addition & 1 deletion .playground/blueprint-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"wpVersion": "6.9",
"phpVersion": "8.3",
"plugins": [],
"landingPage": "/wp-admin/admin.php?page=wp-agentic-admin",
"landingPage": "/wp-admin/admin.php?page=agentic-admin",
"multisite": false,
"autoLogin": true,
"phpConstants": {
Expand Down
2 changes: 1 addition & 1 deletion .playground/blueprint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/wp-admin/admin.php?page=wp-agentic-admin",
"landingPage": "/wp-admin/admin.php?page=agentic-admin",
"preferredVersions": {
"wp": "6.9",
"php": "8.3"
Expand Down
14 changes: 7 additions & 7 deletions .release-notes/0.11.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ compliance, and critical bug fixes.
```
= 0.11.0 =
* Renamed: Plugin is now "Agentic Admin for WordPress". Text domain "agentic-admin", function prefix agentic_admin_*. WordPress.org submission-ready.
* Removed: feedback system, WebMCP bridge, voice input, and three low-value abilities (backup-check, opcode-cache-status, disk-usage). Code preserved in git history; voice + write-file + content-generate + plugin-ecosystem abilities parked for v1.x as opt-in via WP_AGENTIC_ADMIN_ENABLE_LABS constant.
* Removed: feedback system, WebMCP bridge, voice input, and three low-value abilities (backup-check, opcode-cache-status, disk-usage). Code preserved in git history; voice + write-file + content-generate + plugin-ecosystem abilities parked for v1.x as opt-in via AGENTIC_ADMIN_ENABLE_LABS constant.
* Security: blocked sensitive-column reads (user_email, user_pass) in query-database to prevent reconnaissance attacks (#166). Hardened query length cap and read-only verb gate.
* Security: escaped output in functions-abilities.php (#121). Added sw-loader.php access-control rationale (#123). Documented direct-DB-call rationale in db-optimize and database-check.
* Compliance: removed deprecated load_plugin_textdomain() call, prefixed uninstall.php globals, fixed nonexistent Domain Path header, excluded CLOUDFEST_HACKATHON.md from distribution build.
* New: ability manifest as single source of truth for which abilities register, with a wp_agentic_admin_enabled_abilities filter for selective override. PHP authoritative for PHP-backed abilities; JS adds back the JS-only ones.
* New: ability manifest as single source of truth for which abilities register, with a agentic_admin_enabled_abilities filter for selective override. PHP authoritative for PHP-backed abilities; JS adds back the JS-only ones.
* Fixed: thinking-disable setting now actually suppresses the streaming UI even when Qwen ignores /nothink (#181).
* Fixed: Settings panel is now a real tab (not a stateful cog toggle). No more lingering Chat-tab underline or stale-state regressions (#197).
* Fixed: Activate/Deactivate buttons on plugin-list rows now flip to the inverse action after a successful click (#179).
Expand Down Expand Up @@ -60,9 +60,9 @@ compliance, and critical bug fixes.

## Files to update for the version bump

1. `wp-agentic-admin.php`
1. `agentic-admin.php`
- Header: `Version: 0.10.0` → `Version: 0.11.0`
- Constant: `define( 'WP_AGENTIC_ADMIN_VERSION', '0.10.0' )` → `'0.11.0'`
- Constant: `define( 'AGENTIC_ADMIN_VERSION', '0.10.0' )` → `'0.11.0'`
- Activate hook: `update_option( 'agentic_admin_version', '0.10.0' )` → `'0.11.0'`
2. `package.json`: `"version": "0.10.0"` → `"0.11.0"`
3. `readme.txt`: `Stable tag: 0.10.0` → `0.11.0`
Expand All @@ -75,7 +75,7 @@ compliance, and critical bug fixes.

**#206 (rename) MUST merge last.** It conflicts with 3 of the small PRs. Local `git rerere` has recorded the resolutions, so when the actual rebase happens, git replays them automatically. To re-prime rerere on another machine, redo the dry-run merge: `git checkout -b dryrun dev; git config rerere.enabled true; for b in <small-pr-branches>; do git merge --no-ff --no-edit origin/$b; done; git merge origin/fix/v0-11-wp-org-rename`, resolve, commit, discard branch.

### Conflict 1: `wp-agentic-admin.php` (#206 ↔ #198)
### Conflict 1: `agentic-admin.php` (#206 ↔ #198)

Two blocks in the file:
1. Plugin header `Text Domain` line + `Domain Path` line — keep #206's `Text Domain: agentic-admin`, drop `Domain Path` per #198 (no `languages/` dir).
Expand All @@ -89,7 +89,7 @@ Two blocks in the file:
1. Function signature: keep `agentic_admin_check_query_safety` (combines #206's prefix-rename with #199's new function name + `string|true` return type).
2. Caller: `$safety = agentic_admin_check_query_safety( $query );` (uses the new function + checks `true !== $safety`).

Also: #199's new functions (`agentic_admin_sensitive_columns`, `agentic_admin_redact_sensitive_row`) need the rename applied manually because #206 didn't see them yet. All `'wp-agentic-admin'` text-domain strings introduced by #199 → `'agentic-admin'`.
Also: #199's new functions (`agentic_admin_sensitive_columns`, `agentic_admin_redact_sensitive_row`) need the rename applied manually because #206 didn't see them yet. All `'agentic-admin'` text-domain strings introduced by #199 → `'agentic-admin'`.

### Conflict 3: `includes/functions-abilities.php` (#206 ↔ #201)

Expand Down Expand Up @@ -121,4 +121,4 @@ git push --force-with-lease origin fix/v0-11-wp-org-rename
- [ ] Disable thinking → send a message → no thinking UI flashes
- [ ] Open a fresh wp-admin page (not the plugin page) — model does NOT preload; click superhero icon to open sidebar — only then does the WebGPU check + auto-load run
- [ ] Try `SELECT * FROM wp_users WHERE user_email = 'admin@…'` via query-database — gets blocked with the sensitive-column message
- [ ] Verify `wp-agentic-admin.zip` build via `npm run dist` does NOT contain `CLOUDFEST_HACKATHON.md` or `docs/FEEDBACK-DEV.md`
- [ ] Verify `agentic-admin.zip` build via `npm run dist` does NOT contain `CLOUDFEST_HACKATHON.md` or `docs/FEEDBACK-DEV.md`
4 changes: 2 additions & 2 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ We have 4 workflows today. We'd love more.
### The codebase at a glance

```
wp-agentic-admin/
agentic-admin/
├── includes/ ← PHP: plugin core + abilities
│ ├── abilities/ ← One PHP file per ability
│ ├── class-abilities.php ← Ability registration system
Expand Down Expand Up @@ -186,7 +186,7 @@ Find your role below. Each section tells you what you'll build, where the code l

**What you'll do:**
1. Pick an ability from the [must-have list](CLOUDFEST_HACKATHON.md#goal-2-expanded-abilities-must-have) or grab an issue labeled `ability` + `php`
2. Create a PHP file in `includes/abilities/` using `wp_agentic_admin_register_ability()`
2. Create a PHP file in `includes/abilities/` using `agentic_admin_register_ability()`
3. Coordinate with a JS developer who builds the chat-side counterpart

**Your workspace:**
Expand Down
2 changes: 1 addition & 1 deletion PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Users can now constrain the AI to curated tool sets via a `+` icon in the input
- **WCAG 2.2 AA accessibility** (PR #155 by @Stefan0x) — ARIA roles/labels, keyboard navigation, focus indicators, reduced motion support across entire chat UI.
- **Fuzzy plugin matching** (PR #154 by @tomepajk) — activate/deactivate now accepts display names with tiered matching and candidate buttons for ambiguous matches. Fixes #53.
- **Ability result status UI** (PR #153 by @0xLoopTheory) — three-state result display (success/info/error) instead of misleading green checkmark on failures. Fixes #74.
- **Prefix global functions** (PR #152 by @AlexanderMelde) — all public PHP functions now use `wp_agentic_admin_` prefix. Fixes #120.
- **Prefix global functions** (PR #152 by @AlexanderMelde) — all public PHP functions now use `agentic_admin_` prefix. Fixes #120.
- **Dynamic plugin bundles** (PR #151 by @BoweFrankema) — plugin abilities appear as selectable bundles in the chat dropdown.
- **Rewrite list categorization** (PR #159 by @Lucisu) — categorized rules with balanced sampling instead of raw dump. Fixes #56.
- **HTTP WebGPU error** (PR #50 by @robert81) — clear "please use HTTPS" message instead of confusing WebGPU error. Day 1 PR finally merged!
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ AI: [Executing: site-health]
## Project Structure

```
wp-agentic-admin/
├── wp-agentic-admin.php # Main plugin file
agentic-admin/
├── agentic-admin.php # Main plugin file
├── uninstall.php # Clean uninstall (multisite-aware)
├── includes/
│ ├── functions-abilities.php # Public API: wp_agentic_admin_register_ability()
│ ├── functions-abilities.php # Public API: agentic_admin_register_ability()
│ ├── class-abilities.php # Ability registration orchestrator
│ ├── class-admin-page.php # Admin page & assets
│ ├── class-settings.php # Plugin settings (model selection, etc.)
Expand All @@ -274,7 +274,7 @@ wp-agentic-admin/
### Building

```bash
cd wp-agentic-admin
cd agentic-admin
npm install
npm run build
```
Expand Down
Loading
Loading