@jbaehova/onthego 0.1.3 → 0.3.0

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/README.md CHANGED
@@ -1,212 +1,197 @@
1
- <h1 align="center">ONTHEGO</h1>
1
+ # ONTHEGO
2
2
 
3
- <p align="center">
4
- <strong>Carry the work. Keep the context.</strong>
5
- </p>
3
+ Continue your coding-agent conversation on another device, with your unfinished Git workspace intact.
6
4
 
7
- <p align="center">
8
- <em>Secure, project-scoped AI agent handoffs from your local Git workspace to a Daytona sandbox.</em>
9
- </p>
5
+ ONTHEGO is an MIT-licensed CLI for explicit handoffs between your own computers. It carries staged and unstaged work together with project-scoped Codex CLI and Claude Code histories. Each destination keeps its Git settings, hooks, local dependencies, and editor directory intact.
10
6
 
11
- <p align="center">
12
- <img alt="npm version" src="https://img.shields.io/npm/v/%40jbaehova%2Fonthego?style=flat-square&logo=npm&logoColor=white&color=CB3837">
13
- <img alt="Node 18+" src="https://img.shields.io/badge/Node-18%2B-43853D?style=flat-square&logo=node.js&logoColor=white">
14
- <img alt="Go 1.25.4+" src="https://img.shields.io/badge/Go-1.25.4%2B-00ADD8?style=flat-square&logo=go&logoColor=white">
15
- <img alt="macOS arm64 and Linux x64" src="https://img.shields.io/badge/Platform-macOS_arm64_%7C_Linux_x64-334155?style=flat-square">
16
- <a href="LICENSE"><img alt="License MIT" src="https://img.shields.io/badge/License-MIT-C5A800?style=flat-square"></a>
17
- </p>
7
+ No ONTHEGO account or central server is needed. SSH connects your devices. Install and authenticate the coding agent separately on each device. This project targets individual CLI users.
18
8
 
19
- <p align="center">
20
- <img src="assets/onthego-banner.webp" alt="ONTHEGO carrying secure agent context from a local workspace to a cloud sandbox" width="88%">
21
- </p>
9
+ ## Install
22
10
 
23
- Your repository moves easily. Agent memory does not.
11
+ ```sh
12
+ npm install -g @jbaehova/onthego@^0.3.0
13
+ ```
14
+
15
+ The npm package includes binaries for macOS arm64/amd64 and Linux arm64/amd64. Git and OpenSSH are required. Node.js is needed only for the npm launcher. Install the same ONTHEGO version on both devices.
24
16
 
25
- ONTHEGO finds the Codex, Cursor, Hermes, and Claude sessions that belong to the current Git project, removes common secrets on your machine, creates a focused handoff, and sends it to an isolated Daytona workload. Run status is synchronized through a lightweight control plane. Results come back only after their SHA-256 digest matches the remote receipt.
17
+ You can also build from source with Go 1.25.4 or newer:
26
18
 
27
- ```text
28
- local project -> redact -> HANDOFF.md -> Daytona -> verify -> local result
19
+ ```sh
20
+ git clone https://github.com/peerproblem/onthego.git
21
+ cd onthego
22
+ make build
23
+ mkdir -p ~/.local/bin
24
+ install -m 755 dist/onthego ~/.local/bin/onthego
25
+ # Or: go install github.com/peerproblem/onthego/cmd/onthego@latest
29
26
  ```
30
27
 
31
- ## What It Does
28
+ ## Desktop to laptop
32
29
 
33
- - Discovers every supported agent session associated with the current Git repository.
34
- - Redacts tokens, authorization headers, private keys, and matching secret assignments before transfer.
35
- - Generates a redacted context envelope and human-readable `HANDOFF.md`.
36
- - Starts the default `agent-sync` workload in Daytona with one command.
37
- - Synchronizes run state, redacted logs, and summaries across authenticated devices.
38
- - Uses GPT-5.6 Luna with high reasoning effort to turn current state into a concise status update.
39
- - Downloads an artifact only after its hash matches the remote run receipt.
30
+ Enable SSH on the destination and establish a trusted SSH connection first. An existing SSH alias can use a LAN address or your own VPS. Tailscale and other VPNs are optional ways to provide reachability. Both devices must be reachable during a direct transfer.
40
31
 
41
- ## Quick Start
32
+ Inside the project on the desktop:
42
33
 
43
- Install the CLI:
34
+ ```sh
35
+ onthego init
36
+ onthego device add laptop --host me@my-laptop
37
+ onthego remote set laptop /Users/me/projects/my-app
38
+ onthego doctor laptop
39
+ onthego push laptop --dry-run
44
40
 
