Commit Graph

16 Commits

Author SHA1 Message Date
gnuxie 7d29d68aa2 Add name to CommandTable 2023-03-07 19:59:08 +00:00
gnuxie 7d3f222f2b Add destructuring of command tables for imported tables 2023-03-07 19:59:08 +00:00
gnuxie 3f70aa60d0 Migrate Synapse admin commands to a dedicated table.
Still neeed to do alias commands. I think that requires a dedicated
alias and resolved room type and room reference is some kind of union type
that can resolve to a concrete room id.
2023-03-07 19:59:08 +00:00
gnuxie 18b1adbcc4 Allow for commands to be imported from other tables. 2023-03-07 19:59:08 +00:00
gnuxie ddba23f323 Interning a sub-command would overwrite the parent command. 2023-02-11 14:20:46 +00:00
gnuxie 1257b26306 Rename Parmater Parameter
Yeah don't ask.
2023-02-08 13:10:49 +00:00
Gnuxie c936332442 Ban/Unban rework + Prompts for missing arguments (#12)
* basic ban conversion, but i have better ideas

* Still very WIP on CLIM prompt-for-accept semantics.

* Introduce promotable streams.

This allows parameters to specify details to prompt for missing
arguments
and allow for interactive commands.

* Changes that were made before PolicyListManager that no longer make sense

We don't want the default list anymore since we're just going to prompt
with the lists that they can choose from.

* Fix semantics of TagDynamicEnvironment.

Bind and write were wrong and bind was binding to the node name
instead of the variable name.

* The JSX factory can render presentation types to DocumentNodes, unsure if this is the right
move yet but it works

* Attributes for anchor nodes now render properly

* Ban command prompts are working!!!!

* Stub AppserviceBotEmitter.

There isn't much we can do right now until there is time to work on
https://github.com/Gnuxie/Draupnir/issues/13.

* Combine ban/unban syntax.

* Remove old UnbanBanCommands.

WARNING: There is a major difference in that the ban command no longer supports
globs, I don't think?

* Activate new unban command.

* The presentation type boolean will have to be just a string for now.

I don't think it makes sense to read them into actual booleans.

* configurable defaults for ban reason.
2023-02-08 12:50:23 +00:00
gnuxie fda74c1aad Keyword argument (aka options/flags) support. 2023-01-19 17:56:48 +00:00
gnuxie 9efdb241ad Allow command tables to be named with symbols to ease testing. 2023-01-19 17:56:48 +00:00
gnuxie b9767532a8 help for commands.
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
2023-01-14 18:33:06 +00:00
gnuxie e6d0aaf9ea Richer paramater parsing.
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
2023-01-14 18:33:06 +00:00
gnuxie 66907a571e lint
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
2023-01-14 18:33:06 +00:00
gnuxie beb9152b10 New command system working in appservice
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
2023-01-14 18:33:06 +00:00
gnuxie dd21b48714 ValidationResult -> CommandResult
we need it for more than validation
probably considering getting rid of the error code thing
or making it optional idk.

This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
2023-01-14 18:33:06 +00:00
gnuxie 6e6a3fdada MatrixInterfaceAdaptor
This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
2023-01-14 18:33:06 +00:00
gnuxie b36376753d introduce InterfaceCommand.
We've basically made an embedded mini language for commands.

The idea is that there are a sequence of strings at the start
of a command that are pattern matched against a table.
Then eventually we will also pattern match against the presentation
types that they each accept.

This commit is NOT contributed under the Apache-2.0 License.
Copyright (C) 2022 Gnuxie <Gnuxie@protonmail.com>
All rights reserved.
2023-01-14 18:33:06 +00:00