Add ForgeFed exchange federation#234
Merged
skulidropek merged 1 commit intomainfrom May 3, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что сделано
Closes #233.
Добавлена поддержка ActivityPub / ForgeFed exchange workflow для docker-git API:
publicKeyиapplication/activity+json;Follow;https://exchange.lefine.pro, actor URL иcode@exchange.lefine.pro;.docker-git/.orch/state/federation.json;Create(Ticket), дедуплицирует items и сохраняет задачи;Updateобратно в remote inbox;Как пользоваться
1. Поднять API с публичным ActivityPub origin
Если API доступен локально на
127.0.0.1:3334, поднимите Cloudflare tunnel:Возьмите выданный URL, например:
PUBLIC_ORIGIN="https://example.trycloudflare.com"Перезапустите API с публичным origin. Для docker compose:
Можно включить автоподписку на старте:
2. Проверить публичный actor
В ответе должны быть публичные URL вида
$PUBLIC_ORIGIN/federation/inbox,$PUBLIC_ORIGIN/federation/outboxиpublicKey.3. Подписаться на exchange вручную
Допустимые
targetварианты:4. Проверить статус подписки
curl -fsS "$PUBLIC_ORIGIN/federation/exchange/subscriptions"Ожидаемый результат после ответа exchange:
status: "accepted",remoteOutbox: "https://exchange.lefine.pro/outbox/code".5. Poll remote outbox
Poll без запуска agent, только ingest/dedupe:
Poll с запуском задач:
Poll конкретной queue/target:
6. Смотреть принятые задачи
curl -fsS "$PUBLIC_ORIGIN/federation/issues"Статусы задач:
Если Ticket не содержит GitHub URL, API использует
projectRepoUrlиз подписки илиDOCKER_GIT_EXCHANGE_PROJECT_REPO_URL. Без fallback repo задача будет помеченаfailed.7. Проверить inbox вручную
Пример локального
Create(Ticket)payload:Verification
bun run api:test: 13 test files, 71 tests passed.