From 29a8bec08639587f0a563798ec9dace45867fdd8 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Mon, 4 Sep 2023 20:33:58 +0100 Subject: [PATCH] Bring various documentation up to date with current events. --- CONTRIBUTING.md | 69 ++++++++++++++++++++++++++++++++++++++++++++----- README.md | 60 ++++++++++++++++++++++++++++++------------ docs/context.md | 34 +++++++++++++++++++++--- 3 files changed, 138 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b461f17..f49c1e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,13 +4,15 @@ Draupnir is licensed under the Cooperative Software License. The reason for the license is simply because this project was something that I was previously employed to work on. -I have not decided whether I will accept contributions under the same license -or another license or a CLA yet. -I will welcome advice, but I will not welcome attempts to parsuade me to re-adopt -and relicense under Apache-2.0 unless being offered compensation. +I have not decided whether I will accept contributions under the +same license or another license or a CLA yet. +I will welcome advice, but I will not welcome attempts to parsuade +me to re-adopt and relicense under Apache-2.0 unless being offered +compensation. -The easiest way forwards would be for me to accept individual contributions under -Apache-2.0. +As of now, I am accepting contributions under the Apache-2.0 license +in the same way as Mjolnir. This allows me the option to relicense +Draupnir under Apache-2.0 without needing to chase up all contributors. ## How to contribute @@ -185,3 +187,58 @@ matrix together all the fragmented communication technologies out there we are reliant on contributions and collaboration from the community to do so. So please get involved - and we hope you have as much fun hacking on Matrix as we do! + +## Further notes on license and its relation to business in general + +Ultimately most open source software contributions start by gifting +labour without any obligation or transaction. + +There is no ethical way to directly sell this labour. + +Many so called post open source[^post-open-source] ideas fixate on +finding a way to conduct business in an ethical way, +and this is problematic. + +Once you start working within capitalism with capitalism, and exchange +your power and influence over a work to monitize the work itself, +the work will gain inertia and a power of its own that you cannot control. +You will work for the work, for external interests, and these won't +be the interests of your powerless users who you were among to begin with. + +It would be extreme, but I am tempted to suggest that by performing a +buisness this way, you are part of an effort +which not only reinforces capitalism but works to make it more +efficient. Effectively working to make capitalism more powerful. +Congratulations. + +Another point that is often brought up in these discussions is how +software licensing relies on an appeal to state power, the power of +the law. + +Therefore I propose a new licensing model, one which appeals +to the power of public pressure rather than the law. + +Such a license would be liberal, allowing incorperation into +proprietary works provided it retained a notice. +However, any work which is used in any way to conduct business must +report all software being used by the buisness with this license, +all turnover made by the buisness, all profit made by the buisness +and an estimation of both profit and turnover made by the buisness in +relation to the collection of software reported. + +It is not clear to me how often these figures should be reported +and when, or even where they should be reported to (ideally they could +be found centrally). It is also unclear how to create the legalise +required. + +With the information these licenses would provide, public pressure +could then be used to demand reperations for the profits made by +pillaging and destructive businesses. +It is not clear yet how any reperations would be distributed, +probably through some system of +[venture communes](https://wiki.p2pfoundation.net/Venture_Commune). +The idea is to ensure that the developers and users of projects +would not be distracted from providing each other mutual +support and to give them a hope of escaping. + +[^post-open-source] https://applied-langua.ge/posts/the-poverty-of-post-open-source.html. diff --git a/README.md b/README.md index edc48a4..e8cb5b6 100644 --- a/README.md +++ b/README.md @@ -5,34 +5,57 @@ for more information. > I offer you the ring, which was burned, laid upon the pyre of Baldr by Odin. -This is a hard fork of [Mjolnir](https://github.com/matrix-org/mjolnir), +This is a continuation and fork of [Mjolnir](https://github.com/matrix-org/mjolnir), with an entirely new framework for interacting with Matrix written to overcome some of the burdens there were holding development of mjolnir. ## Status -The command handler is currently being refactored and the syntax will become -incompatible with legacy Mjolnir commands. The UX will be overhauled -as such and we will consider the launch of Draupnir a 2.0.0 release. +The command handler is currently being refactored and some command syntax will become +incompatible with legacy Mjolnir commands. +The UX is being overhauled and Draupnir is slowly moving towards a 2.0.0 release. -As Draupnir heads towards `v2.0.0` releases will appear [here](https://github.com/Gnuxie/Draupnir/releases). -Until `v2.0.0` there will be frequent changes to commands. +As Draupnir heads towards `v2.0.0`, releases will appear [here](https://github.com/Gnuxie/Draupnir/releases). +Until `v2.0.0` there will be frequent changes to commands but all of these +will be noted in the changes for that release. -Migrating from Mjolnir is straightforward, and Draupnir remains backwards compatible. -So it is possible to try Draupnir and still have the option to switch back to Mjolnir. +Migrating from Mjolnir is straightforward and requires no manual steps, +migration for your setup is likely as simple as changing your server config to +pull the latest Draupnir docker image instead of a mjolnir one. +Draupnir remains backwards compatible so that it is possible to try Draupnir +and still have the option to switch back to Mjolnir. + +Any problems with migration should be reported to our [support room](https://matrix.to/#/#draupnir:matrix.org). ## Features -As an all-in-one moderation tool, it can protect your server from malicious invites, spam -messages, and whatever else you don't want. In addition to server-level protection, Draupnir -is great for communities wanting to protect their rooms without having to use their personal -accounts for moderation. +As an all-in-one moderation tool, Draupnir can protect your community by +applying policies from both your own and community curated policy lists. The bot by default includes support for bans, redactions, anti-spam, server ACLs, room -directory changes, room alias transfers, account deactivation, room shutdown, and more. +directory changes and room alias transfers. -A Synapse module is also available to apply the same rulesets the bot uses across an entire -homeserver. +Support is also provided for some Synapse admin functions such as account +deactivation and room shutdown. + +A Synapse module is also available to apply the same rulesets the bot is watching +across an entire homeserver. + +### Differences from Mjolnir + +The main difference from Mjolnir is that it is no longer necessary to use +commands for some functions. Banning a user in a protected room from your +Matrix client will cause Draupnir to show a prompt in the management room, +which will offer to add the ban to a policy list. + +If you do still wish to use the ban command, please note that users +and other entities that are being banned are now the first argument +to the ban command. It is now also possible to provide only the entity to +Draupnir and have Draupnir prompt you for the policy list and the ban reason. + +In general, any command that has been migrated to the new interface will +feature better error messages for common problems and allow admins +to trace the cause of unexpected errors much more easily. ## Setting up @@ -88,7 +111,12 @@ server can only receive requests from your reverse proxy (e.g. `localhost`). ## Development -TODO. It's a TypeScript project with a linter. +Draupnir is a TypeScript project that depends on the labour of a handful of +developers, testers and users. The code base is in relatively good shape, +and if you would like to contribute or gain an understanding of the workings +of Draupnir, please read our [context document](./docs/context.md). + +Once you have done that, go ahead and read our [contributing document](./CONTRIBUTING.md) ### Development and testing with mx-tester diff --git a/docs/context.md b/docs/context.md index 3535e7b..fcaee47 100644 --- a/docs/context.md +++ b/docs/context.md @@ -1,9 +1,9 @@ ## Context for developing Draupnir -#### And also context that is essential if you are developing anything -that uses Policy Lists. +alternatively context that is essential for developing +anything that uses Policy Lists. -### Sync loop +### The synchronisation loop In order to understand how Draupnir works you have to first understand the sync loop of Matrix Clients. All Matrix clients have a sync loop. @@ -122,6 +122,34 @@ begin synchronising policies with with the protected rooms. Draupnir starts synchronising rooms by visiting the most recently active room first. +### A history of moderation projects + +Mjolnir was originally created by +[Travis Ralston](https://github.com/turt2live) as a good enough +solution temprarily made permanent. +The abstract architecture of Mjolnir remains today and we are +thankful for good foundations, and significantly +[policies](https://spec.matrix.org/latest/client-server-api/#moderation-policy-lists) +that were +[proposed](https://github.com/matrix-org/matrix-spec-proposals/pull/2313) +by [Matthew Hodgson](https://github.com/ara4n). + +There were several other similar solutions known to us that were +developed and deployed at the same time as Mjolnir in the earlier days +and either directly or indirectly had influence on things to come. +Notably [Fly Swatter](https://github.com/serra-allgood/matrix-fly-swatter) +and [Luna](https://gitlab.com/Gnuxie/luna). + +After a period of maintenance, Mjolnir was then developed by other +contributors from Element who restructured the project, tackled +usability concerns and would go on to produce a multi-tenancy +appservice mode of deployment called "Mjolnir for all". +With the eventual aim of integrating the functions of Mjolnir +transparently with both homeservers and clients. + +This effort is now continued by the Matrix community in the form +of Draupnir and [MTRNord](https://github.com/MTRNord)'s +[Draupnir4all deployment](https://docs.draupnir.midnightthoughts.space/). [^full-state]: matrix-bot-sdk could be modified to sync with `full_state` set to true. This has been