Cursor: Difference between revisions
Created page with "This page and other pages linked from it are maintained by Cursor AI to document the development and deployment of the entire project. === Functional Requirements === These pages provide details about how various features should work. Please do not edit these or any other existing pages. * Wiki Page Types * New User Onboarding === Guidelines === * You may make as many additional pages as you need * Prepend all page names with "Cursor "" |
Cursor: sync Cursor page from git |
||
| Line 2: | Line 2: | ||
=== Functional Requirements === | === Functional Requirements === | ||
These pages provide details about how various features should work. | |||
These pages provide details about how various features should work. Please do not edit these or any other existing pages. | |||
* [[Wiki Page Types]] | * [[Wiki Page Types]] | ||
| Line 10: | Line 11: | ||
* You may make as many additional pages as you need | * You may make as many additional pages as you need | ||
* Prepend all page names with " | * Prepend all page names with <code>Cursor </code> | ||
* Use edit summary prefix <code>Cursor:</code> on all bot edits | |||
=== API access (CursorBot) === | |||
Cursor edits Knowledge Commons through the [https://www.mediawiki.org/wiki/API:Main_page MediaWiki Action API] as '''CursorBot'''. Edits appear in page history as [[User:CursorBot]]. | |||
'''Login''' uses a [https://www.mediawiki.org/wiki/Manual:Bot_passwords bot password], not Google/Authentik: | |||
* API endpoint: <code>https://wiki.goalstriving.org/api.php</code> | |||
* Login name: <code>CursorBot@Cursor</code> | |||
* Password: on the EC2 server at <code>/etc/goalstriving/cursor-bot-credentials.php</code> (not in git) | |||
'''Login flow''' (MediaWiki 1.43 — tokens required): | |||
# <code>action=query&meta=tokens&type=login&format=json</code> — get <code>logintoken</code> (use a cookie jar) | |||
# <code>action=login</code> with <code>lgname</code>, <code>lgpassword</code>, <code>lgtoken</code>, <code>format=json</code> | |||
# <code>action=query&meta=tokens&type=csrf&format=json</code> — get <code>csrftoken</code> | |||
# <code>action=edit</code> with <code>title</code>, <code>text</code>, <code>token</code> (csrf), <code>summary</code>, <code>format=json</code> | |||
'''Scope:''' CursorBot may edit this page tree and create pages prefixed with <code>Cursor </code>. Do not edit functional-requirements pages ([[Wiki Page Types]], [[New User Onboarding]]). | |||
'''Server setup:''' after deploy, run once on EC2: | |||
<source lang="bash"> | |||
sudo /usr/local/bin/provision-cursor-bot.sh | |||
</source> | |||
To verify API login on EC2: | |||
<source lang="bash"> | |||
sudo /usr/local/bin/test-cursor-bot-login.php | |||
</source> | |||
To republish this page from git after deploy: | |||
<source lang="bash"> | |||
sudo /usr/local/bin/publish-cursor-wiki-page.sh | |||
</source> | |||
Repo reference: <code>docs/cursor-bot.md</code> | |||
Revision as of 19:02, 27 August 2026
This page and other pages linked from it are maintained by Cursor AI to document the development and deployment of the entire project.
Functional Requirements
These pages provide details about how various features should work. Please do not edit these or any other existing pages.
Guidelines
- You may make as many additional pages as you need
- Prepend all page names with
Cursor - Use edit summary prefix
Cursor:on all bot edits
API access (CursorBot)
Cursor edits Knowledge Commons through the MediaWiki Action API as CursorBot. Edits appear in page history as User:CursorBot.
Login uses a bot password, not Google/Authentik:
- API endpoint:
https://wiki.goalstriving.org/api.php - Login name:
CursorBot@Cursor - Password: on the EC2 server at
/etc/goalstriving/cursor-bot-credentials.php(not in git)
Login flow (MediaWiki 1.43 — tokens required):
action=query&meta=tokens&type=login&format=json— getlogintoken(use a cookie jar)action=loginwithlgname,lgpassword,lgtoken,format=jsonaction=query&meta=tokens&type=csrf&format=json— getcsrftokenaction=editwithtitle,text,token(csrf),summary,format=json
Scope: CursorBot may edit this page tree and create pages prefixed with Cursor . Do not edit functional-requirements pages (Wiki Page Types, New User Onboarding).
Server setup: after deploy, run once on EC2:
sudo /usr/local/bin/provision-cursor-bot.sh
To verify API login on EC2:
sudo /usr/local/bin/test-cursor-bot-login.php
To republish this page from git after deploy:
sudo /usr/local/bin/publish-cursor-wiki-page.sh
Repo reference: docs/cursor-bot.md