@akshar5/cohall 0.3.0 → 0.3.2
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/CHANGELOG.md +14 -0
- package/README.md +57 -4
- package/bin/cohall.js +173 -44
- package/bin/cohall.js.map +7 -7
- package/deploy/launchd/com.cohall.device.plist +31 -0
- package/deploy/systemd/cohall-device.service +17 -0
- package/deploy/systemd/cohall-relay.service +30 -0
- package/deploy/windows/install-device.ps1 +21 -0
- package/docs/install.md +87 -0
- package/docs/integrations.md +92 -0
- package/docs/releasing.md +33 -0
- package/docs/services.md +103 -0
- package/package.json +3 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>Label</key>
|
|
6
|
+
<string>com.cohall.device</string>
|
|
7
|
+
<key>ProgramArguments</key>
|
|
8
|
+
<array>
|
|
9
|
+
<string>/usr/local/bin/cohall</string>
|
|
10
|
+
<string>device</string>
|
|
11
|
+
</array>
|
|
12
|
+
<key>EnvironmentVariables</key>
|
|
13
|
+
<dict>
|
|
14
|
+
<key>PATH</key>
|
|
15
|
+
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
|
|
16
|
+
</dict>
|
|
17
|
+
<key>RunAtLoad</key>
|
|
18
|
+
<true/>
|
|
19
|
+
<key>KeepAlive</key>
|
|
20
|
+
<dict>
|
|
21
|
+
<key>NetworkState</key>
|
|
22
|
+
<true/>
|
|
23
|
+
<key>SuccessfulExit</key>
|
|
24
|
+
<false/>
|
|
25
|
+
</dict>
|
|
26
|
+
<key>ThrottleInterval</key>
|
|
27
|
+
<integer>3</integer>
|
|
28
|
+
<key>ProcessType</key>
|
|
29
|
+
<string>Background</string>
|
|
30
|
+
</dict>
|
|
31
|
+
</plist>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[Unit]
|
|
2
|
+
Description=Cohall device agent
|
|
3
|
+
After=network-online.target
|
|
4
|
+
Wants=network-online.target
|
|
5
|
+
|
|
6
|
+
[Service]
|
|
7
|
+
Type=simple
|
|
8
|
+
Environment=PATH=%h/.local/bin:%h/.npm-global/bin:%h/.bun/bin:%h/.local/share/pnpm:/usr/local/bin:/usr/bin:/bin
|
|
9
|
+
ExecStart=%h/.local/bin/cohall device
|
|
10
|
+
Restart=always
|
|
11
|
+
RestartSec=3
|
|
12
|
+
UMask=0077
|
|
13
|
+
NoNewPrivileges=true
|
|
14
|
+
PrivateTmp=true
|
|
15
|
+
|
|
16
|
+
[Install]
|
|
17
|
+
WantedBy=default.target
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[Unit]
|
|
2
|
+
Description=Cohall relay
|
|
3
|
+
After=network-online.target
|
|
4
|
+
Wants=network-online.target
|
|
5
|
+
|
|
6
|
+
[Service]
|
|
7
|
+
Type=simple
|
|
8
|
+
User=cohall
|
|
9
|
+
Group=cohall
|
|
10
|
+
EnvironmentFile=/etc/cohall/relay.env
|
|
11
|
+
ExecStart=/usr/local/bin/cohall relay
|
|
12
|
+
Restart=on-failure
|
|
13
|
+
RestartSec=3
|
|
14
|
+
UMask=0077
|
|
15
|
+
StateDirectory=cohall
|
|
16
|
+
StateDirectoryMode=0700
|
|
17
|
+
NoNewPrivileges=true
|
|
18
|
+
PrivateTmp=true
|
|
19
|
+
PrivateDevices=true
|
|
20
|
+
ProtectSystem=strict
|
|
21
|
+
ProtectHome=true
|
|
22
|
+
ReadWritePaths=/var/lib/cohall
|
|
23
|
+
ProtectKernelTunables=true
|
|
24
|
+
ProtectKernelModules=true
|
|
25
|
+
ProtectControlGroups=true
|
|
26
|
+
RestrictSUIDSGID=true
|
|
27
|
+
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
28
|
+
|
|
29
|
+
[Install]
|
|
30
|
+
WantedBy=multi-user.target
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
$ErrorActionPreference = "Stop"
|
|
2
|
+
|
|
3
|
+
$cohall = (Get-Command cohall -ErrorAction Stop).Source
|
|
4
|
+
$action = New-ScheduledTaskAction -Execute $cohall -Argument "device"
|
|
5
|
+
$trigger = New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME
|
|
6
|
+
$settings = New-ScheduledTaskSettingsSet `
|
|
7
|
+
-ExecutionTimeLimit (New-TimeSpan -Days 3650) `
|
|
8
|
+
-RestartCount 999 `
|
|
9
|
+
-RestartInterval (New-TimeSpan -Minutes 1) `
|
|
10
|
+
-MultipleInstances IgnoreNew
|
|
11
|
+
|
|
12
|
+
Register-ScheduledTask `
|
|
13
|
+
-TaskName "Cohall Device" `
|
|
14
|
+
-Description "Connect this device to the configured Cohall relay" `
|
|
15
|
+
-Action $action `
|
|
16
|
+
-Trigger $trigger `
|
|
17
|
+
-Settings $settings `
|
|
18
|
+
-Force | Out-Null
|
|
19
|
+
|
|
20
|
+
Start-ScheduledTask -TaskName "Cohall Device"
|
|
21
|
+
Write-Output "Cohall Device scheduled task installed."
|
package/docs/install.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Install Cohall
|
|
2
|
+
|
|
3
|
+
## Run with a package runner
|
|
4
|
+
|
|
5
|
+
Cohall is a public npm package and requires Node.js 24 or newer. Nothing from
|
|
6
|
+
Buzz, T3Code, Codex, Claude Code, or OpenCode is bundled or required.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx -y @akshar5/cohall --version
|
|
10
|
+
bunx @akshar5/cohall --version
|
|
11
|
+
pnpm dlx @akshar5/cohall --version
|
|
12
|
+
yarn dlx @akshar5/cohall --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The package follows the standard npm package format, so npm, Bun, pnpm, and Yarn
|
|
16
|
+
can install it too. The documentation uses `npx` as the common default. An
|
|
17
|
+
unattended relay or device service may install the package globally so its
|
|
18
|
+
executable path remains fixed across restarts:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install --global @akshar5/cohall
|
|
22
|
+
# or: bun add --global @akshar5/cohall
|
|
23
|
+
# or: pnpm add --global @akshar5/cohall
|
|
24
|
+
cohall --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Pair a machine
|
|
28
|
+
|
|
29
|
+
The relay owner creates a token valid for ten minutes and one exchange:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
COHALL_RELAY_URL=https://cohall.example.com \
|
|
33
|
+
COHALL_TOKEN=owner-token \
|
|
34
|
+
npx -y @akshar5/cohall pair --label "Linux workstation"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Transfer it privately, then enter it without placing it in process arguments or
|
|
38
|
+
shell history:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
read -rsp 'Pairing token: ' pairing_token; printf '\n'
|
|
42
|
+
printf '%s' "$pairing_token" | npx -y @akshar5/cohall join \
|
|
43
|
+
--relay https://cohall.example.com \
|
|
44
|
+
--name linux \
|
|
45
|
+
--providers codex \
|
|
46
|
+
--workspace "$HOME/dev"
|
|
47
|
+
unset pairing_token
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
For a client-only machine that submits work but never runs a device daemon:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx -y @akshar5/cohall pair --client-only --label "Automation client"
|
|
54
|
+
read -rsp 'Pairing token: ' pairing_token; printf '\n'
|
|
55
|
+
printf '%s' "$pairing_token" | npx -y @akshar5/cohall join \
|
|
56
|
+
--relay https://cohall.example.com \
|
|
57
|
+
--client-only
|
|
58
|
+
unset pairing_token
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For automation, place the token in a mode-`0600` file and use
|
|
62
|
+
`npx -y @akshar5/cohall join --token-file /path/to/token`. Pairing tokens expire
|
|
63
|
+
after ten minutes and can be exchanged once.
|
|
64
|
+
|
|
65
|
+
Configuration locations:
|
|
66
|
+
|
|
67
|
+
- Linux: `${XDG_CONFIG_HOME:-~/.config}/cohall/config.json`
|
|
68
|
+
- macOS: `~/Library/Application Support/Cohall/config.json`
|
|
69
|
+
- Windows: `%APPDATA%\Cohall\config.json`
|
|
70
|
+
|
|
71
|
+
Use `COHALL_CONFIG` to override the path. On Unix, Cohall enforces directory
|
|
72
|
+
mode `0700` and file mode `0600`.
|
|
73
|
+
|
|
74
|
+
The relay must stay online so devices and clients can reach it. A target device
|
|
75
|
+
must be online only while it is accepting or running work; queued tasks remain
|
|
76
|
+
durable on the relay while it is offline.
|
|
77
|
+
|
|
78
|
+
`--providers` is an optional comma-separated allowlist. It prevents an installed
|
|
79
|
+
but unauthenticated provider executable from being advertised. Run `cohall
|
|
80
|
+
configure --providers auto` to return to executable auto-detection.
|
|
81
|
+
|
|
82
|
+
## Upgrade
|
|
83
|
+
|
|
84
|
+
`npx -y @akshar5/cohall` resolves the current npm release. For a globally
|
|
85
|
+
installed service, stop it, run `npm install --global @akshar5/cohall@latest`,
|
|
86
|
+
verify `cohall doctor`, and restart it. Back up the relay data directory before
|
|
87
|
+
upgrading a production relay; SQLite schema migrations run in place.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Agent harness integrations
|
|
2
|
+
|
|
3
|
+
CLI plus skill is the recommended integration. MCP is available for hosts that
|
|
4
|
+
prefer native tool discovery. Both use the same relay and device protocol.
|
|
5
|
+
|
|
6
|
+
## CLI plus skill
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx -y @akshar5/cohall skill install all
|
|
10
|
+
npx -y @akshar5/cohall doctor
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This installs the same embedded `SKILL.md` into:
|
|
14
|
+
|
|
15
|
+
- `~/.agents/skills/cohall` for Codex-compatible skill loaders;
|
|
16
|
+
- `~/.claude/skills/cohall` for Claude Code;
|
|
17
|
+
- `~/.config/opencode/skills/cohall` for OpenCode.
|
|
18
|
+
|
|
19
|
+
T3Code, Buzz, and other harnesses can run `npx -y @akshar5/cohall` from their
|
|
20
|
+
normal shell/tool environment. `bunx @akshar5/cohall`, `pnpm dlx
|
|
21
|
+
@akshar5/cohall`, and `yarn dlx @akshar5/cohall` are equivalent. No
|
|
22
|
+
Cohall-specific UI extension is required.
|
|
23
|
+
|
|
24
|
+
## Codex MCP
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
codex mcp add cohall -- npx -y @akshar5/cohall mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or configure `~/.codex/config.toml`:
|
|
31
|
+
|
|
32
|
+
```toml
|
|
33
|
+
[mcp_servers.cohall]
|
|
34
|
+
command = "npx"
|
|
35
|
+
args = ["-y", "@akshar5/cohall", "mcp"]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Claude Code MCP
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
claude mcp add --transport stdio --scope user cohall -- \
|
|
42
|
+
npx -y @akshar5/cohall mcp
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or use the standard JSON form in a project `.mcp.json`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"cohall": {
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["-y", "@akshar5/cohall", "mcp"]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## OpenCode MCP
|
|
59
|
+
|
|
60
|
+
Add this to `opencode.json`:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"$schema": "https://opencode.ai/config.json",
|
|
65
|
+
"mcp": {
|
|
66
|
+
"cohall": {
|
|
67
|
+
"type": "local",
|
|
68
|
+
"command": ["npx", "-y", "@akshar5/cohall", "mcp"],
|
|
69
|
+
"enabled": true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Environment
|
|
76
|
+
|
|
77
|
+
The MCP subprocess reads the normal per-user Cohall configuration. If a harness
|
|
78
|
+
uses an isolated environment, pass only:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
COHALL_CONFIG=/absolute/path/to/config.json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or pass `COHALL_RELAY_URL` and `COHALL_CLIENT_TOKEN` directly. Never place an
|
|
85
|
+
owner or device token in an MCP client configuration.
|
|
86
|
+
|
|
87
|
+
CLI and MCP are equivalent entry points. Use one per delegated task.
|
|
88
|
+
Both expose redacted task tracing through `cohall trace <task-id>` and the
|
|
89
|
+
`task_trace` MCP tool.
|
|
90
|
+
Replace the `npx`, `-y`, `@akshar5/cohall` command prefix with `bunx`,
|
|
91
|
+
`@akshar5/cohall` or `pnpm`, `dlx`, `@akshar5/cohall` when that better matches
|
|
92
|
+
the host.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Release operations
|
|
2
|
+
|
|
3
|
+
Cohall publishes publicly to npm as `@akshar5/cohall`. Releases use Release
|
|
4
|
+
Please and npm trusted publishing; no long-lived npm token is stored in GitHub.
|
|
5
|
+
|
|
6
|
+
Before merging a release:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
bun install --frozen-lockfile
|
|
10
|
+
bun run check
|
|
11
|
+
bun run check
|
|
12
|
+
npm pack --dry-run
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The Check workflow runs only when manually dispatched or when a non-draft pull
|
|
16
|
+
request is opened or marked ready for review. Synchronizing commits does not
|
|
17
|
+
automatically consume another private-repository runner allocation.
|
|
18
|
+
|
|
19
|
+
After releasable conventional commits reach `main`, Release Please opens or
|
|
20
|
+
updates one release pull request. Merging it creates the version tag and GitHub
|
|
21
|
+
release; the same workflow then publishes that exact version to npm through
|
|
22
|
+
GitHub Actions OIDC.
|
|
23
|
+
|
|
24
|
+
The initial `0.2.0` release was published manually and tagged as the automation
|
|
25
|
+
baseline. npm trusted publishing is configured for:
|
|
26
|
+
|
|
27
|
+
- npm package: `@akshar5/cohall`
|
|
28
|
+
- repository: `AksharP5/cohall`
|
|
29
|
+
- workflow: `release.yml`
|
|
30
|
+
- environment: none
|
|
31
|
+
|
|
32
|
+
Publishing uses GitHub Actions OIDC. Do not add `NPM_TOKEN` or `NODE_AUTH_TOKEN`
|
|
33
|
+
to the workflow.
|
package/docs/services.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Run Cohall as a service
|
|
2
|
+
|
|
3
|
+
Interactive use should use `npx -y @akshar5/cohall`. Unattended services
|
|
4
|
+
install the same npm package so the operating system has a stable executable
|
|
5
|
+
path.
|
|
6
|
+
|
|
7
|
+
## Linux device daemon
|
|
8
|
+
|
|
9
|
+
Install and pair as the user that will run the daemon:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install --global --prefix "$HOME/.local" @akshar5/cohall
|
|
13
|
+
npx -y @akshar5/cohall doctor
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Copy the service shipped in the globally installed package, then start it:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
package_root="$(npm root --global --prefix "$HOME/.local")/@akshar5/cohall"
|
|
20
|
+
install -Dm644 "$package_root/deploy/systemd/cohall-device.service" \
|
|
21
|
+
"$HOME/.config/systemd/user/cohall-device.service"
|
|
22
|
+
systemctl --user daemon-reload
|
|
23
|
+
systemctl --user enable --now cohall-device
|
|
24
|
+
journalctl --user -u cohall-device -f
|
|
25
|
+
loginctl enable-linger "$USER"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Linger is optional; it keeps the daemon running after logout.
|
|
29
|
+
|
|
30
|
+
## Linux relay
|
|
31
|
+
|
|
32
|
+
Create a dedicated `cohall` user, install the npm package globally so
|
|
33
|
+
`command -v cohall` returns `/usr/local/bin/cohall`, and place the relay
|
|
34
|
+
environment at `/etc/cohall/relay.env` with mode `0600`:
|
|
35
|
+
|
|
36
|
+
```dotenv
|
|
37
|
+
COHALL_RELAY_HOST=0.0.0.0
|
|
38
|
+
COHALL_RELAY_PORT=8787
|
|
39
|
+
COHALL_RELAY_ALLOW_REMOTE=true
|
|
40
|
+
COHALL_TOKEN=replace-with-a-random-owner-token
|
|
41
|
+
COHALL_DATA_DIR=/var/lib/cohall
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Install `deploy/systemd/cohall-relay.service`, then:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
systemctl daemon-reload
|
|
48
|
+
systemctl enable --now cohall-relay
|
|
49
|
+
journalctl -u cohall-relay -f
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Expose the relay only through a private network such as Tailscale or an HTTPS
|
|
53
|
+
reverse proxy. Device connections are outbound WebSockets.
|
|
54
|
+
|
|
55
|
+
## macOS
|
|
56
|
+
|
|
57
|
+
Run `npm install --global @akshar5/cohall`, copy the packaged launch agent, then
|
|
58
|
+
update its executable path to match `command -v cohall`:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
package_root="$(npm root --global)/@akshar5/cohall"
|
|
62
|
+
mkdir -p "$HOME/Library/LaunchAgents"
|
|
63
|
+
cp "$package_root/deploy/launchd/com.cohall.device.plist" \
|
|
64
|
+
"$HOME/Library/LaunchAgents/com.cohall.device.plist"
|
|
65
|
+
cohall_path="$(command -v cohall)"
|
|
66
|
+
/usr/libexec/PlistBuddy -c "Set :ProgramArguments:0 $cohall_path" \
|
|
67
|
+
"$HOME/Library/LaunchAgents/com.cohall.device.plist"
|
|
68
|
+
launchctl bootstrap gui/"$(id -u)" ~/Library/LaunchAgents/com.cohall.device.plist
|
|
69
|
+
launchctl kickstart -k gui/"$(id -u)"/com.cohall.device
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The relay and device worker may run on the same machine. Configure the worker
|
|
73
|
+
with the relay's private Tailscale URL and install both services independently.
|
|
74
|
+
|
|
75
|
+
## Windows
|
|
76
|
+
|
|
77
|
+
Run `npm install --global @akshar5/cohall`, pair and verify the machine from
|
|
78
|
+
PowerShell, then run:
|
|
79
|
+
|
|
80
|
+
```powershell
|
|
81
|
+
powershell -ExecutionPolicy Bypass -File deploy\windows\install-device.ps1
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The script registers a per-user scheduled task that starts `cohall device` at
|
|
85
|
+
logon and restarts it after failures.
|
|
86
|
+
|
|
87
|
+
## Troubleshooting
|
|
88
|
+
|
|
89
|
+
Start with `cohall doctor`. It reports relay reachability, device connectivity,
|
|
90
|
+
provider selection, executable discovery, and version information without
|
|
91
|
+
printing credentials.
|
|
92
|
+
|
|
93
|
+
Inspect a task's redacted lifecycle, including dispatches, reconnect-driven
|
|
94
|
+
requeues, execution, cancellation, and completion:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
cohall trace <task-id>
|
|
98
|
+
cohall trace <task-id> --follow
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use `journalctl --user -u cohall-device -f` for a Linux device and
|
|
102
|
+
`journalctl -u cohall-relay -f` for a system relay. The trace is durable and
|
|
103
|
+
portable; service logs remain machine-local.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akshar5/cohall",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Let coding agents delegate work across your own devices.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"files": [
|
|
30
30
|
"bin",
|
|
31
|
+
"deploy",
|
|
32
|
+
"docs",
|
|
31
33
|
"CHANGELOG.md",
|
|
32
34
|
"LICENSE",
|
|
33
35
|
"README.md"
|