Commit c996651
committed
refactor: make HookEventMessage a SystemMessage subclass
HookEventMessage arrives on the wire as a system-typed message
(type=system, subtype=hook_started|hook_response), matching the
established pattern for TaskStartedMessage, TaskProgressMessage,
TaskNotificationMessage, and MirrorErrorMessage. Subclassing
SystemMessage means existing isinstance(msg, SystemMessage) and
case SystemMessage() checks continue to match, and the redundant
HookEventMessage entry can be dropped from the Message union.
Also fix the docstring to reference the actual hook_response keys
(output, exit_code, outcome) instead of a nonexistent response
key, and update the test fixture to match the real wire shape.1 parent 6164908 commit c996651
2 files changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | | - | |
| 1156 | + | |
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1167 | 1171 | | |
1168 | 1172 | | |
1169 | 1173 | | |
1170 | | - | |
| 1174 | + | |
| 1175 | + | |
1171 | 1176 | | |
1172 | 1177 | | |
1173 | 1178 | | |
| |||
1176 | 1181 | | |
1177 | 1182 | | |
1178 | 1183 | | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
| 1184 | + | |
1182 | 1185 | | |
1183 | 1186 | | |
1184 | 1187 | | |
| |||
1190 | 1193 | | |
1191 | 1194 | | |
1192 | 1195 | | |
1193 | | - | |
1194 | 1196 | | |
1195 | 1197 | | |
1196 | 1198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
998 | | - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
999 | 1001 | | |
1000 | 1002 | | |
1001 | 1003 | | |
1002 | 1004 | | |
1003 | 1005 | | |
1004 | 1006 | | |
1005 | 1007 | | |
1006 | | - | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
1007 | 1018 | | |
1008 | 1019 | | |
1009 | 1020 | | |
| |||
0 commit comments