connector-cursors

connector-cursors is a cursor rule for Cursor from airweave-ai/airweave. It costs 0 tokens per session (1,490 once invoked), scanned A, original, MIT.

A typed progress record tracks how far a source synchronization has progressed. Incremental synchronization means later runs fetch only changes since the previous run, while Pydantic schemas validate the record's fields.

In plain words
What is it for?
Use it to define source-specific progress fields, resume interrupted or scheduled syncs, and save validated cursor data between executions.
Why use it?
It avoids repeating a full import on every run and catches malformed progress data before it causes harder-to-diagnose errors.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to define source-specific progress fields, resume interrupted or scheduled syncs, and save validated cursor data between executions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/airweave-ai/airweave/connector-cursors
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/airweave-ai/airweave

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for connector-cursors

README.md
[![agentmods](https://agentmods.dev/badge/rules/airweave-ai/airweave/connector-cursors/github.svg)](https://agentmods.dev/rules/airweave-ai/airweave/connector-cursors)
Your own site
<a href="https://agentmods.dev/rules/airweave-ai/airweave/connector-cursors"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/connector-cursors/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for connector-cursors

Your own site · 80×15
<a href="https://agentmods.dev/rules/airweave-ai/airweave/connector-cursors"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/connector-cursors.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,490 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01490
Opus 5 $0.00000 $0.00745
Sonnet 5 $0.00000 $0.00298
Haiku 4.5 $0.00000 $0.00149

Measured 10d ago against content hash ba9335e6f96b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

connector-cursors scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/connector-cursors.mdc · 241 lines

How it starts

The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Connector Cursors - Typed Incremental Sync

Overview

Cursors enable incremental syncs by tracking progress between executions using typed Pydantic schemas. Instead of untyped dicts, each source defines a cursor schema with validated fields.

Architecture

Lifecycle

1. SyncFactory loads cursor from DB → instantiates typed Pydantic schema
2. Factory injects cursor into source via source.set_cursor()
3. Source reads cursor.data (dict), updates with cursor.update(**fields)
4. Orchestrator saves cursor.get() back to DB after sync

Key Components

  • Cursor Schema (platform/cursors/{source}.py): Pydantic model defining cursor structure
  • Runtime Cursor (SyncCursor): Wrapper providing update() and data API
  • Source Decorator: cursor_class=MyCursor links source to schema (direct class reference, not string!)

Creating a Cursor Schema

Create a Pydantic model in platform/cursors/{source_name}.py:

from pydantic import Field
from ._base import BaseCursor

class GmailCursor(BaseCursor):
    """Gmail incremental sync cursor using history API."""
    history_id: str = Field(default="", description="Gmail history ID")

Common patterns:

Single field (API token):

class GoogleDriveCursor(BaseCursor):
    start_page_token: str = Field(default="", description="Drive Changes API token")

Multiple fields (per-resource):

class AirtableCursor(BaseCursor):
    table_cursors: Dict[str, str] = Field(
        default_factory=dict,
        description="Per-table cursor values (table_id -> last_modified_time)"
    )

Complex composite (metadata + per-resource):

class OutlookMailCursor(BaseCursor):
    delta_link: Optional[str] = Field(None, description="Primary delta link")
    folder_delta_links: Dict[str, str] = Field(default_factory=dict)
    folder_names: Dict[str, str] = Field(default_factory=dict)

Using Cursors in Sources

1. Import and Register Cursor

Read the full file on GitHub · 241 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 241 lines · 1,490 tokens per session scan A ba9335e6f96b

Subscribe to this mod's changes

connector-cursors is a cursor rule published in the GitHub repository airweave-ai/airweave (6,564 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,490 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.