@hasna/conversations 0.2.42 → 0.2.44

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.
@@ -9,7 +9,7 @@ export declare function markRead(ids: number[], reader: string): number;
9
9
  export declare function markSessionRead(sessionId: string, reader: string): number;
10
10
  export declare function markSpaceRead(spaceName: string, reader: string): number;
11
11
  export declare function getMessageById(id: number): Message | null;
12
- export declare function markReadByIds(ids: number[]): number;
12
+ export declare function markReadByIds(ids: number[], agent?: string): number;
13
13
  export declare function markAllRead(agent: string): number;
14
14
  export interface DigestMessage {
15
15
  id: number;
@@ -1,10 +1,11 @@
1
1
  import type { AgentPresence, AgentConflictError, RegisterAgentResult } from "../types.js";
2
2
  export declare function isAgentConflict(result: RegisterAgentResult | AgentConflictError): result is AgentConflictError;
3
3
  export declare function registerAgent(name: string, sessionId: string, role?: string, projectId?: string): RegisterAgentResult | AgentConflictError;
4
- export declare function heartbeat(agent: string, status?: string, metadata?: Record<string, unknown>, sessionId?: string): void;
4
+ export declare function heartbeat(agent: string, status?: string, metadata?: Record<string, unknown>, sessionId?: string, projectId?: string | null): void;
5
5
  export declare function getPresence(agent: string): AgentPresence | null;
6
6
  export declare function listAgents(opts?: {
7
7
  online_only?: boolean;
8
8
  }): AgentPresence[];
9
9
  export declare function removePresence(agent: string): boolean;
10
10
  export declare function renameAgent(oldName: string, newName: string): boolean;
11
+ export declare function setPresenceProject(agent: string, projectId: string | null): void;
@@ -7,5 +7,6 @@ export interface WebhookConfig {
7
7
  /**
8
8
  * Fire webhooks for a message. Runs async, never blocks sendMessage.
9
9
  * Matches webhooks by event type and optionally by agent (to_agent).
10
+ * Validates webhook URLs to prevent SSRF (private IP rejection).
10
11
  */
11
12
  export declare function fireWebhooks(msg: Message): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/conversations",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "description": "Real-time CLI messaging for AI agents",
5
5
  "type": "module",
6
6
  "bin": {