Skip to content
Draft
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
1 change: 1 addition & 0 deletions apps/fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ surface.

- `weather-agent` backs root `pnpm dev`, manual weather-agent smokes, and bundle analysis.
- `agent-tui-client` backs the non-e2e TUI smoke scripts in `packages/eve/test/tui-client`.
- `agent-idle-stream-repro` backs the stale eve client stream repro.

When adding fixture behavior, prefer extending an existing fixture unless the new behavior needs incompatible app-level configuration.
2 changes: 2 additions & 0 deletions apps/fixtures/agent-idle-stream-repro/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vercel
.env*.local
5 changes: 5 additions & 0 deletions apps/fixtures/agent-idle-stream-repro/agent/agent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineAgent } from "eve";

export default defineAgent({
model: "openai/gpt-5.4-mini",
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You are an idle stream repro assistant. Call the `idle_stream_repro` tool when the user asks for it. After the tool returns, reply with the returned label and status.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineTool } from "eve/tools";
import { z } from "zod";

export default defineTool({
description:
"Repro fixture: waits before returning a deterministic image marker. Only call when the user explicitly asks for idle_stream_repro.",
inputSchema: z.object({
delayMs: z.coerce.number().int().min(0).max(30_000).default(8_000),
label: z.string(),
}),
async execute(input) {
await new Promise((resolve) => setTimeout(resolve, input.delayMs));

return {
image: "repro-image.png",
label: input.label,
status: "completed",
};
},
});
15 changes: 15 additions & 0 deletions apps/fixtures/agent-idle-stream-repro/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "agent-idle-stream-repro",
"private": true,
"type": "module",
"scripts": {
"dev": "eve dev",
"build": "eve build",
"start": "eve start",
"typecheck": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"eve": "workspace:*",
"zod": "catalog:"
}
}
27 changes: 27 additions & 0 deletions apps/fixtures/agent-idle-stream-repro/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2024",
"lib": ["ES2024"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"moduleDetection": "force",
"verbatimModuleSyntax": true,
"noEmit": true,
"erasableSyntaxOnly": true,
"strict": true,
"isolatedModules": true,
"forceConsistentCasingInFileNames": true,
"noUncheckedIndexedAccess": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"useUnknownInCatchVariables": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"types": ["node"],
"allowJs": true,
"rootDir": "."
},
"include": ["agent/**/*", ".eve/**/*.d.ts"],
"exclude": ["node_modules", "dist", "build", ".turbo", ".vercel"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import type { ScenarioAppDescriptor } from "#internal/testing/scenario-app.js";

const IDLE_STREAM_REPRO_TSCONFIG_SOURCE = `${JSON.stringify(
{
$schema: "https://json.schemastore.org/tsconfig",
compilerOptions: {
allowJs: true,
erasableSyntaxOnly: true,
forceConsistentCasingInFileNames: true,
isolatedModules: true,
lib: ["ES2024"],
module: "NodeNext",
moduleDetection: "force",
moduleResolution: "NodeNext",
noEmit: true,
noFallthroughCasesInSwitch: true,
noImplicitOverride: true,
noUncheckedIndexedAccess: true,
resolveJsonModule: true,
rootDir: ".",
skipLibCheck: true,
strict: true,
target: "ES2024",
types: ["node"],
useUnknownInCatchVariables: true,
verbatimModuleSyntax: true,
},
exclude: ["node_modules", "dist", "build", ".turbo", ".vercel"],
include: ["agent/**/*"],
},
null,
2,
)}\n`;

/**
* Scenario-tier eve app for reproducing a stale client stream after an inline
* tool starts. The tool waits before returning, which gives a proxy enough
* time to stop forwarding the live response while durable tail events remain
* replayable from the session stream route.
*/
export const IDLE_STREAM_REPRO_DESCRIPTOR: ScenarioAppDescriptor = {
dependencies: {
zod: "^4.3.6",
},
files: {
"agent/agent.ts": `import { defineAgent } from "eve";

export default defineAgent({
model: "openai/gpt-5.4-mini",
});
`,
"agent/instructions.md": `You are an idle stream repro assistant. Call the \`idle_stream_repro\` tool when the user asks for it. After the tool returns, reply with the returned label and status.
`,
"agent/tools/idle_stream_repro.ts": `import { defineTool } from "eve/tools";
import { z } from "zod";

export default defineTool({
description:
"Repro fixture: waits before returning a deterministic image marker. Only call when the user explicitly asks for idle_stream_repro.",
inputSchema: z.object({
delayMs: z.coerce.number().int().min(0).max(30_000).default(8_000),
label: z.string(),
}),
async execute(input) {
await new Promise((resolve) => setTimeout(resolve, input.delayMs));

return {
image: "repro-image.png",
label: input.label,
status: "completed",
};
},
});
`,
"tsconfig.json": IDLE_STREAM_REPRO_TSCONFIG_SOURCE,
},
installDependencies: true,
name: "agent-idle-stream-repro",
};
1 change: 1 addition & 0 deletions packages/eve/src/internal/testing/scenario-apps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export { CUSTOM_CHANNEL_PORTABILITY_DESCRIPTOR } from "#internal/testing/scenari
export { DISCORD_ROUTE_PORTABILITY_DESCRIPTOR } from "#internal/testing/scenario-apps/discord-route-portability.js";
export { EXTENSION_AGENT_DESCRIPTOR } from "#internal/testing/scenario-apps/extension-agent.js";
export { GITHUB_ROUTE_PORTABILITY_DESCRIPTOR } from "#internal/testing/scenario-apps/github-route-portability.js";
export { IDLE_STREAM_REPRO_DESCRIPTOR } from "#internal/testing/scenario-apps/idle-stream-repro.js";
export { EVE_ROUTE_PORTABILITY_DESCRIPTOR } from "#internal/testing/scenario-apps/eve-route-portability.js";
export { SANDBOX_BUNDLING_DESCRIPTOR } from "#internal/testing/scenario-apps/sandbox-bundling.js";
export { SANDBOX_WORKSPACES_DESCRIPTOR } from "#internal/testing/scenario-apps/sandbox-workspaces.js";
Expand Down
Loading
Loading