Skip to content

@fedify/forgefed package for ForgeFed vocabulary support #751

@dahlia

Description

@dahlia

Background

ForgeFed defines an ActivityPub federation protocol for software forges such as Gitea and Forgejo. The spec adds forge-specific actor types (Repository, TicketTracker, PatchTracker, Project, Team, Factory, Workflow, Roadmap, ReleaseTracker, Organization), object types (Commit, Branch, Push, Ticket, Patch, Milestone, Release, Review, SshKey, and others), and properties for commits, branches, tickets, reviews, access control, and organization membership.

Fedify currently does not expose this vocabulary. Building a ForgeFed-compatible application on top of Fedify requires using untyped extensions or custom JSON-LD handling.

Proposal

This should live in a separate @fedify/forgefed package rather than in the core. The ForgeFed spec is still marked as a work in progress, so keeping it isolated would let the ForgeFed bindings evolve without forcing churn in the core package. Users who don't need forge federation also avoid the extra API surface and bundled context.

The package would provide:

  • Typed classes for all ForgeFed actor types
  • Typed classes for all ForgeFed object types
  • ForgeFed-specific property accessors
  • A preloaded ForgeFed JSON-LD context, registered so Fedify's document loader doesn't need to fetch it over the network

Initial scope

Actor types

  • Repository
  • TicketTracker
  • PatchTracker
  • Project
  • Team
  • Factory
  • Workflow
  • Roadmap
  • ReleaseTracker
  • Organization

Object types

  • Commit
  • Branch
  • Push
  • Ticket (covering both issues and merge/pull requests)
  • Patch
  • EnumValue, Enum, Field (workflow-related)
  • Milestone
  • Release
  • Review and its subtypes (CodeQuote, CodeSuggestion, Thread, Approval)
  • SshKey

Properties

All properties from § 8.2 of the ForgeFed spec, including commit metadata, branch refs, ticket assignment and resolution, access control, workflow fields, milestones, releases, merge request state, and organization membership.

Tasks

  • Set up @fedify/forgefed package skeleton (JSR + npm dual publishing, same as other @fedify/* packages)
  • Bundle the ForgeFed JSON-LD context and register it with a preloaded document loader
  • Implement actor types
  • Implement object types
  • Implement ForgeFed-specific properties
  • Add serialization/deserialization tests for ForgeFed types and properties
  • Document package setup, context loading, and a minimal Repository/Ticket usage example

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions