mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-05 22:32:12 +00:00
fix: restore main type surfaces
This commit is contained in:
@@ -108,8 +108,7 @@ export const ACP_SPAWN_ERROR_CODES = [
|
||||
] as const;
|
||||
export type SpawnAcpErrorCode = (typeof ACP_SPAWN_ERROR_CODES)[number];
|
||||
|
||||
type SpawnAcpAcceptedResult = {
|
||||
status: "accepted";
|
||||
type SpawnAcpResultFields = {
|
||||
childSessionKey?: string;
|
||||
runId?: string;
|
||||
mode?: SpawnAcpMode;
|
||||
@@ -117,9 +116,15 @@ type SpawnAcpAcceptedResult = {
|
||||
note?: string;
|
||||
};
|
||||
|
||||
type SpawnAcpFailedResult = {
|
||||
type SpawnAcpAcceptedResult = SpawnAcpResultFields & {
|
||||
status: "accepted";
|
||||
childSessionKey: string;
|
||||
runId: string;
|
||||
mode: SpawnAcpMode;
|
||||
};
|
||||
|
||||
type SpawnAcpFailedResult = SpawnAcpResultFields & {
|
||||
status: "forbidden" | "error";
|
||||
childSessionKey?: string;
|
||||
error: string;
|
||||
errorCode: SpawnAcpErrorCode;
|
||||
};
|
||||
|
||||
@@ -33,6 +33,7 @@ type CacheUsage = {
|
||||
cacheRead?: number;
|
||||
cacheWrite?: number;
|
||||
};
|
||||
type BaselineLane = CacheLane | "disabled";
|
||||
type CacheRun = {
|
||||
hitRate: number;
|
||||
suffix: string;
|
||||
@@ -348,8 +349,15 @@ function formatUsage(usage: CacheUsage | undefined) {
|
||||
return `cacheRead=${usage?.cacheRead ?? 0} cacheWrite=${usage?.cacheWrite ?? 0} input=${usage?.input ?? 0}`;
|
||||
}
|
||||
|
||||
function resolveBaselineFloor(
|
||||
provider: ProviderKey,
|
||||
lane: BaselineLane,
|
||||
): LiveCacheFloor | undefined {
|
||||
return (LIVE_CACHE_REGRESSION_BASELINE[provider] as Record<string, LiveCacheFloor>)[lane];
|
||||
}
|
||||
|
||||
function assertAgainstBaseline(params: {
|
||||
lane: string;
|
||||
lane: BaselineLane;
|
||||
provider: ProviderKey;
|
||||
result: LaneResult;
|
||||
regressions: string[];
|
||||
|
||||
Reference in New Issue
Block a user