> For the complete documentation index, see [llms.txt](https://docs.kangal.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kangal.dev/tr/sdklar/distribution.md).

# SDK dağıtımı

Kangal, altı resmi Admin API SDK'sını aynı değiştirilemez OpenAPI contract ve version tag'inden üretir. Release workflow her dili compile eder veya doğrular, package artifact'lerini oluşturur, release dosyalarını Sigstore ile imzalar, `SHA256SUMS.txt` yazar ve GitHub Release yayınlar.

## Release kanalları

| Dil        | Package coordinate                | Ana kanal                                | Registry otomasyonu                           |
| ---------- | --------------------------------- | ---------------------------------------- | --------------------------------------------- |
| TypeScript | `@kangal/sdk`                     | npm / imzalı GitHub Release              | npm Trusted Publishing                        |
| Python     | `kangal-api-sdk`                  | PyPI / imzalı GitHub Release             | PyPI Trusted Publisher                        |
| Go         | `github.com/latifv/kangal-sdk-go` | Go module mirror / imzalı GitHub Release | Source mirror ve semantic tag gerekir         |
| Java       | `dev.kangal:kangal-sdk`           | Maven Central / imzalı GitHub Release    | Central namespace ve signing kurulumu gerekir |
| C#         | `Kangal.SDK`                      | NuGet / imzalı GitHub Release            | NuGet Trusted Publishing                      |
| PHP        | `kangal/sdk`                      | Packagist / imzalı GitHub Release        | Public Composer source mirror gerekir         |

Package coordinate resmi hedefi tanımlar. Belirli bir sürümün external registry'de yayında olduğunu tek başına kanıtlamaz. Production build'e sabit sürüm eklemeden önce registry veya release sayfasını kontrol edin.

## Local release build

```bash
python scripts/build_official_sdks.py \
  --version 1.0.0 \
  --output dist/api-sdks
```

Komut şunları oluşturur:

* altı dilin registry-ready source package'larını içeren `packages/`;
* deterministik SDK ZIP'lerini içeren `artifacts/`;
* package coordinate, operation sayısı ve OpenAPI checksum'ını içeren `release-manifest.json`.

Build, semantic olmayan version'ı veya dolu output klasörünü reddeder.

## GitHub Actions ile yayın

Değiştirilemez bir tag oluşturup gönderin:

```bash
git tag -a api-sdk-v1.0.0 -m "Kangal API SDKs v1.0.0"
git push origin api-sdk-v1.0.0
```

`.github/workflows/publish-api-sdks.yml` tüm dilleri build eder ve imzalı GitHub Release'i yayınlar. External registry job'ları, ilgili repository variable `true` yapılana kadar kapalı kalır:

| Registry | Repository variable             | GitHub environment |
| -------- | ------------------------------- | ------------------ |
| npm      | `API_SDK_NPM_PUBLISH_ENABLED`   | `npm`              |
| PyPI     | `API_SDK_PYPI_PUBLISH_ENABLED`  | `pypi-api-sdk`     |
| NuGet    | `API_SDK_NUGET_PUBLISH_ENABLED` | `nuget`            |

Her trusted publisher'ı GitHub owner `latifv`, repository `kangal` ve workflow `publish-api-sdks.yml` ile tanımlayın. NuGet ayrıca repository secret olarak `NUGET_USER` hesap adını ister.

Registry kurulum kaynakları:

* [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/)
* [PyPI Trusted Publishers](https://docs.pypi.org/trusted-publishers/)
* [NuGet trusted publishing](https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing)

Go, Maven ve Composer yayını, tanımlanan module/package coordinate'ın sahibi public bir source repository gerektirir. İmzalı source artifact, SDK yeniden üretilmeden bu mirror'lara aktarılabilir.

## İndirilen release'i doğrulama

```bash
sha256sum --check SHA256SUMS.txt
cosign verify-blob \
  --certificate-identity "https://github.com/latifv/kangal/.github/workflows/publish-api-sdks.yml@refs/tags/api-sdk-v1.0.0" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
  --bundle kangal-api-sdk-1.0.0-python.zip.sigstore.json \
  kangal-api-sdk-1.0.0-python.zip
```

Ayrıca `release-manifest.json`, package içindeki `checksums.sha256` ve `sdk-manifest.json` dosyalarını inceleyin. Version, target, OpenAPI checksum ve dosya envanteri seçtiğiniz release ile eşleşmelidir.

## Version politikası

* Bir tag değiştirilemez ve tek bir Admin OpenAPI snapshot'ına karşılık gelir.
* Üretilmiş API veya runtime'daki breaking değişiklik major version gerektirir.
* Eklenen operation ve modeller minor version kullanır.
* Public method contract'ını koruyan generator düzeltmeleri patch version kullanır.
* Plugin SDK version'ları Admin API SDK version'larından bağımsızdır.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kangal.dev/tr/sdklar/distribution.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
