@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.
- package/package.json +1 -1
- package/dist/bin/backfill-responses.js +0 -2064
- package/dist/bin/backfill-vectors.js +0 -1771
- package/dist/bin/cleanup-stale-review-tasks.js +0 -1468
- package/dist/bin/cli.js +0 -21371
- package/dist/bin/exe-agent.js +0 -2016
- package/dist/bin/exe-assign.js +0 -2176
- package/dist/bin/exe-boot.js +0 -6332
- package/dist/bin/exe-call.js +0 -341
- package/dist/bin/exe-cloud.js +0 -861
- package/dist/bin/exe-dispatch.js +0 -1159
- package/dist/bin/exe-doctor.js +0 -1786
- package/dist/bin/exe-export-behaviors.js +0 -1637
- package/dist/bin/exe-forget.js +0 -1784
- package/dist/bin/exe-gateway.js +0 -8140
- package/dist/bin/exe-healthcheck.js +0 -207
- package/dist/bin/exe-heartbeat.js +0 -1778
- package/dist/bin/exe-kill.js +0 -1622
- package/dist/bin/exe-launch-agent.js +0 -1847
- package/dist/bin/exe-link.js +0 -192
- package/dist/bin/exe-new-employee.js +0 -1384
- package/dist/bin/exe-pending-messages.js +0 -1576
- package/dist/bin/exe-pending-notifications.js +0 -1450
- package/dist/bin/exe-pending-reviews.js +0 -1598
- package/dist/bin/exe-repo-drift.js +0 -95
- package/dist/bin/exe-review.js +0 -1742
- package/dist/bin/exe-search.js +0 -3116
- package/dist/bin/exe-session-cleanup.js +0 -3360
- package/dist/bin/exe-settings.js +0 -365
- package/dist/bin/exe-status.js +0 -1661
- package/dist/bin/exe-team.js +0 -1453
- package/dist/bin/git-sweep.js +0 -2441
- package/dist/bin/graph-backfill.js +0 -2111
- package/dist/bin/graph-export.js +0 -1747
- package/dist/bin/install.js +0 -661
- package/dist/bin/list-providers.js +0 -140
- package/dist/bin/scan-tasks.js +0 -2039
- package/dist/bin/setup.js +0 -2717
- package/dist/bin/shard-migrate.js +0 -1637
- package/dist/bin/update.js +0 -98
- package/dist/bin/wiki-sync.js +0 -1657
- package/dist/gateway/index.js +0 -9256
- package/dist/hooks/bug-report-worker.js +0 -2903
- package/dist/hooks/commit-complete.js +0 -2364
- package/dist/hooks/error-recall.js +0 -3327
- package/dist/hooks/exe-heartbeat-hook.js +0 -237
- package/dist/hooks/ingest-worker.js +0 -5065
- package/dist/hooks/ingest.js +0 -695
- package/dist/hooks/instructions-loaded.js +0 -2069
- package/dist/hooks/notification.js +0 -1915
- package/dist/hooks/post-compact.js +0 -1940
- package/dist/hooks/pre-compact.js +0 -1935
- package/dist/hooks/pre-tool-use.js +0 -2380
- package/dist/hooks/prompt-ingest-worker.js +0 -2291
- package/dist/hooks/prompt-submit.js +0 -5189
- package/dist/hooks/response-ingest-worker.js +0 -2431
- package/dist/hooks/session-end.js +0 -2196
- package/dist/hooks/session-start.js +0 -3259
- package/dist/hooks/stop.js +0 -2025
- package/dist/hooks/subagent-stop.js +0 -1915
- package/dist/hooks/summary-worker.js +0 -2931
- package/dist/index.js +0 -12327
- package/dist/lib/cloud-sync.js +0 -500
- package/dist/lib/config.js +0 -235
- package/dist/lib/consolidation.js +0 -481
- package/dist/lib/crypto.js +0 -51
- package/dist/lib/database.js +0 -834
- package/dist/lib/device-registry.js +0 -1009
- package/dist/lib/embedder.js +0 -645
- package/dist/lib/employee-templates.js +0 -570
- package/dist/lib/employees.js +0 -182
- package/dist/lib/error-detector.js +0 -156
- package/dist/lib/exe-daemon-client.js +0 -456
- package/dist/lib/exe-daemon.js +0 -8699
- package/dist/lib/file-grep.js +0 -215
- package/dist/lib/hybrid-search.js +0 -3064
- package/dist/lib/identity-templates.js +0 -441
- package/dist/lib/identity.js +0 -228
- package/dist/lib/keychain.js +0 -145
- package/dist/lib/license.js +0 -382
- package/dist/lib/messaging.js +0 -1389
- package/dist/lib/reminders.js +0 -63
- package/dist/lib/schedules.js +0 -1525
- package/dist/lib/session-registry.js +0 -52
- package/dist/lib/skill-learning.js +0 -488
- package/dist/lib/status-brief.js +0 -240
- package/dist/lib/store.js +0 -1740
- package/dist/lib/task-router.js +0 -128
- package/dist/lib/tasks.js +0 -2585
- package/dist/lib/tmux-routing.js +0 -2969
- 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 -10812
- 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 -1903
- package/dist/mcp/tools/deactivate-behavior.js +0 -268
- package/dist/mcp/tools/list-reminders.js +0 -62
- package/dist/mcp/tools/list-tasks.js +0 -491
- package/dist/mcp/tools/send-message.js +0 -1395
- package/dist/mcp/tools/update-task.js +0 -1807
- package/dist/runtime/index.js +0 -7201
- package/dist/tui/App.js +0 -17874
package/dist/lib/task-router.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
// src/lib/task-router.ts
|
|
2
|
-
import { randomUUID } from "crypto";
|
|
3
|
-
var DEFAULT_BLOOM_CONFIG = {
|
|
4
|
-
complexityToTier: {
|
|
5
|
-
routine: "junior",
|
|
6
|
-
standard: "standard",
|
|
7
|
-
complex: "senior",
|
|
8
|
-
critical: "specialist"
|
|
9
|
-
},
|
|
10
|
-
tierRules: {
|
|
11
|
-
junior: {
|
|
12
|
-
eligible: ["tom"],
|
|
13
|
-
reviewRequired: false,
|
|
14
|
-
manualOnly: false
|
|
15
|
-
},
|
|
16
|
-
standard: {
|
|
17
|
-
eligible: ["tom"],
|
|
18
|
-
reviewRequired: false,
|
|
19
|
-
manualOnly: false
|
|
20
|
-
},
|
|
21
|
-
senior: {
|
|
22
|
-
eligible: [],
|
|
23
|
-
// any specialist, but review required
|
|
24
|
-
reviewRequired: true,
|
|
25
|
-
manualOnly: false
|
|
26
|
-
},
|
|
27
|
-
specialist: {
|
|
28
|
-
eligible: [],
|
|
29
|
-
reviewRequired: true,
|
|
30
|
-
manualOnly: true
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
function resolveBloomRouting(complexity, config = DEFAULT_BLOOM_CONFIG) {
|
|
35
|
-
const tier = config.complexityToTier[complexity];
|
|
36
|
-
const rule = config.tierRules[tier];
|
|
37
|
-
return {
|
|
38
|
-
tier,
|
|
39
|
-
reviewRequired: rule.reviewRequired,
|
|
40
|
-
manualOnly: rule.manualOnly,
|
|
41
|
-
eligible: rule.eligible
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
async function scoreEmployee(taskVector, agentId, searchFn) {
|
|
45
|
-
const results = await searchFn(taskVector, agentId, { limit: 5 });
|
|
46
|
-
if (results.length === 0) {
|
|
47
|
-
return { agentId, score: 0 };
|
|
48
|
-
}
|
|
49
|
-
const distances = results.map((r) => r["_distance"]).filter((d) => typeof d === "number");
|
|
50
|
-
if (distances.length > 0) {
|
|
51
|
-
const avgDistance = distances.reduce((sum, d) => sum + d, 0) / distances.length;
|
|
52
|
-
return { agentId, score: 1 / (1 + avgDistance) };
|
|
53
|
-
}
|
|
54
|
-
return { agentId, score: results.length / 5 };
|
|
55
|
-
}
|
|
56
|
-
async function routeTask(taskDescription, employees, embedFn, searchFn, options) {
|
|
57
|
-
let specialists = employees.filter((e) => e.name !== "exe");
|
|
58
|
-
if (specialists.length === 0) {
|
|
59
|
-
throw new Error(
|
|
60
|
-
"No specialist employees available. Create one with /exe-new-employee."
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
let bloomRouting;
|
|
64
|
-
if (options?.complexity) {
|
|
65
|
-
bloomRouting = resolveBloomRouting(options.complexity, options.bloomConfig);
|
|
66
|
-
if (bloomRouting.manualOnly) {
|
|
67
|
-
throw new Error(
|
|
68
|
-
`Task complexity "${options.complexity}" requires manual assignment (tier: ${bloomRouting.tier}).`
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
if (bloomRouting.eligible.length > 0) {
|
|
72
|
-
const eligible = new Set(bloomRouting.eligible);
|
|
73
|
-
const filtered = specialists.filter((e) => eligible.has(e.name));
|
|
74
|
-
if (filtered.length > 0) {
|
|
75
|
-
specialists = filtered;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const taskVector = await embedFn(taskDescription);
|
|
80
|
-
const scored = await Promise.all(
|
|
81
|
-
specialists.map(async (emp) => {
|
|
82
|
-
const { score } = await scoreEmployee(taskVector, emp.name, searchFn);
|
|
83
|
-
return { employee: emp, score };
|
|
84
|
-
})
|
|
85
|
-
);
|
|
86
|
-
scored.sort((a, b) => b.score - a.score);
|
|
87
|
-
return { ...scored[0], bloomRouting };
|
|
88
|
-
}
|
|
89
|
-
function createAssignmentMemory(taskDescription, assignedTo, assignedBy) {
|
|
90
|
-
return {
|
|
91
|
-
id: randomUUID(),
|
|
92
|
-
agent_id: assignedTo.name,
|
|
93
|
-
agent_role: assignedTo.role,
|
|
94
|
-
session_id: `assign-${Date.now()}`,
|
|
95
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
96
|
-
tool_name: "assignment",
|
|
97
|
-
project_name: "",
|
|
98
|
-
has_error: false,
|
|
99
|
-
raw_text: `Task assigned by ${assignedBy}: ${taskDescription}`,
|
|
100
|
-
vector: null
|
|
101
|
-
// Will be backfilled
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function formatAssignmentOutput(employee, task, score, mode, bloomRouting) {
|
|
105
|
-
const modeLabel = mode === "auto" ? "auto-routed" : "direct";
|
|
106
|
-
const percent = Math.round(score * 100);
|
|
107
|
-
const lines = [
|
|
108
|
-
`Assigned to ${employee.name} (${employee.role})`,
|
|
109
|
-
`Mode: ${modeLabel}`,
|
|
110
|
-
`Relevance: ${percent}%`,
|
|
111
|
-
`Task: ${task}`
|
|
112
|
-
];
|
|
113
|
-
if (bloomRouting) {
|
|
114
|
-
lines.push(`Complexity tier: ${bloomRouting.tier}`);
|
|
115
|
-
if (bloomRouting.reviewRequired) {
|
|
116
|
-
lines.push(`Review: required`);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return lines.join("\n");
|
|
120
|
-
}
|
|
121
|
-
export {
|
|
122
|
-
DEFAULT_BLOOM_CONFIG,
|
|
123
|
-
createAssignmentMemory,
|
|
124
|
-
formatAssignmentOutput,
|
|
125
|
-
resolveBloomRouting,
|
|
126
|
-
routeTask,
|
|
127
|
-
scoreEmployee
|
|
128
|
-
};
|