You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: stop referencing the removed ably-interactive wrapper
Sweep user-facing and architecture references now that the wrapper binary is
gone and ably interactive handles Ctrl+C in-process:
- env-vars: ABLY_HISTORY_FILE example uses `ably interactive`; reword the note
(HistoryManager already defaults to ~/.ably/history); update coupled unit test
- Troubleshooting/Debugging: accurate Ctrl+C guidance; no wrapper run-commands
- Exit-Codes: reframe the exit-code consumer as a host session restart loop
- Interactive-REPL: status note marking the bash-wrapper design as superseded
- Project-Structure: drop the deleted bin/ably-interactive(.ps1) tree entries
- manual tests: run `node bin/run.js interactive`; keep the exit-42 contract
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/Exit-Codes.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ This document describes the exit codes used by the Ably CLI, particularly in int
6
6
7
7
### 0 - Success
8
8
- Normal successful completion of a command
9
-
- Clean exit after user types `exit`command (in non-wrapper mode)
9
+
- Clean exit after the user types `exit`(when not running under a session restart loop)
10
10
11
11
### 42 - User Exit (Interactive Mode)
12
-
- Special exit code used when user types `exit`in interactive mode with wrapper
13
-
- Signals to the wrapper script (`bin/ably-interactive`) to terminate the loop
12
+
- Special exit code emitted when the user types `exit`while running under a session restart loop (`ABLY_WRAPPER_MODE=1`)
13
+
- Signals the restart loop (e.g. the Ably terminal server's session entrypoint) to stop, rather than treating the exit as a crash to relaunch
14
14
- Defined as `Interactive.EXIT_CODE_USER_EXIT`
15
15
16
16
### 130 - SIGINT (Ctrl+C)
@@ -40,25 +40,24 @@ This document describes the exit codes used by the Ably CLI, particularly in int
40
40
- Shows "⚠ Force quit" message
41
41
- Bypasses normal cleanup
42
42
43
-
## Wrapper Script Behavior
43
+
## Session Restart Loop Behavior
44
44
45
-
The `bin/ably-interactive` wrapper script uses these exit codes to determine whether to restart the interactive shell:
45
+
`ably interactive` is a normal command and handles Ctrl+C in-process — the CLI no longer ships a separate `ably-interactive` wrapper binary. A host that wants the interactive shell to survive a force-quit (for example the Ably terminal server, which keeps a browser session alive) can wrap `ably interactive` in a small restart loop, set `ABLY_WRAPPER_MODE=1`, and key the loop off these exit codes:
46
46
47
-
-**Exit code 42**: User typed 'exit' - terminate the wrapper loop
Copy file name to clipboardExpand all lines: docs/Interactive-REPL.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,15 @@ If there are any existing libraries that we can depend on to enable this functio
33
33
34
34
## Execution Plan
35
35
36
+
> **Status note (superseded design).** This section documents the original
37
+
> bash-wrapper design. The wrapper binary (`bin/ably-interactive`) has since been
38
+
> retired: `ably interactive` now handles Ctrl+C in-process (a single Ctrl+C
39
+
> interrupts the running command and returns to the prompt), and the CLI ships a
40
+
> single `ably` bin. The auto-restart-on-force-quit behaviour is now optional and
41
+
> owned by whichever host wants it — e.g. the Ably terminal server wraps
42
+
> `ably interactive` in a small restart loop (keyed off exit codes 42/130, with
43
+
> `ABLY_WRAPPER_MODE=1`). The historical design below is kept for context.
44
+
36
45
### Overview
37
46
38
47
This execution plan implements an interactive REPL mode using a bash wrapper approach with inline command execution. The design prioritizes simplicity, natural Ctrl+C handling, and seamless user experience.
@@ -414,8 +423,8 @@ This plan delivers a responsive interactive shell with natural Ctrl+C handling a
414
423
415
424
## Related
416
425
417
-
-[Exit Codes](Exit-Codes.md) — Exit codes used in interactive mode and wrapper script behavior
426
+
-[Exit Codes](Exit-Codes.md) — Exit codes used in interactive mode
418
427
-[Troubleshooting](Troubleshooting.md#interactive-mode-issues) — Common interactive mode issues (unexpected exits, Ctrl+C, history)
419
428
-[Auto-completion](Auto-completion.md) — Shell tab completion setup for commands and flags
420
429
-[Testing Guide](Testing.md) — Subprocess and TTY test layers for interactive mode
421
-
-[Project Structure](Project-Structure.md) — Repository layout including `src/commands/interactive.ts` and `bin/ably-interactive`
430
+
-[Project Structure](Project-Structure.md) — Repository layout including `src/commands/interactive.ts`
Copy file name to clipboardExpand all lines: docs/Troubleshooting.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,8 +226,8 @@ Property 'x' does not exist on type 'Y'
226
226
**Solution**:
227
227
- Check the exit code to understand what happened (see [Exit Codes documentation](Exit-Codes.md) and [Development Stage Env Variables](Environment-Variables/Development-Usage.md) for interactive mode env vars)
0 commit comments