@akshar5/cohall 0.12.12 → 0.12.13
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 +18 -0
- package/README.md +14 -5
- package/bin/{chunk-94dpwj2b.js → chunk-1w61mtsq.js} +2 -2
- package/bin/{chunk-bpnafwbg.js → chunk-2y4g3v66.js} +63 -12
- package/bin/chunk-2y4g3v66.js.map +13 -0
- package/bin/{chunk-vm7gzczr.js → chunk-61fzgtwp.js} +1 -1
- package/bin/{chunk-zkhqkh0y.js → chunk-8zk47d0f.js} +29 -12
- package/bin/chunk-8zk47d0f.js.map +11 -0
- package/bin/{chunk-baep7sfx.js → chunk-ccfjcqrz.js} +1 -1
- package/bin/{chunk-1ekexd73.js → chunk-f9qd4ajk.js} +16 -12
- package/bin/chunk-f9qd4ajk.js.map +10 -0
- package/bin/{chunk-f8qjez08.js → chunk-fg90k4rs.js} +14 -7
- package/bin/{chunk-f8qjez08.js.map → chunk-fg90k4rs.js.map} +4 -4
- package/bin/{chunk-qbcgvhf1.js → chunk-m5ecnn3k.js} +2 -2
- package/bin/{chunk-qbcgvhf1.js.map → chunk-m5ecnn3k.js.map} +1 -1
- package/bin/{chunk-1m1566kp.js → chunk-mnz2sma9.js} +1 -1
- package/bin/{chunk-4trfnawd.js → chunk-q6dqsm9t.js} +5 -5
- package/bin/chunk-q6dqsm9t.js.map +10 -0
- package/bin/{chunk-c78dff66.js → chunk-zwf5dpj9.js} +50 -9
- package/bin/chunk-zwf5dpj9.js.map +14 -0
- package/bin/cohall.js +7 -7
- package/docs/integrations.md +21 -4
- package/docs/services.md +3 -0
- package/package.json +1 -1
- package/bin/chunk-1ekexd73.js.map +0 -10
- package/bin/chunk-4trfnawd.js.map +0 -10
- package/bin/chunk-bpnafwbg.js.map +0 -13
- package/bin/chunk-c78dff66.js.map +0 -14
- package/bin/chunk-zkhqkh0y.js.map +0 -11
- /package/bin/{chunk-94dpwj2b.js.map → chunk-1w61mtsq.js.map} +0 -0
- /package/bin/{chunk-vm7gzczr.js.map → chunk-61fzgtwp.js.map} +0 -0
- /package/bin/{chunk-baep7sfx.js.map → chunk-ccfjcqrz.js.map} +0 -0
- /package/bin/{chunk-1m1566kp.js.map → chunk-mnz2sma9.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.13](https://github.com/AksharP5/cohall/compare/v0.12.12...v0.12.13) (2026-11-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **cli:** keep following traces through relay restarts ([#279](https://github.com/AksharP5/cohall/issues/279)) ([2c2b48c](https://github.com/AksharP5/cohall/commit/2c2b48c36aab293101c8750388c04488e4d8e644))
|
|
9
|
+
* **device:** stop overdue work promptly after the device wakes from sleep ([#286](https://github.com/AksharP5/cohall/issues/286)) ([018a506](https://github.com/AksharP5/cohall/commit/018a506a222981c0b7ca4ea1a09819b6f57726b2))
|
|
10
|
+
* **mcp:** keep OpenCode waiting for delegated work past 60 seconds ([#296](https://github.com/AksharP5/cohall/issues/296)) ([e014f31](https://github.com/AksharP5/cohall/commit/e014f31f4290b5008a7f1fad1a030bd5f5847741))
|
|
11
|
+
* **mcp:** let Codex wait for delegated work past 5 minutes ([#298](https://github.com/AksharP5/cohall/issues/298)) ([c6dfc72](https://github.com/AksharP5/cohall/commit/c6dfc72236e31107254ae0ad93d12157ccbb9caf))
|
|
12
|
+
* **providers:** keep thread follow-ups working after the provider loses its session ([#292](https://github.com/AksharP5/cohall/issues/292)) ([2f78cc4](https://github.com/AksharP5/cohall/commit/2f78cc485c798d89b690713bb8e422b02b573b64))
|
|
13
|
+
* **providers:** run OpenCode in the task workspace when the worker was started from a terminal ([#294](https://github.com/AksharP5/cohall/issues/294)) ([b0f1655](https://github.com/AksharP5/cohall/commit/b0f1655e41cef99355ee49a3024f4d4e3c028e7d))
|
|
14
|
+
* **providers:** stop OpenCode follow-ups from hanging when the workspace changes ([#300](https://github.com/AksharP5/cohall/issues/300)) ([e725951](https://github.com/AksharP5/cohall/commit/e725951a009fbd4b07f61f9febef310f02eecb30))
|
|
15
|
+
* **relay:** keep delegated child tasks within their parent's deadline ([#277](https://github.com/AksharP5/cohall/issues/277)) ([8f14865](https://github.com/AksharP5/cohall/commit/8f14865195eedae69f46d9052f6e1829c44f44be))
|
|
16
|
+
* **relay:** keep relay backups to the three documented files ([#281](https://github.com/AksharP5/cohall/issues/281)) ([b4396a1](https://github.com/AksharP5/cohall/commit/b4396a1e059423a96bc26383583706283ef82149))
|
|
17
|
+
* **relay:** reject untargeted follow-ups while the thread's device is offline ([#290](https://github.com/AksharP5/cohall/issues/290)) ([79a3514](https://github.com/AksharP5/cohall/commit/79a35143bffe16b2a12e43f3269c84e6b43c4377))
|
|
18
|
+
* **relay:** route untargeted work to idle devices before busy ones ([#283](https://github.com/AksharP5/cohall/issues/283)) ([422799d](https://github.com/AksharP5/cohall/commit/422799dd7d52c08118f6449f7f75d3b3e361c04b))
|
|
19
|
+
* **relay:** stop delegated child tasks when their parent is cancelled ([#288](https://github.com/AksharP5/cohall/issues/288)) ([06a3b1a](https://github.com/AksharP5/cohall/commit/06a3b1af07a9499ec2bb842f929bb32183a629fc))
|
|
20
|
+
|
|
3
21
|
## [0.12.12](https://github.com/AksharP5/cohall/compare/v0.12.11...v0.12.12) (2026-11-10)
|
|
4
22
|
|
|
5
23
|
|
package/README.md
CHANGED
|
@@ -310,14 +310,23 @@ worker before using deadlines. Named Grok Bots do not support them.
|
|
|
310
310
|
See [task deadlines](docs/integrations.md#task-deadlines) for details.
|
|
311
311
|
|
|
312
312
|
Reuse the returned `thread_id` for follow-ups so the target resumes its provider
|
|
313
|
-
session. Without `--target`, a follow-up prefers that device
|
|
313
|
+
session. Without `--target`, a follow-up prefers that device. If it is offline,
|
|
314
|
+
Cohall rejects the follow-up instead of starting over on another device; pass
|
|
315
|
+
`--target` to queue it for that device or to start a new session on another.
|
|
314
316
|
Queued follow-ups pick up the preceding turn's session when they start,
|
|
315
|
-
including after a worker restart.
|
|
316
|
-
|
|
317
|
-
|
|
317
|
+
including after a worker restart. If the provider no longer has that session,
|
|
318
|
+
for example after its history was cleared, the turn starts a new session and
|
|
319
|
+
its result says that earlier turns were not available. OpenCode resumes a
|
|
320
|
+
session only in the directory where it started, so an OpenCode follow-up in a
|
|
321
|
+
different workspace, or one whose session is no longer among that project's 100
|
|
322
|
+
most recently updated, also starts a new session.
|
|
323
|
+
|
|
324
|
+
Delegated child tasks inherit their parent's thread. Coding children also inherit
|
|
325
|
+
the parent's deadline unless they set an earlier one. Cohall routes them away
|
|
318
326
|
from unfinished ancestors using the same worker slot, and rejects an explicit
|
|
319
327
|
target that would make them wait on an ancestor. A Bot can still delegate to
|
|
320
|
-
Codex or a different Bot on its own computer.
|
|
328
|
+
Codex or a different Bot on its own computer. Cancelling a task also cancels its
|
|
329
|
+
unfinished child tasks; a running Bot child finishes its current turn.
|
|
321
330
|
|
|
322
331
|
## Talk to your Grok Bots
|
|
323
332
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readMcpHostDiagnostics
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-61fzgtwp.js";
|
|
4
4
|
import"./chunk-p493vm5f.js";
|
|
5
5
|
import {
|
|
6
6
|
configurationPath
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import"./chunk-04a27ybz.js";
|
|
9
9
|
import {
|
|
10
10
|
version
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-m5ecnn3k.js";
|
|
12
12
|
|
|
13
13
|
// apps/device/src/mcp-diagnostics.ts
|
|
14
14
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import { Effect, Schema } from "effect";
|
|
19
19
|
import { execa } from "execa";
|
|
20
20
|
import { accessSync, constants, statSync } from "node:fs";
|
|
21
|
-
import { chmod, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
21
|
+
import { chmod, mkdtemp, realpath, rm, writeFile } from "node:fs/promises";
|
|
22
22
|
import { homedir, platform, tmpdir } from "node:os";
|
|
23
23
|
import { delimiter, extname, isAbsolute, join, resolve } from "node:path";
|
|
24
24
|
import { execFile } from "node:child_process";
|
|
@@ -42,6 +42,8 @@ var executables = {
|
|
|
42
42
|
var providerEnvironment = () => ({
|
|
43
43
|
...Object.fromEntries(Object.entries(process.env).filter(([name]) => {
|
|
44
44
|
const key = platform() === "win32" ? name.toUpperCase() : name;
|
|
45
|
+
if (key === "PWD")
|
|
46
|
+
return false;
|
|
45
47
|
return !key.startsWith("COHALL_") || key === "COHALL_CONFIG";
|
|
46
48
|
})),
|
|
47
49
|
...process.env.COHALL_CONFIG === undefined ? {} : { COHALL_CONFIG: resolve(process.env.COHALL_CONFIG) },
|
|
@@ -512,7 +514,7 @@ var terminateProcessTree = async (pid) => {
|
|
|
512
514
|
await waitForProcessGroups(groups, 1000);
|
|
513
515
|
};
|
|
514
516
|
var settlePromise = (promise) => promise.then((value) => ({ _tag: "Success", value }), (error) => ({ _tag: "Failure", error }));
|
|
515
|
-
var
|
|
517
|
+
var runOnce = (options) => Effect.callback((resume, signal) => {
|
|
516
518
|
const running = (async () => {
|
|
517
519
|
const executable = findExecutable(executables[options.provider]);
|
|
518
520
|
if (executable === undefined) {
|
|
@@ -642,6 +644,55 @@ var run = (options) => Effect.callback((resume, signal) => {
|
|
|
642
644
|
return;
|
|
643
645
|
}));
|
|
644
646
|
});
|
|
647
|
+
var missingSession = {
|
|
648
|
+
codex: (message, sessionId) => message.includes(`no rollout found for thread id ${sessionId}`),
|
|
649
|
+
"claude-code": (message, sessionId) => message.includes(`No conversation found with session ID: ${sessionId}`),
|
|
650
|
+
opencode: (message) => message.trimEnd().endsWith("Session not found")
|
|
651
|
+
};
|
|
652
|
+
var openCodeSessionIn = (cwd, sessionId) => Effect.tryPromise({
|
|
653
|
+
try: async (signal) => {
|
|
654
|
+
const executable = findExecutable(executables.opencode);
|
|
655
|
+
if (executable === undefined)
|
|
656
|
+
return true;
|
|
657
|
+
const [directory, { stdout }] = await Promise.all([
|
|
658
|
+
realpath(cwd),
|
|
659
|
+
execa(executable, ["session", "list", "--format", "json"], {
|
|
660
|
+
cwd,
|
|
661
|
+
env: providerEnvironment(),
|
|
662
|
+
extendEnv: false,
|
|
663
|
+
stdin: "ignore",
|
|
664
|
+
cancelSignal: signal
|
|
665
|
+
})
|
|
666
|
+
]);
|
|
667
|
+
const sessions = JSON.parse(stdout || "[]");
|
|
668
|
+
return Array.isArray(sessions) && sessions.some((session) => record(session)?.id === sessionId && record(session)?.directory === directory);
|
|
669
|
+
},
|
|
670
|
+
catch: (cause) => new ProviderRunError({
|
|
671
|
+
provider: "opencode",
|
|
672
|
+
message: (cause instanceof Error ? cause.message : String(cause)).slice(0, 16384)
|
|
673
|
+
})
|
|
674
|
+
});
|
|
675
|
+
var run = (options) => {
|
|
676
|
+
const { sessionId, ...fresh } = options;
|
|
677
|
+
if (sessionId === undefined)
|
|
678
|
+
return runOnce(options);
|
|
679
|
+
const startOver = runOnce({
|
|
680
|
+
...fresh,
|
|
681
|
+
prompt: `Earlier turns of this thread are no longer available on this device. If this task depends on them, say so or request input instead of guessing.
|
|
682
|
+
|
|
683
|
+
${options.prompt}`
|
|
684
|
+
}).pipe(Effect.map((turn) => {
|
|
685
|
+
const notice = `
|
|
686
|
+
|
|
687
|
+
[Started a new ${executables[options.provider]} session: this thread's previous session is not available for this workspace on this device, so this turn did not see earlier turns.]`;
|
|
688
|
+
return {
|
|
689
|
+
...turn,
|
|
690
|
+
result: `${turn.result.slice(0, maxResultBytes - notice.length)}${notice}`
|
|
691
|
+
};
|
|
692
|
+
}));
|
|
693
|
+
const resumable = options.provider === "opencode" ? openCodeSessionIn(options.cwd, sessionId) : Effect.succeed(true);
|
|
694
|
+
return resumable.pipe(Effect.flatMap((resume) => resume ? runOnce(options).pipe(Effect.catchIf((error) => error._tag === "CohallProvider.RunError" && missingSession[options.provider](error.message, sessionId), () => startOver)) : startOver));
|
|
695
|
+
};
|
|
645
696
|
|
|
646
697
|
// apps/device/src/bot-replies.ts
|
|
647
698
|
import { Schema as Schema2 } from "effect";
|
|
@@ -1150,7 +1201,7 @@ import {
|
|
|
1150
1201
|
mkdir as mkdir2,
|
|
1151
1202
|
readFile,
|
|
1152
1203
|
readdir,
|
|
1153
|
-
realpath,
|
|
1204
|
+
realpath as realpath2,
|
|
1154
1205
|
rename,
|
|
1155
1206
|
rm as rm2,
|
|
1156
1207
|
stat,
|
|
@@ -1257,7 +1308,7 @@ var packageInstallation = (canonicalEntrypoint, entrypoint = canonicalEntrypoint
|
|
|
1257
1308
|
return { manager: "npm", prefix, entrypoint };
|
|
1258
1309
|
};
|
|
1259
1310
|
var resolvePackageInstallation = async (entrypoint, options = {}) => {
|
|
1260
|
-
const canonicalEntrypoint = await
|
|
1311
|
+
const canonicalEntrypoint = await realpath2(entrypoint);
|
|
1261
1312
|
const runtimePlatform = options.platform ?? process.platform;
|
|
1262
1313
|
const installation = packageInstallation(canonicalEntrypoint, resolve2(entrypoint), runtimePlatform);
|
|
1263
1314
|
if (installation.manager !== "pnpm") {
|
|
@@ -1265,10 +1316,10 @@ var resolvePackageInstallation = async (entrypoint, options = {}) => {
|
|
|
1265
1316
|
if (installation.manager === "npm" && prefix !== undefined) {
|
|
1266
1317
|
const packageEntry2 = join3(prefix, ...runtimePlatform === "win32" ? [] : ["lib"], "node_modules", packageName, "bin", "cohall.js");
|
|
1267
1318
|
const command = join3(prefix, ...runtimePlatform === "win32" ? [] : ["bin"], "cohall");
|
|
1268
|
-
const globalCommand = runtimePlatform === "win32" ? await readFile(`${command}.cmd`, "utf8").then((shim) => /"%dp0%\\node_modules\\@akshar5\\cohall\\bin\\cohall\.js"\s+%\*/i.test(shim)).catch(() => false) : await
|
|
1319
|
+
const globalCommand = runtimePlatform === "win32" ? await readFile(`${command}.cmd`, "utf8").then((shim) => /"%dp0%\\node_modules\\@akshar5\\cohall\\bin\\cohall\.js"\s+%\*/i.test(shim)).catch(() => false) : await realpath2(command).catch(() => {
|
|
1269
1320
|
return;
|
|
1270
1321
|
}) === canonicalEntrypoint;
|
|
1271
|
-
if (globalCommand && await
|
|
1322
|
+
if (globalCommand && await realpath2(packageEntry2).catch(() => {
|
|
1272
1323
|
return;
|
|
1273
1324
|
}) === canonicalEntrypoint)
|
|
1274
1325
|
return {
|
|
@@ -1284,7 +1335,7 @@ var resolvePackageInstallation = async (entrypoint, options = {}) => {
|
|
|
1284
1335
|
if (bun !== undefined) {
|
|
1285
1336
|
const result2 = await (options.runner ?? defaultRunner).run(bun, ["pm", "ls", "--global"], 1e4);
|
|
1286
1337
|
const root2 = result2.stdout.split(/\r?\n/, 1)[0]?.match(/^(.*?) node_modules \(\d+(?: installed)?\)$/)?.[1];
|
|
1287
|
-
if (result2.exitCode === 0 && root2 !== undefined && isAbsolute2(root2) && await
|
|
1338
|
+
if (result2.exitCode === 0 && root2 !== undefined && isAbsolute2(root2) && await realpath2(join3(root2, "node_modules", packageName, "bin", "cohall.js")).catch(() => {
|
|
1288
1339
|
return;
|
|
1289
1340
|
}) === canonicalEntrypoint)
|
|
1290
1341
|
return {
|
|
@@ -1323,7 +1374,7 @@ var resolvePackageInstallation = async (entrypoint, options = {}) => {
|
|
|
1323
1374
|
...entries.filter((entry) => entry.isSymbolicLink()).map((entry) => packageEntry(join3(globalRoot, entry.name)))
|
|
1324
1375
|
];
|
|
1325
1376
|
for (const candidate of candidates) {
|
|
1326
|
-
if (await
|
|
1377
|
+
if (await realpath2(candidate).catch(() => {
|
|
1327
1378
|
return;
|
|
1328
1379
|
}) === canonicalEntrypoint)
|
|
1329
1380
|
return {
|
|
@@ -1410,7 +1461,7 @@ var isTrustedGroupWritablePath = (options) => {
|
|
|
1410
1461
|
return options.platform === "darwin" && options.uid !== undefined && options.ownerUid === options.uid && options.ownerGid === macosAdminGroup && macosHomebrewRoots.some((root) => containsPath(root, options.canonical) && containsPath(root, options.path));
|
|
1411
1462
|
};
|
|
1412
1463
|
var validateExecutable = async (candidate, preserveSymlink = false) => {
|
|
1413
|
-
const canonical = await
|
|
1464
|
+
const canonical = await realpath2(candidate);
|
|
1414
1465
|
if (operatingSystem() === "win32") {
|
|
1415
1466
|
return preserveSymlink ? resolve2(candidate) : canonical;
|
|
1416
1467
|
}
|
|
@@ -1664,7 +1715,7 @@ ${result.stderr}`);
|
|
|
1664
1715
|
if (serviceEntrypoint === undefined) {
|
|
1665
1716
|
throw new Error(`Could not determine the executable used by active ${service.label}${service.manager === "scheduled-task" ? ". Reinstall the task with cohall service install." : ""}`);
|
|
1666
1717
|
}
|
|
1667
|
-
const canonicalServiceEntrypoint = await
|
|
1718
|
+
const canonicalServiceEntrypoint = await realpath2(serviceEntrypoint).catch((cause) => {
|
|
1668
1719
|
throw new Error(`Could not resolve the executable used by active ${service.label}: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
1669
1720
|
});
|
|
1670
1721
|
if (canonicalServiceEntrypoint === installation.canonicalEntrypoint) {
|
|
@@ -1692,7 +1743,7 @@ var writeReceipt = async (path, value) => {
|
|
|
1692
1743
|
await rename(temporary, path);
|
|
1693
1744
|
};
|
|
1694
1745
|
var installedVersion = async (entrypoint) => {
|
|
1695
|
-
const canonicalEntrypoint = await
|
|
1746
|
+
const canonicalEntrypoint = await realpath2(entrypoint);
|
|
1696
1747
|
const metadata = JSON.parse(await readFile(join3(dirname2(dirname2(canonicalEntrypoint)), "package.json"), "utf8"));
|
|
1697
1748
|
if (typeof metadata !== "object" || metadata === null || !("name" in metadata) || metadata.name !== packageName || !("version" in metadata) || typeof metadata.version !== "string") {
|
|
1698
1749
|
throw new Error(`Could not verify the installed ${packageName} version`);
|
|
@@ -1931,4 +1982,4 @@ var upgrade = async (options) => {
|
|
|
1931
1982
|
|
|
1932
1983
|
export { ProviderRunError, findExecutable, availableProviders, run, writeBotReply, cleanupBotReply, discoverGrokBots, runGrokBot, normalizeUpgradeTarget, deviceVersionWarning, resolvePackageInstallation, pnpmServiceDirectories, trustedExecutable, serviceCandidates, upgrade };
|
|
1933
1984
|
|
|
1934
|
-
//# debugId=
|
|
1985
|
+
//# debugId=892C5F97C04C682464756E2164756E21
|