@memberjunction/ai-agent-harness 6.2.0-edge.1 → 6.2.0-edge.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildProcessExecutor.d.ts","sourceRoot":"","sources":["../../src/sandbox/ChildProcessExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAS,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE3F;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,8BAA8B,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"ChildProcessExecutor.d.ts","sourceRoot":"","sources":["../../src/sandbox/ChildProcessExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAS,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE3F;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,8BAA8B,GAAG,cAAc,CAuCtF;AAED,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,8BAA8B,GAAG,cAAc,CAEtF;AAUD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,uBAAuB;gBAAvB,uBAAuB,EAAE,MAAM;IAEnE;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,eAAe;IAYvB,kBAAkB;IACX,GAAG,CAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc;CAQvD"}
|
|
@@ -22,9 +22,28 @@ export function WrapChildProcess(child) {
|
|
|
22
22
|
child.once('error', () => resolve(null));
|
|
23
23
|
}),
|
|
24
24
|
Kill: () => {
|
|
25
|
-
if (child.exitCode
|
|
26
|
-
|
|
25
|
+
if (child.exitCode !== null || child.killed) {
|
|
26
|
+
return;
|
|
27
27
|
}
|
|
28
|
+
child.kill('SIGTERM');
|
|
29
|
+
// Escalate to SIGKILL if the harness ignores/hangs on SIGTERM. This runs on every
|
|
30
|
+
// AI-agent CLI turn (BaseCliHarnessAdapter calls Kill() per turn), so without this a
|
|
31
|
+
// harness process that hangs on SIGTERM becomes a permanent orphan with no cap over many
|
|
32
|
+
// runs.
|
|
33
|
+
//
|
|
34
|
+
// NOTE: `child.killed` becomes `true` synchronously as soon as `kill()` successfully
|
|
35
|
+
// *sends* a signal — NOT once the process has actually exited (Node sets it inside
|
|
36
|
+
// `kill()` itself, independent of whether the OS delivered/honored it). So this callback
|
|
37
|
+
// cannot re-check `!child.killed` to decide whether to escalate — it would already be
|
|
38
|
+
// `true` from the SIGTERM call above and the SIGKILL would never fire. The `once('exit', …)`
|
|
39
|
+
// listener below is what actually tells us the process is gone (by clearing this timer
|
|
40
|
+
// before it runs), so if this callback DOES run, the process is still alive and SIGKILL is
|
|
41
|
+
// unconditionally correct.
|
|
42
|
+
const forceKillTimer = setTimeout(() => {
|
|
43
|
+
child.kill('SIGKILL');
|
|
44
|
+
}, 5000);
|
|
45
|
+
forceKillTimer.unref();
|
|
46
|
+
child.once('exit', () => clearTimeout(forceKillTimer));
|
|
28
47
|
},
|
|
29
48
|
};
|
|
30
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildProcessExecutor.js","sourceRoot":"","sources":["../../src/sandbox/ChildProcessExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAqC;IAClE,OAAO;QACH,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;QAC/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,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,oBAAoB;IAC7B,YAAoC,uBAA+B;QAA/B,4BAAuB,GAAvB,uBAAuB,CAAQ;IAAG,CAAC;IAEvE;;;;;;;;;;;;;;;;OAgBG;IACK,eAAe;QACnB,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACvF,MAAM,GAAG,GAA2B,EAAE,CAAC;QACvC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACtB,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACrB,CAAC;QACL,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED,kBAAkB;IACX,GAAG,CAAC,IAAwB;QAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE;YACzC,GAAG,EAAE,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,uBAAuB;YAC1D,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE;YACvD,MAAM,EAAE,IAAI,CAAC,iBAAiB;SACjC,CAAC,CAAC;QACH,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ai-agent-harness",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.2.0-edge.
|
|
4
|
+
"version": "6.2.0-edge.2",
|
|
5
5
|
"description": "MemberJunction: External Agent Harness integration — run Claude Code, Codex, OpenCode, Gemini CLI or Pi as the reasoning substrate for an MJ agent",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"author": "MemberJunction.com",
|
|
12
12
|
"license": "BUSL-1.1",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@memberjunction/ai": "6.2.0-edge.
|
|
15
|
-
"@memberjunction/ai-agents": "6.2.0-edge.
|
|
16
|
-
"@memberjunction/ai-core-plus": "6.2.0-edge.
|
|
17
|
-
"@memberjunction/core": "6.2.0-edge.
|
|
18
|
-
"@memberjunction/core-entities": "6.2.0-edge.
|
|
19
|
-
"@memberjunction/global": "6.2.0-edge.
|
|
20
|
-
"@memberjunction/templates": "6.2.0-edge.
|
|
14
|
+
"@memberjunction/ai": "6.2.0-edge.2",
|
|
15
|
+
"@memberjunction/ai-agents": "6.2.0-edge.2",
|
|
16
|
+
"@memberjunction/ai-core-plus": "6.2.0-edge.2",
|
|
17
|
+
"@memberjunction/core": "6.2.0-edge.2",
|
|
18
|
+
"@memberjunction/core-entities": "6.2.0-edge.2",
|
|
19
|
+
"@memberjunction/global": "6.2.0-edge.2",
|
|
20
|
+
"@memberjunction/templates": "6.2.0-edge.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "24.10.11",
|