@akshar5/cohall 0.12.7 → 0.12.8
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 +7 -0
- package/README.md +6 -0
- package/bin/{chunk-d2sykjmx.js → chunk-0nnvgtgx.js} +2 -2
- package/bin/{chunk-61m7z93m.js → chunk-22xds47a.js} +1 -1
- package/bin/{chunk-akct7v1q.js → chunk-c5qv9pg0.js} +4 -4
- package/bin/{chunk-39by7csf.js → chunk-cgw59n50.js} +4 -4
- package/bin/{chunk-89ga9j8t.js → chunk-cy2pk1yf.js} +1 -1
- package/bin/{chunk-27xa296w.js → chunk-j574tp6f.js} +1 -1
- package/bin/{chunk-zxrjgp9k.js → chunk-mqvp2676.js} +1 -1
- package/bin/{chunk-7dgeftrk.js → chunk-rsctgzxj.js} +2 -2
- package/bin/{chunk-7dgeftrk.js.map → chunk-rsctgzxj.js.map} +1 -1
- package/bin/{chunk-90k4bw6t.js → chunk-vkxze339.js} +35 -10
- package/bin/chunk-vkxze339.js.map +14 -0
- package/bin/{chunk-7ss2d5n4.js → chunk-wr5f7saj.js} +2 -2
- package/bin/cohall.js +7 -7
- package/docs/install.md +6 -0
- package/docs/muse.md +13 -9
- package/package.json +1 -1
- package/bin/chunk-90k4bw6t.js.map +0 -14
- /package/bin/{chunk-d2sykjmx.js.map → chunk-0nnvgtgx.js.map} +0 -0
- /package/bin/{chunk-61m7z93m.js.map → chunk-22xds47a.js.map} +0 -0
- /package/bin/{chunk-akct7v1q.js.map → chunk-c5qv9pg0.js.map} +0 -0
- /package/bin/{chunk-39by7csf.js.map → chunk-cgw59n50.js.map} +0 -0
- /package/bin/{chunk-89ga9j8t.js.map → chunk-cy2pk1yf.js.map} +0 -0
- /package/bin/{chunk-27xa296w.js.map → chunk-j574tp6f.js.map} +0 -0
- /package/bin/{chunk-zxrjgp9k.js.map → chunk-mqvp2676.js.map} +0 -0
- /package/bin/{chunk-7ss2d5n4.js.map → chunk-wr5f7saj.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.8](https://github.com/AksharP5/cohall/compare/v0.12.7...v0.12.8) (2026-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **auth:** keep active devices paired automatically ([#242](https://github.com/AksharP5/cohall/issues/242)) ([9811828](https://github.com/AksharP5/cohall/commit/98118285728a05cb6bac8bca5e97ec99631f20ce))
|
|
9
|
+
|
|
3
10
|
## [0.12.7](https://github.com/AksharP5/cohall/compare/v0.12.6...v0.12.7) (2026-10-25)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -143,6 +143,12 @@ worker again to enable source attribution and that routing preference. Forgettin
|
|
|
143
143
|
a device revokes both associated credentials. Client-only pairings have no worker
|
|
144
144
|
identity.
|
|
145
145
|
|
|
146
|
+
Credentials expire after 90 days of inactivity. Successful client authentication
|
|
147
|
+
and valid worker heartbeats renew their respective credentials automatically,
|
|
148
|
+
without changing device identities or completion inboxes. Unused credentials
|
|
149
|
+
still expire, and expired or revoked credentials cannot renew themselves.
|
|
150
|
+
Upgrade the relay to enable renewal for existing credentials before they expire.
|
|
151
|
+
|
|
146
152
|
### 3. Keep the device available
|
|
147
153
|
|
|
148
154
|
```bash
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-b3ba95j4.js";
|
|
11
11
|
import {
|
|
12
12
|
prepareTaskFiles
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-mqvp2676.js";
|
|
14
14
|
import"./chunk-p493vm5f.js";
|
|
15
15
|
import"./chunk-g6b3zmtw.js";
|
|
16
16
|
import {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-04a27ybz.js";
|
|
24
24
|
import {
|
|
25
25
|
version
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-rsctgzxj.js";
|
|
27
27
|
|
|
28
28
|
// apps/device/src/daemon.ts
|
|
29
29
|
import { Effect, Schedule, Schema } from "effect";
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
taskResult,
|
|
20
20
|
threadContext,
|
|
21
21
|
waitForTask
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-22xds47a.js";
|
|
23
23
|
import {
|
|
24
24
|
RelayDecodeError,
|
|
25
25
|
RelayRequestError,
|
|
26
26
|
exchangePairing,
|
|
27
27
|
exports_src,
|
|
28
28
|
readInputAttachments
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-mqvp2676.js";
|
|
30
30
|
import {
|
|
31
31
|
readBoundedFile
|
|
32
32
|
} from "./chunk-p493vm5f.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
import {
|
|
71
71
|
__require,
|
|
72
72
|
version
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-rsctgzxj.js";
|
|
74
74
|
|
|
75
75
|
// apps/device/src/cli.ts
|
|
76
76
|
import { Effect as Effect4, Schema as Schema3 } from "effect";
|
|
@@ -1816,7 +1816,7 @@ var runCli = async (command, raw) => {
|
|
|
1816
1816
|
print(allDeviceHealth(await Effect4.runPromise(relay2.devices()), version));
|
|
1817
1817
|
return;
|
|
1818
1818
|
}
|
|
1819
|
-
const { checkMcp, readMcpHostDiagnostics } = await import("./chunk-
|
|
1819
|
+
const { checkMcp, readMcpHostDiagnostics } = await import("./chunk-wr5f7saj.js");
|
|
1820
1820
|
const configuration2 = await readStoredConfiguration();
|
|
1821
1821
|
const relayUrl = normalizeRelayUrl(process.env.COHALL_RELAY_URL ?? configuration2?.relayUrl ?? "http://127.0.0.1:8787");
|
|
1822
1822
|
const storedCredentials = credentialsForRelay(configuration2, relayUrl);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMcpHostDiagnostics
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-cy2pk1yf.js";
|
|
4
4
|
import {
|
|
5
5
|
acknowledgedTaskResult,
|
|
6
6
|
createDelegation,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
taskResult,
|
|
10
10
|
threadContext,
|
|
11
11
|
waitForTask
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-22xds47a.js";
|
|
13
13
|
import {
|
|
14
14
|
exports_src,
|
|
15
15
|
readInputAttachments
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-mqvp2676.js";
|
|
17
17
|
import"./chunk-p493vm5f.js";
|
|
18
18
|
import"./chunk-g6b3zmtw.js";
|
|
19
19
|
import {
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-04a27ybz.js";
|
|
34
34
|
import {
|
|
35
35
|
version
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-rsctgzxj.js";
|
|
37
37
|
|
|
38
38
|
// apps/device/src/mcp.ts
|
|
39
39
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-04a27ybz.js";
|
|
11
11
|
import {
|
|
12
12
|
version
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-rsctgzxj.js";
|
|
14
14
|
|
|
15
15
|
// apps/device/src/mcp-host-diagnostics.ts
|
|
16
16
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -16,8 +16,8 @@ var __export = (target, all) => {
|
|
|
16
16
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
17
17
|
|
|
18
18
|
// packages/protocol/src/version.ts
|
|
19
|
-
var version = "0.12.
|
|
19
|
+
var version = "0.12.8";
|
|
20
20
|
|
|
21
21
|
export { __export, __require, version };
|
|
22
22
|
|
|
23
|
-
//# debugId=
|
|
23
|
+
//# debugId=624BB11C0459807D64756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"declare const __COHALL_VERSION__: string\nexport const version =\n typeof __COHALL_VERSION__ === \"undefined\" ? \"0.0.0-development\" : __COHALL_VERSION__\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";;;;;;;;;;;;;;;;;;AACO,IAAM,UACuD;",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "624BB11C0459807D64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
import {
|
|
66
66
|
__export,
|
|
67
67
|
version
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-rsctgzxj.js";
|
|
69
69
|
|
|
70
70
|
// apps/relay/src/main.ts
|
|
71
71
|
import { Effect as Effect3, ManagedRuntime, Schema as Schema3, Schedule } from "effect";
|
|
@@ -199,6 +199,15 @@ class Hub {
|
|
|
199
199
|
boundDeviceId(socket) {
|
|
200
200
|
return this.#principals.get(socket)?.boundDeviceId;
|
|
201
201
|
}
|
|
202
|
+
sessionId(socket) {
|
|
203
|
+
return this.#principals.get(socket)?.sessionId;
|
|
204
|
+
}
|
|
205
|
+
updateSessionExpiry(socket, expiresAt) {
|
|
206
|
+
const principal = this.#principals.get(socket);
|
|
207
|
+
if (principal !== undefined) {
|
|
208
|
+
this.#principals.set(socket, { ...principal, expiresAt });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
202
211
|
registerDevice(deviceId, socket) {
|
|
203
212
|
if (this.#deviceIds.has(socket)) {
|
|
204
213
|
return false;
|
|
@@ -1622,9 +1631,10 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1622
1631
|
});
|
|
1623
1632
|
return PairingCredential.make({ token, expiresAt: Timestamp.make(expiresAt) });
|
|
1624
1633
|
});
|
|
1634
|
+
const sessionLifetimeMs = 90 * 24 * 60 * 60 * 1000;
|
|
1625
1635
|
const exchangePairing = Effect2.fn("RelayStore.exchangePairing")(function* (token) {
|
|
1626
1636
|
const timestamp = now();
|
|
1627
|
-
const expiresAt = new Date(Date.
|
|
1637
|
+
const expiresAt = new Date(Date.parse(timestamp) + sessionLifetimeMs).toISOString();
|
|
1628
1638
|
const created = yield* Effect2.try({
|
|
1629
1639
|
try: () => db.transaction(() => {
|
|
1630
1640
|
const pairing = db.query(`SELECT * FROM auth_pairings
|
|
@@ -1663,6 +1673,17 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1663
1673
|
const credentials = yield* Effect2.forEach(created, ({ token: sessionToken, row }) => authSessionFromRow(row).pipe(Effect2.map((session) => ({ token: sessionToken, session }))));
|
|
1664
1674
|
return PairingResult.make({ credentials });
|
|
1665
1675
|
});
|
|
1676
|
+
const renewAuthSession = Effect2.fn("RelayStore.renewAuthSession")(function* (sessionId) {
|
|
1677
|
+
const timestamp = now();
|
|
1678
|
+
const expiresAt = new Date(Date.parse(timestamp) + sessionLifetimeMs).toISOString();
|
|
1679
|
+
const row = yield* Effect2.try({
|
|
1680
|
+
try: () => db.query(`UPDATE auth_sessions SET last_seen_at = ?, expires_at = ?
|
|
1681
|
+
WHERE id = ? AND revoked_at IS NULL AND expires_at > ?
|
|
1682
|
+
RETURNING *`).get(timestamp, expiresAt, sessionId, timestamp),
|
|
1683
|
+
catch: operationError("RelayStore.renewAuthSession")
|
|
1684
|
+
});
|
|
1685
|
+
return row === null ? undefined : yield* authSessionFromRow(row);
|
|
1686
|
+
});
|
|
1666
1687
|
const authenticateSession = Effect2.fn("RelayStore.authenticateSession")(function* (token, role) {
|
|
1667
1688
|
const row = yield* Effect2.try({
|
|
1668
1689
|
try: () => db.query(`SELECT * FROM auth_sessions
|
|
@@ -1672,13 +1693,7 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1672
1693
|
if (row === null || !rolesFromRow(row).includes(role)) {
|
|
1673
1694
|
return;
|
|
1674
1695
|
}
|
|
1675
|
-
|
|
1676
|
-
yield* Effect2.try({
|
|
1677
|
-
try: () => db.query("UPDATE auth_sessions SET last_seen_at = ? WHERE id = ?").run(lastSeenAt, row.id),
|
|
1678
|
-
catch: operationError("RelayStore.authenticateSession.touch")
|
|
1679
|
-
});
|
|
1680
|
-
const session = yield* authSessionFromRow(row);
|
|
1681
|
-
return AuthSession.make({ ...session, lastSeenAt });
|
|
1696
|
+
return yield* renewAuthSession(AuthSessionId.make(row.id));
|
|
1682
1697
|
});
|
|
1683
1698
|
const listAuthSessions = Effect2.fn("RelayStore.listAuthSessions")(function* () {
|
|
1684
1699
|
const rows = yield* Effect2.try({
|
|
@@ -1764,6 +1779,7 @@ var makeService = (db, retainedTerminalTasks = 1000) => {
|
|
|
1764
1779
|
createPairing,
|
|
1765
1780
|
exchangePairing,
|
|
1766
1781
|
authenticateSession,
|
|
1782
|
+
renewAuthSession,
|
|
1767
1783
|
listAuthSessions,
|
|
1768
1784
|
revokeAuthSession
|
|
1769
1785
|
});
|
|
@@ -2368,6 +2384,15 @@ var runRelay = async () => {
|
|
|
2368
2384
|
switch (event._tag) {
|
|
2369
2385
|
case "DeviceHeartbeat":
|
|
2370
2386
|
if (event.deviceId === deviceId) {
|
|
2387
|
+
const sessionId = hub.sessionId(socket);
|
|
2388
|
+
if (sessionId !== undefined) {
|
|
2389
|
+
const session = yield* store.renewAuthSession(sessionId);
|
|
2390
|
+
if (session === undefined) {
|
|
2391
|
+
socket.close(4003, "Session expired or revoked");
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2394
|
+
hub.updateSessionExpiry(socket, session.expiresAt);
|
|
2395
|
+
}
|
|
2371
2396
|
yield* store.heartbeat(deviceId, event.status === "busy" ? "busy" : "online", event.bots);
|
|
2372
2397
|
}
|
|
2373
2398
|
return;
|
|
@@ -2798,4 +2823,4 @@ export {
|
|
|
2798
2823
|
canDispatchTaskToDevice
|
|
2799
2824
|
};
|
|
2800
2825
|
|
|
2801
|
-
//# debugId=
|
|
2826
|
+
//# debugId=733B03E4713AC74F64756E2164756E21
|