mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-11 09:11:13 +00:00
fix(config): cap generated schema export types
This commit is contained in:
@@ -34,7 +34,7 @@ export function renderBaseConfigSchemaModule(params?: { generatedAt?: string }):
|
||||
|
||||
import type { BaseConfigSchemaResponse } from "./schema-base.js";
|
||||
|
||||
export const GENERATED_BASE_CONFIG_SCHEMA = ${JSON.stringify(payload, null, 2)} as const satisfies BaseConfigSchemaResponse;
|
||||
export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = ${JSON.stringify(payload, null, 2)};
|
||||
`,
|
||||
DEFAULT_OUTPUT_PATH,
|
||||
);
|
||||
|
||||
@@ -99,10 +99,7 @@ import {
|
||||
} from "./compaction-safety-timeout.js";
|
||||
import { runContextEngineMaintenance } from "./context-engine-maintenance.js";
|
||||
import { buildEmbeddedExtensionFactories } from "./extensions.js";
|
||||
import {
|
||||
applyExtraParamsToAgent,
|
||||
resolveAgentTransportOverride,
|
||||
} from "./extra-params.js";
|
||||
import { applyExtraParamsToAgent } from "./extra-params.js";
|
||||
import { getDmHistoryLimitFromSessionKey, limitHistoryTurns } from "./history.js";
|
||||
import { resolveGlobalLane, resolveSessionLane } from "./lanes.js";
|
||||
import { log } from "./logger.js";
|
||||
@@ -790,7 +787,7 @@ export async function compactEmbeddedPiSessionDirect(
|
||||
resolvedApiKey: hasRuntimeAuthExchange ? undefined : apiKeyInfo?.apiKey,
|
||||
authStorage,
|
||||
});
|
||||
const { effectiveExtraParams } = applyExtraParamsToAgent(
|
||||
applyExtraParamsToAgent(
|
||||
session.agent,
|
||||
params.config,
|
||||
provider,
|
||||
@@ -802,13 +799,6 @@ export async function compactEmbeddedPiSessionDirect(
|
||||
effectiveModel,
|
||||
agentDir,
|
||||
);
|
||||
const agentTransportOverride = resolveAgentTransportOverride({
|
||||
settingsManager,
|
||||
effectiveExtraParams,
|
||||
});
|
||||
if (agentTransportOverride && session.agent.transport !== agentTransportOverride) {
|
||||
session.agent.transport = agentTransportOverride;
|
||||
}
|
||||
|
||||
try {
|
||||
const prior = await sanitizeSessionHistory({
|
||||
|
||||
@@ -99,10 +99,7 @@ import { isCacheTtlEligibleProvider } from "../cache-ttl.js";
|
||||
import { resolveCompactionTimeoutMs } from "../compaction-safety-timeout.js";
|
||||
import { runContextEngineMaintenance } from "../context-engine-maintenance.js";
|
||||
import { buildEmbeddedExtensionFactories } from "../extensions.js";
|
||||
import {
|
||||
applyExtraParamsToAgent,
|
||||
resolveAgentTransportOverride,
|
||||
} from "../extra-params.js";
|
||||
import { applyExtraParamsToAgent, resolveAgentTransportOverride } from "../extra-params.js";
|
||||
import { getDmHistoryLimitFromSessionKey, limitHistoryTurns } from "../history.js";
|
||||
import { log } from "../logger.js";
|
||||
import { buildEmbeddedMessageActionDiscoveryInput } from "../message-action-discovery-input.js";
|
||||
@@ -985,7 +982,6 @@ export async function runEmbeddedAttempt(
|
||||
`embedded agent transport override: ${previousTransport} -> ${agentTransportOverride} ` +
|
||||
`(${params.provider}/${params.modelId})`,
|
||||
);
|
||||
activeSession.agent.transport = agentTransportOverride;
|
||||
}
|
||||
|
||||
const cacheObservabilityEnabled = Boolean(cacheTrace) || log.isEnabled("debug");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import type { BaseConfigSchemaResponse } from "./schema-base.js";
|
||||
|
||||
export const GENERATED_BASE_CONFIG_SCHEMA = {
|
||||
export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = {
|
||||
schema: {
|
||||
$schema: "http://json-schema.org/draft-07/schema#",
|
||||
type: "object",
|
||||
@@ -26882,4 +26882,4 @@ export const GENERATED_BASE_CONFIG_SCHEMA = {
|
||||
},
|
||||
version: "2026.4.4",
|
||||
generatedAt: "2026-03-22T21:17:33.302Z",
|
||||
} as const satisfies BaseConfigSchemaResponse;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
type MockManifestRegistry = {
|
||||
plugins: Array<{
|
||||
id: string;
|
||||
origin: string;
|
||||
providerAuthEnvVars?: Record<string, string[]>;
|
||||
}>;
|
||||
diagnostics: unknown[];
|
||||
};
|
||||
|
||||
const loadPluginManifestRegistry = vi.hoisted(() =>
|
||||
vi.fn(() => ({ plugins: [], diagnostics: [] })),
|
||||
vi.fn<() => MockManifestRegistry>(() => ({ plugins: [], diagnostics: [] })),
|
||||
);
|
||||
|
||||
vi.mock("../plugins/manifest-registry.js", () => ({
|
||||
|
||||
Reference in New Issue
Block a user