@remnic/plugin-openclaw 1.0.30 → 1.0.31

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/README.md CHANGED
@@ -104,6 +104,18 @@ The npm package also declares this surface in `package.json` under
104
104
  provider env vars, config path, and external-model routing behavior before
105
105
  installation.
106
106
 
107
+ ## Privacy Boundary
108
+
109
+ OpenClaw hook runtime metadata such as authorization headers, API keys, provider
110
+ credential objects, and bearer tokens is operational metadata. Remnic does not
111
+ persist those fields to transcripts, extraction buffers, recall audit entries,
112
+ logs, or memory content.
113
+
114
+ User-authored message text is different: Remnic is a memory plugin, so message
115
+ content can be stored, extracted, summarized, embedded, or recalled according to
116
+ the configured memory policy. Do not paste secrets into chat when you do not
117
+ want them treated as conversation content.
118
+
107
119
  ## Plugin Inspection
108
120
 
109
121
  Run the OpenClaw plugin inspector with:
@@ -128,6 +140,15 @@ npm run test:openclaw-scenarios
128
140
  The suite covers the registered memory tools and lifecycle hooks without live
129
141
  OpenClaw, LLM credentials, or network calls.
130
142
 
143
+ Run the OpenClaw hook privacy suite with:
144
+
145
+ ```bash
146
+ npm run test:openclaw-privacy
147
+ ```
148
+
149
+ The suite guards against runtime auth metadata leaking into persisted memory,
150
+ transcript, recall-audit, or debug-log surfaces.
151
+
131
152
  ## SDK Surface Drift Check
132
153
 
133
154
  The adapter keeps a conservative OpenClaw SDK surface snapshot at
