@askexenow/exe-os 0.9.203 → 0.9.205

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.
Files changed (222) hide show
  1. package/deploy/compose/init-db.sql +162 -0
  2. package/deploy/stack-manifests/v0.9.json +45 -1
  3. package/dist/{active-agent-EFWC3HGP.js → active-agent-4RUP4VYK.js} +2 -2
  4. package/dist/{active-agent-NXX5Z3LX.js → active-agent-VEML3XMS.js} +2 -2
  5. package/dist/{agentic-ontology-JS6DPKQB.js → agentic-ontology-FNJAKZF5.js} +1 -1
  6. package/dist/{backfill-metadata-PTACRLYK.js → backfill-metadata-BT4RLVMZ.js} +3 -3
  7. package/dist/{behaviors-WDIKLZA3.js → behaviors-LCPNHP5Q.js} +2 -2
  8. package/dist/bin/agentic-ontology-backfill.js +4 -4
  9. package/dist/bin/agentic-reflection-backfill.js +5 -5
  10. package/dist/bin/agentic-semantic-label.js +4 -4
  11. package/dist/bin/backfill-conversations.js +3 -3
  12. package/dist/bin/backfill-responses.js +3 -3
  13. package/dist/bin/backfill-vectors.js +4 -4
  14. package/dist/bin/bulk-sync-postgres.js +5 -5
  15. package/dist/bin/cleanup-stale-review-tasks.js +8 -8
  16. package/dist/bin/cli.js +12 -12
  17. package/dist/bin/exe-agent-config.js +1 -1
  18. package/dist/bin/exe-agent.js +3 -3
  19. package/dist/bin/exe-assign.js +4 -4
  20. package/dist/bin/exe-boot.js +15 -15
  21. package/dist/bin/exe-call.js +3 -3
  22. package/dist/bin/exe-cloud.js +3 -3
  23. package/dist/bin/exe-dispatch.js +8 -8
  24. package/dist/bin/exe-doctor.js +1 -1
  25. package/dist/bin/exe-export-behaviors.js +6 -6
  26. package/dist/bin/exe-forget.js +5 -5
  27. package/dist/bin/exe-gateway.js +5 -5
  28. package/dist/bin/exe-heartbeat.js +8 -8
  29. package/dist/bin/exe-kill.js +11 -11
  30. package/dist/bin/exe-launch-agent.js +9 -9
  31. package/dist/bin/exe-new-employee.js +5 -5
  32. package/dist/bin/exe-pending-messages.js +9 -9
  33. package/dist/bin/exe-pending-notifications.js +8 -8
  34. package/dist/bin/exe-pending-reviews.js +8 -8
  35. package/dist/bin/exe-rename.js +3 -3
  36. package/dist/bin/exe-review.js +10 -10
  37. package/dist/bin/exe-search.js +4 -4
  38. package/dist/bin/exe-session-cleanup.js +13 -13
  39. package/dist/bin/exe-settings.js +3 -3
  40. package/dist/bin/exe-start-codex.js +10 -10
  41. package/dist/bin/exe-start-opencode.js +7 -7
  42. package/dist/bin/exe-status.js +9 -9
  43. package/dist/bin/exe-team.js +2 -2
  44. package/dist/bin/git-sweep.js +8 -8
  45. package/dist/bin/graph-backfill.js +3 -3
  46. package/dist/bin/graph-export.js +4 -4
  47. package/dist/bin/import-history.js +4 -4
  48. package/dist/bin/install.js +5 -5
  49. package/dist/bin/intercom-check.js +4 -4
  50. package/dist/bin/orchestration-metrics.js +4 -3
  51. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  52. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  53. package/dist/bin/scan-tasks.js +8 -8
  54. package/dist/bin/setup.js +1 -1
  55. package/dist/bin/shard-migrate.js +3 -3
  56. package/dist/{capacity-monitor-TGSIL7W4.js → capacity-monitor-EPHJTSKF.js} +9 -9
  57. package/dist/{catchup-brief-ABL4NSAE.js → catchup-brief-HVITENL5.js} +10 -10
  58. package/dist/{chunk-25K6KNZ5.js → chunk-22GPB6FO.js} +58 -6
  59. package/dist/chunk-2THPPZF2.js +81 -0
  60. package/dist/{chunk-K3O4MWMS.js → chunk-3MHKTBHZ.js} +1 -0
  61. package/dist/{chunk-UY6RQK5F.js → chunk-3N4ZEPZI.js} +1 -1
  62. package/dist/{chunk-SN6Z3CBF.js → chunk-3PDZQICZ.js} +1 -1
  63. package/dist/{chunk-CGM6BIK3.js → chunk-3S3ERUUH.js} +1 -1
  64. package/dist/{chunk-5EW4GKGZ.js → chunk-434A3L6O.js} +1 -1
  65. package/dist/{chunk-BQ4U2SYC.js → chunk-4FNJPA5O.js} +1 -1
  66. package/dist/{chunk-O5RJH6GU.js → chunk-4RJD3GXL.js} +1 -1
  67. package/dist/{chunk-3K2BCD5Y.js → chunk-5HTEMMOJ.js} +21 -4
  68. package/dist/{chunk-SZDSQ3AW.js → chunk-6JORPKMR.js} +3 -3
  69. package/dist/{chunk-DAFEIA2M.js → chunk-6MOFCQFH.js} +124 -65
  70. package/dist/{chunk-K62M5FIM.js → chunk-6VVSXO3M.js} +4 -4
  71. package/dist/{chunk-SPMVTZ7Z.js → chunk-723DSUG3.js} +3 -3
  72. package/dist/{chunk-5POKNLFV.js → chunk-7DTEJAIC.js} +2 -2
  73. package/dist/{chunk-E66FQ7IN.js → chunk-7HIWJLXK.js} +1 -1
  74. package/dist/{chunk-IGRQE5Y5.js → chunk-BGLXECHT.js} +2 -2
  75. package/dist/{chunk-BYHFW5CT.js → chunk-COOX4FXM.js} +1 -1
  76. package/dist/{chunk-GZLGB72W.js → chunk-CXBLK3ZA.js} +1 -1
  77. package/dist/{chunk-MJNI3S5H.js → chunk-EDQ4GH2D.js} +2 -2
  78. package/dist/{chunk-GPK2WJXA.js → chunk-EF57I73W.js} +1 -1
  79. package/dist/{chunk-HXYL4QX6.js → chunk-EUMLEWXO.js} +2 -2
  80. package/dist/{chunk-RJCZY4BY.js → chunk-FMKD6N33.js} +86 -10
  81. package/dist/{chunk-RN6XYY7U.js → chunk-FYJCMGTD.js} +71 -0
  82. package/dist/{chunk-USQF2GGF.js → chunk-H7U7FPQF.js} +82 -6
  83. package/dist/{chunk-FMI7SCZJ.js → chunk-HLYNKMAG.js} +1 -1
  84. package/dist/{chunk-BGOQFJ2H.js → chunk-HMGIQNME.js} +3 -3
  85. package/dist/chunk-IR4L6K5L.js +147 -0
  86. package/dist/chunk-ITYWLFYC.js +609 -0
  87. package/dist/{chunk-FFECDA24.js → chunk-JUB74GFQ.js} +2 -2
  88. package/dist/{chunk-D4B6SVEC.js → chunk-MKOW4EXB.js} +1 -1
  89. package/dist/{chunk-XWM23YJO.js → chunk-MQX47XMP.js} +2 -2
  90. package/dist/{chunk-IXFE5R6T.js → chunk-MZ2BL3JP.js} +2 -2
  91. package/dist/{chunk-WGMHQVGX.js → chunk-O2JGR7EU.js} +83 -6
  92. package/dist/{chunk-BV3L2S54.js → chunk-P2ZIM765.js} +1 -1
  93. package/dist/{chunk-DEGQESR7.js → chunk-PHCK4KQW.js} +3 -3
  94. package/dist/{chunk-Y2W54BET.js → chunk-PXDR3UTB.js} +8 -8
  95. package/dist/{chunk-ETHQJXO3.js → chunk-PYLNOBNW.js} +1 -1
  96. package/dist/{chunk-HXNTQP4B.js → chunk-RN6DEMC7.js} +1 -1
  97. package/dist/{chunk-3WMXVABU.js → chunk-S4AXKNPT.js} +1 -1
  98. package/dist/{chunk-X2BTDYHZ.js → chunk-SEAFDIKF.js} +13 -1
  99. package/dist/{chunk-QLKRYO7O.js → chunk-TCBUBBTL.js} +8 -8
  100. package/dist/{chunk-ZQMOF6E7.js → chunk-THFFC43M.js} +1 -1
  101. package/dist/{chunk-XXHDXAZV.js → chunk-VG3VVFF5.js} +1 -1
  102. package/dist/{chunk-P4JQGT4Q.js → chunk-VH6WU3GK.js} +2 -2
  103. package/dist/{chunk-AH6MV6CC.js → chunk-W4BFBCZA.js} +3 -3
  104. package/dist/{chunk-PVVA5SY5.js → chunk-XSOKVFQ6.js} +14 -3
  105. package/dist/{chunk-JUTI2DXY.js → chunk-YCL4RHFY.js} +1 -1
  106. package/dist/{chunk-UXD5KOND.js → chunk-YGUWCJN2.js} +2 -2
  107. package/dist/{chunk-AUPGTF7I.js → chunk-YOXXZAOR.js} +2 -2
  108. package/dist/{chunk-GPNUPCTZ.js → chunk-YXHY5F34.js} +2 -2
  109. package/dist/{chunk-6FJ2TJYB.js → chunk-ZDK3M72Z.js} +1 -1
  110. package/dist/{chunk-6H6Q4MJC.js → chunk-ZIBSTUGU.js} +1 -1
  111. package/dist/{chunk-LIHR5DQF.js → chunk-ZXZJLVGD.js} +1 -1
  112. package/dist/{co-occurrence-A2SJL5AH.js → co-occurrence-TJRQ5V7W.js} +1 -1
  113. package/dist/{crdt-sync-SGAW6DJQ.js → crdt-sync-RI7XPXTI.js} +1 -1
  114. package/dist/{crm-webhook-FBENY6FW.js → crm-webhook-AVG4F2NB.js} +2 -2
  115. package/dist/{cto-delegation-gate-A53RLTJZ.js → cto-delegation-gate-ZTNJLSPO.js} +7 -7
  116. package/dist/{daemon-orchestration-3U3XXFG7.js → daemon-orchestration-AKICH7C5.js} +10 -10
  117. package/dist/{exe-drift-3OUOHWAI.js → exe-drift-BPVS4MOJ.js} +2 -2
  118. package/dist/{exe-export-AFXTJ63F.js → exe-export-LL4CXNLT.js} +4 -4
  119. package/dist/{exe-import-QRZBTBBG.js → exe-import-JNKAAJ5T.js} +4 -4
  120. package/dist/{exe-key-BXN7WPOX.js → exe-key-C5UQ77AT.js} +1 -1
  121. package/dist/{fast-db-init-YVJD4JT2.js → fast-db-init-UNK4BEEO.js} +1 -1
  122. package/dist/gateway/index.js +6 -6
  123. package/dist/{git-staleness-DBFCOX65.js → git-staleness-WTJFIPHH.js} +1 -1
  124. package/dist/{git-task-sweep-O5CH3MKA.js → git-task-sweep-PT3RIE6W.js} +8 -8
  125. package/dist/{global-procedures-SL2TTCED.js → global-procedures-ZPN7KZH5.js} +2 -2
  126. package/dist/{graph-auto-extract-JGNJ3BB7.js → graph-auto-extract-4M4J42NA.js} +1 -1
  127. package/dist/hooks/bug-report-worker.js +9 -9
  128. package/dist/hooks/codex-stop-task-finalizer.js +9 -9
  129. package/dist/hooks/commit-complete.js +10 -10
  130. package/dist/hooks/error-recall.js +5 -5
  131. package/dist/hooks/exe-heartbeat-hook.js +2 -2
  132. package/dist/hooks/ingest.js +5 -5
  133. package/dist/hooks/instructions-loaded.js +3 -3
  134. package/dist/hooks/manifest.json +19 -19
  135. package/dist/hooks/notification.js +3 -3
  136. package/dist/hooks/post-compact.js +9 -9
  137. package/dist/hooks/post-tool-combined.js +4 -4
  138. package/dist/hooks/pre-compact.js +10 -10
  139. package/dist/hooks/pre-tool-use.js +13 -13
  140. package/dist/hooks/prompt-submit.js +29 -18
  141. package/dist/hooks/session-end.js +13 -13
  142. package/dist/hooks/session-start.js +30 -7
  143. package/dist/hooks/stop.js +13 -13
  144. package/dist/hooks/subagent-stop.js +9 -9
  145. package/dist/hooks/summary-worker.js +13 -13
  146. package/dist/index.js +15 -15
  147. package/dist/{installer-TAPAEWRV.js → installer-3DE2IDUZ.js} +4 -4
  148. package/dist/{installer-5FI6CX62.js → installer-IYELX3KG.js} +4 -4
  149. package/dist/{installer-HNOVAUW6.js → installer-SCWIMZT7.js} +4 -4
  150. package/dist/lib/cloud-sync.js +3 -3
  151. package/dist/lib/consolidation.js +4 -4
  152. package/dist/lib/database.js +1 -1
  153. package/dist/lib/db.js +1 -1
  154. package/dist/lib/employee-templates.js +3 -3
  155. package/dist/lib/employees.js +1 -1
  156. package/dist/lib/exe-daemon.js +102 -27
  157. package/dist/lib/hybrid-search.js +4 -4
  158. package/dist/lib/identity.js +1 -1
  159. package/dist/lib/messaging.js +8 -8
  160. package/dist/lib/reminders.js +2 -2
  161. package/dist/lib/schedules.js +4 -4
  162. package/dist/lib/session-registry.js +9 -1
  163. package/dist/lib/skill-learning.js +3 -3
  164. package/dist/lib/store.js +3 -3
  165. package/dist/lib/task-router.js +2 -2
  166. package/dist/lib/tasks.js +8 -8
  167. package/dist/lib/tmux-routing.js +7 -7
  168. package/dist/lib/token-spend.js +2 -2
  169. package/dist/mcp/register-tools.js +46 -46
  170. package/dist/mcp/server.js +47 -47
  171. package/dist/mcp/tools/complete-reminder.js +3 -3
  172. package/dist/mcp/tools/create-reminder.js +3 -3
  173. package/dist/mcp/tools/create-task.js +10 -10
  174. package/dist/mcp/tools/deactivate-behavior.js +4 -4
  175. package/dist/mcp/tools/list-reminders.js +3 -3
  176. package/dist/mcp/tools/list-tasks.js +10 -10
  177. package/dist/mcp/tools/send-message.js +10 -10
  178. package/dist/mcp/tools/update-task.js +9 -9
  179. package/dist/{mcp-http-config-6UAI2FAV.js → mcp-http-config-EWIT2DEN.js} +2 -2
  180. package/dist/{memory-cards-PVPUQ7MX.js → memory-cards-W4VTTFYM.js} +1 -1
  181. package/dist/{memory-graph-extractor-RP7ZXDTE.js → memory-graph-extractor-A3HRDXY6.js} +2 -2
  182. package/dist/{memory-poisoning-defense-DDBUHHGB.js → memory-poisoning-defense-MH6QBXVT.js} +1 -1
  183. package/dist/{memory-reflection-HLR26FXG.js → memory-reflection-RUCTWMQ5.js} +1 -1
  184. package/dist/{notifications-GHNYYITD.js → notifications-6GRSVIP6.js} +7 -7
  185. package/dist/{orchestration-events-2SVPXMK2.js → orchestration-events-MSJVUR4T.js} +6 -2
  186. package/dist/{orchestrator-3BDZ6OUC.js → orchestrator-QQKU4VM2.js} +9 -9
  187. package/dist/{plan-limits-QBNFIU45.js → plan-limits-NKUSDF3I.js} +2 -2
  188. package/dist/{projection-worker-B7HHFYEG.js → projection-worker-UEG6I5DV.js} +1 -1
  189. package/dist/{reranker-B3BOGR3A.js → reranker-JTDM3MV2.js} +1 -1
  190. package/dist/{review-polling-RUXU45AK.js → review-polling-MWBVXHG3.js} +8 -8
  191. package/dist/runtime/index.js +10 -10
  192. package/dist/{session-events-ICZPUGJN.js → session-events-FRB3UYJG.js} +8 -8
  193. package/dist/{session-kill-telemetry-OGFLFTYX.js → session-kill-telemetry-GPZUHBCT.js} +2 -2
  194. package/dist/{session-scope-UJI35BLD.js → session-scope-7BZTNB2X.js} +7 -7
  195. package/dist/{setup-wizard-M6ZZ2VNM.js → setup-wizard-2INM4CSL.js} +1 -1
  196. package/dist/{skill-refinement-WZL35CMY.js → skill-refinement-7C7X42Z5.js} +1 -1
  197. package/dist/{task-enforcement-AYHKGR45.js → task-enforcement-VB5P45ZM.js} +7 -7
  198. package/dist/{task-scope-EYAOY6YX.js → task-scope-ULC62J6G.js} +7 -7
  199. package/dist/{tasks-crud-K3UGPCPT.js → tasks-crud-IBSTM6ID.js} +9 -7
  200. package/dist/{tasks-review-J6LTVVO5.js → tasks-review-P4MCKBDT.js} +7 -7
  201. package/dist/telemetry-upload-Y3CPHI7M.js +214 -0
  202. package/dist/{token-budget-XU2QZEWX.js → token-budget-CO74EBTY.js} +1 -1
  203. package/dist/{tool-telemetry-OE57ERK7.js → tool-telemetry-5PX7A6TX.js} +3 -1
  204. package/dist/tui/App.js +15 -15
  205. package/dist/{tui-data-32OEC3DH.js → tui-data-YAT6A36V.js} +7 -7
  206. package/dist/{worker-gate-UIGQCEUE.js → worker-gate-27O2WEYU.js} +1 -1
  207. package/dist/{workflow-engine-IY7KO7DU.js → workflow-engine-4T36KCTQ.js} +2 -2
  208. package/dist/{worktree-VIXR2Z4J.js → worktree-QTCOX6RV.js} +7 -1
  209. package/package.json +1 -1
  210. package/release-notes.json +95 -95
  211. package/dist/chunk-64WZEXXA.js +0 -64
  212. package/dist/chunk-L63IOJ5N.js +0 -69
  213. package/dist/chunk-ZGQH3V2F.js +0 -254
  214. /package/dist/{chunk-3GFR2TX6.js → chunk-AF7A5IQ5.js} +0 -0
  215. /package/dist/{chunk-7SY5JOLR.js → chunk-ATKMIQXP.js} +0 -0
  216. /package/dist/{chunk-KCWIOR55.js → chunk-GONOOIFL.js} +0 -0
  217. /package/dist/{chunk-QQN7MHQG.js → chunk-ONCFSN5C.js} +0 -0
  218. /package/dist/{chunk-Q3MRTJLA.js → chunk-WVNWAV36.js} +0 -0
  219. /package/dist/{chunk-RH5NYRQH.js → chunk-XJQASQPO.js} +0 -0
  220. /package/dist/{chunk-LJA6RQ3L.js → chunk-YKCH4T4T.js} +0 -0
  221. /package/dist/{core-memory-VZ4YJVMA.js → core-memory-3QGHBERR.js} +0 -0
  222. /package/dist/{wiki-acl-NUUPHYWC.js → wiki-acl-WCBKBLGQ.js} +0 -0
