source-connectors
Implement, validate, and troubleshoot Airweave source connectors: decorators, registry metadata, auth/config schemas, browse trees, ACLs, federated search, incremental sync, and source rate limits.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- source-connectors
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Implement, validate, and troubleshoot Airweave source connectors: decorators, registry metadata, auth/config schemas, browse trees, ACLs, federated search, incremental sync, and source rate limits.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/auth-and-config.md11.2 KB
- 参考文档references/browse-tree.md7.6 KB
- 参考文档references/source-registry.md10.4 KB
- 参考文档references/troubleshooting.md14.5 KB
03 SKILL.md 正文
Airweave Source Connectors
Use this sub-skill when a future Airweave task touches connector-facing source classes, source metadata exposed by the registry, auth/config schema behavior, connector validation, browse-tree node selection, access-control extraction, federated search sources, cursor-based incremental sync, or source-specific rate limiting.
Do not use this sub-skill for dashboard UI, Connect widget iframe/OAuth UX, MCP transport, Monke orchestration, or generic backend endpoint lifecycle work. Cross-link to sibling backend-api for source-connection endpoint flows, OAuth verification, search request/response schemas, browse-tree route shapes, and API auth/org semantics.
Route to the right reference
- Read references/source-registry.md before adding a source class, changing
@source(...)metadata, changing registry output, hiding/showing feature-flagged sources, or checking entity-definition exposure. - Read references/auth-and-config.md before changing auth methods, direct credential schemas, OAuth/BYOC/token-injection handling, auth-provider support, template config fields, source connection validation, or runtime token-provider creation.
- Read references/browse-tree.md before changing
supports_browse_tree, lazy browse children, browse-node ID encoding, node-selection persistence, or targeted sync behavior. - Read references/troubleshooting.md when diagnosing source visibility, auth/config errors, browse-tree selection bugs, ACL over/under-grants, federated search failures, cursor regressions, source HTTP errors, concurrency issues, or rate-limit behavior.
Connector operating rules
- Keep connector identity in one place: the
@source(...)decorator setsshort_name, display name, auth methods, config classes, capability flags, labels, feature flag, cursor class, federated-search status, browse-tree support, access-control support, and source rate-limit level. - Preserve the BaseSource v2 contract:
create(*, auth, logger, http_client, config),generate_entities(*, cursor=None, files=None, node_selections=None), andvalidate()are the primary connector hooks. Do not add ad-hoc credential or logger setup outside these dependencies. - Use the injected auth provider and
AirweaveHttpClient. Sources should callauth.get_token(),auth.force_refresh()when supported, or direct credential models fromDirectCredentialProvider; external HTTP calls should flow through the injected client so SSRF checks and optional source rate limits apply. - Put public schema fields in typed Pydantic config/auth models. Use field metadata (
is_secret,feature_flag,auth_provider_field,required_for_auth,exclude_from_ui) deliberately because the registry turns those classes into API-visibleFields. - For continuous sync, set both
supports_continuous=Trueandcursor_class=...; the decorator rejects continuous sources without a cursor class. Update the cursor only with stable, source-owned state and support full-sync fallback when cursor state is absent or invalid. - For federated sources, set
federated_search=True, implementsearch(query, limit), and do not pretend full sync exists. Slack intentionally raises fromgenerate_entities()because it searches Slack at query time. - For ACL-aware sources, set
supports_access_control=True, setentity.accesson yielded entities, and implementgenerate_access_control_memberships()when group expansion is needed. Principal formats must stay compatible with the search broker. - For browse-tree sources, set
supports_browse_tree=True, implementget_browse_children(parent_node_id)andparse_browse_node_id(node_id), and keep emitted node IDs parsable into the metadata needed by targeted sync. - Keep Monke and manual credentialed workflows external. No bundled script is included for this sub-skill: the only relevant source-maintained manual artifact is the SharePoint browse-tree manual test, and it requires real Microsoft tenant credentials and external state.
Safe validation anchors
When a backend Python 3.13 environment with Airweave and pytest is active, prefer connector-owned unit anchors first:
cd backend
python -m pytest tests/unit/platform/sources/test_http_helpers.py -q
python -m pytest tests/unit/platform/sources/test_process_entities_concurrent.py -q
python -m pytest tests/unit/platform/sources/test_sharepoint_online_acl.py -q
python -m pytest tests/unit/platform/sources/test_sharepoint_online_group_expansion.py -q
python -m pytest tests/unit/platform/sources/test_sharepoint2019v2.py -q
python -m pytest tests/unit/platform/sources/test_sharepoint2019v2_dirsync.py -q
python -m pytest tests/unit/api/test_source_feature_flags.py -q
Credentialed or local-stack E2E anchors are useful but not safe to run unattended: source listing/detail, federated search, source rate limits, continuous sync, entity definitions, OAuth/direct/auth-provider/token source-connection variants, and SharePoint legacy DirSync tests are cataloged in references/troubleshooting.md.
The prepared backend inspection facts for this skill were CPU-only: airweave==0.1.0 imported on Python 3.13.14, connector-relevant imports such as airweave.schemas.source_connection, airweave.platform.sources._base, and airweave.platform.decorators succeeded, no accelerator backend is required for this scope, and settings imports require documented environment variables with sufficiently long STATE_SECRET and SVIX_JWT_SECRET values.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).