45
- ```bash
46
- npm install -g @jbaehova/onthego
41
+ # Stop agents and other processes that write project files, then:
42
+ onthego push laptop --verbose
47
43
  ```
48
44
 
49
- Create a private `.env` at the Git root:
45
+ `device add` pairs both public identities through your trusted SSH connection. It discovers the remote executable using a login shell. Use `--binary /absolute/path/onthego` when needed. `--port` and `--identity-file` select an existing SSH connection; private SSH keys are never copied.
46
+
47
+ Devices store hosts and identities once. Project paths are separate mappings under `~/.onthego/projects/<id>/peers.yaml`. Without a mapping, the path relative to your home directory is used under the remote home. `device add ... --path ...` remains a shortcut for the current project's mapping.
50
48
 
51
- ```dotenv
52
- DAYTONA_API_KEY=...
53
- ONTHEGO_CONTROL_PLANE_URL=https://your-control-plane.example.com
54
- ONTHEGO_CONTROL_PLANE_TLS_SHA256=...
55
- ONTHEGO_LOGIN_BOOTSTRAP_TOKEN=...
49
+ For the first transfer, choose a destination directory that does not exist. On the laptop:
56
50
 
57
- # Optional. Enables the LLM summary in `onthego status`.
58
- OPENAI_API_KEY=...
51
+ ```sh
52
+ cd /Users/me/projects/my-app
53
+ onthego status
54
+ codex resume <session-id>
55
+ # Or: claude --resume <session-id>
59
56
  ```
60
57
 
61
- Lock down the file, then run the five-command flow:
58
+ Use the session ID printed by the handoff. These commands resume a native history, not a running process. See the exact tested CLI versions and validation boundaries in [agent compatibility](docs/agent-compatibility.md).
62
59
 
63
- ```bash
64
- chmod 600 .env
60
+ To bring laptop changes back, run this from the desktop project:
65
61
 
66
- onthego init
67
- onthego login
68
- onthego pass
69
- onthego status
70
- onthego pull
62
+ ```sh
63
+ onthego pull laptop --verbose
71
64
  ```
72
65
 
73
- That is the complete Phase 1 workflow. You do not choose an agent or paste a session ID. `onthego pass` resolves the current Git root and collects the matching sessions automatically.
66
+ The destination is updated in place. Existing shells, editor watchers, and local dependency directories continue to refer to the same project directory. Stop writers during the transfer so they cannot race with capture or application.
74
67
 
75
- > [!NOTE]
76
- > The current release expects a Daytona account and a deployed ONTHEGO control plane. The control plane server is included in this repository. See [Architecture](docs/architecture.md) and the [Contabo operations guide](docs/contabo.md).
68
+ After a successful push, `status` warns that the project and sessions were handed to the other device. Pull before editing or resuming them on the original device.
77
69
 
78
- ## The Five Commands
70
+ ## What moves
79
71
 
80
- | Command | Purpose |
72
+ | Data | Behavior |
81
73
  | --- | --- |
