Commit 60b1971
committed
Rework command framework
Replace the per-backend, string-formatted command system with a typed,
backend-agnostic command framework built on chatom's FormattedMessage
rendering.
- New command framework: declarative `Command`/`CommandModel`, a
`CommandContext`, a command executor, and a `LegacyCommandAdapter` so
existing `BaseCommand` subclasses keep working.
- Load commands via entrypoints and enforce per-backend compatibility.
- Migrate commands to concrete chatom types and render built-in command
output through `FormattedMessage`/`convert_format` instead of
hand-crafted per-backend strings.
- Add agent commands, a persistence layer for scheduled/deferred
commands, and supporting tests.
- Require `chatom>=0.1.3`, which provides the format APIs
(`convert_format`, `FormattedMessage`, tables) this framework uses.
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>1 parent 62d72c1 commit 60b1971
23 files changed
Lines changed: 3979 additions & 165 deletions
File tree
- csp_bot
- commands
- gateway
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
57 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
58 | 72 | | |
59 | 73 | | |
60 | 74 | | |
| |||
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
76 | 97 | | |
77 | 98 | | |
78 | 99 | | |
| |||
0 commit comments