@askexenow/exe-os 0.9.171 → 0.9.173
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/cli.js +1 -1
- package/dist/{chunk-6V5I5ULJ.js → chunk-3EZ6OEHW.js} +1 -18
- package/dist/{chunk-P66NZBZ5.js → chunk-4NKKU2ZV.js} +1 -1
- package/dist/{exe-key-67XRL4GL.js → exe-key-NBM3H7VT.js} +3 -9
- package/dist/hooks/pre-tool-use.js +21 -0
- package/dist/mcp/register-tools.js +2 -2
- package/dist/mcp/server.js +2 -2
- package/dist/mcp/tools/list-tasks.js +1 -1
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -107,7 +107,7 @@ if (args.includes("--global")) {
|
|
|
107
107
|
process.exit(1);
|
|
108
108
|
}
|
|
109
109
|
} else if (args[0] === "key") {
|
|
110
|
-
const { main: runKey } = await import("../exe-key-
|
|
110
|
+
const { main: runKey } = await import("../exe-key-NBM3H7VT.js");
|
|
111
111
|
await runKey(args.slice(1));
|
|
112
112
|
} else if (args[0] === "link") {
|
|
113
113
|
console.error("`exe-os link` has been removed from the customer command surface.");
|
|
@@ -4,9 +4,6 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
listTasks
|
|
6
6
|
} from "./chunk-45ZH65ZP.js";
|
|
7
|
-
import {
|
|
8
|
-
getProjectName
|
|
9
|
-
} from "./chunk-OPU3NYOO.js";
|
|
10
7
|
|
|
11
8
|
// src/mcp/tools/list-tasks.ts
|
|
12
9
|
import { z } from "zod";
|
|
@@ -26,23 +23,9 @@ function registerListTasks(server) {
|
|
|
26
23
|
},
|
|
27
24
|
async ({ assigned_to, status, project_name, priority, cross_session }) => {
|
|
28
25
|
try {
|
|
29
|
-
let resolvedProject;
|
|
30
26
|
const { agentId, agentRole } = getActiveAgent();
|
|
31
27
|
const isOwnQuery = assigned_to && assigned_to === agentId;
|
|
32
|
-
|
|
33
|
-
const { canCoordinate } = await import("./lib/employees.js");
|
|
34
|
-
if (canCoordinate(agentId, agentRole)) {
|
|
35
|
-
resolvedProject = void 0;
|
|
36
|
-
} else {
|
|
37
|
-
resolvedProject = getProjectName() || void 0;
|
|
38
|
-
}
|
|
39
|
-
} else if (project_name) {
|
|
40
|
-
resolvedProject = project_name;
|
|
41
|
-
} else if (isOwnQuery) {
|
|
42
|
-
resolvedProject = void 0;
|
|
43
|
-
} else {
|
|
44
|
-
resolvedProject = getProjectName() || void 0;
|
|
45
|
-
}
|
|
28
|
+
const resolvedProject = project_name && project_name !== "all" ? project_name : void 0;
|
|
46
29
|
const { canCoordinate: canCoord } = await import("./lib/employees.js");
|
|
47
30
|
const effectiveCrossSession = canCoord(agentId, agentRole) ? cross_session ?? false : false;
|
|
48
31
|
const tasks = await listTasks({
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
requestDeployRestart
|
|
4
|
-
} from "./chunk-PWMMIGVQ.js";
|
|
5
2
|
import {
|
|
6
3
|
disposeDatabase,
|
|
7
4
|
ensureSchema,
|
|
@@ -83,15 +80,12 @@ async function stopDaemonIfAlive() {
|
|
|
83
80
|
throw new Error("Refusing to signal PID 1. Stop the exed Docker container manually, then retry.");
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
throw new Error(`Daemon stop failed: ${result.skipped}`);
|
|
89
|
-
}
|
|
90
|
-
for (let i = 0; i < 10; i++) {
|
|
83
|
+
process.kill(Number(daemon.pid), "SIGTERM");
|
|
84
|
+
for (let i = 0; i < 30; i++) {
|
|
91
85
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
92
86
|
if (!daemonStatus().alive) return;
|
|
93
87
|
}
|
|
94
|
-
throw new Error(`Daemon pid ${daemon.pid} did not stop after
|
|
88
|
+
throw new Error(`Daemon pid ${daemon.pid} did not stop after SIGTERM; refusing to rotate`);
|
|
95
89
|
}
|
|
96
90
|
async function keyStatus() {
|
|
97
91
|
const key = await getMasterKey();
|
|
@@ -184,6 +184,27 @@ If MCP is down, tell the user: "MCP disconnected. Run /mcp to reconnect."`
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
+
if (/^(Write|Edit)$/.test(data.tool_name)) {
|
|
188
|
+
const filePath = data.tool_input?.file_path ?? "";
|
|
189
|
+
const cwd = process.cwd();
|
|
190
|
+
const worktreeMatch = cwd.match(/\.worktrees\/([^/]+)/);
|
|
191
|
+
if (worktreeMatch && filePath) {
|
|
192
|
+
const worktreeRoot = cwd.slice(0, cwd.indexOf(".worktrees/") + ".worktrees/".length + worktreeMatch[1].length);
|
|
193
|
+
const repoRoot = cwd.slice(0, cwd.indexOf(".worktrees") - 1);
|
|
194
|
+
if (filePath.startsWith(repoRoot + "/") && !filePath.startsWith(worktreeRoot + "/") && !filePath.startsWith(worktreeRoot)) {
|
|
195
|
+
const output = JSON.stringify({
|
|
196
|
+
hookSpecificOutput: { permissionDecision: "deny" },
|
|
197
|
+
systemMessage: `ACTION BLOCKED: You are in worktree "${worktreeMatch[1]}" but tried to edit a file in the main repo root.
|
|
198
|
+
DENIED path: ${filePath}
|
|
199
|
+
Your worktree root is: ${worktreeRoot}/
|
|
200
|
+
Edit the file at: ${filePath.replace(repoRoot, worktreeRoot)} instead.
|
|
201
|
+
NEVER edit files outside your worktree. The main repo belongs to the coordinator.`
|
|
202
|
+
});
|
|
203
|
+
process.stdout.write(output);
|
|
204
|
+
process.exit(0);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
187
208
|
if (/^(Write|Edit)$/.test(data.tool_name) && !canCoordinate(agent.agentId, agent.agentRole)) {
|
|
188
209
|
const filePath = data.tool_input?.file_path ?? "";
|
|
189
210
|
const exeMatch = filePath.match(/exe\/([^/]+)\//);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerAllTools
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-4NKKU2ZV.js";
|
|
4
4
|
import "../chunk-PLNYW6PA.js";
|
|
5
5
|
import "../chunk-R4IK2YT3.js";
|
|
6
6
|
import "../chunk-67TGEOEJ.js";
|
|
@@ -20,7 +20,7 @@ import "../chunk-3KVMAWJO.js";
|
|
|
20
20
|
import "../chunk-674LHALH.js";
|
|
21
21
|
import "../chunk-DAYGVU5G.js";
|
|
22
22
|
import "../chunk-MLXJ5EZG.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-3EZ6OEHW.js";
|
|
24
24
|
import "../chunk-HYER4S3M.js";
|
|
25
25
|
import "../chunk-BYVSOED6.js";
|
|
26
26
|
import "../chunk-OHWG4WPC.js";
|
package/dist/mcp/server.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "../chunk-V4TZI6EO.js";
|
|
4
4
|
import {
|
|
5
5
|
registerAllTools
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-4NKKU2ZV.js";
|
|
7
7
|
import {
|
|
8
8
|
initLicenseGate
|
|
9
9
|
} from "../chunk-PLNYW6PA.js";
|
|
@@ -28,7 +28,7 @@ import "../chunk-3KVMAWJO.js";
|
|
|
28
28
|
import "../chunk-674LHALH.js";
|
|
29
29
|
import "../chunk-DAYGVU5G.js";
|
|
30
30
|
import "../chunk-MLXJ5EZG.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-3EZ6OEHW.js";
|
|
32
32
|
import "../chunk-HYER4S3M.js";
|
|
33
33
|
import "../chunk-BYVSOED6.js";
|
|
34
34
|
import "../chunk-OHWG4WPC.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askexenow/exe-os",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.173",
|
|
4
4
|
"description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|