fix: restore @composio/core references — third-party SDK, not our scope
This commit is contained in:
parent
4f2616674f
commit
2c862f3f29
|
|
@ -1,8 +1,8 @@
|
|||
/**
|
||||
* Minimal type declarations for @aoagents/core (optional peer dependency).
|
||||
* Minimal type declarations for @composio/core (optional peer dependency).
|
||||
* Only the subset used by the Composio transport is declared here.
|
||||
*/
|
||||
declare module "@aoagents/core" {
|
||||
declare module "@composio/core" {
|
||||
interface ComposioExecuteResult {
|
||||
data?: Record<string, unknown>;
|
||||
error?: string;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import type {
|
|||
CreateIssueInput,
|
||||
ProjectConfig,
|
||||
} from "@aoagents/ao-core";
|
||||
import type { Composio } from "@aoagents/core";
|
||||
import type { Composio } from "@composio/core";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Transport abstraction
|
||||
|
|
@ -137,7 +137,7 @@ function createComposioTransport(apiKey: string, entityId: string): GraphQLTrans
|
|||
if (!clientPromise) {
|
||||
clientPromise = (async () => {
|
||||
try {
|
||||
const { Composio } = await import("@aoagents/core");
|
||||
const { Composio } = await import("@composio/core");
|
||||
const client = new Composio({ apiKey });
|
||||
return client.tools;
|
||||
} catch (err: unknown) {
|
||||
|
|
@ -148,8 +148,8 @@ function createComposioTransport(apiKey: string, entityId: string): GraphQLTrans
|
|||
msg.includes("ERR_MODULE_NOT_FOUND")
|
||||
) {
|
||||
throw new Error(
|
||||
"Composio SDK (@aoagents/core) is not installed. " +
|
||||
"Install it with: pnpm add @aoagents/core",
|
||||
"Composio SDK (@composio/core) is not installed. " +
|
||||
"Install it with: pnpm add @composio/core",
|
||||
{ cause: err },
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Mock @aoagents/core
|
||||
// Mock @composio/core
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const { mockExecute, MockComposio } = vi.hoisted(() => {
|
||||
|
|
@ -12,7 +12,7 @@ const { mockExecute, MockComposio } = vi.hoisted(() => {
|
|||
return { mockExecute, MockComposio };
|
||||
});
|
||||
|
||||
vi.mock("@aoagents/core", () => ({
|
||||
vi.mock("@composio/core", () => ({
|
||||
Composio: MockComposio,
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue