@akshar5/cohall 0.6.1 → 0.6.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 +17 -0
- package/README.md +25 -4
- package/bin/cohall.js +205 -81
- package/bin/cohall.js.map +10 -10
- package/deploy/windows/install-device.ps1 +21 -2
- package/docs/install.md +1 -1
- package/docs/services.md +17 -4
- package/package.json +5 -3
|
@@ -1,7 +1,25 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[Parameter(Mandatory = $true)][string]$NodeExecutable,
|
|
3
|
+
[Parameter(Mandatory = $true)][string]$Entrypoint,
|
|
4
|
+
[Parameter(Mandatory = $true)][string]$ConfigurationPath
|
|
5
|
+
)
|
|
6
|
+
|
|
1
7
|
$ErrorActionPreference = "Stop"
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
9
|
+
function Quote-Literal([string]$Value) {
|
|
10
|
+
return "'" + $Value.Replace("'", "''") + "'"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
$bootstrap = @"
|
|
14
|
+
`$ErrorActionPreference = 'Stop'
|
|
15
|
+
`$env:COHALL_CONFIG = $(Quote-Literal $ConfigurationPath)
|
|
16
|
+
`$env:PATH = $(Quote-Literal (Split-Path -Parent $NodeExecutable)) + ';' + `$env:PATH
|
|
17
|
+
& $(Quote-Literal $NodeExecutable) $(Quote-Literal $Entrypoint) device
|
|
18
|
+
exit `$LASTEXITCODE
|
|
19
|
+
"@
|
|
20
|
+
$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($bootstrap))
|
|
21
|
+
$powerShell = [Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
|
|
22
|
+
$action = New-ScheduledTaskAction -Execute $powerShell -Argument "-NoLogo -NoProfile -NonInteractive -EncodedCommand $encoded"
|
|
5
23
|
$trigger = New-ScheduledTaskTrigger -AtLogOn -User $env:USERNAME
|
|
6
24
|
$settings = New-ScheduledTaskSettingsSet `
|
|
7
25
|
-ExecutionTimeLimit (New-TimeSpan -Days 3650) `
|
|
@@ -17,5 +35,6 @@ Register-ScheduledTask `
|
|
|
17
35
|
-Settings $settings `
|
|
18
36
|
-Force | Out-Null
|
|
19
37
|
|
|
38
|
+
Stop-ScheduledTask -TaskName "Cohall Device" -ErrorAction SilentlyContinue
|
|
20
39
|
Start-ScheduledTask -TaskName "Cohall Device"
|
|
21
40
|
Write-Output "Cohall Device scheduled task installed."
|
package/docs/install.md
CHANGED
|
@@ -92,7 +92,7 @@ values are prompted with useful defaults. Re-running `cohall init` repairs the
|
|
|
92
92
|
skill installation and reuses credentials when the selected relay has not
|
|
93
93
|
changed. `cohall join` remains the non-guided configuration primitive.
|
|
94
94
|
|
|
95
|
-
Workspace roots must
|
|
95
|
+
Workspace roots must be existing directories. Cohall resolves them to canonical paths and
|
|
96
96
|
rejects delegated work outside them.
|
|
97
97
|
|
|
98
98
|
For a client that submits work but never runs a device worker:
|
package/docs/services.md
CHANGED
|
@@ -33,8 +33,16 @@ cohall service install
|
|
|
33
33
|
journalctl --user -u cohall-device -f
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
The generated service uses the exact executable
|
|
37
|
-
|
|
36
|
+
The generated service uses the exact Cohall executable and puts the current
|
|
37
|
+
Node.js directory first on `PATH`. It records the resolved configuration file,
|
|
38
|
+
including `COHALL_CONFIG` or `XDG_CONFIG_HOME` overrides. Reinstall the service
|
|
39
|
+
after moving that file or replacing a Node.js installation at a different path.
|
|
40
|
+
Reinstalling restarts an existing worker to apply the changes.
|
|
41
|
+
|
|
42
|
+
Other environment overrides are not copied from your shell. Save device settings
|
|
43
|
+
with `cohall configure`, or set them explicitly in the service environment.
|
|
44
|
+
|
|
45
|
+
Linger is optional. Without it, the user service starts after login and stops with the
|
|
38
46
|
user's service manager. With it, the service starts at boot and remains after
|
|
39
47
|
logout:
|
|
40
48
|
|
|
@@ -172,7 +180,9 @@ cohall service install
|
|
|
172
180
|
|
|
173
181
|
The generated LaunchAgent uses `RunAtLoad` and `KeepAlive`: it starts at login,
|
|
174
182
|
restarts after failure, and reconnects when the network returns. It cannot run
|
|
175
|
-
before that user logs in.
|
|
183
|
+
before that user logs in. As on Linux, it records the current Node.js directory
|
|
184
|
+
and configuration file, so custom Node installations and `COHALL_CONFIG` work
|
|
185
|
+
after login. Reinstall it when either path changes. Check it with:
|
|
176
186
|
|
|
177
187
|
```bash
|
|
178
188
|
launchctl print gui/"$(id -u)"/com.cohall.device
|
|
@@ -191,7 +201,10 @@ cohall service install
|
|
|
191
201
|
```
|
|
192
202
|
|
|
193
203
|
The script registers a per-user scheduled task that starts `cohall device` at
|
|
194
|
-
logon and restarts it after failures.
|
|
204
|
+
logon and restarts it after failures. The task uses PowerShell to set the selected
|
|
205
|
+
configuration file and start the exact Node.js and Cohall executables, without
|
|
206
|
+
depending on a `cohall.cmd` or `cohall.ps1` shim. Reinstall the task if these paths
|
|
207
|
+
change. It does not run before that user logs on.
|
|
195
208
|
|
|
196
209
|
## Upgrade running services
|
|
197
210
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akshar5/cohall",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Let coding agents delegate work across your own devices.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
62
62
|
"effect": "4.0.0-beta.102",
|
|
63
|
+
"execa": "^10.0.1",
|
|
63
64
|
"ws": "^8.21.3",
|
|
64
65
|
"zod": "^4.4.3"
|
|
65
66
|
},
|
|
@@ -72,8 +73,9 @@
|
|
|
72
73
|
"vitest": "^4.1.10"
|
|
73
74
|
},
|
|
74
75
|
"overrides": {
|
|
75
|
-
"fast-uri": "^3.1.
|
|
76
|
-
"hono": "^4.
|
|
76
|
+
"fast-uri": "^3.1.6",
|
|
77
|
+
"hono": "^4.13.9",
|
|
78
|
+
"qs": "^6.16.0"
|
|
77
79
|
},
|
|
78
80
|
"engines": {
|
|
79
81
|
"node": ">=24"
|