82
- | `onthego init` | Register the current Git repository, create its stable `.onthego.yaml` identity, and add local-only paths to `.gitignore`. |
83
- | `onthego login` | Authenticate this device with the ONTHEGO control plane. |
84
- | `onthego pass` | Collect project sessions, redact them locally, create the handoff, and start `agent-sync` in Daytona. |
85
- | `onthego status` | Refresh the latest Daytona run and redacted logs, synchronize state, and generate a concise summary. |
86
- | `onthego pull` | Download the latest result after receipt and SHA-256 verification. |
87
-
88
- Every public command supports schema-versioned JSON output:
89
-
90
- ```bash
91
- onthego status --json
92
- onthego pull --output ./handoff-result.md --json
74
+ | Git history | Missing objects travel in a negotiated bundle. GitHub is optional. |
75
+ | Staged and unstaged work | Temporary Git trees preserve their distinction, binary content, and executable bits. |
76
+ | Untracked project files | Included subject to project exclusions and the secret policy. |
77
+ | Ignored files | Include explicitly with `--include` or project policy. |
78
+ | Secret candidates such as `.env` | Excluded and reported; eligible files require `--include-secret`. |
79
+ | Codex and Claude histories | Recent project sessions by default; path values are remapped without rewriting conversation content. |
80
+ | Destination Git configuration and hooks | Preserved in place, together with remotes, reflogs, and existing stashes. |
81
+ | Destination caches and local dependencies | Left in place when they are outside the managed file set. |
82
+ | Agent logins, global databases, and running processes | Not transferred. Authenticate and run the agent separately on each device. |
83
+
84
+ Native transcripts may contain sensitive prompts or tool output. ONTHEGO preserves them inside an encrypted package for resumability. All tracked Git content and history also travel as recorded, including anything previously committed. Supplemental secret-file rules cannot remove secrets from Git history.
85
+
86
+ ## Sessions and conflicts
87
+
88
+ The default selection is sessions active in the last seven days. Choose a narrower or broader set explicitly:
89
+
90
+ ```sh
91
+ onthego push laptop --session <id>
92
+ onthego push laptop --session-days 2
93
+ onthego push laptop --all-sessions
94
+ onthego pull laptop --sessions skip
93
95
  ```
94
96
 
95
- ## How It Works
96
-
97
- ```mermaid
98
- flowchart LR
99
- A[Codex] --> E[Project session discovery]
100
- B[Cursor] --> E
101
- C[Hermes] --> E
102
- D[Claude] --> E
103
- E --> F[Local redaction]
104
- F --> G[Context envelope and HANDOFF.md]
105
- G --> H[Daytona agent-sync]
106
- H --> I[Redacted logs and run receipt]
107
- I --> J[ONTHEGO control plane]
108
- J --> K[Authenticated devices]
109
- I --> L[SHA-256 verified pull]
110
- ```
97
+ Malformed completed JSONL lines exclude that session with a warning. An incomplete final line is discarded with a warning. These histories do not stop the workspace handoff.
111
98
 
112
- ### 1. Scope by project
99
+ Identical sessions are skipped. Incoming extensions update an older destination, while a newer destination is kept. Divergent sessions keep the destination and save the incoming history in private `~/.onthego/conflicts/` storage by default. `--sessions keep-both`, `--sessions theirs`, and `--sessions skip` make the policy explicit. Conflict copies remain until you review and remove them. Plaintext staging copies are removed after import. If an adapter cannot write its destination, the workspace still arrives and its authenticated inbound histories are retained in a private `session-recovery-*` directory under ONTHEGO state. The warning prints its location.
113
100
 
114
- ONTHEGO uses the Git root as the trust and discovery boundary. It scans the local storage used by Codex, Cursor, Hermes, and Claude, then keeps only sessions associated with that project.
101
+ Concurrent workspace edits require a deliberate decision. ONTHEGO checks Git handoff ancestry and the destination's captured workspace state. `--replace` applies incoming managed files after retaining a Git backup; a different project ID is always rejected.
115
102
 
116
- ### 2. Redact before transfer
103
+ ```sh
104
+ onthego backups list
105
+ onthego undo
106
+ onthego backups prune --keep 3
107
+ ```
117
108
 
118
- Raw sessions stay local. Before an envelope leaves the machine, ONTHEGO filters common API keys, bearer tokens, private keys, secret assignments, and opaque encrypted agent payloads. The envelope records source hashes and byte ranges so the handoff remains auditable without exposing local paths.
109
+ The newest five Git backups are retained automatically. Explicitly included supplemental secrets stay outside Git objects; their backup contents are encrypted under the private ONTHEGO state directory. Unmanaged `node_modules`, caches, and local environment files are not copied into backups. Undo restores the backed-up managed state and clears the delivery baseline, since restoring old work does not prove that another device has received it. Use Git to reconcile intentional concurrent development.
119
110
 
120
- ### 3. Run in isolation
111
+ ## Configuration
121
112
 
122
- The official Daytona Go SDK creates or selects a sandbox, uploads the redacted context, and starts an ONTHEGO-owned process session. The default CPU-only `agent-sync` workload returns `HANDOFF.md` and can be replaced with a project-defined workload in `.onthego.yaml`.
113
+ Commit the project policy `.onthego.yaml`:
123
114
 
124
- ### 4. Resume with proof
115
+ ```yaml
116
+ schema_version: 2
117
+ project_id: generated-by-onthego-init
118
+ include:
119
+ - .onthego.yaml
120
+ exclude:
121
+ - .git
122
+ - .onthego.local
123
+ - node_modules
124
+ - vendor
125
+ - dist
126
+ - build
127
+ - .cache
128
+ - __pycache__
129
+ agent: auto
130
+ ```
125
131
 
126
- `onthego status` combines local Git state with remote run state. `onthego pull` refuses results with a missing or mismatched SHA-256 receipt, so an unverified artifact never becomes the local handoff.
132
+ `agent` accepts `auto`, `codex`, `claude`, or `none`. `none` performs workspace-only handoffs.
127
133
 
128
- ## Security Model
134
+ Personal configuration and pinned identities live in `~/.onthego/config.yaml`. Private ONTHEGO keys live in `~/.onthego/identity/keys.json`. Private directories use mode `0700` and files use `0600`. `ONTHEGO_HOME` optionally selects a different state directory. ONTHEGO never automatically loads `.env` files.
129
135
 
130
- | Boundary | Protection |
131
- | --- | --- |
132
- | Project | Session discovery is limited to the current Git repository. |
133
- | Secrets | The root `.env` must not be accessible by group or other users and is never tracked. |
134
- | Transfer | Session content is redacted locally before upload. |
135
- | Control plane | TLS is pinned by certificate SHA-256 fingerprint. |
136
- | State | Authenticated generation checks reject stale writes. |
137
- | Results | Remote artifacts are accepted only when their SHA-256 hash matches the receipt. |
138
- | Snapshots | Portable `.otg` snapshots use age X25519 encryption and Ed25519 signatures. |
136
+ ```sh
137
+ onthego config path
138
+ onthego device list
139
+ onthego identity
140
+ onthego push laptop --include scratch/notes.txt
141
+ onthego push laptop --include-secret .env
142
+ ```
139
143
 
140
- `onthego init` always keeps `AGENTS.md`, `.agents/`, `.env`, `.onthego.local/`, `HANDOFF.md`, and `*.otg` out of Git. Device login sessions are stored outside the repository with `0600` permissions.
144
+ Explicitly selected files remain managed across subsequent handoffs, including deletions. Do not opt in credentials that must stay device-local. Names such as `tokenizer.ts`, `docs-secret-santa.md`, and `design.key` are ordinary project files, not secret candidates.
141
145
 
142
- ## Project Configuration
146
+ ## Portable snapshots
143
147
 
144
- `onthego init` creates a safe, trackable `.onthego.yaml`. It contains the project identity and workload policy, never secret values. Re-running `init` preserves the existing project ID.
148
+ For removable storage or another delivery channel, create an encrypted `.otg` file:
145
149
 
146
- The default workload is deliberately small:
150
+ ```sh
151
+ onthego snapshot pack --output /tmp/project.otg --recipient age1...
147
152
 
