@askexenow/exe-os 0.9.167 → 0.9.169

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.
@@ -48,13 +48,6 @@ try {
48
48
  } catch {
49
49
  }
50
50
  var totalGB = os.totalmem() / (1024 * 1024 * 1024);
51
- if (totalGB <= 8) {
52
- process.stderr.write(
53
- `[deferred-restart] ${totalGB.toFixed(0)}GB system \u2014 skipping daemon spawn
54
- `
55
- );
56
- process.exit(0);
57
- }
58
51
  function resolvePackageRoot() {
59
52
  let dir = path.dirname(new URL(import.meta.url).pathname);
60
53
  for (let i = 0; i < 5; i++) {
@@ -35,11 +35,6 @@ var homedir = os.homedir;
35
35
  var EXE_DIR = path.join(homedir(), ".exe-os");
36
36
  function spawnDaemonInline(pkgRoot) {
37
37
  const totalGB = os.totalmem() / (1024 * 1024 * 1024);
38
- if (totalGB <= 8) {
39
- process.stderr.write(`exe-os: ${totalGB.toFixed(0)}GB system \u2014 skipping daemon spawn
40
- `);
41
- return;
42
- }
43
38
  const daemonPath = path.join(pkgRoot, "dist", "lib", "exe-daemon.js");
44
39
  if (!existsSync(daemonPath)) {
45
40
  process.stderr.write(`exe-os: daemon not found at ${daemonPath} \u2014 skipping
@@ -0,0 +1,66 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
3
+ // src/lib/bug-report-outbox.ts
4
+ import { readdirSync, readFileSync, writeFileSync } from "fs";
5
+ import path from "path";
6
+ import os from "os";
7
+ var OUTBOX_DIR = path.join(os.homedir(), ".exe-os", "bug-reports");
8
+ var SENT_MARKER = "upstream_sent: true";
9
+ var ENDPOINT = "https://api.askexe.com/v1/support/bug-reports";
10
+ var MAX_PER_FLUSH = 3;
11
+ async function flushBugReportOutbox() {
12
+ let sent = 0;
13
+ try {
14
+ const files = readdirSync(OUTBOX_DIR).filter((f) => f.endsWith(".md"));
15
+ if (files.length === 0) return 0;
16
+ let licenseKey;
17
+ try {
18
+ const configPath = path.join(os.homedir(), ".exe-os", "config.json");
19
+ const config = JSON.parse(readFileSync(configPath, "utf-8"));
20
+ licenseKey = config.cloud?.apiKey || config.license?.key;
21
+ } catch {
22
+ }
23
+ for (const file of files.slice(0, MAX_PER_FLUSH + 5)) {
24
+ if (sent >= MAX_PER_FLUSH) break;
25
+ const filePath = path.join(OUTBOX_DIR, file);
26
+ const content = readFileSync(filePath, "utf-8");
27
+ if (content.includes(SENT_MARKER)) continue;
28
+ const idMatch = content.match(/^id:\s*(.+)$/m);
29
+ const titleMatch = content.match(/^#\s*(.+)$/m);
30
+ const severityMatch = content.match(/^severity:\s*(.+)$/m);
31
+ const payload = {
32
+ id: idMatch?.[1]?.trim() ?? file.replace(".md", ""),
33
+ title: titleMatch?.[1]?.trim() ?? file,
34
+ severity: severityMatch?.[1]?.trim() ?? "p1",
35
+ markdown: content,
36
+ source: "outbox-flusher",
37
+ package_version: process.env.npm_package_version ?? "unknown"
38
+ };
39
+ try {
40
+ const resp = await fetch(ENDPOINT, {
41
+ method: "POST",
42
+ headers: {
43
+ "content-type": "application/json",
44
+ ...licenseKey ? { "x-exe-license-key": licenseKey } : {}
45
+ },
46
+ body: JSON.stringify(payload),
47
+ signal: AbortSignal.timeout(5e3)
48
+ // 5s max per report
49
+ });
50
+ if (resp.ok || resp.status === 409) {
51
+ writeFileSync(filePath, content + `
52
+ ${SENT_MARKER}
53
+ `);
54
+ sent++;
55
+ }
56
+ } catch {
57
+ break;
58
+ }
59
+ }
60
+ } catch {
61
+ }
62
+ return sent;
63
+ }
64
+ export {
65
+ flushBugReportOutbox
66
+ };
@@ -595,6 +595,11 @@ IMPORTANT: After completing your current task, you MUST address the new task abo
595
595
  } catch (e) {
596
596
  process.stderr.write("[prompt-submit] hook main handler: " + (e instanceof Error ? e.message : String(e)) + "\n");
597
597
  }
598
+ try {
599
+ const { flushBugReportOutbox } = await import("../bug-report-outbox-JYNTMFFL.js");
600
+ void flushBugReportOutbox();
601
+ } catch {
602
+ }
598
603
  setTimeout(() => process.exit(0), 150);
599
604
  });
600
605
  var SKIP_PROMPT_PATTERNS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.167",
3
+ "version": "0.9.169",
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",