Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,7 @@ jobs:
# Published-only CI restores the required non-eliza submodules explicitly.
submodules: false

- name: Initialize Windows-safe workspace submodules
if: ${{ matrix.os == 'windows-latest' }}
shell: bash
run: git submodule update --init --depth 1 plugins/plugin-agent-orchestrator

- name: Initialize tracked workspace submodules
if: ${{ matrix.os != 'windows-latest' }}
run: node scripts/init-submodules.mjs

- name: Setup Node.js
Expand Down Expand Up @@ -244,13 +238,7 @@ jobs:
# Published-only CI restores the required non-eliza submodules explicitly.
submodules: false

- name: Initialize Windows-safe workspace submodules
if: ${{ matrix.os == 'windows-latest' }}
shell: bash
run: git submodule update --init --depth 1 plugins/plugin-agent-orchestrator

- name: Initialize tracked workspace submodules
if: ${{ matrix.os != 'windows-latest' }}
run: node scripts/init-submodules.mjs

- name: Setup Node.js
Expand All @@ -266,7 +254,8 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
# pinned on Windows: Bun 1.3.11 reports false frozen-lockfile drift on root installs
bun-version: ${{ matrix.os == 'windows-latest' && '1.3.9' || env.BUN_VERSION }}

- name: Cache Bun install
uses: actions/cache@v4
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/windows-desktop-preload-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ jobs:
preload-smoke:
name: desktop preload preflight (windows)
runs-on: windows-latest
env:
MILADY_SKIP_LOCAL_UPSTREAMS: "1"
steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: Initialize Windows-safe workspace submodules
shell: bash
run: git submodule update --init --depth 1 plugins/plugin-agent-orchestrator
- name: Initialize tracked workspace submodules
run: node scripts/init-submodules.mjs

- name: Enable long paths (Windows)
run: git config --global core.longpaths true
Expand All @@ -38,7 +39,8 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.11"
# pinned: Bun 1.3.11 reports false frozen-lockfile drift on Windows root installs
bun-version: "1.3.9"

- name: Disable repo-local eliza workspace
run: node scripts/disable-local-eliza-workspace.mjs
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/windows-dev-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
dev-smoke:
name: Windows smoke (${{ matrix.bun-version }})
runs-on: windows-latest
env:
MILADY_SKIP_LOCAL_UPSTREAMS: "1"
strategy:
fail-fast: false
matrix:
Expand All @@ -26,9 +28,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Initialize Windows-safe workspace submodules
shell: bash
run: git submodule update --init --depth 1 plugins/plugin-agent-orchestrator
- name: Initialize tracked workspace submodules
run: node scripts/init-submodules.mjs

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
152 changes: 23 additions & 129 deletions bun.lock

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions packages/agent/src/external-modules.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
declare module "@elizaos/plugin-coding-agent";
declare module "@elizaos/plugin-agent-orchestrator";
declare module "@elizaos/plugin-agent-skills";
declare module "@elizaos/plugin-anthropic";
declare module "@elizaos/plugin-elizacloud";
declare module "@elizaos/plugin-cron";
declare module "@elizaos/plugin-edge-tts";
declare module "@elizaos/plugin-edge-tts/node";
declare module "@elizaos/plugin-experience";
declare module "@elizaos/plugin-local-embedding";
declare module "@elizaos/plugin-ollama";
declare module "@elizaos/plugin-openai";
declare module "@elizaos/plugin-pi-ai";
declare module "@elizaos/plugin-personality";
declare module "@elizaos/plugin-plugin-manager";
declare module "@elizaos/plugin-commands";
declare module "@elizaos/plugin-secrets-manager";
declare module "@elizaos/plugin-shell";
declare module "@elizaos/plugin-sql";
declare module "@elizaos/plugin-trust";
declare module "@elizaos/signal-native";
declare module "qrcode";

