From 4ab87d19e1cd3c9814df4d4e3515ecd61af1ef7e Mon Sep 17 00:00:00 2001 From: Georgi Ignatov Date: Fri, 31 Jul 2026 10:26:06 +0300 Subject: [PATCH 1/3] compliance fixes --- .distignore | 2 ++ .github/workflows/deploy-wordpress-org.yml | 4 +++- .github/workflows/tests.yml | 4 +++- docker/scripts/check-release.sh | 2 +- progress-agentic-rag.php | 2 +- readme.txt | 6 +++--- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.distignore b/.distignore index 6fb1763..958a8d1 100644 --- a/.distignore +++ b/.distignore @@ -6,6 +6,8 @@ /package-lock.json /phpunit.xml.dist /playwright.config.ts +/README.md +/.DS_Store /.phpunit.result.cache /test-results /playwright-report diff --git a/.github/workflows/deploy-wordpress-org.yml b/.github/workflows/deploy-wordpress-org.yml index a71c020..33a12c2 100644 --- a/.github/workflows/deploy-wordpress-org.yml +++ b/.github/workflows/deploy-wordpress-org.yml @@ -127,7 +127,9 @@ jobs: --exclude 'package.json' \ --exclude 'package-lock.json' \ --exclude 'phpunit.xml.dist' \ - --exclude 'playwright.config.ts' + --exclude 'playwright.config.ts' \ + --exclude 'README.md' \ + --exclude '.DS_Store' - name: Release artifact check run: RELEASE_VERSION="${RELEASE_VERSION}" RELEASE_DIR=build/progress-agentic-rag docker compose -f docker/docker-compose.yml run --rm release-check diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6388273..b0e8711 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -103,7 +103,9 @@ jobs: --exclude 'package.json' \ --exclude 'package-lock.json' \ --exclude 'phpunit.xml.dist' \ - --exclude 'playwright.config.ts' + --exclude 'playwright.config.ts' \ + --exclude 'README.md' \ + --exclude '.DS_Store' - name: Release artifact check run: RELEASE_DIR=build/progress-agentic-rag docker compose -f docker/docker-compose.yml run --rm release-check diff --git a/docker/scripts/check-release.sh b/docker/scripts/check-release.sh index 73cae42..69ab314 100644 --- a/docker/scripts/check-release.sh +++ b/docker/scripts/check-release.sh @@ -11,7 +11,7 @@ fi sh "$script_dir/check-release-metadata.sh" -for path in .git .github .distignore .gitignore docker tests node_modules vendor package.json package-lock.json phpunit.xml.dist playwright.config.ts; do +for path in .git .github .distignore .gitignore .DS_Store docker tests node_modules vendor package.json package-lock.json phpunit.xml.dist playwright.config.ts README.md; do if [ -e "$release_dir/$path" ]; then echo "Release artifact includes dev-only path: $path" exit 1 diff --git a/progress-agentic-rag.php b/progress-agentic-rag.php index ea09bef..0920123 100644 --- a/progress-agentic-rag.php +++ b/progress-agentic-rag.php @@ -6,7 +6,7 @@ * * @wordpress-plugin * Plugin Name: Progress Agentic RAG - * Plugin URI: https://www.progress.com/ + * Plugin URI: https://github.com/nuclia/wordpress-plugin * Description: Index WordPress content into Progress Agentic RAG and power knowledge-base search. * Version: 1.0.0 * Requires at least: 6.8 diff --git a/readme.txt b/readme.txt index 9e98d5a..1d8dd0f 100644 --- a/readme.txt +++ b/readme.txt @@ -14,7 +14,7 @@ Index WordPress content into Progress Agentic RAG and power knowledge-base searc Progress Agentic RAG connects WordPress content to the Progress Agentic RAG service so site owners can build searchable knowledge bases from selected public content. -This rebuild is being developed with WordPress.org compatibility, server-side credential handling, background indexing, and automated test coverage as release requirements. +The plugin keeps service credentials server-side, indexes selected content in the background, and provides WordPress-native administration and search integration. When the service connection is configured and validated, the plugin embeds the Progress Agentic RAG search widget on the WordPress front page. Widget requests are proxied through WordPress so the Service Access token stays on the server. @@ -39,10 +39,10 @@ Service details: = Does the plugin expose the service token to visitors? = -No. The production implementation must keep service credentials server-side and use server-side proxy requests where public access is needed. +No. Service credentials stay server-side, and public widget requests use the server-side proxy. == Changelog == = 1.0.0 = -* Initial rebuild skeleton. +* Initial release. From 4b4869ea892b3350534a5a9f3b906b0cda22483d Mon Sep 17 00:00:00 2001 From: Georgi Ignatov Date: Mon, 3 Aug 2026 11:51:07 +0300 Subject: [PATCH 2/3] rename plugin --- progress-agentic-rag.php | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/progress-agentic-rag.php b/progress-agentic-rag.php index 0920123..84791f5 100644 --- a/progress-agentic-rag.php +++ b/progress-agentic-rag.php @@ -5,7 +5,7 @@ * @package ProgressAgenticRag * * @wordpress-plugin - * Plugin Name: Progress Agentic RAG + * Plugin Name: Progress Agentic RAG connector * Plugin URI: https://github.com/nuclia/wordpress-plugin * Description: Index WordPress content into Progress Agentic RAG and power knowledge-base search. * Version: 1.0.0 diff --git a/readme.txt b/readme.txt index 1d8dd0f..79fd72c 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -=== Progress Agentic RAG === +=== Progress Agentic RAG connector === Contributors: progresssoftware Tags: search, ai, knowledge-base, rag, indexing Requires at least: 6.8 From 619ac10130e973583dc7c34ca976ea3c587b3bf2 Mon Sep 17 00:00:00 2001 From: Georgi Ignatov Date: Tue, 4 Aug 2026 17:35:51 +0300 Subject: [PATCH 3/3] fixed plugin check issues that werent captured by the pipeline --- .distignore | 4 +- .github/workflows/deploy-wordpress-org.yml | 28 +-- .github/workflows/tests.yml | 24 +- docker/docker-compose.yml | 2 +- docker/scripts/check-release-metadata.sh | 12 +- docker/scripts/check-release.sh | 24 +- docker/scripts/lint-php.sh | 1 - docker/scripts/run-local-plugin-check.sh | 29 ++- docker/scripts/run-plugin-check.sh | 21 +- progress-agentic-rag.php | 4 +- readme.txt | 3 +- src/Admin/AdminPage.php | 232 +++++++++--------- src/Api/ApiClient.php | 28 +-- src/Frontend/ElementorSearchWidget.php | 6 +- src/Frontend/SearchWidget.php | 8 +- src/Indexing/ManualSync.php | 102 ++++---- src/Indexing/Scheduler.php | 8 +- src/Infrastructure/Requirements.php | 4 +- src/Proxy/ProxyController.php | 8 +- templates/admin/connection-settings.php | 18 +- templates/admin/diagnostics.php | 16 +- templates/admin/indexation.php | 44 ++-- templates/admin/manual-sync-modal.php | 18 +- templates/admin/page-open.php | 10 +- templates/admin/search-widget-status.php | 102 ++++---- templates/admin/sync-history.php | 34 +-- templates/admin/synced-content.php | 24 +- templates/admin/tabs.php | 2 +- templates/admin/taxonomy-labeling.php | 20 +- templates/admin/taxonomy-mapping.php | 36 +-- .../action-scheduler/README.md | 0 .../action-scheduler/action-scheduler.php | 0 .../action-scheduler/changelog.txt | 0 .../classes/ActionScheduler_ActionClaim.php | 0 .../classes/ActionScheduler_ActionFactory.php | 0 .../classes/ActionScheduler_AdminView.php | 0 ...tionScheduler_AsyncRequest_QueueRunner.php | 0 .../classes/ActionScheduler_Compatibility.php | 0 .../ActionScheduler_DataController.php | 0 .../classes/ActionScheduler_DateTime.php | 0 .../classes/ActionScheduler_Exception.php | 0 .../ActionScheduler_FatalErrorMonitor.php | 0 ...ActionScheduler_InvalidActionException.php | 0 .../classes/ActionScheduler_ListTable.php | 0 .../classes/ActionScheduler_LogEntry.php | 0 .../classes/ActionScheduler_NullLogEntry.php | 0 .../classes/ActionScheduler_OptionLock.php | 0 .../classes/ActionScheduler_QueueCleaner.php | 0 .../classes/ActionScheduler_QueueRunner.php | 0 ...tionScheduler_RecurringActionScheduler.php | 0 .../ActionScheduler_SystemInformation.php | 0 .../classes/ActionScheduler_Versions.php | 0 .../ActionScheduler_WPCommentCleaner.php | 0 .../ActionScheduler_wcSystemStatus.php | 0 .../classes/WP_CLI/Action/Cancel_Command.php | 0 .../classes/WP_CLI/Action/Create_Command.php | 0 .../classes/WP_CLI/Action/Delete_Command.php | 0 .../WP_CLI/Action/Generate_Command.php | 0 .../classes/WP_CLI/Action/Get_Command.php | 0 .../classes/WP_CLI/Action/List_Command.php | 0 .../classes/WP_CLI/Action/Next_Command.php | 0 .../classes/WP_CLI/Action/Run_Command.php | 0 .../ActionScheduler_WPCLI_Clean_Command.php | 0 .../ActionScheduler_WPCLI_QueueRunner.php | 0 ...ctionScheduler_WPCLI_Scheduler_command.php | 0 .../classes/WP_CLI/Action_Command.php | 0 .../classes/WP_CLI/Migration_Command.php | 0 .../classes/WP_CLI/ProgressBar.php | 0 .../classes/WP_CLI/System_Command.php | 0 .../classes/abstracts/ActionScheduler.php | 0 .../ActionScheduler_Abstract_ListTable.php | 0 .../ActionScheduler_Abstract_QueueRunner.php | 0 ...onScheduler_Abstract_RecurringSchedule.php | 0 .../ActionScheduler_Abstract_Schedule.php | 0 .../ActionScheduler_Abstract_Schema.php | 0 .../abstracts/ActionScheduler_Lock.php | 0 .../abstracts/ActionScheduler_Logger.php | 0 .../abstracts/ActionScheduler_Store.php | 0 .../ActionScheduler_TimezoneHelper.php | 0 .../ActionScheduler_WPCLI_Command.php | 0 .../actions/ActionScheduler_Action.php | 0 .../ActionScheduler_CanceledAction.php | 0 .../ActionScheduler_FinishedAction.php | 0 .../actions/ActionScheduler_NullAction.php | 0 .../data-stores/ActionScheduler_DBLogger.php | 0 .../data-stores/ActionScheduler_DBStore.php | 0 .../ActionScheduler_HybridStore.php | 0 .../ActionScheduler_wpCommentLogger.php | 0 .../ActionScheduler_wpPostStore.php | 0 ...eduler_wpPostStore_PostStatusRegistrar.php | 0 ...cheduler_wpPostStore_PostTypeRegistrar.php | 0 ...cheduler_wpPostStore_TaxonomyRegistrar.php | 0 .../classes/migration/ActionMigrator.php | 0 .../ActionScheduler_DBStoreMigrator.php | 0 .../classes/migration/BatchFetcher.php | 0 .../classes/migration/Config.php | 0 .../classes/migration/Controller.php | 0 .../migration/DryRun_ActionMigrator.php | 0 .../classes/migration/DryRun_LogMigrator.php | 0 .../classes/migration/LogMigrator.php | 0 .../classes/migration/Runner.php | 0 .../classes/migration/Scheduler.php | 0 .../ActionScheduler_CanceledSchedule.php | 0 .../ActionScheduler_CronSchedule.php | 0 .../ActionScheduler_IntervalSchedule.php | 0 .../ActionScheduler_NullSchedule.php | 0 .../schedules/ActionScheduler_Schedule.php | 0 .../ActionScheduler_SimpleSchedule.php | 0 .../schema/ActionScheduler_LoggerSchema.php | 0 .../schema/ActionScheduler_StoreSchema.php | 0 ...eduler_Abstract_QueueRunner_Deprecated.php | 0 .../ActionScheduler_AdminView_Deprecated.php | 0 .../ActionScheduler_Schedule_Deprecated.php | 0 .../ActionScheduler_Store_Deprecated.php | 0 .../action-scheduler/deprecated/functions.php | 0 .../action-scheduler/functions.php | 0 .../action-scheduler/lib/WP_Async_Request.php | 0 .../lib/cron-expression/CronExpression.php | 0 .../CronExpression_AbstractField.php | 0 .../CronExpression_DayOfMonthField.php | 0 .../CronExpression_DayOfWeekField.php | 0 .../CronExpression_FieldFactory.php | 0 .../CronExpression_FieldInterface.php | 0 .../CronExpression_HoursField.php | 0 .../CronExpression_MinutesField.php | 0 .../CronExpression_MonthField.php | 0 .../CronExpression_YearField.php | 0 .../lib/cron-expression/LICENSE | 0 .../lib/cron-expression/README.md | 0 .../action-scheduler/license.txt | 0 .../action-scheduler/readme.txt | 0 131 files changed, 437 insertions(+), 435 deletions(-) rename {includes/libraries => vendor}/action-scheduler/README.md (100%) rename {includes/libraries => vendor}/action-scheduler/action-scheduler.php (100%) rename {includes/libraries => vendor}/action-scheduler/changelog.txt (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_ActionClaim.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_ActionFactory.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_AdminView.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_Compatibility.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_DataController.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_DateTime.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_Exception.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_FatalErrorMonitor.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_InvalidActionException.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_ListTable.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_LogEntry.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_NullLogEntry.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_OptionLock.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_QueueCleaner.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_QueueRunner.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_RecurringActionScheduler.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_SystemInformation.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_Versions.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/ActionScheduler_wcSystemStatus.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/Cancel_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/Create_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/Delete_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/Generate_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/Get_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/List_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/Next_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action/Run_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Clean_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Action_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/Migration_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/ProgressBar.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/WP_CLI/System_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Lock.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Logger.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_Store.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/abstracts/ActionScheduler_WPCLI_Command.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/actions/ActionScheduler_Action.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/actions/ActionScheduler_NullAction.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/ActionMigrator.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/BatchFetcher.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/Config.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/Controller.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/DryRun_ActionMigrator.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/DryRun_LogMigrator.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/LogMigrator.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/Runner.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/migration/Scheduler.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schedules/ActionScheduler_Schedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schedules/ActionScheduler_SimpleSchedule.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php (100%) rename {includes/libraries => vendor}/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php (100%) rename {includes/libraries => vendor}/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php (100%) rename {includes/libraries => vendor}/action-scheduler/deprecated/ActionScheduler_AdminView_Deprecated.php (100%) rename {includes/libraries => vendor}/action-scheduler/deprecated/ActionScheduler_Schedule_Deprecated.php (100%) rename {includes/libraries => vendor}/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php (100%) rename {includes/libraries => vendor}/action-scheduler/deprecated/functions.php (100%) rename {includes/libraries => vendor}/action-scheduler/functions.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/WP_Async_Request.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_HoursField.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_MonthField.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/CronExpression_YearField.php (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/LICENSE (100%) rename {includes/libraries => vendor}/action-scheduler/lib/cron-expression/README.md (100%) rename {includes/libraries => vendor}/action-scheduler/license.txt (100%) rename {includes/libraries => vendor}/action-scheduler/readme.txt (100%) diff --git a/.distignore b/.distignore index 958a8d1..ac1b7ed 100644 --- a/.distignore +++ b/.distignore @@ -1,7 +1,9 @@ /docker /tests /node_modules -/vendor +/vendor/action-scheduler/README.md +/vendor/action-scheduler/readme.txt +/vendor/action-scheduler/changelog.txt /package.json /package-lock.json /phpunit.xml.dist diff --git a/.github/workflows/deploy-wordpress-org.yml b/.github/workflows/deploy-wordpress-org.yml index 33a12c2..d39e931 100644 --- a/.github/workflows/deploy-wordpress-org.yml +++ b/.github/workflows/deploy-wordpress-org.yml @@ -112,27 +112,15 @@ jobs: - name: Prepare release artifact run: | - rm -rf build/progress-agentic-rag - mkdir -p build/progress-agentic-rag - rsync -a ./ build/progress-agentic-rag/ \ - --exclude '.git' \ - --exclude '.github' \ + rm -rf build/progress-agentic-rag-connector + mkdir -p build/progress-agentic-rag-connector + rsync -a ./ build/progress-agentic-rag-connector/ \ + --exclude-from='.distignore' \ --exclude '.distignore' \ - --exclude '.gitignore' \ - --exclude 'build' \ - --exclude 'docker' \ - --exclude 'tests' \ - --exclude 'node_modules' \ - --exclude 'vendor' \ - --exclude 'package.json' \ - --exclude 'package-lock.json' \ - --exclude 'phpunit.xml.dist' \ - --exclude 'playwright.config.ts' \ - --exclude 'README.md' \ - --exclude '.DS_Store' + --exclude '.gitignore' - name: Release artifact check - run: RELEASE_VERSION="${RELEASE_VERSION}" RELEASE_DIR=build/progress-agentic-rag docker compose -f docker/docker-compose.yml run --rm release-check + run: RELEASE_VERSION="${RELEASE_VERSION}" RELEASE_DIR=build/progress-agentic-rag-connector docker compose -f docker/docker-compose.yml run --rm release-check - name: Deployment dry run complete if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }} @@ -144,5 +132,5 @@ jobs: env: SVN_USERNAME: ${{ secrets.SVN_USERNAME }} SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - SLUG: progress-agentic-rag - BUILD_DIR: build/progress-agentic-rag + SLUG: progress-agentic-rag-connector + BUILD_DIR: build/progress-agentic-rag-connector diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0e8711..492b8a6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -88,24 +88,12 @@ jobs: - name: Prepare release check fixture run: | - rm -rf build/progress-agentic-rag - mkdir -p build/progress-agentic-rag - rsync -a ./ build/progress-agentic-rag/ \ - --exclude '.git' \ - --exclude '.github' \ + rm -rf build/progress-agentic-rag-connector + mkdir -p build/progress-agentic-rag-connector + rsync -a ./ build/progress-agentic-rag-connector/ \ + --exclude-from='.distignore' \ --exclude '.distignore' \ - --exclude '.gitignore' \ - --exclude 'build' \ - --exclude 'docker' \ - --exclude 'tests' \ - --exclude 'node_modules' \ - --exclude 'vendor' \ - --exclude 'package.json' \ - --exclude 'package-lock.json' \ - --exclude 'phpunit.xml.dist' \ - --exclude 'playwright.config.ts' \ - --exclude 'README.md' \ - --exclude '.DS_Store' + --exclude '.gitignore' - name: Release artifact check - run: RELEASE_DIR=build/progress-agentic-rag docker compose -f docker/docker-compose.yml run --rm release-check + run: RELEASE_DIR=build/progress-agentic-rag-connector docker compose -f docker/docker-compose.yml run --rm release-check diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f121ef9..c894453 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -33,7 +33,7 @@ services: image: php:8.1-cli working_dir: /plugin environment: - RELEASE_DIR: ${RELEASE_DIR:-build/progress-agentic-rag} + RELEASE_DIR: ${RELEASE_DIR:-build/progress-agentic-rag-connector} RELEASE_VERSION: ${RELEASE_VERSION:-} volumes: - ..:/plugin diff --git a/docker/scripts/check-release-metadata.sh b/docker/scripts/check-release-metadata.sh index 725e81a..6088d4a 100755 --- a/docker/scripts/check-release-metadata.sh +++ b/docker/scripts/check-release-metadata.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -release_dir="${RELEASE_DIR:-build/progress-agentic-rag}" +release_dir="${RELEASE_DIR:-build/progress-agentic-rag-connector}" expected_version="${RELEASE_VERSION:-}" main_file="$release_dir/progress-agentic-rag.php" readme_file="$release_dir/readme.txt" @@ -26,8 +26,8 @@ if [ ! -d "$release_dir" ]; then fi if [ ! -f "$main_file" ]; then - if [ -f "$release_dir/progress-agentic-rag/progress-agentic-rag.php" ]; then - fail "Release artifact is nested under progress-agentic-rag; WordPress.org trunk must contain plugin files directly." + if [ -f "$release_dir/progress-agentic-rag-connector/progress-agentic-rag.php" ]; then + fail "Release artifact is nested under progress-agentic-rag-connector; WordPress.org trunk must contain plugin files directly." fi fail "Main plugin file not found in release root: $main_file" @@ -40,6 +40,8 @@ fi plugin_header_version="$(awk -F 'Version:[[:space:]]*' '/^[[:space:]]*\*[[:space:]]Version:/ { print $2; exit }' "$main_file" | tr -d '\r' | trim)" constant_version="$(awk -F "'" '/PROGRESS_AGENTIC_RAG_VERSION/ { print $4; exit }' "$main_file" | tr -d '\r' | trim)" stable_tag="$(awk -F 'Stable tag:[[:space:]]*' '/^Stable tag:/ { print $2; exit }' "$readme_file" | tr -d '\r' | trim)" +text_domain="$(awk -F 'Text Domain:[[:space:]]*' '/^[[:space:]]*\*[[:space:]]Text Domain:/ { print $2; exit }' "$main_file" | tr -d '\r' | trim)" +expected_text_domain="${RELEASE_TEXT_DOMAIN:-progress-agentic-rag-connector}" if [ -z "$plugin_header_version" ]; then fail "Plugin header Version is missing." @@ -53,6 +55,10 @@ if [ -z "$stable_tag" ]; then fail "readme.txt Stable tag is missing." fi +if [ "$text_domain" != "$expected_text_domain" ]; then + fail "Plugin header Text Domain ($text_domain) does not match the WordPress.org slug ($expected_text_domain)." +fi + if [ -z "$expected_version" ]; then expected_version="$plugin_header_version" fi diff --git a/docker/scripts/check-release.sh b/docker/scripts/check-release.sh index 69ab314..f049974 100644 --- a/docker/scripts/check-release.sh +++ b/docker/scripts/check-release.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -release_dir="${RELEASE_DIR:-build/progress-agentic-rag}" +release_dir="${RELEASE_DIR:-build/progress-agentic-rag-connector}" script_dir="$(CDPATH= cd "$(dirname "$0")" && pwd)" if [ ! -d "$release_dir" ]; then @@ -11,11 +11,29 @@ fi sh "$script_dir/check-release-metadata.sh" -for path in .git .github .distignore .gitignore .DS_Store docker tests node_modules vendor package.json package-lock.json phpunit.xml.dist playwright.config.ts README.md; do +for path in .git .github .distignore .gitignore .DS_Store docker tests node_modules package.json package-lock.json phpunit.xml.dist playwright.config.ts README.md; do if [ -e "$release_dir/$path" ]; then echo "Release artifact includes dev-only path: $path" exit 1 fi done -echo "Release artifact excludes dev-only paths." +if [ ! -f "$release_dir/vendor/action-scheduler/action-scheduler.php" ]; then + echo "Release artifact is missing the bundled Action Scheduler runtime." + exit 1 +fi + +unexpected_vendor_path="$(find "$release_dir/vendor" -mindepth 1 -maxdepth 1 ! -name action-scheduler -print -quit)" +if [ -n "$unexpected_vendor_path" ]; then + echo "Release artifact includes an unexpected vendor path: $unexpected_vendor_path" + exit 1 +fi + +for path in README.md readme.txt changelog.txt; do + if [ -e "$release_dir/vendor/action-scheduler/$path" ]; then + echo "Release artifact includes unnecessary Action Scheduler documentation: vendor/action-scheduler/$path" + exit 1 + fi +done + +echo "Release artifact excludes dev-only paths and contains only the required Action Scheduler vendor package." diff --git a/docker/scripts/lint-php.sh b/docker/scripts/lint-php.sh index 4f8d612..c9a06cc 100644 --- a/docker/scripts/lint-php.sh +++ b/docker/scripts/lint-php.sh @@ -2,6 +2,5 @@ set -eu find . \ - -path './vendor' -prune -o \ -path './node_modules' -prune -o \ -name '*.php' -print0 | xargs -0 -n1 php -l diff --git a/docker/scripts/run-local-plugin-check.sh b/docker/scripts/run-local-plugin-check.sh index d597af7..988a589 100755 --- a/docker/scripts/run-local-plugin-check.sh +++ b/docker/scripts/run-local-plugin-check.sh @@ -5,23 +5,32 @@ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) plugin_root=$(CDPATH= cd -- "$script_dir/../.." && pwd -P) repo_root=$(CDPATH= cd -- "$plugin_root/../../.." && pwd -P) build_dir="$plugin_root/build" -fixture_dir="$build_dir/progress-agentic-rag" +release_zip="${PLUGIN_CHECK_ZIP:-$build_dir/progress-agentic-rag-connector-1.0.0.zip}" +extract_dir="$build_dir/plugin-check-extracted" +fixture_dir="$extract_dir/progress-agentic-rag-connector" cleanup() { - rm -rf "$fixture_dir" - rmdir "$build_dir" 2>/dev/null || true + rm -rf "$extract_dir" } trap cleanup EXIT HUP INT TERM cleanup -mkdir -p "$fixture_dir" -rsync -a \ - --exclude-from="$plugin_root/.distignore" \ - --exclude='/.distignore' \ - --exclude='/.gitignore' \ - "$plugin_root"/ "$fixture_dir"/ +if [ ! -f "$release_zip" ]; then + echo "Plugin release ZIP not found: $release_zip" >&2 + exit 1 +fi + +mkdir -p "$extract_dir" +unzip -q "$release_zip" -d "$extract_dir" + +if [ ! -f "$fixture_dir/progress-agentic-rag.php" ]; then + echo "Expected plugin root not found in release ZIP: progress-agentic-rag-connector" >&2 + exit 1 +fi + +RELEASE_DIR="$fixture_dir" sh "$script_dir/check-release.sh" cd "$repo_root" WORDPRESS_PORT="${WORDPRESS_PORT:-8080}" WP_URL="${WP_URL:-http://wordpress}" docker compose --profile plugin-check run --rm \ - -v "$fixture_dir:/var/www/html/wp-content/plugins/progress-agentic-rag:ro" \ + -v "$fixture_dir:/var/www/html/wp-content/plugins/progress-agentic-rag-connector:ro" \ plugin-check diff --git a/docker/scripts/run-plugin-check.sh b/docker/scripts/run-plugin-check.sh index 8a1aea9..06d2caf 100644 --- a/docker/scripts/run-plugin-check.sh +++ b/docker/scripts/run-plugin-check.sh @@ -4,8 +4,7 @@ set -eu wp_path="${WP_PATH:-/var/www/html}" wp_url="${WP_URL:-http://wordpress}" plugin_check_version="${PLUGIN_CHECK_VERSION:-2.0.0}" -plugin_check_target="${PLUGIN_CHECK_TARGET:-progress-agentic-rag/progress-agentic-rag.php}" -plugin_check_slug="${PLUGIN_CHECK_SLUG:-progress-agentic-rag}" +plugin_check_target="${PLUGIN_CHECK_TARGET:-progress-agentic-rag-connector/progress-agentic-rag.php}" plugin_check_categories="${PLUGIN_CHECK_CATEGORIES:-plugin_repo}" plugin_check_mode="${PLUGIN_CHECK_MODE:-new}" plugin_check_output="$(mktemp)" @@ -46,27 +45,21 @@ if ! wp_cli core is-installed >/dev/null 2>&1; then exit 1 fi -if ! wp_cli plugin is-installed plugin-check >/dev/null 2>&1; then +if ! wp_cli plugin is-installed plugin-check >/dev/null 2>&1 || + [ "$(wp_cli plugin get plugin-check --field=version)" != "$plugin_check_version" ]; then install_plugin_check else wp_cli plugin activate plugin-check >/dev/null fi -plugin_check_cli="$wp_path/wp-content/plugins/plugin-check/cli.php" -if [ ! -f "$plugin_check_cli" ]; then - echo "Plugin Check CLI loader not found: $plugin_check_cli" - exit 1 -fi +echo "Running Plugin Check $plugin_check_version with the $plugin_check_categories category, automatic slug detection, and no excluded directories against $plugin_check_target." set +e wp_cli plugin check "$plugin_check_target" \ - --require="$plugin_check_cli" \ --categories="$plugin_check_categories" \ --format=strict-json \ --fields=file,line,column,type,code,message,docs \ --mode="$plugin_check_mode" \ - --slug="$plugin_check_slug" \ - --exclude-directories=includes/libraries/action-scheduler \ > "$plugin_check_output" plugin_check_status=$? set -e @@ -107,7 +100,7 @@ if ( JSON_ERROR_NONE !== json_last_error() || ! is_array( $results ) ) { $count = count( $results ); if ( $count > 0 ) { - fwrite( STDERR, sprintf( "Plugin Check found %d Plugin repo issue(s).\n", $count ) ); + fwrite( STDERR, sprintf( "Plugin Check found %d issue(s).\n", $count ) ); $types = array(); $codes = array(); @@ -133,7 +126,7 @@ if ( $count > 0 ) { foreach ( $codes as $code => $code_count ) { fwrite( STDERR, sprintf( " %d %s\n", $code_count, $code ) ); ++$shown; - if ( 10 <= $shown ) { + if ( 20 <= $shown ) { break; } } @@ -153,4 +146,4 @@ if ( $count > 0 ) { } ' "$plugin_check_output" -echo "Plugin Check found no Plugin repo issues." +echo "Plugin Check found no issues." diff --git a/progress-agentic-rag.php b/progress-agentic-rag.php index 84791f5..19b1093 100644 --- a/progress-agentic-rag.php +++ b/progress-agentic-rag.php @@ -15,7 +15,7 @@ * Author URI: https://www.progress.com/ * License: GPL v3 or later * License URI: https://www.gnu.org/licenses/gpl-3.0.html - * Text Domain: progress-agentic-rag + * Text Domain: progress-agentic-rag-connector * Domain Path: /languages */ @@ -51,7 +51,7 @@ return; } -require_once PROGRESS_AGENTIC_RAG_PATH . 'includes/libraries/action-scheduler/action-scheduler.php'; +require_once PROGRESS_AGENTIC_RAG_PATH . 'vendor/action-scheduler/action-scheduler.php'; add_action( 'plugins_loaded', diff --git a/readme.txt b/readme.txt index f9447f9..0cc55cb 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,4 @@ === Progress Agentic RAG connector === -=== Progress Agentic RAG Connector === Contributors: progresssoftware Tags: search, ai, knowledge-base, rag, indexing Requires at least: 6.8 @@ -32,7 +31,7 @@ Service details: == Installation == -1. Upload the plugin files to the `/wp-content/plugins/progress-agentic-rag` directory, or install the plugin through WordPress. +1. Upload the plugin files to the `/wp-content/plugins/progress-agentic-rag-connector` directory, or install the plugin through WordPress. 2. Activate the plugin through the Plugins screen. 3. Configure Progress Agentic RAG from the Progress Agentic RAG admin menu. diff --git a/src/Admin/AdminPage.php b/src/Admin/AdminPage.php index 4fc54e4..42d76e5 100644 --- a/src/Admin/AdminPage.php +++ b/src/Admin/AdminPage.php @@ -58,8 +58,8 @@ public function register(): void { public function add_menu(): void { $this->page_hook = (string) add_menu_page( - __( 'Progress Agentic RAG', 'progress-agentic-rag' ), - __( 'Progress Agentic RAG', 'progress-agentic-rag' ), + __( 'Progress Agentic RAG', 'progress-agentic-rag-connector' ), + __( 'Progress Agentic RAG', 'progress-agentic-rag-connector' ), 'manage_options', self::MENU_SLUG, [ $this, 'render' ], @@ -100,50 +100,50 @@ public function enqueue_assets( string $hook_suffix ): void { 'initialBackgroundSyncStatus' => $this->manual_sync->ensure_automatic_sync(), 'mapping' => $this->mapping_data(), 'strings' => [ - 'closeDeleteProgress' => __( 'Close delete progress', 'progress-agentic-rag' ), - 'closeSyncProgress' => __( 'Close sync progress', 'progress-agentic-rag' ), + 'closeDeleteProgress' => __( 'Close delete progress', 'progress-agentic-rag-connector' ), + 'closeSyncProgress' => __( 'Close sync progress', 'progress-agentic-rag-connector' ), /* translators: %d: synced resource count. */ - 'confirmDelete' => __( 'Delete %d synced resource(s) from Progress Agentic RAG and clear their local sync mappings? This cannot be undone.', 'progress-agentic-rag' ), + 'confirmDelete' => __( 'Delete %d synced resource(s) from Progress Agentic RAG and clear their local sync mappings? This cannot be undone.', 'progress-agentic-rag-connector' ), /* translators: %d: synced resource count. */ - 'confirmReprocess' => __( 'Update labels for %d synced resource(s) with the current taxonomy mapping?', 'progress-agentic-rag' ), - 'deleteFailed' => __( 'Synced resources could not be deleted.', 'progress-agentic-rag' ), - 'deleteModalLabel' => __( 'Synced resource delete', 'progress-agentic-rag' ), - 'deleteModalTitle' => __( 'Deleting synced resources', 'progress-agentic-rag' ), - 'deleteTotalLabel' => __( 'Total resources', 'progress-agentic-rag' ), - 'deleteDoneLabel' => __( 'Deleted', 'progress-agentic-rag' ), - 'deleteCurrentLabel' => __( 'Current resource', 'progress-agentic-rag' ), - 'deleteRunning' => __( 'Delete in progress', 'progress-agentic-rag' ), - 'deleting' => __( 'Preparing synced resource deletion.', 'progress-agentic-rag' ), - 'failed' => __( 'Manual sync could not start.', 'progress-agentic-rag' ), - 'running' => __( 'Sync in progress', 'progress-agentic-rag' ), - 'syncModalLabel' => __( 'Manual sync', 'progress-agentic-rag' ), - 'syncModalTitle' => __( 'Syncing selected content', 'progress-agentic-rag' ), - 'syncTotalLabel' => __( 'Total entities', 'progress-agentic-rag' ), - 'syncDoneLabel' => __( 'Synced', 'progress-agentic-rag' ), - 'syncCurrentLabel' => __( 'Current entity', 'progress-agentic-rag' ), - 'sync' => __( 'Sync manually', 'progress-agentic-rag' ), - 'reprocessFailed' => __( 'Label reprocessing could not start.', 'progress-agentic-rag' ), - 'starting' => __( 'Preparing manual sync.', 'progress-agentic-rag' ), - 'complete' => __( 'Manual sync complete.', 'progress-agentic-rag' ), - 'mappingSelectLabelset' => __( 'Select a labelset', 'progress-agentic-rag' ), - 'mappingRemove' => __( 'Remove', 'progress-agentic-rag' ), - 'mappingLabelset' => __( 'Labelset', 'progress-agentic-rag' ), - 'mappingTerm' => __( 'Term', 'progress-agentic-rag' ), - 'mappingLabels' => __( 'Progress Agentic RAG labels', 'progress-agentic-rag' ), - 'mappingFallback' => __( 'Fallback labels (when no terms assigned)', 'progress-agentic-rag' ), - 'mappingSelectLabels' => __( 'Select a labelset to load labels.', 'progress-agentic-rag' ), - 'mappingLoadingLabels' => __( 'Loading labels...', 'progress-agentic-rag' ), - 'mappingNoLabels' => __( 'No labels available.', 'progress-agentic-rag' ), - 'mappingLabelsFailed' => __( 'Labels could not be loaded.', 'progress-agentic-rag' ), - 'mappingNoTerms' => __( 'No terms available for this taxonomy.', 'progress-agentic-rag' ), - 'testConnection' => __( 'Testing connection...', 'progress-agentic-rag' ), - 'connectionTestFailed' => __( 'Connection test could not run.', 'progress-agentic-rag' ), - 'retryFailed' => __( 'Failed sync items could not be retried.', 'progress-agentic-rag' ), - 'diagnosticsCopied' => __( 'Diagnostics copied.', 'progress-agentic-rag' ), - 'diagnosticsFailed' => __( 'Diagnostics could not be exported.', 'progress-agentic-rag' ), - 'confirmDeleteSingle' => __( 'Delete this resource from Progress Agentic RAG and clear its local sync mapping?', 'progress-agentic-rag' ), - 'deleteSingleFailed' => __( 'The synced resource could not be removed.', 'progress-agentic-rag' ), - 'deleteSingleComplete' => __( 'Synced resource removed.', 'progress-agentic-rag' ), + 'confirmReprocess' => __( 'Update labels for %d synced resource(s) with the current taxonomy mapping?', 'progress-agentic-rag-connector' ), + 'deleteFailed' => __( 'Synced resources could not be deleted.', 'progress-agentic-rag-connector' ), + 'deleteModalLabel' => __( 'Synced resource delete', 'progress-agentic-rag-connector' ), + 'deleteModalTitle' => __( 'Deleting synced resources', 'progress-agentic-rag-connector' ), + 'deleteTotalLabel' => __( 'Total resources', 'progress-agentic-rag-connector' ), + 'deleteDoneLabel' => __( 'Deleted', 'progress-agentic-rag-connector' ), + 'deleteCurrentLabel' => __( 'Current resource', 'progress-agentic-rag-connector' ), + 'deleteRunning' => __( 'Delete in progress', 'progress-agentic-rag-connector' ), + 'deleting' => __( 'Preparing synced resource deletion.', 'progress-agentic-rag-connector' ), + 'failed' => __( 'Manual sync could not start.', 'progress-agentic-rag-connector' ), + 'running' => __( 'Sync in progress', 'progress-agentic-rag-connector' ), + 'syncModalLabel' => __( 'Manual sync', 'progress-agentic-rag-connector' ), + 'syncModalTitle' => __( 'Syncing selected content', 'progress-agentic-rag-connector' ), + 'syncTotalLabel' => __( 'Total entities', 'progress-agentic-rag-connector' ), + 'syncDoneLabel' => __( 'Synced', 'progress-agentic-rag-connector' ), + 'syncCurrentLabel' => __( 'Current entity', 'progress-agentic-rag-connector' ), + 'sync' => __( 'Sync manually', 'progress-agentic-rag-connector' ), + 'reprocessFailed' => __( 'Label reprocessing could not start.', 'progress-agentic-rag-connector' ), + 'starting' => __( 'Preparing manual sync.', 'progress-agentic-rag-connector' ), + 'complete' => __( 'Manual sync complete.', 'progress-agentic-rag-connector' ), + 'mappingSelectLabelset' => __( 'Select a labelset', 'progress-agentic-rag-connector' ), + 'mappingRemove' => __( 'Remove', 'progress-agentic-rag-connector' ), + 'mappingLabelset' => __( 'Labelset', 'progress-agentic-rag-connector' ), + 'mappingTerm' => __( 'Term', 'progress-agentic-rag-connector' ), + 'mappingLabels' => __( 'Progress Agentic RAG labels', 'progress-agentic-rag-connector' ), + 'mappingFallback' => __( 'Fallback labels (when no terms assigned)', 'progress-agentic-rag-connector' ), + 'mappingSelectLabels' => __( 'Select a labelset to load labels.', 'progress-agentic-rag-connector' ), + 'mappingLoadingLabels' => __( 'Loading labels...', 'progress-agentic-rag-connector' ), + 'mappingNoLabels' => __( 'No labels available.', 'progress-agentic-rag-connector' ), + 'mappingLabelsFailed' => __( 'Labels could not be loaded.', 'progress-agentic-rag-connector' ), + 'mappingNoTerms' => __( 'No terms available for this taxonomy.', 'progress-agentic-rag-connector' ), + 'testConnection' => __( 'Testing connection...', 'progress-agentic-rag-connector' ), + 'connectionTestFailed' => __( 'Connection test could not run.', 'progress-agentic-rag-connector' ), + 'retryFailed' => __( 'Failed sync items could not be retried.', 'progress-agentic-rag-connector' ), + 'diagnosticsCopied' => __( 'Diagnostics copied.', 'progress-agentic-rag-connector' ), + 'diagnosticsFailed' => __( 'Diagnostics could not be exported.', 'progress-agentic-rag-connector' ), + 'confirmDeleteSingle' => __( 'Delete this resource from Progress Agentic RAG and clear its local sync mapping?', 'progress-agentic-rag-connector' ), + 'deleteSingleFailed' => __( 'The synced resource could not be removed.', 'progress-agentic-rag-connector' ), + 'deleteSingleComplete' => __( 'Synced resource removed.', 'progress-agentic-rag-connector' ), ], ] ); @@ -156,9 +156,9 @@ public function render(): void { $active_tab = $this->active_tab(); $connection_status_label = $this->connection_status_label(); - $token_status_label = __( 'Missing', 'progress-agentic-rag' ); + $token_status_label = __( 'Missing', 'progress-agentic-rag-connector' ); if ( $this->settings->has_token() ) { - $token_status_label = $this->settings->get_api_is_reachable() ? __( 'Saved', 'progress-agentic-rag' ) : __( 'Stored, unverified', 'progress-agentic-rag' ); + $token_status_label = $this->settings->get_api_is_reachable() ? __( 'Saved', 'progress-agentic-rag-connector' ) : __( 'Stored, unverified', 'progress-agentic-rag-connector' ); } require_once PROGRESS_AGENTIC_RAG_PATH . 'templates/admin/page-open.php'; @@ -184,7 +184,7 @@ public function render(): void { public function save_connection_settings(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag' ) ); + wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag-connector' ) ); } check_admin_referer( 'progress_agentic_rag_save_connection' ); @@ -205,7 +205,7 @@ public function save_connection_settings(): void { public function save_indexation_settings(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag' ) ); + wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag-connector' ) ); } check_admin_referer( 'progress_agentic_rag_save_indexation' ); @@ -233,7 +233,7 @@ public function save_indexation_settings(): void { public function save_taxonomy_labeling_settings(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag' ) ); + wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag-connector' ) ); } check_admin_referer( 'progress_agentic_rag_save_taxonomy_labeling' ); @@ -247,7 +247,7 @@ public function save_taxonomy_labeling_settings(): void { public function save_widget_appearance_settings(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag' ) ); + wp_die( esc_html__( 'You do not have permission to manage Progress Agentic RAG settings.', 'progress-agentic-rag-connector' ) ); } check_admin_referer( 'progress_agentic_rag_save_widget_appearance' ); @@ -260,7 +260,7 @@ public function save_widget_appearance_settings(): void { public function start_manual_sync(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to sync content.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to sync content.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -283,7 +283,7 @@ public function start_manual_sync(): void { public function delete_synced_resources_status(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to view synced resource deletion status.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to view synced resource deletion status.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -293,7 +293,7 @@ public function delete_synced_resources_status(): void { public function manual_sync_status(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to view sync status.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to view sync status.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -303,7 +303,7 @@ public function manual_sync_status(): void { public function background_sync_status(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to view automatic sync status.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to view automatic sync status.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -313,7 +313,7 @@ public function background_sync_status(): void { public function delete_synced_resources(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to delete synced resources.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to delete synced resources.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -328,7 +328,7 @@ public function delete_synced_resources(): void { public function start_label_reprocess(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to reprocess labels.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to reprocess labels.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -343,7 +343,7 @@ public function start_label_reprocess(): void { public function cancel_label_reprocess(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to cancel label reprocessing.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to cancel label reprocessing.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -353,7 +353,7 @@ public function cancel_label_reprocess(): void { public function label_reprocess_status(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to view label reprocessing status.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to view label reprocessing status.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -363,7 +363,7 @@ public function label_reprocess_status(): void { public function get_labelset_labels(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to load labels.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to load labels.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -375,7 +375,7 @@ public function get_labelset_labels(): void { public function test_connection(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to test the connection.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to test the connection.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -396,7 +396,7 @@ public function test_connection(): void { public function retry_failed_sync(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to retry failed sync items.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to retry failed sync items.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -411,7 +411,7 @@ public function retry_failed_sync(): void { public function delete_synced_resource(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to remove synced resources.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to remove synced resources.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -419,7 +419,7 @@ public function delete_synced_resource(): void { $post_id = isset( $_POST['post_id'] ) ? absint( wp_unslash( $_POST['post_id'] ) ) : 0; $rid = $this->synced_resource_id_for_post( $post_id ); if ( $post_id <= 0 || '' === $rid ) { - wp_send_json_error( [ 'message' => __( 'Synced resource mapping was not found.', 'progress-agentic-rag' ) ], 404 ); + wp_send_json_error( [ 'message' => __( 'Synced resource mapping was not found.', 'progress-agentic-rag-connector' ) ], 404 ); } $result = $this->api_client->delete_resource( $post_id, $rid ); @@ -430,14 +430,14 @@ public function delete_synced_resource(): void { wp_send_json_success( [ 'post_id' => $post_id, - 'message' => __( 'Synced resource removed.', 'progress-agentic-rag' ), + 'message' => __( 'Synced resource removed.', 'progress-agentic-rag-connector' ), ] ); } public function export_diagnostics(): void { if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( [ 'message' => __( 'You do not have permission to export diagnostics.', 'progress-agentic-rag' ) ], 403 ); + wp_send_json_error( [ 'message' => __( 'You do not have permission to export diagnostics.', 'progress-agentic-rag-connector' ) ], 403 ); } check_ajax_referer( 'progress_agentic_rag_manual_sync' ); @@ -469,37 +469,37 @@ private function render_tabs( string $active_tab ): void { $tabs = [ [ 'key' => self::TAB_INDEXATION, - 'label' => __( 'Indexation', 'progress-agentic-rag' ), + 'label' => __( 'Indexation', 'progress-agentic-rag-connector' ), 'url' => $this->tab_url( self::TAB_INDEXATION ), ], [ 'key' => self::TAB_TAXONOMY_LABELING, - 'label' => __( 'Taxonomy labeling', 'progress-agentic-rag' ), + 'label' => __( 'Taxonomy labeling', 'progress-agentic-rag-connector' ), 'url' => $this->tab_url( self::TAB_TAXONOMY_LABELING ), ], [ 'key' => self::TAB_SYNCED_CONTENT, - 'label' => __( 'Synchronized content', 'progress-agentic-rag' ), + 'label' => __( 'Synchronized content', 'progress-agentic-rag-connector' ), 'url' => $this->tab_url( self::TAB_SYNCED_CONTENT ), ], [ 'key' => self::TAB_SYNC_HISTORY, - 'label' => __( 'Sync history', 'progress-agentic-rag' ), + 'label' => __( 'Sync history', 'progress-agentic-rag-connector' ), 'url' => $this->tab_url( self::TAB_SYNC_HISTORY ), ], [ 'key' => self::TAB_SEARCH_WIDGET, - 'label' => __( 'Search widget', 'progress-agentic-rag' ), + 'label' => __( 'Search widget', 'progress-agentic-rag-connector' ), 'url' => $this->tab_url( self::TAB_SEARCH_WIDGET ), ], [ 'key' => self::TAB_DIAGNOSTICS, - 'label' => __( 'Diagnostics', 'progress-agentic-rag' ), + 'label' => __( 'Diagnostics', 'progress-agentic-rag-connector' ), 'url' => $this->tab_url( self::TAB_DIAGNOSTICS ), ], [ 'key' => self::TAB_CONNECTION, - 'label' => __( 'Connection settings', 'progress-agentic-rag' ), + 'label' => __( 'Connection settings', 'progress-agentic-rag-connector' ), 'url' => $this->tab_url( self::TAB_CONNECTION ), ], ]; @@ -519,7 +519,7 @@ private function render_updated_notice(): void { if ( 'connected' === $connection_status ) { $notice_type = 'success'; $notice_role = 'status'; - $notice_message = __( 'Connection settings saved. Progress Agentic RAG validated the connection successfully.', 'progress-agentic-rag' ); + $notice_message = __( 'Connection settings saved. Progress Agentic RAG validated the connection successfully.', 'progress-agentic-rag-connector' ); require_once PROGRESS_AGENTIC_RAG_PATH . 'templates/admin/notice.php'; return; } @@ -527,14 +527,14 @@ private function render_updated_notice(): void { if ( 'failed' === $connection_status ) { $notice_type = 'error'; $notice_role = 'alert'; - $notice_message = __( 'Connection settings saved, but Progress Agentic RAG could not validate the connection. Check the Zone, Knowledge Box ID, and Service token with Writer permissions.', 'progress-agentic-rag' ); + $notice_message = __( 'Connection settings saved, but Progress Agentic RAG could not validate the connection. Check the Zone, Knowledge Box ID, and Service token with Writer permissions.', 'progress-agentic-rag-connector' ); require_once PROGRESS_AGENTIC_RAG_PATH . 'templates/admin/notice.php'; return; } $notice_type = 'success'; $notice_role = 'status'; - $notice_message = __( 'Settings saved.', 'progress-agentic-rag' ); + $notice_message = __( 'Settings saved.', 'progress-agentic-rag-connector' ); require_once PROGRESS_AGENTIC_RAG_PATH . 'templates/admin/notice.php'; } @@ -590,11 +590,11 @@ private function render_indexation(): void { $delete_status = $this->manual_sync->delete_status(); $delete_running = 'running' === ( $delete_status['status'] ?? '' ); $manual_sync_disabled = 'running' !== ( $manual_sync_status['status'] ?? '' ) && ( ! $api_connected || ! $scheduler_available || $delete_running ); - $manual_sync_button_text = __( 'Sync manually', 'progress-agentic-rag' ); + $manual_sync_button_text = __( 'Sync manually', 'progress-agentic-rag-connector' ); if ( 'running' === ( $manual_sync_status['status'] ?? '' ) ) { $manual_sync_button_text = sprintf( /* translators: 1: processed entity count, 2: total entity count, 3: completion percent. */ - __( 'Sync in progress (%1$d/%2$d, %3$d%%)', 'progress-agentic-rag' ), + __( 'Sync in progress (%1$d/%2$d, %3$d%%)', 'progress-agentic-rag-connector' ), (int) ( $manual_sync_status['processed'] ?? 0 ), (int) ( $manual_sync_status['total'] ?? 0 ), (int) ( $manual_sync_status['percent'] ?? 0 ) @@ -602,11 +602,11 @@ private function render_indexation(): void { } $sync_status = $this->manual_sync->sync_status( array_keys( $post_types ) ); $label_reprocess_status = $this->manual_sync->label_reprocess_status(); - $delete_button_text = __( 'Delete synced resources', 'progress-agentic-rag' ); + $delete_button_text = __( 'Delete synced resources', 'progress-agentic-rag-connector' ); if ( $delete_running ) { $delete_button_text = sprintf( /* translators: 1: processed resource count, 2: total resource count, 3: completion percent. */ - __( 'Delete in progress (%1$d/%2$d, %3$d%%)', 'progress-agentic-rag' ), + __( 'Delete in progress (%1$d/%2$d, %3$d%%)', 'progress-agentic-rag-connector' ), (int) ( $delete_status['processed'] ?? 0 ), (int) ( $delete_status['total'] ?? 0 ), (int) ( $delete_status['percent'] ?? 0 ) @@ -642,12 +642,12 @@ private function render_connection_settings(): void { $account_id = $this->settings->get_string( SettingsRepository::OPTION_ACCOUNT_ID ); $connection_state_label = sprintf( /* translators: %s: current connection status. */ - __( 'Connection: %s', 'progress-agentic-rag' ), + __( 'Connection: %s', 'progress-agentic-rag-connector' ), $this->connection_status_label() ); - $token_state_label = __( 'Token missing', 'progress-agentic-rag' ); + $token_state_label = __( 'Token missing', 'progress-agentic-rag-connector' ); if ( $this->settings->has_token() ) { - $token_state_label = $this->settings->get_api_is_reachable() ? __( 'Token saved', 'progress-agentic-rag' ) : __( 'Token stored, unverified', 'progress-agentic-rag' ); + $token_state_label = $this->settings->get_api_is_reachable() ? __( 'Token saved', 'progress-agentic-rag-connector' ) : __( 'Token stored, unverified', 'progress-agentic-rag-connector' ); } $zone_option_name = SettingsRepository::OPTION_ZONE; $kbid_option_name = SettingsRepository::OPTION_KBID; @@ -677,7 +677,7 @@ private function synced_content_rows(): array { 'post_id' => $post_id, 'title' => '' !== $title ? $title : sprintf( /* translators: %d: WordPress post ID. */ - __( 'Entity #%d', 'progress-agentic-rag' ), + __( 'Entity #%d', 'progress-agentic-rag-connector' ), $post_id ), 'type' => $this->post_type_label( $post->post_type ), @@ -693,11 +693,11 @@ private function synced_content_rows(): array { 'post_id' => $post_id, 'title' => sprintf( /* translators: %d: WordPress post ID. */ - __( 'Missing entity #%d', 'progress-agentic-rag' ), + __( 'Missing entity #%d', 'progress-agentic-rag-connector' ), $post_id ), - 'type' => __( 'Unknown', 'progress-agentic-rag' ), - 'status' => __( 'Missing', 'progress-agentic-rag' ), + 'type' => __( 'Unknown', 'progress-agentic-rag-connector' ), + 'status' => __( 'Missing', 'progress-agentic-rag-connector' ), 'url' => '', 'rid' => $rid, 'seqid' => isset( $resource->nuclia_seqid ) ? sanitize_text_field( (string) $resource->nuclia_seqid ) : '', @@ -751,23 +751,23 @@ private function widget_status(): array { if ( ! $this->settings->get_api_is_reachable() ) { return [ 'ready' => false, - 'label' => __( 'Inactive', 'progress-agentic-rag' ), - 'message' => __( 'Validate the Progress Agentic RAG connection before the search widget can render.', 'progress-agentic-rag' ), + 'label' => __( 'Inactive', 'progress-agentic-rag-connector' ), + 'message' => __( 'Validate the Progress Agentic RAG connection before the search widget can render.', 'progress-agentic-rag-connector' ), ]; } if ( '' === $this->settings->get_string( SettingsRepository::OPTION_ZONE ) || '' === $this->settings->get_string( SettingsRepository::OPTION_KBID ) || ! $this->settings->has_token() ) { return [ 'ready' => false, - 'label' => __( 'Incomplete', 'progress-agentic-rag' ), - 'message' => __( 'Zone, Knowledge Box ID, and Service token are required for the widget proxy.', 'progress-agentic-rag' ), + 'label' => __( 'Incomplete', 'progress-agentic-rag-connector' ), + 'message' => __( 'Zone, Knowledge Box ID, and Service token are required for the widget proxy.', 'progress-agentic-rag-connector' ), ]; } return [ 'ready' => true, - 'label' => __( 'Ready', 'progress-agentic-rag' ), - 'message' => __( 'The search widget is ready to render through the shortcode, Gutenberg block, or Elementor widget using the server-side proxy.', 'progress-agentic-rag' ), + 'label' => __( 'Ready', 'progress-agentic-rag-connector' ), + 'message' => __( 'The search widget is ready to render through the shortcode, Gutenberg block, or Elementor widget using the server-side proxy.', 'progress-agentic-rag-connector' ), ]; } @@ -829,7 +829,7 @@ private function connection_test_result( string $zone, string $kbid, string $tok if ( '' === $zone || '' === $kbid || '' === $token || ! preg_match( '/^[a-z0-9-]+$/', $zone ) ) { return [ 'connected' => false, - 'message' => __( 'Zone, Knowledge Box ID, and Service token are required before testing the connection.', 'progress-agentic-rag' ), + 'message' => __( 'Zone, Knowledge Box ID, and Service token are required before testing the connection.', 'progress-agentic-rag-connector' ), 'checked_at' => $checked_at, 'checked_at_label' => $this->format_timestamp( $checked_at ), ]; @@ -862,18 +862,18 @@ private function connection_test_result( string $zone, string $kbid, string $tok $response_code = (int) wp_remote_retrieve_response_code( $response ); $connected = 200 === $response_code; - $message = __( 'Progress Agentic RAG validated the connection successfully.', 'progress-agentic-rag' ); + $message = __( 'Progress Agentic RAG validated the connection successfully.', 'progress-agentic-rag-connector' ); if ( ! $connected ) { if ( in_array( $response_code, [ 401, 403 ], true ) ) { - $message = __( 'Progress Agentic RAG rejected the Service token for this Knowledge Box.', 'progress-agentic-rag' ); + $message = __( 'Progress Agentic RAG rejected the Service token for this Knowledge Box.', 'progress-agentic-rag-connector' ); } elseif ( in_array( $response_code, [ 404, 422 ], true ) ) { - $message = __( 'Progress Agentic RAG could not find that Knowledge Box in the selected Zone.', 'progress-agentic-rag' ); + $message = __( 'Progress Agentic RAG could not find that Knowledge Box in the selected Zone.', 'progress-agentic-rag-connector' ); } elseif ( 0 === $response_code ) { - $message = __( 'Progress Agentic RAG did not return an HTTP status while validating the connection.', 'progress-agentic-rag' ); + $message = __( 'Progress Agentic RAG did not return an HTTP status while validating the connection.', 'progress-agentic-rag-connector' ); } else { $message = sprintf( /* translators: %d is the upstream HTTP response code. */ - __( 'Progress Agentic RAG returned HTTP %d while validating the connection.', 'progress-agentic-rag' ), + __( 'Progress Agentic RAG returned HTTP %d while validating the connection.', 'progress-agentic-rag-connector' ), $response_code ); } @@ -981,7 +981,7 @@ private function taxonomy_mapping_warnings( array $mapping, array $labelsets, ar $warnings = []; if ( $this->settings->get_api_is_reachable() && empty( $labelsets ) ) { - $warnings[] = __( 'No Progress Agentic RAG labelsets could be loaded. Saved taxonomy mappings cannot be validated yet.', 'progress-agentic-rag' ); + $warnings[] = __( 'No Progress Agentic RAG labelsets could be loaded. Saved taxonomy mappings cannot be validated yet.', 'progress-agentic-rag-connector' ); } foreach ( $mapping as $taxonomy => $config ) { @@ -992,7 +992,7 @@ private function taxonomy_mapping_warnings( array $mapping, array $labelsets, ar if ( empty( $taxonomy_terms[ $taxonomy ] ) ) { $warnings[] = sprintf( /* translators: %s: taxonomy name. */ - __( 'The %s taxonomy has no terms available to map.', 'progress-agentic-rag' ), + __( 'The %s taxonomy has no terms available to map.', 'progress-agentic-rag-connector' ), $taxonomy ); } @@ -1001,7 +1001,7 @@ private function taxonomy_mapping_warnings( array $mapping, array $labelsets, ar if ( '' !== $labelset && ! empty( $labelsets ) && ! in_array( $labelset, $labelsets, true ) ) { $warnings[] = sprintf( /* translators: %s: labelset name. */ - __( 'Mapped labelset "%s" was not found upstream.', 'progress-agentic-rag' ), + __( 'Mapped labelset "%s" was not found upstream.', 'progress-agentic-rag-connector' ), $labelset ); } @@ -1013,7 +1013,7 @@ private function taxonomy_mapping_warnings( array $mapping, array $labelsets, ar if ( '' !== $labelset && ! empty( $labelset_labels[ $labelset ] ) && ! in_array( (string) $label, $labelset_labels[ $labelset ], true ) ) { $warnings[] = sprintf( /* translators: 1: label name, 2: labelset name. */ - __( 'Mapped label "%1$s" was not found in labelset "%2$s".', 'progress-agentic-rag' ), + __( 'Mapped label "%1$s" was not found in labelset "%2$s".', 'progress-agentic-rag-connector' ), (string) $label, $labelset ); @@ -1026,14 +1026,14 @@ private function taxonomy_mapping_warnings( array $mapping, array $labelsets, ar if ( '' !== $fallback_labelset && ! empty( $labelsets ) && ! in_array( $fallback_labelset, $labelsets, true ) ) { $warnings[] = sprintf( /* translators: %s: fallback labelset name. */ - __( 'Fallback labelset "%s" was not found upstream.', 'progress-agentic-rag' ), + __( 'Fallback labelset "%s" was not found upstream.', 'progress-agentic-rag-connector' ), $fallback_labelset ); } } if ( $synced_count > 0 && ! empty( $mapping ) ) { - $warnings[] = __( 'Run label reprocessing after saving taxonomy mapping changes so existing synced resources receive the latest labels.', 'progress-agentic-rag' ); + $warnings[] = __( 'Run label reprocessing after saving taxonomy mapping changes so existing synced resources receive the latest labels.', 'progress-agentic-rag-connector' ); } return array_values( array_unique( $warnings ) ); @@ -1047,10 +1047,10 @@ private function post_type_label( string $post_type ): string { private function history_type_label( string $type ): string { $labels = [ - 'manual_sync' => __( 'Manual sync', 'progress-agentic-rag' ), - 'automatic_sync' => __( 'Automatic sync', 'progress-agentic-rag' ), - 'delete_synced' => __( 'Synced resource delete', 'progress-agentic-rag' ), - 'label_reprocess' => __( 'Label reprocessing', 'progress-agentic-rag' ), + 'manual_sync' => __( 'Manual sync', 'progress-agentic-rag-connector' ), + 'automatic_sync' => __( 'Automatic sync', 'progress-agentic-rag-connector' ), + 'delete_synced' => __( 'Synced resource delete', 'progress-agentic-rag-connector' ), + 'label_reprocess' => __( 'Label reprocessing', 'progress-agentic-rag-connector' ), ]; return $labels[ $type ] ?? $type; @@ -1058,10 +1058,10 @@ private function history_type_label( string $type ): string { private function history_status_label( string $status ): string { $labels = [ - 'complete' => __( 'Complete', 'progress-agentic-rag' ), - 'failed' => __( 'Finished with failures', 'progress-agentic-rag' ), - 'scheduled' => __( 'Scheduled', 'progress-agentic-rag' ), - 'cancelled' => __( 'Cancelled', 'progress-agentic-rag' ), + 'complete' => __( 'Complete', 'progress-agentic-rag-connector' ), + 'failed' => __( 'Finished with failures', 'progress-agentic-rag-connector' ), + 'scheduled' => __( 'Scheduled', 'progress-agentic-rag-connector' ), + 'cancelled' => __( 'Cancelled', 'progress-agentic-rag-connector' ), ]; return $labels[ $status ] ?? $status; @@ -1069,7 +1069,7 @@ private function history_status_label( string $status ): string { private function format_timestamp( int $timestamp ): string { if ( $timestamp <= 0 ) { - return __( 'Not recorded', 'progress-agentic-rag' ); + return __( 'Not recorded', 'progress-agentic-rag-connector' ); } if ( function_exists( 'date_i18n' ) ) { @@ -1129,14 +1129,14 @@ private function normalize_token_value( string $token ): string { private function connection_status_label(): string { if ( $this->settings->get_api_is_reachable() ) { - return __( 'Connected', 'progress-agentic-rag' ); + return __( 'Connected', 'progress-agentic-rag-connector' ); } if ( '' === $this->settings->get_string( SettingsRepository::OPTION_ZONE ) || '' === $this->settings->get_string( SettingsRepository::OPTION_KBID ) || ! $this->settings->has_token() ) { - return __( 'Not configured', 'progress-agentic-rag' ); + return __( 'Not configured', 'progress-agentic-rag-connector' ); } - return __( 'Stored, unverified', 'progress-agentic-rag' ); + return __( 'Stored, unverified', 'progress-agentic-rag-connector' ); } private function validate_connection_settings(): bool { diff --git a/src/Api/ApiClient.php b/src/Api/ApiClient.php index 76886d5..c0431bf 100644 --- a/src/Api/ApiClient.php +++ b/src/Api/ApiClient.php @@ -22,7 +22,7 @@ public function index_post( WP_Post $post ): bool|WP_Error { $token = $this->settings->get_string( SettingsRepository::OPTION_TOKEN ); if ( '' === $endpoint || '' === $token ) { - return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag-connector' ) ); } $response = wp_remote_request( @@ -50,7 +50,7 @@ public function index_post( WP_Post $post ): bool|WP_Error { } if ( '' === $existing['rid'] ) { - return new WP_Error( 'progress_agentic_rag_existing_resource_missing', __( 'Progress Agentic RAG reports the resource already exists, but it could not be found by slug.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_existing_resource_missing', __( 'Progress Agentic RAG reports the resource already exists, but it could not be found by slug.', 'progress-agentic-rag-connector' ) ); } $seqid = $existing['seqid']; @@ -71,7 +71,7 @@ public function index_post( WP_Post $post ): bool|WP_Error { } if ( 201 !== $response_code ) { - return new WP_Error( 'progress_agentic_rag_resource_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the resource.', 'progress-agentic-rag' ) ) ); + return new WP_Error( 'progress_agentic_rag_resource_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the resource.', 'progress-agentic-rag-connector' ) ) ); } $api_response = json_decode( wp_remote_retrieve_body( $response ), true ); @@ -79,7 +79,7 @@ public function index_post( WP_Post $post ): bool|WP_Error { $seqid = is_array( $api_response ) && isset( $api_response['seqid'] ) ? sanitize_text_field( (string) $api_response['seqid'] ) : ''; if ( '' === $rid ) { - return new WP_Error( 'progress_agentic_rag_missing_resource_id', __( 'Progress Agentic RAG did not return a resource ID.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_missing_resource_id', __( 'Progress Agentic RAG did not return a resource ID.', 'progress-agentic-rag-connector' ) ); } if ( 'attachment' === $post->post_type ) { @@ -109,7 +109,7 @@ public function sync_post( WP_Post $post ): bool|WP_Error { $token = $this->settings->get_string( SettingsRepository::OPTION_TOKEN ); if ( '' === $endpoint || '' === $token ) { - return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag-connector' ) ); } $response = wp_remote_request( @@ -136,7 +136,7 @@ public function sync_post( WP_Post $post ): bool|WP_Error { } if ( ! in_array( $response_code, [ 200, 201 ], true ) ) { - return new WP_Error( 'progress_agentic_rag_resource_update_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the resource update.', 'progress-agentic-rag' ) ) ); + return new WP_Error( 'progress_agentic_rag_resource_update_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the resource update.', 'progress-agentic-rag-connector' ) ) ); } $api_response = json_decode( wp_remote_retrieve_body( $response ), true ); @@ -164,7 +164,7 @@ public function update_resource_labels( WP_Post $post, string $rid ): bool|WP_Er $rid = sanitize_text_field( $rid ); if ( '' === $endpoint || '' === $token || '' === $rid ) { - return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag-connector' ) ); } $response = wp_remote_request( @@ -192,7 +192,7 @@ public function update_resource_labels( WP_Post $post, string $rid ): bool|WP_Er } if ( 200 !== (int) wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'progress_agentic_rag_label_update_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the label update.', 'progress-agentic-rag' ) ) ); + return new WP_Error( 'progress_agentic_rag_label_update_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the label update.', 'progress-agentic-rag-connector' ) ) ); } return true; @@ -280,7 +280,7 @@ public function delete_resource( int $post_id, string $rid ): bool|WP_Error { $rid = sanitize_text_field( $rid ); if ( '' === $endpoint || '' === $token || '' === $rid ) { - return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag-connector' ) ); } $response = wp_remote_request( @@ -300,7 +300,7 @@ public function delete_resource( int $post_id, string $rid ): bool|WP_Error { $response_code = (int) wp_remote_retrieve_response_code( $response ); if ( ! in_array( $response_code, [ 204, 404 ], true ) ) { - return new WP_Error( 'progress_agentic_rag_delete_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the resource deletion.', 'progress-agentic-rag' ) ) ); + return new WP_Error( 'progress_agentic_rag_delete_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the resource deletion.', 'progress-agentic-rag-connector' ) ) ); } $this->delete_index( $post_id ); @@ -443,7 +443,7 @@ private function endpoint(): string { */ private function find_resource_by_slug( string $slug ): array|WP_Error { if ( '' === $slug ) { - return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag-connector' ) ); } $resources = $this->find_resources_by_slugs( [ $slug ] ); @@ -479,7 +479,7 @@ private function find_resources_by_slugs( array $slugs ): array|WP_Error { } if ( '' === $endpoint || '' === $token ) { - return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_missing_connection', __( 'Progress Agentic RAG connection settings are incomplete.', 'progress-agentic-rag-connector' ) ); } $page_size = 250; @@ -503,7 +503,7 @@ private function find_resources_by_slugs( array $slugs ): array|WP_Error { } if ( 200 !== (int) wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'progress_agentic_rag_existing_resource_lookup_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG could not look up the existing resource.', 'progress-agentic-rag' ) ) ); + return new WP_Error( 'progress_agentic_rag_existing_resource_lookup_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG could not look up the existing resource.', 'progress-agentic-rag-connector' ) ) ); } $api_response = json_decode( wp_remote_retrieve_body( $response ), true ); @@ -813,7 +813,7 @@ private function upload_attachment_file( string $endpoint, string $token, string } if ( ! in_array( (int) wp_remote_retrieve_response_code( $response ), [ 200, 201 ], true ) ) { - return new WP_Error( 'progress_agentic_rag_file_upload_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the attachment file.', 'progress-agentic-rag' ) ) ); + return new WP_Error( 'progress_agentic_rag_file_upload_failed', $this->response_error_message( $response, __( 'Progress Agentic RAG rejected the attachment file.', 'progress-agentic-rag-connector' ) ) ); } $api_response = json_decode( wp_remote_retrieve_body( $response ), true ); diff --git a/src/Frontend/ElementorSearchWidget.php b/src/Frontend/ElementorSearchWidget.php index 720ac39..f5a9caf 100644 --- a/src/Frontend/ElementorSearchWidget.php +++ b/src/Frontend/ElementorSearchWidget.php @@ -19,7 +19,7 @@ public function get_name(): string { } public function get_title(): string { - return __( 'Progress Agentic RAG Search', 'progress-agentic-rag' ); + return __( 'Progress Agentic RAG Search', 'progress-agentic-rag-connector' ); } public function get_icon(): string { @@ -37,7 +37,7 @@ protected function register_controls(): void { $this->start_controls_section( 'progress_agentic_rag_content', [ - 'label' => __( 'Widget options', 'progress-agentic-rag' ), + 'label' => __( 'Widget options', 'progress-agentic-rag-connector' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); @@ -45,7 +45,7 @@ protected function register_controls(): void { $this->add_control( 'features', [ - 'label' => __( 'Features', 'progress-agentic-rag' ), + 'label' => __( 'Features', 'progress-agentic-rag-connector' ), 'type' => \Elementor\Controls_Manager::SELECT2, 'multiple' => true, 'options' => SearchWidget::feature_options(), diff --git a/src/Frontend/SearchWidget.php b/src/Frontend/SearchWidget.php index 414e281..3c172f1 100644 --- a/src/Frontend/SearchWidget.php +++ b/src/Frontend/SearchWidget.php @@ -161,10 +161,10 @@ public function register_elementor_widget( mixed $widgets_manager ): void { */ public static function feature_options(): array { return [ - 'answers' => __( 'Answers', 'progress-agentic-rag' ), - 'rephrase' => __( 'Rephrase', 'progress-agentic-rag' ), - 'filter' => __( 'Filters', 'progress-agentic-rag' ), - 'suggestions' => __( 'Suggestions', 'progress-agentic-rag' ), + 'answers' => __( 'Answers', 'progress-agentic-rag-connector' ), + 'rephrase' => __( 'Rephrase', 'progress-agentic-rag-connector' ), + 'filter' => __( 'Filters', 'progress-agentic-rag-connector' ), + 'suggestions' => __( 'Suggestions', 'progress-agentic-rag-connector' ), ]; } diff --git a/src/Indexing/ManualSync.php b/src/Indexing/ManualSync.php index 7664803..12d9861 100644 --- a/src/Indexing/ManualSync.php +++ b/src/Indexing/ManualSync.php @@ -59,20 +59,20 @@ public function start( array $post_types ): array|WP_Error { } if ( 'running' === ( $this->delete_state()['status'] ?? '' ) ) { - return new WP_Error( 'progress_agentic_rag_delete_running', __( 'Wait for synced resource deletion to finish before starting a manual sync.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_delete_running', __( 'Wait for synced resource deletion to finish before starting a manual sync.', 'progress-agentic-rag-connector' ) ); } if ( ! $this->scheduler_available() ) { - return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag-connector' ) ); } if ( ! $this->settings->get_api_is_reachable() ) { - return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before syncing content.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before syncing content.', 'progress-agentic-rag-connector' ) ); } $post_types = $this->sanitize_post_types( $post_types ); if ( empty( $post_types ) ) { - return new WP_Error( 'progress_agentic_rag_no_post_types', __( 'Select at least one content type to sync.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_no_post_types', __( 'Select at least one content type to sync.', 'progress-agentic-rag-connector' ) ); } $reconcile = $this->api_client->reconcile_synced_resources(); @@ -101,20 +101,20 @@ public function start( array $post_types ): array|WP_Error { $sync_id = wp_generate_uuid4(); $total = count( $entities ); - $message = 0 === $total ? __( 'Everything selected is already synced.', 'progress-agentic-rag' ) : sprintf( + $message = 0 === $total ? __( 'Everything selected is already synced.', 'progress-agentic-rag-connector' ) : sprintf( /* translators: %d is the number of entities queued for manual sync. */ - _n( 'Sync in progress: 0 of %d processed.', 'Sync in progress: 0 of %d processed.', $total, 'progress-agentic-rag' ), + _n( 'Sync in progress: 0 of %d processed.', 'Sync in progress: 0 of %d processed.', $total, 'progress-agentic-rag-connector' ), $total ); if ( $recovered > 0 ) { $message = 0 === $total ? sprintf( /* translators: %d is the number of upstream resources recovered into the local sync table. */ - _n( 'Recovered %d existing upstream resource. Everything selected is already synced.', 'Recovered %d existing upstream resources. Everything selected is already synced.', $recovered, 'progress-agentic-rag' ), + _n( 'Recovered %d existing upstream resource. Everything selected is already synced.', 'Recovered %d existing upstream resources. Everything selected is already synced.', $recovered, 'progress-agentic-rag-connector' ), $recovered ) : sprintf( /* translators: 1: recovered upstream resource count, 2: number of entities queued for manual sync. */ - _n( 'Recovered %1$d existing upstream resource. Sync in progress: 0 of %2$d processed.', 'Recovered %1$d existing upstream resources. Sync in progress: 0 of %2$d processed.', $recovered, 'progress-agentic-rag' ), + _n( 'Recovered %1$d existing upstream resource. Sync in progress: 0 of %2$d processed.', 'Recovered %1$d existing upstream resources. Sync in progress: 0 of %2$d processed.', $recovered, 'progress-agentic-rag-connector' ), $recovered, $total ); @@ -127,7 +127,7 @@ public function start( array $post_types ): array|WP_Error { 'completed' => 0, 'failed' => 0, 'recovered' => $recovered, - 'current' => 0 === $total ? __( 'No eligible entities to sync.', 'progress-agentic-rag' ) : __( 'Waiting for the first entity.', 'progress-agentic-rag' ), + 'current' => 0 === $total ? __( 'No eligible entities to sync.', 'progress-agentic-rag-connector' ) : __( 'Waiting for the first entity.', 'progress-agentic-rag-connector' ), 'message' => $message, 'started_at' => time(), 'updated_at' => time(), @@ -163,19 +163,19 @@ public function status(): array { if ( $total > 0 && $done >= $total && 'running' === ( $state['status'] ?? '' ) ) { $state['status'] = 'complete'; - $state['message'] = __( 'Manual sync complete.', 'progress-agentic-rag' ); + $state['message'] = __( 'Manual sync complete.', 'progress-agentic-rag-connector' ); $state['updated_at'] = time(); $state = $this->record_history( $state, 'manual_sync', (int) ( $state['completed'] ?? 0 ) ); update_option( SettingsRepository::OPTION_MANUAL_SYNC_STATE, $state ); } - $current = (string) ( $state['current'] ?? __( 'Waiting to sync.', 'progress-agentic-rag' ) ); + $current = (string) ( $state['current'] ?? __( 'Waiting to sync.', 'progress-agentic-rag-connector' ) ); $message = (string) ( $state['message'] ?? '' ); if ( 'running' === ( $state['status'] ?? '' ) ) { $message = sprintf( /* translators: 1: processed entity count, 2: total entity count. */ - __( 'Sync in progress: %1$d of %2$d processed.', 'progress-agentic-rag' ), + __( 'Sync in progress: %1$d of %2$d processed.', 'progress-agentic-rag-connector' ), $done, $total ); @@ -183,15 +183,15 @@ public function status(): array { if ( $recovered > 0 ) { $message = sprintf( /* translators: 1: recovered upstream resource count, 2: processed entity count, 3: total entity count. */ - _n( 'Recovered %1$d existing upstream resource. Sync in progress: %2$d of %3$d processed.', 'Recovered %1$d existing upstream resources. Sync in progress: %2$d of %3$d processed.', $recovered, 'progress-agentic-rag' ), + _n( 'Recovered %1$d existing upstream resource. Sync in progress: %2$d of %3$d processed.', 'Recovered %1$d existing upstream resources. Sync in progress: %2$d of %3$d processed.', $recovered, 'progress-agentic-rag-connector' ), $recovered, $done, $total ); } - if ( '' === $current || __( 'Queued manual sync.', 'progress-agentic-rag' ) === $current ) { - $current = 0 === $done ? __( 'Waiting for the first entity.', 'progress-agentic-rag' ) : __( 'Waiting for the next entity.', 'progress-agentic-rag' ); + if ( '' === $current || __( 'Queued manual sync.', 'progress-agentic-rag-connector' ) === $current ) { + $current = 0 === $done ? __( 'Waiting for the first entity.', 'progress-agentic-rag-connector' ) : __( 'Waiting for the next entity.', 'progress-agentic-rag-connector' ); } } @@ -214,22 +214,22 @@ public function status(): array { */ public function retry_failed_sync_items(): array|WP_Error { if ( ! $this->scheduler_available() ) { - return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag-connector' ) ); } if ( ! $this->settings->get_api_is_reachable() ) { - return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before retrying failed sync items.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before retrying failed sync items.', 'progress-agentic-rag-connector' ) ); } if ( 'running' === ( $this->state()['status'] ?? '' ) || 'running' === ( $this->delete_state()['status'] ?? '' ) ) { - return new WP_Error( 'progress_agentic_rag_sync_running', __( 'Wait for the current sync operation to finish before retrying failed items.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_sync_running', __( 'Wait for the current sync operation to finish before retrying failed items.', 'progress-agentic-rag-connector' ) ); } $items = $this->settings->get_failed_sync_items(); if ( empty( $items ) ) { $status = $this->background_sync_status(); $status['scheduled'] = 0; - $status['message'] = __( 'No failed sync items are waiting for retry.', 'progress-agentic-rag' ); + $status['message'] = __( 'No failed sync items are waiting for retry.', 'progress-agentic-rag-connector' ); return $status; } @@ -263,7 +263,7 @@ public function retry_failed_sync_items(): array|WP_Error { $status['scheduled'] = $scheduled; $status['message'] = sprintf( /* translators: %d is the number of failed sync items scheduled for retry. */ - _n( 'Scheduled retry for %d failed sync item.', 'Scheduled retries for %d failed sync items.', $scheduled, 'progress-agentic-rag' ), + _n( 'Scheduled retry for %d failed sync item.', 'Scheduled retries for %d failed sync items.', $scheduled, 'progress-agentic-rag-connector' ), $scheduled ); @@ -334,8 +334,8 @@ public function background_sync_status(): array { if ( $total > 0 && $processed >= $total && 'running' === ( $state['status'] ?? '' ) ) { $state['status'] = 'complete'; $state['message'] = $failed > 0 - ? __( 'Automatic background sync finished with failures.', 'progress-agentic-rag' ) - : __( 'Automatic background sync complete.', 'progress-agentic-rag' ); + ? __( 'Automatic background sync finished with failures.', 'progress-agentic-rag-connector' ) + : __( 'Automatic background sync complete.', 'progress-agentic-rag-connector' ); $state['updated_at'] = time(); $state = $this->record_history( $state, 'automatic_sync', $completed ); update_option( SettingsRepository::OPTION_BACKGROUND_SYNC_STATE, $state ); @@ -344,7 +344,7 @@ public function background_sync_status(): array { if ( 'running' === ( $state['status'] ?? '' ) ) { $state['message'] = sprintf( /* translators: 1: processed entity count, 2: total queued entity count. */ - __( 'Automatic sync in progress: %1$d of %2$d processed.', 'progress-agentic-rag' ), + __( 'Automatic sync in progress: %1$d of %2$d processed.', 'progress-agentic-rag-connector' ), $processed, $total ); @@ -365,8 +365,8 @@ public function background_sync_status(): array { 'pending' => $pending, 'running' => $running, 'action_failed' => $action_failed, - 'current' => (string) ( $state['current'] ?? __( 'No automatic sync running.', 'progress-agentic-rag' ) ), - 'message' => (string) ( $state['message'] ?? __( 'No automatic sync running.', 'progress-agentic-rag' ) ), + 'current' => (string) ( $state['current'] ?? __( 'No automatic sync running.', 'progress-agentic-rag-connector' ) ), + 'message' => (string) ( $state['message'] ?? __( 'No automatic sync running.', 'progress-agentic-rag-connector' ) ), 'percent' => $percent, 'is_active' => 'running' === ( $state['status'] ?? '' ) || $pending > 0 || $running > 0, ]; @@ -436,15 +436,15 @@ public function delete_synced_resources(): array|WP_Error { } if ( 'running' === ( $this->state()['status'] ?? '' ) ) { - return new WP_Error( 'progress_agentic_rag_manual_sync_running', __( 'Wait for manual sync to finish before deleting synced resources.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_manual_sync_running', __( 'Wait for manual sync to finish before deleting synced resources.', 'progress-agentic-rag-connector' ) ); } if ( ! $this->scheduler_available() ) { - return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag-connector' ) ); } if ( ! $this->settings->get_api_is_reachable() ) { - return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before deleting synced resources.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before deleting synced resources.', 'progress-agentic-rag-connector' ) ); } $this->cancel_label_reprocess(); @@ -459,10 +459,10 @@ public function delete_synced_resources(): array|WP_Error { 'total' => $total, 'deleted' => 0, 'failed' => 0, - 'current' => 0 === $total ? __( 'No synced resources to delete.', 'progress-agentic-rag' ) : __( 'Waiting for the first resource.', 'progress-agentic-rag' ), - 'message' => 0 === $total ? __( 'No synced resources to delete. Label settings cleared.', 'progress-agentic-rag' ) : sprintf( + 'current' => 0 === $total ? __( 'No synced resources to delete.', 'progress-agentic-rag-connector' ) : __( 'Waiting for the first resource.', 'progress-agentic-rag-connector' ), + 'message' => 0 === $total ? __( 'No synced resources to delete. Label settings cleared.', 'progress-agentic-rag-connector' ) : sprintf( /* translators: %d is the number of resources queued for deletion. */ - _n( 'Delete in progress: 0 of %d processed.', 'Delete in progress: 0 of %d processed.', $total, 'progress-agentic-rag' ), + _n( 'Delete in progress: 0 of %d processed.', 'Delete in progress: 0 of %d processed.', $total, 'progress-agentic-rag-connector' ), $total ), 'started_at' => time(), @@ -478,7 +478,7 @@ public function delete_synced_resources(): array|WP_Error { $rid = isset( $resource->nuclia_rid ) ? (string) $resource->nuclia_rid : ''; if ( $post_id <= 0 || '' === $rid ) { - $this->mark_delete_failed( __( 'Missing synced resource.', 'progress-agentic-rag' ) ); + $this->mark_delete_failed( __( 'Missing synced resource.', 'progress-agentic-rag-connector' ) ); continue; } @@ -526,26 +526,26 @@ public function delete_status(): array { if ( $total > 0 && $done >= $total && 'running' === ( $state['status'] ?? '' ) ) { $state['status'] = 'complete'; $state['message'] = 0 === (int) ( $state['failed'] ?? 0 ) - ? __( 'Synced resources deleted from Progress Agentic RAG. Local mappings and label settings cleared.', 'progress-agentic-rag' ) - : __( 'Some synced resources could not be deleted. Label settings were cleared; local mappings were cleared only for successful deletions.', 'progress-agentic-rag' ); + ? __( 'Synced resources deleted from Progress Agentic RAG. Local mappings and label settings cleared.', 'progress-agentic-rag-connector' ) + : __( 'Some synced resources could not be deleted. Label settings were cleared; local mappings were cleared only for successful deletions.', 'progress-agentic-rag-connector' ); $state['updated_at'] = time(); $state = $this->record_history( $state, 'delete_synced', (int) ( $state['deleted'] ?? 0 ) ); update_option( SettingsRepository::OPTION_DELETE_SYNC_STATE, $state ); } - $current = (string) ( $state['current'] ?? __( 'Waiting to delete synced resources.', 'progress-agentic-rag' ) ); + $current = (string) ( $state['current'] ?? __( 'Waiting to delete synced resources.', 'progress-agentic-rag-connector' ) ); $message = (string) ( $state['message'] ?? '' ); if ( 'running' === ( $state['status'] ?? '' ) ) { $message = sprintf( /* translators: 1: processed resource count, 2: total resource count. */ - __( 'Delete in progress: %1$d of %2$d processed.', 'progress-agentic-rag' ), + __( 'Delete in progress: %1$d of %2$d processed.', 'progress-agentic-rag-connector' ), $done, $total ); if ( '' === $current ) { - $current = 0 === $done ? __( 'Waiting for the first resource.', 'progress-agentic-rag' ) : __( 'Waiting for the next resource.', 'progress-agentic-rag' ); + $current = 0 === $done ? __( 'Waiting for the first resource.', 'progress-agentic-rag-connector' ) : __( 'Waiting for the next resource.', 'progress-agentic-rag-connector' ); } } @@ -568,20 +568,20 @@ public function delete_status(): array { */ public function start_label_reprocess(): array|WP_Error { if ( ! $this->scheduler_available() ) { - return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_scheduler_missing', __( 'Background scheduling is not available.', 'progress-agentic-rag-connector' ) ); } if ( ! $this->settings->get_api_is_reachable() ) { - return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before reprocessing labels.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_connection_missing', __( 'Validate the Progress Agentic RAG connection before reprocessing labels.', 'progress-agentic-rag-connector' ) ); } if ( 'running' === ( $this->delete_state()['status'] ?? '' ) ) { - return new WP_Error( 'progress_agentic_rag_delete_running', __( 'Wait for synced resource deletion to finish before reprocessing labels.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_delete_running', __( 'Wait for synced resource deletion to finish before reprocessing labels.', 'progress-agentic-rag-connector' ) ); } $status = $this->label_reprocess_status(); if ( ! empty( $status['is_active'] ) ) { - return new WP_Error( 'progress_agentic_rag_label_reprocess_running', __( 'Label reprocessing is already running.', 'progress-agentic-rag' ) ); + return new WP_Error( 'progress_agentic_rag_label_reprocess_running', __( 'Label reprocessing is already running.', 'progress-agentic-rag-connector' ) ); } $resources = $this->api_client->get_synced_resources(); @@ -614,7 +614,7 @@ public function start_label_reprocess(): array|WP_Error { $status['scheduled'] = $scheduled; $status['message'] = sprintf( /* translators: %d is the number of resources scheduled for label reprocessing. */ - _n( 'Scheduled label update for %d synced resource.', 'Scheduled label updates for %d synced resources.', $scheduled, 'progress-agentic-rag' ), + _n( 'Scheduled label update for %d synced resource.', 'Scheduled label updates for %d synced resources.', $scheduled, 'progress-agentic-rag-connector' ), $scheduled ); $this->settings->add_sync_history_entry( @@ -639,7 +639,7 @@ public function cancel_label_reprocess(): array { $this->scheduler->unschedule_all_actions( self::HOOK_REPROCESS_LABELS, null, self::GROUP_LABEL_REPROCESSOR ); $status = $this->label_reprocess_status(); - $status['message'] = __( 'Label reprocessing cancelled.', 'progress-agentic-rag' ); + $status['message'] = __( 'Label reprocessing cancelled.', 'progress-agentic-rag-connector' ); $this->settings->add_sync_history_entry( [ 'type' => 'label_reprocess', @@ -705,7 +705,7 @@ public function process_single_post( int $post_id, string $post_type, string $sy $post = get_post( $post_id ); if ( ! $post instanceof WP_Post ) { - $this->mark_failed( __( 'Missing entity.', 'progress-agentic-rag' ) ); + $this->mark_failed( __( 'Missing entity.', 'progress-agentic-rag-connector' ) ); return; } @@ -765,13 +765,13 @@ public function process_single_delete( int $post_id, string $rid, string $delete $post = get_post( $post_id ); $label = $post instanceof WP_Post ? $this->entity_label( $post ) : sprintf( /* translators: %d is the WordPress post ID for a synced resource being deleted. */ - __( 'Synced resource for entity #%d', 'progress-agentic-rag' ), + __( 'Synced resource for entity #%d', 'progress-agentic-rag-connector' ), $post_id ); $this->update_delete_current( $label ); if ( $post_id <= 0 || '' === $rid ) { - $this->mark_delete_failed( __( 'Missing synced resource.', 'progress-agentic-rag' ) ); + $this->mark_delete_failed( __( 'Missing synced resource.', 'progress-agentic-rag-connector' ) ); return; } @@ -863,7 +863,7 @@ public function schedule_background_delete( int $post_id, WP_Post $post ): void public function process_background_post( int $post_id, string $post_type, string $background_id = '' ): void { if ( ! $this->settings->get_api_is_reachable() ) { - $this->mark_background_failed( __( 'Progress Agentic RAG connection is not validated.', 'progress-agentic-rag' ), $background_id ); + $this->mark_background_failed( __( 'Progress Agentic RAG connection is not validated.', 'progress-agentic-rag-connector' ), $background_id ); throw new \RuntimeException( 'Progress Agentic RAG connection is not validated.' ); } @@ -910,7 +910,7 @@ public function process_background_delete( int $post_id, string $rid, string $ba } if ( ! $this->settings->get_api_is_reachable() ) { - $this->mark_background_failed( __( 'Progress Agentic RAG connection is not validated.', 'progress-agentic-rag' ), $background_id ); + $this->mark_background_failed( __( 'Progress Agentic RAG connection is not validated.', 'progress-agentic-rag-connector' ), $background_id ); throw new \RuntimeException( 'Progress Agentic RAG connection is not validated.' ); } @@ -991,7 +991,7 @@ private function schedule_background_entities( array $entities ): int { $post = get_post( $post_id ); $label = $post instanceof WP_Post ? $this->entity_label( $post ) : sprintf( /* translators: %d is the WordPress post ID for an entity being automatically synced. */ - __( 'Entity #%d', 'progress-agentic-rag' ), + __( 'Entity #%d', 'progress-agentic-rag-connector' ), $post_id ); $background_id = $this->queue_background_sync( $label ); @@ -1196,7 +1196,7 @@ private function entity_label( WP_Post $post ): string { if ( '' === $title ) { $title = sprintf( /* translators: %d is the WordPress post ID for an entity with no title. */ - __( 'Entity #%d', 'progress-agentic-rag' ), + __( 'Entity #%d', 'progress-agentic-rag-connector' ), (int) $post->ID ); } @@ -1265,7 +1265,7 @@ private function queue_background_sync( string $current ): string { 'completed' => 0, 'failed' => 0, 'current' => $current, - 'message' => __( 'Automatic background sync queued.', 'progress-agentic-rag' ), + 'message' => __( 'Automatic background sync queued.', 'progress-agentic-rag-connector' ), 'started_at' => time(), 'updated_at' => time(), ]; diff --git a/src/Indexing/Scheduler.php b/src/Indexing/Scheduler.php index f0db47a..1b4d8b4 100644 --- a/src/Indexing/Scheduler.php +++ b/src/Indexing/Scheduler.php @@ -45,9 +45,9 @@ public function available(): bool { public function backend_label(): string { switch ( $this->backend() ) { case 'action_scheduler': - return __( 'Action Scheduler', 'progress-agentic-rag' ); + return __( 'Action Scheduler', 'progress-agentic-rag-connector' ); default: - return __( 'Unavailable', 'progress-agentic-rag' ); + return __( 'Unavailable', 'progress-agentic-rag-connector' ); } } @@ -59,9 +59,9 @@ public function backend_label(): string { public function backend_message(): string { switch ( $this->backend() ) { case 'action_scheduler': - return __( 'Background jobs are using Action Scheduler.', 'progress-agentic-rag' ); + return __( 'Background jobs are using Action Scheduler.', 'progress-agentic-rag-connector' ); default: - return __( 'Background jobs are unavailable because Action Scheduler could not be loaded.', 'progress-agentic-rag' ); + return __( 'Background jobs are unavailable because Action Scheduler could not be loaded.', 'progress-agentic-rag-connector' ); } } diff --git a/src/Infrastructure/Requirements.php b/src/Infrastructure/Requirements.php index 65200f8..058c13d 100644 --- a/src/Infrastructure/Requirements.php +++ b/src/Infrastructure/Requirements.php @@ -34,7 +34,7 @@ public static function render_admin_notice(): void { if ( ! self::is_php_supported() ) { $messages[] = sprintf( /* translators: 1: required PHP version, 2: current PHP version. */ - __( 'Progress Agentic RAG requires PHP %1$s or later. Your site is running PHP %2$s.', 'progress-agentic-rag' ), + __( 'Progress Agentic RAG requires PHP %1$s or later. Your site is running PHP %2$s.', 'progress-agentic-rag-connector' ), PROGRESS_AGENTIC_RAG_MIN_PHP_VERSION, PHP_VERSION ); @@ -43,7 +43,7 @@ public static function render_admin_notice(): void { if ( ! self::is_wp_supported() ) { $messages[] = sprintf( /* translators: 1: required WordPress version, 2: current WordPress version. */ - __( 'Progress Agentic RAG requires WordPress %1$s or later. Your site is running WordPress %2$s.', 'progress-agentic-rag' ), + __( 'Progress Agentic RAG requires WordPress %1$s or later. Your site is running WordPress %2$s.', 'progress-agentic-rag-connector' ), PROGRESS_AGENTIC_RAG_MIN_WP_VERSION, (string) ( $GLOBALS['wp_version'] ?? 'unknown' ) ); diff --git a/src/Proxy/ProxyController.php b/src/Proxy/ProxyController.php index cabc17e..0cf1618 100644 --- a/src/Proxy/ProxyController.php +++ b/src/Proxy/ProxyController.php @@ -112,11 +112,11 @@ public function handle_path_request(): void { private function execute( string $zone, string $path, string $method, string $query_string, string $content_type, string $accept, string $body, array $passthrough_headers ): array { $zone = strtolower( trim( $zone ) ); if ( '' === $zone || ! preg_match( '/^[a-z0-9-]+$/', $zone ) ) { - return $this->error( 400, 'progress_agentic_rag_proxy_invalid_zone', __( 'Invalid Progress Agentic RAG zone.', 'progress-agentic-rag' ) ); + return $this->error( 400, 'progress_agentic_rag_proxy_invalid_zone', __( 'Invalid Progress Agentic RAG zone.', 'progress-agentic-rag-connector' ) ); } if ( ! in_array( $method, [ 'GET', 'POST', 'OPTIONS' ], true ) ) { - return $this->error( 405, 'progress_agentic_rag_proxy_method_not_allowed', __( 'Request method is not allowed.', 'progress-agentic-rag' ) ); + return $this->error( 405, 'progress_agentic_rag_proxy_method_not_allowed', __( 'Request method is not allowed.', 'progress-agentic-rag-connector' ) ); } if ( 'OPTIONS' === $method ) { @@ -125,12 +125,12 @@ private function execute( string $zone, string $path, string $method, string $qu $token = $this->settings->get_string( SettingsRepository::OPTION_TOKEN ); if ( '' === $token ) { - return $this->error( 500, 'progress_agentic_rag_proxy_missing_token', __( 'Progress Agentic RAG Service token is not configured.', 'progress-agentic-rag' ) ); + return $this->error( 500, 'progress_agentic_rag_proxy_missing_token', __( 'Progress Agentic RAG Service token is not configured.', 'progress-agentic-rag-connector' ) ); } $normalized_path = $this->normalize_path( $path ); if ( null === $normalized_path ) { - return $this->error( 400, 'progress_agentic_rag_proxy_invalid_path', __( 'Invalid Progress Agentic RAG proxy path.', 'progress-agentic-rag' ) ); + return $this->error( 400, 'progress_agentic_rag_proxy_invalid_path', __( 'Invalid Progress Agentic RAG proxy path.', 'progress-agentic-rag-connector' ) ); } $remote_url = sprintf( diff --git a/templates/admin/connection-settings.php b/templates/admin/connection-settings.php index 346e941..281d5bc 100644 --- a/templates/admin/connection-settings.php +++ b/templates/admin/connection-settings.php @@ -10,8 +10,8 @@
- -

