@lightupai/polaris 0.0.23 → 0.0.25

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/README.md CHANGED
@@ -119,6 +119,7 @@ tests/ Test suite (bun test)
119
119
  - [ ] Reconciliation and recovery — `polaris recover` command that diffs the daemon JSONL log against the DB, backfills missing events, and posts an abridged recovery summary to Slack as a thread reply at the correct timeline position
120
120
  - [ ] CD pipeline for Hetzner — auto-deploy to production on merge to master (SSH + docker compose up), similar to the npm publish job
121
121
  - [ ] Auto-update local skill/hooks — locally installed skill and hook files go stale when the repo changes. `polaris install` fixes it but there's no staleness detection or auto-update mechanism
122
+ - [ ] Slack channel name collision — if a channel name was previously deleted, Slack reserves it. Bridge should handle `name_taken` by trying a prefix/suffix (e.g., `p-project-name`)
122
123
 
123
124
  ## Development
124
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightupai/polaris",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "polaris": "bin/polaris",
@@ -346,18 +346,19 @@ export function startDaemon(port = Number(process.env.POLARIS_DAEMON_PORT ?? 432
346
346
  let mapping = sessions.get(ccSessionId);
347
347
  if (!mapping || !mapping.project) {
348
348
  // CC session_id doesn't match any registered MCP client.
349
- // Try to find a connected session to route to (the MCP client
350
- // generates its own UUID, which differs from CC's session_id).
349
+ // The MCP server uses a different UUID than CC's session_id.
350
+ // Try to find the MCP session that this CC session belongs to.
351
+ // Heuristic: if only one connected session exists, route to it.
352
+ // Otherwise, drop the event — the user needs to /polaris join first.
351
353
  const connectedSessions = Array.from(sessions.values()).filter((m) => m.project);
352
354
  if (connectedSessions.length === 1) {
353
- // Only one active session — route to it and remember the mapping
354
355
  mapping = connectedSessions[0];
355
- sessions.set(ccSessionId, { ...mapping, ccSessionId, slackChannel: undefined });
356
- } else if (connectedSessions.length > 1) {
357
- // Multiple sessions — can't determine which one. Discard.
358
- return json({ status: "ambiguous" });
356
+ // Remember this mapping for future events from this CC session
357
+ sessions.set(ccSessionId, { ...mapping, ccSessionId });
359
358
  } else {
360
- return json({ status: "not_connected" });
359
+ // Multiple or zero sessions — can't determine which one.
360
+ // Drop silently; events will flow once /polaris join maps the session.
361
+ return json({ status: connectedSessions.length > 0 ? "ambiguous" : "not_connected" });
361
362
  }
362
363
  }
363
364