148
- ```yaml
149
- workloads:
150
- agent-sync:
151
- kind: agent
152
- image: debian:bookworm-slim
153
- gpu_count: 0
154
- argv:
155
- - /bin/sh
156
- - -lc
157
- - cp ../context/HANDOFF.md ./HANDOFF.md
158
- output_path: HANDOFF.md
159
- timeout_seconds: 600
153
+ # On the receiving device:
154
+ onthego snapshot restore /tmp/project.otg \
155
+ --output /path/to/project \
156
+ --signing-public <trusted-source-public-key>
160
157
  ```
161
158
 
162
- The CLI reads `.env` from the current directory up to the Git root. Existing process environment values take precedence over file values. Daytona also accepts `DAYTONA_JWT_TOKEN` as an alternative to `DAYTONA_API_KEY`.
163
-
164
- ## Platform Support
159
+ Use the recipient and signing public keys printed by `onthego identity`. Without `--recipient`, packing targets the local device. SSH handoffs resolve both identities from pairing; offline restores require you to authenticate the source signing key.
165
160
 
166
- The npm package currently ships prebuilt binaries for:
161
+ Offline exports retain pending receipts for up to 30 days, bounded to 64 per workspace. A returning descendant can acknowledge this lineage without `--replace`. Retrying an already applied snapshot succeeds without overwriting later local edits.
167
162
 
168
- - macOS on Apple silicon (`darwin-arm64`)
169
- - Linux on x86-64 (`linux-x64`)
163
+ ## Commands
170
164
 
171
- Node.js 18 or newer is required for the npm launcher. Building from source requires Go 1.25.4 or newer.
165
+ | Command | Purpose |
166
+ | --- | --- |
167
+ | `init` | Initialize project policy. |
168
+ | `device add/list/remove` | Pair and manage devices. |
169
+ | `remote set` | Manage project paths on those devices. |
170
+ | `push`, `pull` | Hand off a workspace and selected histories. |
171
+ | `status [device]` | Inspect changes and active-device guidance. |
172
+ | `inspect` | Preview file selection and excluded secret candidates. |
173
+ | `doctor [device]` | Check prerequisites, CLI versions, and optional peer access. |
174
+ | `snapshot pack/restore` | Create or receive an offline package. |
175
+ | `backups list/prune`, `undo` | Inspect, limit, or restore Git backups. |
176
+ | `identity`, `config path`, `version` | Inspect public identity and installation. |
177
+
178
+ `--json` emits structured results and errors. `--verbose` reports transfer phases on stderr.
172
179
 
