diff --git a/src/agents/anthropic-vertex-stream.ts b/src/agents/anthropic-vertex-stream.ts index ecb6f60d774..c0d6e1d8e2e 100644 --- a/src/agents/anthropic-vertex-stream.ts +++ b/src/agents/anthropic-vertex-stream.ts @@ -1,10 +1,10 @@ +import type { StreamFn } from "@openclaw/llm-core"; /** * Anthropic Vertex stream facade. * Keeps Vertex-specific provider implementation in the bundled provider plugin * while core imports a small stable factory. */ import { loadBundledPluginPublicSurfaceModuleSync } from "../plugin-sdk/facade-runtime.js"; -import type { StreamFn } from "./runtime/index.js"; type AnthropicVertexStreamFacade = { createAnthropicVertexStreamFn: ( diff --git a/src/agents/custom-api-registry.ts b/src/agents/custom-api-registry.ts index e0ad35cb65e..1d4c5fe588d 100644 --- a/src/agents/custom-api-registry.ts +++ b/src/agents/custom-api-registry.ts @@ -2,6 +2,7 @@ * Registers caller-supplied custom API stream functions with the LLM registry. */ import type { ApiRegistry } from "@openclaw/ai"; +import type { StreamFn } from "@openclaw/llm-core"; import type { Api, AssistantMessageEventStreamContract, @@ -9,7 +10,6 @@ import type { StreamOptions, } from "../llm/types.js"; import { createAssistantMessageEventStream } from "../llm/utils/event-stream.js"; -import type { StreamFn } from "./runtime/index.js"; import { buildStreamErrorAssistantMessage } from "./stream-message-shared.js"; const CUSTOM_API_SOURCE_PREFIX = "openclaw-custom-api:"; diff --git a/src/agents/google-simple-completion-stream.ts b/src/agents/google-simple-completion-stream.ts index 54f8548a088..9bbabf5b72b 100644 --- a/src/agents/google-simple-completion-stream.ts +++ b/src/agents/google-simple-completion-stream.ts @@ -6,6 +6,7 @@ import type { ApiRegistry } from "@openclaw/ai"; * backend but sanitizes unsupported thinking payload options for simple models. */ import { clampThinkingLevel } from "@openclaw/ai/internal/runtime"; +import type { StreamFn } from "@openclaw/llm-core"; import { sanitizeGoogleThinkingPayload, type GoogleThinkingInputLevel, @@ -13,7 +14,6 @@ import { import { streamWithPayloadPatch } from "../llm/providers/stream-wrappers/stream-payload-utils.js"; import type { Api, Model, ModelThinkingLevel } from "../llm/types.js"; import { ensureCustomApiRegistered } from "./custom-api-registry.js"; -import type { StreamFn } from "./runtime/index.js"; /** Custom API id for the Google simple-completion stream adapter. */ const GOOGLE_SIMPLE_COMPLETION_API: Api = "openclaw-google-generative-ai-simple"; diff --git a/src/agents/session-transcript-repair.ts b/src/agents/session-transcript-repair.ts index 470c38caa11..80291918190 100644 --- a/src/agents/session-transcript-repair.ts +++ b/src/agents/session-transcript-repair.ts @@ -1,3 +1,4 @@ +import type { AgentMessage } from "@openclaw/agent-core"; /** * Transcript repair helpers for tool-call replay. * @@ -9,7 +10,6 @@ import { normalizeOptionalString, readStringValue, } from "@openclaw/normalization-core/string-coerce"; -import type { AgentMessage } from "./runtime/index.js"; import { isThinkingLikeBlock } from "./thinking-block.js"; import { extractToolCallsFromAssistant, diff --git a/src/agents/tool-call-id.ts b/src/agents/tool-call-id.ts index 29049fc2360..651b99fe3aa 100644 --- a/src/agents/tool-call-id.ts +++ b/src/agents/tool-call-id.ts @@ -1,10 +1,10 @@ +import type { AgentMessage } from "@openclaw/agent-core"; /** * Tool call id normalization and extraction helpers. * * Keeps provider-specific id formats replay-safe while preserving allowed native ids. */ import { sha256HexPrefix } from "../infra/crypto-digest.js"; -import type { AgentMessage } from "./runtime/index.js"; import { isThinkingLikeBlock } from "./thinking-block.js"; import { isAllowedToolCallName, normalizeAllowedToolNames } from "./tool-call-shared.js"; diff --git a/src/llm/providers/stream-wrappers/stream-payload-utils.ts b/src/llm/providers/stream-wrappers/stream-payload-utils.ts index 900f6401430..1004a701a09 100644 --- a/src/llm/providers/stream-wrappers/stream-payload-utils.ts +++ b/src/llm/providers/stream-wrappers/stream-payload-utils.ts @@ -1,5 +1,5 @@ // Stream payload utilities normalize provider stream payload fields for wrappers. -import type { StreamFn } from "../../../agents/runtime/index.js"; +import type { StreamFn } from "@openclaw/llm-core"; /** Wraps a stream function and lets callers mutate outgoing provider payload objects. */ export function streamWithPayloadPatch( diff --git a/test/scripts/check-openclaw-package-tarball.test.ts b/test/scripts/check-openclaw-package-tarball.test.ts index 9b98d7448f6..c08c9c1a73a 100644 --- a/test/scripts/check-openclaw-package-tarball.test.ts +++ b/test/scripts/check-openclaw-package-tarball.test.ts @@ -25,6 +25,7 @@ const AI_RUNTIME_PACKAGE_JSON = JSON.stringify({ exports: { ".": { import: "./dist/index.mjs" }, "./providers": { import: "./dist/providers.mjs" }, + "./transports": { import: "./dist/transports.mjs" }, "./internal/*": { import: "./dist/internal/*.mjs" }, }, }); @@ -650,6 +651,7 @@ describe("check-openclaw-package-tarball", () => { "node_modules/@openclaw/ai/package.json": AI_RUNTIME_PACKAGE_JSON, "node_modules/@openclaw/ai/dist/index.mjs": "export {};\n", "node_modules/@openclaw/ai/dist/providers.mjs": "export {};\n", + "node_modules/@openclaw/ai/dist/transports.mjs": "export {};\n", "node_modules/@openclaw/ai/dist/internal/runtime.mjs": "export {};\n", }, (tarball) => { @@ -679,6 +681,7 @@ describe("check-openclaw-package-tarball", () => { "dist/index.js": "export {};\n", "node_modules/@openclaw/ai/package.json": AI_RUNTIME_PACKAGE_JSON, "node_modules/@openclaw/ai/dist/index.mjs": "export {};\n", + "node_modules/@openclaw/ai/dist/transports.mjs": "export {};\n", "node_modules/@openclaw/ai/dist/internal/runtime.mjs": "export {};\n", }, (tarball) => { @@ -719,6 +722,7 @@ describe("check-openclaw-package-tarball", () => { }), "node_modules/@openclaw/ai/dist/index.mjs": "export {};\n", "node_modules/@openclaw/ai/dist/providers.mjs": "export {};\n", + "node_modules/@openclaw/ai/dist/transports.mjs": "export {};\n", "node_modules/@openclaw/ai/dist/internal/runtime.mjs": "export {};\n", }, (tarball) => {