@hexis-ai/engram-sdk 0.9.0 → 0.10.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
@@ -119,13 +119,29 @@ export declare class Engram {
119
119
  updateSession(id: string, patch: SessionUpdate): Promise<SessionEnvelope>;
120
120
  /**
121
121
  * List recent sessions plus the deduped persons map across them.
122
- * Sorted by `updated_at` desc (most recent activity first); pass
123
- * `status` to filter by lifecycle state.
122
+ * Sorted by `updated_at` desc (most recent activity first).
123
+ *
124
+ * Filters compose with AND:
125
+ * - `channel`: exact channel match
126
+ * - `channel_prefix`: channel starts with this (LIKE `prefix%`).
127
+ * Useful for "any thread under a slack DM": pass
128
+ * `slack_dm:Cxxx/`. Mutually exclusive with `channel`.
129
+ * - `status`: lifecycle state
130
+ * - `has_trigger`: only sessions with a trigger_conversation_id set
131
+ * - `no_summary`: only sessions with no summary
132
+ * - `updated_before`: ISO timestamp — sessions whose `updated_at` is
133
+ * strictly less than this; combine with `status='idle'` +
134
+ * `no_summary=true` to find idle unsummarized conversations older
135
+ * than N minutes.
124
136
  */
125
137
  listSessions(opts?: {
126
138
  limit?: number;
127
139
  channel?: string;
140
+ channel_prefix?: string;
128
141
  status?: "active" | "idle" | "completed";
142
+ has_trigger?: boolean;
143
+ no_summary?: boolean;
144
+ updated_before?: string;
129
145
  }): Promise<SessionListEnvelope>;
130
146
  /** Run a search. */
131
147
  search(req: SearchRequest): Promise<SearchEnvelope>;
package/dist/client.js CHANGED
@@ -59,8 +59,20 @@ export class Engram {
59
59
  }
60
60
  /**
61
61
  * List recent sessions plus the deduped persons map across them.
62
- * Sorted by `updated_at` desc (most recent activity first); pass
63
- * `status` to filter by lifecycle state.
62
+ * Sorted by `updated_at` desc (most recent activity first).
63
+ *
64
+ * Filters compose with AND:
65
+ * - `channel`: exact channel match
66
+ * - `channel_prefix`: channel starts with this (LIKE `prefix%`).
67
+ * Useful for "any thread under a slack DM": pass
68
+ * `slack_dm:Cxxx/`. Mutually exclusive with `channel`.
69
+ * - `status`: lifecycle state
70
+ * - `has_trigger`: only sessions with a trigger_conversation_id set
71
+ * - `no_summary`: only sessions with no summary
72
+ * - `updated_before`: ISO timestamp — sessions whose `updated_at` is
73
+ * strictly less than this; combine with `status='idle'` +
74
+ * `no_summary=true` to find idle unsummarized conversations older
75
+ * than N minutes.
64
76
  */
65
77
  async listSessions(opts = {}) {
66
78
  const qs = new URLSearchParams();
@@ -68,8 +80,16 @@ export class Engram {
68
80
  qs.set("limit", String(opts.limit));
69
81
  if (opts.channel)
70
82
  qs.set("channel", opts.channel);
83
+ if (opts.channel_prefix)
84
+ qs.set("channel_prefix", opts.channel_prefix);
71
85
  if (opts.status)
72
86
  qs.set("status", opts.status);
87
+ if (opts.has_trigger)
88
+ qs.set("has_trigger", "true");
89
+ if (opts.no_summary)
90
+ qs.set("no_summary", "true");
91
+ if (opts.updated_before)
92
+ qs.set("updated_before", opts.updated_before);
73
93
  const tail = qs.toString();
74
94
  return this.request("GET", `/v1/sessions${tail ? `?${tail}` : ""}`);
75
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexis-ai/engram-sdk",
3
- "version": "0.9.0",
3
+ "version": "0.10.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",
@@ -46,7 +46,7 @@
46
46
  "type-check": "tsc --noEmit"
47
47
  },
48
48
  "dependencies": {
49
- "@hexis-ai/engram-core": "^0.1.5"
49
+ "@hexis-ai/engram-core": "^0.2.0"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"