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
5 changes: 5 additions & 0 deletions apps/server/src/mcp/OrchestratorMcpService.activity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import * as DateTime from "effect/DateTime";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Path from "effect/Path";
import * as NodeCrypto from "@effect/platform-node/NodeCrypto";
import { expect, it } from "vite-plus/test";

Expand Down Expand Up @@ -129,6 +130,7 @@ it("readThread prefers activity-run status over a newer cancelled queued run", a
const layer = OrchestratorMcpService.layer.pipe(
Layer.provide(
Layer.mergeAll(
Path.layer,
Layer.mock(ThreadManagementService.ThreadManagementService)({
getTimelinePage: () => Effect.succeed({ items: [], totalItems: 0, hasMore: false }),
getThreadRecords: (threadId) =>
Expand Down Expand Up @@ -194,6 +196,7 @@ it("readThread prefers waiting activity status over a newer cancelled queued run
const layer = OrchestratorMcpService.layer.pipe(
Layer.provide(
Layer.mergeAll(
Path.layer,
Layer.mock(ThreadManagementService.ThreadManagementService)({
getTimelinePage: () => Effect.succeed({ items: [], totalItems: 0, hasMore: false }),
getThreadRecords: (threadId) =>
Expand Down Expand Up @@ -316,6 +319,7 @@ it("taskStatus returns task.providerInstanceId rather than the driver kind", asy
const layer = OrchestratorMcpService.layer.pipe(
Layer.provide(
Layer.mergeAll(
Path.layer,
Layer.mock(ThreadManagementService.ThreadManagementService)({
getTimelinePage: () => Effect.succeed({ items: [], totalItems: 0, hasMore: false }),
getThreadRecords: (threadId) => {
Expand Down Expand Up @@ -414,6 +418,7 @@ it("readThread and sendToThread reach threads in other projects", async () => {
const layer = OrchestratorMcpService.layer.pipe(
Layer.provide(
Layer.mergeAll(
Path.layer,
Layer.mock(ThreadManagementService.ThreadManagementService)({
getThreadRecords: (threadId) => {
if (threadId === parentThreadId) return Effect.succeed(parentProjection);
Expand Down
Loading