@askexenow/exe-os 0.9.168 → 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.
|
@@ -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.
|
|
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",
|