Feature/experimental#593
Draft
leopiccionia wants to merge 276 commits into
Draft
Conversation
… of saved database config
…ed searchable and taggable UI
…er from outputting duplicate JSON schema
…s to prevent nesting hallucinations
…r Assistant's generated text
…tant to prevent schema loss
…a in generated prompts
…ry and anonymize debug keys
…rchitecture mandates
…ker limits - Correctly set system instructions in Neuron_Agent to prevent LLMs (Gemini) from bypassing strict georeferencing rules. - Add [SKIP_ENFORCED_SCHEMA] bypass to internal AI tools (Prompt Generator, API Tester) to prevent OpenAI from returning empty arrays. - Configure generous Docker limits (PHP memory, uploads, max_execution_time, Apache timeout, and MariaDB max_allowed_packet) for heavy development tasks. - Document stability mandates and Docker configurations in GEMINI.md.
- Added a 'Big Numbers' summary section at the top of the AI Logs page to display total input/output tokens and request count grouped by provider and model. - Refactored the provider column in the logs table to distinctly separate the Provider Name (e.g., 'OPENAI') and the Model ID (e.g., 'gpt-4o') for improved readability.
…Base - Integrated Neuron AI's FileVectorStore with separated production and test environments. - Added WP-CLI command (`wp jeo ai vectorize`) to bulk ingest published posts. - Created interactive RAG Dashboard in Settings with a visual Embedding Model selector (Select2). - Enabled Semantic Retrieval tests and random post Vectorization tests directly from the WordPress admin. - Implemented mathematical token approximation for embedding operations (Ingestion & Retrieval) tracking costs in AI Dashboard. - Updated architectural documentation (GEMINI.md) and README files highlighting v3.8.0 features.
- Updated `JEO_VERSION` constant and plugin header in `src/jeo.php`. - Updated package version in `package.json` and synced `package-lock.json`. - Updated build version target in `build.sh`. - Aligned versioning across all documentation (README.md, README_BR.md, rag-integration.md, src/README.txt, trunk/readme.txt, and GEMINI.md), replacing future 3.8.0 mentions with the current experimental build version.
- Implemented RAG_Agent::is_feasible() to validate directory permissions and AI provider compatibility. - Added a visual overlay in Settings > Knowledge Base to block RAG features when requirements are not met, providing friendly guidance for troubleshooting.
- Dynamically generates an .htaccess file in the jeo-ai-store upload directory to deny public web access. - Strictly adheres to the security mandates defined in GEMINI.md.
…lization with background processing and audit logs
…support - Add Context_Agent with critical prompt rules (inline links + factual grounding) - Add 'Suggest initial prompt' and 'Optimize prompt with AI' buttons in AI Context tab - Add REST endpoint POST /jeo/v1/context/engineer-prompt for prompt optimization - Fix i18n variable scope in settings-page.js breaking Generate Prompt button - Enqueue settings-page.js on correct hook jeo_page_jeo-ai-settings - Bump PHP requirement to 8.2 across plugin header and readme.txt - Add WP-CLI service to Docker Compose and .docker/wp.sh helper - Update AGENTS.md and architecture docs for AI/Context domains
…rovider UX - Add separate natural-language description textarea for the AI Context Prompt Engineer Assistant - Save the description to localStorage (jeo_context_prompt_description) automatically - Generate the optimized custom prompt into the ai_context_prompt textarea above - Rename action button to 'Generate Custom Prompt' and auto-enable custom prompt toggle on success - Update .architecture/context/README.md with the new UI flow and endpoint semantics
- Store ai_context_prompt as structured output JSON internally while showing plain text in the UI
- Add Context_Agent::extract_prompt_text() to decode {prompt:...} for both display and runtime use
- Decode JSON on page load so users never see raw JSON in the textarea
- Encode plain textarea content back to JSON on form submit so structured output is preserved
- Keep backward compatibility with legacy plain-text saved prompts
- Update AGENTS.md Context Assistant conventions to mention JSON storage and extract_prompt_text()
- Update .architecture/context/README.md system prompt and settings table with storage format note
- Clarify that backend consumers must decode {prompt:...} via Context_Agent::extract_prompt_text()
…ments - Mini-Mapas: - validate_layers() returns valid + removed; REST exposes removed_layers - Reinforce prompt against generic national layers in local/regional scope - Deduplicate manually added layer IDs in layers-settings.js - Use ai_rag_topk setting (default 10, clamp 1-50) in Search_Layers_Tool and /minimap/setup - Hybrid RAG: semantic + WP_Query text search in RAG_Worker - Optional per-layer reason field displayed in layers-panel - Stories Near You: - Persist lat/lng block attributes and prioritize them on frontend - Add radiusKm (1-2000 km) to attributes, REST and SQL HAVING - resolve_server_location() returns null when no default; friendly message - Docs: update .architecture/minimap and .architecture/stories-near-you - Quality: phpcs clean, npm run test:unit 72/72 passing
…ugin into feature/experimental
Add scripts/build-wordpress-zip.sh to produce a production-ready plugin
ZIP that includes:
- Production Composer dependencies in src/vendor/ (--skip-composer optional)
- Built JS/CSS assets in src/js/build/ (--skip-assets optional)
- Translation files when WP-CLI is available (--skip-i18n optional)
The script validates Node 24, installs dependencies, builds assets,
stages src/ into a temp directory, strips dev artifacts from vendor
(tests, docs, bin, markdown, git files), and creates dist/jeo-{version}.zip
with the plugin root folder named 'jeo'.
- Persist technical summary per conversation in post_meta
(_jeo_minimap_summary_{conversation_id}): original intent, topics,
layers found/removed, base variant, center/zoom, pins count.
- Enrich build_state_context with per-layer reasons, full pin coordinates,
original intent and searched topics.
- Strengthen system prompt with explicit Refinement Rules:
preserve existing map, make only requested changes, minimal regeneration.
- Improve post_analyzer queries with thematic query templates.
- Add diff guard in run_agent(): preserves previous layers when the agent
removes too many without an explicit regeneration request, and warns the
user in the result message.
- validate_layers() now returns valid + removed IDs; removed_layers is included in REST responses and surfaced as a notice message. - Strengthen system prompt to reject generic national layers for local/regional scopes. - Deduplicate manually added layer IDs in layers-settings.js. - Use ai_rag_topk setting (default 10, clamp 1-50) in minimap setup and Search_Layers_Tool. - Implement hybrid layer search: semantic RAG + WP_Query text search in RAG_Worker. - Add optional per-layer reason field in Minimap_Output schema, prompt, and layers-panel UI. - Improve post_analyzer suggested_search_queries with thematic templates.
- Add orderBy attribute with modes: recent, nearest, relevance. - Add combined distance + date scoring formula for relevance mode. - Add maxAgeDays filter (0 = no limit) with SQL DATE_SUB clause. - Expose distanceWeight and dateWeight controls when relevance is selected. - Wire new attributes through JS block registration, editor controls, frontend REST params and REST schema/sanitization.
…boundaries and explain mode - Register layer-theme taxonomy for map-layer with default terms. - Include themes in RAG embeddings and search results. - Expose available layer themes in the minimap system prompt. - Allow proactive generation of simple administrative boundary layers (municipal/state) without explicit user confirmation when Mapbox key exists. - Enrich agent layer output with attribution and theme metadata. - Display layer reason, themes and source in the inspector layers-panel.
Document Phase 3 refinement stability (summary persistence, state context, diff guard), Phase 4 layer themes/explain mode, and Stories Near You ordering/scoring/age filter features.
…ental - Phase 3: refinement stability (summary persistence, enriched state context, diff guard, refinement rules in prompt). - Phase 4.1-4.3: layer-theme taxonomy, RAG theme indexing, proactive admin boundaries, explain mode in layers panel. - Phase 4.4-4.6: stories-near-you orderBy, combined distance+date scoring, maxAgeDays filter, distance/date weights. - Keep radiusKm attribute and validate_layers_report() naming from the correct Phase 1-2 base branch. - Add AsyncModeProvider wrappers to layer-editor and map-editor previews. - Update .architecture/ docs.
- Split sidebar and block responsibilities: sidebars hold forms only, live previews live in jeo/layer-editor and jeo/map-editor blocks. - Remove key-based remounts in layer-editor-preview and map-editor-preview. - Add load_as_style support via map-blocks/use-style-layer.js across all map editors (minimap, map, onetime-map, storymap). - Add save-lock and notices in layer-editor-preview based on load status. - Use local viewState in map-editor-preview; persist center/zoom only on moveend/zoomend. - Simplify layers-sidebar.js and maps-sidebar.js; remove dead portals and scss files. - Update .architecture docs and AGENTS.md conventions.
…liana/Thayane) Mini-Mapas: - Render visible fallback paint for vector layers with no saved style so AI-selected catalog layers stop appearing invisibly (only pins showing). - Validate layer renderability (not just published status); report layers missing required source config as removed instead of rendering empty. - Flag auto-styled layers in the layers panel; reinforce boundary+theme prompt. - Widen RAG layer recall with PT/EN domain synonyms in the embedding text. Histórias Perto de Mim: - Default ordering changed from "recent" to "relevance" (distance + date). - Discard invalid/sentinel coordinates in the proximity SQL. - Register the index meta key that is actually written (_geocode_lon_*). - Enqueue frontend assets from render_callback so the block loads even when has_block() misses it; enqueue core/latest-posts styles for native layout and fix featured image sizing. Contexto por IA: - Reinforce anti-hallucination rules (no invented terms, cite exact source). - Display the references used (were fetched but never rendered). - Archive suggestion versions and add a "Previous suggestions" browser in the expanded view; persist refined responses; clean up metas on uninstall.
…/experimental # Conflicts: # .architecture/minimap/README.md # .architecture/stories-near-you/README.md # AGENTS.md # src/includes/ai/class-layer-data-loader.php # src/includes/ai/class-minimap-agent.php # src/includes/ai/class-minimap-output.php # src/includes/ai/class-search-layers-tool.php # src/includes/minimap/class-minimap.php # src/includes/stories-near-you/class-stories-near-you.php # src/js/src/layers-sidebar/layers-sidebar.js # src/js/src/map-blocks/index.js # src/js/src/map-blocks/layers-panel.css # src/js/src/map-blocks/layers-panel.js # src/js/src/map-blocks/layers-settings.js # src/js/src/map-blocks/stories-near-you-editor.js
Consolidate duplicated logic from build.sh, install-and-build.sh and build-wordpress-zip.sh into a shared scripts/lib/common.sh (logging helpers, plugin-version extraction, Node 24 check with nvm fallback, ZIP packaging). - build.sh is now the canonical release builder (absorbs the superior vendor cleanup / i18n / output validation from build-wordpress-zip.sh) - install-and-build.sh does a clean reinstall then delegates build+zip to build.sh --skip-composer - build-wordpress-zip.sh becomes a thin alias that execs build.sh - jeo_ensure_node_24 sources nvm first and switches to Node 24 before any npm step, so the build never hits EBADDEVENGINES - recreate the missing scripts/check-node-version.mjs (its absence made install-and-build.sh error on every run) - document the consolidated scripts in .architecture/build/README.md
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.
No description provided.