Skip to content

Add Cursor Plugin SDK support#11371

Merged
atharvadeosthale merged 6 commits into1.8.xfrom
add-cursor-plugin
Feb 25, 2026
Merged

Add Cursor Plugin SDK support#11371
atharvadeosthale merged 6 commits into1.8.xfrom
add-cursor-plugin

Conversation

@atharvadeosthale
Copy link
Copy Markdown
Member

Summary

  • Add cursor-plugin SDK configuration to app/config/sdks.php
  • Register cursor-plugin in the $supportedSDKS allowlist and switch statement in SDKs.php
  • Point appwrite/sdk-generator to dev-cursor-plugin branch in composer

Test plan

  • Run docker compose exec appwrite sdks cursor-plugin and verify it generates successfully

@atharvadeosthale atharvadeosthale changed the base branch from main to 1.8.x February 20, 2026 12:25
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ff4e756 and 9ee6304.

📒 Files selected for processing (1)
  • src/Appwrite/Platform/Tasks/SDKs.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Appwrite/Platform/Tasks/SDKs.php

📝 Walkthrough

Walkthrough

Adds a new CursorPlugin SDK entry to app/config/sdks.php with full metadata (key "cursor-plugin", name, version, URL, flags, family/prism, source, git details, repoBranch, changelog). Updates src/Appwrite/Platform/Tasks/SDKs.php to include "cursor-plugin" in the supported SDKs list and to instantiate CursorPlugin in the SDK generation flow when that language key is used.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Cursor Plugin SDK support' directly and clearly describes the main change: adding support for a Cursor Plugin SDK, which matches the changeset perfectly.
Description check ✅ Passed The description is well-related to the changeset, providing specific details about configuration additions, registration in the allowlist, and composer updates for the cursor-plugin SDK.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-cursor-plugin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 20, 2026

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libecpg 18.1-r0 CVE-2026-2004 HIGH
libecpg 18.1-r0 CVE-2026-2005 HIGH
libecpg 18.1-r0 CVE-2026-2006 HIGH
libecpg 18.1-r0 CVE-2026-2007 HIGH
libecpg-dev 18.1-r0 CVE-2026-2004 HIGH
libecpg-dev 18.1-r0 CVE-2026-2005 HIGH
libecpg-dev 18.1-r0 CVE-2026-2006 HIGH
libecpg-dev 18.1-r0 CVE-2026-2007 HIGH
libpng 1.6.54-r0 CVE-2026-25646 HIGH
libpng-dev 1.6.54-r0 CVE-2026-25646 HIGH
libpq 18.1-r0 CVE-2026-2004 HIGH
libpq 18.1-r0 CVE-2026-2005 HIGH
libpq 18.1-r0 CVE-2026-2006 HIGH
libpq 18.1-r0 CVE-2026-2007 HIGH
libpq-dev 18.1-r0 CVE-2026-2004 HIGH
libpq-dev 18.1-r0 CVE-2026-2005 HIGH
libpq-dev 18.1-r0 CVE-2026-2006 HIGH
libpq-dev 18.1-r0 CVE-2026-2007 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2004 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2005 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2006 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2007 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
app/config/sdks.php (1)

292-310: SDK entry structure is correct; consider marking beta: true for an initial 0.1.0 release.

The structure mirrors the agent-skills entry precisely, and the realpath-based source/changelog values degrade gracefully when the paths don't exist yet. One minor point: other SDKs at comparable early maturity — react-native, go, dotnet — all carry 'beta' => true. Setting 'beta' => false for a first 0.1.0 release is slightly inconsistent with that convention.

🔧 Optional suggestion
-                'beta' => false,
+                'beta' => true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/config/sdks.php` around lines 292 - 310, The SDK entry for the cursor
plugin sets 'beta' => false but should follow the convention of early 0.1.0 SDKs
by marking it as beta; update the entry where 'key' => 'cursor-plugin' (or the
array with 'name' => 'CursorPlugin' and 'version' => '0.1.0') to set 'beta' =>
true so it matches other early-maturity SDKs like 'react-native', 'go', and
'dotnet'.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@composer.json`:
- Line 93: Replace the mutable dev branch pin in require-dev for
appwrite/sdk-generator (the entry "appwrite/sdk-generator": "dev-cursor-plugin")
with a stable version constraint (or revert to "*" temporarily) so CI and
contributor installs don't track a live branch; update the composer.json
require-dev entry for appwrite/sdk-generator to a fixed released tag or "*" and
ensure composer.lock is regenerated (run composer update for that package)
before merging.

In `@src/Appwrite/Platform/Tasks/SDKs.php`:
- Around line 7-8: The import statements in SDKs.php are out-of-order: move the
use of CursorPlugin so imports are alphabetized per PSR-12; specifically ensure
the sequence places Apple first, then CLI, then CursorPlugin, then Dart (i.e.,
move use Appwrite\SDK\Language\CursorPlugin to be after the CLI import and
before the Dart import) and adjust any surrounding use lines so all SDK language
imports are in strict alphabetical order.

---

