@in-the-loop-labs/pair-review 2.4.0 → 2.4.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pair-review",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "pair-review app integration — Open PRs and local changes in the pair-review web UI, run server-side AI analysis, and address review feedback. Requires the pair-review MCP server.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-critic",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "AI-powered code review analysis — Run three-level AI analysis and implement-review-fix loops directly in your coding agent. Works standalone, no server required.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
package/src/chat/acp-bridge.js
CHANGED
|
@@ -15,10 +15,19 @@ const { Writable, Readable } = require('stream');
|
|
|
15
15
|
const logger = require('../utils/logger');
|
|
16
16
|
const { version: pkgVersion } = require('../../package.json');
|
|
17
17
|
|
|
18
|
+
// Lazy-load the ESM-only ACP SDK via dynamic import (cached after first call)
|
|
19
|
+
let _acpModule = null;
|
|
20
|
+
async function loadAcp() {
|
|
21
|
+
if (!_acpModule) {
|
|
22
|
+
_acpModule = await import('@agentclientprotocol/sdk');
|
|
23
|
+
}
|
|
24
|
+
return _acpModule;
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
// Default dependencies (overridable for testing)
|
|
19
28
|
const defaults = {
|
|
20
29
|
spawn,
|
|
21
|
-
acp:
|
|
30
|
+
acp: null, // loaded lazily via loadAcp(); tests inject via _deps
|
|
22
31
|
Writable,
|
|
23
32
|
Readable,
|
|
24
33
|
};
|
|
@@ -156,6 +165,11 @@ class AcpBridge extends EventEmitter {
|
|
|
156
165
|
* @returns {Promise<void>}
|
|
157
166
|
*/
|
|
158
167
|
async _initializeConnection(proc, deps) {
|
|
168
|
+
// Lazy-load ACP SDK if not injected (e.g. via _deps in tests)
|
|
169
|
+
if (!deps.acp) {
|
|
170
|
+
deps.acp = await loadAcp();
|
|
171
|
+
}
|
|
172
|
+
|
|
159
173
|
const stream = deps.acp.ndJsonStream(
|
|
160
174
|
deps.Writable.toWeb(proc.stdin),
|
|
161
175
|
deps.Readable.toWeb(proc.stdout)
|