@akshar5/cohall 0.10.2 → 0.11.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/docs/install.md CHANGED
@@ -3,6 +3,10 @@
3
3
  Cohall requires Node.js 24 or newer. It is a standard public npm package with no
4
4
  bundled agent harness.
5
5
 
6
+ For agent-led setup, follow [onboarding](onboarding.md) or run
7
+ `npx -y @akshar5/cohall onboard`. It separates hosting a relay from joining one
8
+ and ends with a real delegation check.
9
+
6
10
  ## Package runners
7
11
 
8
12
  Use one command. The documentation uses `npx` in later examples.
@@ -87,12 +91,18 @@ printf '%s' "$pairing_token" | npx -y @akshar5/cohall init \
87
91
  unset pairing_token
88
92
  ```
89
93
 
94
+ Pairing also returns `join_instructions`: a copyable agent setup brief for the
95
+ selected role and relay. It contains no pairing token; transfer that separately.
96
+
90
97
  When run in a terminal, omitted relay, name, workspace, provider, and token
91
- values are prompted with useful defaults. Re-running `cohall init` repairs the
98
+ values are prompted. A fresh setup requires a confirmed relay address;
99
+ `init` and `join` reuse a saved address but never assume a local relay for a new
100
+ installation. Re-running `cohall init` repairs the
92
101
  skill installation and reuses credentials when the selected relay has not
93
102
  changed. Keeping the default workspace retains all configured roots;
94
103
  `init --client-only` also retains the worker's provider selection unless
95
104
  `--providers` overrides it. `cohall join` remains the non-guided configuration primitive.
105
+ `--client-only` and `--service` cannot be combined.
96
106
 
97
107
  Workspace roots must be existing directories. Cohall resolves them to canonical paths and
98
108
  rejects delegated work outside them.
@@ -164,8 +174,10 @@ Non-loopback HTTP is refused unless `--allow-http` explicitly confirms that an
164
174
  independent private network such as Tailscale encrypts the connection.
165
175
  `cohall doctor` checks the effective configuration, relay connection, provider
166
176
  executables, authentication readiness, and versions. With a client credential,
167
- it also starts the local MCP server, completes a protocol handshake, and checks
168
- that tools are listed. This check does not call a tool or require the relay.
177
+ it also runs a local MCP server self-test and separately reports observed agent
178
+ host connections. The self-test lists tools without calling one or requiring
179
+ the relay. To verify your harness, ask it to call `list_devices` and inspect
180
+ `mcp_host` using the same config path; see [MCP host verification](integrations.md#verify-the-mcp-host).
169
181
 
170
182
  Configuration locations:
171
183
 
@@ -175,8 +175,37 @@ This installs the embedded skill into:
175
175
  - `~/.config/opencode/skills/cohall` for OpenCode.
176
176
 
177
177
  With a client credential, `doctor` starts Cohall's MCP server and verifies that
178
- it lists tools. This checks the local server; the agent host still needs a
179
- working MCP configuration to load it.
178
+ it lists tools. The report labels `mcp` as a **server self-test**. This probe
179
+ never counts as an agent host connection and does not call a tool.
180
+
181
+ ### Verify the MCP host
182
+
183
+ After adding Cohall to your harness, restart or reconnect its MCP server and
184
+ ask the agent to call `list_devices`. Then run `cohall doctor` with the same
185
+ configuration used by that MCP server and inspect `mcp_host`:
186
+
187
+ - `not_observed`: no retained host initialization was seen. If you expected
188
+ MCP, check the host's command, arguments, enabled state, and `COHALL_CONFIG`,
189
+ then restart its Cohall connection. CLI and skill users do not need MCP.
190
+ - `observed`: at least one recorded host completed initialization. Inspect
191
+ the latest session's stages rather than treating this as current connection
192
+ status. A launch without initialization points to a startup or handshake
193
+ problem; initialization without `tools_list` points to tool discovery.
194
+ - `unavailable`: local diagnostic storage could not be read. Follow the report's
195
+ access or reset guidance before retrying.
196
+
197
+ Each session records launch time and server version, initialization time and
198
+ the client-reported name/version, the last successfully sent tool list and its
199
+ count, received tool-call count/time, and close time when observed. A received
200
+ tool call can fail or be cancelled; its count does not establish successful
201
+ execution. Historical records cannot prove that a host is connected now.
202
+
203
+ Evidence is stored locally in `<config_path>.mcp-hosts`, isolated for each
204
+ configuration, with at most eight recent records retained for seven days.
205
+ Records contain no tool names, arguments, results, relay URLs, tokens, or
206
+ conversation content. Metadata write failures leave MCP operational and are
207
+ reported on its stderr. Older Cohall servers create no records; reconnect an
208
+ updated server before expecting evidence.
180
209
 
181
210
  A running MCP server checks its launched executable at most once per minute
182
211
  when returning tool results. If that file changes to a different Cohall version,
@@ -0,0 +1,116 @@
1
+ # Set up Cohall with your agent
2
+
3
+ These instructions are for the agent doing the setup. Read the path that matches
4
+ the owner's request, complete the verification steps, and report what works.
5
+ `cohall onboard` prints this same guide without changing the machine.
6
+
7
+ ## Choose the role
8
+
9
+ - A relay address and pairing token mean **join an existing relay**.
10
+ - A request to host a relay means **host a relay** on an always-on machine.
11
+ - If neither is clear, ask whether this machine should host or join, and obtain
12
+ the relay address before pairing. A laptop that sleeps is a poor relay host.
13
+ - For an existing installation, inspect `cohall config` and run `cohall doctor`
14
+ before repairing it. Reuse working credentials and workspace settings.
15
+
16
+ Detect the OS, Node.js version, package manager, installed provider CLIs, and
17
+ existing workspace roots. Cohall requires Node.js 24 or newer. Follow
18
+ [installation](https://github.com/AksharP5/cohall/blob/main/docs/install.md) for package commands and
19
+ [services](https://github.com/AksharP5/cohall/blob/main/docs/services.md) for the current OS. Use the owner's authorization for
20
+ installation and autostart; obtain it when missing. Provider login requires the
21
+ owner's account and should stay on the machine that runs that provider.
22
+
23
+ Keep tokens out of command arguments, shell history, logs, and setup briefs.
24
+ Read them through a hidden terminal prompt, stdin, or a private token file.
25
+
26
+ ## Host a relay
27
+
28
+ 1. Choose a machine that stays awake and a persistent relay data directory.
29
+ Install Cohall globally so its service has a stable executable path.
30
+ 2. Start `cohall relay` once in the foreground. The default listener is
31
+ `127.0.0.1:8787`; the relay creates a private owner token in its data directory
32
+ when none is supplied. Preserve that directory and include it in backups.
33
+ 3. Make the relay reachable through the owner's private Tailscale network or
34
+ HTTPS reverse proxy. Confirm the address from a joining machine with
35
+ `GET /api/health`. Plain HTTP is suitable only inside an independently
36
+ encrypted private network, never as a public listener.
37
+ 4. Configure relay autostart. The packaged relay service instructions cover
38
+ Linux; macOS and Windows relay hosts need an owner-approved supervisor.
39
+ `cohall service install` installs a **device worker**, not a relay.
40
+ Prepare the managed relay with the same data and owner configuration. Stop
41
+ the foreground relay to release its address, start the managed service, and
42
+ verify relay health before pairing devices.
43
+ 5. On the relay host, create a ten-minute, single-use pairing token for each
44
+ joining machine:
45
+
46
+ ```bash
47
+ cohall pair --label "Workstation"
48
+ ```
49
+
50
+ Set `COHALL_RELAY_URL` to the reachable address when creating the pairing so
51
+ its `join_instructions` use that address. The owner token is read from the
52
+ relay data directory on the host; a service using a different user or data
53
+ directory needs the matching owner configuration. Transfer the pairing token
54
+ privately and send the returned join instructions separately.
55
+
56
+ 6. If this host should also run agent work, pair it as another device and
57
+ complete the joining path below. Hosting a relay alone does not register a
58
+ worker or install its agent integration.
59
+
60
+ ## Join an existing relay
61
+
62
+ 1. Confirm the relay address and the role. A worker runs providers against its
63
+ own allowed workspaces; a client-only installation submits work elsewhere.
64
+ Request a fresh token if the supplied one has expired or was already used.
65
+ 2. Choose existing workspace roots and installed providers for a worker.
66
+ Confirm provider login on this machine. Use `--providers codex`,
67
+ `--providers claude-code`, or `--providers opencode` to limit selection;
68
+ `auto` enables every detected provider. Grok Bots have a separate
69
+ [gateway setup](https://github.com/AksharP5/cohall/blob/main/docs/grok-bot.md).
70
+ 3. Run guided setup with the confirmed address:
71
+
72
+ ```bash
73
+ cohall init --relay https://your-relay.example
74
+ ```
75
+
76
+ A terminal prompts for the pairing token without echoing it. Scripts and
77
+ agents without an interactive terminal supply it on stdin or with
78
+ `--token-file`; see the [pairing examples](https://github.com/AksharP5/cohall/blob/main/docs/install.md#pair-a-machine).
79
+ Client-only setup adds `--client-only` and uses a client-only pairing.
80
+ `init` writes configuration and installs the Cohall skill for Codex,
81
+ Claude Code, and OpenCode. It preserves existing settings during repair.
82
+
83
+ 4. For a worker, run `cohall device` in the foreground or install its service
84
+ after a global package installation. `cohall init --service` can install the
85
+ worker service during setup. A client-only installation needs no device
86
+ service. For Grok Bots, use the gateway instructions to verify availability.
87
+ 5. Use the CLI and installed skill in a harness that can run commands. If the
88
+ owner prefers MCP, run `cohall integrations` and follow the entry for the
89
+ actual harness in [agent integrations](https://github.com/AksharP5/cohall/blob/main/docs/integrations.md). Configure exactly
90
+ one Cohall server for that configuration, restart or reconnect the harness,
91
+ and ask it to call `list_devices`. Installing a skill does not configure MCP.
92
+
93
+ ## Verify before calling setup complete
94
+
95
+ 1. Run `cohall doctor`. Confirm relay access and client authentication. A worker
96
+ should be online or busy with the intended providers and workspaces.
97
+ `doctor --all` checks the other registered workers.
98
+ 2. If using MCP, check the real host connection in the doctor report after
99
+ asking the harness to call `list_devices`. A successful server self-test
100
+ alone does not establish that the harness loaded it.
101
+ 3. From the requesting client, run a harmless delegation to the intended
102
+ worker, using its target from `cohall devices` and an advertised provider:
103
+
104
+ ```bash
105
+ cohall delegate --target @workstation --provider codex --timeout 60 \
106
+ "Reply with exactly cohall-ready. Do not inspect or change files."
107
+ ```
108
+
109
+ Require a completed result containing `cohall-ready`. Provider detection
110
+ alone does not prove authentication or execution works. For a Grok Bot,
111
+ use its target from `cohall bots` and `--provider grok-bot`.
112
+
113
+ 4. Report the relay host/address, this machine's role, selected providers and
114
+ workspaces, autostart state, integration used, and checks that passed.
115
+ Identify any remaining login, permission, or connectivity step. Include no
116
+ tokens or private task content.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akshar5/cohall",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "Let coding agents delegate work across your own devices.",
5
5
  "keywords": [
6
6
  "agents",