+ +

@@ -27,26 +27,26 @@
- - + +
diff --git a/templates/admin/diagnostics.php b/templates/admin/diagnostics.php index 777b2c6..cb477ad 100644 --- a/templates/admin/diagnostics.php +++ b/templates/admin/diagnostics.php @@ -15,16 +15,16 @@
- -

+ +

-

+

- -

+ +

@@ -32,7 +32,7 @@

-

+

    @@ -43,12 +43,12 @@
-

+

- +

diff --git a/templates/admin/indexation.php b/templates/admin/indexation.php index f0d34f0..5fc6405 100644 --- a/templates/admin/indexation.php +++ b/templates/admin/indexation.php @@ -14,28 +14,28 @@
- -

+ +

- +
- +
- +
- +
- +
@@ -62,21 +62,21 @@
- -

+ +

- +
- - - - + + + + @@ -95,7 +95,7 @@
- +
@@ -104,7 +104,7 @@
- + / - + - + - + - +

- +

diff --git a/templates/admin/manual-sync-modal.php b/templates/admin/manual-sync-modal.php index f1f935e..b1f7c28 100644 --- a/templates/admin/manual-sync-modal.php +++ b/templates/admin/manual-sync-modal.php @@ -12,15 +12,15 @@ diff --git a/templates/admin/page-open.php b/templates/admin/page-open.php index 0f5b9ed..df32c5a 100644 --- a/templates/admin/page-open.php +++ b/templates/admin/page-open.php @@ -11,16 +11,16 @@
- -

