@askexenow/exe-os 0.8.1 → 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 (106) hide show
  1. package/package.json +1 -1
  2. package/dist/bin/backfill-responses.js +0 -2064
  3. package/dist/bin/backfill-vectors.js +0 -1771
  4. package/dist/bin/cleanup-stale-review-tasks.js +0 -1468
  5. package/dist/bin/cli.js +0 -21371
  6. package/dist/bin/exe-agent.js +0 -2016
  7. package/dist/bin/exe-assign.js +0 -2176
  8. package/dist/bin/exe-boot.js +0 -6332
  9. package/dist/bin/exe-call.js +0 -341
  10. package/dist/bin/exe-cloud.js +0 -861
  11. package/dist/bin/exe-dispatch.js +0 -1159
  12. package/dist/bin/exe-doctor.js +0 -1786
  13. package/dist/bin/exe-export-behaviors.js +0 -1637
  14. package/dist/bin/exe-forget.js +0 -1784
  15. package/dist/bin/exe-gateway.js +0 -8140
  16. package/dist/bin/exe-healthcheck.js +0 -207
  17. package/dist/bin/exe-heartbeat.js +0 -1778
  18. package/dist/bin/exe-kill.js +0 -1622
  19. package/dist/bin/exe-launch-agent.js +0 -1847
  20. package/dist/bin/exe-link.js +0 -192
  21. package/dist/bin/exe-new-employee.js +0 -1384
  22. package/dist/bin/exe-pending-messages.js +0 -1576
  23. package/dist/bin/exe-pending-notifications.js +0 -1450
  24. package/dist/bin/exe-pending-reviews.js +0 -1598
  25. package/dist/bin/exe-repo-drift.js +0 -95
  26. package/dist/bin/exe-review.js +0 -1742
  27. package/dist/bin/exe-search.js +0 -3116
  28. package/dist/bin/exe-session-cleanup.js +0 -3360
  29. package/dist/bin/exe-settings.js +0 -365
  30. package/dist/bin/exe-status.js +0 -1661
  31. package/dist/bin/exe-team.js +0 -1453
  32. package/dist/bin/git-sweep.js +0 -2441
  33. package/dist/bin/graph-backfill.js +0 -2111
  34. package/dist/bin/graph-export.js +0 -1747
  35. package/dist/bin/install.js +0 -661
  36. package/dist/bin/list-providers.js +0 -140
  37. package/dist/bin/scan-tasks.js +0 -2039
  38. package/dist/bin/setup.js +0 -2717
  39. package/dist/bin/shard-migrate.js +0 -1637
  40. package/dist/bin/update.js +0 -98
  41. package/dist/bin/wiki-sync.js +0 -1657
  42. package/dist/gateway/index.js +0 -9256
  43. package/dist/hooks/bug-report-worker.js +0 -2903
  44. package/dist/hooks/commit-complete.js +0 -2364
  45. package/dist/hooks/error-recall.js +0 -3327
  46. package/dist/hooks/exe-heartbeat-hook.js +0 -237
  47. package/dist/hooks/ingest-worker.js +0 -5065
  48. package/dist/hooks/ingest.js +0 -695
  49. package/dist/hooks/instructions-loaded.js +0 -2069
  50. package/dist/hooks/notification.js +0 -1915
  51. package/dist/hooks/post-compact.js +0 -1940
  52. package/dist/hooks/pre-compact.js +0 -1935
  53. package/dist/hooks/pre-tool-use.js +0 -2380
  54. package/dist/hooks/prompt-ingest-worker.js +0 -2291
  55. package/dist/hooks/prompt-submit.js +0 -5189
  56. package/dist/hooks/response-ingest-worker.js +0 -2431
  57. package/dist/hooks/session-end.js +0 -2196
  58. package/dist/hooks/session-start.js +0 -3259
  59. package/dist/hooks/stop.js +0 -2025
  60. package/dist/hooks/subagent-stop.js +0 -1915
  61. package/dist/hooks/summary-worker.js +0 -2931
  62. package/dist/index.js +0 -12327
  63. package/dist/lib/cloud-sync.js +0 -500
  64. package/dist/lib/config.js +0 -235
  65. package/dist/lib/consolidation.js +0 -481
  66. package/dist/lib/crypto.js +0 -51
  67. package/dist/lib/database.js +0 -834
  68. package/dist/lib/device-registry.js +0 -1009
  69. package/dist/lib/embedder.js +0 -645
  70. package/dist/lib/employee-templates.js +0 -570
  71. package/dist/lib/employees.js +0 -182
  72. package/dist/lib/error-detector.js +0 -156
  73. package/dist/lib/exe-daemon-client.js +0 -456
  74. package/dist/lib/exe-daemon.js +0 -8699
  75. package/dist/lib/file-grep.js +0 -215
  76. package/dist/lib/hybrid-search.js +0 -3064
  77. package/dist/lib/identity-templates.js +0 -441
  78. package/dist/lib/identity.js +0 -228
  79. package/dist/lib/keychain.js +0 -145
  80. package/dist/lib/license.js +0 -382
  81. package/dist/lib/messaging.js +0 -1389
  82. package/dist/lib/reminders.js +0 -63
  83. package/dist/lib/schedules.js +0 -1525
  84. package/dist/lib/session-registry.js +0 -52
  85. package/dist/lib/skill-learning.js +0 -488
  86. package/dist/lib/status-brief.js +0 -240
  87. package/dist/lib/store.js +0 -1740
  88. package/dist/lib/task-router.js +0 -128
  89. package/dist/lib/tasks.js +0 -2585
  90. package/dist/lib/tmux-routing.js +0 -2969
  91. package/dist/lib/tmux-status.js +0 -261
  92. package/dist/lib/tmux-transport.js +0 -83
  93. package/dist/lib/transport.js +0 -128
  94. package/dist/lib/ws-auth.js +0 -19
  95. package/dist/lib/ws-client.js +0 -160
  96. package/dist/mcp/server.js +0 -10812
  97. package/dist/mcp/tools/complete-reminder.js +0 -67
  98. package/dist/mcp/tools/create-reminder.js +0 -52
  99. package/dist/mcp/tools/create-task.js +0 -1903
  100. package/dist/mcp/tools/deactivate-behavior.js +0 -268
  101. package/dist/mcp/tools/list-reminders.js +0 -62
  102. package/dist/mcp/tools/list-tasks.js +0 -491
  103. package/dist/mcp/tools/send-message.js +0 -1395
  104. package/dist/mcp/tools/update-task.js +0 -1807
  105. package/dist/runtime/index.js +0 -7201
  106. package/dist/tui/App.js +0 -17874
