Skip to content

Add vocabulary relating to proposals, intentions and measures. #579

Open
scammo wants to merge 7 commits intofedify-dev:mainfrom
54GradSoftware:main
Open

Add vocabulary relating to proposals, intentions and measures. #579
scammo wants to merge 7 commits intofedify-dev:mainfrom
54GradSoftware:main

Conversation

@scammo
Copy link

@scammo scammo commented Feb 21, 2026

Summary

Add vocabulary relating to proposals, intentions and measures according to the docs.

Related issue

Reference the related issue(s) by number, e.g.:

Changes

  • Add vocabulary: "proposals", "intentions" and "measures".

Benefits

Users can now build a federated system based on the first part of FEP-0837: Federated Marketplace (https://codeberg.org/fediverse/fep/src/branch/main/fep/0837/fep-0837.md). This is really interesting for making offered goods or services available for discovery in the Fediverse.

Checklist

  • Did you add a changelog entry to the CHANGES.md?
  • Did you write some relevant docs about this change (if it's a new feature)?
  • Did you run mise test on your machine?

Additional notes

Please note that this is both my first pull request and my first enhancement issue for this project. While I have extensive Mastodon/event experience, I have no prior experience of enhancing federation tooling directly. I am happy to make any necessary changes or additions. Thank you for your work!

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @scammo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the @fedify/vocab package by introducing new vocabulary types crucial for building federated marketplace functionalities. These additions enable users to define and exchange information about proposals, economic intentions, and measurable quantities, laying the groundwork for implementing the first part of the Federated Marketplace FEP-0837. This expands the system's capability to describe and discover offered goods or services across the Fediverse.

Highlights

  • New Vocabulary Classes: Introduced Proposal, Intent, and Measure classes to support economic resource coordination in federated networks.
  • Proposal Class: Added the Proposal class for publishing offers or requests, including properties for purpose, primary intent (publishes), reciprocal intent (reciprocal), and whether it is unit-based.
  • Intent Class: Defined the Intent class to describe economic transactions within a proposal, with properties such as action, resourceConformsTo, resourceQuantity, availableQuantity, and minimumQuantity.
  • Measure Class: Implemented the Measure class for representing quantities with units, featuring hasUnit and hasNumericalValue properties.
  • Changelog Update: Updated the CHANGES.md file to document the addition of these new vocabulary types under @fedify/vocab.
Changelog
  • CHANGES.md
    • Added new entries under @fedify/vocab for the Proposal, Intent, and Measure classes.
    • Included details about the properties of each new class.
  • packages/vocab/src/snapshots/vocab.test.ts.snap
    • Updated snapshots to include Measure objects.
    • Updated snapshots to include Intent objects.
    • Updated snapshots to include Proposal objects.
  • packages/vocab/src/intent.yaml
    • Added the YAML definition for the Intent vocabulary type.
    • Defined properties like action, resourceConformsTo, resourceQuantity, availableQuantity, and minimumQuantity for Intent.
  • packages/vocab/src/measure.yaml
    • Added the YAML definition for the Measure vocabulary type.
    • Defined hasUnit and hasNumericalValue properties for Measure.
  • packages/vocab/src/proposal.yaml
    • Added the YAML definition for the Proposal vocabulary type.
    • Defined properties like purpose, publishes, reciprocal, and unitBased for Proposal.
Activity
  • The author, scammo, has submitted their first pull request and enhancement issue for this project.
  • The author has extensive Mastodon/event experience but is new to federation tooling directly.
  • The author is open to making any necessary changes or additions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@issues-auto-labeler issues-auto-labeler bot added activitypub/interop Interoperability issues component/collections Collections related component/federation Federation object related labels Feb 21, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces new vocabulary types for economic resource coordination, specifically Proposal, Intent, and Measure, based on FEP-0837. This is a great addition that will enable building federated marketplace applications with Fedify.

The implementation is well-done, with new YAML definitions for the vocabulary generator and corresponding test snapshot updates. I have a few minor suggestions to improve the changes:

  • In CHANGES.md, please add your name to the changelog entry as per the contribution guidelines and remove an unused reference link.
  • In packages/vocab/src/measure.yaml, the hasNumericalValue property should use a numeric type (xsd:float) instead of xsd:string for better type safety and interoperability.

Thank you for your contribution, especially as a first-time contributor! These changes are valuable to the project.

@dahlia dahlia added the component/vocab Activity Vocabulary related label Feb 21, 2026
scammo and others added 4 commits February 24, 2026 15:15
# Conflicts:
#	CHANGES.md
#	packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap
#	packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap
#	packages/vocab-tools/src/__snapshots__/class.test.ts.snap
@scammo
Copy link
Author

scammo commented Feb 26, 2026

FYI: I updated the comments, CHANGES.md and the snapshots to the current version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

activitypub/interop Interoperability issues component/collections Collections related component/federation Federation object related component/vocab Activity Vocabulary related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants