Skip to content
Merged
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
2 changes: 2 additions & 0 deletions apps/server/src/fork/fyi/FyiRuntimeLayer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import * as Orchestrator from "../../orchestration-v2/Orchestrator.ts";
import * as ProjectionStore from "../../orchestration-v2/ProjectionStore.ts";
import * as ProjectStore from "../../orchestration-v2/ProjectStore.ts";
import * as ProviderSessionManager from "../../orchestration-v2/ProviderSessionManager.ts";
import { layerNoTaskFolders } from "../../orchestration-v2/ProviderTurnStartService.testkit.ts";
import * as RuntimeLayer from "../../orchestration-v2/runtimeLayer.ts";
import * as ThreadCommandExecutor from "../../orchestration-v2/ThreadCommandExecutor.ts";
import * as SqlitePersistence from "../../persistence/Sqlite.ts";
Expand Down Expand Up @@ -129,6 +130,7 @@ const layerTest = Layer.mergeAll(
createWorktree: () => Effect.succeed({} as never),
}),
),
Layer.provide(layerNoTaskFolders),
Layer.provide(
Layer.mock(ProjectService.ProjectService)({
getById: () => Effect.succeedNone,
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/fork/generalRoleParity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ import * as ServerSettings from "../serverSettings.ts";
import { SourceControlRepositoryService } from "../sourceControl/SourceControlRepositoryService.ts";
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
import { VcsStatusBroadcaster } from "../vcs/VcsStatusBroadcaster.ts";
import { TaskFolders } from "../workspace/TaskFolders.ts";

const projectId = ProjectId.make("project:general-role-parity");
const environmentId = EnvironmentId.make("environment:general-role-parity");
Expand Down Expand Up @@ -726,6 +727,7 @@ const toolHandlerServices = Layer.mergeAll(
Layer.mock(ThreadIssueService)({}),
Layer.mock(ThreadLaunchService.ThreadLaunchService)({}),
McpToolAccessTestkit.liveThreadsLayer,
Layer.mock(TaskFolders)({}),
Layer.mock(ThreadSearch)({}),
Layer.mock(VcsStatusBroadcaster)({}),
).pipe(Layer.provideMerge(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer)));
Expand Down
1 change: 1 addition & 0 deletions apps/server/src/fork/subThreads/SubThreads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const layerFor = (calls: Queue.Queue<GenerationCall>) =>
faviconPath: null,
projectIcon: null,
scripts: [],
trackedFolders: [],
pinnedAt: null,
archivedAt: null,
createdAt: "2026-01-01T00:00:00.000Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1164,11 +1164,7 @@ const openSessionWithRunningCommand = Effect.fn("openSessionWithRunningCommand")
},
withProcess: (_stop, task) => task,
defaultModel: Effect.undefined,
<<<<<<< origin/main
profileDirectory: detachedChildProfile ?? unusedProfileDirectory,
});
=======
...(profileDirectory === undefined ? {} : { profileDirectory }),
profileDirectory: profileDirectory ?? unusedProfileDirectory,
};
const adapter =
options === undefined
Expand All @@ -1177,6 +1173,7 @@ const openSessionWithRunningCommand = Effect.fn("openSessionWithRunningCommand")
instanceId,
flavor: makeAntigravityAcpAdapterFlavor({
...adapterOptions,
digest: yield* Digest.Digest,
random: crypto,
fileSystem: yield* FileSystem.FileSystem,
path,
Expand All @@ -1190,7 +1187,6 @@ const openSessionWithRunningCommand = Effect.fn("openSessionWithRunningCommand")
onDeferredFinalizeScheduled: (debounce) => Queue.offer(scheduledFinalizes, debounce),
},
});
>>>>>>> upstream/main
const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
runtimeMode: "full-access",
interactionMode: "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ describe("ClaudeAdapterV2 runtime query policy", () => {
assert.isUndefined(options.extraArgs?.["dangerously-skip-permissions"]);
});

