@askexenow/exe-os 0.8.0 → 0.8.2

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 (107) hide show
  1. package/README.md +178 -79
  2. package/package.json +1 -1
  3. package/dist/bin/backfill-responses.js +0 -1912
  4. package/dist/bin/backfill-vectors.js +0 -1642
  5. package/dist/bin/cleanup-stale-review-tasks.js +0 -1339
  6. package/dist/bin/cli.js +0 -18800
  7. package/dist/bin/exe-agent.js +0 -1858
  8. package/dist/bin/exe-assign.js +0 -1957
  9. package/dist/bin/exe-boot.js +0 -6460
  10. package/dist/bin/exe-call.js +0 -197
  11. package/dist/bin/exe-cloud.js +0 -850
  12. package/dist/bin/exe-dispatch.js +0 -1146
  13. package/dist/bin/exe-doctor.js +0 -1657
  14. package/dist/bin/exe-export-behaviors.js +0 -1494
  15. package/dist/bin/exe-forget.js +0 -1627
  16. package/dist/bin/exe-gateway.js +0 -7732
  17. package/dist/bin/exe-healthcheck.js +0 -207
  18. package/dist/bin/exe-heartbeat.js +0 -1647
  19. package/dist/bin/exe-kill.js +0 -1479
  20. package/dist/bin/exe-launch-agent.js +0 -1704
  21. package/dist/bin/exe-link.js +0 -192
  22. package/dist/bin/exe-new-employee.js +0 -852
  23. package/dist/bin/exe-pending-messages.js +0 -1446
  24. package/dist/bin/exe-pending-notifications.js +0 -1321
  25. package/dist/bin/exe-pending-reviews.js +0 -1468
  26. package/dist/bin/exe-repo-drift.js +0 -95
  27. package/dist/bin/exe-review.js +0 -1590
  28. package/dist/bin/exe-search.js +0 -2651
  29. package/dist/bin/exe-session-cleanup.js +0 -3173
  30. package/dist/bin/exe-settings.js +0 -354
  31. package/dist/bin/exe-status.js +0 -1532
  32. package/dist/bin/exe-team.js +0 -1324
  33. package/dist/bin/git-sweep.js +0 -2185
  34. package/dist/bin/graph-backfill.js +0 -1968
  35. package/dist/bin/graph-export.js +0 -1604
  36. package/dist/bin/install.js +0 -656
  37. package/dist/bin/list-providers.js +0 -140
  38. package/dist/bin/scan-tasks.js +0 -1820
  39. package/dist/bin/setup.js +0 -951
  40. package/dist/bin/shard-migrate.js +0 -1494
  41. package/dist/bin/update.js +0 -95
  42. package/dist/bin/wiki-sync.js +0 -1514
  43. package/dist/gateway/index.js +0 -8848
  44. package/dist/hooks/bug-report-worker.js +0 -2743
  45. package/dist/hooks/commit-complete.js +0 -2108
  46. package/dist/hooks/error-recall.js +0 -2861
  47. package/dist/hooks/exe-heartbeat-hook.js +0 -232
  48. package/dist/hooks/ingest-worker.js +0 -4793
  49. package/dist/hooks/ingest.js +0 -684
  50. package/dist/hooks/instructions-loaded.js +0 -1880
  51. package/dist/hooks/notification.js +0 -1726
  52. package/dist/hooks/post-compact.js +0 -1751
  53. package/dist/hooks/pre-compact.js +0 -1746
  54. package/dist/hooks/pre-tool-use.js +0 -2191
  55. package/dist/hooks/prompt-ingest-worker.js +0 -2126
  56. package/dist/hooks/prompt-submit.js +0 -4693
  57. package/dist/hooks/response-ingest-worker.js +0 -1936
  58. package/dist/hooks/session-end.js +0 -1752
  59. package/dist/hooks/session-start.js +0 -2795
  60. package/dist/hooks/stop.js +0 -1835
  61. package/dist/hooks/subagent-stop.js +0 -1726
  62. package/dist/hooks/summary-worker.js +0 -2661
  63. package/dist/index.js +0 -11834
  64. package/dist/lib/cloud-sync.js +0 -495
  65. package/dist/lib/config.js +0 -222
  66. package/dist/lib/consolidation.js +0 -476
  67. package/dist/lib/crypto.js +0 -51
  68. package/dist/lib/database.js +0 -730
  69. package/dist/lib/device-registry.js +0 -900
  70. package/dist/lib/embedder.js +0 -632
  71. package/dist/lib/employee-templates.js +0 -543
  72. package/dist/lib/employees.js +0 -177
  73. package/dist/lib/error-detector.js +0 -156
  74. package/dist/lib/exe-daemon-client.js +0 -451
  75. package/dist/lib/exe-daemon.js +0 -8285
  76. package/dist/lib/file-grep.js +0 -199
  77. package/dist/lib/hybrid-search.js +0 -1819
  78. package/dist/lib/identity-templates.js +0 -320
  79. package/dist/lib/identity.js +0 -223
  80. package/dist/lib/keychain.js +0 -145
  81. package/dist/lib/license.js +0 -377
  82. package/dist/lib/messaging.js +0 -1376
  83. package/dist/lib/reminders.js +0 -63
  84. package/dist/lib/schedules.js +0 -1396
  85. package/dist/lib/session-registry.js +0 -52
  86. package/dist/lib/skill-learning.js +0 -477
  87. package/dist/lib/status-brief.js +0 -235
  88. package/dist/lib/store.js +0 -1551
  89. package/dist/lib/task-router.js +0 -62
  90. package/dist/lib/tasks.js +0 -2456
  91. package/dist/lib/tmux-routing.js +0 -2836
  92. package/dist/lib/tmux-status.js +0 -261
  93. package/dist/lib/tmux-transport.js +0 -83
  94. package/dist/lib/transport.js +0 -128
  95. package/dist/lib/ws-auth.js +0 -19
  96. package/dist/lib/ws-client.js +0 -160
  97. package/dist/mcp/server.js +0 -10538
  98. package/dist/mcp/tools/complete-reminder.js +0 -67
  99. package/dist/mcp/tools/create-reminder.js +0 -52
  100. package/dist/mcp/tools/create-task.js +0 -1853
  101. package/dist/mcp/tools/deactivate-behavior.js +0 -263
  102. package/dist/mcp/tools/list-reminders.js +0 -62
  103. package/dist/mcp/tools/list-tasks.js +0 -463
  104. package/dist/mcp/tools/send-message.js +0 -1382
  105. package/dist/mcp/tools/update-task.js +0 -1692
  106. package/dist/runtime/index.js +0 -6809
  107. package/dist/tui/App.js +0 -17479
