Skip to content

Commit 37bde69

Browse files
committed
fix(cycles): bypass media runtime sdk barrel
1 parent 747b26e commit 37bde69

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/agents/pi-embedded-runner/run/params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { ExecElevatedDefaults, ExecToolDefaults } from "../../bash-tools.ex
1010
import type { AgentStreamParams, ClientToolDefinition } from "../../command/shared-types.js";
1111
import type { AgentInternalEvent } from "../../internal-events.js";
1212
import type { BlockReplyPayload } from "../../pi-embedded-payloads.js";
13-
import type { BlockReplyChunking, ToolResultFormat } from "../../pi-embedded-subscribe.js";
13+
import type { BlockReplyChunking, ToolResultFormat } from "../../pi-embedded-subscribe.types.js";
1414
import type { SkillSnapshot } from "../../skills.js";
1515
export type { ClientToolDefinition } from "../../command/shared-types.js";
1616

src/agents/pi-embedded-runner/run/payloads.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
isRawApiErrorPayload,
1919
normalizeTextForComparison,
2020
} from "../../pi-embedded-helpers.js";
21-
import type { ToolResultFormat } from "../../pi-embedded-subscribe.js";
21+
import type { ToolResultFormat } from "../../pi-embedded-subscribe.types.js";
2222
import {
2323
extractAssistantText,
2424
extractAssistantThinking,

src/media-understanding/runtime.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ const mocks = vi.hoisted(() => {
1515
};
1616
});
1717

18-
vi.mock("../plugin-sdk/media-runtime.js", () => ({
18+
vi.mock("./runner.js", () => ({
1919
buildProviderRegistry: mocks.buildProviderRegistry,
2020
createMediaAttachmentCache: mocks.createMediaAttachmentCache,
2121
normalizeMediaAttachments: mocks.normalizeMediaAttachments,
22-
normalizeMediaProviderId: mocks.normalizeMediaProviderId,
2322
runCapability: mocks.runCapability,
2423
}));
2524

25+
vi.mock("./provider-registry.js", () => ({
26+
normalizeMediaProviderId: mocks.normalizeMediaProviderId,
27+
}));
28+
2629
describe("media-understanding runtime", () => {
2730
afterEach(() => {
2831
mocks.buildProviderRegistry.mockReset();

src/media-understanding/runtime.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import fs from "node:fs/promises";
22
import path from "node:path";
33
import type { OpenClawConfig } from "../config/types.js";
4+
import { normalizeMediaProviderId } from "./provider-registry.js";
45
import {
56
buildProviderRegistry,
67
createMediaAttachmentCache,
78
normalizeMediaAttachments,
8-
normalizeMediaProviderId,
99
runCapability,
1010
type ActiveMediaModel,
11-
} from "../plugin-sdk/media-runtime.js";
11+
} from "./runner.js";
1212

1313
type MediaUnderstandingCapability = "image" | "audio" | "video";
1414
type MediaUnderstandingOutput = Awaited<ReturnType<typeof runCapability>>["outputs"][number];

0 commit comments

Comments
 (0)