mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-28 14:37:13 +00:00
Rename remaining Pi-shaped agent surfaces to OpenClaw agent runtime names, delete obsolete Pi docs and package graph checks, and add the third-party notice for incorporated code.
19 lines
877 B
TypeScript
19 lines
877 B
TypeScript
import path from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
import { normalizePluginSdkApiDeclarationText } from "./api-baseline.js";
|
|
|
|
describe("Plugin SDK API baseline", () => {
|
|
it("normalizes declaration import paths to repo-relative paths", () => {
|
|
const repoRoot = process.cwd();
|
|
const modelCatalogPath = path.join(repoRoot, "src", "agents", "agent-model-discovery");
|
|
const declaration = `export function setModelCatalogImportForTest(loader?: (() => Promise<typeof import("${modelCatalogPath}", { with: { "resolution-mode": "import" } })>) | undefined): void;`;
|
|
|
|
const normalized = normalizePluginSdkApiDeclarationText(repoRoot, declaration);
|
|
|
|
expect(normalized).not.toContain(repoRoot);
|
|
expect(normalized).toContain(
|
|
'import("src/agents/agent-model-discovery", { with: { "resolution-mode": "import" } })',
|
|
);
|
|
});
|
|
});
|