connector-pull
Implement source-side pull logic for Glean Indexing SDK connectors. Use after API exploration when writing data clients that fetch from third-party APIs.
- License 许可
- MIT
- 最近更新
- 2026-10-31
- Stars
- ★ 10
- Forks
- 2
01 前言 Front Matter
- name
- connector-pull
- description
- Implement source-side pull logic for Glean Indexing SDK connectors. Use after API exploration when writing data clients that fetch from third-party APIs.
03 SKILL.md 正文
Connector Pull
Use this skill when implementing source API fetching for a connector after <connector-folder>/.glean/api_endpoints.json and <connector-folder>/.glean/source_investigation.md are complete.
Inputs
<connector-folder>/.glean/api_endpoints.json<connector-folder>/.glean/api_inventory.md<connector-folder>/.glean/source_investigation.md<connector-folder>/.glean/connector_plan.md
Rules
- Implement full-crawl source fetching for the AI-built connector. Do not implement incremental crawl unless the user explicitly asks for developer-owned follow-up work.
- Streaming and full crawl are compatible: use streaming/pagination to limit memory while still crawling all in-scope source data. Do not confuse streaming with incremental sync.
- Use source API behavior proven by API exploration. Do not invent pagination, rate-limit, auth, or response fields.
- Keep source fetching in the data client. Keep Glean mapping in the connector.
- Use SDK pull recipes only. Inherit from the pull base classes and do not hand-roll ad hoc HTTP clients in generated connector code.
- Redact secrets in logs and examples.
SDK Pull Surface
Use these SDK exports from glean.indexing.recipes.pull:
PullHttpClient: source-side HTTP client for GET/POST, retries, response parsing, and redacted request logging.BasePullHttpStreamingDataClient: streaming data client for common list endpoints.PullOptionsandPullRetryOptions: timeouts, retries, retry-after handling, and parameter masking.TokenBucketRateLimiter: source API rate limiting.PullPaginationMode:link,offset,cursor, ornone.PullResponse: parsed JSON/list response helper.
Implementation Flow
- Read the confirmed endpoint inventory and source investigation.
- Choose the simplest full-crawl data model that satisfies the confirmed plan.
- Implement one source data shape per source entity.
- Implement list/detail fetching with the pagination mode documented during API exploration.
- Choose and record source page size/max-items behavior from API limits and the confirmed plan.
- Apply source API rate limits using
TokenBucketRateLimiterwhen limits are known. - Use retry options for 429 and transient 5xx failures.
- Preserve raw source IDs and URLs needed by the push/mapping layer.
- Do not add unit tests until the full-crawl E2E smoke path is confirmed. Before that, use compile checks and a small dry-run/smoke run.
Load And Crawl Frequency
Use the load and crawl-frequency decisions from <connector-folder>/.glean/connector_plan.md. If the plan is missing those decisions, return to the top-level connector-builder planning step instead of asking again here.
04 同仓库更多 Skills
connector-testing
Test a generated connector through full-mock, integration/cache, and live end-to-end phases using the public utilities under glean.indexing.testing.
connector-push
Implement Glean-side push/upload logic for Glean Indexing SDK connectors. Use when mapping source entities to Glean documents, identities, groups, memberships, and status checks.
connector-observability
Plan and implement logging, metrics, and evaluation visibility for Glean Indexing SDK connectors. Use when wiring connector runtime observability or deciding what to verify after a connector run.
connector-deployment
Plan and operate customer-hosted deployment for Glean Indexing SDK connectors using glean-idx deploy. Use when the user wants deployment artifacts, cloud secrets, Kubernetes CronJobs, logs, status, or teardown for a generated connector.
connector-builder
Build Glean Indexing SDK connectors from source-system documentation. Use when planning, generating, validating, or evaluating a custom connector built with the Glean Indexing SDK.
connector-auth
Plan source API authentication for Glean Indexing SDK connectors. Use during connector planning and implementation to separate API-exploration credentials from production connector auth.