173
180
  ## Development
174
181
 
175
- ```bash
176
- git clone https://github.com/jbaehova/onthego.git
177
- cd onthego
182
+ ```sh
178
183
  make check
184
+ go test -race ./...
179
185
  make build
180
- ```
181
-
182
- Useful project commands:
183
-
184
- ```bash
185
- make test
186
186
  ./scripts/demo.sh
187
- go run ./cmd/onthego --help
188
- go run ./cmd/onthego-server
187
+ ./scripts/ssh-e2e.sh
188
+ make package
189
189
  ```
190
190
 
191
- The release workflow tests and vets the Go code, builds static Linux amd64 and macOS arm64 binaries, scans the npm package for local or secret files, publishes with npm provenance, and attaches checksummed binaries to the GitHub release.
192
-
193
- ## Repository Layout
194
-
195
- ```text
196
- cmd/ CLI and control plane entry points
197
- internal/ capture, redaction, transport, state, and verification
198
- npm/ cross-platform npm launcher and packaged binaries
199
- deploy/contabo/ hardened systemd service for the control plane
200
- docs/ architecture, demo, pitch, and progress notes
201
- scripts/ local demo workflow
202
- ```
203
-
204
- ## Roadmap
205
-
206
- The five-command agent handoff is the supported Phase 1 contract. GPU fine-tuning, GPU model serving, and Hugging Face model and dataset connectors are active backlog items and are not presented as production features yet.
191
+ The tests and demos isolate project and agent homes. The SSH script uses a real temporary OpenSSH server. See [validation and feedback coverage](docs/progress.md), [architecture](docs/architecture.md), and [migration](docs/migration.md).
207
192
 
208
- Follow the implementation record in [docs/progress.md](docs/progress.md).
193
+ This is an explicit handoff tool. Continuous synchronization and user-owned asynchronous storage adapters remain future work.
209
194
 
210
195
  ## License
211
196
 
212
- MIT. See [LICENSE](LICENSE).
197
+ [MIT](LICENSE).
@@ -6,7 +6,9 @@ const path = require("node:path");
6
6
 
7
7
  const supported = new Map([
8
8
  ["darwin-arm64", "onthego-darwin-arm64"],
9
+ ["darwin-x64", "onthego-darwin-amd64"],
9
10
  ["linux-x64", "onthego-linux-amd64"],
11
+ ["linux-arm64", "onthego-linux-arm64"],
10
12
  ]);
11
13
 
12
14
  const platform = `${process.platform}-${process.arch}`;
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@jbaehova/onthego",
3
- "version": "0.1.3",
4
- "description": "Carry agent context and work between local projects and Daytona sandboxes",
3
+ "version": "0.3.0",
4
+ "description": "Open-source workspace and coding-agent session handoffs between your own devices",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/jbaehova/onthego.git"
8
+ "url": "git+https://github.com/peerproblem/onthego.git"
9
9
  },
10
- "homepage": "https://github.com/jbaehova/onthego#readme",
10
+ "homepage": "https://github.com/peerproblem/onthego#readme",
11
11
  "bugs": {
12
- "url": "https://github.com/jbaehova/onthego/issues"
12
+ "url": "https://github.com/peerproblem/onthego/issues"
13
13
  },
14
14
  "bin": {
15
15
  "onthego": "npm/bin/onthego.js"
@@ -17,6 +17,8 @@
17
17
  "files": [
18
18
  "npm/bin/onthego.js",
19
19
  "npm/vendor/onthego-darwin-arm64",
20
+ "npm/vendor/onthego-darwin-amd64",
21
+ "npm/vendor/onthego-linux-arm64",
20
22
  "npm/vendor/onthego-linux-amd64",
21
23
  "README.md",
22
24
  "LICENSE"
@@ -27,7 +29,10 @@
27
29
  "scripts": {
28
30
  "demo": "./scripts/demo.sh",
29
31
  "prepack": "node npm/scripts/verify-package.mjs",
30
- "test": "go test ./..."
32
+ "test": "go test ./...",
33
+ "test:e2e": "./scripts/ssh-e2e.sh",
34
+ "test:interrupt": "python3 scripts/sigint-e2e.py",
35
+ "benchmark": "python3 scripts/benchmark.py"
31
36
  },
32
37
  "publishConfig": {
33
38
  "access": "public",