@askexenow/exe-os 0.9.7 → 0.9.9

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 (101) hide show
  1. package/dist/bin/backfill-conversations.js +953 -105
  2. package/dist/bin/backfill-responses.js +952 -104
  3. package/dist/bin/backfill-vectors.js +956 -108
  4. package/dist/bin/cleanup-stale-review-tasks.js +802 -58
  5. package/dist/bin/cli.js +2292 -1070
  6. package/dist/bin/exe-agent-config.js +157 -101
  7. package/dist/bin/exe-agent.js +55 -29
  8. package/dist/bin/exe-assign.js +940 -92
  9. package/dist/bin/exe-boot.js +1424 -442
  10. package/dist/bin/exe-call.js +240 -141
  11. package/dist/bin/exe-cloud.js +198 -70
  12. package/dist/bin/exe-dispatch.js +951 -192
  13. package/dist/bin/exe-doctor.js +791 -51
  14. package/dist/bin/exe-export-behaviors.js +790 -42
  15. package/dist/bin/exe-forget.js +771 -31
  16. package/dist/bin/exe-gateway.js +1592 -521
  17. package/dist/bin/exe-heartbeat.js +850 -109
  18. package/dist/bin/exe-kill.js +783 -35
  19. package/dist/bin/exe-launch-agent.js +1030 -107
  20. package/dist/bin/exe-link.js +916 -110
  21. package/dist/bin/exe-new-employee.js +526 -217
  22. package/dist/bin/exe-pending-messages.js +1046 -62
  23. package/dist/bin/exe-pending-notifications.js +1318 -111
  24. package/dist/bin/exe-pending-reviews.js +1040 -72
  25. package/dist/bin/exe-rename.js +772 -59
  26. package/dist/bin/exe-review.js +772 -32
  27. package/dist/bin/exe-search.js +982 -128
  28. package/dist/bin/exe-session-cleanup.js +1180 -306
  29. package/dist/bin/exe-settings.js +185 -105
  30. package/dist/bin/exe-start-codex.js +886 -132
  31. package/dist/bin/exe-start-opencode.js +873 -119
  32. package/dist/bin/exe-status.js +803 -59
  33. package/dist/bin/exe-team.js +772 -32
  34. package/dist/bin/git-sweep.js +1046 -223
  35. package/dist/bin/graph-backfill.js +779 -31
  36. package/dist/bin/graph-export.js +785 -37
  37. package/dist/bin/install.js +632 -200
  38. package/dist/bin/scan-tasks.js +1055 -232
  39. package/dist/bin/setup.js +1419 -320
  40. package/dist/bin/shard-migrate.js +783 -35
  41. package/dist/bin/update.js +138 -49
  42. package/dist/bin/wiki-sync.js +782 -34
  43. package/dist/gateway/index.js +1444 -449
  44. package/dist/hooks/bug-report-worker.js +1141 -269
  45. package/dist/hooks/codex-stop-task-finalizer.js +4678 -0
  46. package/dist/hooks/commit-complete.js +1044 -221
  47. package/dist/hooks/error-recall.js +989 -135
  48. package/dist/hooks/exe-heartbeat-hook.js +99 -75
  49. package/dist/hooks/ingest-worker.js +4176 -3226
  50. package/dist/hooks/ingest.js +920 -168
  51. package/dist/hooks/instructions-loaded.js +874 -70
  52. package/dist/hooks/notification.js +860 -56
  53. package/dist/hooks/post-compact.js +881 -73
  54. package/dist/hooks/pre-compact.js +1050 -227
  55. package/dist/hooks/pre-tool-use.js +1084 -159
  56. package/dist/hooks/prompt-ingest-worker.js +1089 -164
  57. package/dist/hooks/prompt-submit.js +1469 -515
  58. package/dist/hooks/response-ingest-worker.js +1104 -179
  59. package/dist/hooks/session-end.js +1085 -251
  60. package/dist/hooks/session-start.js +1241 -231
  61. package/dist/hooks/stop.js +935 -109
  62. package/dist/hooks/subagent-stop.js +881 -73
  63. package/dist/hooks/summary-worker.js +1323 -307
  64. package/dist/index.js +1449 -452
  65. package/dist/lib/agent-config.js +28 -6
  66. package/dist/lib/cloud-sync.js +909 -115
  67. package/dist/lib/config.js +30 -10
  68. package/dist/lib/consolidation.js +42 -9
  69. package/dist/lib/database.js +739 -33
  70. package/dist/lib/db-daemon-client.js +73 -19
  71. package/dist/lib/db.js +2359 -0
  72. package/dist/lib/device-registry.js +760 -47
  73. package/dist/lib/embedder.js +201 -73
  74. package/dist/lib/employee-templates.js +30 -4
  75. package/dist/lib/employees.js +290 -86
  76. package/dist/lib/exe-daemon-client.js +187 -83
  77. package/dist/lib/exe-daemon.js +1696 -616
  78. package/dist/lib/hybrid-search.js +982 -128
  79. package/dist/lib/identity.js +43 -13
  80. package/dist/lib/license.js +133 -48
  81. package/dist/lib/messaging.js +167 -80
  82. package/dist/lib/reminders.js +35 -5
  83. package/dist/lib/schedules.js +772 -32
  84. package/dist/lib/skill-learning.js +54 -7
  85. package/dist/lib/store.js +779 -31
  86. package/dist/lib/task-router.js +94 -73
  87. package/dist/lib/tasks.js +298 -225
  88. package/dist/lib/tmux-routing.js +246 -172
  89. package/dist/lib/token-spend.js +52 -14
  90. package/dist/mcp/server.js +2893 -850
  91. package/dist/mcp/tools/complete-reminder.js +35 -5
  92. package/dist/mcp/tools/create-reminder.js +35 -5
  93. package/dist/mcp/tools/create-task.js +507 -323
  94. package/dist/mcp/tools/deactivate-behavior.js +40 -10
  95. package/dist/mcp/tools/list-reminders.js +35 -5
  96. package/dist/mcp/tools/list-tasks.js +277 -104
  97. package/dist/mcp/tools/send-message.js +129 -56
  98. package/dist/mcp/tools/update-task.js +1864 -188
  99. package/dist/runtime/index.js +1083 -259
  100. package/dist/tui/App.js +1501 -434
  101. package/package.json +3 -2
