@songsid/agend 2.1.8-beta.6 → 2.1.8-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -967,6 +967,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
967
967
  private handleDecisionCrud;
968
968
  /** Resolve display name for an instance, fallback to instance name. */
969
969
  resolveDisplayName(instanceName: string): string;
970
+ /** Inherited keys such as __proto__ must never resolve to a mutable instance. */
971
+ private ownInstanceConfig;
970
972
  /** Persist identity to the instance's actual config store. Classic instances
971
973
  * are registry rows in classicBot.yaml, not fleet.yaml instance entries. */
972
974
  private setInstanceDisplayName;
@@ -6002,10 +6002,15 @@ export class FleetManager {
6002
6002
  ?? this.classicChannels?.getAll().find(ch => ch.instanceName === instanceName)?.displayName
6003
6003
  ?? instanceName;
6004
6004
  }
6005
+ /** Inherited keys such as __proto__ must never resolve to a mutable instance. */
6006
+ ownInstanceConfig(instanceName) {
6007
+ const instances = this.fleetConfig?.instances;
6008
+ return instances && Object.hasOwn(instances, instanceName) ? instances[instanceName] : undefined;
6009
+ }
6005
6010
  /** Persist identity to the instance's actual config store. Classic instances
6006
6011
  * are registry rows in classicBot.yaml, not fleet.yaml instance entries. */
6007
6012
  setInstanceDisplayName(instanceName, displayName) {
6008
- const fleetInstance = this.fleetConfig?.instances[instanceName];
6013
+ const fleetInstance = this.ownInstanceConfig(instanceName);
6009
6014
  if (fleetInstance) {
6010
6015
  fleetInstance.display_name = displayName;
6011
6016
  this.saveFleetConfig();
@@ -6014,7 +6019,7 @@ export class FleetManager {
6014
6019
  return this.classicChannels?.setDisplayNameByInstance(instanceName, displayName) ?? false;
6015
6020
  }
6016
6021
  setInstanceDescription(instanceName, description) {
6017
- const fleetInstance = this.fleetConfig?.instances[instanceName];
6022
+ const fleetInstance = this.ownInstanceConfig(instanceName);
6018
6023
  if (fleetInstance) {
6019
6024
  fleetInstance.description = description;
6020
6025
  this.saveFleetConfig();