@@ -0,0 +1,214 @@
1
+ import {
2
+ getOrchestrationMetrics
3
+ } from "./chunk-ITYWLFYC.js";
4
+ import "./chunk-3MHKTBHZ.js";
5
+ import "./chunk-HHECGHFW.js";
6
+ import "./chunk-FXU7JOXK.js";
7
+ import {
8
+ loadLicense,
9
+ readCachedLicenseToken
10
+ } from "./chunk-72DJ42IE.js";
11
+ import {
12
+ loadConfig
13
+ } from "./chunk-WXW3XGWX.js";
14
+ import "./chunk-LYH5HE24.js";
15
+ import "./chunk-MLKGABMK.js";
16
+
17
+ // src/lib/telemetry-upload.ts
18
+ import os from "os";
19
+ function isTelemetryEnabled() {
20
+ return process.env.EXE_TELEMETRY !== "0";
21
+ }
22
+ async function buildTelemetryPayload(sinceHours = 24) {
23
+ const sinceIso = new Date(Date.now() - sinceHours * 60 * 60 * 1e3).toISOString();
24
+ const metrics = sanitizeMetricsForUpload(await getOrchestrationMetrics({ sinceIso }));
25
+ let version = "unknown";
26
+ try {
27
+ const { readFileSync } = await import("fs");
28
+ const { join, dirname } = await import("path");
29
+ const { fileURLToPath } = await import("url");
30
+ let dir = dirname(fileURLToPath(import.meta.url));
31
+ for (let i = 0; i < 5; i++) {
32
+ try {
33
+ const pkg = JSON.parse(readFileSync(join(dir, "package.json"), "utf-8"));
34
+ if (pkg.version) {
35
+ version = pkg.version;
36
+ break;
37
+ }
38
+ } catch {
39
+ }
40
+ dir = dirname(dir);
41
+ }
42
+ } catch {
43
+ }
44
+ let toolUsage;
45
+ try {
46
+ const { getToolUsageSummary } = await import("./tool-telemetry-5PX7A6TX.js");
47
+ const summary = getToolUsageSummary();
48
+ if (Object.keys(summary).length > 0) toolUsage = summary;
49
+ } catch {
50
+ }
51
+ return {
52
+ version,
53
+ nodeVersion: process.version,
54
+ platform: process.platform,
55
+ arch: process.arch,
56
+ totalMemGB: Math.round(os.totalmem() / 1024 ** 3),
57
+ cpuCount: os.cpus().length,
58
+ uptimeHours: Math.round(os.uptime() / 3600),
59
+ metrics,
60
+ toolUsage
61
+ };
62
+ }
63
+ function sanitizeMetricsForUpload(metrics) {
64
+ const agentAliases = /* @__PURE__ */ new Map();
65
+ const reviewerAliases = /* @__PURE__ */ new Map();
66
+ const alias = (prefix, value, map) => {
67
+ if (!map.has(value)) map.set(value, `${prefix}_${map.size + 1}`);
68
+ return map.get(value);
69
+ };
70
+ return {
71
+ ...metrics,
72
+ resumeStorms: metrics.resumeStorms.map((storm) => ({
73
+ ...storm,
74
+ agentId: alias("agent", storm.agentId, agentAliases)
75
+ })),
76
+ reviewerBottlenecks: metrics.reviewerBottlenecks.map((bottleneck) => ({
77
+ ...bottleneck,
78
+ reviewer: alias("reviewer", bottleneck.reviewer, reviewerAliases)
79
+ })),
80
+ reviewerBacklogs: metrics.reviewerBacklogs.map((backlog) => ({
81
+ ...backlog,
82
+ reviewer: alias("reviewer", backlog.reviewer, reviewerAliases)
83
+ }))
84
+ };
85
+ }
86
+ var OUTBOX_DIR_NAME = "telemetry-outbox";
87
+ var MAX_OUTBOX_FILES = 30;
88
+ async function getOutboxDir() {
89
+ const { join } = await import("path");
90
+ const { homedir } = await import("os");
91
+ const dir = join(homedir(), ".exe-os", OUTBOX_DIR_NAME);
92
+ const { mkdirSync } = await import("fs");
93
+ mkdirSync(dir, { recursive: true });
94
+ return dir;
95
+ }
96
+ async function persistToOutbox(payload) {
97
+ try {
98
+ const { join } = await import("path");
99
+ const { writeFileSync, readdirSync, unlinkSync } = await import("fs");
100
+ const dir = await getOutboxDir();
101
+ const file = join(dir, `${Date.now()}.json`);
102
+ writeFileSync(file, JSON.stringify(payload), "utf-8");
103
+ const files = readdirSync(dir).filter((f) => f.endsWith(".json")).sort();
104
+ while (files.length > MAX_OUTBOX_FILES) {
105
+ try {
106
+ unlinkSync(join(dir, files.shift()));
107
+ } catch {
108
+ }
109
+ }
110
+ } catch {
111
+ }
112
+ }
113
+ async function drainOutbox(sendFn) {
114
+ let sent = 0;
115
+ try {
116
+ const { join } = await import("path");
117
+ const { readFileSync, readdirSync, unlinkSync } = await import("fs");
118
+ const dir = await getOutboxDir();
119
+ const files = readdirSync(dir).filter((f) => f.endsWith(".json")).sort();
120
+ for (const file of files.slice(0, 5)) {
121
+ try {
122
+ const payload = JSON.parse(readFileSync(join(dir, file), "utf-8"));
123
+ const result = await sendFn(payload);
124
+ if (result === "sent") {
125
+ unlinkSync(join(dir, file));
126
+ sent++;
127
+ }
128
+ } catch {
129
+ }
130
+ }
131
+ } catch {
132
+ }
133
+ return sent;
134
+ }
135
+ var KILLSWITCH_CACHE_FILE = "telemetry-killswitch.json";
136
+ var KILLSWITCH_CACHE_TTL_MS = 24 * 60 * 60 * 1e3;
137
+ async function isRemoteKillswitchActive() {
138
+ try {
139
+ const { join } = await import("path");
140
+ const { homedir } = await import("os");
141
+ const { readFileSync, writeFileSync, existsSync } = await import("fs");
142
+ const cachePath = join(homedir(), ".exe-os", KILLSWITCH_CACHE_FILE);
143
+ if (existsSync(cachePath)) {
144
+ try {
145
+ const cached = JSON.parse(readFileSync(cachePath, "utf-8"));
146
+ if (Date.now() - cached.checkedAt < KILLSWITCH_CACHE_TTL_MS) {
147
+ return cached.disabled;
148
+ }
149
+ } catch {
150
+ }
151
+ }
152
+ const response = await fetch("https://api.askexe.com/v1/support/telemetry/status", {
153
+ method: "GET",
154
+ signal: AbortSignal.timeout(5e3)
155
+ });
156
+ const disabled = response.ok ? (await response.json()).disabled === true : false;
157
+ try {
158
+ writeFileSync(cachePath, JSON.stringify({ disabled, checkedAt: Date.now() }), "utf-8");
159
+ } catch {
160
+ }
161
+ return disabled;
162
+ } catch {
163
+ return false;
164
+ }
165
+ }
166
+ async function sendTelemetryUpstream(payload) {
167
+ if (!isTelemetryEnabled()) return "disabled (EXE_TELEMETRY=0)";
168
+ if (await isRemoteKillswitchActive()) return "disabled (remote killswitch)";
169
+ const config = await loadConfig();
170
+ const routerUrl = process.env.API_ROUTER_URL?.replace(/\/+$/, "");
171
+ const endpoint = config.support?.bugReportEndpoint?.replace(/\/bug-reports\/?$/, "/telemetry") || (routerUrl ? `${routerUrl}/v1/support/telemetry` : "https://api.askexe.com/v1/support/telemetry");
172
+ const token = config.support?.bugReportToken || process.env.EXE_BUG_REPORT_TOKEN;
173
+ const licenseKey = loadLicense() || process.env.EXE_LICENSE_KEY || config.cloud?.apiKey;
174
+ const licenseToken = readCachedLicenseToken();
175
+ const doSend = async (p) => {
176
+ const parsed = new URL(endpoint);
177
+ if (parsed.protocol !== "https:" && !["localhost", "127.0.0.1", "::1"].includes(parsed.hostname)) {
178
+ return "failed: insecure endpoint rejected";
179
+ }
180
+ const response = await fetch(parsed, {
181
+ method: "POST",
182
+ headers: {
183
+ "content-type": "application/json",
184
+ ...token ? { authorization: `Bearer ${token}` } : {},
185
+ ...licenseKey ? { "x-exe-license-key": licenseKey } : {},
186
+ ...licenseToken ? { "x-exe-license-token": licenseToken } : {}
187
+ },
188
+ body: JSON.stringify(p),
189
+ signal: AbortSignal.timeout(15e3)
190
+ });
191
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
192
+ return "sent";
193
+ };
194
+ const retried = await drainOutbox(doSend);
195
+ try {
196
+ const result = await doSend(payload);
197
+ return retried > 0 ? `sent (+ ${retried} retried from outbox)` : result;
198
+ } catch (err) {
199
+ await persistToOutbox(payload);
200
+ return `failed (queued to outbox): ${err instanceof Error ? err.message : String(err)}`;
201
+ }
202
+ }
203
+ async function sendTelemetry(sinceHours = 24) {
204
+ const payload = await buildTelemetryPayload(sinceHours);
205
+ const upstream = await sendTelemetryUpstream(payload);
206
+ return { payload, upstream };
207
+ }
208
+ export {
209
+ buildTelemetryPayload,
210
+ isTelemetryEnabled,
211
+ sanitizeMetricsForUpload,
212
+ sendTelemetry,
213
+ sendTelemetryUpstream
214
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-K3O4MWMS.js";
3
+ } from "./chunk-3MHKTBHZ.js";
4
4
  import "./chunk-HHECGHFW.js";
