They aren't needed as this never pushes to anywhere so who cares if we run this a bit too aggressively to maintain perfect resolution of if the build works.
Renovate failed to generate this artefact so i had to manually go and do it. Something about our monorepo setup is pissing Renovate off and making it not work.
* Add Quick Access to images comment to PRs
* Refactor Image comment workflow to use shared script pattern.
Also refactors away dead crud.
* Refine comment output and normalise names to prevent bugs.
* Fix PR comment writing not working.
* Please the linter
* Remove Sha Tag due to it going stale if any branch movement happens.
* Move all workflows to digest pinned versioning.
* Infrastructure Upgrades for Automatic Reonvate CI PRs
* Add minimum release age at 7 days for renovate CI updates
* Move to use initial manager as default
* Add Changeset Entry
* Move mangement room options up in the default config
They are more important than the other bullshit
* Improve clarity of management room options in default.yaml
---------
Co-authored-by: gnuxie <Gnuxie@protonmail.com>
Today i got reminded about that our config still thinks various wrong things like that the management room is excluded from protect all rooms when the management room is always protected.
So this PR fixes a few of these config errors.
* Update Configuration file wording.
* Add Changeset Entry
Starts us down the path of fixing https://github.com/the-draupnir-project/Draupnir/issues/1023
This PR gets us Zero Touch Provisioning support for AS mode and Bot mode. If your env can take usr and pswd and turn it into access tokens or however you want to do that then well we dont need to do PSWD Auth at all.
If you dont PSWD auth is useful for this and is probably what i will resort to in mdad for Zero Touch Provisioning.
Draft as this PR is very much not even mx-tested because mx-tester decided to say nope cat.
* Zero Touch Provisioning Support
* Update Account data keys to Gnuxie Suggested Values
Co-authored-by: Gnuxie <50846879+Gnuxie@users.noreply.github.com>
* Refine ZTD
Co-authored-by: Gnuxie <Gnuxie@users.noreply.github.com>
* Refine Config validation
* Run Prettier
* Fix Test Linting
* Refine ZTD Branch by removing leftover config values.
* Remove fallback management room value as it breaks ZTP
* Fix config validation having Truthy problems
* Fix dangling import.
* Fix config validation error.
* Revert "Fix config validation error."
This reverts commit c313dcbb52.
* Remove fake cast on config.initialManager
* note only available in develop while we fix shit
* Stop tests from accessing config.managementRoom directly.
---------
Co-authored-by: Gnuxie <50846879+Gnuxie@users.noreply.github.com>
Co-authored-by: Gnuxie <Gnuxie@users.noreply.github.com>
Co-authored-by: gnuxie <Gnuxie@protonmail.com>
* Add Avatar Command to bot mode and AS mode
* Add changesets
* Move MXC URI validation to matrix basic types
* Fix MediaID being mixed case when its exempt from usual case rules.
* Update changeset
* Integrate Gnuxie Review Feedback
* Fix linting errors
* Fix having forgotten to run prettier.
* Integrate Gnuxie review feedback.
* Fix version.txt.tmp files
* Tighten ActionException wrapping to only accept Error.
For months we had a bug where the "exception kind" enum was being
provided as the error instead of the wrapped error in bot sdk wrapper
code. This exception kind enum was optional in the factory method
being used for the MatrixException type and so this resulted in
draupnir reporting simply `undefined` when there were errors. Which
was a major issue because not only did it make it difficult to track
problems down, but it made the software look like shit. Remarkably we
were still able to remotely diagnose problems essentially blind here.
But it was caused by the ActionException accepting `unknown` for Error
in order to tolerate a number of causes. We figure that this is
unacceptable because it allows for these kinds of bugs and also that
it delays finding out where we are calling broken apis.
Closes https://github.com/the-draupnir-project/Draupnir/issues/759.
Closes https://github.com/the-draupnir-project/planning/issues/137.
* Flakey test idk.
It is a pain in the ass to write the checks but the information itself
is still valuable when refactoring. So I'd rather we still encourage
people to write this shit down even if they don't write the checks.
Closes https://github.com/the-draupnir-project/planning/issues/132
* Make Appservice register and setup basic profile information.
Basic Profile information being setting a display name if none exists.
* Add changeset information
* Relocate Profile logic to after initialisation.
* Clean up Appservice Bot Reg and Profile Set code
Co-authored-by: Gnuxie <Gnuxie@users.noreply.github.com>
* Workaround bug with ensureRegistered in matrix-appservice-bridge.
https://github.com/matrix-org/matrix-appservice-bridge/issues/525
* Clarify that this is mostly dead code
---------
Co-authored-by: Gnuxie <Gnuxie@users.noreply.github.com>
This makes it so we use caching across the CI for all our unit tests / integration tests. Supposedly mx-tester was already doing this but now we are also doing it for npm packages.
* Be more precise about licensing.
I've added a root LICENSE file describing the use of multiple licenses
in the repository, especially given that it is now monorepo.
This does not change any licensing terms or introduce new requirements
It makes the existing setup more explicit and easier to understand for
users and downstream distributors. And reflects the existing REUSE
compliant setup.
* Be more comprehensive in our description.
* Add Version command to AS mode admin room
This replicates the status command output giving version string data in a convenient format to AS Admins.
* Add Provision Limit and Force Provision Command
* Add SelfServiceProvisioning Config Flag that defaults to False
This defaults to false due to the currently known problem where Self Service Provisioning ACLs are broken.
So this config exists to allow that codepath to be disabled while we work on fixing it.
* Add Copyright Headers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Split Version Command integration test out into new file.
* Fix Self Service Provision Message
Co-authored-by: Gnuxie <50846879+Gnuxie@users.noreply.github.com>
* FIx AS.TS
* Clean up Cat's tests
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Gnuxie <50846879+Gnuxie@users.noreply.github.com>
Co-authored-by: gnuxie <Gnuxie@protonmail.com>
* Add sourcemaps to entrypoint
* Make entrypoint run Draupnir relative to the script.
This is important for running draupnir from source either directly in
the directory, from ExecStart in systemd, or from inside the docker
image.
And we're making this change so that we can have better control over
the arguments we start Draupnir with in the different environments
without having to make disruptive changes.
Co-authored-by: Bea <20361868+enbea@users.noreply.github.com>
* Add changeset for source installs.
We're gonna write up a proper change log but this is just so we don't forger.
Co-authored-by: Bea <20361868+enbea@users.noreply.github.com>
We had to move it but it has virtually no effect downstream as we
distribute the news on the filesystem too.
If something critical happens we can just put a shim on the repo in
the old spot.
Closes https://github.com/the-draupnir-project/planning/issues/111
Looks like this:
```
TypeError: Could not create Draupnir
caused by: @mjolnir:localhost:9999 doesn't have the power level required to send state events in the management room. Please make the Draupnir user an administrator
at ResultError.toExpectError (/home/user/experiments/Draupnir/node_modules/@gnuxie/typescript-result/src/Result.ts:200:12)
at ExpectError (/home/user/experiments/Draupnir/node_modules/@gnuxie/typescript-result/src/Result.ts:128:24)
at Object.expect (/home/user/experiments/Draupnir/node_modules/@gnuxie/typescript-result/src/Result.ts:137:10)
at makeBotModeToggle (/home/user/experiments/Draupnir/apps/draupnir/test/integration/mjolnirSetupUtils.ts:194:5)
at processTicksAndRejections (node:internal/process/task_queues:104:5)
at async /home/user/experiments/Draupnir/apps/draupnir/test/integration/manualLaunchScript.ts:23:18
```
Fixes https://github.com/the-draupnir-project/Draupnir/issues/1025
Closes https://github.com/the-draupnir-project/planning/issues/108
* Fix test:manual deleting the prior management room
The old behaviour of leaving any stale management
room active was intentional, to be able to inspect
failed tests and restart the bot quickly to check
changes.
* Check Draupnir can send state to the management room at startup.
Fixes https://github.com/the-draupnir-project/Draupnir/issues/1025
Part of https://github.com/the-draupnir-project/planning/issues/108
* Fix small bug in PowerLevelsMirror.
It was checking the wrong entries for regular events.
Discovered as part of https://github.com/the-draupnir-project/planning/issues/108
* Fix typos in privileged creator APIs
Fixed during https://github.com/the-draupnir-project/planning/issues/108
* Notify management room of lack of state_default permission.
* Update Dockerignore
Updates dockerignore to protect against cache contamination so we can more effectively utilise the full potential of our Cache system.
* Implement Caching strategy support in dockerfile
* Implement Caching for CI to massively speed up warm builds
* Fix Wildcard funkyness breaking docker builds.
* Fix FROM AS style guideline violations
There's a style guideline that says you shouldn't mix the case of FROM and AS in a FROM AS statement. So we fix this violation in this commit.
You can also force it all to lowercase but considering all our other keywords are uppercase why not go uppercase only for consistency.