@@ -1,16 +1,20 @@
1
- // src/adapters/claude/hooks/exe-heartbeat-hook.ts
2
- import { execFileSync } from "child_process";
3
- import path4 from "path";
4
- import { fileURLToPath } from "url";
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __esm = (fn, res) => function __init() {
3
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
4
+ };
5
5
 
6
- // src/lib/active-agent.ts
7
- import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, mkdirSync, unlinkSync as unlinkSync2, readdirSync } from "fs";
8
- import { execSync as execSync3 } from "child_process";
9
- import path3 from "path";
6
+ // src/lib/secure-files.ts
7
+ import { chmodSync, existsSync, mkdirSync } from "fs";
8
+ import { chmod, mkdir } from "fs/promises";
9
+ var init_secure_files = __esm({
10
+ "src/lib/secure-files.ts"() {
11
+ "use strict";
12
+ }
13
+ });
10
14
 
11
15
  // src/lib/config.ts
12
- import { readFile, writeFile, mkdir, chmod } from "fs/promises";
13
- import { readFileSync, existsSync, renameSync } from "fs";
16
+ import { readFile, writeFile } from "fs/promises";
17
+ import { readFileSync, existsSync as existsSync2, renameSync } from "fs";
14
18
  import path from "path";
15
19
  import os from "os";
