mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 15:34:31 +00:00
Secrets runtime: include sourceConfig in prepared snapshot type
This commit is contained in:
committed by
Peter Steinberger
parent
e4915cb107
commit
e45729a430
@@ -25,6 +25,7 @@ export type SecretResolverWarning = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type PreparedSecretsRuntimeSnapshot = {
|
export type PreparedSecretsRuntimeSnapshot = {
|
||||||
|
sourceConfig: OpenClawConfig;
|
||||||
config: OpenClawConfig;
|
config: OpenClawConfig;
|
||||||
authStores: Array<{ agentDir: string; store: AuthProfileStore }>;
|
authStores: Array<{ agentDir: string; store: AuthProfileStore }>;
|
||||||
warnings: SecretResolverWarning[];
|
warnings: SecretResolverWarning[];
|
||||||
@@ -62,6 +63,7 @@ let activeSnapshot: PreparedSecretsRuntimeSnapshot | null = null;
|
|||||||
|
|
||||||
function cloneSnapshot(snapshot: PreparedSecretsRuntimeSnapshot): PreparedSecretsRuntimeSnapshot {
|
function cloneSnapshot(snapshot: PreparedSecretsRuntimeSnapshot): PreparedSecretsRuntimeSnapshot {
|
||||||
return {
|
return {
|
||||||
|
sourceConfig: structuredClone(snapshot.sourceConfig),
|
||||||
config: structuredClone(snapshot.config),
|
config: structuredClone(snapshot.config),
|
||||||
authStores: snapshot.authStores.map((entry) => ({
|
authStores: snapshot.authStores.map((entry) => ({
|
||||||
agentDir: entry.agentDir,
|
agentDir: entry.agentDir,
|
||||||
@@ -290,6 +292,7 @@ export async function prepareSecretsRuntimeSnapshot(params: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
sourceConfig: structuredClone(params.config),
|
||||||
config: resolvedConfig,
|
config: resolvedConfig,
|
||||||
authStores,
|
authStores,
|
||||||
warnings,
|
warnings,
|
||||||
|
|||||||
Reference in New Issue
Block a user