@slaveoftime/oly 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. package/README.md +183 -0
  2. package/bin/oly.js +1 -1
  3. package/package.json +20 -6
package/README.md ADDED
@@ -0,0 +1,183 @@
1
+ # oly — Open Relay
2
+
3
+ <p align="center"><img src="./assets/icon-demo.svg" width="160" /></p>
4
+
5
+ [![Watch the video](https://raw.githubusercontent.com/slaveoftime/open-relay/main/assets/oly-full-demo.png)](https://raw.githubusercontent.com/slaveoftime/open-relay/main/assets/oly-full-demo.mp4)
6
+
7
+ <p align="center"><a href="./assets/oly-full-demo.mp4">Download or open the full demo video</a></p>
8
+
9
+ [![npm version](https://img.shields.io/npm/v/@slaveoftime/oly.svg)](https://www.npmjs.com/package/@slaveoftime/oly)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
11
+
12
+ > Run any CLI like a managed service.
13
+
14
+ `oly` turns long-running and interactive CLI workflows into persistent, supervised sessions for humans and AI agents. Close the terminal, keep the process alive, get notified when input is needed, and jump back in from anywhere.
15
+
16
+ If this solves a real problem for you, give the repo a star so more people can find it.
17
+
18
+ For a full repository architecture map, see [ARCHITECTURE.md](./ARCHITECTURE.md).
19
+ For the PTY/session internals specifically, see [ARCHITECTURE_PTY.md](./ARCHITECTURE_PTY.md).
20
+
21
+ ---
22
+
23
+ ## The problem 😤
24
+
25
+ You start an agent or interactive CLI task. It runs for 20 minutes. Halfway through it hits a `y/n` prompt and just... sits there. You had to keep a terminal open, stay at your desk, babysit it.
26
+
27
+ **That's over.**
28
+
29
+ ---
30
+
31
+ ## What oly does ⚡
32
+
33
+ - Turns interactive CLIs into managed, auditable sessions
34
+ - Owns agent sessions in a background daemon — closing your terminal changes nothing
35
+ - Replays buffered output when you reattach (no lost context)
36
+ - Detects when input is likely needed and notifies you
37
+ - Lets you inject input without attaching (`oly send <id> key:enter`)
38
+ - Keeps auditable logs of everything
39
+
40
+ ### Who it's for
41
+
42
+ - People running AI coding agents that stall on prompts, permissions, or long-running work
43
+ - Anyone using interactive CLIs that should survive terminal closes, disconnects, or context switches
44
+ - Teams that want auditable logs and remote intervention instead of fragile ad-hoc shell sessions
45
+
46
+ ### Why not just `tmux`, `screen`, or a remote shell?
47
+
48
+ | Need | `tmux` / `screen` | `oly` |
49
+ |---|---|---|
50
+ | Session survives after you close your terminal | Yes | Yes |
51
+ | Detects when human input is likely needed | No | Yes |
52
+ | Send input without attaching | No | Yes |
53
+ | Built for supervising AI agents and interactive CLIs | Not really | Yes |
54
+ | Keeps auditable session logs as a first-class feature | Minimal | Yes |
55
+
56
+ ### Agent-supervises-agent 🤖 👀 🤖
57
+
58
+ You can run one agent to supervise another. When the supervisor hits something it's unsure about — or something that needs elevated permission — it escalates to you. You decide whether to approve, modify, or abort. You're still in the loop, just not watching.
59
+
60
+ ---
61
+
62
+ ## Install 📦
63
+
64
+ ```sh
65
+ npm i @slaveoftime/oly -g
66
+ ```
67
+
68
+ Global install is required because `oly` is a CLI. On first run, the npm package downloads the matching release binary for your platform.
69
+
70
+ Currently supported via npm:
71
+
72
+ - **macOS**: Apple Silicon (`arm64`)
73
+ - **Linux**: x86_64 / AMD64
74
+ - **Windows**: x86_64 / AMD64
75
+
76
+ ```sh
77
+ brew tap slaveOftime/open-relay https://github.com/slaveOftime/open-relay
78
+ brew install slaveOftime/open-relay/oly
79
+ ```
80
+
81
+ ```sh
82
+ cargo install --path .
83
+ ```
84
+
85
+ ### Pre-built binaries
86
+
87
+ Download the latest release for your platform from the [Releases page](https://github.com/Slaveoftime/open-relay/releases).
88
+
89
+ - **macOS**: Download `oly-macos-arm64.zip`, unzip, `chmod +x oly`, and move to `/usr/local/bin`.
90
+ - **Linux**: Download `oly-linux-amd64.zip`, unzip, `chmod +x oly`, and move to `/usr/local/bin`.
91
+ - **Windows**: Download `oly-windows-amd64.zip`, unzip, and add to your PATH.
92
+
93
+ ---
94
+
95
+ ## Quick start 🚀
96
+
97
+ The CLI is for both humans and AI agents.
98
+
99
+ If you only try one workflow, make it this one: start the daemon, launch a session detached, inspect logs, then send input only when needed.
100
+
101
+ ```sh
102
+ # Start the daemon (once per boot, or add to your init)
103
+ oly daemon start
104
+
105
+ # Launch an agent session and detach immediately
106
+ oly start --title "code is cheap" --detach copilot
107
+
108
+ # Check what's running
109
+ oly ls
110
+
111
+ # Peek at output without attaching
112
+ oly logs <id>
113
+
114
+ # Something needs your input — send it without a terminal
115
+ oly send <id> "yes" key:enter
116
+
117
+ # Actually attach and drive it yourself
118
+ # Ctrl+D to detach anytime
119
+ oly attach <id>
120
+
121
+ # Stop it when done
122
+ oly stop <id>
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Remote supervision 🌐
128
+
129
+ Access and manage sessions from a browser, with push notification support. Intervene from anywhere.
130
+
131
+ `oly` has no built-in network listener — deliberately. Expose it the way you control:
132
+
133
+ ```
134
+ [anywhere] → [your auth gateway] → [tunnel] → [oly daemon, local IPC]
135
+ ```
136
+
137
+ Put Cloudflare Access, Tailscale, or any auth proxy in front. Every action logged. Your rules. 🔒
138
+
139
+ ---
140
+
141
+ ## Why star or watch this repo
142
+
143
+ - You want a better way to supervise long-running agent or CLI sessions
144
+ - You want release updates as packaging, remote supervision, and workflow support improve
145
+ - You want to help shape an early tool in a fast-moving part of the developer tooling stack
146
+
147
+ ---
148
+
149
+ ## Commands 📋
150
+
151
+ | Command | What it does |
152
+ |---|---|
153
+ | `oly daemon start` | Start background daemon |
154
+ | `oly start [--detach] [--disable-notifications] [--cwd DIR] <cmd>` | Launch session in PTY |
155
+ | `oly ls` | Show sessions (supports search/status/time filters) |
156
+ | `oly attach <id>` | Reattach (replays buffer first) |
157
+ | `oly logs <id> [--tail N] [--wait-for-prompt]` | Read logs without attaching |
158
+ | `oly send <id> [CHUNK]...` | Send input without attaching |
159
+ | `oly stop <id>` | Graceful stop |
160
+
161
+ ### Federation commands
162
+
163
+ | Command | What it does |
164
+ |---|---|
165
+ | `oly api-key add <name>` | Create API key on primary (printed once) |
166
+ | `oly api-key ls` | List API key labels on primary |
167
+ | `oly api-key remove <name>` | Revoke API key on primary |
168
+ | `oly join start --name <name> --key <key> <url>` | Connect this daemon as a secondary |
169
+ | `oly join ls` | List saved join configs on this daemon |
170
+ | `oly join stop --name <name>` | Disconnect and remove a saved join config |
171
+ | `oly node ls` | List currently connected secondary nodes on primary |
172
+
173
+ All session commands support `--node <name>` to target a connected secondary.
174
+
175
+ Detach from an attached session: `Ctrl-]` then `d`.
176
+
177
+ ---
178
+
179
+ ## Code layout at a glance
180
+
181
+ - `src/daemon/rpc.rs` keeps the top-level IPC dispatch, with attach handlers in `src/daemon/rpc_attach.rs` and federation/node runtime in `src/daemon/rpc_nodes.rs`.
182
+ - `src/session/pty.rs` owns PTY resources and escape filtering, while `src/session/cursor_tracker.rs` and `src/session/mode_tracker.rs` track terminal state.
183
+ - `src/client/join.rs` now focuses on join config persistence and CLI join commands; the secondary-node connector runs daemon-side.
package/bin/oly.js CHANGED
@@ -10,7 +10,7 @@ const binaryPath = path.join(__dirname, binaryName);
10
10
 
11
11
  if (!fs.existsSync(binaryPath)) {
12
12
  console.error(
13
- "oly: binary not found. Try reinstalling: npm install -g oly"
13
+ "oly: binary not found. Try reinstalling: npm install -g @slaveoftime/oly"
14
14
  );
15
15
  process.exit(1);
16
16
  }
package/package.json CHANGED
@@ -1,19 +1,24 @@
1
1
  {
2
2
  "name": "@slaveoftime/oly",
3
- "version": "0.0.4",
4
- "description": "Session-persistent PTY daemon for long-running CLI agents keep agents alive, get notified when they need input, intervene from anywhere.",
3
+ "version": "0.0.5",
4
+ "description": "Run interactive CLIs and AI agents like managed services with persistent PTY sessions.",
5
5
  "keywords": [
6
6
  "cli",
7
- "agent",
8
7
  "pty",
9
- "daemon",
10
- "terminal"
8
+ "terminal",
9
+ "interactive-cli",
10
+ "ai-agents",
11
+ "automation",
12
+ "remote-control"
11
13
  ],
12
- "homepage": "https://github.com/slaveOftime/open-relay",
14
+ "homepage": "https://github.com/slaveOftime/open-relay#readme",
13
15
  "repository": {
14
16
  "type": "git",
15
17
  "url": "https://github.com/slaveOftime/open-relay.git"
16
18
  },
19
+ "bugs": {
20
+ "url": "https://github.com/slaveOftime/open-relay/issues"
21
+ },
17
22
  "license": "MIT",
18
23
  "bin": {
19
24
  "oly": "./bin/oly.js"
@@ -21,6 +26,15 @@
21
26
  "scripts": {
22
27
  "postinstall": "node install.js"
23
28
  },
29
+ "os": [
30
+ "linux",
31
+ "darwin",
32
+ "win32"
33
+ ],
34
+ "cpu": [
35
+ "x64",
36
+ "arm64"
37
+ ],
24
38
  "engines": {
25
39
  "node": ">=18"
26
40
  },