16
20
  function resolveDataDir() {
@@ -18,7 +22,7 @@ function resolveDataDir() {
18
22
  if (process.env.EXE_MEM_DIR) return process.env.EXE_MEM_DIR;
19
23
  const newDir = path.join(os.homedir(), ".exe-os");
20
24
  const legacyDir = path.join(os.homedir(), ".exe-mem");
21
- if (!existsSync(newDir) && existsSync(legacyDir)) {
25
+ if (!existsSync2(newDir) && existsSync2(legacyDir)) {
22
26
  try {
23
27
  renameSync(legacyDir, newDir);
24
28
  process.stderr.write(`[exe-os] Migrated data directory: ~/.exe-mem \u2192 ~/.exe-os
@@ -29,69 +33,87 @@ function resolveDataDir() {
29
33
  }
30
34
  return newDir;
31
35
  }
32
- var EXE_AI_DIR = resolveDataDir();
33
- var DB_PATH = path.join(EXE_AI_DIR, "memories.db");
34
- var MODELS_DIR = path.join(EXE_AI_DIR, "models");
35
- var CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
36
- var LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
37
- var CURRENT_CONFIG_VERSION = 1;
38
- var DEFAULT_CONFIG = {
39
- config_version: CURRENT_CONFIG_VERSION,
40
- dbPath: DB_PATH,
41
- modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
42
- embeddingDim: 1024,
43
- batchSize: 20,
44
- flushIntervalMs: 1e4,
45
- autoIngestion: true,
46
- autoRetrieval: true,
47
- searchMode: "hybrid",
48
- hookSearchMode: "hybrid",
49
- fileGrepEnabled: true,
50
- splashEffect: true,
51
- consolidationEnabled: true,
52
- consolidationIntervalMs: 6 * 60 * 60 * 1e3,
53
- consolidationModel: "claude-haiku-4-5-20251001",
54
- consolidationMaxCallsPerRun: 20,
55
- selfQueryRouter: true,
56
- selfQueryModel: "claude-haiku-4-5-20251001",
57
- rerankerEnabled: true,
58
- scalingRoadmap: {
59
- rerankerAutoTrigger: {
60
- enabled: true,
61
- broadQueryMinCardinality: 5e4,
62
- fetchTopK: 150,
63
- returnTopK: 5
64
- }
65
- },
66
- graphRagEnabled: true,
67
- wikiEnabled: false,
68
- wikiUrl: "",
69
- wikiApiKey: "",
70
- wikiSyncIntervalMs: 30 * 60 * 1e3,
71
- wikiWorkspaceMapping: {},
72
- wikiAutoUpdate: true,
73
- wikiAutoUpdateThreshold: 0.5,
74
- wikiAutoUpdateCreateNew: true,
75
- skillLearning: true,
76
- skillThreshold: 3,
77
- skillModel: "claude-haiku-4-5-20251001",
78
- exeHeartbeat: {
79
- enabled: true,
80
- intervalSeconds: 60,
81
- staleInProgressThresholdHours: 2
82
- },
83
- sessionLifecycle: {
84
- idleKillEnabled: true,
85
- idleKillTicksRequired: 3,
86
- idleKillIntercomAckWindowMs: 1e4,
87
- maxAutoInstances: 10
88
- },
89
- autoUpdate: {
90
- checkOnBoot: true,
91
- autoInstall: false,
92
- checkIntervalMs: 24 * 60 * 60 * 1e3
36
+ var EXE_AI_DIR, DB_PATH, MODELS_DIR, CONFIG_PATH, LEGACY_LANCE_PATH, CURRENT_CONFIG_VERSION, DEFAULT_CONFIG;
37
+ var init_config = __esm({
38
+ "src/lib/config.ts"() {
39
+ "use strict";
40
+ init_secure_files();
41
+ EXE_AI_DIR = resolveDataDir();
42
+ DB_PATH = path.join(EXE_AI_DIR, "memories.db");
43
+ MODELS_DIR = path.join(EXE_AI_DIR, "models");
44
+ CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
45
+ LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
46
+ CURRENT_CONFIG_VERSION = 1;
47
+ DEFAULT_CONFIG = {
48
+ config_version: CURRENT_CONFIG_VERSION,
49
+ dbPath: DB_PATH,
50
+ modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
51
+ embeddingDim: 1024,
52
+ batchSize: 20,
53
+ flushIntervalMs: 1e4,
54
+ autoIngestion: true,
55
+ autoRetrieval: true,
56
+ searchMode: "hybrid",
57
+ hookSearchMode: "hybrid",
58
+ fileGrepEnabled: true,
59
+ splashEffect: true,
60
+ consolidationEnabled: true,
61
+ consolidationIntervalMs: 6 * 60 * 60 * 1e3,
62
+ consolidationModel: "claude-haiku-4-5-20251001",
63
+ consolidationMaxCallsPerRun: 20,
64
+ selfQueryRouter: true,
65
+ selfQueryModel: "claude-haiku-4-5-20251001",
66
+ rerankerEnabled: true,
67
+ scalingRoadmap: {
68
+ rerankerAutoTrigger: {
69
+ enabled: true,
70
+ broadQueryMinCardinality: 5e4,
71
+ fetchTopK: 150,
72
+ returnTopK: 5
73
+ }
74
+ },
75
+ graphRagEnabled: true,
76
+ wikiEnabled: false,
77
+ wikiUrl: "",
78
+ wikiApiKey: "",
79
+ wikiSyncIntervalMs: 30 * 60 * 1e3,
80
+ wikiWorkspaceMapping: {},
81
+ wikiAutoUpdate: true,
82
+ wikiAutoUpdateThreshold: 0.5,
83
+ wikiAutoUpdateCreateNew: true,
84
+ skillLearning: true,
85
+ skillThreshold: 3,
86
+ skillModel: "claude-haiku-4-5-20251001",
87
+ exeHeartbeat: {
88
+ enabled: true,
89
+ intervalSeconds: 60,
90
+ staleInProgressThresholdHours: 2
91
+ },
92
+ sessionLifecycle: {
93
+ idleKillEnabled: true,
94
+ idleKillTicksRequired: 3,
95
+ idleKillIntercomAckWindowMs: 1e4,
96
+ maxAutoInstances: 10
97
+ },
98
+ autoUpdate: {
99
+ checkOnBoot: true,
100
+ autoInstall: false,
101
+ checkIntervalMs: 24 * 60 * 60 * 1e3
102
+ }
103
+ };
93
104
  }
94
- };
105
+ });
106
+
107
+ // src/adapters/claude/hooks/exe-heartbeat-hook.ts
108
+ import { execFileSync } from "child_process";
109
+ import path4 from "path";
110
+ import { fileURLToPath } from "url";
111
+
112
+ // src/lib/active-agent.ts
113
+ init_config();
114
+ import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2, unlinkSync as unlinkSync2, readdirSync } from "fs";
115
+ import { execSync as execSync3 } from "child_process";
116
+ import path3 from "path";
95
117
 
96
118
  // src/lib/session-key.ts
97
119
  import { execSync } from "child_process";
@@ -156,8 +178,9 @@ function getSessionKey() {
156
178
  }
157
179
 
158
180
  // src/lib/employees.ts
181
+ init_config();
159
182
  import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
160
- import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
183
+ import { existsSync as existsSync3, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
161
184
  import { execSync as execSync2 } from "child_process";
162
185
  import path2 from "path";
163
186
  import os2 from "os";
@@ -184,7 +207,7 @@ function canCoordinate(agentName, agentRole, employees = loadEmployeesSync()) {
184
207
  return agentName === "default" || isCoordinatorRole(agentRole) || isCoordinatorName(agentName, employees);
185
208
  }
186
209
  function loadEmployeesSync(employeesPath = EMPLOYEES_PATH) {
187
- if (!existsSync2(employeesPath)) return [];
210
+ if (!existsSync3(employeesPath)) return [];
188
211
  try {
189
212
  return JSON.parse(readFileSync2(employeesPath, "utf-8"));
190
213
  } catch {
@@ -194,6 +217,7 @@ function loadEmployeesSync(employeesPath = EMPLOYEES_PATH) {
194
217
  function getEmployee(employees, name) {
195
218
  return employees.find((e) => e.name.toLowerCase() === name.toLowerCase());
196
219
  }
220
+ var IDENTITY_DIR = path2.join(EXE_AI_DIR, "identity");
197
221
 
198
222
  // src/lib/active-agent.ts
199
223
  var CACHE_DIR = path3.join(EXE_AI_DIR, "session-cache");