@joshuaswarren/openclaw-engram 9.0.69 → 9.0.71

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/index.js CHANGED
@@ -3509,7 +3509,6 @@ Respond with valid JSON matching this schema:
3509
3509
  },
3510
3510
  { role: "user", content: conversation }
3511
3511
  ],
3512
- temperature: 0.3,
3513
3512
  ...buildChatCompletionTokenLimit(this.config.model, 4096, {
3514
3513
  assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
3515
3514
  })
@@ -3785,7 +3784,6 @@ Respond with valid JSON only, matching this schema:
3785
3784
  { role: "user", content: "Consolidate the new memories against existing ones." }
3786
3785
  ],
3787
3786
  ...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
3788
- temperature: 0.3,
3789
3787
  ...buildChatCompletionTokenLimit(this.config.model, 4096, {
3790
3788
  assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
3791
3789
  })
@@ -4013,7 +4011,6 @@ Respond with valid JSON matching this schema:
4013
4011
  { role: "user", content: fullProfileContent }
4014
4012
  ],
4015
4013
  ...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
4016
- temperature: 0.3,
4017
4014
  ...buildChatCompletionTokenLimit(this.config.model, 4096, {
4018
4015
  assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
4019
4016
  })
@@ -4209,7 +4206,6 @@ Respond with valid JSON matching this schema:
4209
4206
  { role: "user", content: fullIdentityContent }
4210
4207
  ],
4211
4208
  ...this.config.reasoningEffort !== "none" ? { reasoning_effort: this.config.reasoningEffort } : {},
4212
- temperature: 0.3,
4213
4209
  ...buildChatCompletionTokenLimit(this.config.model, 4096, {
4214
4210
  assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
4215
4211
  })
@@ -4407,7 +4403,6 @@ Respond with valid JSON matching this schema:
4407
4403
  { role: "system", content: systemPrompt },
4408
4404
  { role: "user", content: input }
4409
4405
  ],
4410
- temperature: 0.3,
4411
4406
  ...buildChatCompletionTokenLimit(this.config.model, 2048, {
4412
4407
  assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
4413
4408
  })
@@ -4511,7 +4506,6 @@ Respond with valid JSON matching this schema:
4511
4506
  { role: "system", content: systemPrompt },
4512
4507
  { role: "user", content: input }
4513
4508
  ],
4514
- temperature: 0.3,
4515
4509
  ...buildChatCompletionTokenLimit(this.config.model, 2048, {
4516
4510
  assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
4517
4511
  })
@@ -4611,7 +4605,6 @@ ${memoryList}` }
4611
4605
 
4612
4606
  ${memoryList}` }
4613
4607
  ],
4614
- temperature: 0.3,
4615
4608
  ...buildChatCompletionTokenLimit(this.config.model, 4096, {
4616
4609
  assumeOpenAI: this.directClientUsesOpenAiTokenSemantics()
4617
4610
  })
@@ -34913,14 +34906,18 @@ var EngramAccessHttpServer = class {
34913
34906
  async handleMcpRequest(req, res) {
34914
34907
  const body = await this.readJsonBody(req);
34915
34908
  const request = body;
34916
- if (request.method === "tools/call") {
34917
- const toolName = typeof request.params?.name === "string" ? request.params.name : "";
34918
- if (toolName === "engram.memory_store" || toolName === "engram.suggestion_submit") {
34919
- this.ensureWriteRateLimitAvailable();
34909
+ const isMcpWrite = request.method === "tools/call" && typeof request.params?.name === "string" && (request.params.name === "engram.memory_store" || request.params.name === "engram.suggestion_submit");
34910
+ if (isMcpWrite) {
34911
+ this.ensureWriteRateLimitAvailable();
34912
+ }
34913
+ const response = await this.mcpServer.handleRequest(request);
34914
+ if (isMcpWrite && response !== null) {
34915
+ const result = response.result;
34916
+ const structured = result?.structuredContent;
34917
+ if (!structured || this.shouldCountWriteRateLimit(structured)) {
34920
34918
  this.recordWriteRateLimitHit();
34921
34919
  }
34922
34920
  }
34923
- const response = await this.mcpServer.handleRequest(request);
34924
34921
  if (response === null) {
34925
34922
  res.statusCode = 202;
34926
34923
  res.end();