mengram-ai 2.14.3 → 2.14.4

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.
Files changed (2) hide show
  1. package/index.js +7 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -104,16 +104,19 @@ class MengramClient {
104
104
  * @param {string} [options.agentId]
105
105
  * @param {string} [options.runId]
106
106
  * @param {string} [options.appId]
107
+ * @param {string} [options.expirationDate] - ISO datetime when memories expire
107
108
  * @returns {Promise<{status: string}>}
108
109
  */
109
110
  async addText(text, options = {}) {
110
- return this._request('POST', '/v1/add_text', {
111
+ const body = {
111
112
  text,
112
113
  user_id: options.userId || 'default',
113
114
  agent_id: options.agentId || null,
114
115
  run_id: options.runId || null,
115
116
  app_id: options.appId || null,
116
- });
117
+ };
118
+ if (options.expirationDate) body.expiration_date = options.expirationDate;
119
+ return this._request('POST', '/v1/add_text', body);
117
120
  }
118
121
 
119
122
  /**
@@ -193,7 +196,7 @@ class MengramClient {
193
196
  try {
194
197
  const params = {};
195
198
  if (options.userId && options.userId !== 'default') params.sub_user_id = options.userId;
196
- await this._request('DELETE', `/v1/entity/${encodeURIComponent(name)}`, null, params);
199
+ await this._request('DELETE', `/v1/memory/${encodeURIComponent(name)}`, null, params);
197
200
  return true;
198
201
  } catch {
199
202
  return false;
@@ -748,7 +751,7 @@ class MengramClient {
748
751
  * @returns {Promise<Array>}
749
752
  */
750
753
  async feed(options = {}) {
751
- const params = { limit: options.limit || 20 };
754
+ const params = { limit: options.limit || 50 };
752
755
  if (options.userId && options.userId !== 'default') params.sub_user_id = options.userId;
753
756
  const data = await this._request('GET', '/v1/feed', null, params);
754
757
  return data.feed || [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mengram-ai",
3
- "version": "2.14.3",
3
+ "version": "2.14.4",
4
4
  "description": "Human-like memory for AI — semantic, episodic & procedural memory. Experience-driven procedures, Cognitive Profile, unified search, memory agents. Free Mem0 alternative.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",