@lightupai/polaris 0.0.13 → 0.0.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/README.md CHANGED
@@ -118,6 +118,7 @@ tests/ Test suite (bun test)
118
118
  - [ ] Daemon local buffer — write-ahead log for fault tolerance. If the API is slow or down, the daemon should persist events locally and flush them asynchronously with retry/backoff, so hooks and MCP tools never block or lose data
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
+ - [ ] 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
121
122
 
122
123
  ## Development
123
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightupai/polaris",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "polaris": "bin/polaris"
@@ -39,7 +39,7 @@ export function formatEventForSlack(event: PolarisEvent): SlackMessage | null {
39
39
  case "Stop": {
40
40
  const response = payload.stop_response || payload.last_assistant_message;
41
41
  if (!response) return null;
42
- return formatAgentResponse(event.session, response);
42
+ return formatAgentResponse(event.sender, event.session, response);
43
43
  }
44
44
  case "PreToolUse":
45
45
  case "PostToolUse":
@@ -83,13 +83,13 @@ function formatUserPrompt(sender: string, session: string, prompt: string): Slac
83
83
 
84
84
  // --- Agent response ---
85
85
 
86
- function formatAgentResponse(session: string, response: string): SlackMessage | null {
86
+ function formatAgentResponse(sender: string, session: string, response: string): SlackMessage | null {
87
87
  if (!response) return null;
88
88
  return {
89
89
  text: toMrkdwn(response),
90
90
  blocks: [{ type: "section", text: { type: "mrkdwn", text: toMrkdwn(response) } }],
91
- username: `Agent (${session})`,
92
- icon_emoji: ":robot_face:",
91
+ username: `${displayName(sender)} (${session})`,
92
+ icon_emoji: personaIcon(sender),
93
93
  };
94
94
  }
95
95
 
@@ -31,10 +31,11 @@ describe("formatEventForSlack", () => {
31
31
 
32
32
  test("agent response: robot persona with session", () => {
33
33
  const result = formatEventForSlack(makeEvent({
34
+ sender: "agent:claude",
34
35
  payload: { hook_event_name: "Stop", session_id: "s1", stop_response: "Created auth.ts" },
35
36
  }));
36
37
  expect(result).not.toBeNull();
37
- expect(result!.username).toBe("Agent (fxm)");
38
+ expect(result!.username).toBe("Agent: Claude (fxm)");
38
39
  expect(result!.icon_emoji).toBe(":robot_face:");
39
40
  expect(result!.text).toContain("Created auth.ts");
40
41
  });