5
5
  import "./chunk-FXU7JOXK.js";
6
6
  import "./chunk-WXW3XGWX.js";
@@ -1,13 +1,15 @@
1
1
  import {
2
2
  getToolUsageStats,
3
+ getToolUsageSummary,
3
4
  resetToolUsageStats,
4
5
  startToolTelemetryFlush,
5
6
  stopToolTelemetryFlush,
6
7
  wrapServerWithTelemetry
7
- } from "./chunk-X2BTDYHZ.js";
8
+ } from "./chunk-SEAFDIKF.js";
8
9
  import "./chunk-MLKGABMK.js";
9
10
  export {
10
11
  getToolUsageStats,
12
+ getToolUsageSummary,
11
13
  resetToolUsageStats,
12
14
  startToolTelemetryFlush,
13
15
  stopToolTelemetryFlush,
package/dist/tui/App.js CHANGED
@@ -1,35 +1,35 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getSessionPrompt
4
- } from "../chunk-BYHFW5CT.js";
5
- import "../chunk-BQ4U2SYC.js";
4
+ } from "../chunk-COOX4FXM.js";
5
+ import "../chunk-4FNJPA5O.js";
6
6
  import "../chunk-2ZYEO7U7.js";
7
7
  import {
8
8
  sessionScopeFilter
9
- } from "../chunk-RJCZY4BY.js";
10
- import "../chunk-RN6XYY7U.js";
9
+ } from "../chunk-FMKD6N33.js";
10
+ import "../chunk-FYJCMGTD.js";
11
11
  import "../chunk-QI4IXJN7.js";
