@unblocklabs/unblock-memory 0.3.2 → 0.3.3

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.
@@ -1,4 +1,5 @@
1
1
  import type { MemoryPluginCapability } from "openclaw/plugin-sdk/memory-host-core";
2
+ import type { OpenClawPluginToolContext } from "openclaw/plugin-sdk/plugin-entry";
2
3
  import type { SessionMetadata } from "./session-projector.js";
3
4
  import type { ChatType } from "./config.js";
4
5
  export type MemoryPluginRuntimeContract = NonNullable<MemoryPluginCapability["runtime"]>;
@@ -18,9 +19,11 @@ export type SessionSearchFilter = {
18
19
  accountId?: string;
19
20
  conversationId?: string;
20
21
  };
22
+ export type MemoryRequestContext = Pick<OpenClawPluginToolContext, "sessionKey" | "sessionId" | "messageChannel" | "agentAccountId" | "nativeChannelId" | "deliveryContext">;
21
23
  export type CorpusSearchOptions = NonNullable<Parameters<MemorySearchManagerContract["search"]>[1]> & {
22
24
  corpora?: readonly string[];
23
25
  sessionFilter?: SessionSearchFilter;
26
+ requestContext?: MemoryRequestContext;
24
27
  };
25
28
  export type MemoryEmbeddingProbeResult = Awaited<ReturnType<MemorySearchManagerContract["probeEmbeddingAvailability"]>>;
26
29
  export type MemorySyncParams = Parameters<NonNullable<MemorySearchManagerContract["sync"]>>[0];
@@ -1,6 +1,6 @@
1
1
  import type { QMDStore } from "@unblocklabs/qmd";
2
2
  import { type AnalysisRunner, type MemoryAnalysisSummary, type MemoryClusterDetail, type MemoryClusterList, type MemoryClusterSort, type MemoryReclusterOptions } from "./analysis.js";
3
- import type { CorpusMemorySearchResult, CorpusSearchOptions, MemoryEmbeddingProbeResult, MemoryProviderStatus, MemoryReadResult, MemorySearchManagerContract, MemorySyncParams } from "./contracts.js";
3
+ import type { CorpusMemorySearchResult, CorpusSearchOptions, MemoryEmbeddingProbeResult, MemoryProviderStatus, MemoryReadResult, MemoryRequestContext, MemorySearchManagerContract, MemorySyncParams } from "./contracts.js";
4
4
  import type { ChatType } from "./config.js";
5
5
  import { type MaintenanceStatus, type TemporalBasis } from "./curation.js";
6
6
  import { type SessionSyncResult } from "./session-sync.js";
@@ -75,6 +75,7 @@ export declare class QmdMemoryManager implements MemorySearchManagerContract {
75
75
  relPath: string;
76
76
  from?: number;
77
77
  lines?: number;
78
+ requestContext?: MemoryRequestContext;
78
79
  }): Promise<MemoryReadResult>;
79
80
  status(): MemoryProviderStatus;
80
81
  probeEmbeddingAvailability(): Promise<MemoryEmbeddingProbeResult>;
@@ -8,7 +8,18 @@ function getContext(ctx) {
8
8
  const cfg = ctx.getRuntimeConfig?.() ?? ctx.runtimeConfig ?? ctx.config;
9
9
  if (!cfg || !ctx.agentId)
10
10
  return undefined;
11
- return { cfg, agentId: ctx.agentId };
11
+ return {
12
+ cfg,
13
+ agentId: ctx.agentId,
14
+ requestContext: {
15
+ sessionKey: ctx.sessionKey,
16
+ sessionId: ctx.sessionId,
17
+ messageChannel: ctx.messageChannel,
18
+ agentAccountId: ctx.agentAccountId,
19
+ nativeChannelId: ctx.nativeChannelId,
20
+ deliveryContext: ctx.deliveryContext,
21
+ },
22
+ };
12
23
  }
13
24
  const searchParameters = Type.Object({
14
25
  query: Type.String({ pattern: "\\S" }),
@@ -58,6 +69,7 @@ function createSearchTool(runtime, ctx) {
58
69
  maxResults,
59
70
  minScore,
60
71
  signal,
72
+ requestContext: active.requestContext,
61
73
  });
62
74
  return jsonResult({
63
75
  results: results.map((result) => result.session
@@ -93,6 +105,7 @@ function createGetTool(runtime, ctx) {
93
105
  relPath: path,
94
106
  from,
95
107
  lines,
108
+ requestContext: active.requestContext,
96
109
  }));
97
110
  },
98
111
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "unblock-memory",
3
3
  "name": "Unblock Memory",
4
- "version": "0.3.2",
4
+ "version": "0.3.3",
5
5
  "description": "Indexes, retrieves, and analyzes configured workspace memory with existing QMD vectors.",
6
6
  "kind": "memory",
7
7
  "activation": { "onStartup": false },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unblocklabs/unblock-memory",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Workspace-native memory for OpenClaw, powered by QMD",
5
5
  "type": "module",
6
6
  "license": "MIT",