@jbaehova/onthego 0.1.2 → 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,69 +1,197 @@
1
1
  # ONTHEGO
2
2
 
3
- ONTHEGO carries project-scoped agent sessions, a redacted handoff, execution logs, and work state between a local Git workspace and a Daytona sandbox. A small control plane on Contabo keeps the latest state available across local machines. `status` turns the synchronized state into a concise update with GPT-5.6 Luna using high reasoning effort.
3
+ Continue your coding-agent conversation on another device, with your unfinished Git workspace intact.
4
+
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.
6
+
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.
4
8
 
5
9
  ## Install
6
10
 
7
- The npm package currently uses the `@jbaehova` scope because the unscoped `onthego` name is owned by another npm account.
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.
16
+
17
+ You can also build from source with Go 1.25.4 or newer:
8
18
 
9
19
  ```sh
10
- npm install -g @jbaehova/onthego
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
11
26
  ```
12
27
 
13
- The installed command is `onthego`.
28
+ ## Desktop to laptop
29
+
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.
14
31
 
15
- ## Phase 1 commands
32
+ Inside the project on the desktop:
16
33
 
17
34
  ```sh
18
35
  onthego init
19
- onthego login
20
- onthego pass
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
40
+
41
+ # Stop agents and other processes that write project files, then:
42
+ onthego push laptop --verbose
43
+ ```
44
+
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.
48
+
49
+ For the first transfer, choose a destination directory that does not exist. On the laptop:
50
+
51
+ ```sh
52
+ cd /Users/me/projects/my-app
21
53
  onthego status
22
- onthego pull
54
+ codex resume <session-id>
55
+ # Or: claude --resume <session-id>
23
56
  ```
24
57
 
25
- `init` turns the current Git repository into an ONTHEGO project. It creates the safe, trackable `.onthego.yaml` project identity and adds local secret and state patterns to `.gitignore`. Re-running it preserves the existing project identity. `login` authenticates this device with the ONTHEGO control plane. `pass` automatically finds every session for the current Git project from Codex, Cursor, Hermes, and Claude. It redacts all detected sessions, generates `HANDOFF.md`, and starts the default `agent-sync` workload in Daytona. No agent or session option is required. `status` refreshes the latest Daytona run and redacted logs, synchronizes them through the control plane, and generates the LLM summary. `pull` downloads the latest result only after its SHA-256 hash matches the remote receipt.
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).
26
59
 
27
- Run `onthego init` once after cloning or creating a repository. The Phase 1 pass flow is always `onthego pass`.
60
+ To bring laptop changes back, run this from the desktop project:
28
61
 
29
- ## Secrets
62
+ ```sh
63
+ onthego pull laptop --verbose
64
+ ```
30
65
 
31
- All repository secret values live in one root `.env`. ONTHEGO searches from the working directory to the Git root and refuses a file readable by group or other users. The current integration reads these keys:
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.
32
67
 
33
- - `DAYTONA_API_KEY`
34
- - `OPENAI_API_KEY`
35
- - `ONTHEGO_CONTROL_PLANE_URL`
36
- - `ONTHEGO_CONTROL_PLANE_TLS_SHA256`
37
- - `ONTHEGO_LOGIN_BOOTSTRAP_TOKEN`
38
- - `ONTHEGO_CONTROL_PLANE_SIGNING_KEY`
39
- - `CONTABO_VPS_IP_ADDRESS`
40
- - `CONTABO_VPS_DEFAULT_USER`
41
- - `CONTABO_VPS_PASSWORD`
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.
42
69
 
43
- The `.env` file, `AGENTS.md`, `.agents/`, local state, npm credentials, archives, build output, logs, and editor metadata are ignored by Git. The login session is stored outside the repository with permission `0600`.
70
+ ## What moves
44
71
 
45
- ## Security model
72
+ | Data | Behavior |
73
+ | --- | --- |
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. |
46
83
 
47
- - Context selection accepts only Codex, Cursor, Hermes, and Claude sessions associated with the current Git project.
48
- - Redaction removes common tokens, authorization headers, private keys, and matching secret assignments before transfer.
49
- - The Contabo client pins the server certificate SHA-256 fingerprint.
50
- - Control plane state updates use authenticated generation checks.
51
- - Daytona result files are accepted only when the remote receipt contains a matching SHA-256 hash.
52
- - Portable internal snapshots use age X25519 encryption and Ed25519 signatures.
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.
53
85
 
54
- ## Release
86
+ ## Sessions and conflicts
55
87
 
56
- GitHub Actions tests the Go code, builds static Linux amd64 and macOS arm64 binaries, assembles the npm package, scans the release tree for local or secret files, publishes to npm, and attaches checksummed binaries to the GitHub release.
88
+ The default selection is sessions active in the last seven days. Choose a narrower or broader set explicitly:
57
89
 
58
- ## Development
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
95
+ ```
96
+
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.
98
+
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.
100
+
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.
102
+
103
+ ```sh
104
+ onthego backups list
105
+ onthego undo
106
+ onthego backups prune --keep 3
107
+ ```
108
+
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.
110
+
111
+ ## Configuration
112
+
113
+ Commit the project policy `.onthego.yaml`:
114
+
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
+ ```
131
+
132
+ `agent` accepts `auto`, `codex`, `claude`, or `none`. `none` performs workspace-only handoffs.
133
+
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.
135
+
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
+ ```
143
+
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.
145
+
146
+ ## Portable snapshots
147
+
148
+ For removable storage or another delivery channel, create an encrypted `.otg` file:
59
149
 
60
- Go 1.25.4 or newer and Node.js 18 or newer are required.
150
+ ```sh
151
+ onthego snapshot pack --output /tmp/project.otg --recipient age1...
152
+
153
+ # On the receiving device:
154
+ onthego snapshot restore /tmp/project.otg \
155
+ --output /path/to/project \
156
+ --signing-public <trusted-source-public-key>
157
+ ```
158
+
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.
160
+
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.
162
+
163
+ ## Commands
164
+
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.
179
+
180
+ ## Development
61
181
 
62
182
  ```sh
63
183
  make check
184
+ go test -race ./...
64
185
  make build
186
+ ./scripts/demo.sh
187
+ ./scripts/ssh-e2e.sh
188
+ make package
65
189
  ```
66
190
 
67
- GPU fine-tuning, GPU model serving, and the Hugging Face connector are backlog items. Their internal experiments are not part of the Phase 1 command contract.
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).
192
+
193
+ This is an explicit handoff tool. Continuous synchronization and user-owned asynchronous storage adapters remain future work.
194
+
195
+ ## License
68
196
 
69
- See [docs/architecture.md](docs/architecture.md) and [docs/progress.md](docs/progress.md) for the implementation record.
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.2",
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",