Draupnir is being supported with a grant from NLnet
Table of Contents
- Good news
- Draupnir's plan
- The goals
- Command system refactor
- Command system library
- Safe Mode
- Capability Management
- Protection Configuration Management
- Release v2.0.0
- Baseline documentation for Draupnir’s matrix-protection-suite
- Preview effects of policy list subscription
- Agreement and Disagreement ratings for policies
- Explicit Agreement watch mode for policy lists
- Integrated appservice (multi-tenancy V2)
- Dynamic protection loading
- Timeline introspection (visible events cache)
- Simple participation metric
- Policy expiration and temporary bans
- Internationalisation
- Work with and Implement feedback from accessibility and security audits
Good news
Our application for a grant from NGI Zero Core has been accepted1. The goals of the work are listed below, we don't expect them to change much but if they do then this post will be updated.
Without this grant, development on Draupnir would have ceased and we would only be able to carry out maintenance. I'm not sure what the future of Draupnir would have been within the context of the upcoming 2.0.0 release, but we don't have to worry about that now.
You can find more information about NGI Zero and NLnet here2.
It's also worth mentioning that the European Commission’s Horizon programme seems to have made moves to drop NLnet's NGI programme from future funding. Within the context of Matrix, NGI has helped fund a number of projects, most notably work on matrix's cryptography and Fractal, although I am unable to find a complete list projects or specific details. If you have some clout to spare please find the open letter3. You can also see the Matrix foundation's own response4.
Initiatives like this ending will negatively impact all software for everyone5, not just the open source ecosystems or bubbles we find ourselves in.
Draupnir's plan
Statement
Important Trust & Safety work within Matrix7 has proceeded slowly over the course of the last 5+ years due to a lack of resources and split focus. Draupnir is built on this legacy, that is inherited from an older sister project called Mjolnir. Draupnir and Mjolnir are both moderation bots that collectively protect an overwhelming majority of Matrix's public facing communities. Both projects have outstanding issues that are blocked by a significant need for a refactoring and rearchitecting of their core concepts. Draupnir has now almost fulfilled this need with an open source library called the matrix-protection-suite. The plan is to complete this work and finally address the pain points for Matrix room moderators with Draupnir, and make it easier for Draupnir’s behaviour to be modified by developers, system administrators, and in some cases room moderators. This will be done with the aim to create less dependence and pressure on the maintainers of Draupnir itself to meet all the differing requirements of Matrix's communities.
Reading the goals
The goals can be implemented in any order, but they're roughly in the order that they will be tackled in.
For an accurate picture of what is being worked on, please see the planning board on GitHub https://github.com/orgs/the-draupnir-project/projects/5.
I will keep the board up to date, and if I have neglected and failed at that, it shouldn't be too difficult to infer from this what the direction currently is. These goals directly map to a planning story or description within Draupnir's planning tracker https://github.com/the-draupnir-project/planning/issues. And we generally will describe any other big pieces of work there.
The goals certainly look ambitious, but there has already been a lot of work in the background over the past year on the matrix-protection-suite. These features were in mind and the code and architecture was designed somewhat explicitly to allow expansion towards these goals.
The Draupnir blog series
I really dropped the ball on the blog series over the past couple of months, but my mood had also dropped off a lot. It'll be coming back soon.
The goals
Command system refactor
The current API for defining commands depends on too much ambient context that makes unit testing commands difficult. The API will be modified so that commands only have access to their direct dependencies and there is a separate layer of glue to provide these dependencies from a generic common context. The direct dependencies can now be faked on a per command basis in unit testing.
Milestones
- The ban, unban, kick, watch, unwatch commands all have unit tests, not integration tests8.
Completion
- Blog update: https://marewolf.me/posts/draupnir/2405.html
- This Week in Matrix: TWIM-2024-09-13
- Pull requests: Story tracker (see list)
- Draupnir release: v2.0.0-beta.6
- Unit tests: Draupnir/test/unit/commands
Command system library
The current command definition system, including the JSX templating system for rendering Matrix messages, is to be made available as a library and npm package.
Milestones
- The command system is released with a distinct GitHub repository and npm package.
Completion
This was completed at the same time as the command system refactor.
- Blog update: https://marewolf.me/posts/draupnir/2405.html
- This Week in Matrix: TWIM-2024-09-13
- Pull requests: Story tracker (see list)
- Draupnir release: v2.0.0-beta.6
- NPM package: @the-draupnir-project/interface-manager
- GitHub: @the-draupnir-project/interface-manager
Safe Mode
Problems with runtime settings can be diagnosed and resolved without external tooling or editing.
Milestones
- New pre-release (2.0.0-beta.*) containing the safe mode feature.
Completion
- Blog update: https://marewolf.me/posts/draupnir/2406.html
- This Week in Matrix: TWIM-2024-10-25 and TWIM-2024-10-04
- Story:
- Draupnir release: v2.0.0-beta.8 (via v2.0.0-beta.7)
Capability Management
As a room moderator, I can see the active capability provider for each protection and read about the capability providers that they are compatible with. I should then be able to change the active capability provider for each protection as I see fit.
Protection Configuration Management
Protection settings can be accessed and modified. Protections can establish subcommands9.
Release v2.0.0
Draupnir v2.0.0 https://github.com/the-draupnir-project/planning/issues/17
- Milestones
- All issues marked with ‘blocks release’ label are resolved https://github.com/the-draupnir-project/Draupnir/issues?q=is%3Aissue+is%3Aopen+label%3A%22blocks+release%22
- All issues marked with ‘MPS Follow Up’ label are resolved or have a planning issue to resolve them.
- Draupnir v2.0.0 is released.
- Post release bugs are triaged and added to the planning project https://github.com/orgs/the-draupnir-project/projects/5/views/8
Baseline documentation for Draupnir’s matrix-protection-suite
Conceptual documentation exists to explain policy rooms, policy lists, revisions, protections, capabilities and protected rooms sets.
- Milestones
- Conceptual documentation is available to read and linked from matrix-protection-suite’s README.
- A how to guide exists for scanning timeline events.
- A how to guide exists for scanning new members.
- A tutorial exists for creating a new protection that does something simple, it doesn't have to protect the room, it could equally be a welcome or FAQ bot.
Preview effects of policy list subscription
A summary of changes that will be made to Matrix rooms will be presented when watching a list. A prompt is given to confirm or cancel the change. This essentially runs all protections in a dry run mode.
Agreement and Disagreement ratings for policies
Draupnir moderators will be able to rate policies in other lists with using a binary agree/disagree rating. Draupnir will ignore policies that have a disagree rating. Policies that conflict while unbanning a user that originate from lists that are not controlled by Draupnir will automatically be rated with disagree.
Explicit Agreement watch mode for policy lists
A new policy list subscription mode is introduced, which allows a lists policies to be applied lazily. This means policies from a list in this mode are only enforced when a policy also has an agreement rating. Any entities marked by a policy from a list that is being watched by Draupnir in explicit agreement mode that are present within the protected rooms set will cause Draupnir to warn the management room.
Integrated appservice (multi-tenancy V2)
The appservice is redesigned such that Draupnir operates much more closely to the homeserver, providing an almost transparent integration to Matrix’s Spaces feature. When users create spaces or add rooms to them, the appservice automatically provisions a Draupnir for the space and protects all of the rooms, without any manual intervention.
Dynamic protection loading
Allow protections defined externally to be loaded at startup from an arbitrary directory. Which will allow standalone protections to be developed and maintained for Draupnir by third parties without conflicting with the upstream.
Timeline introspection (visible events cache)
When searching for events from a given user, Draupnir has to call /messages in every single protected room. This is a very expensive operation, and on homeservers with less resources can prevent Draupnir from redacting harmful messages when the operation takes too long. A timeline cache of visible events would allow Draupnir and protections to cheaply scan and locate events matching arbitrary criteria. We also need an API to be able to extract all media that has been included within an event so that it can be accessed by protections.
Simple participation metric
Draupnir and MPS have no standard way of determining how long a user has been participating in a community. Draupnir’s protections each have an adhoc way of doing this and then discriminating against newer users without considering all of the rooms in the entire community (leading to false positives). A metric needs to be derived representing how likely a moderator is likely to have observed a user’s behaviour, probably from participation.
Policy expiration and temporary bans
There are many reasons why policies may no longer be relevant. A room moderator often issues bans in the heat of the moment or when tensions are high. Things can change. There may no longer be any context for why a ban is in place. As a room moderator I should be notified when policies expire or are approaching expiry and be given options for how to proceed.
Internationalisation
Draupnir is made ready for internationalisation by translators.
Work with and Implement feedback from accessibility and security audits
Draupnir's accessibility will be audited against WCAG where applicable and Draupnir will receive a security quickscan at some point after the v2.0.0 release.
Footnotes:
On a personal note, I did not expect this application to be successful and it hasn't really set in yet. Trying not to think about it too hard, I'm just going to focus on delivering. It took about 5-6 months to get through the process, which was pretty smooth, the limiting factor was time if anything. Of course waiting that long with uncertainty is not great and I wish I had managed myself better.
Honestly I'm confused about what and how I'm supposed to refer to them if you can't tell. I'm pretty sure it's just "NGI Zero" but idk.
I don't really know who wrote this or the context or how to write this properly, but it's more important that you just see it.
The consequences people focus on are usually immediate, like the the open source ecosystem as a whole becoming weaker. Maybe you will even go as far to worry about how software development is tilting towards some kind of gig/grift economy. But what I worry about is how taking software for granted will change how software is produced structurally from the ground up. And that's important, because I get the feeling that the way people program is a reflection of how they think. If the essentials become "corrupted", such as programming languages and environments. Then this means we end up unable to express ourselves properly6. To an extent, this has already happened, and it is exactly why programming is currently so terrible.
I don't mean expression like, some funky lisper writing a tonne of macros, or something like that. I mean more that structurally programming itself becomes tilted to serve the needs of corporations, to sell products. Rather than the needs of people who can be helped by software.
If you are unfamiliar with what Matrix is, it is an open source instant messaging protocol that was created in 2014. See https://matrix.org
Integration tests will still exist, the point is that we want it to to be a lot easier to create tests for commands. Please see https://marewolf.me/posts/draupnir/2402.html#development-testing-commands.
We broke this at some point either during the original command refactor back in 2023 or during the migration to MPS.