@songsid/agend 2.1.2-beta.5 → 2.1.2-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.
@@ -204,7 +204,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
204
204
  changeInstancePauseState(name: string, action: "pause" | "wake"): Promise<"paused" | "awake" | "not_idle">;
205
205
  /** Apply a Settings edit to a ClassicBot channel without waiting for the poller. */
206
206
  restartClassicInstanceFromSettings(instanceName: string): Promise<void>;
207
- startInstance(name: string, config: InstanceConfig, topicMode: boolean): Promise<void>;
207
+ startInstance(name: string, config: InstanceConfig, topicMode: boolean, kind?: "fleet-topic" | "classic"): Promise<void>;
208
208
  /** Recreate a daemon for a marker-only paused instance after an explicit wake/delivery. */
209
209
  startPersistedPausedInstance(name: string): Promise<void>;
210
210
  /**
@@ -655,7 +655,7 @@ export class FleetManager {
655
655
  await new Promise(resolve => setTimeout(resolve, 250));
656
656
  await this.startClassicInstance(instanceName, this.classicChannels.getBackendByInstance(instanceName, this.fleetConfig?.defaults?.backend), this.classicChannels.getPreTaskCommand(channel.channelId, channel.adapterId), this.classicChannels.getModel(channel.channelId, channel.adapterId, this.fleetConfig?.defaults?.model), this.classicChannels.getAutoPauseAfter(channel.channelId, channel.adapterId, this.fleetConfig?.defaults?.auto_pause_after));
657
657
  }
658
- async startInstance(name, config, topicMode) {
658
+ async startInstance(name, config, topicMode, kind = "fleet-topic") {
659
659
  if (this.lifecycle.isPaused(name)) {
660
660
  this.logger.info({ name }, "Persisted paused instance — skipping startup");
661
661
  return;
@@ -671,7 +671,11 @@ export class FleetManager {
671
671
  this.ensureGeneralInstructions(config.working_directory, config.backend);
672
672
  }
673
673
  this.instanceProcessStatus.delete(name);
674
- await this.lifecycle.start(name, config, topicMode);
674
+ await this.lifecycle.start(name, config, topicMode, {
675
+ kind,
676
+ backend: config.backend ?? this.fleetConfig?.defaults?.backend ?? "claude-code",
677
+ model: this.resolveInstanceModel(name).display,
678
+ });
675
679
  // Auto-connect IPC — daemon.start() ensures socket is ready before resolving
676
680
  await this.connectIpcToInstance(name);
677
681
  }
@@ -4811,7 +4815,7 @@ When users create specialized instances, suggest these configurations:
4811
4815
  ...(preTaskCommand ? { pre_task_command: preTaskCommand } : {}),
4812
4816
  };
4813
4817
  const topicMode = this.fleetConfig?.channel?.mode === "topic";
4814
- await this.startInstance(instanceName, config, topicMode);
4818
+ await this.startInstance(instanceName, config, topicMode, "classic");
4815
4819
  }
4816
4820
  /** Handle /start slash command — register classic channel */
4817
4821
  async handleClassicStart(channelId, channelName, userId, guildId, adapterId, backend) {