@askexenow/exe-os 0.9.112 → 0.9.113
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 +9 -7
- package/dist/bin/agentic-ontology-backfill.js +54 -11
- package/dist/bin/agentic-reflection-backfill.js +29 -1
- package/dist/bin/agentic-semantic-label.js +29 -1
- package/dist/bin/backfill-conversations.js +53 -10
- package/dist/bin/backfill-responses.js +54 -11
- package/dist/bin/backfill-vectors.js +29 -1
- package/dist/bin/bulk-sync-postgres.js +55 -12
- package/dist/bin/cleanup-stale-review-tasks.js +75 -15
- package/dist/bin/cli.js +293 -76
- package/dist/bin/exe-agent-config.js +7 -1
- package/dist/bin/exe-agent.js +28 -2
- package/dist/bin/exe-assign.js +54 -11
- package/dist/bin/exe-boot.js +481 -147
- package/dist/bin/exe-call.js +45 -4
- package/dist/bin/exe-cloud.js +93 -15
- package/dist/bin/exe-dispatch.js +369 -24
- package/dist/bin/exe-doctor.js +53 -10
- package/dist/bin/exe-export-behaviors.js +54 -11
- package/dist/bin/exe-forget.js +54 -11
- package/dist/bin/exe-gateway.js +128 -23
- package/dist/bin/exe-heartbeat.js +75 -15
- package/dist/bin/exe-kill.js +54 -11
- package/dist/bin/exe-launch-agent.js +70 -12
- package/dist/bin/exe-new-employee.js +175 -7
- package/dist/bin/exe-pending-messages.js +75 -15
- package/dist/bin/exe-pending-notifications.js +75 -15
- package/dist/bin/exe-pending-reviews.js +75 -15
- package/dist/bin/exe-rename.js +54 -11
- package/dist/bin/exe-review.js +54 -11
- package/dist/bin/exe-search.js +54 -11
- package/dist/bin/exe-session-cleanup.js +491 -146
- package/dist/bin/exe-settings.js +10 -4
- package/dist/bin/exe-start-codex.js +524 -245
- package/dist/bin/exe-start-opencode.js +534 -165
- package/dist/bin/exe-status.js +75 -15
- package/dist/bin/exe-support.js +1 -1
- package/dist/bin/exe-team.js +54 -11
- package/dist/bin/git-sweep.js +369 -24
- package/dist/bin/graph-backfill.js +54 -11
- package/dist/bin/graph-export.js +54 -11
- package/dist/bin/install.js +62 -4
- package/dist/bin/intercom-check.js +491 -146
- package/dist/bin/pre-publish.js +13 -1
- package/dist/bin/scan-tasks.js +369 -24
- package/dist/bin/setup.js +91 -13
- package/dist/bin/shard-migrate.js +54 -11
- package/dist/bin/stack-update.js +1 -1
- package/dist/bin/update.js +3 -3
- package/dist/gateway/index.js +128 -23
- package/dist/hooks/bug-report-worker.js +128 -23
- package/dist/hooks/codex-stop-task-finalizer.js +512 -140
- package/dist/hooks/commit-complete.js +369 -24
- package/dist/hooks/error-recall.js +54 -11
- package/dist/hooks/ingest.js +4575 -252
- package/dist/hooks/instructions-loaded.js +54 -11
- package/dist/hooks/notification.js +54 -11
- package/dist/hooks/post-compact.js +75 -15
- package/dist/hooks/post-tool-combined.js +75 -15
- package/dist/hooks/pre-compact.js +449 -104
- package/dist/hooks/pre-tool-use.js +90 -15
- package/dist/hooks/prompt-submit.js +129 -24
- package/dist/hooks/session-end.js +451 -109
- package/dist/hooks/session-start.js +104 -16
- package/dist/hooks/stop.js +74 -14
- package/dist/hooks/subagent-stop.js +75 -15
- package/dist/hooks/summary-worker.js +73 -7
- package/dist/index.js +128 -23
- package/dist/lib/agent-config.js +16 -1
- package/dist/lib/cloud-sync.js +38 -1
- package/dist/lib/consolidation.js +16 -1
- package/dist/lib/database.js +16 -0
- package/dist/lib/db.js +16 -0
- package/dist/lib/device-registry.js +16 -0
- package/dist/lib/employee-templates.js +29 -3
- package/dist/lib/employees.js +16 -1
- package/dist/lib/exe-daemon.js +268 -42
- package/dist/lib/hybrid-search.js +54 -11
- package/dist/lib/license.js +3 -3
- package/dist/lib/messaging.js +21 -4
- package/dist/lib/schedules.js +29 -1
- package/dist/lib/skill-learning.js +458 -70
- package/dist/lib/status-brief.js +14 -1
- package/dist/lib/store.js +54 -11
- package/dist/lib/tasks.js +393 -91
- package/dist/lib/tmux-routing.js +316 -14
- package/dist/mcp/server.js +169 -30
- package/dist/mcp/tools/create-task.js +75 -13
- package/dist/mcp/tools/deactivate-behavior.js +33 -24
- package/dist/mcp/tools/list-tasks.js +21 -4
- package/dist/mcp/tools/send-message.js +21 -4
- package/dist/mcp/tools/update-task.js +390 -91
- package/dist/runtime/index.js +446 -101
- package/dist/tui/App.js +208 -54
- package/package.json +1 -1
|
@@ -180,7 +180,7 @@ function getAgentRuntime(agentId) {
|
|
|
180
180
|
if (orgDefault) return orgDefault;
|
|
181
181
|
return { runtime: DEFAULT_RUNTIME, model: DEFAULT_MODELS[DEFAULT_RUNTIME] };
|
|
182
182
|
}
|
|
183
|
-
function setAgentRuntime(agentId, runtime, model, reasoning_effort) {
|
|
183
|
+
function setAgentRuntime(agentId, runtime, model, reasoning_effort, mcps) {
|
|
184
184
|
const knownModels = KNOWN_RUNTIMES[runtime];
|
|
185
185
|
if (!knownModels) {
|
|
186
186
|
return {
|
|
@@ -195,8 +195,14 @@ function setAgentRuntime(agentId, runtime, model, reasoning_effort) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
const config = loadAgentConfig();
|
|
198
|
+
const existing = config[agentId];
|
|
198
199
|
const entry = { runtime, model };
|
|
199
200
|
if (reasoning_effort) entry.reasoning_effort = reasoning_effort;
|
|
201
|
+
if (mcps !== void 0) {
|
|
202
|
+
entry.mcps = mcps.includes("exe-os") ? mcps : ["exe-os", ...mcps];
|
|
203
|
+
} else if (existing?.mcps) {
|
|
204
|
+
entry.mcps = existing.mcps;
|
|
205
|
+
}
|
|
200
206
|
config[agentId] = entry;
|
|
201
207
|
saveAgentConfig(config);
|
|
202
208
|
return { ok: true };
|
package/dist/bin/exe-agent.js
CHANGED
|
@@ -1353,11 +1353,17 @@ var PLATFORM_PROCEDURES = [
|
|
|
1353
1353
|
content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
|
|
1354
1354
|
},
|
|
1355
1355
|
{
|
|
1356
|
-
title: "
|
|
1356
|
+
title: "Orchestration phase guidance \u2014 recommend, never trap",
|
|
1357
1357
|
domain: "workflow",
|
|
1358
1358
|
priority: "p1",
|
|
1359
1359
|
content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
|
|
1360
1360
|
},
|
|
1361
|
+
{
|
|
1362
|
+
title: "Routing slot vs display title \u2014 internal 'coo' is plumbing, not your name",
|
|
1363
|
+
domain: "identity",
|
|
1364
|
+
priority: "p0",
|
|
1365
|
+
content: "These procedures reference 'COO' as a shorthand for the coordinator role. This is an INTERNAL routing slot used by exe-os code (chain-of-command checks, dispatch logic, session detection). It is NOT your display title. Your actual title comes from your identity file's `title:` field \u2014 that is what you use externally: introductions, sign-offs, team comms, and any user-facing text. If your identity says `title: AI Chief of Staff`, you are the AI Chief of Staff. The routing slot stays `role: coo` for code compatibility \u2014 never rename it, but also never introduce yourself as 'COO' unless your identity file explicitly says so. The founder chose your title; respect it."
|
|
1366
|
+
},
|
|
1361
1367
|
{
|
|
1362
1368
|
title: "Single dispatch path \u2014 create_task only",
|
|
1363
1369
|
domain: "workflow",
|
|
@@ -1391,6 +1397,12 @@ var PLATFORM_PROCEDURES = [
|
|
|
1391
1397
|
priority: "p0",
|
|
1392
1398
|
content: "NEVER: (1) Access the database directly \u2014 it's SQLCipher encrypted, always fails. Use MCP tools only. (2) Manually spawn tmux sessions \u2014 create_task handles it. (3) Run git checkout main \u2014 agents work in worktrees. (4) Modify another agent's in-progress task. (5) Push to remote \u2014 the COO reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
1393
1399
|
},
|
|
1400
|
+
{
|
|
1401
|
+
title: "Destructive operations \u2014 mandatory reviewer gate",
|
|
1402
|
+
domain: "security",
|
|
1403
|
+
priority: "p0",
|
|
1404
|
+
content: "Before ANY destructive operation (delete, remove, overwrite, drop, reset, force-push, truncate), you MUST: (1) Have your full task spec accessible \u2014 if you cannot read it, STOP and report to your reviewer. Never improvise destructive actions. (2) Confirm with your reviewer (assigned_by or COO) before executing. (3) If the task spec explicitly authorizes the operation, proceed \u2014 but log it. Violation = immediate task failure. This applies to ALL agents regardless of role."
|
|
1405
|
+
},
|
|
1394
1406
|
{
|
|
1395
1407
|
title: "Customer patch triage \u2014 upstream bug vs customization",
|
|
1396
1408
|
domain: "support",
|
|
@@ -1742,9 +1754,23 @@ var PROCEDURES_MARKER = "EXE OS \u2014 VISION AND NON-NEGOTIABLE PRINCIPLES";
|
|
|
1742
1754
|
function getSessionPrompt(storedPrompt) {
|
|
1743
1755
|
const markerIndex = storedPrompt.indexOf(PROCEDURES_MARKER);
|
|
1744
1756
|
const withoutProcedures = markerIndex >= 0 ? storedPrompt.slice(0, markerIndex).trimEnd() : storedPrompt;
|
|
1757
|
+
let titlePrefix = "";
|
|
1758
|
+
const frontmatterMatch = withoutProcedures.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
1759
|
+
if (frontmatterMatch) {
|
|
1760
|
+
const titleMatch = frontmatterMatch[1].match(/^title:\s*(.+)$/m);
|
|
1761
|
+
const roleMatch = frontmatterMatch[1].match(/^role:\s*(.+)$/m);
|
|
1762
|
+
if (titleMatch) {
|
|
1763
|
+
const title = titleMatch[1].trim();
|
|
1764
|
+
const role = roleMatch ? roleMatch[1].trim() : "";
|
|
1765
|
+
if (title && role && title.toLowerCase() !== role.toLowerCase()) {
|
|
1766
|
+
titlePrefix = `## Your Identity
|
|
1767
|
+
You are **${title}** (specialist). `;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1745
1771
|
const rolePrompt = withoutProcedures.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/, "").replace(/<!--[\s\S]*?-->/g, "").trimStart();
|
|
1746
1772
|
const globalBlock = getGlobalProceduresBlock();
|
|
1747
|
-
return `${globalBlock}${rolePrompt}
|
|
1773
|
+
return `${globalBlock}${titlePrefix}${rolePrompt}
|
|
1748
1774
|
${BASE_OPERATING_PROCEDURES}`;
|
|
1749
1775
|
}
|
|
1750
1776
|
|
package/dist/bin/exe-assign.js
CHANGED
|
@@ -3184,6 +3184,22 @@ async function ensureSchema() {
|
|
|
3184
3184
|
} catch (e) {
|
|
3185
3185
|
logCatchDebug("migration", e);
|
|
3186
3186
|
}
|
|
3187
|
+
try {
|
|
3188
|
+
await client.execute({
|
|
3189
|
+
sql: `ALTER TABLE memories ADD COLUMN visibility TEXT DEFAULT 'private'`,
|
|
3190
|
+
args: []
|
|
3191
|
+
});
|
|
3192
|
+
} catch (e) {
|
|
3193
|
+
logCatchDebug("migration", e);
|
|
3194
|
+
}
|
|
3195
|
+
try {
|
|
3196
|
+
await client.execute({
|
|
3197
|
+
sql: `ALTER TABLE memories ADD COLUMN strength REAL DEFAULT 1.0`,
|
|
3198
|
+
args: []
|
|
3199
|
+
});
|
|
3200
|
+
} catch (e) {
|
|
3201
|
+
logCatchDebug("migration", e);
|
|
3202
|
+
}
|
|
3187
3203
|
}
|
|
3188
3204
|
async function disposeDatabase() {
|
|
3189
3205
|
if (_walCheckpointTimer) {
|
|
@@ -3750,11 +3766,17 @@ var init_platform_procedures = __esm({
|
|
|
3750
3766
|
content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
|
|
3751
3767
|
},
|
|
3752
3768
|
{
|
|
3753
|
-
title: "
|
|
3769
|
+
title: "Orchestration phase guidance \u2014 recommend, never trap",
|
|
3754
3770
|
domain: "workflow",
|
|
3755
3771
|
priority: "p1",
|
|
3756
3772
|
content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
|
|
3757
3773
|
},
|
|
3774
|
+
{
|
|
3775
|
+
title: "Routing slot vs display title \u2014 internal 'coo' is plumbing, not your name",
|
|
3776
|
+
domain: "identity",
|
|
3777
|
+
priority: "p0",
|
|
3778
|
+
content: "These procedures reference 'COO' as a shorthand for the coordinator role. This is an INTERNAL routing slot used by exe-os code (chain-of-command checks, dispatch logic, session detection). It is NOT your display title. Your actual title comes from your identity file's `title:` field \u2014 that is what you use externally: introductions, sign-offs, team comms, and any user-facing text. If your identity says `title: AI Chief of Staff`, you are the AI Chief of Staff. The routing slot stays `role: coo` for code compatibility \u2014 never rename it, but also never introduce yourself as 'COO' unless your identity file explicitly says so. The founder chose your title; respect it."
|
|
3779
|
+
},
|
|
3758
3780
|
{
|
|
3759
3781
|
title: "Single dispatch path \u2014 create_task only",
|
|
3760
3782
|
domain: "workflow",
|
|
@@ -3788,6 +3810,12 @@ var init_platform_procedures = __esm({
|
|
|
3788
3810
|
priority: "p0",
|
|
3789
3811
|
content: "NEVER: (1) Access the database directly \u2014 it's SQLCipher encrypted, always fails. Use MCP tools only. (2) Manually spawn tmux sessions \u2014 create_task handles it. (3) Run git checkout main \u2014 agents work in worktrees. (4) Modify another agent's in-progress task. (5) Push to remote \u2014 the COO reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
3790
3812
|
},
|
|
3813
|
+
{
|
|
3814
|
+
title: "Destructive operations \u2014 mandatory reviewer gate",
|
|
3815
|
+
domain: "security",
|
|
3816
|
+
priority: "p0",
|
|
3817
|
+
content: "Before ANY destructive operation (delete, remove, overwrite, drop, reset, force-push, truncate), you MUST: (1) Have your full task spec accessible \u2014 if you cannot read it, STOP and report to your reviewer. Never improvise destructive actions. (2) Confirm with your reviewer (assigned_by or COO) before executing. (3) If the task spec explicitly authorizes the operation, proceed \u2014 but log it. Violation = immediate task failure. This applies to ALL agents regardless of role."
|
|
3818
|
+
},
|
|
3791
3819
|
{
|
|
3792
3820
|
title: "Customer patch triage \u2014 upstream bug vs customization",
|
|
3793
3821
|
domain: "support",
|
|
@@ -4073,10 +4101,24 @@ function stableId(memoryId, type, content) {
|
|
|
4073
4101
|
return createHash2("sha256").update(`${memoryId}:${type}:${content}`).digest("hex").slice(0, 32);
|
|
4074
4102
|
}
|
|
4075
4103
|
function cleanText(text) {
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4104
|
+
let cleaned = text.replace(
|
|
4105
|
+
/```(\w*)\n(.*?)(?:\n[\s\S]*?)```/g,
|
|
4106
|
+
(_m, lang, firstLine) => `[code${lang ? `:${lang}` : ""}] ${firstLine.trim()}`
|
|
4107
|
+
);
|
|
4108
|
+
cleaned = cleaned.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
|
|
4109
|
+
return cleaned;
|
|
4110
|
+
}
|
|
4111
|
+
function splitSegments(text) {
|
|
4112
|
+
const cleaned = cleanText(text);
|
|
4113
|
+
const segments = cleaned.split(/(?<=[.!?:;])\s+|\n{2,}|(?<=\))\s+(?=[A-Z])|\s*[|│]\s*/).map((s) => s.trim()).filter((s) => s.length >= MIN_SEGMENT_CHARS && s.length <= MAX_SEGMENT_CHARS);
|
|
4114
|
+
if (segments.length === 0 && cleaned.length >= MIN_SEGMENT_CHARS) {
|
|
4115
|
+
const lines = cleaned.split(/\n+/).map((l) => l.trim()).filter((l) => l.length >= MIN_SEGMENT_CHARS && l.length <= MAX_SEGMENT_CHARS);
|
|
4116
|
+
if (lines.length > 0) return lines;
|
|
4117
|
+
if (cleaned.length >= MIN_SEGMENT_CHARS) {
|
|
4118
|
+
return [cleaned.slice(0, MAX_SEGMENT_CHARS)];
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4121
|
+
return segments;
|
|
4080
4122
|
}
|
|
4081
4123
|
function inferCardType(sentence, toolName) {
|
|
4082
4124
|
const lower = sentence.toLowerCase();
|
|
@@ -4108,12 +4150,12 @@ function predicateFor(type) {
|
|
|
4108
4150
|
}
|
|
4109
4151
|
}
|
|
4110
4152
|
function extractMemoryCards(row) {
|
|
4111
|
-
const
|
|
4153
|
+
const segments = splitSegments(row.raw_text);
|
|
4112
4154
|
const cards = [];
|
|
4113
|
-
for (const sentence of
|
|
4155
|
+
for (const sentence of segments) {
|
|
4114
4156
|
const type = inferCardType(sentence, row.tool_name);
|
|
4115
4157
|
const subject = extractSubject(sentence, row.agent_id);
|
|
4116
|
-
const content = sentence.length >
|
|
4158
|
+
const content = sentence.length > MAX_SEGMENT_CHARS ? `${sentence.slice(0, MAX_SEGMENT_CHARS - 1)}\u2026` : sentence;
|
|
4117
4159
|
cards.push({
|
|
4118
4160
|
id: stableId(row.id, type, content),
|
|
4119
4161
|
memory_id: row.id,
|
|
@@ -4209,13 +4251,14 @@ Source memory: ${String(row.source_ref ?? row.memory_id)}`,
|
|
|
4209
4251
|
last_accessed: String(row.timestamp)
|
|
4210
4252
|
}));
|
|
4211
4253
|
}
|
|
4212
|
-
var MAX_CARDS_PER_MEMORY,
|
|
4254
|
+
var MAX_CARDS_PER_MEMORY, MAX_SEGMENT_CHARS, MIN_SEGMENT_CHARS;
|
|
4213
4255
|
var init_memory_cards = __esm({
|
|
4214
4256
|
"src/lib/memory-cards.ts"() {
|
|
4215
4257
|
"use strict";
|
|
4216
4258
|
init_database();
|
|
4217
|
-
MAX_CARDS_PER_MEMORY =
|
|
4218
|
-
|
|
4259
|
+
MAX_CARDS_PER_MEMORY = 8;
|
|
4260
|
+
MAX_SEGMENT_CHARS = 500;
|
|
4261
|
+
MIN_SEGMENT_CHARS = 20;
|
|
4219
4262
|
}
|
|
4220
4263
|
});
|
|
4221
4264
|
|