@songsid/agend 2.1.0-beta.37 → 2.1.0-beta.38
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.
- package/dist/fleet-manager.js +16 -1
- package/dist/fleet-manager.js.map +1 -1
- package/dist/outbound-schemas.d.ts +1 -0
- package/dist/outbound-schemas.js +2 -0
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/scheduler/db.js +11 -3
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/types.d.ts +2 -0
- package/dist/scheduler/types.js.map +1 -1
- package/package.json +1 -1
package/dist/fleet-manager.js
CHANGED
|
@@ -2633,7 +2633,7 @@ export class FleetManager {
|
|
|
2633
2633
|
}
|
|
2634
2634
|
// ===================== Scheduler =====================
|
|
2635
2635
|
async handleScheduleTrigger(schedule) {
|
|
2636
|
-
const { target, reply_chat_id, reply_thread_id, message, label, id, source } = schedule;
|
|
2636
|
+
const { target, reply_chat_id, reply_thread_id, message, label, id, source, silent } = schedule;
|
|
2637
2637
|
const RATE_LIMIT_DEFER_THRESHOLD = 85;
|
|
2638
2638
|
const rl = this.statuslineWatcher.getRateLimits(target);
|
|
2639
2639
|
if (rl && rl.five_hour_pct > RATE_LIMIT_DEFER_THRESHOLD) {
|
|
@@ -2648,6 +2648,20 @@ export class FleetManager {
|
|
|
2648
2648
|
this.logger.info({ target, scheduleId: id, rateLimitPct: rl.five_hour_pct }, "Schedule deferred due to rate limit");
|
|
2649
2649
|
return;
|
|
2650
2650
|
}
|
|
2651
|
+
// Silent mode: paste directly to tmux pane — no channel message.
|
|
2652
|
+
if (silent) {
|
|
2653
|
+
const ipc = this.instanceIpcClients.get(target);
|
|
2654
|
+
if (ipc) {
|
|
2655
|
+
ipc.send({ type: "raw_paste", content: message });
|
|
2656
|
+
this.scheduler.recordRun(id, "delivered");
|
|
2657
|
+
this.logger.info({ target, scheduleId: id, label }, "Silent schedule injected via raw_paste");
|
|
2658
|
+
}
|
|
2659
|
+
else {
|
|
2660
|
+
this.scheduler.recordRun(id, "instance_offline", "IPC not connected");
|
|
2661
|
+
this.logger.warn({ target, scheduleId: id }, "Silent schedule: IPC not connected, skipping");
|
|
2662
|
+
}
|
|
2663
|
+
return;
|
|
2664
|
+
}
|
|
2651
2665
|
const schedulerDefaults = this.fleetConfig?.defaults.scheduler;
|
|
2652
2666
|
const retryCount = schedulerDefaults?.retry_count ?? 3;
|
|
2653
2667
|
const retryInterval = schedulerDefaults?.retry_interval_ms ?? 30_000;
|
|
@@ -2724,6 +2738,7 @@ export class FleetManager {
|
|
|
2724
2738
|
reply_thread_id: meta.thread_id || null,
|
|
2725
2739
|
label: payload.label,
|
|
2726
2740
|
timezone: payload.timezone,
|
|
2741
|
+
silent: !!(payload.silent),
|
|
2727
2742
|
};
|
|
2728
2743
|
result = this.scheduler.create(params);
|
|
2729
2744
|
break;
|