@@ -1,197 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/bin/exe-call.ts
4
- import path3 from "path";
5
- import { mkdir as mkdir3, writeFile as writeFile3 } from "fs/promises";
6
- import { execSync as execSync2 } from "child_process";
7
- import { fileURLToPath as fileURLToPath2 } from "url";
8
-
9
- // src/lib/employees.ts
10
- import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
11
- import { existsSync as existsSync2, symlinkSync, readlinkSync } from "fs";
12
- import { execSync } from "child_process";
13
- import path2 from "path";
14
-
15
- // src/lib/config.ts
16
- import { readFile, writeFile, mkdir } from "fs/promises";
17
- import { readFileSync, existsSync, renameSync } from "fs";
18
- import path from "path";
19
- import os from "os";
20
- function resolveDataDir() {
21
- if (process.env.EXE_OS_DIR) return process.env.EXE_OS_DIR;
22
- if (process.env.EXE_MEM_DIR) return process.env.EXE_MEM_DIR;
23
- const newDir = path.join(os.homedir(), ".exe-os");
24
- const legacyDir = path.join(os.homedir(), ".exe-mem");
25
- if (!existsSync(newDir) && existsSync(legacyDir)) {
26
- try {
27
- renameSync(legacyDir, newDir);
28
- process.stderr.write(`[exe-os] Migrated data directory: ~/.exe-mem \u2192 ~/.exe-os
29
- `);
30
- } catch {
31
- return legacyDir;
32
- }
33
- }
34
- return newDir;
35
- }
36
- var EXE_AI_DIR = resolveDataDir();
37
- var DB_PATH = path.join(EXE_AI_DIR, "memories.db");
38
- var MODELS_DIR = path.join(EXE_AI_DIR, "models");
39
- var CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
40
- var LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
41
- var CURRENT_CONFIG_VERSION = 1;
42
- var DEFAULT_CONFIG = {
43
- config_version: CURRENT_CONFIG_VERSION,
44
- dbPath: DB_PATH,
45
- modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
46
- embeddingDim: 1024,
47
- batchSize: 20,
48
- flushIntervalMs: 1e4,
49
- autoIngestion: true,
50
- autoRetrieval: true,
51
- searchMode: "hybrid",
52
- hookSearchMode: "hybrid",
53
- fileGrepEnabled: true,
54
- splashEffect: true,
55
- consolidationEnabled: true,
56
- consolidationIntervalMs: 6 * 60 * 60 * 1e3,
57
- consolidationModel: "claude-haiku-4-5-20251001",
58
- consolidationMaxCallsPerRun: 20,
59
- selfQueryRouter: true,
60
- selfQueryModel: "claude-haiku-4-5-20251001",
61
- rerankerEnabled: true,
62
- scalingRoadmap: {
63
- rerankerAutoTrigger: {
64
- enabled: true,
65
- broadQueryMinCardinality: 5e4,
66
- fetchTopK: 150,
67
- returnTopK: 5
68
- }
69
- },
70
- graphRagEnabled: true,
71
- wikiEnabled: false,
72
- wikiUrl: "",
73
- wikiApiKey: "",
74
- wikiSyncIntervalMs: 30 * 60 * 1e3,
75
- wikiWorkspaceMapping: {
76
- exe: "Executive",
77
- yoshi: "Engineering",
78
- mari: "Marketing",
79
- tom: "Engineering",
80
- sasha: "Production"
81
- },
82
- wikiAutoUpdate: true,
83
- wikiAutoUpdateThreshold: 0.5,
84
- wikiAutoUpdateCreateNew: true,
85
- skillLearning: true,
86
- skillThreshold: 3,
87
- skillModel: "claude-haiku-4-5-20251001",
88
- exeHeartbeat: {
89
- enabled: true,
90
- intervalSeconds: 60,
91
- staleInProgressThresholdHours: 2
92
- },
93
- sessionLifecycle: {
94
- idleKillEnabled: true,
95
- idleKillTicksRequired: 3,
96
- idleKillIntercomAckWindowMs: 1e4,
97
- maxAutoInstances: 10
98
- }
99
- };
100
-
101
- // src/lib/employees.ts
102
- var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
103
- async function loadEmployees(employeesPath = EMPLOYEES_PATH) {
104
- if (!existsSync2(employeesPath)) {
105
- return [];
106
- }
107
- const raw = await readFile2(employeesPath, "utf-8");
108
- try {
109
- return JSON.parse(raw);
110
- } catch {
111
- return [];
112
- }
113
- }
114
- function getEmployee(employees, name) {
115
- return employees.find((e) => e.name === name);
116
- }
117
-
118
- // src/lib/is-main.ts
119
- import { realpathSync } from "fs";
120
- import { fileURLToPath } from "url";
121
- function isMainModule(importMetaUrl) {
122
- if (process.argv[1] == null) return false;
123
- try {
124
- const scriptPath = realpathSync(process.argv[1]);
125
- const modulePath = realpathSync(fileURLToPath(importMetaUrl));
126
- return scriptPath === modulePath;
127
- } catch {
128
- return importMetaUrl === `file://${process.argv[1]}` || importMetaUrl === new URL(process.argv[1], "file://").href;
129
- }
130
- }
131
-
132
- // src/bin/exe-call.ts
133
- function resolveEmployee(name, employees) {
134
- const resolved = name || "exe";
135
- const employee = getEmployee(employees, resolved);
136
- if (!employee) {
137
- throw new Error(
138
- `Employee '${resolved}' not found. Run /exe-team to see available employees.`
139
- );
140
- }
141
- return employee;
142
- }
143
- function buildSessionEnv(employee, sessionDir) {
144
- const env = {};
145
- for (const [key, value] of Object.entries(process.env)) {
146
- if (value !== void 0) {
147
- env[key] = value;
148
- }
149
- }
150
- env["CLAUDE_CONFIG_DIR"] = sessionDir;
151
- env["AGENT_ID"] = employee.name;
152
- env["AGENT_ROLE"] = employee.role;
153
- return env;
154
- }
155
- async function prepareSessionDir(name, systemPrompt, sessionsBase = path3.join(EXE_AI_DIR, "sessions")) {
156
- const sessionDir = path3.join(sessionsBase, name);
157
- await mkdir3(sessionDir, { recursive: true });
158
- await writeFile3(path3.join(sessionDir, "CLAUDE.md"), systemPrompt, "utf-8");
159
- return sessionDir;
160
- }
161
- if (isMainModule(import.meta.url)) {
162
- const name = process.argv[2];
163
- if (!name || name === "exe") {
164
- const __dirname = path3.dirname(fileURLToPath2(import.meta.url));
165
- const bootPath = path3.join(__dirname, "exe-boot.js");
166
- try {
167
- execSync2(`node "${bootPath}"`, { stdio: "inherit" });
168
- } catch {
169
- process.exit(1);
170
- }
171
- process.exit(0);
172
- }
173
- try {
174
- const employees = await loadEmployees();
175
- if (employees.length === 0) {
176
- console.error("No employees found. Run /exe first to initialize.");
177
- process.exit(1);
178
- }
179
- const employee = resolveEmployee(name, employees);
180
- const sessionDir = await prepareSessionDir(name, employee.systemPrompt);
181
- const env = buildSessionEnv(employee, sessionDir);
182
- console.log(
183
- `Launching ${employee.name} (${employee.role}) session...`
184
- );
185
- execSync2("claude --dangerously-skip-permissions", { stdio: "inherit", env });
186
- } catch (err) {
187
- console.error(
188
- err instanceof Error ? err.message : String(err)
189
- );
190
- process.exit(1);
191
- }
192
- }
193
- export {
194
- buildSessionEnv,
195
- prepareSessionDir,
196
- resolveEmployee
197
- };