@askexenow/exe-os 0.9.23 → 0.9.25
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 +5 -1
- package/dist/bin/backfill-responses.js +5 -1
- package/dist/bin/backfill-vectors.js +5 -1
- package/dist/bin/cleanup-stale-review-tasks.js +7 -2
- package/dist/bin/cli.js +45 -3
- package/dist/bin/exe-assign.js +5 -1
- package/dist/bin/exe-boot.js +6 -3
- package/dist/bin/exe-dispatch.js +8 -4
- package/dist/bin/exe-doctor.js +26 -5
- package/dist/bin/exe-export-behaviors.js +7 -2
- package/dist/bin/exe-forget.js +7 -2
- package/dist/bin/exe-gateway.js +6 -3
- package/dist/bin/exe-heartbeat.js +7 -2
- package/dist/bin/exe-kill.js +7 -2
- package/dist/bin/exe-launch-agent.js +5 -1
- package/dist/bin/exe-link.js +5 -1
- package/dist/bin/exe-new-employee.js +4 -0
- package/dist/bin/exe-pending-messages.js +7 -2
- package/dist/bin/exe-pending-notifications.js +7 -2
- package/dist/bin/exe-pending-reviews.js +7 -2
- package/dist/bin/exe-rename.js +5 -1
- package/dist/bin/exe-review.js +7 -2
- package/dist/bin/exe-search.js +5 -1
- package/dist/bin/exe-session-cleanup.js +6 -3
- package/dist/bin/exe-start-codex.js +40 -1
- package/dist/bin/exe-start-opencode.js +5 -1
- package/dist/bin/exe-start.sh +24 -4
- package/dist/bin/exe-status.js +7 -2
- package/dist/bin/exe-team.js +7 -2
- package/dist/bin/git-sweep.js +6 -3
- package/dist/bin/graph-backfill.js +5 -1
- package/dist/bin/graph-export.js +7 -2
- package/dist/bin/install.js +39 -0
- package/dist/bin/intercom-check.js +8 -4
- package/dist/bin/scan-tasks.js +8 -4
- package/dist/bin/setup.js +9 -1
- package/dist/bin/shard-migrate.js +5 -1
- package/dist/gateway/index.js +6 -3
- package/dist/hooks/bug-report-worker.js +8 -4
- package/dist/hooks/codex-stop-task-finalizer.js +7 -2
- package/dist/hooks/commit-complete.js +10 -7
- package/dist/hooks/error-recall.js +5 -1
- package/dist/hooks/ingest.js +5 -1
- package/dist/hooks/instructions-loaded.js +7 -2
- package/dist/hooks/notification.js +7 -2
- package/dist/hooks/post-compact.js +7 -2
- package/dist/hooks/post-tool-combined.js +5 -1
- package/dist/hooks/pre-compact.js +8 -4
- package/dist/hooks/pre-tool-use.js +7 -2
- package/dist/hooks/prompt-submit.js +6 -3
- package/dist/hooks/session-end.js +8 -4
- package/dist/hooks/session-start.js +7 -2
- package/dist/hooks/stop.js +7 -2
- package/dist/hooks/subagent-stop.js +7 -2
- package/dist/hooks/summary-worker.js +5 -1
- package/dist/index.js +6 -3
- package/dist/lib/cloud-sync.js +5 -1
- package/dist/lib/database.js +5 -1
- package/dist/lib/db.js +5 -1
- package/dist/lib/device-registry.js +5 -1
- package/dist/lib/exe-daemon.js +6 -3
- package/dist/lib/hybrid-search.js +5 -1
- package/dist/lib/schedules.js +5 -1
- package/dist/lib/session-wrappers.js +4 -0
- package/dist/lib/store.js +5 -1
- package/dist/lib/tasks.js +1 -2
- package/dist/lib/tmux-routing.js +1 -2
- package/dist/mcp/server.js +29 -7
- package/dist/mcp/tools/create-task.js +1 -2
- package/dist/mcp/tools/update-task.js +1 -2
- package/dist/runtime/index.js +6 -3
- package/dist/tui/App.js +6 -3
- package/package.json +1 -1
|
@@ -1680,7 +1680,8 @@ __export(database_exports, {
|
|
|
1680
1680
|
initDaemonClient: () => initDaemonClient,
|
|
1681
1681
|
initDatabase: () => initDatabase,
|
|
1682
1682
|
initTurso: () => initTurso,
|
|
1683
|
-
isInitialized: () => isInitialized
|
|
1683
|
+
isInitialized: () => isInitialized,
|
|
1684
|
+
setExternalClient: () => setExternalClient
|
|
1684
1685
|
});
|
|
1685
1686
|
import { createClient } from "@libsql/client";
|
|
1686
1687
|
async function initDatabase(config) {
|
|
@@ -1727,6 +1728,9 @@ async function initDatabase(config) {
|
|
|
1727
1728
|
function isInitialized() {
|
|
1728
1729
|
return _adapterClient !== null || _client !== null;
|
|
1729
1730
|
}
|
|
1731
|
+
function setExternalClient(client) {
|
|
1732
|
+
_adapterClient = client;
|
|
1733
|
+
}
|
|
1730
1734
|
function getClient() {
|
|
1731
1735
|
if (!_adapterClient) {
|
|
1732
1736
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -4602,7 +4606,7 @@ init_tmux_routing();
|
|
|
4602
4606
|
|
|
4603
4607
|
// src/bin/fast-db-init.ts
|
|
4604
4608
|
async function fastDbInit() {
|
|
4605
|
-
const { isInitialized: isInitialized2, getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4609
|
+
const { isInitialized: isInitialized2, getClient: getClient2, setExternalClient: setExternalClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4606
4610
|
if (isInitialized2()) {
|
|
4607
4611
|
return getClient2();
|
|
4608
4612
|
}
|
|
@@ -4653,6 +4657,7 @@ async function fastDbInit() {
|
|
|
4653
4657
|
return "file";
|
|
4654
4658
|
}
|
|
4655
4659
|
};
|
|
4660
|
+
setExternalClient2(daemonClient);
|
|
4656
4661
|
return daemonClient;
|
|
4657
4662
|
}
|
|
4658
4663
|
} catch {
|
package/dist/bin/exe-rename.js
CHANGED
|
@@ -1418,7 +1418,8 @@ __export(database_exports, {
|
|
|
1418
1418
|
initDaemonClient: () => initDaemonClient,
|
|
1419
1419
|
initDatabase: () => initDatabase,
|
|
1420
1420
|
initTurso: () => initTurso,
|
|
1421
|
-
isInitialized: () => isInitialized
|
|
1421
|
+
isInitialized: () => isInitialized,
|
|
1422
|
+
setExternalClient: () => setExternalClient
|
|
1422
1423
|
});
|
|
1423
1424
|
import { createClient } from "@libsql/client";
|
|
1424
1425
|
async function initDatabase(config) {
|
|
@@ -1465,6 +1466,9 @@ async function initDatabase(config) {
|
|
|
1465
1466
|
function isInitialized() {
|
|
1466
1467
|
return _adapterClient !== null || _client !== null;
|
|
1467
1468
|
}
|
|
1469
|
+
function setExternalClient(client) {
|
|
1470
|
+
_adapterClient = client;
|
|
1471
|
+
}
|
|
1468
1472
|
function getClient() {
|
|
1469
1473
|
if (!_adapterClient) {
|
|
1470
1474
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
package/dist/bin/exe-review.js
CHANGED
|
@@ -1683,7 +1683,8 @@ __export(database_exports, {
|
|
|
1683
1683
|
initDaemonClient: () => initDaemonClient,
|
|
1684
1684
|
initDatabase: () => initDatabase,
|
|
1685
1685
|
initTurso: () => initTurso,
|
|
1686
|
-
isInitialized: () => isInitialized
|
|
1686
|
+
isInitialized: () => isInitialized,
|
|
1687
|
+
setExternalClient: () => setExternalClient
|
|
1687
1688
|
});
|
|
1688
1689
|
import { createClient } from "@libsql/client";
|
|
1689
1690
|
async function initDatabase(config) {
|
|
@@ -1730,6 +1731,9 @@ async function initDatabase(config) {
|
|
|
1730
1731
|
function isInitialized() {
|
|
1731
1732
|
return _adapterClient !== null || _client !== null;
|
|
1732
1733
|
}
|
|
1734
|
+
function setExternalClient(client) {
|
|
1735
|
+
_adapterClient = client;
|
|
1736
|
+
}
|
|
1733
1737
|
function getClient() {
|
|
1734
1738
|
if (!_adapterClient) {
|
|
1735
1739
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -4078,7 +4082,7 @@ import { randomUUID as randomUUID3 } from "crypto";
|
|
|
4078
4082
|
|
|
4079
4083
|
// src/bin/fast-db-init.ts
|
|
4080
4084
|
async function fastDbInit() {
|
|
4081
|
-
const { isInitialized: isInitialized2, getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4085
|
+
const { isInitialized: isInitialized2, getClient: getClient2, setExternalClient: setExternalClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4082
4086
|
if (isInitialized2()) {
|
|
4083
4087
|
return getClient2();
|
|
4084
4088
|
}
|
|
@@ -4129,6 +4133,7 @@ async function fastDbInit() {
|
|
|
4129
4133
|
return "file";
|
|
4130
4134
|
}
|
|
4131
4135
|
};
|
|
4136
|
+
setExternalClient2(daemonClient);
|
|
4132
4137
|
return daemonClient;
|
|
4133
4138
|
}
|
|
4134
4139
|
} catch {
|
package/dist/bin/exe-search.js
CHANGED
|
@@ -1658,7 +1658,8 @@ __export(database_exports, {
|
|
|
1658
1658
|
initDaemonClient: () => initDaemonClient,
|
|
1659
1659
|
initDatabase: () => initDatabase,
|
|
1660
1660
|
initTurso: () => initTurso,
|
|
1661
|
-
isInitialized: () => isInitialized
|
|
1661
|
+
isInitialized: () => isInitialized,
|
|
1662
|
+
setExternalClient: () => setExternalClient
|
|
1662
1663
|
});
|
|
1663
1664
|
import { createClient } from "@libsql/client";
|
|
1664
1665
|
async function initDatabase(config) {
|
|
@@ -1705,6 +1706,9 @@ async function initDatabase(config) {
|
|
|
1705
1706
|
function isInitialized() {
|
|
1706
1707
|
return _adapterClient !== null || _client !== null;
|
|
1707
1708
|
}
|
|
1709
|
+
function setExternalClient(client) {
|
|
1710
|
+
_adapterClient = client;
|
|
1711
|
+
}
|
|
1708
1712
|
function getClient() {
|
|
1709
1713
|
if (!_adapterClient) {
|
|
1710
1714
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -1702,7 +1702,8 @@ __export(database_exports, {
|
|
|
1702
1702
|
initDaemonClient: () => initDaemonClient,
|
|
1703
1703
|
initDatabase: () => initDatabase,
|
|
1704
1704
|
initTurso: () => initTurso,
|
|
1705
|
-
isInitialized: () => isInitialized
|
|
1705
|
+
isInitialized: () => isInitialized,
|
|
1706
|
+
setExternalClient: () => setExternalClient
|
|
1706
1707
|
});
|
|
1707
1708
|
import { createClient } from "@libsql/client";
|
|
1708
1709
|
async function initDatabase(config) {
|
|
@@ -1749,6 +1750,9 @@ async function initDatabase(config) {
|
|
|
1749
1750
|
function isInitialized() {
|
|
1750
1751
|
return _adapterClient !== null || _client !== null;
|
|
1751
1752
|
}
|
|
1753
|
+
function setExternalClient(client) {
|
|
1754
|
+
_adapterClient = client;
|
|
1755
|
+
}
|
|
1752
1756
|
function getClient() {
|
|
1753
1757
|
if (!_adapterClient) {
|
|
1754
1758
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -7523,8 +7527,7 @@ function spawnEmployee(employeeName, exeSession2, projectDir, opts) {
|
|
|
7523
7527
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
7524
7528
|
}
|
|
7525
7529
|
if (!useExeAgent && !useCodex && !useOpencode && !useBinSymlink) {
|
|
7526
|
-
|
|
7527
|
-
if (agentRtConfig.runtime === "claude" && agentRtConfig.model !== defaultClaudeModel) {
|
|
7530
|
+
if (agentRtConfig.runtime === "claude" && agentRtConfig.model) {
|
|
7528
7531
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
7529
7532
|
}
|
|
7530
7533
|
}
|
|
@@ -1476,7 +1476,8 @@ __export(database_exports, {
|
|
|
1476
1476
|
initDaemonClient: () => initDaemonClient,
|
|
1477
1477
|
initDatabase: () => initDatabase,
|
|
1478
1478
|
initTurso: () => initTurso,
|
|
1479
|
-
isInitialized: () => isInitialized
|
|
1479
|
+
isInitialized: () => isInitialized,
|
|
1480
|
+
setExternalClient: () => setExternalClient
|
|
1480
1481
|
});
|
|
1481
1482
|
import { createClient } from "@libsql/client";
|
|
1482
1483
|
async function initDatabase(config) {
|
|
@@ -1523,6 +1524,9 @@ async function initDatabase(config) {
|
|
|
1523
1524
|
function isInitialized() {
|
|
1524
1525
|
return _adapterClient !== null || _client !== null;
|
|
1525
1526
|
}
|
|
1527
|
+
function setExternalClient(client) {
|
|
1528
|
+
_adapterClient = client;
|
|
1529
|
+
}
|
|
1526
1530
|
function getClient() {
|
|
1527
1531
|
if (!_adapterClient) {
|
|
1528
1532
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -3523,6 +3527,7 @@ ${EXE_SECTION_END}`;
|
|
|
3523
3527
|
// src/adapters/codex/installer.ts
|
|
3524
3528
|
var installer_exports = {};
|
|
3525
3529
|
__export(installer_exports, {
|
|
3530
|
+
ensureCodexHooksFeature: () => ensureCodexHooksFeature,
|
|
3526
3531
|
installCodexStatusLine: () => installCodexStatusLine,
|
|
3527
3532
|
mergeCodexHooks: () => mergeCodexHooks,
|
|
3528
3533
|
registerCodexMcpServer: () => registerCodexMcpServer,
|
|
@@ -3733,11 +3738,45 @@ args = ["${serverJsPath}"]
|
|
|
3733
3738
|
await writeFile5(configPath, content);
|
|
3734
3739
|
return "registered";
|
|
3735
3740
|
}
|
|
3741
|
+
async function ensureCodexHooksFeature(homeDir = os10.homedir()) {
|
|
3742
|
+
const configPath = path13.join(homeDir, ".codex", "config.toml");
|
|
3743
|
+
await mkdir5(path13.join(homeDir, ".codex"), { recursive: true });
|
|
3744
|
+
let content = "";
|
|
3745
|
+
if (existsSync12(configPath)) {
|
|
3746
|
+
content = await readFile5(configPath, "utf-8");
|
|
3747
|
+
}
|
|
3748
|
+
if (/\[features\][\s\S]*?codex_hooks\s*=\s*true/.test(content)) {
|
|
3749
|
+
return "already-enabled";
|
|
3750
|
+
}
|
|
3751
|
+
if (content.includes("[features]")) {
|
|
3752
|
+
if (/codex_hooks\s*=\s*false/.test(content)) {
|
|
3753
|
+
content = content.replace(/codex_hooks\s*=\s*false/, "codex_hooks = true");
|
|
3754
|
+
} else {
|
|
3755
|
+
content = content.replace(/\[features\]/, "[features]\ncodex_hooks = true");
|
|
3756
|
+
}
|
|
3757
|
+
} else {
|
|
3758
|
+
const firstSectionMatch = content.match(/\n\[(?!features\])/);
|
|
3759
|
+
if (firstSectionMatch && firstSectionMatch.index != null) {
|
|
3760
|
+
const insertAt = firstSectionMatch.index;
|
|
3761
|
+
content = content.slice(0, insertAt) + "\n\n[features]\ncodex_hooks = true" + content.slice(insertAt);
|
|
3762
|
+
} else {
|
|
3763
|
+
const separator = content.length > 0 && !content.endsWith("\n") ? "\n\n" : "\n";
|
|
3764
|
+
content = content + separator + "[features]\ncodex_hooks = true\n";
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
await writeFile5(configPath, content);
|
|
3768
|
+
return "enabled";
|
|
3769
|
+
}
|
|
3736
3770
|
async function runCodexInstaller(homeDir) {
|
|
3737
3771
|
const packageRoot = resolvePackageRoot();
|
|
3738
3772
|
const result = await mergeCodexHooks(packageRoot, homeDir);
|
|
3739
3773
|
process.stderr.write(
|
|
3740
3774
|
`[exe-os] Codex hooks: ${result.added} added, ${result.skipped} unchanged
|
|
3775
|
+
`
|
|
3776
|
+
);
|
|
3777
|
+
const featureResult = await ensureCodexHooksFeature(homeDir);
|
|
3778
|
+
process.stderr.write(
|
|
3779
|
+
`[exe-os] Codex hooks feature: ${featureResult}
|
|
3741
3780
|
`
|
|
3742
3781
|
);
|
|
3743
3782
|
const mcpResult = await registerCodexMcpServer(packageRoot, homeDir);
|
|
@@ -1465,7 +1465,8 @@ __export(database_exports, {
|
|
|
1465
1465
|
initDaemonClient: () => initDaemonClient,
|
|
1466
1466
|
initDatabase: () => initDatabase,
|
|
1467
1467
|
initTurso: () => initTurso,
|
|
1468
|
-
isInitialized: () => isInitialized
|
|
1468
|
+
isInitialized: () => isInitialized,
|
|
1469
|
+
setExternalClient: () => setExternalClient
|
|
1469
1470
|
});
|
|
1470
1471
|
import { createClient } from "@libsql/client";
|
|
1471
1472
|
async function initDatabase(config) {
|
|
@@ -1512,6 +1513,9 @@ async function initDatabase(config) {
|
|
|
1512
1513
|
function isInitialized() {
|
|
1513
1514
|
return _adapterClient !== null || _client !== null;
|
|
1514
1515
|
}
|
|
1516
|
+
function setExternalClient(client) {
|
|
1517
|
+
_adapterClient = client;
|
|
1518
|
+
}
|
|
1515
1519
|
function getClient() {
|
|
1516
1520
|
if (!_adapterClient) {
|
|
1517
1521
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
package/dist/bin/exe-start.sh
CHANGED
|
@@ -18,13 +18,27 @@ ROSTER_PATH="${HOME}/.exe-os/exe-employees.json"
|
|
|
18
18
|
INVOKED_AS="$(basename "${1:-exe-start}")"
|
|
19
19
|
shift # Remove $0 passthrough; remaining args are user's
|
|
20
20
|
|
|
21
|
+
# Detect runtime suffix: {agent}1-codex -> runtime=codex, strip suffix
|
|
22
|
+
RUNTIME="claude"
|
|
23
|
+
CLEAN_NAME="$INVOKED_AS"
|
|
24
|
+
case "$INVOKED_AS" in
|
|
25
|
+
*-codex)
|
|
26
|
+
RUNTIME="codex"
|
|
27
|
+
CLEAN_NAME="$(echo "$INVOKED_AS" | sed 's/-codex$//')"
|
|
28
|
+
;;
|
|
29
|
+
*-opencode)
|
|
30
|
+
RUNTIME="opencode"
|
|
31
|
+
CLEAN_NAME="$(echo "$INVOKED_AS" | sed 's/-opencode$//')"
|
|
32
|
+
;;
|
|
33
|
+
esac
|
|
34
|
+
|
|
21
35
|
# Extract name + number: {agent}1 -> {agent},1
|
|
22
|
-
NAME="$(echo "$
|
|
23
|
-
NUM="$(echo "$
|
|
36
|
+
NAME="$(echo "$CLEAN_NAME" | sed 's/[0-9]*$//')"
|
|
37
|
+
NUM="$(echo "$CLEAN_NAME" | grep -oE '[0-9]+$' || true)"
|
|
24
38
|
|
|
25
39
|
if [ -z "$NAME" ] || [ -z "$NUM" ]; then
|
|
26
40
|
echo "Could not parse name and number from: $INVOKED_AS"
|
|
27
|
-
echo " Expected format: {agent}1, {agent}2, etc."
|
|
41
|
+
echo " Expected format: {agent}1, {agent}2, {agent}1-codex, etc."
|
|
28
42
|
exit 1
|
|
29
43
|
fi
|
|
30
44
|
|
|
@@ -144,7 +158,13 @@ unset TMUX
|
|
|
144
158
|
|
|
145
159
|
# Create session and launch COO with full identity + behaviors + bypass permissions
|
|
146
160
|
tmux new-session -d -s "$SESSION" -c "$PWD"
|
|
147
|
-
|
|
161
|
+
if [ "$RUNTIME" = "codex" ]; then
|
|
162
|
+
tmux send-keys -t "$SESSION" "exe-start-codex --agent $COO_NAME" Enter
|
|
163
|
+
elif [ "$RUNTIME" = "opencode" ]; then
|
|
164
|
+
tmux send-keys -t "$SESSION" "exe-start-opencode --agent $COO_NAME" Enter
|
|
165
|
+
else
|
|
166
|
+
tmux send-keys -t "$SESSION" "exe-launch-agent --agent $COO_NAME" Enter
|
|
167
|
+
fi
|
|
148
168
|
|
|
149
169
|
# Attach user to session (-d detaches other clients to prevent rendering conflict)
|
|
150
170
|
exec tmux attach -d -t "$SESSION"
|
package/dist/bin/exe-status.js
CHANGED
|
@@ -1691,7 +1691,8 @@ __export(database_exports, {
|
|
|
1691
1691
|
initDaemonClient: () => initDaemonClient,
|
|
1692
1692
|
initDatabase: () => initDatabase,
|
|
1693
1693
|
initTurso: () => initTurso,
|
|
1694
|
-
isInitialized: () => isInitialized
|
|
1694
|
+
isInitialized: () => isInitialized,
|
|
1695
|
+
setExternalClient: () => setExternalClient
|
|
1695
1696
|
});
|
|
1696
1697
|
import { createClient } from "@libsql/client";
|
|
1697
1698
|
async function initDatabase(config) {
|
|
@@ -1738,6 +1739,9 @@ async function initDatabase(config) {
|
|
|
1738
1739
|
function isInitialized() {
|
|
1739
1740
|
return _adapterClient !== null || _client !== null;
|
|
1740
1741
|
}
|
|
1742
|
+
function setExternalClient(client) {
|
|
1743
|
+
_adapterClient = client;
|
|
1744
|
+
}
|
|
1741
1745
|
function getClient() {
|
|
1742
1746
|
if (!_adapterClient) {
|
|
1743
1747
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -4493,7 +4497,7 @@ init_employees();
|
|
|
4493
4497
|
|
|
4494
4498
|
// src/bin/fast-db-init.ts
|
|
4495
4499
|
async function fastDbInit() {
|
|
4496
|
-
const { isInitialized: isInitialized2, getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4500
|
+
const { isInitialized: isInitialized2, getClient: getClient2, setExternalClient: setExternalClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4497
4501
|
if (isInitialized2()) {
|
|
4498
4502
|
return getClient2();
|
|
4499
4503
|
}
|
|
@@ -4544,6 +4548,7 @@ async function fastDbInit() {
|
|
|
4544
4548
|
return "file";
|
|
4545
4549
|
}
|
|
4546
4550
|
};
|
|
4551
|
+
setExternalClient2(daemonClient);
|
|
4547
4552
|
return daemonClient;
|
|
4548
4553
|
}
|
|
4549
4554
|
} catch {
|
package/dist/bin/exe-team.js
CHANGED
|
@@ -1680,7 +1680,8 @@ __export(database_exports, {
|
|
|
1680
1680
|
initDaemonClient: () => initDaemonClient,
|
|
1681
1681
|
initDatabase: () => initDatabase,
|
|
1682
1682
|
initTurso: () => initTurso,
|
|
1683
|
-
isInitialized: () => isInitialized
|
|
1683
|
+
isInitialized: () => isInitialized,
|
|
1684
|
+
setExternalClient: () => setExternalClient
|
|
1684
1685
|
});
|
|
1685
1686
|
import { createClient } from "@libsql/client";
|
|
1686
1687
|
async function initDatabase(config) {
|
|
@@ -1727,6 +1728,9 @@ async function initDatabase(config) {
|
|
|
1727
1728
|
function isInitialized() {
|
|
1728
1729
|
return _adapterClient !== null || _client !== null;
|
|
1729
1730
|
}
|
|
1731
|
+
function setExternalClient(client) {
|
|
1732
|
+
_adapterClient = client;
|
|
1733
|
+
}
|
|
1730
1734
|
function getClient() {
|
|
1731
1735
|
if (!_adapterClient) {
|
|
1732
1736
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -4073,7 +4077,7 @@ init_employees();
|
|
|
4073
4077
|
|
|
4074
4078
|
// src/bin/fast-db-init.ts
|
|
4075
4079
|
async function fastDbInit() {
|
|
4076
|
-
const { isInitialized: isInitialized2, getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4080
|
+
const { isInitialized: isInitialized2, getClient: getClient2, setExternalClient: setExternalClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4077
4081
|
if (isInitialized2()) {
|
|
4078
4082
|
return getClient2();
|
|
4079
4083
|
}
|
|
@@ -4124,6 +4128,7 @@ async function fastDbInit() {
|
|
|
4124
4128
|
return "file";
|
|
4125
4129
|
}
|
|
4126
4130
|
};
|
|
4131
|
+
setExternalClient2(daemonClient);
|
|
4127
4132
|
return daemonClient;
|
|
4128
4133
|
}
|
|
4129
4134
|
} catch {
|
package/dist/bin/git-sweep.js
CHANGED
|
@@ -2182,7 +2182,8 @@ __export(database_exports, {
|
|
|
2182
2182
|
initDaemonClient: () => initDaemonClient,
|
|
2183
2183
|
initDatabase: () => initDatabase,
|
|
2184
2184
|
initTurso: () => initTurso,
|
|
2185
|
-
isInitialized: () => isInitialized
|
|
2185
|
+
isInitialized: () => isInitialized,
|
|
2186
|
+
setExternalClient: () => setExternalClient
|
|
2186
2187
|
});
|
|
2187
2188
|
import { createClient } from "@libsql/client";
|
|
2188
2189
|
async function initDatabase(config) {
|
|
@@ -2229,6 +2230,9 @@ async function initDatabase(config) {
|
|
|
2229
2230
|
function isInitialized() {
|
|
2230
2231
|
return _adapterClient !== null || _client !== null;
|
|
2231
2232
|
}
|
|
2233
|
+
function setExternalClient(client) {
|
|
2234
|
+
_adapterClient = client;
|
|
2235
|
+
}
|
|
2232
2236
|
function getClient() {
|
|
2233
2237
|
if (!_adapterClient) {
|
|
2234
2238
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -6294,8 +6298,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
6294
6298
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
6295
6299
|
}
|
|
6296
6300
|
if (!useExeAgent && !useCodex && !useOpencode && !useBinSymlink) {
|
|
6297
|
-
|
|
6298
|
-
if (agentRtConfig.runtime === "claude" && agentRtConfig.model !== defaultClaudeModel) {
|
|
6301
|
+
if (agentRtConfig.runtime === "claude" && agentRtConfig.model) {
|
|
6299
6302
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
6300
6303
|
}
|
|
6301
6304
|
}
|
|
@@ -1454,7 +1454,8 @@ __export(database_exports, {
|
|
|
1454
1454
|
initDaemonClient: () => initDaemonClient,
|
|
1455
1455
|
initDatabase: () => initDatabase,
|
|
1456
1456
|
initTurso: () => initTurso,
|
|
1457
|
-
isInitialized: () => isInitialized
|
|
1457
|
+
isInitialized: () => isInitialized,
|
|
1458
|
+
setExternalClient: () => setExternalClient
|
|
1458
1459
|
});
|
|
1459
1460
|
import { createClient } from "@libsql/client";
|
|
1460
1461
|
async function initDatabase(config) {
|
|
@@ -1501,6 +1502,9 @@ async function initDatabase(config) {
|
|
|
1501
1502
|
function isInitialized() {
|
|
1502
1503
|
return _adapterClient !== null || _client !== null;
|
|
1503
1504
|
}
|
|
1505
|
+
function setExternalClient(client) {
|
|
1506
|
+
_adapterClient = client;
|
|
1507
|
+
}
|
|
1504
1508
|
function getClient() {
|
|
1505
1509
|
if (!_adapterClient) {
|
|
1506
1510
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
package/dist/bin/graph-export.js
CHANGED
|
@@ -1669,7 +1669,8 @@ __export(database_exports, {
|
|
|
1669
1669
|
initDaemonClient: () => initDaemonClient,
|
|
1670
1670
|
initDatabase: () => initDatabase,
|
|
1671
1671
|
initTurso: () => initTurso,
|
|
1672
|
-
isInitialized: () => isInitialized
|
|
1672
|
+
isInitialized: () => isInitialized,
|
|
1673
|
+
setExternalClient: () => setExternalClient
|
|
1673
1674
|
});
|
|
1674
1675
|
import { createClient } from "@libsql/client";
|
|
1675
1676
|
async function initDatabase(config) {
|
|
@@ -1716,6 +1717,9 @@ async function initDatabase(config) {
|
|
|
1716
1717
|
function isInitialized() {
|
|
1717
1718
|
return _adapterClient !== null || _client !== null;
|
|
1718
1719
|
}
|
|
1720
|
+
function setExternalClient(client) {
|
|
1721
|
+
_adapterClient = client;
|
|
1722
|
+
}
|
|
1719
1723
|
function getClient() {
|
|
1720
1724
|
if (!_adapterClient) {
|
|
1721
1725
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -4064,7 +4068,7 @@ import path8 from "path";
|
|
|
4064
4068
|
|
|
4065
4069
|
// src/bin/fast-db-init.ts
|
|
4066
4070
|
async function fastDbInit() {
|
|
4067
|
-
const { isInitialized: isInitialized2, getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4071
|
+
const { isInitialized: isInitialized2, getClient: getClient2, setExternalClient: setExternalClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4068
4072
|
if (isInitialized2()) {
|
|
4069
4073
|
return getClient2();
|
|
4070
4074
|
}
|
|
@@ -4115,6 +4119,7 @@ async function fastDbInit() {
|
|
|
4115
4119
|
return "file";
|
|
4116
4120
|
}
|
|
4117
4121
|
};
|
|
4122
|
+
setExternalClient2(daemonClient);
|
|
4118
4123
|
return daemonClient;
|
|
4119
4124
|
}
|
|
4120
4125
|
} catch {
|
package/dist/bin/install.js
CHANGED
|
@@ -1416,6 +1416,7 @@ ${EXE_SECTION_END}`;
|
|
|
1416
1416
|
// src/adapters/codex/installer.ts
|
|
1417
1417
|
var installer_exports = {};
|
|
1418
1418
|
__export(installer_exports, {
|
|
1419
|
+
ensureCodexHooksFeature: () => ensureCodexHooksFeature,
|
|
1419
1420
|
installCodexStatusLine: () => installCodexStatusLine,
|
|
1420
1421
|
mergeCodexHooks: () => mergeCodexHooks,
|
|
1421
1422
|
registerCodexMcpServer: () => registerCodexMcpServer,
|
|
@@ -1626,11 +1627,45 @@ args = ["${serverJsPath}"]
|
|
|
1626
1627
|
await writeFile4(configPath, content);
|
|
1627
1628
|
return "registered";
|
|
1628
1629
|
}
|
|
1630
|
+
async function ensureCodexHooksFeature(homeDir = os6.homedir()) {
|
|
1631
|
+
const configPath = path8.join(homeDir, ".codex", "config.toml");
|
|
1632
|
+
await mkdir4(path8.join(homeDir, ".codex"), { recursive: true });
|
|
1633
|
+
let content = "";
|
|
1634
|
+
if (existsSync9(configPath)) {
|
|
1635
|
+
content = await readFile4(configPath, "utf-8");
|
|
1636
|
+
}
|
|
1637
|
+
if (/\[features\][\s\S]*?codex_hooks\s*=\s*true/.test(content)) {
|
|
1638
|
+
return "already-enabled";
|
|
1639
|
+
}
|
|
1640
|
+
if (content.includes("[features]")) {
|
|
1641
|
+
if (/codex_hooks\s*=\s*false/.test(content)) {
|
|
1642
|
+
content = content.replace(/codex_hooks\s*=\s*false/, "codex_hooks = true");
|
|
1643
|
+
} else {
|
|
1644
|
+
content = content.replace(/\[features\]/, "[features]\ncodex_hooks = true");
|
|
1645
|
+
}
|
|
1646
|
+
} else {
|
|
1647
|
+
const firstSectionMatch = content.match(/\n\[(?!features\])/);
|
|
1648
|
+
if (firstSectionMatch && firstSectionMatch.index != null) {
|
|
1649
|
+
const insertAt = firstSectionMatch.index;
|
|
1650
|
+
content = content.slice(0, insertAt) + "\n\n[features]\ncodex_hooks = true" + content.slice(insertAt);
|
|
1651
|
+
} else {
|
|
1652
|
+
const separator = content.length > 0 && !content.endsWith("\n") ? "\n\n" : "\n";
|
|
1653
|
+
content = content + separator + "[features]\ncodex_hooks = true\n";
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
await writeFile4(configPath, content);
|
|
1657
|
+
return "enabled";
|
|
1658
|
+
}
|
|
1629
1659
|
async function runCodexInstaller(homeDir) {
|
|
1630
1660
|
const packageRoot = resolvePackageRoot();
|
|
1631
1661
|
const result = await mergeCodexHooks(packageRoot, homeDir);
|
|
1632
1662
|
process.stderr.write(
|
|
1633
1663
|
`[exe-os] Codex hooks: ${result.added} added, ${result.skipped} unchanged
|
|
1664
|
+
`
|
|
1665
|
+
);
|
|
1666
|
+
const featureResult = await ensureCodexHooksFeature(homeDir);
|
|
1667
|
+
process.stderr.write(
|
|
1668
|
+
`[exe-os] Codex hooks feature: ${featureResult}
|
|
1634
1669
|
`
|
|
1635
1670
|
);
|
|
1636
1671
|
const mcpResult = await registerCodexMcpServer(packageRoot, homeDir);
|
|
@@ -1731,6 +1766,10 @@ exec "${exeStartDst}" "$0" "$@"
|
|
|
1731
1766
|
writeFileSync5(wrapperPath, wrapperContent);
|
|
1732
1767
|
chmodSync2(wrapperPath, 493);
|
|
1733
1768
|
created++;
|
|
1769
|
+
const codexPath = path7.join(binDir, `${emp.name}${n}-codex`);
|
|
1770
|
+
writeFileSync5(codexPath, wrapperContent);
|
|
1771
|
+
chmodSync2(codexPath, 493);
|
|
1772
|
+
created++;
|
|
1734
1773
|
}
|
|
1735
1774
|
}
|
|
1736
1775
|
const codexLauncherCandidates = [
|
|
@@ -1768,7 +1768,8 @@ __export(database_exports, {
|
|
|
1768
1768
|
initDaemonClient: () => initDaemonClient,
|
|
1769
1769
|
initDatabase: () => initDatabase,
|
|
1770
1770
|
initTurso: () => initTurso,
|
|
1771
|
-
isInitialized: () => isInitialized
|
|
1771
|
+
isInitialized: () => isInitialized,
|
|
1772
|
+
setExternalClient: () => setExternalClient
|
|
1772
1773
|
});
|
|
1773
1774
|
import { createClient } from "@libsql/client";
|
|
1774
1775
|
async function initDatabase(config) {
|
|
@@ -1815,6 +1816,9 @@ async function initDatabase(config) {
|
|
|
1815
1816
|
function isInitialized() {
|
|
1816
1817
|
return _adapterClient !== null || _client !== null;
|
|
1817
1818
|
}
|
|
1819
|
+
function setExternalClient(client) {
|
|
1820
|
+
_adapterClient = client;
|
|
1821
|
+
}
|
|
1818
1822
|
function getClient() {
|
|
1819
1823
|
if (!_adapterClient) {
|
|
1820
1824
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -4162,7 +4166,7 @@ __export(fast_db_init_exports, {
|
|
|
4162
4166
|
fastDbInit: () => fastDbInit
|
|
4163
4167
|
});
|
|
4164
4168
|
async function fastDbInit() {
|
|
4165
|
-
const { isInitialized: isInitialized2, getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4169
|
+
const { isInitialized: isInitialized2, getClient: getClient2, setExternalClient: setExternalClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
4166
4170
|
if (isInitialized2()) {
|
|
4167
4171
|
return getClient2();
|
|
4168
4172
|
}
|
|
@@ -4213,6 +4217,7 @@ async function fastDbInit() {
|
|
|
4213
4217
|
return "file";
|
|
4214
4218
|
}
|
|
4215
4219
|
};
|
|
4220
|
+
setExternalClient2(daemonClient);
|
|
4216
4221
|
return daemonClient;
|
|
4217
4222
|
}
|
|
4218
4223
|
} catch {
|
|
@@ -7300,8 +7305,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
7300
7305
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
7301
7306
|
}
|
|
7302
7307
|
if (!useExeAgent && !useCodex && !useOpencode && !useBinSymlink) {
|
|
7303
|
-
|
|
7304
|
-
if (agentRtConfig.runtime === "claude" && agentRtConfig.model !== defaultClaudeModel) {
|
|
7308
|
+
if (agentRtConfig.runtime === "claude" && agentRtConfig.model) {
|
|
7305
7309
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
7306
7310
|
}
|
|
7307
7311
|
}
|
package/dist/bin/scan-tasks.js
CHANGED
|
@@ -2260,7 +2260,8 @@ __export(database_exports, {
|
|
|
2260
2260
|
initDaemonClient: () => initDaemonClient,
|
|
2261
2261
|
initDatabase: () => initDatabase,
|
|
2262
2262
|
initTurso: () => initTurso,
|
|
2263
|
-
isInitialized: () => isInitialized
|
|
2263
|
+
isInitialized: () => isInitialized,
|
|
2264
|
+
setExternalClient: () => setExternalClient
|
|
2264
2265
|
});
|
|
2265
2266
|
import { createClient } from "@libsql/client";
|
|
2266
2267
|
async function initDatabase(config) {
|
|
@@ -2307,6 +2308,9 @@ async function initDatabase(config) {
|
|
|
2307
2308
|
function isInitialized() {
|
|
2308
2309
|
return _adapterClient !== null || _client !== null;
|
|
2309
2310
|
}
|
|
2311
|
+
function setExternalClient(client) {
|
|
2312
|
+
_adapterClient = client;
|
|
2313
|
+
}
|
|
2310
2314
|
function getClient() {
|
|
2311
2315
|
if (!_adapterClient) {
|
|
2312
2316
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -6365,8 +6369,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
6365
6369
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
6366
6370
|
}
|
|
6367
6371
|
if (!useExeAgent && !useCodex && !useOpencode && !useBinSymlink) {
|
|
6368
|
-
|
|
6369
|
-
if (agentRtConfig.runtime === "claude" && agentRtConfig.model !== defaultClaudeModel) {
|
|
6372
|
+
if (agentRtConfig.runtime === "claude" && agentRtConfig.model) {
|
|
6370
6373
|
envPrefix = `${envPrefix} ANTHROPIC_MODEL=${agentRtConfig.model}`;
|
|
6371
6374
|
}
|
|
6372
6375
|
}
|
|
@@ -7764,7 +7767,7 @@ __export(fast_db_init_exports, {
|
|
|
7764
7767
|
fastDbInit: () => fastDbInit
|
|
7765
7768
|
});
|
|
7766
7769
|
async function fastDbInit() {
|
|
7767
|
-
const { isInitialized: isInitialized2, getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
7770
|
+
const { isInitialized: isInitialized2, getClient: getClient2, setExternalClient: setExternalClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
7768
7771
|
if (isInitialized2()) {
|
|
7769
7772
|
return getClient2();
|
|
7770
7773
|
}
|
|
@@ -7815,6 +7818,7 @@ async function fastDbInit() {
|
|
|
7815
7818
|
return "file";
|
|
7816
7819
|
}
|
|
7817
7820
|
};
|
|
7821
|
+
setExternalClient2(daemonClient);
|
|
7818
7822
|
return daemonClient;
|
|
7819
7823
|
}
|
|
7820
7824
|
} catch {
|
package/dist/bin/setup.js
CHANGED
|
@@ -2708,7 +2708,8 @@ __export(database_exports, {
|
|
|
2708
2708
|
initDaemonClient: () => initDaemonClient,
|
|
2709
2709
|
initDatabase: () => initDatabase,
|
|
2710
2710
|
initTurso: () => initTurso,
|
|
2711
|
-
isInitialized: () => isInitialized
|
|
2711
|
+
isInitialized: () => isInitialized,
|
|
2712
|
+
setExternalClient: () => setExternalClient
|
|
2712
2713
|
});
|
|
2713
2714
|
import { createClient } from "@libsql/client";
|
|
2714
2715
|
async function initDatabase(config) {
|
|
@@ -2755,6 +2756,9 @@ async function initDatabase(config) {
|
|
|
2755
2756
|
function isInitialized() {
|
|
2756
2757
|
return _adapterClient !== null || _client !== null;
|
|
2757
2758
|
}
|
|
2759
|
+
function setExternalClient(client) {
|
|
2760
|
+
_adapterClient = client;
|
|
2761
|
+
}
|
|
2758
2762
|
function getClient() {
|
|
2759
2763
|
if (!_adapterClient) {
|
|
2760
2764
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
@@ -6849,6 +6853,10 @@ exec "${exeStartDst}" "$0" "$@"
|
|
|
6849
6853
|
writeFileSync9(wrapperPath, wrapperContent);
|
|
6850
6854
|
chmodSync2(wrapperPath, 493);
|
|
6851
6855
|
created++;
|
|
6856
|
+
const codexPath = path14.join(binDir, `${emp.name}${n}-codex`);
|
|
6857
|
+
writeFileSync9(codexPath, wrapperContent);
|
|
6858
|
+
chmodSync2(codexPath, 493);
|
|
6859
|
+
created++;
|
|
6852
6860
|
}
|
|
6853
6861
|
}
|
|
6854
6862
|
const codexLauncherCandidates = [
|
|
@@ -1454,7 +1454,8 @@ __export(database_exports, {
|
|
|
1454
1454
|
initDaemonClient: () => initDaemonClient,
|
|
1455
1455
|
initDatabase: () => initDatabase,
|
|
1456
1456
|
initTurso: () => initTurso,
|
|
1457
|
-
isInitialized: () => isInitialized
|
|
1457
|
+
isInitialized: () => isInitialized,
|
|
1458
|
+
setExternalClient: () => setExternalClient
|
|
1458
1459
|
});
|
|
1459
1460
|
import { createClient } from "@libsql/client";
|
|
1460
1461
|
async function initDatabase(config) {
|
|
@@ -1501,6 +1502,9 @@ async function initDatabase(config) {
|
|
|
1501
1502
|
function isInitialized() {
|
|
1502
1503
|
return _adapterClient !== null || _client !== null;
|
|
1503
1504
|
}
|
|
1505
|
+
function setExternalClient(client) {
|
|
1506
|
+
_adapterClient = client;
|
|
1507
|
+
}
|
|
1504
1508
|
function getClient() {
|
|
1505
1509
|
if (!_adapterClient) {
|
|
1506
1510
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|