remcodex 0.1.0-beta.11 β 0.1.0-beta.12
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/LICENSE +21 -0
- package/README.md +209 -215
- package/dist/server/src/app.js +1 -1
- package/dist/server/src/cli.js +1 -1
- package/dist/server/src/services/session-manager.js +11 -11
- package/package.json +7 -8
- package/docs/assets/approval-flow.png +0 -0
- package/docs/assets/hero-desktop.png +0 -0
- package/docs/assets/imported-session.png +0 -0
- package/docs/assets/mobile-session.png +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RemCodex contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,45 +1,104 @@
|
|
|
1
|
-
# RemCodex
|
|
1
|
+
# π RemCodex
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Remote control for Codex.
|
|
4
|
+
> From your browser and phone.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Run Codex on one machine.
|
|
7
|
+
Monitor, approve, and control the same session from another.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
π https://remcodex.com
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
- Pick up the same session again after refresh, sleep, or reconnect
|
|
11
|
+
> Not a remote desktop. Not a proxy.
|
|
12
|
+
> A local-first way to control Codex away from the terminal.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+

|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
---
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
## β¨ What is RemCodex?
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
RemCodex is **remote control for Codex**.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
It lets you start Codex on one machine, then keep the same session visible,
|
|
23
|
+
interruptible, and controllable from another.
|
|
22
24
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
25
|
+
- π See what the AI is doing β in real time
|
|
26
|
+
- β
Approve or reject actions before execution
|
|
27
|
+
- βΉ Interrupt or stop at any moment
|
|
28
|
+
- π± Access your session from any device
|
|
29
|
+
- π Sessions donβt break β they resume
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
> One session. Any device.
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
---
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
- View sessions in a single-page workspace with a sidebar and execution timeline
|
|
35
|
-
- Follow streaming assistant output, commands, patches, and approvals
|
|
36
|
-
- Approve or reject file-system actions from the UI
|
|
37
|
-
- Import existing Codex rollout sessions from `~/.codex/sessions/...`
|
|
38
|
-
- Keep imported sessions in sync while they are still active
|
|
39
|
-
- Resume stale sessions after the page comes back from background
|
|
40
|
-
- Work well on desktop and on mobile
|
|
35
|
+
## π¬ A real workflow
|
|
41
36
|
|
|
42
|
-
|
|
37
|
+
You start a long Codex session on your machine.
|
|
38
|
+
|
|
39
|
+
Then you leave your desk.
|
|
40
|
+
|
|
41
|
+
On your phone:
|
|
42
|
+
|
|
43
|
+
- you see progress in real time
|
|
44
|
+
- you receive an approval request
|
|
45
|
+
- you approve it
|
|
46
|
+
|
|
47
|
+
The session continues instantly.
|
|
48
|
+
|
|
49
|
+
> Everything else can disconnect β your session wonβt.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## π₯ Why RemCodex exists
|
|
54
|
+
|
|
55
|
+
AI coding agents are powerful.
|
|
56
|
+
But today, they run like a black box.
|
|
57
|
+
|
|
58
|
+
You either:
|
|
59
|
+
|
|
60
|
+
- trust everything blindly
|
|
61
|
+
- or sit in front of your terminal watching it
|
|
62
|
+
|
|
63
|
+
RemCodex fixes that.
|
|
64
|
+
|
|
65
|
+
> AI is no longer a black box.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## β‘ What it does
|
|
70
|
+
|
|
71
|
+
- Real-time execution timeline (messages, commands, approvals)
|
|
72
|
+
- Human-in-the-loop command approval
|
|
73
|
+
- Multi-device access to the same live session
|
|
74
|
+
- Resume after refresh, sleep, or reconnect
|
|
75
|
+
- Browser-based UI β **no extra client required**
|
|
76
|
+
- Works with Codex CLI
|
|
77
|
+
|
|
78
|
+
> No extra client install. Just open a browser.
|
|
79
|
+
> Your code never leaves your machine.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## π Quick start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx remcodex
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Then open:
|
|
90
|
+
|
|
91
|
+
http://127.0.0.1:18840
|
|
92
|
+
|
|
93
|
+
Access from another device:
|
|
94
|
+
|
|
95
|
+
http://<your-ip>:18840
|
|
96
|
+
|
|
97
|
+
> Runs entirely on your local machine. No cloud, no data upload.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## π₯ Screenshots
|
|
43
102
|
|
|
44
103
|