Expand Down
15 changes: 12 additions & 3 deletions packages/app-core/src/api/__tests__/discord-managed-oauth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ describe("managed Discord OAuth init", () => {
new Response(
JSON.stringify({
success: true,
data: { authorizeUrl: "https://discord.com/oauth", applicationId: "app-1" },
data: {
authorizeUrl: "https://discord.com/oauth",
applicationId: "app-1",
},
}),
{ status: 200, headers: { "Content-Type": "application/json" } },
),
Expand All @@ -191,7 +194,10 @@ describe("managed Discord OAuth init", () => {
botNickname: "Chen",
});

const [, init] = fetchMock.mock.calls[0] as [RequestInfo | URL, RequestInit];
const [, init] = fetchMock.mock.calls[0] as [
RequestInfo | URL,
RequestInit,
];
expect(init?.method).toBe("POST");

const body = JSON.parse(init?.body as string);
Expand All @@ -207,7 +213,10 @@ describe("managed Discord OAuth init", () => {

await client.createCloudCompatAgentManagedDiscordOauth("agent-1");

const [, init] = fetchMock.mock.calls[0] as [RequestInfo | URL, RequestInit];
const [, init] = fetchMock.mock.calls[0] as [
RequestInfo | URL,
RequestInit,
];
const body = JSON.parse(init?.body as string);
expect(body).toEqual({});
});
Expand Down
32 changes: 17 additions & 15 deletions packages/app-core/src/api/apps-hyperscape-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,26 +205,26 @@ function clonePluginInfo(plugin: RegistryPluginInfo): RegistryPluginInfo {
function createMockPluginManager(
plugins: RegistryPluginInfo[] = [HYPERSCAPE_LOCAL_PLUGIN],
): PluginManagerLike {
const pluginEntries = plugins.map((plugin) => [
plugin.name,
clonePluginInfo(plugin),
] as const);
const pluginEntries = plugins.map(
(plugin) => [plugin.name, clonePluginInfo(plugin)] as const,
);
const pluginMap = new Map(pluginEntries);

return {
refreshRegistry: vi.fn(
async () =>
new Map(
pluginEntries.map(([name, plugin]) => [name, clonePluginInfo(plugin)]),
pluginEntries.map(([name, plugin]) => [
name,
clonePluginInfo(plugin),
]),
),
),
listInstalledPlugins: vi.fn(async () => []),
getRegistryPlugin: vi.fn(
async (name: string) => {
const plugin = pluginMap.get(name);
return plugin ? clonePluginInfo(plugin) : null;
},
),
getRegistryPlugin: vi.fn(async (name: string) => {
const plugin = pluginMap.get(name);
return plugin ? clonePluginInfo(plugin) : null;
}),
searchRegistry: vi.fn(async (query: string) => {
const lowerQuery = query.toLowerCase();
return plugins
Expand Down Expand Up @@ -331,9 +331,9 @@ describeIf(hasLocalHyperscapePlugin)("Hyperscape E2E Integration", () => {
const results = await appManager.search(pluginManager, "rpg");

expect(results.length).toBeGreaterThan(0);
expect(results.some((r) => r.name === "@hyperscape/plugin-hyperscape")).toBe(
true,
);
expect(
results.some((r) => r.name === "@hyperscape/plugin-hyperscape"),
).toBe(true);
});
});

Expand Down Expand Up @@ -477,7 +477,9 @@ describeIf(hasLocalHyperscapePlugin)("Hyperscape E2E Integration", () => {
test("complete discovery to launch flow", async () => {
// Step 1: List apps
const apps = await appManager.listAvailable(pluginManager);
expect(apps.some((a) => a.name === "@hyperscape/plugin-hyperscape")).toBe(true);
expect(apps.some((a) => a.name === "@hyperscape/plugin-hyperscape")).toBe(
true,
);

// Step 2: Get app info
const info = await appManager.getInfo(
Expand Down
4 changes: 3 additions & 1 deletion packages/app-core/src/api/client-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ declare module "./client-base" {
fromSeq?: number;
}): Promise<AgentEventsResponse>;
getExtensionStatus(): Promise<ExtensionStatus>;
getRelationshipsGraph(query?: RelationshipsGraphQuery): Promise<RelationshipsGraphSnapshot>;
getRelationshipsGraph(
query?: RelationshipsGraphQuery,
): Promise<RelationshipsGraphSnapshot>;
getRelationshipsPeople(query?: RelationshipsGraphQuery): Promise<{
people: RelationshipsPersonSummary[];
stats: RelationshipsGraphStats;
Expand Down
6 changes: 5 additions & 1 deletion packages/app-core/src/api/client-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ declare module "./client-base" {
text: string,
channelType?: ConversationChannelType,
conversationMode?: ConversationMode,
): Promise<{ text: string; agentName: string; noResponseReason?: "ignored" }>;
): Promise<{
text: string;
agentName: string;
noResponseReason?: "ignored";
}>;
sendChatStream(
text: string,
onToken: (token: string, accumulatedText?: string) => void,
Expand Down
4 changes: 3 additions & 1 deletion packages/app-core/src/api/client-relationships.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ describe("MiladyClient relationships API", () => {
const client = new MiladyClient("http://127.0.0.1:31337");
const person = await client.getRelationshipsPerson("person 1");

expect(fetchSpy).toHaveBeenCalledWith("/api/relationships/people/person%201");
expect(fetchSpy).toHaveBeenCalledWith(
"/api/relationships/people/person%201",
);
expect(person.displayName).toBe("Chris");
});
});
10 changes: 9 additions & 1 deletion packages/app-core/src/api/database.readonly-query-guard.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import type { AgentRuntime } from "@elizaos/core";
import { handleDatabaseRoute } from "@miladyai/agent/api/database";
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
import {
afterAll,
afterEach,
beforeAll,
describe,
expect,
it,
vi,
} from "vitest";
import { createTestRuntime } from "../../../../test/helpers/pglite-runtime";
import {
createMockHttpResponse,
Expand Down
1 change: 0 additions & 1 deletion packages/app-core/src/api/onboarding-compat-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ export async function handleOnboardingCompatRoute(
`[milady-api] Failed to persist onboarding state: ${err instanceof Error ? err.message : String(err)}`,
);
}

} catch {
// JSON parse failed — let upstream handle the error
}
Expand Down
7 changes: 5 additions & 2 deletions packages/app-core/src/api/plugins-compat-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,9 @@ export function buildPluginListResponse(runtime: AgentRuntime | null): {
const configRecord = config as Record<string, unknown>;
const loadedNames = resolveLoadedPluginNames(runtime);
const manifestPath = resolvePluginManifestPath();
const manifestRoot = manifestPath ? path.dirname(manifestPath) : process.cwd();
const manifestRoot = manifestPath
? path.dirname(manifestPath)
: process.cwd();
const manifest = manifestPath
? (JSON.parse(fs.readFileSync(manifestPath, "utf8")) as PluginManifestFile)
: null;
Expand Down Expand Up @@ -1044,7 +1046,8 @@ export async function handlePluginsCompatRoutes(
}

const refreshed = (
buildPluginListResponse(state.current).plugins as unknown as CompatPluginRecord[]
buildPluginListResponse(state.current)
.plugins as unknown as CompatPluginRecord[]
).find((candidate) => candidate.id === pluginId);

result.payload.plugin = refreshed ?? result.payload.plugin ?? plugin;
Expand Down
11 changes: 8 additions & 3 deletions packages/app-core/src/api/server.no-response-fallback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,14 @@ describe("conversation no-response fallback", () => {
}),
);

const created = await req(isolatedServer.port, "POST", "/api/conversations", {
title: "Timed out fallback thread",
});
const created = await req(
isolatedServer.port,
"POST",
"/api/conversations",
{
title: "Timed out fallback thread",
},
);
expect(created.status).toBe(200);
const conversationId = String(
(created.data.conversation as { id?: string } | undefined)?.id ?? "",
Expand Down
Loading
Loading