@hivemagnus/hivemem-sdk 1.1.1 → 1.2.0

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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to `@hivemagnus/hivemem-sdk`.
4
4
 
5
+ ## [1.2.0] - 2026-11-12
6
+
7
+ ### Added
8
+
9
+ - `exportAudit({ after, limit })` reads one page of `GET /v1/audit/export` and returns a
10
+ `HiveAuditPage` of `HiveAuditRecord` v1 records. New `HiveAuditRecord` and `HiveAuditPage`
11
+ types.
12
+
5
13
  ## [1.1.1] - 2026-11-12
6
14
 
7
15
  ### Fixed
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ContextPackage } from "./context.js";
2
- import type { ConclusionPage, ConclusionRecord, HiveMemOptions, KnowledgeSourceSyncResponse, MemoryRecord, PeerCardResponse, QueueJobRecord, QueueStatusResponse, SearchResponse, SessionRecord, WebhookEndpoint, WorkspaceCreateOptions, WorkspaceRecord } from "./types.js";
2
+ import type { ConclusionPage, ConclusionRecord, HiveAuditPage, HiveMemOptions, KnowledgeSourceSyncResponse, MemoryRecord, PeerCardResponse, QueueJobRecord, QueueStatusResponse, SearchResponse, SessionRecord, WebhookEndpoint, WorkspaceCreateOptions, WorkspaceRecord } from "./types.js";
3
3
  export declare class HiveMem {
4
4
  readonly baseUrl: string;
5
5
  token?: string;
@@ -23,6 +23,15 @@ export declare class HiveMem {
23
23
  * it unchanged. An archived workspace ID is a 409.
24
24
  */
25
25
  createWorkspace(workspaceId: string, options?: WorkspaceCreateOptions): Promise<WorkspaceRecord>;
26
+ /**
27
+ * One page of the suite audit export (`GET /v1/audit/export`), oldest first. Pass the last
28
+ * non-null `nextCursor` as `after`; `nextCursor` is null only on an empty page (caught up). Requires an administrator
29
+ * or an Oathweave service token with `hivemem:audit:read`.
30
+ */
31
+ exportAudit(options?: {
32
+ after?: string;
33
+ limit?: number;
34
+ }): Promise<HiveAuditPage>;
26
35
  getMemory(memoryId: string, options?: {
27
36
  includeHistory?: boolean;
28
37
  }): Promise<MemoryRecord>;
package/dist/client.js CHANGED
@@ -125,6 +125,14 @@ export class HiveMem {
125
125
  createWorkspace(workspaceId, options = {}) {
126
126
  return this.request("POST", "/v1/workspaces", { body: JSON.stringify({ ...options, workspace_id: workspaceId }) });
127
127
  }
128
+ /**
129
+ * One page of the suite audit export (`GET /v1/audit/export`), oldest first. Pass the last
130
+ * non-null `nextCursor` as `after`; `nextCursor` is null only on an empty page (caught up). Requires an administrator
131
+ * or an Oathweave service token with `hivemem:audit:read`.
132
+ */
133
+ exportAudit(options = {}) {
134
+ return this.request("GET", "/v1/audit/export", {}, { after: options.after, limit: options.limit });
135
+ }
128
136
  getMemory(memoryId, options = {}) {
129
137
  const params = options.includeHistory ? { include_history: true } : {};
130
138
  return this.request("GET", `/v1/memories/${encodeURIComponent(memoryId)}`, {}, params);
package/dist/types.d.ts CHANGED
@@ -200,6 +200,34 @@ export interface ConclusionPage {
200
200
  results: ConclusionRecord[];
201
201
  next_cursor: string | null;
202
202
  }
203
+ /** HiveAuditRecord v1, the suite audit export record. */
204
+ export interface HiveAuditRecord {
205
+ id: string;
206
+ product: "hivemem" | "hiveskills" | "ardentstudio" | "embermend";
207
+ occurredAt: string;
208
+ action: string;
209
+ outcome: "success" | "failure";
210
+ actor: {
211
+ type: "user" | "service" | "agent" | "system";
212
+ id: string;
213
+ issuer?: string;
214
+ displayName?: string;
215
+ };
216
+ target?: {
217
+ type?: string;
218
+ id?: string;
219
+ };
220
+ subject?: {
221
+ actorId?: string;
222
+ agentRef?: string;
223
+ nodeId?: string;
224
+ };
225
+ details: Record<string, string | number | boolean | null>;
226
+ }
227
+ export interface HiveAuditPage {
228
+ data: HiveAuditRecord[];
229
+ nextCursor: string | null;
230
+ }
203
231
  export interface WebhookEndpoint {
204
232
  id: string;
205
233
  owner_agent_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hivemagnus/hivemem-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "TypeScript client for HiveMem, the shared long-term memory service for AI agents",
5
5
  "keywords": [
6
6
  "hivemem",