@@ -1,192 +0,0 @@
1
- #!/usr/bin/env node
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
- }) : x)(function(x) {
5
- if (typeof require !== "undefined") return require.apply(this, arguments);
6
- throw Error('Dynamic require of "' + x + '" is not supported');
7
- });
8
-
9
- // src/bin/exe-link.ts
10
- import { createInterface } from "readline";
11
-
12
- // src/lib/keychain.ts
13
- import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
14
- import { existsSync } from "fs";
15
- import path from "path";
16
- import crypto from "crypto";
17
- var SERVICE = "exe-mem";
18
- var ACCOUNT = "master-key";
19
- function getKeyDir() {
20
- return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path.join(process.env.HOME ?? "/tmp", ".exe-os");
21
- }
22
- function getKeyPath() {
23
- return path.join(getKeyDir(), "master.key");
24
- }
25
- async function tryKeytar() {
26
- try {
27
- return await import("keytar");
28
- } catch {
29
- return null;
30
- }
31
- }
32
- async function getMasterKey() {
33
- const keytar = await tryKeytar();
34
- if (keytar) {
35
- try {
36
- const stored = await keytar.getPassword(SERVICE, ACCOUNT);
37
- if (stored) {
38
- return Buffer.from(stored, "base64");
39
- }
40
- } catch {
41
- }
42
- }
43
- const keyPath = getKeyPath();
44
- if (!existsSync(keyPath)) {
45
- return null;
46
- }
47
- try {
48
- const content = await readFile(keyPath, "utf-8");
49
- return Buffer.from(content.trim(), "base64");
50
- } catch {
51
- return null;
52
- }
53
- }
54
- async function setMasterKey(key) {
55
- const b64 = key.toString("base64");
56
- const keytar = await tryKeytar();
57
- if (keytar) {
58
- try {
59
- await keytar.setPassword(SERVICE, ACCOUNT, b64);
60
- return;
61
- } catch {
62
- }
63
- }
64
- const dir = getKeyDir();
65
- await mkdir(dir, { recursive: true });
66
- const keyPath = getKeyPath();
67
- await writeFile(keyPath, b64 + "\n", "utf-8");
68
- await chmod(keyPath, 384);
69
- }
70
- function exportMnemonic(key) {
71
- if (key.length !== 32) {
72
- throw new Error(`Key must be 32 bytes, got ${key.length}`);
73
- }
74
- const hash = crypto.createHash("sha256").update(key).digest();
75
- const checksumByte = hash[0];
76
- let bits = "";
77
- for (const byte of key) {
78
- bits += byte.toString(2).padStart(8, "0");
79
- }
80
- bits += checksumByte.toString(2).padStart(8, "0");
81
- const words = [];
82
- let wordlist;
83
- try {
84
- const bip39 = __require("bip39");
85
- wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
86
- if (!wordlist) throw new Error("no wordlist");
87
- } catch {
88
- throw new Error("bip39 package required. Install with: npm install bip39");
89
- }
90
- for (let i = 0; i < 264; i += 11) {
91
- const index = parseInt(bits.slice(i, i + 11), 2);
92
- words.push(wordlist[index]);
93
- }
94
- return words.join(" ");
95
- }
96
- function importMnemonic(mnemonic) {
97
- const words = mnemonic.trim().split(/\s+/);
98
- if (words.length !== 24) {
99
- throw new Error(`Expected 24 words, got ${words.length}`);
100
- }
101
- let wordlist;
102
- try {
103
- const bip39 = __require("bip39");
104
- wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
105
- if (!wordlist) throw new Error("no wordlist");
106
- } catch {
107
- throw new Error("bip39 package required. Install with: npm install bip39");
108
- }
109
- let bits = "";
110
- for (const word of words) {
111
- const index = wordlist.indexOf(word.toLowerCase());
112
- if (index === -1) {
113
- throw new Error(`Invalid BIP39 word: "${word}"`);
114
- }
115
- bits += index.toString(2).padStart(11, "0");
116
- }
117
- const entropyBits = bits.slice(0, 256);
118
- const checksumBits = bits.slice(256, 264);
119
- const key = Buffer.alloc(32);
120
- for (let i = 0; i < 32; i++) {
121
- key[i] = parseInt(entropyBits.slice(i * 8, (i + 1) * 8), 2);
122
- }
123
- const hash = crypto.createHash("sha256").update(key).digest();
124
- const expectedChecksum = hash[0].toString(2).padStart(8, "0");
125
- if (checksumBits !== expectedChecksum) {
126
- throw new Error("Invalid mnemonic checksum");
127
- }
128
- return key;
129
- }
130
-
131
- // src/lib/is-main.ts
132
- import { realpathSync } from "fs";
133
- import { fileURLToPath } from "url";
134
- function isMainModule(importMetaUrl) {
135
- if (process.argv[1] == null) return false;
136
- try {
137
- const scriptPath = realpathSync(process.argv[1]);
138
- const modulePath = realpathSync(fileURLToPath(importMetaUrl));
139
- return scriptPath === modulePath;
140
- } catch {
141
- return importMetaUrl === `file://${process.argv[1]}` || importMetaUrl === new URL(process.argv[1], "file://").href;
142
- }
143
- }
144
-
145
- // src/bin/exe-link.ts
146
- async function main() {
147
- const mode = process.argv[2];
148
- if (mode === "export") {
149
- const key = await getMasterKey();
150
- if (!key) {
151
- console.error("No master key found. Run /exe-setup first.");
152
- process.exit(1);
153
- }
154
- const mnemonic = exportMnemonic(key);
155
- console.log("Your 24-word recovery phrase:\n");
156
- console.log(` ${mnemonic}
157
- `);
158
- console.log("Write this down and enter it on your new device with /exe-link import.");
159
- console.log("Anyone with this phrase can decrypt your memories.");
160
- } else if (mode === "import") {
161
- const rl = createInterface({ input: process.stdin, output: process.stdout });
162
- const mnemonic = await new Promise((resolve) => {
163
- rl.question("Paste your 24-word recovery phrase: ", (answer) => {
164
- rl.close();
165
- resolve(answer.trim());
166
- });
167
- });
168
- try {
169
- const key = importMnemonic(mnemonic);
170
- await setMasterKey(key);
171
- console.log("Master key imported and stored securely.");
172
- console.log("Run /exe-setup to configure sync and download the embedding model.");
173
- } catch (err) {
174
- console.error(err instanceof Error ? err.message : String(err));
175
- process.exit(1);
176
- }
177
- } else {
178
- console.error("Usage:");
179
- console.error(" exe-link export \u2014 show 24-word mnemonic for current key");
180
- console.error(" exe-link import \u2014 paste mnemonic to import key on new device");
181
- process.exit(1);
182
- }
183
- }
184
- if (isMainModule(import.meta.url)) {
185
- main().catch((err) => {
186
- console.error(err instanceof Error ? err.message : String(err));
187
- process.exit(1);
188
- });
189
- }
190
- export {
191
- main
192
- };