appback-remoteagent 0.15.5 → 0.15.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/dist/services/bridge-service.js +5 -4
- package/docs/OPERATIONS.md +19 -4
- package/docs/RELEASING.md +112 -123
- package/package.json +3 -4
- package/scripts/prepublish-guard.mjs +3 -6
- package/scripts/release-deploy.sh +79 -0
- package/scripts/release-version.sh +27 -0
- package/scripts/bump-version.sh +0 -23
|
@@ -4,9 +4,10 @@ import os from "node:os";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { stopSpawnedExecution } from "../adapters/windows-shell.js";
|
|
6
6
|
const MODEL_PRESETS = {
|
|
7
|
-
codex: ["gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.2", "gpt-5.1-codex-max"],
|
|
7
|
+
codex: ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.6", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.2", "gpt-5.1-codex-max"],
|
|
8
8
|
claude: ["sonnet", "opus", "haiku"],
|
|
9
9
|
};
|
|
10
|
+
const DEFAULT_CODEX_MODEL = "gpt-5.6-sol";
|
|
10
11
|
export class BridgeService {
|
|
11
12
|
store;
|
|
12
13
|
adapters;
|
|
@@ -59,7 +60,7 @@ export class BridgeService {
|
|
|
59
60
|
cwd: workspace,
|
|
60
61
|
pairedAt: new Date().toISOString(),
|
|
61
62
|
sessionId: undefined,
|
|
62
|
-
model: provider
|
|
63
|
+
model: this.defaultModelFor(provider),
|
|
63
64
|
sandboxMode: provider === "codex" ? this.defaultCodexSandboxMode : undefined,
|
|
64
65
|
lastUsedAt: undefined,
|
|
65
66
|
}, workspace);
|
|
@@ -94,7 +95,7 @@ export class BridgeService {
|
|
|
94
95
|
cwd: workspace,
|
|
95
96
|
pairedAt: new Date().toISOString(),
|
|
96
97
|
sessionId: normalizedSessionId,
|
|
97
|
-
model: existing?.session[provider]?.model ?? (provider
|
|
98
|
+
model: existing?.session[provider]?.model ?? this.defaultModelFor(provider),
|
|
98
99
|
sandboxMode: provider === "codex"
|
|
99
100
|
? (existing?.session[provider]?.sandboxMode ?? this.defaultCodexSandboxMode)
|
|
100
101
|
: undefined,
|
|
@@ -655,7 +656,7 @@ export class BridgeService {
|
|
|
655
656
|
return next?.trim() || current || this.defaultWorkspace;
|
|
656
657
|
}
|
|
657
658
|
defaultModelFor(provider) {
|
|
658
|
-
return provider === "codex" ?
|
|
659
|
+
return provider === "codex" ? DEFAULT_CODEX_MODEL : "sonnet";
|
|
659
660
|
}
|
|
660
661
|
describeEffectiveAccess(session) {
|
|
661
662
|
if (!session.codex) {
|
package/docs/OPERATIONS.md
CHANGED
|
@@ -9,9 +9,17 @@ RemoteAgent production is operated from one canonical Git history:
|
|
|
9
9
|
- production package: `appback-remoteagent`
|
|
10
10
|
- branch used for production releases: `main`
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Use `origin/main` as the authoritative source.
|
|
13
13
|
Code changes should be committed and pushed to `origin/main`, published to npm, and then server 30/26 should be updated from that npm version.
|
|
14
|
-
|
|
14
|
+
Production release commands are:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run release:publish
|
|
18
|
+
npm run release:deploy -- <version> all
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Local tarball installation is an emergency runtime restoration path.
|
|
22
|
+
The production release is completed by publishing the same version to npm and running `npm run release:deploy -- <version> all`.
|
|
15
23
|
|
|
16
24
|
## Product shape in operations
|
|
17
25
|
|
|
@@ -33,7 +41,7 @@ Current production bot ownership is intentionally split:
|
|
|
33
41
|
- server 30: RemoteAgent production bots
|
|
34
42
|
- local machine 21: local-only bot runtime
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
Assign each Telegram bot token to one runtime at a time.
|
|
37
45
|
Bot polling conflicts are treated as incidents, not harmless warnings.
|
|
38
46
|
|
|
39
47
|
When a runtime has several configured Telegram bots, polling pressure can become operationally visible.
|
|
@@ -135,7 +143,14 @@ If a temporary branch is unavoidable, merge it back to `main`, push it, and depl
|
|
|
135
143
|
|
|
136
144
|
A task is not done until commit and push both happened.
|
|
137
145
|
A production deployment is not done until server 30 and server 26 are running the published npm version and the runtime path has been verified.
|
|
138
|
-
If npm publish
|
|
146
|
+
If npm publish returns `403`, use a publish-capable npm token for the unscoped `appback-remoteagent` package and run:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
source ~/.config/remoteagent/npm-token.env
|
|
150
|
+
npm run release:publish
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
See `docs/RELEASING.md`.
|
|
139
154
|
|
|
140
155
|
See `docs/RELEASING.md` for the detailed versioning rules.
|
|
141
156
|
|
package/docs/RELEASING.md
CHANGED
|
@@ -1,187 +1,176 @@
|
|
|
1
|
-
#
|
|
1
|
+
# RemoteAgent Release Runbook
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This runbook is command-first. Use the scripts below as the release interface.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 1. Bump Version
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- `MINOR`: new user-facing capabilities, new commands, new adapters, or non-breaking workflow expansion
|
|
9
|
-
- `PATCH`: bug fixes, reliability improvements, security fixes, text-only corrections, and non-breaking maintenance
|
|
7
|
+
Patch release:
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Use `PATCH` when the behavior is supposed to stay the same but gets safer or more correct.
|
|
16
|
-
Use `MINOR` when the owner can do something new after the release without needing migration.
|
|
17
|
-
Use `MAJOR` when an older installation, script, or user workflow would need active adjustment.
|
|
9
|
+
```bash
|
|
10
|
+
npm run release:version -- patch
|
|
11
|
+
```
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
Minor release:
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
```bash
|
|
16
|
+
npm run release:version -- minor
|
|
17
|
+
```
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
Major release:
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
4. Run `npm run build`
|
|
29
|
-
5. Commit the completed work
|
|
30
|
-
6. Push `main` to `origin/main`
|
|
31
|
-
7. Publish `appback-remoteagent@<version>` to npm using a token/account that is proven to have publish rights for this unscoped package
|
|
32
|
-
8. Install that exact npm version on server 30 and server 26
|
|
33
|
-
9. Restart `remoteagent.service` on each target if runtime code changed
|
|
34
|
-
10. Verify the relevant runtime path, logs, or Telegram behavior on each target
|
|
21
|
+
```bash
|
|
22
|
+
npm run release:version -- major
|
|
23
|
+
```
|
|
35
24
|
|
|
36
|
-
|
|
37
|
-
If server 30 or server 26 is not running the published npm version, the production deployment is incomplete.
|
|
25
|
+
Versioning guide:
|
|
38
26
|
|
|
39
|
-
|
|
27
|
+
- `patch`: reliability fixes, bug fixes, text fixes, safe maintenance
|
|
28
|
+
- `minor`: new commands, new user-facing behavior, new non-breaking workflow
|
|
29
|
+
- `major`: storage/runtime contract changes or breaking command behavior
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
## 2. Validate
|
|
42
32
|
|
|
43
33
|
```bash
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
./scripts/bump-version.sh major
|
|
34
|
+
npm run check
|
|
35
|
+
npm run build
|
|
47
36
|
```
|
|
48
37
|
|
|
49
|
-
|
|
38
|
+
## 3. Commit And Push
|
|
50
39
|
|
|
51
40
|
```bash
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
git status --short
|
|
42
|
+
git add -A
|
|
43
|
+
git commit -m "Release <version>"
|
|
44
|
+
git push origin main
|
|
55
45
|
```
|
|
56
46
|
|
|
57
|
-
|
|
47
|
+
Example:
|
|
58
48
|
|
|
59
49
|
```bash
|
|
60
|
-
|
|
61
|
-
npm run check
|
|
62
|
-
npm run build
|
|
63
|
-
git status
|
|
64
|
-
git add -A
|
|
65
|
-
git commit -m "Release 0.12.3"
|
|
66
|
-
git push origin main
|
|
67
|
-
npm pack
|
|
50
|
+
git commit -m "Release 0.15.5"
|
|
68
51
|
```
|
|
69
52
|
|
|
70
|
-
##
|
|
53
|
+
## 4. Publish To npm
|
|
71
54
|
|
|
72
|
-
|
|
55
|
+
Load the npm token when the shell has not loaded it yet:
|
|
73
56
|
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
```bash
|
|
58
|
+
source ~/.config/remoteagent/npm-token.env
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Publish:
|
|
76
62
|
|
|
77
63
|
```bash
|
|
78
64
|
npm run release:publish
|
|
79
65
|
```
|
|
80
66
|
|
|
81
|
-
|
|
82
|
-
That token can authenticate as `appbackhub`, but it does not currently have publish rights for the unscoped `appback-remoteagent` package.
|
|
83
|
-
It fails at publish time with:
|
|
67
|
+
The publish script performs:
|
|
84
68
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
- clean working tree check
|
|
70
|
+
- `npm whoami`
|
|
71
|
+
- `npm owner ls appback-remoteagent`
|
|
72
|
+
- `npm run check`
|
|
73
|
+
- `npm run build`
|
|
74
|
+
- `npm pack`
|
|
75
|
+
- guarded `npm publish`
|
|
76
|
+
- registry version verification
|
|
77
|
+
|
|
78
|
+
The package publish entrypoint is `npm run release:publish`.
|
|
79
|
+
`scripts/prepublish-guard.mjs` routes manual publish attempts back to that entrypoint.
|
|
80
|
+
|
|
81
|
+
## 5. Deploy Published Version
|
|
88
82
|
|
|
89
|
-
|
|
83
|
+
Deploy to server 30:
|
|
90
84
|
|
|
91
85
|
```bash
|
|
92
|
-
npm
|
|
93
|
-
npm owner ls appback-remoteagent
|
|
86
|
+
npm run release:deploy -- <version> 30
|
|
94
87
|
```
|
|
95
88
|
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
Deploy to server 26:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run release:deploy -- <version> 26
|
|
93
|
+
```
|
|
98
94
|
|
|
99
|
-
|
|
95
|
+
Deploy to both production targets:
|
|
100
96
|
|
|
101
97
|
```bash
|
|
102
|
-
npm run release:
|
|
103
|
-
npm view appback-remoteagent version
|
|
98
|
+
npm run release:deploy -- <version> all
|
|
104
99
|
```
|
|
105
100
|
|
|
106
|
-
|
|
101
|
+
Example:
|
|
107
102
|
|
|
108
|
-
|
|
103
|
+
```bash
|
|
104
|
+
npm run release:deploy -- 0.15.5 all
|
|
105
|
+
```
|
|
109
106
|
|
|
110
|
-
|
|
111
|
-
It is not a completed release and must be reported as a temporary hotfix.
|
|
107
|
+
The deploy script performs:
|
|
112
108
|
|
|
113
|
-
|
|
109
|
+
- npm registry version check for `appback-remoteagent@<version>`
|
|
110
|
+
- server 30 npm install, install hook, systemd restart, version/log verification
|
|
111
|
+
- server 26 npm install, install hook, user-process restart, version/log verification
|
|
114
112
|
|
|
115
|
-
|
|
116
|
-
- do not delete runtime state
|
|
117
|
-
- do not use source checkout deployment
|
|
118
|
-
- confirm no active provider process is running before restart
|
|
119
|
-
- install the exact local package tarball with `npm install -g /tmp/appback-remoteagent-<version>.tgz`
|
|
120
|
-
- follow up by publishing the same version to npm once a publish-capable token is available
|
|
113
|
+
## 6. Verify
|
|
121
114
|
|
|
122
|
-
|
|
115
|
+
Registry:
|
|
123
116
|
|
|
124
117
|
```bash
|
|
125
|
-
|
|
126
|
-
npm pack
|
|
127
|
-
scp appback-remoteagent-$VERSION.tgz au2223@192.168.0.30:/tmp/
|
|
128
|
-
ssh au2223@192.168.0.30 "VERSION=$VERSION bash -s" <<'REMOTE'
|
|
129
|
-
set -euo pipefail
|
|
130
|
-
export PATH="/home/au2223/.local/bin:/home/au2223/.nvm/versions/node/v22.22.0/bin:$PATH"
|
|
131
|
-
pgrep -af 'codex|claude' || true
|
|
132
|
-
npm install -g "/tmp/appback-remoteagent-$VERSION.tgz"
|
|
133
|
-
remoteagent-install
|
|
134
|
-
sudo -n systemctl restart remoteagent
|
|
135
|
-
systemctl is-active remoteagent
|
|
136
|
-
node -p 'require("/home/au2223/.nvm/versions/node/v22.22.0/lib/node_modules/appback-remoteagent/package.json").version'
|
|
137
|
-
journalctl -u remoteagent --since '2 minutes ago' --no-pager
|
|
138
|
-
REMOTE
|
|
139
|
-
rm -f appback-remoteagent-$VERSION.tgz
|
|
118
|
+
npm view appback-remoteagent version
|
|
140
119
|
```
|
|
141
120
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
Server 30 uses a systemd service:
|
|
121
|
+
Server 30:
|
|
145
122
|
|
|
146
123
|
```bash
|
|
147
|
-
|
|
148
|
-
ssh au2223@192.168.0.30 "VERSION=$VERSION bash -s" <<'REMOTE'
|
|
149
|
-
set -euo pipefail
|
|
124
|
+
ssh au2223@192.168.0.30 'bash -lc '"'"'
|
|
150
125
|
export PATH="/home/au2223/.local/bin:/home/au2223/.nvm/versions/node/v22.22.0/bin:$PATH"
|
|
151
|
-
npm install -g appback-remoteagent@$VERSION
|
|
152
|
-
/home/au2223/.nvm/versions/node/v22.22.0/bin/remoteagent-install
|
|
153
|
-
sudo -n systemctl restart remoteagent
|
|
154
126
|
systemctl is-active remoteagent
|
|
155
|
-
node -p
|
|
156
|
-
journalctl -u remoteagent --since
|
|
157
|
-
|
|
127
|
+
node -p "require(\"/home/au2223/.nvm/versions/node/v22.22.0/lib/node_modules/appback-remoteagent/package.json\").version"
|
|
128
|
+
journalctl -u remoteagent --since "5 minutes ago" --no-pager | tail -80
|
|
129
|
+
'"'"''
|
|
158
130
|
```
|
|
159
131
|
|
|
160
|
-
|
|
161
|
-
`/home/au2223/.nvm/versions/node/v22.22.0`; only the `systemctl restart remoteagent` step needs sudo.
|
|
162
|
-
Runtime state remains in `/home/au2223/.remoteagent` and must not be deleted during npm upgrades.
|
|
163
|
-
|
|
164
|
-
Server 26 currently uses user-level start/stop scripts, not a systemd `remoteagent.service`:
|
|
132
|
+
Server 26:
|
|
165
133
|
|
|
166
134
|
```bash
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
set -euo pipefail
|
|
170
|
-
npm install -g appback-remoteagent@$VERSION
|
|
171
|
-
remoteagent-install
|
|
172
|
-
~/.remoteagent/stop-remoteagent.sh || true
|
|
173
|
-
sleep 2
|
|
174
|
-
~/.remoteagent/start-remoteagent.sh
|
|
175
|
-
sleep 3
|
|
135
|
+
ssh ospadmin@192.168.0.26 'bash -lc '"'"'
|
|
136
|
+
npm list -g appback-remoteagent --depth=0
|
|
176
137
|
pgrep -af "appback-remoteagent/dist/index.js"
|
|
177
138
|
tail -80 ~/.remoteagent/logs/agent.log
|
|
178
|
-
|
|
139
|
+
'"'"''
|
|
179
140
|
```
|
|
180
141
|
|
|
181
|
-
##
|
|
142
|
+
## Release 0.15.5
|
|
143
|
+
|
|
144
|
+
Date: 2026-07-08
|
|
182
145
|
|
|
183
|
-
|
|
184
|
-
Machine 21 or any other host should be updated only when it intentionally runs a separate RemoteAgent service.
|
|
146
|
+
Changes:
|
|
185
147
|
|
|
186
|
-
|
|
187
|
-
|
|
148
|
+
- Telegram file attachment download now writes to `.part` first.
|
|
149
|
+
- Telegram file attachment download resumes partial files with `curl -C -`.
|
|
150
|
+
- Telegram file attachment download retries up to 4 attempts.
|
|
151
|
+
- Download timeout changed from one 60-second attempt to resumable 120-second attempts.
|
|
152
|
+
- npm publish flow is guarded by `prepublishOnly`.
|
|
153
|
+
- Standard publish command is `npm run release:publish`.
|
|
154
|
+
- Standard deploy command is `npm run release:deploy -- <version> <30|26|all>`.
|
|
155
|
+
|
|
156
|
+
Validated:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm run check
|
|
160
|
+
npm run build
|
|
161
|
+
npm run release:publish
|
|
162
|
+
npm run release:deploy -- 0.15.5 all
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Published:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
appback-remoteagent@0.15.5
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Runtime targets:
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
server 30: 0.15.5 active
|
|
175
|
+
server 26: 0.15.5 running
|
|
176
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appback-remoteagent",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
4
4
|
"description": "Personal installable session server for continuing local AI work across PC and Telegram",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,10 +21,9 @@
|
|
|
21
21
|
"selftest:telegram": "npm run build && node scripts/selftest-telegram-update.mjs",
|
|
22
22
|
"prepare": "npm run build",
|
|
23
23
|
"prepublishOnly": "node scripts/prepublish-guard.mjs",
|
|
24
|
+
"release:version": "bash scripts/release-version.sh",
|
|
24
25
|
"release:publish": "bash scripts/release-publish.sh",
|
|
25
|
-
"
|
|
26
|
-
"version:minor": "npm version --no-git-tag-version minor",
|
|
27
|
-
"version:major": "npm version --no-git-tag-version major"
|
|
26
|
+
"release:deploy": "bash scripts/release-deploy.sh"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
|
30
29
|
"dotenv": "^16.6.1",
|
|
@@ -5,15 +5,12 @@ if (process.env.REMOTEAGENT_PUBLISH_GUARD_OK === "1") {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
console.error([
|
|
8
|
-
"
|
|
8
|
+
"RemoteAgent publishes through the guarded release command.",
|
|
9
9
|
"",
|
|
10
|
-
"
|
|
10
|
+
"Command:",
|
|
11
11
|
" npm run release:publish",
|
|
12
12
|
"",
|
|
13
|
-
"
|
|
14
|
-
"- direct publish has repeatedly used the wrong npm token",
|
|
15
|
-
"- appback-remoteagent must be published only through the guarded script",
|
|
16
|
-
"- emergency tarball installs are not completed releases",
|
|
13
|
+
"This command checks the working tree, npm identity, package owner, build, pack, publish, and registry version.",
|
|
17
14
|
].join("\n"));
|
|
18
15
|
|
|
19
16
|
process.exit(1);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
echo "Usage: npm run release:deploy -- <version> <30|26|all>" >&2
|
|
6
|
+
echo "Example: npm run release:deploy -- 0.15.5 all" >&2
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
if [[ $# -ne 2 ]]; then
|
|
10
|
+
usage
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
VERSION="$1"
|
|
15
|
+
TARGET="$2"
|
|
16
|
+
|
|
17
|
+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
18
|
+
usage
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
case "$TARGET" in
|
|
23
|
+
30|26|all)
|
|
24
|
+
;;
|
|
25
|
+
*)
|
|
26
|
+
usage
|
|
27
|
+
exit 1
|
|
28
|
+
;;
|
|
29
|
+
esac
|
|
30
|
+
|
|
31
|
+
PACKAGE_NAME="appback-remoteagent"
|
|
32
|
+
REGISTRY_VERSION="$(npm view "$PACKAGE_NAME@$VERSION" version)"
|
|
33
|
+
if [[ "$REGISTRY_VERSION" != "$VERSION" ]]; then
|
|
34
|
+
echo "Registry version check failed for $PACKAGE_NAME@$VERSION" >&2
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
deploy_30() {
|
|
39
|
+
ssh au2223@192.168.0.30 "VERSION=$VERSION bash -s" <<'REMOTE'
|
|
40
|
+
set -euo pipefail
|
|
41
|
+
export PATH="/home/au2223/.local/bin:/home/au2223/.nvm/versions/node/v22.22.0/bin:$PATH"
|
|
42
|
+
npm install -g "appback-remoteagent@$VERSION"
|
|
43
|
+
remoteagent-install
|
|
44
|
+
sudo -n systemctl restart remoteagent
|
|
45
|
+
sleep 5
|
|
46
|
+
systemctl is-active remoteagent
|
|
47
|
+
node -p 'require("/home/au2223/.nvm/versions/node/v22.22.0/lib/node_modules/appback-remoteagent/package.json").version'
|
|
48
|
+
journalctl -u remoteagent --since '1 minute ago' --no-pager | tail -80
|
|
49
|
+
REMOTE
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
deploy_26() {
|
|
53
|
+
ssh ospadmin@192.168.0.26 "VERSION=$VERSION bash -s" <<'REMOTE'
|
|
54
|
+
set -euo pipefail
|
|
55
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
56
|
+
npm install -g "appback-remoteagent@$VERSION"
|
|
57
|
+
remoteagent-install
|
|
58
|
+
~/.remoteagent/stop-remoteagent.sh || true
|
|
59
|
+
sleep 2
|
|
60
|
+
~/.remoteagent/start-remoteagent.sh
|
|
61
|
+
sleep 5
|
|
62
|
+
npm list -g appback-remoteagent --depth=0
|
|
63
|
+
pgrep -af 'appback-remoteagent/dist/index.js'
|
|
64
|
+
tail -80 ~/.remoteagent/logs/agent.log
|
|
65
|
+
REMOTE
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
case "$TARGET" in
|
|
69
|
+
30)
|
|
70
|
+
deploy_30
|
|
71
|
+
;;
|
|
72
|
+
26)
|
|
73
|
+
deploy_26
|
|
74
|
+
;;
|
|
75
|
+
all)
|
|
76
|
+
deploy_30
|
|
77
|
+
deploy_26
|
|
78
|
+
;;
|
|
79
|
+
esac
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
echo "Usage: npm run release:version -- <patch|minor|major>" >&2
|
|
6
|
+
echo "Example: npm run release:version -- patch" >&2
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
if [[ $# -ne 1 ]]; then
|
|
10
|
+
usage
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
case "$1" in
|
|
15
|
+
patch|minor|major)
|
|
16
|
+
;;
|
|
17
|
+
*)
|
|
18
|
+
usage
|
|
19
|
+
exit 1
|
|
20
|
+
;;
|
|
21
|
+
esac
|
|
22
|
+
|
|
23
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
24
|
+
cd "$ROOT"
|
|
25
|
+
|
|
26
|
+
npm version --no-git-tag-version "$1"
|
|
27
|
+
node -p "'RemoteAgent version is now ' + require('./package.json').version"
|
package/scripts/bump-version.sh
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
if [ $# -ne 1 ]; then
|
|
5
|
-
echo "Usage: $0 <patch|minor|major>" >&2
|
|
6
|
-
exit 1
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
case "$1" in
|
|
10
|
-
patch|minor|major)
|
|
11
|
-
;;
|
|
12
|
-
*)
|
|
13
|
-
echo "Release type must be one of: patch, minor, major" >&2
|
|
14
|
-
exit 1
|
|
15
|
-
;;
|
|
16
|
-
esac
|
|
17
|
-
|
|
18
|
-
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
19
|
-
export PATH="$HOME/.local/bin:$PATH"
|
|
20
|
-
cd "$ROOT_DIR"
|
|
21
|
-
|
|
22
|
-
npm version --no-git-tag-version "$1"
|
|
23
|
-
node -p "'RemoteAgent version is now ' + require('./package.json').version"
|