+ +

-
+
- + - +
diff --git a/templates/admin/search-widget-status.php b/templates/admin/search-widget-status.php index 4f6f0db..dd6d99e 100644 --- a/templates/admin/search-widget-status.php +++ b/templates/admin/search-widget-status.php @@ -17,145 +17,145 @@
- -

+ +

    -
  • -
  • -
  • +
  • +
  • +
-

+

-

+

- +
-

+

-

+

    -
  • ' . esc_html( $feature_options ) . '' ); ?>
  • -
  • +
  • ' . esc_html( $feature_options ) . '' ); ?>
  • +
-

+

-

+

- +
-

+

-

+

-

+

-

+

-

+

-

+

diff --git a/templates/admin/sync-history.php b/templates/admin/sync-history.php index 14019d3..3c1e076 100644 --- a/templates/admin/sync-history.php +++ b/templates/admin/sync-history.php @@ -12,53 +12,53 @@
- -

+ +

- -

+ +

    -
  • +
  • -
  • +
  • -
  • +
  • -
  • +

-

+

- - - - - + + + + + @@ -71,7 +71,7 @@
- -

+ +

- +

-

+

- - - - - - + + + + + + @@ -40,7 +40,7 @@ # - + @@ -49,7 +49,7 @@ diff --git a/templates/admin/tabs.php b/templates/admin/tabs.php index ee7ef78..ffecd6e 100644 --- a/templates/admin/tabs.php +++ b/templates/admin/tabs.php @@ -7,7 +7,7 @@ defined( 'ABSPATH' ) || exit; ?> -
- - + + @@ -94,7 +94,7 @@
- +