|
|
45
104
|
|
|
@@ -55,268 +114,203 @@ RemCodex turns Codex's event stream into a browser-based workspace that is easie
|
|
|
55
114
|
|
|
56
115
|

|
|
57
116
|
|
|
58
|
-
> Bring imported Codex rollouts into the same workspace
|
|
117
|
+
> Bring imported Codex rollouts into the same workspace.
|
|
59
118
|
|
|
60
|
-
|
|
119
|
+
---
|
|
61
120
|
|
|
62
|
-
|
|
63
|
-
- people who want a browser-based control surface instead of raw terminal watching
|
|
64
|
-
- teams who want to review or monitor runs from another device on the same network
|
|
65
|
-
- anyone who wants approvals, timeline view, and imported rollout history in one place
|
|
121
|
+
## π§ What it actually is
|
|
66
122
|
|
|
67
|
-
|
|
123
|
+
RemCodex is a **browser-based workspace for Codex sessions**.
|
|
68
124
|
|
|
69
|
-
|
|
70
|
-
- ad-hoc mobile remote desktop checks
|
|
71
|
-
- raw log scrolling for approvals and command progress
|
|
72
|
-
- fragmented session history between local and imported rollouts
|
|
125
|
+
It is built for real workflows:
|
|
73
126
|
|
|
74
|
-
|
|
127
|
+
- long-running sessions
|
|
128
|
+
- mobile check-ins
|
|
129
|
+
- approval prompts
|
|
130
|
+
- imported rollout history
|
|
131
|
+
- timeline-style execution flow
|
|
132
|
+
|
|
133
|
+
Instead of raw terminal logs, you get a structured, visual timeline you can follow and control.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## π§© Current product shape
|
|
75
138
|
|
|
76
139
|
- Single-page workspace UI
|
|
77
140
|
- Left sidebar for session navigation
|
|
78
|
-
- Right-side
|
|
79
|
-
- Fixed composer
|
|
141
|
+
- Right-side execution timeline
|
|
142
|
+
- Fixed input composer
|
|
80
143
|
- Semantic timeline rendering for:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
144
|
+
- user messages
|
|
145
|
+
- assistant output
|
|
146
|
+
- thinking
|
|
147
|
+
- commands
|
|
148
|
+
- patches
|
|
149
|
+
- approvals
|
|
150
|
+
- system events
|
|
88
151
|
|
|
89
|
-
|
|
152
|
+
---
|
|
90
153
|
|
|
91
|
-
|
|
92
|
-
- Database: SQLite via `better-sqlite3`
|
|
93
|
-
- Terminal/runtime integration: `node-pty` + Codex app-server
|
|
94
|
-
- Frontend: zero-build static web app (`web/`)
|
|
95
|
-
- Markdown rendering: `markdown-it`
|
|
154
|
+
## βοΈ Key behaviors
|
|
96
155
|
|
|
97
|
-
|
|
156
|
+
### Approvals
|
|
98
157
|
|
|
99
|
-
|
|
158
|
+
- Writes inside working area β auto allowed
|
|
159
|
+
- Writes outside β require approval
|
|
160
|
+
- `Allow once` / `Allow for this turn` supported
|
|
161
|
+
- Approval history stays visible in timeline
|
|
100
162
|
|
|
101
|
-
|
|
102
|
-
- Codex CLI installed and already working locally
|
|
103
|
-
- A machine where this app can access your local Codex data and working directories
|
|
163
|
+
---
|
|
104
164
|
|
|
105
|
-
|
|
165
|
+
### Timeline
|
|
106
166
|
|
|
107
|
-
|
|
167
|
+
- Semantic rendering (not raw logs)
|
|
168
|
+
- Commands grouped into readable activity blocks
|
|
169
|
+
- Running / failed states clearly visible
|
|
170
|
+
- Smooth streaming + recovery after refresh
|
|
108
171
|
|
|
109
|
-
|
|
172
|
+
---
|
|
110
173
|
|
|
111
|
-
|
|
112
|
-
npm install
|
|
113
|
-
npm run build
|
|
114
|
-
npm link
|
|
115
|
-
remcodex start
|
|
116
|
-
```
|
|
174
|
+
### Imported sessions
|
|
117
175
|
|
|
118
|
-
|
|
176
|
+
- Import from `~/.codex/sessions/...`
|
|
177
|
+
- Keep syncing if still active
|
|
178
|
+
- Unified view with native sessions
|
|
119
179
|
|
|
120
|
-
|
|
180
|
+
---
|
|
121
181
|
|
|
122
|
-
|
|
123
|
-
|
|
182
|
+
## π§ Architecture
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
Codex CLI β Event stream β Semantic layer β Timeline β Web UI
|
|
124
186
|
```
|
|
125
187
|
|
|
126
|
-
|
|
188
|
+
---
|
|
127
189
|
|
|
128
|
-
##
|
|
190
|
+
## βοΈ Requirements
|
|
129
191
|
|
|
130
|
-
|
|
192
|
+
- Node.js
|
|
193
|
+
- Codex CLI (already working locally)
|
|
131
194
|
|
|
132
|
-
|
|
195
|
+
---
|
|
133
196
|
|
|
134
|
-
|
|
135
|
-
node dist/server/src/cli.js start --no-open
|
|
136
|
-
```
|
|
197
|
+
## βοΈ Configuration
|
|
137
198
|
|
|
138
|
-
|
|
199
|
+
Default port: **18840**
|
|
139
200
|
|
|
140
201
|
```bash
|
|
141
|
-
|
|
142
|
-
node dist/server/src/cli.js start --no-open
|
|
143
|
-
node dist/server/src/cli.js version
|
|
202
|
+
PORT=18841 npx remcodex
|
|
144
203
|
```
|
|
145
204
|
|
|
146
|
-
|
|
205
|
+
---
|
|
147
206
|
|
|
148
|
-
|
|
149
|
-
- if `better-sqlite3` or `node-pty` reports a native module / `NODE_MODULE_VERSION` error, reinstall `remcodex` under the same Node.js version you will use to run it
|
|
207
|
+
## π¦ Install FAQ
|
|
150
208
|
|
|
151
|
-
|
|
209
|
+
### Why does `npx remcodex` hang on Linux?
|
|
152
210
|
|
|
153
|
-
|
|
154
|
-
node dist/server/src/cli.js start --db ~/.remcodex/remcodex-demo.db --no-open
|
|
155
|
-
node dist/server/src/cli.js doctor --db ~/.remcodex/remcodex-demo.db
|
|
156
|
-
```
|
|
211
|
+
First install may compile native deps:
|
|
157
212
|
|
|
158
|
-
|
|
213
|
+
- `better-sqlite3`
|
|
214
|
+
- `node-pty`
|
|
159
215
|
|
|
160
|
-
|
|
161
|
-
npx remcodex
|
|
162
|
-
```
|
|
216
|
+
Make sure you have:
|
|
163
217
|
|
|
164
|
-
|
|
218
|
+
- `python3`
|
|
219
|
+
- `make`
|
|
220
|
+
- `g++`
|
|
165
221
|
|
|
166
|
-
|
|
167
|
-
npm install
|
|
168
|
-
npm run dev
|
|
169
|
-
```
|
|
222
|
+
---
|
|
170
223
|
|
|
171
|
-
|
|
224
|
+
### Debug install issues
|
|
172
225
|
|
|
173
226
|
```bash
|
|
174
|
-
npm
|
|
227
|
+
npm install -g remcodex
|
|
228
|
+
remcodex doctor
|
|
229
|
+
remcodex start
|
|
175
230
|
```
|
|
176
231
|
|
|
177
|
-
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### Headless mode
|
|
178
235
|
|
|
179
236
|
```bash
|
|
180
|
-
|
|
237
|
+
npx remcodex --no-open
|
|
181
238
|
```
|
|
182
239
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
The app uses `codex app-server` as the primary runtime path.
|
|
240
|
+
---
|
|
186
241
|
|
|
187
|
-
|
|
242
|
+
## π§ How it works
|
|
188
243
|
|
|
189
|
-
1. Codex emits
|
|
190
|
-
2.
|
|
191
|
-
3.
|
|
192
|
-
4. Live updates
|
|
244
|
+
1. Codex emits events
|
|
245
|
+
2. Backend stores them (SQLite)
|
|
246
|
+
3. Frontend loads timeline snapshot
|
|
247
|
+
4. Live updates stream via WebSocket
|
|
193
248
|
|
|
194
|
-
|
|
249
|
+
Result:
|
|
195
250
|
|
|
196
|
-
- smooth streaming
|
|
197
251
|
- recoverable sessions
|
|
198
|
-
-
|
|
199
|
-
-
|
|
252
|
+
- real-time UI
|
|
253
|
+
- consistent execution flow
|
|
200
254
|
|
|
201
|
-
|
|
255
|
+
---
|
|
202
256
|
|
|
203
|
-
|
|
257
|
+
## π Status
|
|
204
258
|
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
- `Allow for this turn` expands writable roots for the active turn
|
|
209
|
-
- Historical approval records stay visible in the timeline
|
|
210
|
-
- Only live approvals stay actionable in the bottom approval bar
|
|
259
|
+
- Beta / developer preview
|
|
260
|
+
- Local-first architecture
|
|
261
|
+
- No cloud dependency
|
|
211
262
|
|
|
212
|
-
|
|
263
|
+
---
|
|
213
264
|
|
|
214
|
-
|
|
215
|
-
- Imported sessions keep their own source metadata
|
|
216
|
-
- Imported sessions can continue syncing after you open them
|
|
217
|
-
- Native sessions are excluded from the import picker
|
|
265
|
+
## πΊ Roadmap
|
|
218
266
|
|
|
219
|
-
|
|
267
|
+
**Visibility**
|
|
220
268
|
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
- Running and failed commands remain visually important
|
|
224
|
-
- The final thinking placeholder appears only at the end of the active flow
|
|
269
|
+
- fully observable execution
|
|
270
|
+
- clear action timeline
|
|
225
271
|
|
|
226
|
-
|
|
272
|
+
**Control**
|
|
227
273
|
|
|
228
|
-
|
|
274
|
+
- fine-grained approvals
|
|
275
|
+
- safer execution
|
|
229
276
|
|
|
230
|
-
|
|
231
|
-
- `DATABASE_PATH`
|
|
232
|
-
- `PROJECT_ROOTS`
|
|
233
|
-
- `CODEX_COMMAND`
|
|
234
|
-
- `CODEX_MODE`
|
|
277
|
+
**Continuity**
|
|
235
278
|
|
|
236
|
-
|
|
279
|
+
- survive refresh / sleep
|
|
280
|
+
- stable long runs
|
|
237
281
|
|
|
238
|
-
|
|
239
|
-
DATABASE_PATH="$HOME/.remcodex/remcodex-demo.db" ~/.nvm/versions/node/v20.19.5/bin/node scripts/seed-launch-demo-data.js --clean
|
|
240
|
-
```
|
|
241
|
-
- `REMOTE_HOSTS`
|
|
242
|
-
- `ACTIVE_REMOTE_HOST`
|
|
243
|
-
|
|
244
|
-
Notes:
|
|
245
|
-
|
|
246
|
-
- The default runtime mode is `app-server`
|
|
247
|
-
- `exec-json` is kept only as a fallback compatibility path
|
|
248
|
-
- If `PROJECT_ROOTS` is not set, the app falls back to a broad local browsing root
|
|
249
|
-
|
|
250
|
-
## Project Structure
|
|
251
|
-
|
|
252
|
-
```text
|
|
253
|
-
server/
|
|
254
|
-
src/
|
|
255
|
-
app.ts
|
|
256
|
-
controllers/
|
|
257
|
-
db/
|
|
258
|
-
gateways/
|
|
259
|
-
services/
|
|
260
|
-
types/
|
|
261
|
-
utils/
|
|
262
|
-
web/
|
|
263
|
-
index.html
|
|
264
|
-
styles.css
|
|
265
|
-
api.js
|
|
266
|
-
session-ws.js
|
|
267
|
-
app.js
|
|
268
|
-
scripts/
|
|
269
|
-
fix-node-pty-helper.js
|
|
270
|
-
import-codex-rollout.js
|
|
271
|
-
reset-semantic-demo-data.js
|
|
272
|
-
```
|
|
282
|
+
**Access**
|
|
273
283
|
|
|
274
|
-
|
|
284
|
+
- control from any device
|
|
275
285
|
|
|
276
|
-
|
|
277
|
-
- `GET /api/codex/mode`
|
|
278
|
-
- `GET /api/codex/status`
|
|
279
|
-
- `GET /api/codex/quota`
|
|
280
|
-
- `GET /api/sessions`
|
|
281
|
-
- `GET /api/sessions/:sessionId`
|
|
282
|
-
- `GET /api/sessions/:sessionId/timeline`
|
|
283
|
-
- `GET /api/sessions/:sessionId/events`
|
|
284
|
-
- `POST /api/sessions`
|
|
285
|
-
- `POST /api/sessions/:sessionId/messages`
|
|
286
|
-
- `POST /api/sessions/:sessionId/stop`
|
|
287
|
-
- `POST /api/sessions/:sessionId/approvals/:requestId`
|
|
288
|
-
- `WS /ws/sessions/:sessionId`
|
|
286
|
+
**Integration**
|
|
289
287
|
|
|
290
|
-
|
|
288
|
+
- IDE integrations
|
|
289
|
+
- optional sharing
|
|
291
290
|
|
|
292
|
-
|
|
291
|
+
---
|
|
293
292
|
|
|
294
|
-
|
|
295
|
-
- no desktop packaging yet
|
|
296
|
-
- no full automated test suite yet
|
|
297
|
-
- no production-grade auth / multi-user hardening yet
|
|
298
|
-
- no release pipeline yet
|
|
299
|
-
|
|
300
|
-
If you are comfortable cloning a repo and running a local Node app, you can use it today.
|
|
293
|
+
## π₯ Who itβs for
|
|
301
294
|
|
|
302
|
-
|
|
295
|
+
- developers already using Codex
|
|
296
|
+
- people tired of terminal-only workflows
|
|
297
|
+
- anyone who wants **control, not just output**
|
|
298
|
+
- multi-device workflows
|
|
303
299
|
|
|
304
|
-
|
|
300
|
+
---
|
|
305
301
|
|
|
306
|
-
|
|
307
|
-
- ship a cleaner public README and screenshots
|
|
308
|
-
- add stronger regression coverage
|
|
309
|
-
- harden long-running session recovery
|
|
310
|
-
- continue refining the execution timeline UI
|
|
302
|
+
## β οΈ Whatβs not finished yet
|
|
311
303
|
|
|
312
|
-
|
|
304
|
+
- no polished installer yet
|
|
305
|
+
- no desktop packaging
|
|
306
|
+
- no production-grade auth
|
|
307
|
+
- no release pipeline
|
|
313
308
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
- stronger sharing, auditing, and team workflows
|
|
309
|
+
If you're comfortable running a local Node app β
|
|
310
|
+
you can use it today.
|
|
317
311
|
|
|
318
|
-
|
|
312
|
+
---
|
|
319
313
|
|
|
320
|
-
|
|
314
|
+
## π License
|
|
321
315
|
|
|
322
|
-
|
|
316
|
+
MIT License
|
package/dist/server/src/app.js
CHANGED
|
@@ -25,7 +25,7 @@ const command_1 = require("./utils/command");
|
|
|
25
25
|
const errors_1 = require("./utils/errors");
|
|
26
26
|
function buildRemCodexServer(options = {}) {
|
|
27
27
|
const repoRoot = options.repoRoot ? node_path_1.default.resolve(options.repoRoot) : (0, runtime_paths_1.resolvePackageRoot)();
|
|
28
|
-
const port = options.port ?? Number.parseInt(process.env.PORT ?? "
|
|
28
|
+
const port = options.port ?? Number.parseInt(process.env.PORT ?? "18840", 10);
|
|
29
29
|
const databasePath = options.databasePath ??
|
|
30
30
|
process.env.DATABASE_PATH ??
|
|
31
31
|
(0, runtime_paths_1.resolveDefaultDatabasePath)();
|
package/dist/server/src/cli.js
CHANGED
|
@@ -226,7 +226,7 @@ async function runStart(flags) {
|
|
|
226
226
|
printError("Install Codex first, or set CODEX_COMMAND to the correct executable.");
|
|
227
227
|
return 1;
|
|
228
228
|
}
|
|
229
|
-
const preferredPort = flags.port ?? Number.parseInt(process.env.PORT ?? "
|
|
229
|
+
const preferredPort = flags.port ?? Number.parseInt(process.env.PORT ?? "18840", 10);
|
|
230
230
|
const codexMode = process.env.CODEX_MODE === "exec-json" ? "exec-json" : "app-server";
|
|
231
231
|
let started = null;
|
|
232
232
|
let activePort = preferredPort;
|
|
@@ -279,6 +279,17 @@ class SessionManager {
|
|
|
279
279
|
seq: event.seq,
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
+
stopSession(sessionId) {
|
|
283
|
+
const runtime = this.runners.get(sessionId);
|
|
284
|
+
if (!runtime || !runtime.runner.isAlive()) {
|
|
285
|
+
this.setStatus(sessionId, "idle");
|
|
286
|
+
return { accepted: true };
|
|
287
|
+
}
|
|
288
|
+
runtime.stopRequested = true;
|
|
289
|
+
this.setStatus(sessionId, "stopping");
|
|
290
|
+
runtime.runner.stop();
|
|
291
|
+
return { accepted: true };
|
|
292
|
+
}
|
|
282
293
|
retryApprovalRequest(sessionId, requestId, codexLaunch) {
|
|
283
294
|
const session = this.getSessionOrThrow(sessionId);
|
|
284
295
|
const project = this.options.projectManager.getProject(session.project_id);
|
|
@@ -303,17 +314,6 @@ class SessionManager {
|
|
|
303
314
|
turnId,
|
|
304
315
|
};
|
|
305
316
|
}
|
|
306
|
-
stopSession(sessionId) {
|
|
307
|
-
const runtime = this.runners.get(sessionId);
|
|
308
|
-
if (!runtime || !runtime.runner.isAlive()) {
|
|
309
|
-
this.setStatus(sessionId, "idle");
|
|
310
|
-
return { accepted: true };
|
|
311
|
-
}
|
|
312
|
-
runtime.stopRequested = true;
|
|
313
|
-
this.setStatus(sessionId, "stopping");
|
|
314
|
-
runtime.runner.stop();
|
|
315
|
-
return { accepted: true };
|
|
316
|
-
}
|
|
317
317
|
resolveApproval(sessionId, requestId, decision) {
|
|
318
318
|
const runtime = this.runners.get(sessionId);
|
|
319
319
|
if (!runtime?.runner.isAlive()) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remcodex",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.12",
|
|
4
4
|
"description": "Control Codex from anywhere. Even on your phone.",
|
|
5
|
-
"license": "
|
|
6
|
-
"engines": {
|
|
7
|
-
"node": "20.x"
|
|
8
|
-
},
|
|
5
|
+
"license": "MIT",
|
|
9
6
|
"bin": {
|
|
10
7
|
"remcodex": "dist/server/src/cli.js"
|
|
11
8
|
},
|
|
@@ -14,16 +11,15 @@
|
|
|
14
11
|
"web",
|
|
15
12
|
"scripts/check-node-version.js",
|
|
16
13
|
"scripts/fix-node-pty-helper.js",
|
|
17
|
-
"README.md"
|
|
18
|
-
"docs/assets"
|
|
14
|
+
"README.md"
|
|
19
15
|
],
|
|
20
16
|
"scripts": {
|
|
21
|
-
"preinstall": "node scripts/check-node-version.js",
|
|
22
17
|
"postinstall": "node scripts/fix-node-pty-helper.js",
|
|
23
18
|
"dev": "tsx watch server/src/app.ts",
|
|
24
19
|
"start": "tsx server/src/cli.ts --no-open",
|
|
25
20
|
"build": "tsc -p tsconfig.json && node scripts/copy-db-assets.js",
|
|
26
21
|
"cli": "tsx server/src/cli.ts --no-open",
|
|
22
|
+
"preinstall": "node scripts/check-node-version.js",
|
|
27
23
|
"smoke:tarball": "node scripts/smoke-test-tarball.js",
|
|
28
24
|
"smoke:start": "node scripts/smoke-start-tarball.js"
|
|
29
25
|
},
|
|
@@ -40,5 +36,8 @@
|
|
|
40
36
|
"@types/ws": "^8.5.14",
|
|
41
37
|
"tsx": "^4.19.3",
|
|
42
38
|
"typescript": "^5.8.2"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": "20.x"
|
|
43
42
|
}
|
|
44
43
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|