12
- import "../chunk-64WZEXXA.js";
12
+ import "../chunk-IR4L6K5L.js";
13
13
  import "../chunk-5YDHBZCO.js";
14
14
  import "../chunk-G4QFC45N.js";
15
15
  import "../chunk-GZIAQYGI.js";
16
- import "../chunk-ZGQH3V2F.js";
16
+ import "../chunk-ITYWLFYC.js";
17
17
  import "../chunk-ZQX6UOP6.js";
18
18
  import "../chunk-6RX2XEET.js";
19
19
  import "../chunk-NGP6LSV2.js";
20
- import "../chunk-SN6Z3CBF.js";
20
+ import "../chunk-3PDZQICZ.js";
21
21
  import "../chunk-CVYC6DUW.js";
22
22
  import "../chunk-OPU3NYOO.js";
23
23
  import "../chunk-GJV3WDWM.js";
24
24
  import {
25
25
  orgBus
26
26
  } from "../chunk-MP2AFCGL.js";
27
- import "../chunk-HXNTQP4B.js";
27
+ import "../chunk-RN6DEMC7.js";
28
28
  import "../chunk-HYZV25LY.js";
29
29
  import {
30
30
  DEFAULT_COORDINATOR_TEMPLATE_NAME,
31
31
  isCoordinatorName
32
- } from "../chunk-K3O4MWMS.js";
32
+ } from "../chunk-3MHKTBHZ.js";
33
33
  import "../chunk-HHECGHFW.js";