package/dist/index.js CHANGED
@@ -7104,7 +7104,7 @@ Consolidate the new memories against existing ones.`
7104
7104
  return { items: [], profileUpdates: [], entityUpdates: [] };
7105
7105
  }
7106
7106
  try {
7107
- const systemPrompt = `You are a memory consolidation system. Compare new memories against existing ones and decide what to do with each.
7107
+ const instructionText = `You are a memory consolidation system. Compare new memories against existing ones and decide what to do with each.
7108
7108
 
7109
7109
  Actions:
7110
7110
  - ADD: Keep the new memory as-is (no duplicate exists)
@@ -7132,7 +7132,7 @@ ${CONSOLIDATION_RESPONSE_SCHEMA}`;
7132
7132
  const response = await this.client.chat.completions.create({
7133
7133
  model: this.config.model,
7134
7134
  messages: [
7135
- { role: "system", content: systemPrompt },
7135
+ { role: "system", content: instructionText },
7136
7136
  { role: "user", content: "Consolidate the new memories against existing ones." }
7137
7137
  ],
7138
7138
  ...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
@@ -7321,7 +7321,7 @@ The output should be the COMPLETE consolidated profile as valid markdown, starti
7321
7321
  return null;
7322
7322
  }
7323
7323
  try {
7324
- const systemPrompt = `You are a profile consolidation system. You are given a behavioral profile (markdown) that has grown too large. Your job is to produce a CONSOLIDATED version that:
7324
+ const instructionText = `You are a profile consolidation system. You are given a behavioral profile (markdown) that has grown too large. Your job is to produce a CONSOLIDATED version that:
7325
7325
 
7326
7326
  1. PRESERVES all ## section headers and their structure
7327
7327
  2. MERGES duplicate or near-duplicate bullet points into single, clear statements
@@ -7342,7 +7342,7 @@ Respond with valid JSON matching this schema:
7342
7342
  const response = await this.client.chat.completions.create({
7343
7343
  model: this.config.model,
7344
7344
  messages: [
7345
- { role: "system", content: systemPrompt },
7345
+ { role: "system", content: instructionText },
7346
7346
  { role: "user", content: fullProfileContent }
7347
7347
  ],
7348
7348
  ...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
@@ -7523,7 +7523,7 @@ The goal is to reduce a bloated file to a compact, high-signal set of learned pa
7523
7523
  return null;
7524
7524
  }
7525
7525
  try {
7526
- const systemPrompt = `You are an identity consolidation system. You are given the full contents of an IDENTITY.md file that contains many individual reflection entries. Your job is to:
7526
+ const instructionText = `You are an identity consolidation system. You are given the full contents of an IDENTITY.md file that contains many individual reflection entries. Your job is to:
7527
7527
 
7528
7528
  1. Read all the reflection entries (sections starting with "## Reflection")
7529
7529
  2. Extract the most important, durable behavioral patterns and lessons learned
@@ -7542,7 +7542,7 @@ Respond with valid JSON matching this schema:
7542
7542
  const response = await this.client.chat.completions.create({
7543
7543
  model: this.config.model,
7544
7544
  messages: [
7545
- { role: "system", content: systemPrompt },
7545
+ { role: "system", content: instructionText },
7546
7546
  { role: "user", content: fullIdentityContent }
7547
7547
  ],
7548
7548
  ...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
@@ -7671,7 +7671,7 @@ Memory 2 (new):
7671
7671
  Category: ${newMemory.category}
7672
7672
  Content: ${newMemory.content}`;
7673
7673
  try {
7674
- const systemPrompt = `You are a contradiction detection system. Analyze whether two memories contradict each other.
7674
+ const instructionText = `You are a contradiction detection system. Analyze whether two memories contradict each other.
7675
7675
 
7676
7676
  IMPORTANT: Not all similar memories are contradictions!
7677
7677
  - "User likes TypeScript" and "User likes Python" are NOT contradictions (preferences can coexist)
@@ -7697,7 +7697,7 @@ Respond with valid JSON matching this schema:
7697
7697
  try {
7698
7698
  const localResponse = await this.localLlm.chatCompletion(
7699
7699
  [
7700
- { role: "system", content: systemPrompt },
7700
+ { role: "system", content: instructionText },
7701
7701
  { role: "user", content: input }
7702
7702
  ],
7703
7703
  {
@@ -7730,7 +7730,7 @@ Respond with valid JSON matching this schema:
7730
7730
  if (!this.shouldUseDirectClient) {
7731
7731
  const fallbackResponse = await this.fallbackLlm.chatCompletion(
7732
7732
  [
7733
- { role: "system", content: systemPrompt },
7733
+ { role: "system", content: instructionText },
7734
7734
  { role: "user", content: input }
7735
7735
  ],
7736
7736
  this.withGatewayAgent({ temperature: 0.3, maxTokens: 2048 })
@@ -7750,7 +7750,7 @@ Respond with valid JSON matching this schema:
7750
7750
  const response = await this.client.chat.completions.create({
7751
7751
  model: this.config.model,
7752
7752
  messages: [
7753
- { role: "system", content: systemPrompt },
7753
+ { role: "system", content: instructionText },
7754
7754
  { role: "user", content: input }
7755
7755
  ],
7756
7756
  ...buildChatCompletionTokenLimit(this.config.model, 2048, {
@@ -7790,7 +7790,7 @@ Content: ${newMemory.content}
7790
7790
  Candidate memories to link to:
7791
7791
  ${candidateList}`;
7792
7792
  try {
7793
- const systemPrompt = `You are a memory linking system. Analyze the new memory and suggest relationships to existing memories.
7793
+ const instructionText = `You are a memory linking system. Analyze the new memory and suggest relationships to existing memories.
7794
7794
 
7795
7795
  Link types:
7796
7796
  - follows: This memory is a continuation or next step (e.g., decision follows discussion)
@@ -7813,7 +7813,7 @@ Respond with valid JSON matching this schema:
7813
7813
  try {
7814
7814
  const localResponse = await this.localLlm.chatCompletion(
7815
7815
  [
7816
- { role: "system", content: systemPrompt },
7816
+ { role: "system", content: instructionText },
7817
7817
  { role: "user", content: input }
7818
7818
  ],
7819
7819
  {
@@ -7842,7 +7842,7 @@ Respond with valid JSON matching this schema:
7842
7842
  if (!this.shouldUseDirectClient) {
7843
7843
  const fallbackResponse = await this.fallbackLlm.chatCompletion(
7844
7844
  [
7845
- { role: "system", content: systemPrompt },
7845
+ { role: "system", content: instructionText },
7846
7846
  { role: "user", content: input }
7847
7847
  ],
7848
7848
  this.withGatewayAgent({ temperature: 0.3, maxTokens: 2048 })
@@ -7858,7 +7858,7 @@ Respond with valid JSON matching this schema:
7858
7858
  const response = await this.client.chat.completions.create({
7859
7859
  model: this.config.model,
7860
7860
  messages: [
7861
- { role: "system", content: systemPrompt },
7861
+ { role: "system", content: instructionText },
7862
7862
  { role: "user", content: input }
7863
7863
  ],
7864
7864
  ...buildChatCompletionTokenLimit(this.config.model, 2048, {
@@ -7885,7 +7885,7 @@ Respond with valid JSON matching this schema:
7885
7885
  }
7886
7886
  const memoryContext = formatDaySummaryMemories(memories);
7887
7887
  if (memoryContext.length === 0) return null;
7888
- const systemPrompt = await loadDaySummaryPrompt();
7888
+ const instructionText = await loadDaySummaryPrompt();
7889
7889
  let extensionsFooter = "";
7890
7890
  try {
7891
7891
  extensionsFooter = await buildExtensionsFooterForSummary(this.config);
@@ -7903,7 +7903,7 @@ ${extensionsFooter}` : ""}`;
7903
7903
  try {
7904
7904
  const localResponse = await this.localLlm.chatCompletion(
7905
7905
  [
7906
- { role: "system", content: `${systemPrompt}
7906
+ { role: "system", content: `${instructionText}
7907
7907
 
7908
7908
  Return valid JSON only.` },
7909
7909
  { role: "user", content: userPrompt }
@@ -7940,7 +7940,7 @@ Return valid JSON only.` },
7940
7940
  startedAt,
7941
7941
  DaySummaryResultSchema,
7942
7942
  [
7943
- { role: "system", content: `${systemPrompt}
7943
+ { role: "system", content: `${instructionText}
7944
7944
 
7945
7945
  Return valid JSON only.` },
7946
7946
  { role: "user", content: userPrompt }
@@ -7958,7 +7958,7 @@ Return valid JSON only.` },
7958
7958
  try {
7959
7959
  const response = await this.client.responses.create({
7960
7960
  model: this.config.model,
7961
- instructions: `${systemPrompt}
7961
+ instructions: `${instructionText}
7962
7962
 
7963
7963
  Return valid JSON only.`,
7964
7964
  input: userPrompt,
@@ -7988,7 +7988,7 @@ Return valid JSON only.`,
7988
7988
  const memoryList = memories.map((m) => `[${m.id}] (${m.category}, ${m.created.slice(0, 10)})
7989
7989
  ${m.content}`).join("\n\n");
7990
7990
  try {
7991
- const systemPrompt = `You are a memory summarization system. You are given a batch of old memories that need to be compressed into a summary.
7991
+ const instructionText = `You are a memory summarization system. You are given a batch of old memories that need to be compressed into a summary.
7992
7992
 
7993
7993
  Your task:
7994
7994
  1. Write a concise summary paragraph (2-4 sentences) capturing the essence of these memories
@@ -8011,7 +8011,7 @@ Respond with valid JSON matching this schema:
8011
8011
  try {
8012
8012
  const localResponse = await this.localLlm.chatCompletion(
8013
8013
  [
8014
- { role: "system", content: systemPrompt },
8014
+ { role: "system", content: instructionText },
8015
8015
  { role: "user", content: `Summarize these ${memories.length} memories:
8016
8016
 
8017
8017
  ${memoryList}` }
@@ -8044,7 +8044,7 @@ ${memoryList}` }
8044
8044
  if (!this.shouldUseDirectClient) {
8045
8045
  const fallbackResponse = await this.fallbackLlm.chatCompletion(
8046
8046
  [
8047
- { role: "system", content: systemPrompt },
8047
+ { role: "system", content: instructionText },
8048
8048
  { role: "user", content: `Summarize these ${memories.length} memories:
8049
8049
 
8050
8050
  ${memoryList}` }
@@ -8062,7 +8062,7 @@ ${memoryList}` }
8062
8062
  const response = await this.client.chat.completions.create({
8063
8063
  model: this.config.model,
8064
8064
  messages: [
8065
- { role: "system", content: systemPrompt },
8065
+ { role: "system", content: instructionText },
8066
8066
  { role: "user", content: `Summarize these ${memories.length} memories:
8067
8067
 
8068
8068
  ${memoryList}` }
@@ -34245,11 +34245,11 @@ var Orchestrator = class _Orchestrator {
34245
34245
  });
34246
34246
  if (config.lcmEnabled) {
34247
34247
  const summarizeFn = async (text, targetTokens, aggressive) => {
34248
- const systemPrompt = aggressive ? `Compress the following into bullet points. One bullet per distinct fact or decision. Maximum ${targetTokens} tokens total. No prose.` : `Compress the following conversation segment into a dense summary. Preserve: decisions made, code artifacts mentioned, errors encountered, open questions, and any commitments or next-steps. Omit: pleasantries, restatements, and anything the agent would not need to recall later. Output a single paragraph, maximum ${targetTokens} tokens.`;
34248
+ const instructionText = aggressive ? `Compress the following into bullet points. One bullet per distinct fact or decision. Maximum ${targetTokens} tokens total. No prose.` : `Compress the following conversation segment into a dense summary. Preserve: decisions made, code artifacts mentioned, errors encountered, open questions, and any commitments or next-steps. Omit: pleasantries, restatements, and anything the agent would not need to recall later. Output a single paragraph, maximum ${targetTokens} tokens.`;
34249
34249
  try {
34250
34250
  const result = await this.localLlm.chatCompletion(
34251
34251
  [
34252
- { role: "system", content: systemPrompt },
34252
+ { role: "system", content: instructionText },
34253
34253
  { role: "user", content: text.slice(0, 12e3) }
34254
34254
  ],
34255
34255
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-remnic",
3
3
  "name": "Remnic OpenClaw Plugin",
4
- "version": "1.0.30",
4
+ "version": "1.0.31",
5
5
  "kind": "memory",
6
6
  "description": "Local semantic memory for OpenClaw with bundled Remnic core runtime. Requires plugins.slots.memory set to this plugin id for hooks to fire.",
7
7
  "setup": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/plugin-openclaw",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "OpenClaw adapter for Remnic memory with bundled @remnic/core runtime",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",