Fix model and tool normalization regressions

Summary:
- Fix model and tool normalization regressions, including explicit tool-policy grants for messaging profile warnings.
- Keep Codex and Microsoft Foundry auth handling compatible with aws-sdk auth profile modes after rebasing onto current main.

Verification:
- pnpm test src/agents/pi-tools.policy.test.ts
- pnpm tsgo:extensions
- pnpm tsgo:extensions:test
- pnpm test extensions/codex/src/app-server/auth-bridge.test.ts extensions/microsoft-foundry/index.test.ts
- pnpm test:extensions:package-boundary
- pnpm lint --threads=8
- git diff --check
- GitHub PR checks green on 4ad136106b
This commit is contained in:
Val Alexander
2026-05-07 02:29:28 -05:00
committed by GitHub
parent d4e04f33a6
commit 62ccd8b644
21 changed files with 362 additions and 25 deletions

View File

@@ -401,6 +401,36 @@ describe("executeNodeHostCommand", () => {
);
});
it("rejects disconnected node targets before invoking system.run", async () => {
listNodesMock.mockResolvedValueOnce([
{
nodeId: "node-1",
commands: ["system.run", "system.run.prepare"],
connected: false,
platform: process.platform,
},
]);
await expect(
executeNodeHostCommand({
command: "git log --oneline -5",
workdir: "/tmp/work",
env: {},
security: "allowlist",
ask: "off",
requestedNode: "node-1",
defaultTimeoutSec: 30,
approvalRunningNoticeMs: 0,
warnings: [],
agentId: "requested-agent",
sessionKey: "requested-session",
}),
).rejects.toThrow(
"exec host=node requires a connected node (node-1 is currently disconnected)",
);
expect(callGatewayToolMock).not.toHaveBeenCalled();
});
it("returns a non-empty placeholder for silent node exec results", async () => {
callGatewayToolMock.mockImplementationOnce(
async (method: string, _options: unknown, params: MockNodeInvokeParams | undefined) => {