34
34
  import "../chunk-FXU7JOXK.js";
35
35
  import "../chunk-72DJ42IE.js";
@@ -7402,7 +7402,7 @@ function useOrchestrator(enabled = true) {
7402
7402
  let cancelled = false;
7403
7403
  async function init() {
7404
7404
  try {
7405
- const { MultiAgentOrchestrator } = await import("../orchestrator-3BDZ6OUC.js");
7405
+ const { MultiAgentOrchestrator } = await import("../orchestrator-QQKU4VM2.js");
7406
7406
  const { getCoordinatorName, isCoordinatorRole, loadEmployees } = await import("../lib/employees.js");
7407
7407
  const { isExeSession } = await import("../lib/tmux-routing.js");
7408
7408
  const { listTmuxSessions, inTmux } = await import("../lib/tmux-status.js");
@@ -7443,7 +7443,7 @@ function useOrchestrator(enabled = true) {
7443
7443
  setTotalInProgress(health.totalInProgress);
7444
7444
  try {
7445
7445
  const { getClient } = await import("../lib/database.js");
7446
- const { sessionScopeFilter: sessionScopeFilter2 } = await import("../task-scope-EYAOY6YX.js");
7446
+ const { sessionScopeFilter: sessionScopeFilter2 } = await import("../task-scope-ULC62J6G.js");
7447
7447
  const client = getClient();
7448
7448
  const uoScope = sessionScopeFilter2();
7449
7449
  const result = await client.execute({
@@ -7475,7 +7475,7 @@ function useOrchestrator(enabled = true) {
7475
7475
  const spawnSession = useCallback5(
7476
7476
  async (agentId) => {
7477
7477
  try {
7478
- const { createTaskCore } = await import("../tasks-crud-K3UGPCPT.js");
7478
+ const { createTaskCore } = await import("../tasks-crud-IBSTM6ID.js");
7479
7479
  const { ensureEmployee } = await import("../lib/tmux-routing.js");
7480
7480
  const { getCoordinatorName } = await import("../lib/employees.js");
7481
7481
  await createTaskCore({
@@ -8097,7 +8097,7 @@ function TasksView({ onBack }) {
8097
8097
  const { withTrace } = await import("../telemetry-43X3GT3R.js");
8098
8098
  return withTrace("tui.tasks.loadTasks", async () => {
8099
8099
  try {
8100
- const { loadTaskList } = await import("../tui-data-32OEC3DH.js");
8100
+ const { loadTaskList } = await import("../tui-data-YAT6A36V.js");
8101
8101
  const tasks = await loadTaskList();
8102
8102
  setAllTasks(
8103
8103
  tasks.map((task) => ({
@@ -8930,7 +8930,7 @@ function TeamView({ onBack, onViewSessions }) {
8930
8930
  let projectsByEmployee = /* @__PURE__ */ new Map();
8931
8931
  let currentTaskByEmployee = /* @__PURE__ */ new Map();
8932
8932
  try {
8933
- const { loadTeamBadgeCounts, loadTeamDetailMetrics } = await import("../tui-data-32OEC3DH.js");
8933
+ const { loadTeamBadgeCounts, loadTeamDetailMetrics } = await import("../tui-data-YAT6A36V.js");
8934
8934
  setBadgeInFlight(true);
8935
8935
  const badgeCountsPromise = loadTeamBadgeCounts();
8936
8936
  const detailsPromise = loadTeamDetailMetrics(roster.map((emp) => emp.name));
@@ -9296,7 +9296,7 @@ function WikiView({ onBack }) {
9296
9296
  }
9297
9297
  setSearchLoading(true);
9298
9298
  try {
9299
- const { searchWikiMemoryRows } = await import("../tui-data-32OEC3DH.js");
9299
+ const { searchWikiMemoryRows } = await import("../tui-data-YAT6A36V.js");
9300
9300
  setSearchResults(await searchWikiMemoryRows(query));
9301
9301
  } catch {
9302
9302
  setSearchResults([]);
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  sessionScopeFilter
3
- } from "./chunk-RJCZY4BY.js";
4
- import "./chunk-RN6XYY7U.js";
3
+ } from "./chunk-FMKD6N33.js";
4
+ import "./chunk-FYJCMGTD.js";
5
5
  import "./chunk-QI4IXJN7.js";
6
- import "./chunk-64WZEXXA.js";
6
+ import "./chunk-IR4L6K5L.js";
7
7
  import "./chunk-5YDHBZCO.js";
8
8
  import "./chunk-G4QFC45N.js";
9
9
  import "./chunk-GZIAQYGI.js";
10
- import "./chunk-ZGQH3V2F.js";
10
+ import "./chunk-ITYWLFYC.js";
11
11
  import "./chunk-ZQX6UOP6.js";
12
12
  import "./chunk-6RX2XEET.js";
13
13
  import "./chunk-NGP6LSV2.js";
14
- import "./chunk-SN6Z3CBF.js";
14
+ import "./chunk-3PDZQICZ.js";
15
15
  import "./chunk-CVYC6DUW.js";
16
16
  import "./chunk-OPU3NYOO.js";
17
17
  import "./chunk-GJV3WDWM.js";
18
18
  import "./chunk-MP2AFCGL.js";
19
- import "./chunk-HXNTQP4B.js";
19
+ import "./chunk-RN6DEMC7.js";
20
20
  import "./chunk-HYZV25LY.js";
21
21
  import {
22
22
  getClient
23
- } from "./chunk-K3O4MWMS.js";
23
+ } from "./chunk-3MHKTBHZ.js";
24
24
  import "./chunk-HHECGHFW.js";
25
25
  import "./chunk-FXU7JOXK.js";
26
26
  import "./chunk-72DJ42IE.js";
@@ -6,7 +6,7 @@ import {
6
6
  releaseBackfillLock,
7
7
  tryAcquireBackfillLock,
8
8
  tryAcquireWorkerSlot
9
- } from "./chunk-6FJ2TJYB.js";
9
+ } from "./chunk-ZDK3M72Z.js";
10
10
  import "./chunk-WXW3XGWX.js";
11
11
  import "./chunk-LYH5HE24.js";
12
12
  import "./chunk-MLKGABMK.js";
@@ -10,8 +10,8 @@ import {
10
10
  persistWorkflows,
11
11
  runWorkflow,
12
12
  startWorkflow
13
- } from "./chunk-XXHDXAZV.js";
14
- import "./chunk-QQN7MHQG.js";
13
+ } from "./chunk-VG3VVFF5.js";
14
+ import "./chunk-ONCFSN5C.js";
15
15
  import "./chunk-MLKGABMK.js";
16
16
  export {
17
17
  advanceWorkflow,
@@ -6,7 +6,13 @@ import {
6
6
  isWorktreeDirty,
7
7
  worktreeBranch,
8
8
  worktreePath
9
- } from "./chunk-RN6XYY7U.js";
9
+ } from "./chunk-FYJCMGTD.js";
10
+ import "./chunk-ITYWLFYC.js";
11
+ import "./chunk-3MHKTBHZ.js";
12
+ import "./chunk-HHECGHFW.js";
13
+ import "./chunk-FXU7JOXK.js";
14
+ import "./chunk-WXW3XGWX.js";
15
+ import "./chunk-LYH5HE24.js";
10
16
  import "./chunk-MLKGABMK.js";
11
17
  export {
12
18
  cleanupWorktree,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.203",
3
+ "version": "0.9.205",
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",