@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.
- package/README.md +178 -79
- package/package.json +1 -1
- package/dist/bin/backfill-responses.js +0 -1912
- package/dist/bin/backfill-vectors.js +0 -1642
- package/dist/bin/cleanup-stale-review-tasks.js +0 -1339
- package/dist/bin/cli.js +0 -18800
- package/dist/bin/exe-agent.js +0 -1858
- package/dist/bin/exe-assign.js +0 -1957
- package/dist/bin/exe-boot.js +0 -6460
- package/dist/bin/exe-call.js +0 -197
- package/dist/bin/exe-cloud.js +0 -850
- package/dist/bin/exe-dispatch.js +0 -1146
- package/dist/bin/exe-doctor.js +0 -1657
- package/dist/bin/exe-export-behaviors.js +0 -1494
- package/dist/bin/exe-forget.js +0 -1627
- package/dist/bin/exe-gateway.js +0 -7732
- package/dist/bin/exe-healthcheck.js +0 -207
- package/dist/bin/exe-heartbeat.js +0 -1647
- package/dist/bin/exe-kill.js +0 -1479
- package/dist/bin/exe-launch-agent.js +0 -1704
- package/dist/bin/exe-link.js +0 -192
- package/dist/bin/exe-new-employee.js +0 -852
- package/dist/bin/exe-pending-messages.js +0 -1446
- package/dist/bin/exe-pending-notifications.js +0 -1321
- package/dist/bin/exe-pending-reviews.js +0 -1468
- package/dist/bin/exe-repo-drift.js +0 -95
- package/dist/bin/exe-review.js +0 -1590
- package/dist/bin/exe-search.js +0 -2651
- package/dist/bin/exe-session-cleanup.js +0 -3173
- package/dist/bin/exe-settings.js +0 -354
- package/dist/bin/exe-status.js +0 -1532
- package/dist/bin/exe-team.js +0 -1324
- package/dist/bin/git-sweep.js +0 -2185
- package/dist/bin/graph-backfill.js +0 -1968
- package/dist/bin/graph-export.js +0 -1604
- package/dist/bin/install.js +0 -656
- package/dist/bin/list-providers.js +0 -140
- package/dist/bin/scan-tasks.js +0 -1820
- package/dist/bin/setup.js +0 -951
- package/dist/bin/shard-migrate.js +0 -1494
- package/dist/bin/update.js +0 -95
- package/dist/bin/wiki-sync.js +0 -1514
- package/dist/gateway/index.js +0 -8848
- package/dist/hooks/bug-report-worker.js +0 -2743
- package/dist/hooks/commit-complete.js +0 -2108
- package/dist/hooks/error-recall.js +0 -2861
- package/dist/hooks/exe-heartbeat-hook.js +0 -232
- package/dist/hooks/ingest-worker.js +0 -4793
- package/dist/hooks/ingest.js +0 -684
- package/dist/hooks/instructions-loaded.js +0 -1880
- package/dist/hooks/notification.js +0 -1726
- package/dist/hooks/post-compact.js +0 -1751
- package/dist/hooks/pre-compact.js +0 -1746
- package/dist/hooks/pre-tool-use.js +0 -2191
- package/dist/hooks/prompt-ingest-worker.js +0 -2126
- package/dist/hooks/prompt-submit.js +0 -4693
- package/dist/hooks/response-ingest-worker.js +0 -1936
- package/dist/hooks/session-end.js +0 -1752
- package/dist/hooks/session-start.js +0 -2795
- package/dist/hooks/stop.js +0 -1835
- package/dist/hooks/subagent-stop.js +0 -1726
- package/dist/hooks/summary-worker.js +0 -2661
- package/dist/index.js +0 -11834
- package/dist/lib/cloud-sync.js +0 -495
- package/dist/lib/config.js +0 -222
- package/dist/lib/consolidation.js +0 -476
- package/dist/lib/crypto.js +0 -51
- package/dist/lib/database.js +0 -730
- package/dist/lib/device-registry.js +0 -900
- package/dist/lib/embedder.js +0 -632
- package/dist/lib/employee-templates.js +0 -543
- package/dist/lib/employees.js +0 -177
- package/dist/lib/error-detector.js +0 -156
- package/dist/lib/exe-daemon-client.js +0 -451
- package/dist/lib/exe-daemon.js +0 -8285
- package/dist/lib/file-grep.js +0 -199
- package/dist/lib/hybrid-search.js +0 -1819
- package/dist/lib/identity-templates.js +0 -320
- package/dist/lib/identity.js +0 -223
- package/dist/lib/keychain.js +0 -145
- package/dist/lib/license.js +0 -377
- package/dist/lib/messaging.js +0 -1376
- package/dist/lib/reminders.js +0 -63
- package/dist/lib/schedules.js +0 -1396
- package/dist/lib/session-registry.js +0 -52
- package/dist/lib/skill-learning.js +0 -477
- package/dist/lib/status-brief.js +0 -235
- package/dist/lib/store.js +0 -1551
- package/dist/lib/task-router.js +0 -62
- package/dist/lib/tasks.js +0 -2456
- package/dist/lib/tmux-routing.js +0 -2836
- package/dist/lib/tmux-status.js +0 -261
- package/dist/lib/tmux-transport.js +0 -83
- package/dist/lib/transport.js +0 -128
- package/dist/lib/ws-auth.js +0 -19
- package/dist/lib/ws-client.js +0 -160
- package/dist/mcp/server.js +0 -10538
- package/dist/mcp/tools/complete-reminder.js +0 -67
- package/dist/mcp/tools/create-reminder.js +0 -52
- package/dist/mcp/tools/create-task.js +0 -1853
- package/dist/mcp/tools/deactivate-behavior.js +0 -263
- package/dist/mcp/tools/list-reminders.js +0 -62
- package/dist/mcp/tools/list-tasks.js +0 -463
- package/dist/mcp/tools/send-message.js +0 -1382
- package/dist/mcp/tools/update-task.js +0 -1692
- package/dist/runtime/index.js +0 -6809
- package/dist/tui/App.js +0 -17479
package/dist/lib/task-router.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// src/lib/task-router.ts
|
|
2
|
-
import { randomUUID } from "crypto";
|
|
3
|
-
async function scoreEmployee(taskVector, agentId, searchFn) {
|
|
4
|
-
const results = await searchFn(taskVector, agentId, { limit: 5 });
|
|
5
|
-
if (results.length === 0) {
|
|
6
|
-
return { agentId, score: 0 };
|
|
7
|
-
}
|
|
8
|
-
const distances = results.map((r) => r["_distance"]).filter((d) => typeof d === "number");
|
|
9
|
-
if (distances.length > 0) {
|
|
10
|
-
const avgDistance = distances.reduce((sum, d) => sum + d, 0) / distances.length;
|
|
11
|
-
return { agentId, score: 1 / (1 + avgDistance) };
|
|
12
|
-
}
|
|
13
|
-
return { agentId, score: results.length / 5 };
|
|
14
|
-
}
|
|
15
|
-
async function routeTask(taskDescription, employees, embedFn, searchFn) {
|
|
16
|
-
const specialists = employees.filter((e) => e.name !== "exe");
|
|
17
|
-
if (specialists.length === 0) {
|
|
18
|
-
throw new Error(
|
|
19
|
-
"No specialist employees available. Create one with /exe-new-employee."
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
const taskVector = await embedFn(taskDescription);
|
|
23
|
-
const scored = await Promise.all(
|
|
24
|
-
specialists.map(async (emp) => {
|
|
25
|
-
const { score } = await scoreEmployee(taskVector, emp.name, searchFn);
|
|
26
|
-
return { employee: emp, score };
|
|
27
|
-
})
|
|
28
|
-
);
|
|
29
|
-
scored.sort((a, b) => b.score - a.score);
|
|
30
|
-
return scored[0];
|
|
31
|
-
}
|
|
32
|
-
function createAssignmentMemory(taskDescription, assignedTo, assignedBy) {
|
|
33
|
-
return {
|
|
34
|
-
id: randomUUID(),
|
|
35
|
-
agent_id: assignedTo.name,
|
|
36
|
-
agent_role: assignedTo.role,
|
|
37
|
-
session_id: `assign-${Date.now()}`,
|
|
38
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
39
|
-
tool_name: "assignment",
|
|
40
|
-
project_name: "",
|
|
41
|
-
has_error: false,
|
|
42
|
-
raw_text: `Task assigned by ${assignedBy}: ${taskDescription}`,
|
|
43
|
-
vector: null
|
|
44
|
-
// Will be backfilled
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function formatAssignmentOutput(employee, task, score, mode) {
|
|
48
|
-
const modeLabel = mode === "auto" ? "auto-routed" : "direct";
|
|
49
|
-
const percent = Math.round(score * 100);
|
|
50
|
-
return [
|
|
51
|
-
`Assigned to ${employee.name} (${employee.role})`,
|
|
52
|
-
`Mode: ${modeLabel}`,
|
|
53
|
-
`Relevance: ${percent}%`,
|
|
54
|
-
`Task: ${task}`
|
|
55
|
-
].join("\n");
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
createAssignmentMemory,
|
|
59
|
-
formatAssignmentOutput,
|
|
60
|
-
routeTask,
|
|
61
|
-
scoreEmployee
|
|
62
|
-
};
|