@askexenow/exe-os 0.9.263 → 0.9.265
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/deploy/stack-manifests/v0.9.json +1 -1
- package/dist/backfill-metadata-WM46YQZL.js +597 -0
- package/dist/bin/agentic-ontology-backfill.js +1 -1
- package/dist/bin/agentic-reflection-backfill.js +1 -1
- package/dist/bin/agentic-semantic-label.js +1 -1
- package/dist/bin/backfill-conversations.js +1 -1
- package/dist/bin/backfill-responses.js +1 -1
- package/dist/bin/backfill-vectors.js +2 -2
- package/dist/bin/bulk-sync-postgres.js +1 -1
- package/dist/bin/cleanup-stale-review-tasks.js +2 -2
- package/dist/bin/cli.js +5 -5
- package/dist/bin/exe-assign.js +1 -1
- package/dist/bin/exe-boot.js +3 -3
- package/dist/bin/exe-dispatch.js +2 -2
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +2 -2
- package/dist/bin/exe-forget.js +3 -3
- package/dist/bin/exe-gateway.js +5 -5
- package/dist/bin/exe-heartbeat.js +3 -3
- package/dist/bin/exe-kill.js +3 -3
- package/dist/bin/exe-launch-agent.js +3 -3
- package/dist/bin/exe-pending-messages.js +3 -3
- package/dist/bin/exe-pending-notifications.js +2 -2
- package/dist/bin/exe-pending-reviews.js +6 -4
- package/dist/bin/exe-review.js +3 -3
- package/dist/bin/exe-search.js +2 -2
- package/dist/bin/exe-session-cleanup.js +5 -5
- package/dist/bin/exe-start-codex.js +1 -1
- package/dist/bin/exe-start-opencode.js +1 -1
- package/dist/bin/exe-status.js +3 -3
- package/dist/bin/exe-support.js +1 -1
- package/dist/bin/exe-team.js +1 -1
- package/dist/bin/git-sweep.js +2 -2
- package/dist/bin/graph-backfill.js +1 -1
- package/dist/bin/graph-export.js +2 -2
- package/dist/bin/import-history.js +2 -2
- package/dist/bin/intercom-check.js +5 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +1 -1
- package/dist/bin/scan-tasks.js +2 -2
- package/dist/bin/shard-migrate.js +1 -1
- package/dist/capacity-monitor-FZORNXTA.js +49 -0
- package/dist/catchup-brief-PRKHIRWW.js +151 -0
- package/dist/chunk-2GU3NYMB.js +813 -0
- package/dist/chunk-2VT7Z2E2.js +197 -0
- package/dist/chunk-3L6XLN4V.js +1090 -0
- package/dist/chunk-3T4PNG5O.js +447 -0
- package/dist/chunk-3W324KN7.js +13696 -0
- package/dist/{chunk-BJYXHSFN.js → chunk-3X555IGG.js} +1 -1
- package/dist/chunk-4IATAIAF.js +89 -0
- package/dist/chunk-5M4F2FVD.js +204 -0
- package/dist/chunk-5TANMPI4.js +377 -0
- package/dist/chunk-67E5WIMW.js +333 -0
- package/dist/chunk-6NRJIARA.js +346 -0
- package/dist/chunk-6O22GTSE.js +1148 -0
- package/dist/chunk-7O5CMDP6.js +1345 -0
- package/dist/chunk-7P2JKEO3.js +382 -0
- package/dist/chunk-A4UY44T7.js +486 -0
- package/dist/chunk-AZHPQGSI.js +159 -0
- package/dist/chunk-BQAC3GCO.js +127 -0
- package/dist/chunk-CIWJRYIC.js +244 -0
- package/dist/chunk-CZO2DGGF.js +214 -0
- package/dist/chunk-D55SXO3N.js +3951 -0
- package/dist/chunk-EPDSRI6O.js +284 -0
- package/dist/chunk-EU34R2A3.js +1073 -0
- package/dist/chunk-G4KEDLSM.js +488 -0
- package/dist/{chunk-235ZCOYB.js → chunk-IBGC6JFX.js} +2 -2
- package/dist/chunk-IODP4JNE.js +551 -0
- package/dist/chunk-IZ6LCET7.js +58 -0
- package/dist/chunk-LPG3U5UW.js +731 -0
- package/dist/chunk-NH6TPXZV.js +13696 -0
- package/dist/chunk-O5TZI7OZ.js +50 -0
- package/dist/chunk-Q3N4KHLM.js +330 -0
- package/dist/chunk-QHQTMWYH.js +54 -0
- package/dist/chunk-QNYOPM2L.js +1921 -0
- package/dist/chunk-SPOA7EOD.js +81 -0
- package/dist/chunk-TK23WXKB.js +128 -0
- package/dist/chunk-TOVXER6J.js +76 -0
- package/dist/chunk-UIPAZYP7.js +171 -0
- package/dist/chunk-WXW4GF6M.js +495 -0
- package/dist/{chunk-KQNVIDBP.js → chunk-XLYBSXWS.js} +4 -3
- package/dist/core-memory-QXMQ5I7S.js +110 -0
- package/dist/crm-webhook-CH5W633Y.js +10 -0
- package/dist/cto-delegation-gate-XY3NMGTE.js +206 -0
- package/dist/daemon-orchestration-LS62JMTI.js +135 -0
- package/dist/dreaming-ZBKE2GFX.js +32 -0
- package/dist/exe-export-JNSQRIWI.js +73 -0
- package/dist/exe-import-AVGWQZLU.js +76 -0
- package/dist/exe-key-WR6QEHYO.js +579 -0
- package/dist/exe-snapshot-U6K3J6BD.js +164 -0
- package/dist/fast-db-init-ZHRRYI7M.js +7 -0
- package/dist/gateway/index.js +6 -6
- package/dist/git-task-sweep-64KSWRUI.js +40 -0
- package/dist/hooks/bug-report-worker.js +4 -4
- package/dist/hooks/codex-stop-task-finalizer.js +4 -4
- package/dist/hooks/commit-complete.js +4 -4
- package/dist/hooks/error-recall.js +2 -2
- package/dist/hooks/ingest.js +2 -2
- package/dist/hooks/instructions-loaded.js +1 -1
- package/dist/hooks/manifest.json +18 -18
- package/dist/hooks/notification.js +1 -1
- package/dist/hooks/post-compact.js +2 -2
- package/dist/hooks/post-tool-combined.js +2 -2
- package/dist/hooks/pre-compact.js +3 -3
- package/dist/hooks/pre-tool-use.js +6 -6
- package/dist/hooks/prompt-submit.js +16 -11
- package/dist/hooks/session-end.js +5 -5
- package/dist/hooks/session-start.js +6 -6
- package/dist/hooks/stop.js +5 -5
- package/dist/hooks/subagent-stop.js +2 -2
- package/dist/hooks/summary-worker.js +5 -5
- package/dist/index.js +9 -9
- package/dist/lib/consolidation.js +2 -2
- package/dist/lib/exe-daemon.js +17 -17
- package/dist/lib/hybrid-search.js +2 -2
- package/dist/lib/messaging.js +2 -2
- package/dist/lib/schedules.js +2 -2
- package/dist/lib/store.js +1 -1
- package/dist/lib/tasks.js +3 -3
- package/dist/lib/tmux-routing.js +1 -1
- package/dist/mcp/register-tools.js +25 -25
- package/dist/mcp/server.js +26 -26
- package/dist/mcp/tools/create-task.js +4 -4
- package/dist/mcp/tools/list-tasks.js +4 -4
- package/dist/mcp/tools/send-message.js +3 -3
- package/dist/mcp/tools/update-task.js +4 -4
- package/dist/notifications-45QSHDFA.js +45 -0
- package/dist/orchestrator-7XBMFK7D.js +33 -0
- package/dist/pipeline-router-MQKRNCTR.js +13 -0
- package/dist/reranker-CJW3UYE2.js +19 -0
- package/dist/review-polling-RL75XLAY.js +124 -0
- package/dist/runtime/index.js +3 -3
- package/dist/session-events-ZULAN4XL.js +36 -0
- package/dist/session-scope-V2RSOTDU.js +86 -0
- package/dist/skill-refinement-BSX6Q6IN.js +157 -0
- package/dist/{support-outbox-SZVLHHZG.js → support-outbox-SO73Q5H2.js} +202 -7
- package/dist/task-enforcement-JRTAOYZT.js +333 -0
- package/dist/task-scope-GNCB2GAM.js +35 -0
- package/dist/tasks-crud-MZIOYF3R.js +77 -0
- package/dist/tasks-notify-7KNZ4ULO.js +38 -0
- package/dist/tasks-review-U5VEV4Y7.js +47 -0
- package/dist/telemetry-upload-BIB5TJA4.js +739 -0
- package/dist/tui/App.js +7 -7
- package/dist/tui-data-ZSB5DDEY.js +258 -0
- package/dist/worker-gate-TXLX33PX.js +21 -0
- package/dist/workflow-engine-3PIT3Y56.js +28 -0
- package/package.json +1 -1
- package/release-notes.json +27 -24
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sessionScopeFilter
|
|
3
|
+
} from "./chunk-D55SXO3N.js";
|
|
4
|
+
import "./chunk-PWLX576L.js";
|
|
5
|
+
import "./chunk-5CHYEKMH.js";
|
|
6
|
+
import "./chunk-4JERP7NT.js";
|
|
7
|
+
import "./chunk-3XNYEGA5.js";
|
|
8
|
+
import "./chunk-MVW62NIZ.js";
|
|
9
|
+
import "./chunk-OYNKIAVW.js";
|
|
10
|
+
import "./chunk-CX6GL3ZJ.js";
|
|
11
|
+
import "./chunk-JTADPL6X.js";
|
|
12
|
+
import "./chunk-XJUUWHVN.js";
|
|
13
|
+
import "./chunk-NGP6LSV2.js";
|
|
14
|
+
import "./chunk-A3T5KDD3.js";
|
|
15
|
+
import "./chunk-CVYC6DUW.js";
|
|
16
|
+
import "./chunk-OPU3NYOO.js";
|
|
17
|
+
import "./chunk-GJV3WDWM.js";
|
|
18
|
+
import "./chunk-MP2AFCGL.js";
|
|
19
|
+
import "./chunk-25NFDJ3N.js";
|
|
20
|
+
import "./chunk-HYZV25LY.js";
|
|
21
|
+
import {
|
|
22
|
+
getClient,
|
|
23
|
+
getEmployeeByRole,
|
|
24
|
+
loadEmployeesSync
|
|
25
|
+
} from "./chunk-QQZMP6QL.js";
|
|
26
|
+
import "./chunk-2I23RPSI.js";
|
|
27
|
+
import "./chunk-ACBEUQR2.js";
|
|
28
|
+
import "./chunk-FXU7JOXK.js";
|
|
29
|
+
import "./chunk-MOZ2YQ54.js";
|
|
30
|
+
import "./chunk-VXIMSRTO.js";
|
|
31
|
+
import "./chunk-LYH5HE24.js";
|
|
32
|
+
import "./chunk-MLKGABMK.js";
|
|
33
|
+
|
|
34
|
+
// src/lib/cto-delegation-gate.ts
|
|
35
|
+
import os from "os";
|
|
36
|
+
import path from "path";
|
|
37
|
+
import { existsSync, readFileSync, statSync } from "fs";
|
|
38
|
+
var GATED_ROLE = "CTO";
|
|
39
|
+
function resolveGatedAgent() {
|
|
40
|
+
try {
|
|
41
|
+
const employees = loadEmployeesSync();
|
|
42
|
+
const cto = getEmployeeByRole(employees, GATED_ROLE);
|
|
43
|
+
return cto?.name ?? "";
|
|
44
|
+
} catch {
|
|
45
|
+
return "";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
var GATED_AGENT = resolveGatedAgent();
|
|
49
|
+
function getGatedAgent() {
|
|
50
|
+
return resolveGatedAgent() || GATED_AGENT;
|
|
51
|
+
}
|
|
52
|
+
var BLOCKED_PATH_PREFIXES = [
|
|
53
|
+
"src/",
|
|
54
|
+
"tests/",
|
|
55
|
+
"scripts/",
|
|
56
|
+
"bin/",
|
|
57
|
+
".github/workflows/",
|
|
58
|
+
".claude/skills/"
|
|
59
|
+
];
|
|
60
|
+
var BLOCKED_FILENAMES = [
|
|
61
|
+
"package.json",
|
|
62
|
+
"tsconfig.json",
|
|
63
|
+
"docker-compose.yml"
|
|
64
|
+
];
|
|
65
|
+
var BLOCKED_DOCKERFILE_PREFIX = "Dockerfile";
|
|
66
|
+
var BLOCKED_EXTENSIONS = [
|
|
67
|
+
".ts",
|
|
68
|
+
".js",
|
|
69
|
+
".tsx",
|
|
70
|
+
".jsx",
|
|
71
|
+
".rs",
|
|
72
|
+
".py",
|
|
73
|
+
".go",
|
|
74
|
+
".sh",
|
|
75
|
+
".yaml",
|
|
76
|
+
".yml",
|
|
77
|
+
".prisma",
|
|
78
|
+
".sql"
|
|
79
|
+
];
|
|
80
|
+
var EXEMPT_MD_DIR_PREFIXES = [
|
|
81
|
+
".planning/",
|
|
82
|
+
"exe/output/",
|
|
83
|
+
"exe/",
|
|
84
|
+
"docs/"
|
|
85
|
+
];
|
|
86
|
+
var RECENT_DISPATCH_WINDOW_MS = 5 * 60 * 1e3;
|
|
87
|
+
var SCRATCHPAD_MAX_AGE_MS = 10 * 60 * 1e3;
|
|
88
|
+
var SCRATCHPAD_ESCAPE_PATTERN = /^(?:ENGINEER|TOM)-CAPABLE:\s*NO\s*—\s*reason:\s*\S+/m;
|
|
89
|
+
function toWorkspaceRelative(filePath, cwd = process.cwd()) {
|
|
90
|
+
const normalized = path.normalize(filePath);
|
|
91
|
+
if (normalized.startsWith(cwd + path.sep)) {
|
|
92
|
+
return normalized.slice(cwd.length + 1);
|
|
93
|
+
}
|
|
94
|
+
if (path.isAbsolute(normalized)) {
|
|
95
|
+
return path.basename(normalized);
|
|
96
|
+
}
|
|
97
|
+
return normalized;
|
|
98
|
+
}
|
|
99
|
+
function isDockerfile(basename) {
|
|
100
|
+
return basename === BLOCKED_DOCKERFILE_PREFIX || basename.startsWith(`${BLOCKED_DOCKERFILE_PREFIX}.`);
|
|
101
|
+
}
|
|
102
|
+
function classifyPath(filePath, cwd) {
|
|
103
|
+
const rel = toWorkspaceRelative(filePath, cwd);
|
|
104
|
+
const basename = path.basename(rel);
|
|
105
|
+
const ext = path.extname(rel).toLowerCase();
|
|
106
|
+
if (ext === ".md") {
|
|
107
|
+
for (const prefix of EXEMPT_MD_DIR_PREFIXES) {
|
|
108
|
+
if (rel.startsWith(prefix)) return "exempt";
|
|
109
|
+
}
|
|
110
|
+
if (!BLOCKED_PATH_PREFIXES.some((p) => rel.startsWith(p))) {
|
|
111
|
+
return "exempt";
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (BLOCKED_FILENAMES.includes(basename)) return "code";
|
|
115
|
+
if (isDockerfile(basename)) return "code";
|
|
116
|
+
if (BLOCKED_EXTENSIONS.includes(ext)) return "code";
|
|
117
|
+
if (BLOCKED_PATH_PREFIXES.some((p) => rel.startsWith(p))) return "code";
|
|
118
|
+
return "exempt";
|
|
119
|
+
}
|
|
120
|
+
async function hasRecentEngineerDispatch(now = Date.now()) {
|
|
121
|
+
try {
|
|
122
|
+
const client = getClient();
|
|
123
|
+
const engineers = loadEmployeesSync().filter(
|
|
124
|
+
(e) => e.role.toLowerCase() === "principal engineer"
|
|
125
|
+
);
|
|
126
|
+
const engineerNames = engineers.map((e) => e.name);
|
|
127
|
+
const gatedAgent = getGatedAgent();
|
|
128
|
+
if (!gatedAgent) return false;
|
|
129
|
+
if (engineerNames.length === 0) return false;
|
|
130
|
+
const placeholders = engineerNames.map(() => "?").join(",");
|
|
131
|
+
const ydScope = sessionScopeFilter();
|
|
132
|
+
const result = await client.execute({
|
|
133
|
+
sql: `SELECT MAX(created_at) AS last_dispatch
|
|
134
|
+
FROM tasks
|
|
135
|
+
WHERE assigned_by = ? AND assigned_to IN (${placeholders})${ydScope.sql}`,
|
|
136
|
+
args: [gatedAgent, ...engineerNames, ...ydScope.args]
|
|
137
|
+
});
|
|
138
|
+
const raw = result.rows[0]?.last_dispatch;
|
|
139
|
+
if (raw === null || raw === void 0) return false;
|
|
140
|
+
const parsed = Date.parse(String(raw));
|
|
141
|
+
if (Number.isNaN(parsed)) return false;
|
|
142
|
+
return now - parsed <= RECENT_DISPATCH_WINDOW_MS;
|
|
143
|
+
} catch {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function scratchpadPath(sessionId, homeDir = os.homedir()) {
|
|
148
|
+
return path.join(
|
|
149
|
+
homeDir,
|
|
150
|
+
".exe-os",
|
|
151
|
+
"session-cache",
|
|
152
|
+
`cto-scratchpad-${sessionId}.txt`
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
function hasValidScratchpadEscape(sessionId, now = Date.now(), homeDir = os.homedir()) {
|
|
156
|
+
const paths = [scratchpadPath(sessionId, homeDir)];
|
|
157
|
+
for (const filePath of paths) {
|
|
158
|
+
if (!existsSync(filePath)) continue;
|
|
159
|
+
try {
|
|
160
|
+
const stat = statSync(filePath);
|
|
161
|
+
if (now - stat.mtimeMs > SCRATCHPAD_MAX_AGE_MS) continue;
|
|
162
|
+
const body = readFileSync(filePath, "utf-8");
|
|
163
|
+
if (SCRATCHPAD_ESCAPE_PATTERN.test(body)) return true;
|
|
164
|
+
} catch {
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
var GATE_BLOCK_MESSAGE = [
|
|
170
|
+
"ACTION BLOCKED by CTO delegation gate. Your Write/Edit was DENIED \u2014 it did NOT execute.",
|
|
171
|
+
"This edit looks implementable by an engineer. You MUST either:",
|
|
172
|
+
" 1. Dispatch create_task to an engineer, OR",
|
|
173
|
+
" 2. Add ENGINEER-CAPABLE: NO with explicit reason to proceed yourself.",
|
|
174
|
+
"Do NOT report this action as successful. It was blocked. No file was changed.",
|
|
175
|
+
"If you are a sub-agent, report this FAILURE to your parent agent."
|
|
176
|
+
].join("\n");
|
|
177
|
+
async function evaluateDelegationGate(opts) {
|
|
178
|
+
const gatedAgent = getGatedAgent();
|
|
179
|
+
if (!gatedAgent || opts.agentId !== gatedAgent) {
|
|
180
|
+
return { outcome: "allow", reason: "agent_not_gated" };
|
|
181
|
+
}
|
|
182
|
+
if (!/^(Write|Edit)$/.test(opts.toolName)) {
|
|
183
|
+
return { outcome: "allow", reason: "tool_not_gated" };
|
|
184
|
+
}
|
|
185
|
+
if (classifyPath(opts.filePath, opts.cwd) === "exempt") {
|
|
186
|
+
return { outcome: "allow", reason: "exempt_path" };
|
|
187
|
+
}
|
|
188
|
+
if (await hasRecentEngineerDispatch(opts.now)) {
|
|
189
|
+
return { outcome: "allow", reason: "recent_engineer_dispatch" };
|
|
190
|
+
}
|
|
191
|
+
if (hasValidScratchpadEscape(opts.sessionId, opts.now, opts.homeDir)) {
|
|
192
|
+
return { outcome: "allow", reason: "scratchpad_escape" };
|
|
193
|
+
}
|
|
194
|
+
return { outcome: "block", reason: "no_delegation_no_escape" };
|
|
195
|
+
}
|
|
196
|
+
export {
|
|
197
|
+
GATED_AGENT,
|
|
198
|
+
GATED_ROLE,
|
|
199
|
+
GATE_BLOCK_MESSAGE,
|
|
200
|
+
classifyPath,
|
|
201
|
+
evaluateDelegationGate,
|
|
202
|
+
getGatedAgent,
|
|
203
|
+
hasRecentEngineerDispatch,
|
|
204
|
+
hasValidScratchpadEscape,
|
|
205
|
+
scratchpadPath
|
|
206
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AUTO_WAKE_COOLDOWN_MS,
|
|
3
|
+
AUTO_WAKE_MAX_RETRIES,
|
|
4
|
+
COO_CONTEXT_THRESHOLD_PCT,
|
|
5
|
+
COO_RESTART_COOLDOWN_MS,
|
|
6
|
+
CRASH_LOOP_THRESHOLD,
|
|
7
|
+
CRASH_LOOP_WINDOW_MS,
|
|
8
|
+
HOOK_PROCESS_PATTERNS,
|
|
9
|
+
IDLE_KILL_INTERCOM_ACK_WINDOW_MS,
|
|
10
|
+
IDLE_NUDGE_DEDUP_MS,
|
|
11
|
+
ORPHAN_MAX_AGE_SECS,
|
|
12
|
+
ORPHAN_PATTERNS,
|
|
13
|
+
ORPHAN_SIGKILL_DELAY_MS,
|
|
14
|
+
REVIEW_NUDGE_COOLDOWN_MS,
|
|
15
|
+
SESSION_CONTEXT_THRESHOLD_PCT,
|
|
16
|
+
SESSION_TTL_HOURS,
|
|
17
|
+
STUCK_TASK_GRACE_MS,
|
|
18
|
+
WORKTREE_REAPER_INTERVAL_MS,
|
|
19
|
+
_resetAutoWakeState,
|
|
20
|
+
_resetCooRestartState,
|
|
21
|
+
checkAutoWakeGates,
|
|
22
|
+
checkSessionTTL,
|
|
23
|
+
classifyTtlKillReason,
|
|
24
|
+
cleanupStaleReviews,
|
|
25
|
+
createAutoWakeRealDeps,
|
|
26
|
+
createCoordinatorRestartRealDeps,
|
|
27
|
+
createIdleKillRealDeps,
|
|
28
|
+
createIdleNudgeRealDeps,
|
|
29
|
+
createOrphanReaperRealDeps,
|
|
30
|
+
createReviewNudgeRealDeps,
|
|
31
|
+
createSessionTTLRealDeps,
|
|
32
|
+
createStaleReviewRealDeps,
|
|
33
|
+
createStuckTaskRealDeps,
|
|
34
|
+
createWorktreeReaperRealDeps,
|
|
35
|
+
createZombieAgentReaperRealDeps,
|
|
36
|
+
gcStaleCheckpoints,
|
|
37
|
+
loadNudgeState,
|
|
38
|
+
pollCoordinatorContextRestart,
|
|
39
|
+
pollIdleEmployees,
|
|
40
|
+
pollIdleKill,
|
|
41
|
+
pollOrphanedTasks,
|
|
42
|
+
pollReviewNudge,
|
|
43
|
+
pollTaskGroupBarriers,
|
|
44
|
+
reapOrphanedMcpProcesses,
|
|
45
|
+
reapOrphanedWorktrees,
|
|
46
|
+
reapZombieAgentProcesses,
|
|
47
|
+
releaseStuckTasks,
|
|
48
|
+
saveNudgeState,
|
|
49
|
+
shouldAutoWake,
|
|
50
|
+
shouldKillIdleSession,
|
|
51
|
+
shouldKillSession,
|
|
52
|
+
shouldNudgeEmployee
|
|
53
|
+
} from "./chunk-QNYOPM2L.js";
|
|
54
|
+
import "./chunk-33ZGDWSS.js";
|
|
55
|
+
import "./chunk-3T4PNG5O.js";
|
|
56
|
+
import "./chunk-CIWJRYIC.js";
|
|
57
|
+
import "./chunk-D55SXO3N.js";
|
|
58
|
+
import "./chunk-PWLX576L.js";
|
|
59
|
+
import "./chunk-5CHYEKMH.js";
|
|
60
|
+
import "./chunk-4JERP7NT.js";
|
|
61
|
+
import "./chunk-3XNYEGA5.js";
|
|
62
|
+
import "./chunk-MVW62NIZ.js";
|
|
63
|
+
import "./chunk-OYNKIAVW.js";
|
|
64
|
+
import "./chunk-CX6GL3ZJ.js";
|
|
65
|
+
import "./chunk-JTADPL6X.js";
|
|
66
|
+
import "./chunk-XJUUWHVN.js";
|
|
67
|
+
import "./chunk-NGP6LSV2.js";
|
|
68
|
+
import "./chunk-A3T5KDD3.js";
|
|
69
|
+
import "./chunk-CVYC6DUW.js";
|
|
70
|
+
import "./chunk-OPU3NYOO.js";
|
|
71
|
+
import "./chunk-GJV3WDWM.js";
|
|
72
|
+
import "./chunk-MP2AFCGL.js";
|
|
73
|
+
import "./chunk-25NFDJ3N.js";
|
|
74
|
+
import "./chunk-HYZV25LY.js";
|
|
75
|
+
import "./chunk-QQZMP6QL.js";
|
|
76
|
+
import "./chunk-2I23RPSI.js";
|
|
77
|
+
import "./chunk-ACBEUQR2.js";
|
|
78
|
+
import "./chunk-FXU7JOXK.js";
|
|
79
|
+
import "./chunk-MOZ2YQ54.js";
|
|
80
|
+
import "./chunk-VXIMSRTO.js";
|
|
81
|
+
import "./chunk-LYH5HE24.js";
|
|
82
|
+
import "./chunk-MLKGABMK.js";
|
|
83
|
+
export {
|
|
84
|
+
AUTO_WAKE_COOLDOWN_MS,
|
|
85
|
+
AUTO_WAKE_MAX_RETRIES,
|
|
86
|
+
COO_CONTEXT_THRESHOLD_PCT,
|
|
87
|
+
COO_RESTART_COOLDOWN_MS,
|
|
88
|
+
CRASH_LOOP_THRESHOLD,
|
|
89
|
+
CRASH_LOOP_WINDOW_MS,
|
|
90
|
+
HOOK_PROCESS_PATTERNS,
|
|
91
|
+
IDLE_KILL_INTERCOM_ACK_WINDOW_MS,
|
|
92
|
+
IDLE_NUDGE_DEDUP_MS,
|
|
93
|
+
ORPHAN_MAX_AGE_SECS,
|
|
94
|
+
ORPHAN_PATTERNS,
|
|
95
|
+
ORPHAN_SIGKILL_DELAY_MS,
|
|
96
|
+
REVIEW_NUDGE_COOLDOWN_MS,
|
|
97
|
+
SESSION_CONTEXT_THRESHOLD_PCT,
|
|
98
|
+
SESSION_TTL_HOURS,
|
|
99
|
+
STUCK_TASK_GRACE_MS,
|
|
100
|
+
WORKTREE_REAPER_INTERVAL_MS,
|
|
101
|
+
_resetAutoWakeState,
|
|
102
|
+
_resetCooRestartState,
|
|
103
|
+
checkAutoWakeGates,
|
|
104
|
+
checkSessionTTL,
|
|
105
|
+
classifyTtlKillReason,
|
|
106
|
+
cleanupStaleReviews,
|
|
107
|
+
createAutoWakeRealDeps,
|
|
108
|
+
createCoordinatorRestartRealDeps,
|
|
109
|
+
createIdleKillRealDeps,
|
|
110
|
+
createIdleNudgeRealDeps,
|
|
111
|
+
createOrphanReaperRealDeps,
|
|
112
|
+
createReviewNudgeRealDeps,
|
|
113
|
+
createSessionTTLRealDeps,
|
|
114
|
+
createStaleReviewRealDeps,
|
|
115
|
+
createStuckTaskRealDeps,
|
|
116
|
+
createWorktreeReaperRealDeps,
|
|
117
|
+
createZombieAgentReaperRealDeps,
|
|
118
|
+
gcStaleCheckpoints,
|
|
119
|
+
loadNudgeState,
|
|
120
|
+
pollCoordinatorContextRestart,
|
|
121
|
+
pollIdleEmployees,
|
|
122
|
+
pollIdleKill,
|
|
123
|
+
pollOrphanedTasks,
|
|
124
|
+
pollReviewNudge,
|
|
125
|
+
pollTaskGroupBarriers,
|
|
126
|
+
reapOrphanedMcpProcesses,
|
|
127
|
+
reapOrphanedWorktrees,
|
|
128
|
+
reapZombieAgentProcesses,
|
|
129
|
+
releaseStuckTasks,
|
|
130
|
+
saveNudgeState,
|
|
131
|
+
shouldAutoWake,
|
|
132
|
+
shouldKillIdleSession,
|
|
133
|
+
shouldKillSession,
|
|
134
|
+
shouldNudgeEmployee
|
|
135
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DreamingEngine
|
|
3
|
+
} from "./chunk-IODP4JNE.js";
|
|
4
|
+
import "./chunk-D55SXO3N.js";
|
|
5
|
+
import "./chunk-PWLX576L.js";
|
|
6
|
+
import "./chunk-5CHYEKMH.js";
|
|
7
|
+
import "./chunk-4JERP7NT.js";
|
|
8
|
+
import "./chunk-3XNYEGA5.js";
|
|
9
|
+
import "./chunk-MVW62NIZ.js";
|
|
10
|
+
import "./chunk-OYNKIAVW.js";
|
|
11
|
+
import "./chunk-CX6GL3ZJ.js";
|
|
12
|
+
import "./chunk-JTADPL6X.js";
|
|
13
|
+
import "./chunk-XJUUWHVN.js";
|
|
14
|
+
import "./chunk-NGP6LSV2.js";
|
|
15
|
+
import "./chunk-A3T5KDD3.js";
|
|
16
|
+
import "./chunk-CVYC6DUW.js";
|
|
17
|
+
import "./chunk-OPU3NYOO.js";
|
|
18
|
+
import "./chunk-GJV3WDWM.js";
|
|
19
|
+
import "./chunk-MP2AFCGL.js";
|
|
20
|
+
import "./chunk-25NFDJ3N.js";
|
|
21
|
+
import "./chunk-HYZV25LY.js";
|
|
22
|
+
import "./chunk-QQZMP6QL.js";
|
|
23
|
+
import "./chunk-2I23RPSI.js";
|
|
24
|
+
import "./chunk-ACBEUQR2.js";
|
|
25
|
+
import "./chunk-FXU7JOXK.js";
|
|
26
|
+
import "./chunk-MOZ2YQ54.js";
|
|
27
|
+
import "./chunk-VXIMSRTO.js";
|
|
28
|
+
import "./chunk-LYH5HE24.js";
|
|
29
|
+
import "./chunk-MLKGABMK.js";
|
|
30
|
+
export {
|
|
31
|
+
DreamingEngine
|
|
32
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
exportOrchestration
|
|
4
|
+
} from "./chunk-IITNQWCX.js";
|
|
5
|
+
import "./chunk-K77WC6HA.js";
|
|
6
|
+
import {
|
|
7
|
+
disposeStore,
|
|
8
|
+
initStore
|
|
9
|
+
} from "./chunk-2GU3NYMB.js";
|
|
10
|
+
import "./chunk-CHCA3ZM2.js";
|
|
11
|
+
import "./chunk-P2XNRKEL.js";
|
|
12
|
+
import "./chunk-Y25OJWOQ.js";
|
|
13
|
+
import "./chunk-MP2AFCGL.js";
|
|
14
|
+
import "./chunk-QQZMP6QL.js";
|
|
15
|
+
import "./chunk-2I23RPSI.js";
|
|
16
|
+
import "./chunk-ACBEUQR2.js";
|
|
17
|
+
import "./chunk-FXU7JOXK.js";
|
|
18
|
+
import "./chunk-K333WOW4.js";
|
|
19
|
+
import "./chunk-VXIMSRTO.js";
|
|
20
|
+
import "./chunk-LYH5HE24.js";
|
|
21
|
+
import {
|
|
22
|
+
isMainModule
|
|
23
|
+
} from "./chunk-6Y4B3QF6.js";
|
|
24
|
+
import "./chunk-MLKGABMK.js";
|
|
25
|
+
|
|
26
|
+
// src/bin/exe-export.ts
|
|
27
|
+
import { mkdirSync, writeFileSync } from "fs";
|
|
28
|
+
import path from "path";
|
|
29
|
+
var OUTPUT_FLAG = "--output";
|
|
30
|
+
function printUsage() {
|
|
31
|
+
process.stdout.write("Usage: exe-os export --output <path>\n");
|
|
32
|
+
}
|
|
33
|
+
function parseOutputPath(argv) {
|
|
34
|
+
if (argv.includes("--help") || argv.includes("-h")) {
|
|
35
|
+
printUsage();
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
const flagIndex = argv.indexOf(OUTPUT_FLAG);
|
|
39
|
+
if (flagIndex === -1 || !argv[flagIndex + 1]) {
|
|
40
|
+
throw new Error("Missing required --output <path> argument");
|
|
41
|
+
}
|
|
42
|
+
return argv[flagIndex + 1];
|
|
43
|
+
}
|
|
44
|
+
async function runExeExport(argv = process.argv.slice(2)) {
|
|
45
|
+
const outputPath = parseOutputPath(argv);
|
|
46
|
+
if (outputPath == null) return;
|
|
47
|
+
await initStore();
|
|
48
|
+
try {
|
|
49
|
+
const pkg = await exportOrchestration("cli");
|
|
50
|
+
mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
51
|
+
writeFileSync(outputPath, `${JSON.stringify(pkg, null, 2)}
|
|
52
|
+
`, "utf-8");
|
|
53
|
+
process.stdout.write(
|
|
54
|
+
`Exported ${pkg.roster.length} roster entries, ${Object.keys(pkg.identities).length} identities, ${pkg.behaviors.length} behaviors, ${pkg.procedures.length} procedures to ${outputPath}
|
|
55
|
+
`
|
|
56
|
+
);
|
|
57
|
+
} finally {
|
|
58
|
+
try {
|
|
59
|
+
await disposeStore();
|
|
60
|
+
} catch {
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (isMainModule(import.meta.url) && (process.argv[1] ?? "").includes("exe-export")) {
|
|
65
|
+
runExeExport().catch((err) => {
|
|
66
|
+
process.stderr.write(`exe-os export failed: ${err instanceof Error ? err.message : String(err)}
|
|
67
|
+
`);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
runExeExport
|
|
73
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
importOrchestration,
|
|
4
|
+
validatePackage
|
|
5
|
+
} from "./chunk-IITNQWCX.js";
|
|
6
|
+
import "./chunk-K77WC6HA.js";
|
|
7
|
+
import {
|
|
8
|
+
disposeStore,
|
|
9
|
+
initStore
|
|
10
|
+
} from "./chunk-2GU3NYMB.js";
|
|
11
|
+
import "./chunk-CHCA3ZM2.js";
|
|
12
|
+
import "./chunk-P2XNRKEL.js";
|
|
13
|
+
import "./chunk-Y25OJWOQ.js";
|
|
14
|
+
import "./chunk-MP2AFCGL.js";
|
|
15
|
+
import "./chunk-QQZMP6QL.js";
|
|
16
|
+
import "./chunk-2I23RPSI.js";
|
|
17
|
+
import "./chunk-ACBEUQR2.js";
|
|
18
|
+
import "./chunk-FXU7JOXK.js";
|
|
19
|
+
import "./chunk-K333WOW4.js";
|
|
20
|
+
import "./chunk-VXIMSRTO.js";
|
|
21
|
+
import "./chunk-LYH5HE24.js";
|
|
22
|
+
import {
|
|
23
|
+
isMainModule
|
|
24
|
+
} from "./chunk-6Y4B3QF6.js";
|
|
25
|
+
import "./chunk-MLKGABMK.js";
|
|
26
|
+
|
|
27
|
+
// src/bin/exe-import.ts
|
|
28
|
+
import { readFileSync } from "fs";
|
|
29
|
+
var FROM_FLAG = "--from";
|
|
30
|
+
var MERGE_FLAG = "--merge";
|
|
31
|
+
function printUsage() {
|
|
32
|
+
process.stdout.write("Usage: exe-os import --from <path> [--merge]\n");
|
|
33
|
+
}
|
|
34
|
+
function parseArgs(argv) {
|
|
35
|
+
if (argv.includes("--help") || argv.includes("-h")) {
|
|
36
|
+
printUsage();
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const flagIndex = argv.indexOf(FROM_FLAG);
|
|
40
|
+
if (flagIndex === -1 || !argv[flagIndex + 1]) {
|
|
41
|
+
throw new Error("Missing required --from <path> argument");
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
packagePath: argv[flagIndex + 1],
|
|
45
|
+
strategy: argv.includes(MERGE_FLAG) ? "merge" : "replace"
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
async function runExeImport(argv = process.argv.slice(2)) {
|
|
49
|
+
const parsed = parseArgs(argv);
|
|
50
|
+
if (parsed == null) return;
|
|
51
|
+
await initStore();
|
|
52
|
+
try {
|
|
53
|
+
const raw = readFileSync(parsed.packagePath, "utf-8");
|
|
54
|
+
const pkg = validatePackage(JSON.parse(raw));
|
|
55
|
+
const result = await importOrchestration(pkg, parsed.strategy);
|
|
56
|
+
process.stdout.write(
|
|
57
|
+
`Imported ${result.imported.roster} roster entries, ${result.imported.identities} identities, ${result.imported.behaviors} behaviors, ${result.imported.procedures} procedures using ${parsed.strategy} strategy
|
|
58
|
+
`
|
|
59
|
+
);
|
|
60
|
+
} finally {
|
|
61
|
+
try {
|
|
62
|
+
await disposeStore();
|
|
63
|
+
} catch {
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (isMainModule(import.meta.url) && (process.argv[1] ?? "").includes("exe-import")) {
|
|
68
|
+
runExeImport().catch((err) => {
|
|
69
|
+
process.stderr.write(`exe-os import failed: ${err instanceof Error ? err.message : String(err)}
|
|
70
|
+
`);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
runExeImport
|
|
76
|
+
};
|