@lightupai/polaris 0.0.100 → 0.0.101
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/package.json +1 -1
- package/src/client/client.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightupai/polaris",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.101",
|
|
4
4
|
"description": "Record and stream Claude Code sessions to Slack. Like Gong for AI coding — capture every prompt, response, and tool call. Multiplayer collaboration across AI coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
package/src/client/client.ts
CHANGED
|
@@ -47,14 +47,18 @@ async function daemonGet(path: string): Promise<Response> {
|
|
|
47
47
|
// --- Session state persistence ---
|
|
48
48
|
|
|
49
49
|
function sessionStatePath(): string {
|
|
50
|
-
|
|
50
|
+
// Keyed by CC session ID so two Claude Code sessions in the same directory
|
|
51
|
+
// get independent state files and never auto-reconnect into each other's
|
|
52
|
+
// project. Previously keyed by cwd hash, which caused unrelated sessions to
|
|
53
|
+
// silently inherit another session's project connection (#154, #153).
|
|
54
|
+
const hash = createHash("sha256").update(CC_SESSION_ID).digest("hex").slice(0, 16);
|
|
51
55
|
return `${homedir()}/.polaris/sessions/${hash}.json`;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
async function saveSessionState(project: string, session: string, user: string, profile: string): Promise<void> {
|
|
55
59
|
try {
|
|
56
60
|
await mkdir(`${homedir()}/.polaris/sessions`, { recursive: true });
|
|
57
|
-
await writeFile(sessionStatePath(), JSON.stringify({ project, session, user, profile, cwd: process.cwd() }));
|
|
61
|
+
await writeFile(sessionStatePath(), JSON.stringify({ project, session, user, profile, cwd: process.cwd(), ccSessionId: CC_SESSION_ID }));
|
|
58
62
|
} catch { /* best-effort */ }
|
|
59
63
|
}
|
|
60
64
|
|