@arkimedehq/openclaw-recordare 0.3.0 → 0.4.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.
Files changed (2) hide show
  1. package/dist/index.js +18 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19072,7 +19072,7 @@ var RecordareMcp = class {
19072
19072
  },
19073
19073
  requestInit: { headers: { ...this.http.headers(user), [CONVERSATION_HEADER]: conversation } }
19074
19074
  });
19075
- const client = new Client(this.options.clientInfo ?? { name: "recordare-client", version: "0.3.0" });
19075
+ const client = new Client(this.options.clientInfo ?? { name: "recordare-client", version: "0.4.0" });
19076
19076
  await client.connect(transport);
19077
19077
  return client;
19078
19078
  }
@@ -19111,6 +19111,13 @@ var RecordareClient = class {
19111
19111
  throw err;
19112
19112
  }
19113
19113
  }
19114
+ /**
19115
+ * Erases the whole memory behind `user`, at once and for good (needs the `erase` scope): everything it holds goes.
19116
+ * `memoryId` (from `me`) confirms which memory; a user without a memory answers 404, none is created.
19117
+ */
19118
+ eraseMemory(user, memoryId) {
19119
+ return this.http.request("DELETE", `api/v1/me${qs({ confirm: memoryId })}`, { user });
19120
+ }
19114
19121
  /** A one-time code for the holder to send from a channel (D51; personal memories only, else 409). */
19115
19122
  linkCode(user) {
19116
19123
  return this.http.request("POST", "api/v1/me/link-codes", { user });
@@ -19182,17 +19189,17 @@ var RecordareClient = class {
19182
19189
  /**
19183
19190
  * The memories relevant to `query` (the message about to be answered) as a fenced block to append to the prompt — or
19184
19191
  * null. Append it at the end of the system prompt (it changes every turn: keep the stable part first for prompt
19185
- * caching); never store it as a chat message.
19192
+ * caching); never store it as a chat message. `card`: open it with the self card (who I am), off by default.
19186
19193
  */
19187
- context(user, conversation, query) {
19188
- return this.http.request("POST", "api/v1/context", { user, body: { query }, headers: { [CONVERSATION_HEADER]: conversation } });
19194
+ context(user, conversation, query, opts = {}) {
19195
+ return this.http.request("POST", "api/v1/context", { user, body: { query, ...opts }, headers: { [CONVERSATION_HEADER]: conversation } });
19189
19196
  }
19190
19197
  /**
19191
19198
  * Stores the turn and returns the memory context for it in one round trip (needs the `ingest` and `read` scopes):
19192
19199
  * the context is computed for the ingested conversation, from `query` or else the turn's last user message.
19193
19200
  */
19194
- contextWithTurn(user, turn, query) {
19195
- return this.http.request("POST", "api/v1/context", { user, body: { ingest: turn, ...query ? { query } : {} } });
19201
+ contextWithTurn(user, turn, query, opts = {}) {
19202
+ return this.http.request("POST", "api/v1/context", { user, body: { ingest: turn, ...query ? { query } : {}, ...opts } });
19196
19203
  }
19197
19204
  /** The conversation ended (session closed, /new): extraction runs now. A conversation Recordare never had is done. */
19198
19205
  async endConversation(user, conversation) {
@@ -19265,6 +19272,10 @@ var RecordareClient = class {
19265
19272
  facts(user, query = {}) {
19266
19273
  return this.http.request("GET", `api/v1/facts${qs(query)}`, { user });
19267
19274
  }
19275
+ /** Who I am and who my contacts are: current facts and notes of the self and of each contact (no LLM). */
19276
+ cards(user) {
19277
+ return this.http.request("GET", "api/v1/cards", { user });
19278
+ }
19268
19279
  notes(user, query = {}) {
19269
19280
  return this.http.request("GET", `api/v1/notes${qs(query)}`, { user });
19270
19281
  }
@@ -19842,7 +19853,7 @@ function lastTurn(messages) {
19842
19853
  }
19843
19854
 
19844
19855
  // src/plugin.ts
19845
- var VERSION = "0.3.0";
19856
+ var VERSION = "0.4.0";
19846
19857
  var TOOL_TIMEOUT_MS = 2e4;
19847
19858
  var RETRY = { maxAttempts: 16, baseDelayMs: 2e3, maxDelayMs: 60 * 6e4 };
19848
19859
  var RESUME_MS = 5e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkimedehq/openclaw-recordare",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Recordare for OpenClaw: long-term episodic memory kept by your own Recordare service (capture, recall before each turn, memory tools).",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "author": "Andrea Genovese",