agentgui 1.0.804 → 1.0.805
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.
|
@@ -58,7 +58,7 @@ const machine = createMachine({
|
|
|
58
58
|
entry: assign({ healthy: true }),
|
|
59
59
|
on: {
|
|
60
60
|
UNHEALTHY: {
|
|
61
|
-
actions: assign({ healthy: false, lastHealthCheck: Date.now() }),
|
|
61
|
+
actions: assign(() => ({ healthy: false, lastHealthCheck: Date.now() })),
|
|
62
62
|
},
|
|
63
63
|
HEALTHY: {
|
|
64
64
|
actions: assign(({ event }) => ({
|
|
@@ -68,7 +68,7 @@ const machine = createMachine({
|
|
|
68
68
|
})),
|
|
69
69
|
},
|
|
70
70
|
TOUCH: {
|
|
71
|
-
actions: assign({ lastUsed: Date.now() }),
|
|
71
|
+
actions: assign(() => ({ lastUsed: Date.now() })),
|
|
72
72
|
},
|
|
73
73
|
CRASHED: 'crashed',
|
|
74
74
|
STOP: 'idle_stopping',
|
package/lib/agent-discovery.js
CHANGED
|
@@ -29,7 +29,14 @@ const CLI_WRAPPERS = [
|
|
|
29
29
|
];
|
|
30
30
|
|
|
31
31
|
export function findCommand(cmd, rootDir) {
|
|
32
|
+
if (!cmd) return null;
|
|
32
33
|
const isWindows = os.platform() === 'win32';
|
|
34
|
+
if (!rootDir) {
|
|
35
|
+
try {
|
|
36
|
+
const result = execSync(isWindows ? `where ${cmd}` : `which ${cmd}`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'], timeout: 10000 }).trim();
|
|
37
|
+
return result ? (isWindows ? result.split('\n')[0].trim() : result) : null;
|
|
38
|
+
} catch { return null; }
|
|
39
|
+
}
|
|
33
40
|
const localBin = path.join(rootDir, 'node_modules', '.bin', isWindows ? cmd + '.cmd' : cmd);
|
|
34
41
|
if (fs.existsSync(localBin)) {
|
|
35
42
|
console.log(`[agent-discovery] Found ${cmd} in local node_modules`);
|
package/lib/execution-machine.js
CHANGED
|
@@ -32,7 +32,7 @@ const machine = createMachine({
|
|
|
32
32
|
on: {
|
|
33
33
|
SET_PID: { actions: assign(({ event }) => ({ pid: event.pid, lastActivity: Date.now() })) },
|
|
34
34
|
SET_PROC: { actions: assign(({ event }) => ({ proc: event.proc, lastActivity: Date.now() })) },
|
|
35
|
-
ACTIVITY: { actions: assign({ lastActivity: Date.now() }) },
|
|
35
|
+
ACTIVITY: { actions: assign(() => ({ lastActivity: Date.now() })) },
|
|
36
36
|
ENQUEUE: {
|
|
37
37
|
actions: assign(({ context, event }) => ({
|
|
38
38
|
queue: [...context.queue, event.item],
|