Fix current CI drift on Cortex and plugin runtime barrels
This commit is contained in:
parent
7c4cf4952b
commit
64b40ccf76
@ -102,9 +102,10 @@ describe("cortex bridge", () => {
|
||||
});
|
||||
|
||||
it("fails preview when graph is missing", async () => {
|
||||
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-cortex-preview-missing-"));
|
||||
runExec.mockResolvedValueOnce({ stdout: "", stderr: "" });
|
||||
|
||||
await expect(previewCortexContext({ workspaceDir: "/tmp/workspace" })).rejects.toThrow(
|
||||
await expect(previewCortexContext({ workspaceDir: tmpDir })).rejects.toThrow(
|
||||
"Cortex graph not found",
|
||||
);
|
||||
});
|
||||
@ -240,17 +241,31 @@ describe("cortex bridge", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("fails ingest when the Cortex graph is missing", async () => {
|
||||
runExec.mockResolvedValueOnce({ stdout: "", stderr: "" });
|
||||
it("initializes the Cortex graph on first ingest when it is missing", async () => {
|
||||
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-cortex-first-ingest-"));
|
||||
const graphPath = path.join(tmpDir, ".cortex", "context.json");
|
||||
runExec
|
||||
.mockResolvedValueOnce({ stdout: "", stderr: "" })
|
||||
.mockResolvedValueOnce({ stdout: "", stderr: "" });
|
||||
|
||||
await expect(
|
||||
ingestCortexMemoryFromText({
|
||||
workspaceDir: "/tmp/workspace",
|
||||
event: {
|
||||
actor: "user",
|
||||
text: "I prefer concise answers.",
|
||||
},
|
||||
}),
|
||||
).rejects.toThrow("Cortex graph not found");
|
||||
const result = await ingestCortexMemoryFromText({
|
||||
workspaceDir: tmpDir,
|
||||
event: {
|
||||
actor: "user",
|
||||
text: "I prefer concise answers.",
|
||||
},
|
||||
});
|
||||
|
||||
await expect(fs.readFile(graphPath, "utf8")).resolves.toContain('"nodes"');
|
||||
expect(result).toEqual({
|
||||
workspaceDir: tmpDir,
|
||||
graphPath,
|
||||
stored: true,
|
||||
});
|
||||
expect(runExec).toHaveBeenLastCalledWith(
|
||||
"cortex",
|
||||
expect.arrayContaining(["extract", "-o", graphPath, "--merge", graphPath]),
|
||||
expect.any(Object),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,162 +1 @@
|
||||
[
|
||||
{
|
||||
"file": "extensions/acpx/runtime-api.ts",
|
||||
"line": 1,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/acpx.js",
|
||||
"resolvedPath": "src/plugin-sdk/acpx.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/feishu/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/feishu.js",
|
||||
"resolvedPath": "src/plugin-sdk/feishu.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/google/runtime-api.ts",
|
||||
"line": 1,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/google.js",
|
||||
"resolvedPath": "src/plugin-sdk/google.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/googlechat/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/googlechat.js",
|
||||
"resolvedPath": "src/plugin-sdk/googlechat.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/irc/src/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../../src/plugin-sdk/irc.js",
|
||||
"resolvedPath": "src/plugin-sdk/irc.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/line/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/line.js",
|
||||
"resolvedPath": "src/plugin-sdk/line.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/line/runtime-api.ts",
|
||||
"line": 5,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/line-core.js",
|
||||
"resolvedPath": "src/plugin-sdk/line-core.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/line/runtime-api.ts",
|
||||
"line": 12,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/line-core.js",
|
||||
"resolvedPath": "src/plugin-sdk/line-core.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/lobster/runtime-api.ts",
|
||||
"line": 1,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/lobster.js",
|
||||
"resolvedPath": "src/plugin-sdk/lobster.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/mattermost/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/mattermost.js",
|
||||
"resolvedPath": "src/plugin-sdk/mattermost.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/msteams/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/msteams.js",
|
||||
"resolvedPath": "src/plugin-sdk/msteams.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/nextcloud-talk/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/nextcloud-talk.js",
|
||||
"resolvedPath": "src/plugin-sdk/nextcloud-talk.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/nostr/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/nostr.js",
|
||||
"resolvedPath": "src/plugin-sdk/nostr.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/signal/src/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../../src/plugin-sdk/signal.js",
|
||||
"resolvedPath": "src/plugin-sdk/signal.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/tlon/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/tlon.js",
|
||||
"resolvedPath": "src/plugin-sdk/tlon.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/twitch/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/twitch.js",
|
||||
"resolvedPath": "src/plugin-sdk/twitch.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/voice-call/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/voice-call.js",
|
||||
"resolvedPath": "src/plugin-sdk/voice-call.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/zai/runtime-api.ts",
|
||||
"line": 1,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/zai.js",
|
||||
"resolvedPath": "src/plugin-sdk/zai.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/zalo/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/zalo.js",
|
||||
"resolvedPath": "src/plugin-sdk/zalo.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
},
|
||||
{
|
||||
"file": "extensions/zalouser/runtime-api.ts",
|
||||
"line": 4,
|
||||
"kind": "export",
|
||||
"specifier": "../../src/plugin-sdk/zalouser.js",
|
||||
"resolvedPath": "src/plugin-sdk/zalouser.js",
|
||||
"reason": "re-exports plugin-sdk via relative path; use openclaw/plugin-sdk/<subpath>"
|
||||
}
|
||||
]
|
||||
[]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user