Skip to content

Commit 811b2eb

Browse files
author
Shaw
committed
fixes
1 parent e502c2e commit 811b2eb

8 files changed

Lines changed: 327 additions & 245 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"generate:action-search-keywords": "node scripts/generate-action-search-keywords.mjs && node packages/shared/scripts/generate-keywords.mjs --target ts",
4242
"start": "bun run --cwd packages/agent start",
4343
"start:eliza": "bun packages/app-core/src/entry.ts start",
44-
"dev:prepare": "bun run --cwd packages/shared build",
44+
"dev:prepare": "turbo run build --filter=@elizaos/app... --filter=!@elizaos/app",
4545
"dev": "bun run dev:prepare && bun run --cwd packages/app plugin:build && node packages/app-core/scripts/rt.mjs packages/app-core/scripts/dev-ui.mjs --name=eliza --app=app",
4646
"dev:web:ui": "bun run dev:prepare && bun run --cwd packages/app plugin:build && node packages/app-core/scripts/rt.mjs packages/app-core/scripts/dev-ui.mjs --name=eliza --app=app",
4747
"dev:ui": "bun run dev:prepare && node packages/app-core/scripts/rt.mjs packages/app-core/scripts/dev-ui.mjs --name=eliza --app=app --ui-only",

packages/app-core/scripts/entry.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env node
2+
/**
3+
* Thin shim that defers to the real CLI entry at ../src/entry.ts.
4+
*
5+
* The Milady root `start:eliza` script invokes this path via
6+
* `node scripts/run-eliza-app-core-script.mjs entry.ts start`, which expects
7+
* the file to live under `<app-core>/scripts/`. The actual implementation
8+
* lives at `src/entry.ts` (built into `dist/entry.js`); keeping this shim
9+
* avoids duplicating the bootstrapping logic in two places.
10+
*/
11+
import "../src/entry";

packages/app-core/test/helpers/live-agent-test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* from `packages/core/e2e/setup/global-setup.ts`. The Cerebras alias mirrors
1414
* the logic in `scripts/test-env.mjs`.
1515
*/
16+
import { randomUUID } from "node:crypto";
1617
import { afterAll, beforeAll, describe, it } from "vitest";
17-
import { v4 as uuidv4 } from "uuid";
1818

