feat(core,cli): enforce mandatory MessageBus injection (Phase 3 Hard Migration) (#15776)

This commit is contained in:
Abhi
2026-01-04 17:11:43 -05:00
committed by GitHub
parent 90be9c3587
commit 12c7c9cc42
57 changed files with 442 additions and 278 deletions

View File

@@ -57,7 +57,7 @@ export class ShellToolInvocation extends BaseToolInvocation<
constructor(
private readonly config: Config,
params: ShellToolParams,
messageBus?: MessageBus,
messageBus: MessageBus,
_toolName?: string,
_toolDisplayName?: string,
) {
@@ -420,7 +420,7 @@ export class ShellTool extends BaseDeclarativeTool<
constructor(
private readonly config: Config,
messageBus?: MessageBus,
messageBus: MessageBus,
) {
void initializeShellParsers().catch(() => {
// Errors are surfaced when parsing commands.
@@ -450,9 +450,9 @@ export class ShellTool extends BaseDeclarativeTool<
},
required: ['command'],
},
messageBus,
false, // output is not markdown
true, // output can be updated
messageBus,
);
}
@@ -478,14 +478,14 @@ export class ShellTool extends BaseDeclarativeTool<
protected createInvocation(
params: ShellToolParams,
messageBus?: MessageBus,
messageBus: MessageBus,
_toolName?: string,
_toolDisplayName?: string,
): ToolInvocation<ShellToolParams, ToolResult> {
return new ShellToolInvocation(
this.config,
params,
messageBus ?? this.messageBus,
messageBus,
_toolName,
_toolDisplayName,
);