@askexenow/exe-os 0.9.95 → 0.9.96

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.
@@ -33293,6 +33293,15 @@ function registerSupportConsolidated(server) {
33293
33293
  args.actual = args.actual_behavior;
33294
33294
  delete args.actual_behavior;
33295
33295
  }
33296
+ if (args.send_upstream === void 0) args.send_upstream = true;
33297
+ if (!args.classification) args.classification = "unclear";
33298
+ }
33299
+ if (action === "create_feature") {
33300
+ if (args.send_upstream === void 0) args.send_upstream = true;
33301
+ if (!args.category) args.category = "unclear";
33302
+ if (args.description && !args.use_case) {
33303
+ args.use_case = args.description;
33304
+ }
33296
33305
  }
33297
33306
  if ((action === "triage_bug" || action === "triage_feature") && args.notes && !args.triage_notes) {
33298
33307
  args.triage_notes = args.notes;
@@ -37152,6 +37161,73 @@ function startRssWatchdog() {
37152
37161
  process.stderr.write(`[exed] RSS watchdog started (warn: ${(RSS_WARN_BYTES / 1024 ** 3).toFixed(1)} GB, restart: ${(RSS_RESTART_BYTES / 1024 ** 3).toFixed(1)} GB)
37153
37162
  `);
37154
37163
  }
37164
+ var API_WATCHDOG_INTERVAL_MS = 3e4;
37165
+ var API_ERROR_PATTERNS = [
37166
+ /ConnectionRefused|ECONNREFUSED/i,
37167
+ /ETIMEDOUT|socket hang up/i,
37168
+ /Unable to connect to API/i,
37169
+ /overloaded_error|overloaded/i,
37170
+ /529|503 Service/,
37171
+ /rate.limit.*exceeded|429 Too Many/i
37172
+ ];
37173
+ var _apiWatchdogLastNudge = /* @__PURE__ */ new Map();
37174
+ function startApiWatchdog() {
37175
+ const tick = async () => {
37176
+ fired("api_watchdog");
37177
+ try {
37178
+ const { loadConfigSync: loadConfigSync2 } = await Promise.resolve().then(() => (init_config(), config_exports));
37179
+ const cfg = loadConfigSync2();
37180
+ const watchdogCfg = cfg.apiWatchdog;
37181
+ if (watchdogCfg?.enabled === false) return;
37182
+ const cooldownMs = (watchdogCfg?.cooldownMinutes ?? 10) * 6e4;
37183
+ const { execFileSync: execFileSync4 } = await import("child_process");
37184
+ let sessions;
37185
+ try {
37186
+ sessions = execFileSync4("tmux", ["list-sessions", "-F", "#{session_name}"], { timeout: 3e3 }).toString().trim().split("\n").filter(Boolean);
37187
+ } catch {
37188
+ return;
37189
+ }
37190
+ for (const session of sessions) {
37191
+ if (!session.includes("-")) continue;
37192
+ const lastNudge = _apiWatchdogLastNudge.get(session) ?? 0;
37193
+ if (Date.now() - lastNudge < cooldownMs) continue;
37194
+ let pane;
37195
+ try {
37196
+ pane = execFileSync4("tmux", ["capture-pane", "-t", session, "-p", "-S", "-30"], { timeout: 3e3 }).toString();
37197
+ } catch {
37198
+ continue;
37199
+ }
37200
+ const matchedPattern = API_ERROR_PATTERNS.find((p) => p.test(pane));
37201
+ if (!matchedPattern) continue;
37202
+ try {
37203
+ execFileSync4("tmux", ["send-keys", "-t", session, "", "Enter"], { timeout: 2e3 });
37204
+ _apiWatchdogLastNudge.set(session, Date.now());
37205
+ acted("api_watchdog");
37206
+ process.stderr.write(`[exed] API watchdog nudged ${session} (matched: ${matchedPattern.source})
37207
+ `);
37208
+ const { appendFileSync: appendFileSync5, mkdirSync: mkdirSync26 } = await import("fs");
37209
+ const { join: join4 } = await import("path");
37210
+ const logDir = join4(process.env.EXE_OS_DIR ?? join4(process.env.HOME ?? "", ".exe-os"), "logs");
37211
+ try {
37212
+ mkdirSync26(logDir, { recursive: true });
37213
+ } catch {
37214
+ }
37215
+ appendFileSync5(
37216
+ join4(logDir, "api-watchdog.jsonl"),
37217
+ JSON.stringify({ ts: (/* @__PURE__ */ new Date()).toISOString(), session, pattern: matchedPattern.source }) + "\n"
37218
+ );
37219
+ } catch {
37220
+ }
37221
+ }
37222
+ } catch (err) {
37223
+ process.stderr.write(`[exed] API watchdog error: ${err instanceof Error ? err.message : String(err)}
37224
+ `);
37225
+ }
37226
+ };
37227
+ const timer = setInterval(() => void tick(), API_WATCHDOG_INTERVAL_MS);
37228
+ timer.unref();
37229
+ process.stderr.write("[exed] API watchdog started (30s scan, 10m cooldown per session)\n");
37230
+ }
37155
37231
  function startBackgroundJobGuardrails() {
37156
37232
  const tick = async () => {
37157
37233
  fired("background_job_guardrails");
@@ -37344,6 +37420,7 @@ try {
37344
37420
  startSoftDeletePurge();
37345
37421
  startAutoUpdateCheck();
37346
37422
  startRssWatchdog();
37423
+ startApiWatchdog();
37347
37424
  startBackgroundJobGuardrails();
37348
37425
  startTaskEnforcementScanner();
37349
37426
  const { startToolTelemetryFlush: startToolTelemetryFlush2 } = await Promise.resolve().then(() => (init_tool_telemetry(), tool_telemetry_exports));
@@ -30365,6 +30365,15 @@ function registerSupportConsolidated(server2) {
30365
30365
  args.actual = args.actual_behavior;
30366
30366
  delete args.actual_behavior;
30367
30367
  }
30368
+ if (args.send_upstream === void 0) args.send_upstream = true;
30369
+ if (!args.classification) args.classification = "unclear";
30370
+ }
30371
+ if (action === "create_feature") {
30372
+ if (args.send_upstream === void 0) args.send_upstream = true;
30373
+ if (!args.category) args.category = "unclear";
30374
+ if (args.description && !args.use_case) {
30375
+ args.use_case = args.description;
30376
+ }
30368
30377
  }
30369
30378
  if ((action === "triage_bug" || action === "triage_feature") && args.notes && !args.triage_notes) {
30370
30379
  args.triage_notes = args.notes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.95",
3
+ "version": "0.9.96",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",