1919
import {
2020
AgentRuntime,
@@ -490,7 +490,7 @@ export async function buildLiveHarness(
490490
plugins.push(extra);
491491
}
492492

493-
const agentId = uuidv4() as UUID;
493+
const agentId = randomUUID() as UUID;
494494
const character: Character = {
495495
id: agentId,
496496
name: "LiveTestAgent",
@@ -522,9 +522,9 @@ export async function buildLiveHarness(
522522
applyProviderSettings(runtime, provider);
523523
await runtime.initialize();
524524

525-
const worldId = uuidv4() as UUID;
525+
const worldId = randomUUID() as UUID;
526526
await runtime.createWorld({ id: worldId, name: "live-world", agentId });
527-
const roomId = uuidv4() as UUID;
527+
const roomId = randomUUID() as UUID;
528528
await runtime.ensureRoomExists({
529529
id: roomId,
530530
name: "live-chat",
@@ -534,7 +534,7 @@ export async function buildLiveHarness(
534534
});
535535
await runtime.ensureParticipantInRoom(agentId, roomId);
536536

537-
const userEntityId = uuidv4() as UUID;
537+
const userEntityId = randomUUID() as UUID;
538538
await runtime.createEntity({
539539
id: userEntityId,
540540
names: ["LiveTester"],
@@ -547,7 +547,7 @@ export async function buildLiveHarness(
547547
throw new Error("[live-agent-test] runtime.messageService is null");
548548
}
549549
const message: Memory = {
550-
id: uuidv4() as UUID,
550+
id: randomUUID() as UUID,
551551
entityId: userEntityId,
552552
roomId,
553553
content: { text, source: "live-test" },

packages/app-core/test/live-agent/personality-routing.live.e2e.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,13 @@ describeIf(hasModelProvider)("Personality Routing E2E", () => {
236236
},
237237
});
238238

239+
// The leaf "MODIFY_CHARACTER" action was consolidated into the umbrella
240+
// "CHARACTER" action; the old name lives on as a simile alias.
239241
const modifyCharacterAction = runtime.actions.find(
240-
(action) => action.name === "MODIFY_CHARACTER",
242+
(action) =>
243+
action.name === "CHARACTER" ||
244+
action.name === "MODIFY_CHARACTER" ||
245+
action.similes?.includes("MODIFY_CHARACTER"),
241246
);
242247
expect(modifyCharacterAction).toBeDefined();
243248

packages/benchmarks/woobench/evaluator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,10 @@ async def run_scenario(
322322
responsive_turns += 1
323323

324324
# --- Payment action execution ---
325-
requested_payment = detect_payment_demand(agent_turn)
326325
payment_check = detect_payment_check(agent_turn)
326+
requested_payment = (
327+
None if payment_check else detect_payment_demand(agent_turn)
328+
)
327329

328330
if payment_check and active_payment:
329331
payment_result = await self._check_collected_payment(active_payment)

packages/benchmarks/woobench/tests/test_payment_mock.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,24 @@ def payment_scenario() -> Scenario:
146146
)
147147

148148

149+
def payment_check_scenario() -> Scenario:
150+
scenario = payment_scenario()
151+
scenario.id = "payment_check_smoke"
152+
scenario.max_turns = 2
153+
scenario.response_tree.nodes[0].follow_up_nodes = ["payment_check"]
154+
scenario.response_tree.nodes.append(
155+
ResponseNode(
156+
id="payment_check",
157+
condition="Agent checks payment before delivering paid content",
158+
positive_response="Great.",
159+
negative_response="No.",
160+
neutral_response="Okay.",
161+
points_if_positive=1,
162+
)
163+
)
164+
return scenario
165+
166+
149167
@pytest.mark.asyncio
150168
async def test_woobench_collects_mock_backed_payment():
151169
payment_client = FakePaymentClient()
@@ -199,3 +217,49 @@ async def agent(_history):
199217
assert result.revenue.payment_checkout_url == "http://mock.test/checkout/charge_test?provider=oxapay"
200218
assert result.revenue.payment_transaction_hash == "woobench_payment_mock_smoke_1"
201219
assert payment_client.created_charges == [1.0]
220+
221+
222+
@pytest.mark.asyncio
223+
async def test_woobench_check_action_does_not_create_second_text_charge():
224+
payment_client = FakePaymentClient()
225+
evaluator = WooBenchEvaluator(evaluator_mode="heuristic", payment_client=payment_client)
226+
227+
async def agent(history):
228+
user_text = "\n".join(
229+
turn["content"] for turn in history if turn.get("role") == "user"
230+
).lower()
231+
if "payment sent" in user_text:
232+
return {
233+
"text": "I am checking whether the $1.00 charge went through before continuing.",
234+
"actions": ["BENCHMARK_ACTION"],
235+
"params": {
236+
"BENCHMARK_ACTION": {
237+
"command": "CHECK_PAYMENT",
238+
}
239+
},
240+
}
241+
return {
242+
"text": "I can continue once the $1.00 crypto charge is paid.",
243+
"actions": ["BENCHMARK_ACTION"],
244+
"params": {
245+
"BENCHMARK_ACTION": {
246+
"command": "CREATE_APP_CHARGE",
247+
"amount_usd": 1,
248+
"provider": "oxapay",
249+
"description": "WooBench action charge",
250+
}
251+
},
252+
}
253+
254+
result = await evaluator.run_scenario(payment_check_scenario(), agent)
255+
256+
assert result.revenue.payment_requested is True
257+
assert result.revenue.payment_received is True
258+
assert result.revenue.amount_earned == 1.0
259+
assert result.revenue.payment_provider == "mock-app-charge:oxapay"
260+
assert result.revenue.payment_request_id == "charge_test"
261+
assert result.revenue.payment_status == "confirmed"
262+
assert result.revenue.payment_action == "CHECK_PAYMENT"
263+
assert result.revenue.payment_action_source == "action"
264+
assert payment_client.created_charges == [1.0]
265+
assert payment_client.created_amounts == []

packages/elizaos/templates-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": "1.0.0",
3-
"generatedAt": "2026-05-09T22:40:02.368Z",
3+
"generatedAt": "2026-05-09T23:11:23.218Z",
44
"repoUrl": "https://github.com/elizaos/eliza",
55
"templates": [
66
{

0 commit comments

Comments
 (0)