Stage production icons for desktop builds and publish (#168)
* Stage production icons for desktop builds and publish - add shared brand asset paths and a Windows .ico asset - stage Linux/Windows icons in desktop artifact builds - override and restore publish favicon during server CLI publish * 'blip' * Fix PR review issues for publish icon staging * Refactor brand assets and harden Windows desktop build setup * Apply remaining server orchestration updates * Fix production mac icon asset Co-authored-by: Theo Browne <[email protected]> --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
42 files changed
+263
-86
No files matched your search
@@ -91,7 +91,6 @@ function createProviderServiceHarness(
|
||||
listSessions,
|
||||
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
|
||||
rollbackConversation,
|
||||
stopAll: () => Effect.void,
|
||||
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
|
||||
};
|
||||
|
||||
|
||||
@@ -188,7 +188,6 @@ describe("ProviderCommandReactor", () => {
|
||||
sessionModelSwitch: provider === "codex" ? "in-session" : "in-session",
|
||||
}),
|
||||
rollbackConversation: () => unsupported(),
|
||||
stopAll: () => Effect.void,
|
||||
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
|
||||
};
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ function createProviderServiceHarness() {
|
||||
listSessions: () => Effect.succeed([]),
|
||||
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
|
||||
rollbackConversation: () => unsupported(),
|
||||
stopAll: () => Effect.void,
|
||||
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
|
||||
};
|
||||
|
||||
|
||||
@@ -356,11 +356,6 @@ it.effect(
|
||||
});
|
||||
}).pipe(Effect.provide(firstProviderLayer));
|
||||
|
||||
yield* Effect.gen(function* () {
|
||||
const provider = yield* ProviderService;
|
||||
yield* provider.stopAll();
|
||||
}).pipe(Effect.provide(firstProviderLayer));
|
||||
|
||||
const persistedAfterStopAll = yield* Effect.gen(function* () {
|
||||
const repository = yield* ProviderSessionRuntimeRepository;
|
||||
return yield* repository.getByThreadId({ threadId: startedSession.threadId });
|
||||
@@ -549,7 +544,7 @@ routing.layer("ProviderServiceLive routing", (it) => {
|
||||
runtimeMode: "full-access",
|
||||
});
|
||||
|
||||
yield* provider.stopAll();
|
||||
yield* routing.codex.stopAll();
|
||||
routing.codex.startSession.mockClear();
|
||||
routing.codex.sendTurn.mockClear();
|
||||
|
||||
@@ -578,7 +573,7 @@ routing.layer("ProviderServiceLive routing", (it) => {
|
||||
}),
|
||||
);
|
||||
|
||||
it.effect("stops all sessions and clears adapter runtime", () =>
|
||||
it.effect("lists no sessions after adapter runtime clears", () =>
|
||||
Effect.gen(function* () {
|
||||
const provider = yield* ProviderService;
|
||||
|
||||
@@ -593,7 +588,7 @@ routing.layer("ProviderServiceLive routing", (it) => {
|
||||
runtimeMode: "full-access",
|
||||
});
|
||||
|
||||
yield* provider.stopAll();
|
||||
yield* routing.codex.stopAll();
|
||||
|
||||
const remaining = yield* provider.listSessions();
|
||||
assert.equal(remaining.length, 0);
|
||||
@@ -641,14 +636,6 @@ routing.layer("ProviderServiceLive routing", (it) => {
|
||||
}
|
||||
}
|
||||
|
||||
yield* provider.stopAll();
|
||||
const stoppedRuntime = yield* runtimeRepository.getByThreadId({
|
||||
threadId: session.threadId,
|
||||
});
|
||||
assert.equal(Option.isSome(stoppedRuntime), true);
|
||||
if (Option.isSome(stoppedRuntime)) {
|
||||
assert.equal(stoppedRuntime.value.status, "stopped");
|
||||
}
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -471,7 +471,7 @@ const makeProviderService = (options?: ProviderServiceLiveOptions) =>
|
||||
});
|
||||
});
|
||||
|
||||
const stopAll: ProviderServiceShape["stopAll"] = () =>
|
||||
const runStopAll = () =>
|
||||
Effect.gen(function* () {
|
||||
const threadIds = yield* directory.listThreadIds();
|
||||
yield* Effect.forEach(adapters, (adapter) => adapter.stopAll()).pipe(Effect.asVoid);
|
||||
@@ -497,6 +497,12 @@ const makeProviderService = (options?: ProviderServiceLiveOptions) =>
|
||||
yield* analytics.flush;
|
||||
});
|
||||
|
||||
yield* Effect.addFinalizer(() =>
|
||||
Effect.catch(runStopAll(), (cause) =>
|
||||
Effect.logWarning("failed to stop provider service", { cause }),
|
||||
),
|
||||
);
|
||||
|
||||
return {
|
||||
startSession,
|
||||
sendTurn,
|
||||
@@ -507,7 +513,6 @@ const makeProviderService = (options?: ProviderServiceLiveOptions) =>
|
||||
listSessions,
|
||||
getCapabilities,
|
||||
rollbackConversation,
|
||||
stopAll,
|
||||
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
|
||||
} satisfies ProviderServiceShape;
|
||||
});
|
||||
|
||||
@@ -99,16 +99,6 @@ export interface ProviderServiceShape {
|
||||
readonly numTurns: number;
|
||||
}) => Effect.Effect<void, ProviderServiceError>;
|
||||
|
||||
/**
|
||||
* Stop all active provider sessions.
|
||||
*
|
||||
* Persisted session bindings remain so stale sessions can be resumed after
|
||||
* process restart.
|
||||
*
|
||||
* Runtime alias mappings are cleared as part of shutdown.
|
||||
*/
|
||||
readonly stopAll: () => Effect.Effect<void, ProviderServiceError>;
|
||||
|
||||
/**
|
||||
* Canonical provider runtime event stream.
|
||||
*
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
import { Effect, Logger, Option } from "effect";
|
||||
import { Effect, Logger } from "effect";
|
||||
import * as Layer from "effect/Layer";
|
||||
|
||||
import { ServerConfig } from "./config";
|
||||
|
||||
export const ServerLoggerLive = Effect.gen(function* () {
|
||||
const config = yield* Effect.serviceOption(ServerConfig);
|
||||
if (Option.isNone(config)) {
|
||||
return Logger.layer([Logger.defaultLogger]);
|
||||
}
|
||||
const config = yield* ServerConfig;
|
||||
|
||||
const logDir = path.join(config.value.stateDir, "logs");
|
||||
const logDir = path.join(config.stateDir, "logs");
|
||||
const logPath = path.join(logDir, "server.log");
|
||||
|
||||
yield* Effect.sync(() => {
|
||||
|
||||
@@ -1171,7 +1171,6 @@ describe("WebSocket Server", () => {
|
||||
listSessions: () => Effect.succeed([]),
|
||||
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
|
||||
rollbackConversation: () => unsupported(),
|
||||
stopAll: () => Effect.void,
|
||||
streamEvents: Stream.fromPubSub(runtimeEventPubSub),
|
||||
};
|
||||
const providerLayer = Layer.succeed(ProviderService, providerService);
|
||||
|
||||
@@ -568,7 +568,6 @@ export const createServer = Effect.fn(function* (): Effect.fn.Return<
|
||||
const orchestrationEngine = yield* OrchestrationEngineService;
|
||||
const projectionReadModelQuery = yield* ProjectionSnapshotQuery;
|
||||
const checkpointDiffQuery = yield* CheckpointDiffQuery;
|
||||
const liveProviderService = yield* ProviderService;
|
||||
const orchestrationReactor = yield* OrchestrationReactor;
|
||||
const { openInEditor } = yield* Open;
|
||||
|
||||
@@ -660,11 +659,6 @@ export const createServer = Effect.fn(function* (): Effect.fn.Return<
|
||||
}
|
||||
|
||||
const runPromise = yield* Effect.map(Effect.services<never>(), Effect.runPromiseWith);
|
||||
yield* Effect.addFinalizer(() =>
|
||||
Effect.catch(liveProviderService.stopAll(), (cause) =>
|
||||
Effect.logWarning("failed to stop provider service", { cause }),
|
||||
),
|
||||
);
|
||||
|
||||
const unsubscribeTerminalEvents = yield* terminalManager.subscribe(
|
||||
(event) => void Effect.runPromise(onTerminalEvent(event)),
|
||||
|
||||
Reference in new issue
Block a user