@akshar5/cohall 0.12.13 → 0.12.15
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 +19 -0
- package/README.md +6 -5
- package/bin/{chunk-zwf5dpj9.js → chunk-07aet48k.js} +26 -18
- package/bin/chunk-07aet48k.js.map +14 -0
- package/bin/{chunk-1w61mtsq.js → chunk-0ajk2xqb.js} +4 -4
- package/bin/{chunk-q6dqsm9t.js → chunk-468xtafr.js} +5 -5
- package/bin/{chunk-2y4g3v66.js → chunk-5gvgk5pb.js} +9 -7
- package/bin/{chunk-2y4g3v66.js.map → chunk-5gvgk5pb.js.map} +3 -3
- package/bin/{chunk-fg90k4rs.js → chunk-7yrw7mgj.js} +26 -16
- package/bin/chunk-7yrw7mgj.js.map +15 -0
- package/bin/{chunk-mnz2sma9.js → chunk-9rgw9hk3.js} +3 -3
- package/bin/{chunk-04a27ybz.js → chunk-aj2btss5.js} +2 -5
- package/bin/{chunk-04a27ybz.js.map → chunk-aj2btss5.js.map} +3 -3
- package/bin/{chunk-f9qd4ajk.js → chunk-g4087sz3.js} +2 -2
- package/bin/{chunk-61fzgtwp.js → chunk-kf3vv88y.js} +3 -3
- package/bin/{chunk-g6b3zmtw.js → chunk-m82xx6vz.js} +1 -1
- package/bin/{chunk-ccfjcqrz.js → chunk-mmbenn43.js} +2 -2
- package/bin/{chunk-8zk47d0f.js → chunk-q8a2yv07.js} +8 -8
- package/bin/{chunk-8zk47d0f.js.map → chunk-q8a2yv07.js.map} +3 -3
- package/bin/{chunk-m5ecnn3k.js → chunk-yger1pfj.js} +2 -2
- package/bin/{chunk-m5ecnn3k.js.map → chunk-yger1pfj.js.map} +1 -1
- package/bin/cohall.js +13 -10
- package/bin/cohall.js.map +3 -3
- package/docs/install.md +3 -1
- package/docs/integrations.md +13 -12
- package/docs/onboarding.md +8 -3
- package/package.json +1 -1
- package/bin/chunk-fg90k4rs.js.map +0 -15
- package/bin/chunk-zwf5dpj9.js.map +0 -14
- /package/bin/{chunk-1w61mtsq.js.map → chunk-0ajk2xqb.js.map} +0 -0
- /package/bin/{chunk-q6dqsm9t.js.map → chunk-468xtafr.js.map} +0 -0
- /package/bin/{chunk-mnz2sma9.js.map → chunk-9rgw9hk3.js.map} +0 -0
- /package/bin/{chunk-f9qd4ajk.js.map → chunk-g4087sz3.js.map} +0 -0
- /package/bin/{chunk-61fzgtwp.js.map → chunk-kf3vv88y.js.map} +0 -0
- /package/bin/{chunk-g6b3zmtw.js.map → chunk-m82xx6vz.js.map} +0 -0
- /package/bin/{chunk-ccfjcqrz.js.map → chunk-mmbenn43.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.15](https://github.com/AksharP5/cohall/compare/v0.12.14...v0.12.15) (2026-11-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **cli:** reject repeated task workspace flags ([#314](https://github.com/AksharP5/cohall/issues/314)) ([25d9ee0](https://github.com/AksharP5/cohall/commit/25d9ee0ccc64ad85dc20acd1fe73f3440464299c))
|
|
9
|
+
* **providers:** keep recovered results within the byte limit ([#315](https://github.com/AksharP5/cohall/issues/315)) ([6a5dad0](https://github.com/AksharP5/cohall/commit/6a5dad036e0a71aef6a923f97666a980a392f0fd))
|
|
10
|
+
* **relay:** settle undispatched clarification turns offline ([#313](https://github.com/AksharP5/cohall/issues/313)) ([9cc59d8](https://github.com/AksharP5/cohall/commit/9cc59d880426ed9286c007c0ccaa0a98fcccf0d7))
|
|
11
|
+
|
|
12
|
+
## [0.12.14](https://github.com/AksharP5/cohall/compare/v0.12.13...v0.12.14) (2026-11-10)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **cli:** show client-only, name, and token-file setup options in help ([#306](https://github.com/AksharP5/cohall/issues/306)) ([b8e43f4](https://github.com/AksharP5/cohall/commit/b8e43f42db648ce50e3d90fbee1fb11f95d3ed2c))
|
|
18
|
+
* **relay:** keep thread follow-ups on the thread's provider ([#309](https://github.com/AksharP5/cohall/issues/309)) ([31d9229](https://github.com/AksharP5/cohall/commit/31d922967af51d85e71aa7c7bad2997a331b8910))
|
|
19
|
+
* **relay:** spread back-to-back untargeted tasks across idle devices ([#304](https://github.com/AksharP5/cohall/issues/304)) ([cca2289](https://github.com/AksharP5/cohall/commit/cca2289003197c6ca650778b145274dd7a6911cf))
|
|
20
|
+
* **setup:** require a workspace when setting up a device without a terminal ([#302](https://github.com/AksharP5/cohall/issues/302)) ([2af7fef](https://github.com/AksharP5/cohall/commit/2af7fefd62d7d906aa50e27730618c55472291d3))
|
|
21
|
+
|
|
3
22
|
## [0.12.13](https://github.com/AksharP5/cohall/compare/v0.12.12...v0.12.13) (2026-11-10)
|
|
4
23
|
|
|
5
24
|
|
package/README.md
CHANGED
|
@@ -303,14 +303,15 @@ rejected before any work is sent, including with `--no-wait`.
|
|
|
303
303
|
To stop coding work at a fixed time, pass `--deadline <UTC-ISO-timestamp>` to
|
|
304
304
|
`delegate`, or `deadline` to the MCP tool. The future deadline is saved on the
|
|
305
305
|
task and stays unchanged through retries and clarification. Expired tasks fail
|
|
306
|
-
with `Task deadline exceeded`.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
306
|
+
with `Task deadline exceeded`. Undispatched turns fail on the relay. Tasks that
|
|
307
|
+
may have reached a worker stay `cancelling` until it confirms termination,
|
|
308
|
+
including after a disconnect. Upgrade the requester, relay, and worker before
|
|
309
|
+
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.
|
|
313
|
+
session. A follow-up uses the provider of the thread's latest turn unless you
|
|
314
|
+
pass `--provider`. Without `--target`, it also prefers that turn's device. If it is offline,
|
|
314
315
|
Cohall rejects the follow-up instead of starting over on another device; pass
|
|
315
316
|
`--target` to queue it for that device or to start a new session on another.
|
|
316
317
|
Queued follow-ups pick up the preceding turn's session when they start,
|
|
@@ -61,11 +61,11 @@ import {
|
|
|
61
61
|
taskDeadlineError,
|
|
62
62
|
taskDeadlinePassed,
|
|
63
63
|
taskSlot
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-aj2btss5.js";
|
|
65
65
|
import {
|
|
66
66
|
__export,
|
|
67
67
|
version
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-yger1pfj.js";
|
|
69
69
|
|
|
70
70
|
// apps/relay/src/main.ts
|
|
71
71
|
import { Effect as Effect3, ManagedRuntime, Schema as Schema3, Schedule } from "effect";
|
|
@@ -1273,10 +1273,11 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1273
1273
|
try: () => db.query("SELECT 1 FROM tasks WHERE id = ? AND dispatched_at IS NOT NULL").get(taskId) !== null,
|
|
1274
1274
|
catch: operationError("RelayStore.hasDispatchEvidence")
|
|
1275
1275
|
}));
|
|
1276
|
+
const isUndispatchedTurn = (task, dispatched) => task.status === "queued" && !dispatched && (task.provider === "grok-bot" || task.clarifications?.at(-1)?.answer !== undefined || task.runId === undefined && task.startedAt === undefined);
|
|
1276
1277
|
const expireTask = Effect2.fn("RelayStore.expireTask")(function* (task) {
|
|
1277
1278
|
if (!taskDeadlinePassed(task) || ["cancelling", "completed", "failed", "cancelled"].includes(task.status))
|
|
1278
1279
|
return task;
|
|
1279
|
-
const neverDispatched = task.status === "queued" && task
|
|
1280
|
+
const neverDispatched = task.status === "queued" && isUndispatchedTurn(task, yield* hasDispatchEvidence(task.id));
|
|
1280
1281
|
return yield* transition(task.id, [task.status], {
|
|
1281
1282
|
status: neverDispatched ? "failed" : "cancelling",
|
|
1282
1283
|
error: taskDeadlineError,
|
|
@@ -1584,7 +1585,7 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1584
1585
|
return current;
|
|
1585
1586
|
}
|
|
1586
1587
|
const timestamp = now();
|
|
1587
|
-
const neverDispatched = current
|
|
1588
|
+
const neverDispatched = isUndispatchedTurn(current, dispatched);
|
|
1588
1589
|
return neverDispatched || current.status === "needs_input" && current.provider === "grok-bot" ? yield* transition(taskId, ["queued", "needs_input"], { status: "cancelled", completedAt: timestamp }, { kind: "cancelled", detail: "Client cancelled the task before dispatch" }) : yield* transition(taskId, ["queued", "assigned", "running", "needs_input"], {
|
|
1589
1590
|
status: "cancelling"
|
|
1590
1591
|
}, { kind: "cancelling", detail: "Client requested task cancellation" });
|
|
@@ -1626,14 +1627,19 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1626
1627
|
});
|
|
1627
1628
|
return row?.session_id;
|
|
1628
1629
|
});
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1631
|
-
try: () =>
|
|
1630
|
+
const threadTurn = Effect2.fn("RelayStore.threadTurn")(function* (threadId) {
|
|
1631
|
+
return yield* Effect2.try({
|
|
1632
|
+
try: () => {
|
|
1633
|
+
const row = db.query(`SELECT target_device_id, provider FROM tasks
|
|
1632
1634
|
WHERE thread_id = ? AND parent_task_id IS NULL AND provider <> 'grok-bot'
|
|
1633
|
-
ORDER BY created_at DESC, rowid DESC LIMIT 1`).get(threadId)
|
|
1634
|
-
|
|
1635
|
+
ORDER BY created_at DESC, rowid DESC LIMIT 1`).get(threadId);
|
|
1636
|
+
return row === null ? undefined : {
|
|
1637
|
+
deviceId: row.target_device_id,
|
|
1638
|
+
provider: Schema2.decodeUnknownSync(Provider)(row.provider)
|
|
1639
|
+
};
|
|
1640
|
+
},
|
|
1641
|
+
catch: operationError("RelayStore.threadTurn")
|
|
1635
1642
|
});
|
|
1636
|
-
return row?.target_device_id;
|
|
1637
1643
|
});
|
|
1638
1644
|
const createPairing = Effect2.fn("RelayStore.createPairing")(function* (input) {
|
|
1639
1645
|
const roles = [...new Set(input.roles)];
|
|
@@ -1798,7 +1804,7 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1798
1804
|
failOperation,
|
|
1799
1805
|
requeueOperationsFor,
|
|
1800
1806
|
sessionFor,
|
|
1801
|
-
|
|
1807
|
+
threadTurn,
|
|
1802
1808
|
createPairing,
|
|
1803
1809
|
exchangePairing,
|
|
1804
1810
|
authenticateSession,
|
|
@@ -2069,7 +2075,7 @@ var body = (request, decode2) => Effect3.tryPromise({
|
|
|
2069
2075
|
catch: () => new RequestError({ status: 400, message: "Expected a JSON request body" })
|
|
2070
2076
|
}).pipe(Effect3.flatMap(decode2), Effect3.mapError((cause) => cause instanceof RequestError ? cause : new RequestError({ status: 400, message: String(cause).slice(0, 2048) })));
|
|
2071
2077
|
var pathId = (schema, value) => Schema3.decodeUnknownEffect(schema)(value).pipe(Effect3.mapError(() => new RequestError({ status: 400, message: `Invalid identifier: ${value}` })));
|
|
2072
|
-
var scoreDevice = (device, input, sourceDeviceId, threadDeviceId) => {
|
|
2078
|
+
var scoreDevice = (device, input, sourceDeviceId, threadDeviceId, occupied) => {
|
|
2073
2079
|
const prompt = `${input.prompt} ${input.context ?? ""}`.toLowerCase();
|
|
2074
2080
|
const needsXcode = /\b(xcode|ios|macos|swiftui|app store)\b/.test(prompt);
|
|
2075
2081
|
const needsBrowser = /\b(browser|chrome|youtube|twitter|logged[- ]?in|signed[- ]?in|x\.com)\b/.test(prompt);
|
|
@@ -2079,7 +2085,7 @@ var scoreDevice = (device, input, sourceDeviceId, threadDeviceId) => {
|
|
|
2079
2085
|
const child = paths.relative(path, workspace);
|
|
2080
2086
|
return child !== ".." && !child.startsWith(`..${paths.sep}`) && !paths.isAbsolute(child);
|
|
2081
2087
|
});
|
|
2082
|
-
return (device.status === "
|
|
2088
|
+
return (device.status === "offline" ? 0 : device.status === "busy" || occupied.has(device.id) ? 90 : 100) + (matchesWorkspace ? 80 : 0) + (needsXcode && device.capabilities.some((capability) => capability.id === "xcode") ? 60 : 0) + (needsBrowser && device.capabilities.some((capability) => capability.id === "browser-session") ? 40 : 0) + (threadDeviceId === device.id ? 70 : 0) + (sourceDeviceId === device.id ? -5 : 0);
|
|
2083
2089
|
};
|
|
2084
2090
|
var resolveDelegation = (input, sourceDeviceId) => Effect3.gen(function* () {
|
|
2085
2091
|
const store = yield* exports_store.Service;
|
|
@@ -2113,7 +2119,8 @@ var resolveDelegation = (input, sourceDeviceId) => Effect3.gen(function* () {
|
|
|
2113
2119
|
message: "The parent task has been cancelled"
|
|
2114
2120
|
});
|
|
2115
2121
|
const devices = yield* store.listDevices().pipe(Effect3.mapError((cause) => new RequestError({ status: 500, message: cause.message })));
|
|
2116
|
-
const
|
|
2122
|
+
const threadTurn = parent === undefined && input.threadId !== undefined && input.botId === undefined ? yield* store.threadTurn(input.threadId).pipe(Effect3.mapError((cause) => new RequestError({ status: 500, message: cause.message }))) : undefined;
|
|
2123
|
+
const provider = input.provider ?? (input.botId === undefined ? threadTurn?.provider ?? "codex" : "grok-bot");
|
|
2117
2124
|
if (input.expiresAt !== undefined && provider === "grok-bot")
|
|
2118
2125
|
return yield* new RequestError({
|
|
2119
2126
|
status: 400,
|
|
@@ -2127,7 +2134,7 @@ var resolveDelegation = (input, sourceDeviceId) => Effect3.gen(function* () {
|
|
|
2127
2134
|
message: "The parent task's deadline has passed"
|
|
2128
2135
|
});
|
|
2129
2136
|
const deadlineSource = inheritsDeadline ? " inherited from the parent task" : "";
|
|
2130
|
-
const resolvedInput = parent === undefined ? input : {
|
|
2137
|
+
const resolvedInput = parent === undefined ? { ...input, provider } : {
|
|
2131
2138
|
...input,
|
|
2132
2139
|
threadId: parent.threadId,
|
|
2133
2140
|
...expiresAt === undefined ? {} : { expiresAt }
|
|
@@ -2191,8 +2198,9 @@ var resolveDelegation = (input, sourceDeviceId) => Effect3.gen(function* () {
|
|
|
2191
2198
|
message: `Bot ${input.botId} is advertised by more than one device; select a device`
|
|
2192
2199
|
});
|
|
2193
2200
|
}
|
|
2194
|
-
const threadDeviceId =
|
|
2195
|
-
const
|
|
2201
|
+
const threadDeviceId = threadTurn?.deviceId;
|
|
2202
|
+
const occupied = new Set((yield* store.deviceOverview().pipe(Effect3.mapError((cause) => new RequestError({ status: 500, message: cause.message })))).filter((device) => device.active + device.cancelling > 0).map((device) => device.id));
|
|
2203
|
+
const selected = candidates.filter((device) => !blocked.has(device.id)).sort((left, right) => scoreDevice(right, input, sourceDeviceId, threadDeviceId, occupied) - scoreDevice(left, input, sourceDeviceId, threadDeviceId, occupied))[0];
|
|
2196
2204
|
if (selected === undefined) {
|
|
2197
2205
|
return yield* new RequestError({
|
|
2198
2206
|
status: 409,
|
|
@@ -2875,4 +2883,4 @@ export {
|
|
|
2875
2883
|
canDispatchTaskToDevice
|
|
2876
2884
|
};
|
|
2877
2885
|
|
|
2878
|
-
//# debugId=
|
|
2886
|
+
//# debugId=058A0FC5CEFE288D64756E2164756E21
|