@hexis-ai/engram-sdk 0.2.0 → 0.3.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/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ScoredSession, SearchOptions, Session, SessionStep } from "@hexis-ai/engram-core";
2
2
  import { type RefCandidate } from "./extract";
3
- import type { EventBatch, PersonCreate, PersonInfo, PersonMap, PersonUpdate, SessionInit } from "./types";
3
+ import type { EventBatch, PersonCreate, PersonInfo, PersonMap, PersonUpdate, SessionEvent, SessionInit } from "./types";
4
4
  /**
5
5
  * Envelope returned by session endpoints. The persons map is deduped
6
6
  * across whatever sessions the response carries so display info isn't
@@ -102,6 +102,15 @@ export declare class Engram {
102
102
  startSession(init?: SessionInit): Promise<EngramSession>;
103
103
  /** Fetch a single session by id, plus the persons map for its participants/viewers. */
104
104
  getSession(id: string): Promise<SessionEnvelope>;
105
+ /**
106
+ * Fetch the raw, ordered event log for a session. Unlike `getSession`
107
+ * (which folds events into a `Session`), this returns each recorded
108
+ * event with its timestamp — step / participant / title / end — for a
109
+ * timeline view. Throws if the session id is unknown.
110
+ */
111
+ getSessionEvents(id: string): Promise<{
112
+ events: SessionEvent[];
113
+ }>;
105
114
  /** List recent sessions plus the deduped persons map across them. */
106
115
  listSessions(opts?: {
107
116
  limit?: number;
package/dist/client.js CHANGED
@@ -40,6 +40,15 @@ export class Engram {
40
40
  async getSession(id) {
41
41
  return this.request("GET", `/v1/sessions/${encodeURIComponent(id)}`);
42
42
  }
43
+ /**
44
+ * Fetch the raw, ordered event log for a session. Unlike `getSession`
45
+ * (which folds events into a `Session`), this returns each recorded
46
+ * event with its timestamp — step / participant / title / end — for a
47
+ * timeline view. Throws if the session id is unknown.
48
+ */
49
+ async getSessionEvents(id) {
50
+ return this.request("GET", `/v1/sessions/${encodeURIComponent(id)}/events`);
51
+ }
43
52
  /** List recent sessions plus the deduped persons map across them. */
44
53
  async listSessions(opts = {}) {
45
54
  const qs = new URLSearchParams();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexis-ai/engram-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Host SDK for engram. Records agent session steps and ships them to an engram server.",
5
5
  "keywords": [
6
6
  "engram",
@@ -41,7 +41,6 @@
41
41
  ],
42
42
  "scripts": {
43
43
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
44
- "prepack": "bun run build",
45
44
  "pack": "bun run build && bun pm pack",
46
45
  "test": "bun test",
47
46
  "type-check": "tsc --noEmit"