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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/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
/playwright.config.ts
/README.md
/.DS_Store
/.phpunit.result.cache
/test-results
/playwright-report
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/deploy-wordpress-org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +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 '.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' }}
Expand All @@ -142,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
22 changes: 6 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +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 '.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
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 9 additions & 3 deletions docker/scripts/check-release-metadata.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -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."
Expand All @@ -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
Expand Down
24 changes: 21 additions & 3 deletions docker/scripts/check-release.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,11 +11,29 @@ 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 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."
1 change: 0 additions & 1 deletion docker/scripts/lint-php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
set -eu

find . \
-path './vendor' -prune -o \
-path './node_modules' -prune -o \
-name '*.php' -print0 | xargs -0 -n1 php -l
29 changes: 19 additions & 10 deletions docker/scripts/run-local-plugin-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 7 additions & 14 deletions docker/scripts/run-plugin-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand All @@ -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;
}
}
Expand All @@ -153,4 +146,4 @@ if ( $count > 0 ) {
}
' "$plugin_check_output"

echo "Plugin Check found no Plugin repo issues."
echo "Plugin Check found no issues."
8 changes: 4 additions & 4 deletions progress-agentic-rag.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* @package ProgressAgenticRag
*
* @wordpress-plugin
* Plugin Name: Progress Agentic RAG
* Plugin URI: https://www.progress.com/
* 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
* Requires at least: 6.8
Expand All @@ -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
*/

Expand Down Expand Up @@ -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',
Expand Down
10 changes: 5 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=== Progress Agentic RAG Connector ===
=== Progress Agentic RAG connector ===
Contributors: progresssoftware
Tags: search, ai, knowledge-base, rag, indexing
Requires at least: 6.8
Expand All @@ -14,7 +14,7 @@ Index WordPress content into Progress Agentic RAG and power knowledge-base searc

Progress Agentic RAG connector 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.

Expand All @@ -31,18 +31,18 @@ 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.

== Frequently Asked Questions ==

= 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.
Loading
Loading