Skip to content

Feature/mcp v1#63

Merged
LC43 merged 349 commits into
devfrom
feature/mcp-v1
Jul 7, 2026
Merged

Feature/mcp v1#63
LC43 merged 349 commits into
devfrom
feature/mcp-v1

Conversation

@LC43

@LC43 LC43 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

add mcp for saltus features

LC43 added 30 commits June 29, 2026 04:11
Add MCP feature class that hooks into the Saltus feature registration system. Include MCP in the default feature list in Core.php.
Compatibility test covering native ability registration, capability gating, and REST-backed dispatch.
Add get_options, get_rest_base, get_label_singular, get_label_plural, and get_featured_image_label to BaseModel. Add get_associations and is_hierarchical to Taxonomy for REST API consumption.
Extend ModelsController to include rest_base, associations, and hierarchical fields for Taxonomy models. Add test helpers for taxonomy registration and ability functions.
Replace createMock with createStub since no expectation verification is needed.
Document WordPress 7.0 MCP/Abilities integration paths for both native MCP clients and stdio fallback. Add new tools to the available tools table. Update ROADMAP with top priority section and exit criteria. Sync CURRENT.md with recent changes.
- Enable executionOrder=random, beStrictAbout and failOn flags
- Add phpunit.xml.dist as distribution configuration
- Create TestCase base class for all framework test suites
- Include is_admin() stub in Rest functions for compatibility
@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

almost done!

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces version 2.0.0 of the Saltus Framework, featuring a major integration with WordPress-native MCP/Abilities and a comprehensive REST API namespace (saltus-framework/v1). It implements a two-pass service registration model to decouple REST and MCP tool availability from the current page loading context, alongside robust runtime controls such as transient caching, sliding-window rate limiting, and database-backed audit logging. Additionally, extensive documentation, unit/integration tests, and shared service classes have been added to harden the framework. Feedback on the changes highlights a potential fatal error in ModelsController.php where directly accessing $model->description could fail on non-public properties, recommending the use of the existing check_method helper instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/Rest/ModelsController.php
LC43 added 3 commits July 7, 2026 21:52
Replace direct $model->description access with check_method
getter/property fallback to prevent PHP 8.2+ dynamic
property deprecation notices and potential fatal errors
on non-public description properties.
@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the Saltus Framework to version 2.0.0, introducing WordPress-native MCP/Abilities integration, a framework REST API, and production-hardening features like rate limiting, transient caching, and audit logging. It also refactors legacy paths by extracting inline REST controller logic into shared service classes to eliminate code duplication. The review feedback highlights opportunities to improve defensive programming, specifically by verifying that REST responses are instances of \WP_REST_Response before calling methods on them, and by replacing the ARRAY_A constant with a string literal to prevent fatal errors in non-WordPress environments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/MCP/Abilities/AbilityRuntime.php
Comment thread src/MCP/Audit/WpdbAuditDatabase.php
@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the Saltus Framework to version 2.0.0, introducing a WordPress-native MCP/Abilities integration and a comprehensive REST API. Key architectural changes include a two-pass service registration model to ensure REST/MCP routes are unconditionally registered on boot, and the extraction of controller logic into shared services like SaltusSingleExport, MetaFieldProvider, ReorderPostsService, and SettingsManager. Additionally, the PR adds extensive documentation and a robust PHPUnit test suite. Feedback highlights a critical bug in is_fake_date_export_query() where a strict array structure assumption on date_query will cause a runtime exception and break single post exports in production; a robust iteration-based extraction of the date parameters is suggested.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/Features/SingleExport/SaltusSingleExport.php Outdated
@LC43
LC43 changed the base branch from main to dev July 7, 2026 16:54
@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces version 2.0.0 of the Saltus Framework, featuring a major integration with the WordPress-native MCP/Abilities API. It exposes 17 REST-backed MCP tools and registers a new 'saltus-framework/v1' REST namespace with endpoints for models, duplicate, export, settings, meta, reorder, and health. The update removes the legacy standalone stdio MCP server, implements a two-pass service registration model to decouple tool discovery from page-loading contexts, and adds robust runtime controls including transient caching, sliding-window rate limiting, and database-backed audit logging. Additionally, inline controller logic has been refactored into shared services, and a comprehensive PHPUnit test suite has been introduced alongside PHPStan Level 7 compliance. Feedback on the changes highlights a potential TypeError in MetaFieldProvider::all_post_type_meta() if the model's meta configuration is not an array, recommending an explicit array check to ensure type safety.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/Features/Meta/MetaFieldProvider.php
@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces version 2.0.0 of the Saltus Framework, featuring major architectural upgrades such as WordPress-native MCP/Abilities integration, a comprehensive REST API under the saltus-framework/v1 namespace, sliding-window rate limiting, transient caching, and custom database-backed audit logging. It also refactors legacy features (such as single-post export, metadata normalization, post reordering, and settings management) into shared service classes to eliminate code duplication between REST and MCP paths, while introducing a robust PHPUnit test suite and achieving PHPStan Level 7 compliance. The review feedback focuses on ensuring runtime stability and compatibility. Key recommendations include: casting the meta name to a string in CodestarMeta.php to prevent a fatal TypeError when fields are sequentially indexed; making the $wp_query parameter optional in SaltusSingleExport::query to avoid ArgumentCountError when the filter is triggered externally; correcting inconsistent indentation in SaltusAdminFilters.php; and replacing the Guzzle dependency with WordPress-native HTTP APIs to prevent dependency conflicts in the broader WordPress ecosystem.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/Features/Meta/CodestarMeta.php Outdated
Comment thread src/Features/SingleExport/SaltusSingleExport.php Outdated
Comment thread src/Features/AdminFilters/SaltusAdminFilters.php
Comment thread composer.json Outdated
@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@LC43

LC43 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request delivers a major upgrade to version 2.0.0 of the Saltus Framework, introducing a WordPress-native MCP/Abilities integration, a comprehensive REST API namespace (saltus-framework/v1), and robust runtime controls including transient caching, sliding-window rate limiting, and database-backed audit logging. Key architectural enhancements include a two-pass service registration model in Core to ensure REST/MCP availability regardless of the request context, and the extraction of controller logic into shared services (such as MetaFieldProvider and SettingsManager) to eliminate code duplication. Additionally, the codebase has been hardened with strict type safety, PHPStan Level 7 compliance, and a comprehensive PHPUnit test suite. Detailed documentation, integration guides, and a future roadmap have also been added. There are no review comments to address, and no further feedback is required.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@LC43
LC43 merged commit 91a8e09 into dev Jul 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant