diff --git a/libs/middleware/package.json b/libs/middleware/package.json index b48e1819..04495b7c 100644 --- a/libs/middleware/package.json +++ b/libs/middleware/package.json @@ -1,6 +1,6 @@ { "name": "@threadplane/middleware", - "version": "0.0.1", + "version": "0.0.2", "description": "Backend middleware for the Threadplane client-tools capability. The /langgraph entrypoint targets LangGraph.js.", "keywords": ["langgraph", "agent", "client-tools", "middleware", "threadplane"], "license": "MIT", diff --git a/libs/middleware/src/langgraph/channel.ts b/libs/middleware/src/langgraph/channel.ts index 37168fc5..6b14dd71 100644 --- a/libs/middleware/src/langgraph/channel.ts +++ b/libs/middleware/src/langgraph/channel.ts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT import { Annotation } from '@langchain/langgraph'; -import type { ClientToolSpec } from './types'; +import type { ClientToolSpec } from './types.js'; /** * State channels for the client-tools catalog. Spread into Annotation.Root so a graph diff --git a/libs/middleware/src/langgraph/index.ts b/libs/middleware/src/langgraph/index.ts index f4a5e38e..42ec31b0 100644 --- a/libs/middleware/src/langgraph/index.ts +++ b/libs/middleware/src/langgraph/index.ts @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -export type { ClientToolSpec, ClientToolsState, OpenAIFunctionTool, BaseMessage } from './types'; +export type { ClientToolSpec, ClientToolsState, OpenAIFunctionTool, BaseMessage } from './types.js'; export { clientToolSpecs, clientToolNames, @@ -9,6 +9,6 @@ export { bindClientTools, routeAfterAgent, type BindableModel, -} from './middleware'; -export { clientToolsChannel } from './channel'; -export { clientToolsRouter } from './router'; +} from './middleware.js'; +export { clientToolsChannel } from './channel.js'; +export { clientToolsRouter } from './router.js'; diff --git a/libs/middleware/src/langgraph/middleware.ts b/libs/middleware/src/langgraph/middleware.ts index eaa68f04..fd105e15 100644 --- a/libs/middleware/src/langgraph/middleware.ts +++ b/libs/middleware/src/langgraph/middleware.ts @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -import type { ClientToolSpec, ClientToolsState, OpenAIFunctionTool } from './types'; +import type { ClientToolSpec, ClientToolsState, OpenAIFunctionTool } from './types.js'; /** Read the catalog from state.tools, falling back to state.client_tools; drop nameless. */ function catalog(state: ClientToolsState): ClientToolSpec[] { @@ -20,7 +20,7 @@ export function clientToolNames(state: ClientToolsState): Set { return new Set(catalog(state).map((t) => t.name)); } -import type { BaseMessage } from './types'; +import type { BaseMessage } from './types.js'; interface ToolCallLike { name?: string; diff --git a/libs/middleware/src/langgraph/router.ts b/libs/middleware/src/langgraph/router.ts index 6d6dab7a..a43e636c 100644 --- a/libs/middleware/src/langgraph/router.ts +++ b/libs/middleware/src/langgraph/router.ts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -import { routeAfterAgent } from './middleware'; -import type { ClientToolsState } from './types'; +import { routeAfterAgent } from './middleware.js'; +import type { ClientToolsState } from './types.js'; /** * A prebuilt conditional-edge callback. serverToolNames is bound once at construction;