agentic-factory-bridge 1.0.4 → 1.0.6
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/README.md +1 -1
- package/bin/cli.js +7 -7
- package/bridge.js +4 -4
- package/install-protocol.ps1 +1 -1
- package/opencode-launch.ps1 +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Local bridge that connects the [Atos Agentic Factory](https://atos-agentic-facto
|
|
|
12
12
|
|
|
13
13
|
- **Node.js 18+**
|
|
14
14
|
- **Windows** (protocol registration uses PowerShell and Windows Registry)
|
|
15
|
-
- **OpenCode CLI** installed globally: `npm install -g opencode`
|
|
15
|
+
- **OpenCode CLI** installed globally: `npm install -g opencode-ai`
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
package/bin/cli.js
CHANGED
|
@@ -86,13 +86,13 @@ async function setup() {
|
|
|
86
86
|
if (hasOpencode) {
|
|
87
87
|
console.log(' [OK] OpenCode CLI is already installed.');
|
|
88
88
|
} else {
|
|
89
|
-
console.log(' [..] Installing OpenCode CLI (npm install -g opencode)...');
|
|
89
|
+
console.log(' [..] Installing OpenCode CLI (npm install -g opencode-ai)...');
|
|
90
90
|
try {
|
|
91
|
-
await runCommand('npm', ['install', '-g', 'opencode'], 120000);
|
|
91
|
+
await runCommand('npm', ['install', '-g', 'opencode-ai'], 120000);
|
|
92
92
|
console.log(' [OK] OpenCode CLI installed successfully.');
|
|
93
93
|
} catch (err) {
|
|
94
94
|
console.error(' [FAIL] Could not install OpenCode CLI: ' + err.message);
|
|
95
|
-
console.error(' Try running manually: npm install -g opencode');
|
|
95
|
+
console.error(' Try running manually: npm install -g opencode-ai');
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -126,7 +126,7 @@ async function setup() {
|
|
|
126
126
|
console.log('');
|
|
127
127
|
console.log(' Next steps:');
|
|
128
128
|
console.log(' 1. Run: agentic-factory-bridge start');
|
|
129
|
-
console.log(' 2. Open https://atos-agentic-factory.onrender.com');
|
|
129
|
+
console.log(' 2. Open https://atos-agentic-factory-qzwe.onrender.com');
|
|
130
130
|
console.log(' 3. Click "Refresh detection" on the OpenCode page');
|
|
131
131
|
console.log('');
|
|
132
132
|
}
|
|
@@ -180,7 +180,7 @@ async function status() {
|
|
|
180
180
|
if (hasOpencode) {
|
|
181
181
|
console.log(' OpenCode: INSTALLED');
|
|
182
182
|
} else {
|
|
183
|
-
console.log(' OpenCode: NOT FOUND — run: npm install -g opencode');
|
|
183
|
+
console.log(' OpenCode: NOT FOUND — run: npm install -g opencode-ai');
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
// Check protocol (Windows)
|
|
@@ -202,7 +202,7 @@ async function status() {
|
|
|
202
202
|
function checkCommand(cmd) {
|
|
203
203
|
return new Promise((resolve) => {
|
|
204
204
|
const check = process.platform === 'win32' ? 'where' : 'which';
|
|
205
|
-
const proc = spawn(check, [cmd], { stdio: ['pipe', 'pipe', 'pipe'], shell:
|
|
205
|
+
const proc = spawn(check, [cmd], { stdio: ['pipe', 'pipe', 'pipe'], shell: true });
|
|
206
206
|
proc.on('close', (code) => resolve(code === 0));
|
|
207
207
|
proc.on('error', () => resolve(false));
|
|
208
208
|
});
|
|
@@ -213,7 +213,7 @@ function runCommand(cmd, args, timeout) {
|
|
|
213
213
|
const proc = spawn(cmd, args, {
|
|
214
214
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
215
215
|
timeout,
|
|
216
|
-
shell:
|
|
216
|
+
shell: true,
|
|
217
217
|
});
|
|
218
218
|
let stdout = '';
|
|
219
219
|
let stderr = '';
|
package/bridge.js
CHANGED
|
@@ -554,13 +554,13 @@ app.post(
|
|
|
554
554
|
requireBridgeAuth,
|
|
555
555
|
rateLimit('install', RATE_LIMITS.install),
|
|
556
556
|
async (_req, res) => {
|
|
557
|
-
console.log('[bridge] Installing OpenCode CLI via npm install -g opencode...');
|
|
557
|
+
console.log('[bridge] Installing OpenCode CLI via npm install -g opencode-ai...');
|
|
558
558
|
try {
|
|
559
559
|
await new Promise((resolve, reject) => {
|
|
560
|
-
const proc = spawn('npm', ['install', '-g', 'opencode'], {
|
|
560
|
+
const proc = spawn('npm', ['install', '-g', 'opencode-ai'], {
|
|
561
561
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
562
562
|
timeout: 120000,
|
|
563
|
-
shell:
|
|
563
|
+
shell: true,
|
|
564
564
|
});
|
|
565
565
|
let stdout = '';
|
|
566
566
|
let stderr = '';
|
|
@@ -575,7 +575,7 @@ app.post(
|
|
|
575
575
|
if (code === 0) resolve({ success: true, stdout, stderr });
|
|
576
576
|
else
|
|
577
577
|
reject(
|
|
578
|
-
new Error(`npm install -g opencode failed with code ${code}: ${stderr || stdout}`),
|
|
578
|
+
new Error(`npm install -g opencode-ai failed with code ${code}: ${stderr || stdout}`),
|
|
579
579
|
);
|
|
580
580
|
});
|
|
581
581
|
proc.on('error', (err) => {
|
package/install-protocol.ps1
CHANGED
|
@@ -26,7 +26,7 @@ $OpenCodePath = Get-Command opencode -ErrorAction SilentlyContinue
|
|
|
26
26
|
if (-not $OpenCodePath) {
|
|
27
27
|
Write-Host ""
|
|
28
28
|
Write-Host " WARNING: opencode CLI not found in PATH" -ForegroundColor Yellow
|
|
29
|
-
Write-Host " Install OpenCode: npm install -g opencode" -ForegroundColor Yellow
|
|
29
|
+
Write-Host " Install OpenCode: npm install -g opencode-ai" -ForegroundColor Yellow
|
|
30
30
|
Write-Host ""
|
|
31
31
|
}
|
|
32
32
|
|
package/opencode-launch.ps1
CHANGED
|
@@ -38,7 +38,7 @@ if (-not (Test-Path $opencode)) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
if (-not (Test-Path $opencode)) {
|
|
41
|
-
Write-Host "`n ERROR: opencode not found!`n Install: npm install -g opencode`n" -ForegroundColor Red
|
|
41
|
+
Write-Host "`n ERROR: opencode not found!`n Install: npm install -g opencode-ai`n" -ForegroundColor Red
|
|
42
42
|
Read-Host "Press Enter"
|
|
43
43
|
exit 1
|
|
44
44
|
}
|