@askexenow/exe-os 0.8.83 → 0.8.86
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.
- package/dist/bin/backfill-conversations.js +746 -595
- package/dist/bin/backfill-responses.js +745 -594
- package/dist/bin/backfill-vectors.js +312 -226
- package/dist/bin/cleanup-stale-review-tasks.js +154 -21
- package/dist/bin/cli.js +14678 -12676
- package/dist/bin/exe-agent-config.js +242 -0
- package/dist/bin/exe-agent.js +100 -91
- package/dist/bin/exe-assign.js +1003 -854
- package/dist/bin/exe-boot.js +1420 -485
- package/dist/bin/exe-call.js +10 -0
- package/dist/bin/exe-cloud.js +29 -6
- package/dist/bin/exe-dispatch.js +572 -271
- package/dist/bin/exe-doctor.js +403 -6
- package/dist/bin/exe-export-behaviors.js +175 -72
- package/dist/bin/exe-forget.js +102 -3
- package/dist/bin/exe-gateway.js +796 -292
- package/dist/bin/exe-healthcheck.js +134 -1
- package/dist/bin/exe-heartbeat.js +172 -36
- package/dist/bin/exe-kill.js +175 -72
- package/dist/bin/exe-launch-agent.js +189 -76
- package/dist/bin/exe-link.js +927 -82
- package/dist/bin/exe-new-employee.js +60 -8
- package/dist/bin/exe-pending-messages.js +151 -19
- package/dist/bin/exe-pending-notifications.js +97 -2
- package/dist/bin/exe-pending-reviews.js +155 -22
- package/dist/bin/exe-rename.js +564 -23
- package/dist/bin/exe-review.js +231 -73
- package/dist/bin/exe-search.js +995 -228
- package/dist/bin/exe-session-cleanup.js +4930 -1664
- package/dist/bin/exe-settings.js +20 -5
- package/dist/bin/exe-start-codex.js +2598 -0
- package/dist/bin/exe-start.sh +15 -3
- package/dist/bin/exe-status.js +154 -21
- package/dist/bin/exe-team.js +97 -2
- package/dist/bin/git-sweep.js +1180 -363
- package/dist/bin/graph-backfill.js +175 -72
- package/dist/bin/graph-export.js +175 -72
- package/dist/bin/install.js +60 -7
- package/dist/bin/list-providers.js +1 -0
- package/dist/bin/scan-tasks.js +1185 -367
- package/dist/bin/setup.js +914 -270
- package/dist/bin/shard-migrate.js +175 -72
- package/dist/bin/update.js +1 -0
- package/dist/bin/wiki-sync.js +175 -72
- package/dist/gateway/index.js +792 -285
- package/dist/hooks/bug-report-worker.js +445 -135
- package/dist/hooks/commit-complete.js +1178 -361
- package/dist/hooks/error-recall.js +994 -228
- package/dist/hooks/ingest-worker.js +1799 -1234
- package/dist/hooks/ingest.js +3 -0
- package/dist/hooks/instructions-loaded.js +707 -97
- package/dist/hooks/notification.js +699 -89
- package/dist/hooks/post-compact.js +757 -109
- package/dist/hooks/pre-compact.js +1061 -244
- package/dist/hooks/pre-tool-use.js +787 -130
- package/dist/hooks/prompt-ingest-worker.js +242 -101
- package/dist/hooks/prompt-submit.js +1121 -299
- package/dist/hooks/response-ingest-worker.js +242 -101
- package/dist/hooks/session-end.js +4063 -397
- package/dist/hooks/session-start.js +1071 -254
- package/dist/hooks/stop.js +768 -120
- package/dist/hooks/subagent-stop.js +757 -109
- package/dist/hooks/summary-worker.js +1706 -1011
- package/dist/index.js +1821 -1098
- package/dist/lib/agent-config.js +167 -0
- package/dist/lib/cloud-sync.js +932 -88
- package/dist/lib/consolidation.js +2 -1
- package/dist/lib/database.js +642 -87
- package/dist/lib/db-daemon-client.js +503 -0
- package/dist/lib/device-registry.js +547 -7
- package/dist/lib/embedder.js +14 -28
- package/dist/lib/employee-templates.js +84 -74
- package/dist/lib/employees.js +9 -0
- package/dist/lib/exe-daemon-client.js +16 -29
- package/dist/lib/exe-daemon.js +2733 -1575
- package/dist/lib/hybrid-search.js +995 -228
- package/dist/lib/identity.js +87 -67
- package/dist/lib/keychain.js +9 -1
- package/dist/lib/messaging.js +103 -40
- package/dist/lib/reminders.js +91 -74
- package/dist/lib/runtime-table.js +16 -0
- package/dist/lib/schedules.js +96 -2
- package/dist/lib/session-wrappers.js +22 -0
- package/dist/lib/skill-learning.js +103 -85
- package/dist/lib/store.js +234 -73
- package/dist/lib/tasks.js +348 -134
- package/dist/lib/tmux-routing.js +422 -208
- package/dist/lib/token-spend.js +273 -0
- package/dist/lib/ws-client.js +11 -0
- package/dist/mcp/server.js +5742 -696
- package/dist/mcp/tools/complete-reminder.js +94 -77
- package/dist/mcp/tools/create-reminder.js +94 -77
- package/dist/mcp/tools/create-task.js +375 -152
- package/dist/mcp/tools/deactivate-behavior.js +95 -77
- package/dist/mcp/tools/list-reminders.js +94 -77
- package/dist/mcp/tools/list-tasks.js +99 -31
- package/dist/mcp/tools/send-message.js +108 -45
- package/dist/mcp/tools/update-task.js +162 -77
- package/dist/runtime/index.js +1075 -258
- package/dist/tui/App.js +1333 -506
- package/package.json +6 -1
- package/src/commands/exe/agent-config.md +27 -0
- package/src/commands/exe/cc-doctor.md +10 -0
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import crypto from "crypto";
|
|
6
|
-
|
|
7
|
-
// src/lib/database.ts
|
|
8
|
-
import { createClient } from "@libsql/client";
|
|
9
|
-
|
|
10
|
-
// src/lib/employees.ts
|
|
11
|
-
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
12
|
-
import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
|
|
13
|
-
import { execSync } from "child_process";
|
|
14
|
-
import path2 from "path";
|
|
15
|
-
import os2 from "os";
|
|
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
|
+
};
|
|
16
5
|
|
|
17
6
|
// src/lib/config.ts
|
|
18
7
|
import { readFile, writeFile, mkdir, chmod } from "fs/promises";
|
|
@@ -35,71 +24,92 @@ function resolveDataDir() {
|
|
|
35
24
|
}
|
|
36
25
|
return newDir;
|
|
37
26
|
}
|
|
38
|
-
var EXE_AI_DIR
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
27
|
+
var EXE_AI_DIR, DB_PATH, MODELS_DIR, CONFIG_PATH, LEGACY_LANCE_PATH, CURRENT_CONFIG_VERSION, DEFAULT_CONFIG;
|
|
28
|
+
var init_config = __esm({
|
|
29
|
+
"src/lib/config.ts"() {
|
|
30
|
+
"use strict";
|
|
31
|
+
EXE_AI_DIR = resolveDataDir();
|
|
32
|
+
DB_PATH = path.join(EXE_AI_DIR, "memories.db");
|
|
33
|
+
MODELS_DIR = path.join(EXE_AI_DIR, "models");
|
|
34
|
+
CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
|
|
35
|
+
LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
|
|
36
|
+
CURRENT_CONFIG_VERSION = 1;
|
|
37
|
+
DEFAULT_CONFIG = {
|
|
38
|
+
config_version: CURRENT_CONFIG_VERSION,
|
|
39
|
+
dbPath: DB_PATH,
|
|
40
|
+
modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
|
|
41
|
+
embeddingDim: 1024,
|
|
42
|
+
batchSize: 20,
|
|
43
|
+
flushIntervalMs: 1e4,
|
|
44
|
+
autoIngestion: true,
|
|
45
|
+
autoRetrieval: true,
|
|
46
|
+
searchMode: "hybrid",
|
|
47
|
+
hookSearchMode: "hybrid",
|
|
48
|
+
fileGrepEnabled: true,
|
|
49
|
+
splashEffect: true,
|
|
50
|
+
consolidationEnabled: true,
|
|
51
|
+
consolidationIntervalMs: 6 * 60 * 60 * 1e3,
|
|
52
|
+
consolidationModel: "claude-haiku-4-5-20251001",
|
|
53
|
+
consolidationMaxCallsPerRun: 20,
|
|
54
|
+
selfQueryRouter: true,
|
|
55
|
+
selfQueryModel: "claude-haiku-4-5-20251001",
|
|
56
|
+
rerankerEnabled: true,
|
|
57
|
+
scalingRoadmap: {
|
|
58
|
+
rerankerAutoTrigger: {
|
|
59
|
+
enabled: true,
|
|
60
|
+
broadQueryMinCardinality: 5e4,
|
|
61
|
+
fetchTopK: 150,
|
|
62
|
+
returnTopK: 5
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
graphRagEnabled: true,
|
|
66
|
+
wikiEnabled: false,
|
|
67
|
+
wikiUrl: "",
|
|
68
|
+
wikiApiKey: "",
|
|
69
|
+
wikiSyncIntervalMs: 30 * 60 * 1e3,
|
|
70
|
+
wikiWorkspaceMapping: {},
|
|
71
|
+
wikiAutoUpdate: true,
|
|
72
|
+
wikiAutoUpdateThreshold: 0.5,
|
|
73
|
+
wikiAutoUpdateCreateNew: true,
|
|
74
|
+
skillLearning: true,
|
|
75
|
+
skillThreshold: 3,
|
|
76
|
+
skillModel: "claude-haiku-4-5-20251001",
|
|
77
|
+
exeHeartbeat: {
|
|
78
|
+
enabled: true,
|
|
79
|
+
intervalSeconds: 60,
|
|
80
|
+
staleInProgressThresholdHours: 2
|
|
81
|
+
},
|
|
82
|
+
sessionLifecycle: {
|
|
83
|
+
idleKillEnabled: true,
|
|
84
|
+
idleKillTicksRequired: 3,
|
|
85
|
+
idleKillIntercomAckWindowMs: 1e4,
|
|
86
|
+
maxAutoInstances: 10
|
|
87
|
+
},
|
|
88
|
+
autoUpdate: {
|
|
89
|
+
checkOnBoot: true,
|
|
90
|
+
autoInstall: false,
|
|
91
|
+
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
92
|
+
}
|
|
93
|
+
};
|
|
99
94
|
}
|
|
100
|
-
};
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// src/mcp/tools/deactivate-behavior.ts
|
|
98
|
+
import { z } from "zod";
|
|
99
|
+
|
|
100
|
+
// src/lib/behaviors.ts
|
|
101
|
+
import crypto from "crypto";
|
|
102
|
+
|
|
103
|
+
// src/lib/database.ts
|
|
104
|
+
import { createClient } from "@libsql/client";
|
|
101
105
|
|
|
102
106
|
// src/lib/employees.ts
|
|
107
|
+
init_config();
|
|
108
|
+
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
109
|
+
import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
|
|
110
|
+
import { execSync } from "child_process";
|
|
111
|
+
import path2 from "path";
|
|
112
|
+
import os2 from "os";
|
|
103
113
|
var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
|
|
104
114
|
var DEFAULT_COORDINATOR_TEMPLATE_NAME = "exe";
|
|
105
115
|
var COORDINATOR_ROLE = "COO";
|
|
@@ -136,10 +146,17 @@ function getEmployee(employees, name) {
|
|
|
136
146
|
|
|
137
147
|
// src/lib/database.ts
|
|
138
148
|
var _resilientClient = null;
|
|
149
|
+
var _daemonClient = null;
|
|
139
150
|
function getClient() {
|
|
140
151
|
if (!_resilientClient) {
|
|
141
152
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
142
153
|
}
|
|
154
|
+
if (process.env.EXE_IS_DAEMON === "1") {
|
|
155
|
+
return _resilientClient;
|
|
156
|
+
}
|
|
157
|
+
if (_daemonClient && _daemonClient._isDaemonActive()) {
|
|
158
|
+
return _daemonClient;
|
|
159
|
+
}
|
|
143
160
|
return _resilientClient;
|
|
144
161
|
}
|
|
145
162
|
|
|
@@ -154,6 +171,7 @@ async function deactivateBehavior(id) {
|
|
|
154
171
|
}
|
|
155
172
|
|
|
156
173
|
// src/adapters/claude/active-agent.ts
|
|
174
|
+
init_config();
|
|
157
175
|
import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, mkdirSync, unlinkSync as unlinkSync2, readdirSync } from "fs";
|
|
158
176
|
import { execSync as execSync3 } from "child_process";
|
|
159
177
|
import path3 from "path";
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import crypto from "crypto";
|
|
6
|
-
|
|
7
|
-
// src/lib/database.ts
|
|
8
|
-
import { createClient } from "@libsql/client";
|
|
9
|
-
|
|
10
|
-
// src/lib/employees.ts
|
|
11
|
-
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
12
|
-
import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
|
|
13
|
-
import { execSync } from "child_process";
|
|
14
|
-
import path2 from "path";
|
|
15
|
-
import os2 from "os";
|
|
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
|
+
};
|
|
16
5
|
|
|
17
6
|
// src/lib/config.ts
|
|
18
7
|
import { readFile, writeFile, mkdir, chmod } from "fs/promises";
|
|
@@ -35,79 +24,107 @@ function resolveDataDir() {
|
|
|
35
24
|
}
|
|
36
25
|
return newDir;
|
|
37
26
|
}
|
|
38
|
-
var EXE_AI_DIR
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
27
|
+
var EXE_AI_DIR, DB_PATH, MODELS_DIR, CONFIG_PATH, LEGACY_LANCE_PATH, CURRENT_CONFIG_VERSION, DEFAULT_CONFIG;
|
|
28
|
+
var init_config = __esm({
|
|
29
|
+
"src/lib/config.ts"() {
|
|
30
|
+
"use strict";
|
|
31
|
+
EXE_AI_DIR = resolveDataDir();
|
|
32
|
+
DB_PATH = path.join(EXE_AI_DIR, "memories.db");
|
|
33
|
+
MODELS_DIR = path.join(EXE_AI_DIR, "models");
|
|
34
|
+
CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
|
|
35
|
+
LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
|
|
36
|
+
CURRENT_CONFIG_VERSION = 1;
|
|
37
|
+
DEFAULT_CONFIG = {
|
|
38
|
+
config_version: CURRENT_CONFIG_VERSION,
|
|
39
|
+
dbPath: DB_PATH,
|
|
40
|
+
modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
|
|
41
|
+
embeddingDim: 1024,
|
|
42
|
+
batchSize: 20,
|
|
43
|
+
flushIntervalMs: 1e4,
|
|
44
|
+
autoIngestion: true,
|
|
45
|
+
autoRetrieval: true,
|
|
46
|
+
searchMode: "hybrid",
|
|
47
|
+
hookSearchMode: "hybrid",
|
|
48
|
+
fileGrepEnabled: true,
|
|
49
|
+
splashEffect: true,
|
|
50
|
+
consolidationEnabled: true,
|
|
51
|
+
consolidationIntervalMs: 6 * 60 * 60 * 1e3,
|
|
52
|
+
consolidationModel: "claude-haiku-4-5-20251001",
|
|
53
|
+
consolidationMaxCallsPerRun: 20,
|
|
54
|
+
selfQueryRouter: true,
|
|
55
|
+
selfQueryModel: "claude-haiku-4-5-20251001",
|
|
56
|
+
rerankerEnabled: true,
|
|
57
|
+
scalingRoadmap: {
|
|
58
|
+
rerankerAutoTrigger: {
|
|
59
|
+
enabled: true,
|
|
60
|
+
broadQueryMinCardinality: 5e4,
|
|
61
|
+
fetchTopK: 150,
|
|
62
|
+
returnTopK: 5
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
graphRagEnabled: true,
|
|
66
|
+
wikiEnabled: false,
|
|
67
|
+
wikiUrl: "",
|
|
68
|
+
wikiApiKey: "",
|
|
69
|
+
wikiSyncIntervalMs: 30 * 60 * 1e3,
|
|
70
|
+
wikiWorkspaceMapping: {},
|
|
71
|
+
wikiAutoUpdate: true,
|
|
72
|
+
wikiAutoUpdateThreshold: 0.5,
|
|
73
|
+
wikiAutoUpdateCreateNew: true,
|
|
74
|
+
skillLearning: true,
|
|
75
|
+
skillThreshold: 3,
|
|
76
|
+
skillModel: "claude-haiku-4-5-20251001",
|
|
77
|
+
exeHeartbeat: {
|
|
78
|
+
enabled: true,
|
|
79
|
+
intervalSeconds: 60,
|
|
80
|
+
staleInProgressThresholdHours: 2
|
|
81
|
+
},
|
|
82
|
+
sessionLifecycle: {
|
|
83
|
+
idleKillEnabled: true,
|
|
84
|
+
idleKillTicksRequired: 3,
|
|
85
|
+
idleKillIntercomAckWindowMs: 1e4,
|
|
86
|
+
maxAutoInstances: 10
|
|
87
|
+
},
|
|
88
|
+
autoUpdate: {
|
|
89
|
+
checkOnBoot: true,
|
|
90
|
+
autoInstall: false,
|
|
91
|
+
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
92
|
+
}
|
|
93
|
+
};
|
|
99
94
|
}
|
|
100
|
-
};
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// src/mcp/tools/list-reminders.ts
|
|
98
|
+
import { z } from "zod";
|
|
99
|
+
|
|
100
|
+
// src/lib/reminders.ts
|
|
101
|
+
import crypto from "crypto";
|
|
102
|
+
|
|
103
|
+
// src/lib/database.ts
|
|
104
|
+
import { createClient } from "@libsql/client";
|
|
101
105
|
|
|
102
106
|
// src/lib/employees.ts
|
|
107
|
+
init_config();
|
|
108
|
+
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
109
|
+
import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
|
|
110
|
+
import { execSync } from "child_process";
|
|
111
|
+
import path2 from "path";
|
|
112
|
+
import os2 from "os";
|
|
103
113
|
var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
|
|
104
114
|
|
|
105
115
|
// src/lib/database.ts
|
|
106
116
|
var _resilientClient = null;
|
|
117
|
+
var _daemonClient = null;
|
|
107
118
|
function getClient() {
|
|
108
119
|
if (!_resilientClient) {
|
|
109
120
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
110
121
|
}
|
|
122
|
+
if (process.env.EXE_IS_DAEMON === "1") {
|
|
123
|
+
return _resilientClient;
|
|
124
|
+
}
|
|
125
|
+
if (_daemonClient && _daemonClient._isDaemonActive()) {
|
|
126
|
+
return _daemonClient;
|
|
127
|
+
}
|
|
111
128
|
return _resilientClient;
|
|
112
129
|
}
|
|
113
130
|
|
|
@@ -138,15 +138,22 @@ function getClient() {
|
|
|
138
138
|
if (!_resilientClient) {
|
|
139
139
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
140
140
|
}
|
|
141
|
+
if (process.env.EXE_IS_DAEMON === "1") {
|
|
142
|
+
return _resilientClient;
|
|
143
|
+
}
|
|
144
|
+
if (_daemonClient && _daemonClient._isDaemonActive()) {
|
|
145
|
+
return _daemonClient;
|
|
146
|
+
}
|
|
141
147
|
return _resilientClient;
|
|
142
148
|
}
|
|
143
|
-
var _resilientClient;
|
|
149
|
+
var _resilientClient, _daemonClient;
|
|
144
150
|
var init_database = __esm({
|
|
145
151
|
"src/lib/database.ts"() {
|
|
146
152
|
"use strict";
|
|
147
153
|
init_db_retry();
|
|
148
154
|
init_employees();
|
|
149
155
|
_resilientClient = null;
|
|
156
|
+
_daemonClient = null;
|
|
150
157
|
}
|
|
151
158
|
});
|
|
152
159
|
|
|
@@ -405,39 +412,75 @@ var init_provider_table = __esm({
|
|
|
405
412
|
}
|
|
406
413
|
});
|
|
407
414
|
|
|
408
|
-
// src/lib/
|
|
409
|
-
|
|
415
|
+
// src/lib/runtime-table.ts
|
|
416
|
+
var RUNTIME_TABLE;
|
|
417
|
+
var init_runtime_table = __esm({
|
|
418
|
+
"src/lib/runtime-table.ts"() {
|
|
419
|
+
"use strict";
|
|
420
|
+
RUNTIME_TABLE = {
|
|
421
|
+
codex: {
|
|
422
|
+
binary: "codex",
|
|
423
|
+
launchMode: "exec",
|
|
424
|
+
autoApproveFlag: "--full-auto",
|
|
425
|
+
inlineFlag: "--no-alt-screen",
|
|
426
|
+
apiKeyEnv: "OPENAI_API_KEY",
|
|
427
|
+
defaultModel: "gpt-5.4"
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
// src/lib/agent-config.ts
|
|
434
|
+
import { readFileSync as readFileSync4, writeFileSync as writeFileSync2, existsSync as existsSync4, mkdirSync } from "fs";
|
|
410
435
|
import path5 from "path";
|
|
436
|
+
var AGENT_CONFIG_PATH, DEFAULT_MODELS;
|
|
437
|
+
var init_agent_config = __esm({
|
|
438
|
+
"src/lib/agent-config.ts"() {
|
|
439
|
+
"use strict";
|
|
440
|
+
init_config();
|
|
441
|
+
init_runtime_table();
|
|
442
|
+
AGENT_CONFIG_PATH = path5.join(EXE_AI_DIR, "agent-config.json");
|
|
443
|
+
DEFAULT_MODELS = {
|
|
444
|
+
claude: "claude-opus-4",
|
|
445
|
+
codex: RUNTIME_TABLE.codex?.defaultModel ?? "gpt-5.4",
|
|
446
|
+
opencode: "minimax-m2.7"
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// src/lib/intercom-queue.ts
|
|
452
|
+
import { readFileSync as readFileSync5, writeFileSync as writeFileSync3, renameSync as renameSync3, existsSync as existsSync5, mkdirSync as mkdirSync2 } from "fs";
|
|
453
|
+
import path6 from "path";
|
|
411
454
|
import os5 from "os";
|
|
412
455
|
var QUEUE_PATH, TTL_MS, INTERCOM_LOG;
|
|
413
456
|
var init_intercom_queue = __esm({
|
|
414
457
|
"src/lib/intercom-queue.ts"() {
|
|
415
458
|
"use strict";
|
|
416
|
-
QUEUE_PATH =
|
|
459
|
+
QUEUE_PATH = path6.join(os5.homedir(), ".exe-os", "intercom-queue.json");
|
|
417
460
|
TTL_MS = 60 * 60 * 1e3;
|
|
418
|
-
INTERCOM_LOG =
|
|
461
|
+
INTERCOM_LOG = path6.join(os5.homedir(), ".exe-os", "intercom.log");
|
|
419
462
|
}
|
|
420
463
|
});
|
|
421
464
|
|
|
422
465
|
// src/lib/license.ts
|
|
423
|
-
import { readFileSync as
|
|
466
|
+
import { readFileSync as readFileSync6, writeFileSync as writeFileSync4, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
|
|
424
467
|
import { randomUUID } from "crypto";
|
|
425
|
-
import
|
|
468
|
+
import path7 from "path";
|
|
426
469
|
import { jwtVerify, importSPKI } from "jose";
|
|
427
470
|
var LICENSE_PATH, CACHE_PATH, DEVICE_ID_PATH;
|
|
428
471
|
var init_license = __esm({
|
|
429
472
|
"src/lib/license.ts"() {
|
|
430
473
|
"use strict";
|
|
431
474
|
init_config();
|
|
432
|
-
LICENSE_PATH =
|
|
433
|
-
CACHE_PATH =
|
|
434
|
-
DEVICE_ID_PATH =
|
|
475
|
+
LICENSE_PATH = path7.join(EXE_AI_DIR, "license.key");
|
|
476
|
+
CACHE_PATH = path7.join(EXE_AI_DIR, "license-cache.json");
|
|
477
|
+
DEVICE_ID_PATH = path7.join(EXE_AI_DIR, "device-id");
|
|
435
478
|
}
|
|
436
479
|
});
|
|
437
480
|
|
|
438
481
|
// src/lib/plan-limits.ts
|
|
439
|
-
import { readFileSync as
|
|
440
|
-
import
|
|
482
|
+
import { readFileSync as readFileSync7, existsSync as existsSync7 } from "fs";
|
|
483
|
+
import path8 from "path";
|
|
441
484
|
var CACHE_PATH2;
|
|
442
485
|
var init_plan_limits = __esm({
|
|
443
486
|
"src/lib/plan-limits.ts"() {
|
|
@@ -446,13 +489,13 @@ var init_plan_limits = __esm({
|
|
|
446
489
|
init_employees();
|
|
447
490
|
init_license();
|
|
448
491
|
init_config();
|
|
449
|
-
CACHE_PATH2 =
|
|
492
|
+
CACHE_PATH2 = path8.join(EXE_AI_DIR, "license-cache.json");
|
|
450
493
|
}
|
|
451
494
|
});
|
|
452
495
|
|
|
453
496
|
// src/lib/tmux-routing.ts
|
|
454
|
-
import { readFileSync as
|
|
455
|
-
import
|
|
497
|
+
import { readFileSync as readFileSync8, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, existsSync as existsSync8, appendFileSync } from "fs";
|
|
498
|
+
import path9 from "path";
|
|
456
499
|
import os6 from "os";
|
|
457
500
|
import { fileURLToPath } from "url";
|
|
458
501
|
function getMySession() {
|
|
@@ -466,7 +509,7 @@ function extractRootExe(name) {
|
|
|
466
509
|
}
|
|
467
510
|
function getParentExe(sessionKey) {
|
|
468
511
|
try {
|
|
469
|
-
const data = JSON.parse(
|
|
512
|
+
const data = JSON.parse(readFileSync8(path9.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
|
|
470
513
|
return data.parentExe || null;
|
|
471
514
|
} catch {
|
|
472
515
|
return null;
|
|
@@ -495,13 +538,15 @@ var init_tmux_routing = __esm({
|
|
|
495
538
|
init_cc_agent_support();
|
|
496
539
|
init_mcp_prefix();
|
|
497
540
|
init_provider_table();
|
|
541
|
+
init_agent_config();
|
|
542
|
+
init_runtime_table();
|
|
498
543
|
init_intercom_queue();
|
|
499
544
|
init_plan_limits();
|
|
500
545
|
init_employees();
|
|
501
|
-
SPAWN_LOCK_DIR =
|
|
502
|
-
SESSION_CACHE =
|
|
503
|
-
INTERCOM_LOG2 =
|
|
504
|
-
DEBOUNCE_FILE =
|
|
546
|
+
SPAWN_LOCK_DIR = path9.join(os6.homedir(), ".exe-os", "spawn-locks");
|
|
547
|
+
SESSION_CACHE = path9.join(os6.homedir(), ".exe-os", "session-cache");
|
|
548
|
+
INTERCOM_LOG2 = path9.join(os6.homedir(), ".exe-os", "intercom.log");
|
|
549
|
+
DEBOUNCE_FILE = path9.join(SESSION_CACHE, "intercom-debounce.json");
|
|
505
550
|
DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
|
|
506
551
|
}
|
|
507
552
|
});
|
|
@@ -532,10 +577,22 @@ var init_task_scope = __esm({
|
|
|
532
577
|
|
|
533
578
|
// src/lib/tasks-crud.ts
|
|
534
579
|
import crypto2 from "crypto";
|
|
535
|
-
import
|
|
580
|
+
import path10 from "path";
|
|
581
|
+
import os7 from "os";
|
|
536
582
|
import { execSync as execSync4 } from "child_process";
|
|
537
583
|
import { mkdir as mkdir3, writeFile as writeFile3, appendFile } from "fs/promises";
|
|
538
|
-
import { existsSync as
|
|
584
|
+
import { existsSync as existsSync9, readFileSync as readFileSync9 } from "fs";
|
|
585
|
+
function buildKeywordIndex() {
|
|
586
|
+
const idx = /* @__PURE__ */ new Map();
|
|
587
|
+
for (const [role, keywords] of Object.entries(LANE_KEYWORDS)) {
|
|
588
|
+
for (const kw of keywords) {
|
|
589
|
+
const existing = idx.get(kw) ?? [];
|
|
590
|
+
existing.push(role);
|
|
591
|
+
idx.set(kw, existing);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
return idx;
|
|
595
|
+
}
|
|
539
596
|
async function listTasks(input) {
|
|
540
597
|
const client = getClient();
|
|
541
598
|
const conditions = [];
|
|
@@ -586,17 +643,28 @@ async function listTasks(input) {
|
|
|
586
643
|
tokensWarnedAt: r.tokens_warned_at !== null ? Number(r.tokens_warned_at) : null
|
|
587
644
|
}));
|
|
588
645
|
}
|
|
646
|
+
var LANE_KEYWORDS, KEYWORD_INDEX;
|
|
589
647
|
var init_tasks_crud = __esm({
|
|
590
648
|
"src/lib/tasks-crud.ts"() {
|
|
591
649
|
"use strict";
|
|
592
650
|
init_database();
|
|
593
651
|
init_task_scope();
|
|
652
|
+
init_employees();
|
|
653
|
+
LANE_KEYWORDS = {
|
|
654
|
+
CMO: ["sales", "script", "pitch", "offer", "copy", "objection", "brand", "content", "seo", "marketing", "newsletter", "carousel", "social", "campaign"],
|
|
655
|
+
CTO: ["spec", "architecture", "migration", "schema", "database", "design doc", "adr", "security audit", "tech stack"],
|
|
656
|
+
"Principal Engineer": ["implement", "build", "fix", "commit", "refactor", "bug", "feature", "wire", "integration"],
|
|
657
|
+
"Staff Code Reviewer": ["critique", "verdict", "review", "audit", "code quality"],
|
|
658
|
+
"Content Production Specialist": ["render", "video", "image", "b-roll", "remotion", "animation", "thumbnail"],
|
|
659
|
+
"AI Product Lead": ["competitive", "analysis", "benchmark", "compare", "scout", "evaluate", "poc"]
|
|
660
|
+
};
|
|
661
|
+
KEYWORD_INDEX = buildKeywordIndex();
|
|
594
662
|
}
|
|
595
663
|
});
|
|
596
664
|
|
|
597
665
|
// src/lib/tasks-review.ts
|
|
598
|
-
import
|
|
599
|
-
import { existsSync as
|
|
666
|
+
import path11 from "path";
|
|
667
|
+
import { existsSync as existsSync10, readdirSync as readdirSync2, unlinkSync as unlinkSync3 } from "fs";
|
|
600
668
|
var init_tasks_review = __esm({
|
|
601
669
|
"src/lib/tasks-review.ts"() {
|
|
602
670
|
"use strict";
|
|
@@ -611,7 +679,7 @@ var init_tasks_review = __esm({
|
|
|
611
679
|
});
|
|
612
680
|
|
|
613
681
|
// src/lib/tasks-chain.ts
|
|
614
|
-
import
|
|
682
|
+
import path12 from "path";
|
|
615
683
|
import { readFile as readFile3, writeFile as writeFile4 } from "fs/promises";
|
|
616
684
|
var init_tasks_chain = __esm({
|
|
617
685
|
"src/lib/tasks-chain.ts"() {
|
|
@@ -635,8 +703,8 @@ var init_tasks_notify = __esm({
|
|
|
635
703
|
});
|
|
636
704
|
|
|
637
705
|
// src/lib/tasks.ts
|
|
638
|
-
import
|
|
639
|
-
import { writeFileSync as
|
|
706
|
+
import path13 from "path";
|
|
707
|
+
import { writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, unlinkSync as unlinkSync4 } from "fs";
|
|
640
708
|
var init_tasks = __esm({
|
|
641
709
|
"src/lib/tasks.ts"() {
|
|
642
710
|
"use strict";
|
|
@@ -656,7 +724,7 @@ var init_tasks = __esm({
|
|
|
656
724
|
|
|
657
725
|
// src/lib/project-name.ts
|
|
658
726
|
import { execSync as execSync5 } from "child_process";
|
|
659
|
-
import
|
|
727
|
+
import path14 from "path";
|
|
660
728
|
function getProjectName(cwd) {
|
|
661
729
|
const dir = cwd ?? process.cwd();
|
|
662
730
|
if (_cached2 && _cachedCwd === dir) return _cached2;
|
|
@@ -669,7 +737,7 @@ function getProjectName(cwd) {
|
|
|
669
737
|
timeout: 2e3,
|
|
670
738
|
stdio: ["pipe", "pipe", "pipe"]
|
|
671
739
|
}).trim();
|
|
672
|
-
repoRoot =
|
|
740
|
+
repoRoot = path14.dirname(gitCommonDir);
|
|
673
741
|
} catch {
|
|
674
742
|
repoRoot = execSync5("git rev-parse --show-toplevel", {
|
|
675
743
|
cwd: dir,
|
|
@@ -678,11 +746,11 @@ function getProjectName(cwd) {
|
|
|
678
746
|
stdio: ["pipe", "pipe", "pipe"]
|
|
679
747
|
}).trim();
|
|
680
748
|
}
|
|
681
|
-
_cached2 =
|
|
749
|
+
_cached2 = path14.basename(repoRoot);
|
|
682
750
|
_cachedCwd = dir;
|
|
683
751
|
return _cached2;
|
|
684
752
|
} catch {
|
|
685
|
-
_cached2 =
|
|
753
|
+
_cached2 = path14.basename(dir);
|
|
686
754
|
_cachedCwd = dir;
|
|
687
755
|
return _cached2;
|
|
688
756
|
}
|