<<<<<<< origin/main
it("loads a session-local plugin configured by the hosting T3 instance", () => {
const options = ClaudeAdapterV2.makeClaudeQueryOptions({
modelSelection: CLAUDE_TEST_MODEL_SELECTION,
Expand All @@ -392,10 +391,7 @@ describe("ClaudeAdapterV2 runtime query policy", () => {
assert.deepEqual(options.plugins, [{ type: "local", path: "/path/to/whiteboard" }]);
});

it("passes every --add-dir and --plugin-dir launch directory to Claude", () => {
=======
it("passes the thread's other folders and every --add-dir and --plugin-dir launch directory to Claude", () => {
>>>>>>> upstream/main
const options = ClaudeAdapterV2.makeClaudeQueryOptions({
modelSelection: CLAUDE_TEST_MODEL_SELECTION,
nativeThreadId: "native-add-dir",
Expand Down
5 changes: 1 addition & 4 deletions apps/server/src/orchestration-v2/CheckpointCaptureService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,9 @@ export const layer: Layer.Layer<
);
// Omit delegatedCompletion to preserve cohort writes made after capture loaded the run.
const { delegatedCompletion: _delegatedCompletion, ...runWithoutDelegatedCompletion } = run;
<<<<<<< origin/main
const commandId = CommandId.make(
`command:effect:checkpoint.capture:${run.activeAttemptId ?? run.id}`,
=======
const commandId = CommandId.make(`command:effect:checkpoint.capture:${run.id}`);
);
const checkpointEvent = (payload: OrchestrationV2Checkpoint) =>
Effect.map(ids.allocate.event({ threadId: input.threadId, commandId }), (id) => ({
id,
Expand Down Expand Up @@ -245,7 +243,6 @@ export const layer: Layer.Layer<
yield* checkpointEvent(capture.checkpoint),
];
}),
>>>>>>> upstream/main
);
yield* eventSink.commitCommand({
commandId,
Expand Down
12 changes: 2 additions & 10 deletions apps/server/src/orchestration-v2/CheckpointRollbackService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,11 @@ const layerCheckpointRollbackService = CheckpointRollbackService.layer.pipe(
Layer.provide(
Layer.mergeAll(
NodeServices.layer,
<<<<<<< origin/main
layerNoTaskFolders,
Layer.mock(ServerConfig.ServerConfig)({
worktreesDir: "/synthetic-worktrees",
worktreeCheckoutCacheDir: "/synthetic-caches/worktree-checkouts",
} as never),
=======
layerNoTaskFolders,
Layer.mock(ServerConfig.ServerConfig)({ worktreesDir: "/synthetic-worktrees" } as never),
>>>>>>> upstream/main
ServerSettings.layerTest(),
Layer.mock(GitWorkflow.GitWorkflowService)({}),
Layer.mock(ProjectStore.ProjectStoreV2)({ get: () => Effect.succeed(unrelatedProject) }),
Expand Down Expand Up @@ -241,15 +237,11 @@ it.effect.each([
Layer.mergeAll(
ThreadCommandExecutor.layer,
NodeServices.layer,
<<<<<<< origin/main
layerNoTaskFolders,
Layer.mock(ServerConfig.ServerConfig)({
worktreesDir,
worktreeCheckoutCacheDir: "/synthetic-caches/worktree-checkouts",
} as never),
=======
layerNoTaskFolders,
Layer.mock(ServerConfig.ServerConfig)({ worktreesDir } as never),
>>>>>>> upstream/main
ServerSettings.layerTest(),
Layer.mock(ProjectStore.ProjectStoreV2)({
get: (id) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,6 @@ it.effect("restarts the turn for an image when native steering takes text only",
}),
);

<<<<<<< origin/main
it.effect.each(["completed", "interrupted"] as const)(
"checkpoints a run that a steer restarted after its first answer was checkpointed (restart %s)",
(restartEnd) =>
Expand Down Expand Up @@ -1485,46 +1484,12 @@ it.effect.each(["completed", "interrupted"] as const)(
}),
);

it.effect("starts a steer that missed the turn on the saved next-turn selection", () =>
Effect.gen(function* () {
const { events, started, steered, layer, startFirstTurn } = yield* nextTurnSelectionHarness(
"steering-selection-follow-up",
);
yield* Effect.gen(function* () {
const orchestrator = yield* Orchestrator.OrchestratorV2;
const worker = yield* EffectWorker.OrchestrationEffectWorkerV2;
const threadId = yield* startFirstTurn;
const first = started[0]!;
yield* orchestrator.dispatch({
type: "message.dispatch",
commandId: CommandId.make("steer"),
threadId,
messageId: MessageId.make("message:steer"),
text: "late steer",
attachments: [],
modelSelection: composerSelection,
dispatchMode: { type: "steer_active", targetRunId: first.runId },
createdBy: "user",
creationSource: "web",
});
const settled = yield* orchestrator.streamDomainEvents.pipe(
Stream.filter(
(event) =>
event.type === "run.updated" &&
event.payload.id === first.runId &&
event.payload.status === "waiting",
),
Stream.take(1),
Stream.runDrain,
Effect.forkScoped,
=======
it.effect.each(["complete", "stop-before-end"] as const)(
"starts a steer that missed the turn in its place on the saved next-turn selection: %s",
(timing) =>
Effect.gen(function* () {
const { events, started, steered, layer, startFirstTurn } = yield* nextTurnSelectionHarness(
`steering-selection-follow-up-${timing}`,
>>>>>>> upstream/main
);
yield* Effect.gen(function* () {
const orchestrator = yield* Orchestrator.OrchestratorV2;
Expand Down
3 changes: 0 additions & 3 deletions apps/server/src/orchestration-v2/runtimeLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,14 @@ import * as ThreadForkService from "./ThreadForkService.ts";
import * as TurnItemPositionStore from "./TurnItemPositionStore.ts";
import * as ScheduledTaskService from "../scheduledTasks/ScheduledTaskService.ts";
import * as SecretRequests from "../secrets/SecretRequests.ts";
<<<<<<< origin/main
import * as DisplayModeWrap from "../fork/displayModeWrap/DisplayModeWrap.ts";
import * as FyiDelivery from "../fork/fyi/FyiDelivery.ts";
import * as FyiWakeWorker from "../fork/fyi/FyiWakeWorker.ts";
import * as ThreadDashboard from "../fork/threadDashboard/ThreadDashboard.ts";
import * as UserView from "../fork/userView/UserView.ts";
import * as SubThreads from "../fork/subThreads/SubThreads.ts";
=======
import * as WorkspaceFolders from "../workspace/WorkspaceFolders.ts";
import * as TaskFolderStore from "../workspace/TaskFolderStore.ts";
>>>>>>> upstream/main

export const layerEventInfrastructure = Layer.mergeAll(
OrchestrationEventStore.layer,
Expand Down
8 changes: 1 addition & 7 deletions apps/server/src/provider/agentContextBudget.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
<<<<<<< origin/main
"claudeSystemAppendBytes": 5945,
"codexAdditionalContextBytes": 7339,
"mcpToolListJsonBytes": 63920
=======
"claudeSystemAppendBytes": 6245,
"codexAdditionalContextBytes": 7639,
"mcpToolListJsonBytes": 59052
>>>>>>> upstream/main
"mcpToolListJsonBytes": 64573
}
3 changes: 0 additions & 3 deletions apps/server/src/storageCleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,8 @@ const make = Effect.gen(function* () {
const terminals = yield* TerminalManager.TerminalManager;
const fs = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
<<<<<<< origin/main
const homeCacheDir = yield* homeCheckoutCacheDir;
=======
const taskFolders = yield* TaskFolders.TaskFolders;
>>>>>>> upstream/main
const liveTerminals = new Map<string, Map<string, TerminalSummary>>();
const orphanSizes = new Map<string, number | null>();
const noteTerminal = (terminal: TerminalSummary) => {
Expand Down
Loading
Loading