Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

connector-push

/connector-push

Pisze logikę wysyłania danych do Glean dla konektorów Indexing SDK: mapowanie dokumentów, tożsamości i grup.

Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pisze logikę wysyłania danych do Glean dla konektorów Indexing SDK: mapowanie dokumentów, tożsamości i grup.

Oryginalny opis (EN)

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.

Jak działa

  1. Inputs
  2. Rules
  3. Allowed SDK Push And Status Surface
  4. Checking Uploads From The CLI
  5. Planning Guidance
  6. Crawl Frequency
Sekcje z nagłówków SKILL.md, w oryginale · 89 linii, 727 słów
Podgląd SKILL.md
---
name: connector-push
description: 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 Push

Use this skill when implementing the Glean-side upload, validation, and status-check portions of a connector.

## Inputs

- `<connector-folder>/.glean/connector_plan.md`
- `<connector-folder>/.glean/source_investigation.md`
- `<connector-folder>/.glean/api_endpoints.json`
- Source data shapes from the pull/data-client layer.

## Rules

- Use only the SDK push/status wrappers listed below. Do not call undocumented Glean APIs or generated-client methods directly from generated connector code.
- Keep document object types and datasource configuration bidirectionally consistent: every non-empty `object_type` or `container_object_type` emitted by a `DocumentDefinition` must have a matching `ObjectDefinition.name` in `CustomDatasourceConfig.object_definitions`, and every configured object definition must be used by the connector. Configure the datasource with the complete set before uploading documents; otherwise Glean rejects undeclared object types.
- Use full-crawl bulk operations for AI-built connectors. Incremental, partial-update, or delete-heavy behavior needs explicit developer attention after full crawl works.
- Record which Glean-side methods are used in `<connector-folder>/.glean/connector_plan.md`.
- Use the load and crawl-frequency decisions from the confirmed connector plan.
- Use compile checks and an end-to-end full-crawl smoke run first. Add unit tests only after the connector behavior is confirmed and worth regression testing.

## Allowed SDK Push And Status Surface

Use `PushUploader` from `glean.indexing.push`:

- `configure_datasource`: configures the datasource via the indexing datasource add API.
- `index_documents`: adds or updates a batch of documents (`/api/index/v1/indexdocuments`).
- `bulk_index_documents`: full-crawl document replacement using bulk document upload.
- `bulk_index_single_batch_upload`: uploads one pre-batched bulk document page.
- `delete_document`: deletes one document when explicitly required.
- `index_user`: adds or updates one datasource user.
- `bulk_index_users`: full-crawl datasource user replacement.
- `index_group`: adds or updates one datasource group.
- `bulk_index_groups`: full-crawl datasource group replacement.
- `index_membership`: adds or updates one datasource membership.
- `bulk_index_memberships`: full-crawl datasource membership replacement.
- `delete_user`, `delete_group`, `delete_membership`: delete identity records only when explicitly required.
- `bulk_index_employees`: uploads people/employee records when building a people connector.

Use `StatusClient` from `glean.indexing.push`:

- `get_datasource_status`: checks overall datasource upload/processing status.
- `get_documents_status`: checks upload, indexing, and permission status for specific documents.
- `check_document_access`: checks whether a user has access to a document.

When interpreting `get_documents_status`, keep `permissionIdentityStatus` separate from the document upload/processing status. `permissionIdentityStatus` only reports whether permission identities were uploaded and has the values `UPLOADED`, `NOT_UPLOADED`, or `UNKNOWN`; it never returns `INDEXED`. `INDEXED` belongs to the document upload/processing status.

Use these debug helpers only through `PushUploader`:

- `get_document_lifecycle_events`: gets lifecycle events for a datasource document.
- `debug_user`: gets debug information for a datasource user.

Do not use any other Glean-side endpoints in generated connector code.

## Checking Uploads From The CLI

The surface above is what generated connector code may call. To *inspect* what an
upload did, use `glean-idx` rather than writing a throwaway script; each command
wraps one of the methods listed above.

| Command | Answers |
|---|---|
| `glean-idx datasource status --datasource <name>` | How many documents are uploaded, and how many actually indexed. |
| `glean-idx document status --datasource <name> --document <type> <id>` | Did this document finish indexing. Add `--poll` to wait. |
| `glean-idx document access --datasource <name> --object-type <type> --id <id> --user <email>` | Can this user see it. An upload with a correct-looking ACL is still wrong if the identity graph is incomplete. |
| `glean-idx document events --datasource <name> --object-type <type> --id <id>` | Where the document went, when it uploaded but never became searchable. |
| `glean-idx datasource process --datasource <name>` | Requests processing now, instead of waiting for the next scheduled run. |
| `glean-idx datasource configure` | Registers the connector's own `configuration`, so the datasource cannot drift from what the connector uploads to. |

These need only `GLEAN_SERVER_URL` and `GLEAN_INDEXING_API_TOKEN`, except
`datasource configure`, which imports the connector and so runs inside the
project. Add `--output json` when the result needs to be parsed.

## Planning Guidance

In `<connector-folder>/.glean/connector_plan.md`, include:

- Source entity to Glean entity mapping.
- Glean object types and document IDs.
- Full-crawl upload choice: `bulk_index_documents`, `bulk_index_users`, `bulk_index_groups`, and/or `bulk_index_memberships`.
- Test upload choice: small `index_documents` or focused bulk upload.
- Status/debug checks to run after upload.
- Auth used for Glean indexing: `GLEAN_SERVER_URL` and `GLEAN_INDEXING_API_TOKEN`.
- Production source auth, which may differ from the token used during API exploration.

## Crawl Frequency

Use `<connector-folder>/.glean/connector_plan.md` for expected document count, average document size, freshness requirement, source API limits, hosting owner, and recommended full-crawl frequency. If the plan is missing those decisions, return to the top-level `connector-builder` planning step instead of asking again here.

Wersje

W bazie nie ma innych skilli o nazwie connector-push.

Migawka bazy z 28.10.2026 · wersja paczki dd99ae1dbb13 (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100connector-builder
    Buduje konektory Glean Indexing SDK na podstawie dokumentacji systemu źródłowego: planuje, generuje, waliduje i ocenia własny konektor.
  • 100connector-observability
    Planuje i wdraża logowanie, metryki i widoczność ewaluacji dla konektorów Glean Indexing SDK oraz pomaga ustalić, co sprawdzić po uruchomieniu konektora.
  • 100dev-docs-guide
    Przeszukuje publiczną dokumentację deweloperską Glean pod kątem API, SDK, MCP, uwierzytelniania, indeksowania i integracji, gdy ktoś buduje rozwiązanie na Glean.
  • 100glean-cli
    Opisuje użycie CLI glean do dostępu do wiedzy i dokumentów firmy w Glean: wyszukiwanie w Confluence, Slacku i plikach Google Drive.
  • 100search
    Przeszukuje firmową wiedzę w Glean i zwraca wyniki z informacją o świeżości i autorytecie dokumentu.
  • 95add-connector
    Dodaje lub zmienia konektor bazy wiedzy Sim, który synchronizuje dokumenty z zewnętrznego źródła.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.