appback-remoteagent 0.15.6 → 0.15.7
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.
|
@@ -354,7 +354,8 @@ export class BridgeService {
|
|
|
354
354
|
formatResponses(responses) {
|
|
355
355
|
return responses.map((response) => {
|
|
356
356
|
const sessionLabel = response.publicSessionId ?? response.sessionId;
|
|
357
|
-
const
|
|
357
|
+
const modelLabel = response.model?.trim() || this.defaultModelFor(response.provider);
|
|
358
|
+
const header = `[${response.provider.toUpperCase()} | ${modelLabel} | ${sessionLabel}]`;
|
|
358
359
|
return `${header}\n${response.output}`;
|
|
359
360
|
});
|
|
360
361
|
}
|
|
@@ -520,6 +521,7 @@ export class BridgeService {
|
|
|
520
521
|
responses.push({
|
|
521
522
|
...response,
|
|
522
523
|
publicSessionId: session.publicId,
|
|
524
|
+
model: providerSession.model ?? this.defaultModelFor(provider),
|
|
523
525
|
});
|
|
524
526
|
}
|
|
525
527
|
return responses;
|
package/package.json
CHANGED
|
@@ -39,6 +39,19 @@ deploy_30() {
|
|
|
39
39
|
ssh au2223@192.168.0.30 "VERSION=$VERSION bash -s" <<'REMOTE'
|
|
40
40
|
set -euo pipefail
|
|
41
41
|
export PATH="/home/au2223/.local/bin:/home/au2223/.nvm/versions/node/v22.22.0/bin:$PATH"
|
|
42
|
+
node - <<'NODE'
|
|
43
|
+
const fs = require("fs");
|
|
44
|
+
const path = "/home/au2223/.remoteagent/bot-polling-state.json";
|
|
45
|
+
const state = JSON.parse(fs.readFileSync(path, "utf8"));
|
|
46
|
+
const running = Object.values(state.bots || {})
|
|
47
|
+
.filter((bot) => Array.isArray(bot.runningSessionIds) && bot.runningSessionIds.length > 0)
|
|
48
|
+
.map((bot) => `${bot.username || bot.botId}: ${bot.runningSessionIds.join(", ")}`);
|
|
49
|
+
if (running.length > 0) {
|
|
50
|
+
console.error("RemoteAgent has active provider work. Retry deploy after it finishes:");
|
|
51
|
+
for (const item of running) console.error(`- ${item}`);
|
|
52
|
+
process.exit(2);
|
|
53
|
+
}
|
|
54
|
+
NODE
|
|
42
55
|
npm install -g "appback-remoteagent@$VERSION"
|
|
43
56
|
remoteagent-install
|
|
44
57
|
sudo -n systemctl restart remoteagent
|
|
@@ -53,6 +66,21 @@ deploy_26() {
|
|
|
53
66
|
ssh ospadmin@192.168.0.26 "VERSION=$VERSION bash -s" <<'REMOTE'
|
|
54
67
|
set -euo pipefail
|
|
55
68
|
export PATH="$HOME/.local/bin:$PATH"
|
|
69
|
+
node - <<'NODE'
|
|
70
|
+
const fs = require("fs");
|
|
71
|
+
const path = `${process.env.HOME}/.remoteagent/bot-polling-state.json`;
|
|
72
|
+
if (fs.existsSync(path)) {
|
|
73
|
+
const state = JSON.parse(fs.readFileSync(path, "utf8"));
|
|
74
|
+
const running = Object.values(state.bots || {})
|
|
75
|
+
.filter((bot) => Array.isArray(bot.runningSessionIds) && bot.runningSessionIds.length > 0)
|
|
76
|
+
.map((bot) => `${bot.username || bot.botId}: ${bot.runningSessionIds.join(", ")}`);
|
|
77
|
+
if (running.length > 0) {
|
|
78
|
+
console.error("RemoteAgent has active provider work. Retry deploy after it finishes:");
|
|
79
|
+
for (const item of running) console.error(`- ${item}`);
|
|
80
|
+
process.exit(2);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
NODE
|
|
56
84
|
npm install -g "appback-remoteagent@$VERSION"
|
|
57
85
|
remoteagent-install
|
|
58
86
|
~/.remoteagent/stop-remoteagent.sh || true
|