Nitpick comments:
In `@app/config/sdks.php`:
- Around line 292-310: The SDK entry for the cursor plugin sets 'beta' => false
but should follow the convention of early 0.1.0 SDKs by marking it as beta;
update the entry where 'key' => 'cursor-plugin' (or the array with 'name' =>
'CursorPlugin' and 'version' => '0.1.0') to set 'beta' => true so it matches
other early-maturity SDKs like 'react-native', 'go', and 'dotnet'.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 20, 2026

✨ Benchmark results

  • Requests per second: 1,873
  • Requests with 200 status code: 337,103
  • P99 latency: 0.085458936

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,873 1,194
200 337,103 215,024
P99 0.085458936 0.170143471

# Conflicts:
#	composer.lock
#	src/Appwrite/Platform/Tasks/SDKs.php
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/config/sdks.php`:
- Around line 303-309: The config entries for the SDK use the 'source' key
pointing to "console-cursor-plugin" and the 'changelog' key pointing to a
cursor-plugin CHANGELOG.md but those targets do not exist so realpath() returns
false; fix by creating the missing SDK source directory named
console-cursor-plugin (with the expected package files) and adding a docs
CHANGELOG.md for cursor-plugin (at the same repo/name used in the config) so
both 'source' and 'changelog' resolve to real paths, or if the intended names
differ, update the 'source' and 'changelog' values in the sdks.php entry for
cursor-plugin to match the actual directory and file names.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7737139 and ff4e756.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • app/config/sdks.php

Comment on lines +303 to +309
'source' => \realpath(__DIR__ . '/../sdks/console-cursor-plugin'),
'gitUrl' => '[email protected]:appwrite/cursor-plugin.git',
'gitRepoName' => 'cursor-plugin',
'gitUserName' => 'appwrite',
'gitBranch' => 'dev',
'repoBranch' => 'main',
'changelog' => \realpath(__DIR__ . '/../../docs/sdks/cursor-plugin/CHANGELOG.md'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Checking cursor-plugin config block and referenced paths ==="
rg -n -C2 "cursor-plugin|console-cursor-plugin|docs/sdks/cursor-plugin/CHANGELOG.md" app/config/sdks.php || echo "No matches found"

echo
echo "=== Path existence checks ==="
if [ -d "app/sdks/console-cursor-plugin" ]; then
  echo "✓ EXISTS: app/sdks/console-cursor-plugin"
else
  echo "✗ MISSING: app/sdks/console-cursor-plugin"
fi

if [ -f "docs/sdks/cursor-plugin/CHANGELOG.md" ]; then
  echo "✓ EXISTS: docs/sdks/cursor-plugin/CHANGELOG.md"
else
  echo "✗ MISSING: docs/sdks/cursor-plugin/CHANGELOG.md"
fi

echo
echo "=== Listing relevant directories ==="
echo "Contents of app/sdks/:"
ls -la app/sdks/ 2>/dev/null | head -20 || echo "app/sdks/ not found or empty"

echo
echo "Contents of docs/sdks/:"
ls -la docs/sdks/ 2>/dev/null | head -20 || echo "docs/sdks/ not found or empty"

Repository: appwrite/appwrite

Length of output: 2398


Both SDK asset paths are missing and will cause realpath() to return false.

Lines 303 and 309 reference paths that do not exist:

  • app/sdks/console-cursor-plugin — directory missing
  • docs/sdks/cursor-plugin/CHANGELOG.md — directory and file missing

These missing paths will cause SDK generation and documentation steps to fail. Create both the source directory and CHANGELOG file before merging.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/config/sdks.php` around lines 303 - 309, The config entries for the SDK
use the 'source' key pointing to "console-cursor-plugin" and the 'changelog' key
pointing to a cursor-plugin CHANGELOG.md but those targets do not exist so
realpath() returns false; fix by creating the missing SDK source directory named
console-cursor-plugin (with the expected package files) and adding a docs
CHANGELOG.md for cursor-plugin (at the same repo/name used in the config) so
both 'source' and 'changelog' resolve to real paths, or if the intended names
differ, update the 'source' and 'changelog' values in the sdks.php entry for
cursor-plugin to match the actual directory and file names.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 25, 2026

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit 9ee6304 - 6 flaky tests
Test Retries Total Time Details
UsageTest::testDatabaseStatsCollectionsAPI 1 10.02s Logs
LegacyCustomClientTest::testInvalidDocumentStructure 1 241.03s Logs
TablesDBConsoleClientTest::testCreateIndexes 1 241.87s Logs
TablesDBCustomClientTest::testUpdatePermissionsWithEmptyPayload 1 240.23s Logs
TablesDBCustomServerTest::testDecrementAttribute 1 240.52s Logs
LegacyACIDTest::testConsistency 1 240.74s Logs
Commit c1e2d45 - 4 flaky tests
Test Retries Total Time Details
UsageTest::testDatabaseStatsCollectionsAPI 1 10.17s Logs
LegacyCustomServerTest::testInvalidDocumentStructure 1 241.07s Logs
TablesDBCustomClientTest::testInvalidDocumentStructure 1 240.72s Logs
TablesDBCustomClientTest::testUpdatePermissionsWithEmptyPayload 1 240.29s Logs

@atharvadeosthale atharvadeosthale merged commit 5d6e43e into 1.8.x Feb 25, 2026
151 of 154 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants