ofiere-openclaw-plugin 4.39.0 → 4.39.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofiere-openclaw-plugin",
3
- "version": "4.39.0",
3
+ "version": "4.39.1",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for Ofiere PM - 16 meta-tools covering tasks, agents, projects, scheduling, knowledge, workflows, notifications, memory, prompts, constellation, space file management, execution plan builder, SOP management, agent brain, talent management, and corporate frameworks",
6
6
  "keywords": ["openclaw", "ofiere", "project-management", "agents", "plugin"],
@@ -16,6 +16,10 @@
16
16
  "openclaw.plugin.json",
17
17
  "README.md"
18
18
  ],
19
+ "scripts": {
20
+ "typecheck": "tsc --noEmit",
21
+ "build": "tsc --noEmit"
22
+ },
19
23
  "openclaw": {
20
24
  "extensions": [
21
25
  "./index.ts"
@@ -32,5 +36,8 @@
32
36
  "dependencies": {
33
37
  "@supabase/supabase-js": "^2.98.0",
34
38
  "zod": "^3.25.11"
39
+ },
40
+ "devDependencies": {
41
+ "typescript": "^5.6.0"
35
42
  }
36
43
  }
@@ -408,7 +408,9 @@ export function registerAttachmentContextHook(args: {
408
408
  return block ? { appendSystemContext: block } : undefined;
409
409
  }
410
410
 
411
- const cacheKey = resolvedAgentId;
411
+ // Multi-tenant: a single plugin process can serve multiple users — key
412
+ // by (userId, agentId) so User B never sees User A's cached block.
413
+ const cacheKey = `${userId}::${resolvedAgentId}`;
412
414
  const cached = attachmentCache.get(cacheKey);
413
415
  if (cached) {
414
416
  const age = Date.now() - cached.at;
package/src/tools.ts CHANGED
@@ -5624,7 +5624,9 @@ function registerBrainOps(
5624
5624
  // Touch access_count + last_accessed_at for FadeMem
5625
5625
  if (data && data.length > 0) {
5626
5626
  const ids = data.map((m: any) => m.id);
5627
- supabase.rpc("touch_memories", { memory_ids: ids }).then(() => {}).catch(() => {});
5627
+ // PostgrestFilterBuilder is PromiseLike, not a full Promise use the
5628
+ // 2-arg form of .then() instead of .catch() to silence rejection.
5629
+ supabase.rpc("touch_memories", { memory_ids: ids }).then(() => {}, () => {});
5628
5630
  }
5629
5631
 
5630
5632
  return ok({ memories: data || [], count: (data || []).length, query: queryText, search_mode: "fulltext" });
@@ -6242,7 +6244,7 @@ function registerBrainExtractionHook(
6242
6244
 
6243
6245
  // ── Fast Stream: Write L1_focus + L2_episode in parallel ──
6244
6246
  const rawContent = `User: ${lastUser}\nAssistant: ${lastAssistant}`;
6245
- const immediateWrites: Promise<any>[] = [];
6247
+ const immediateWrites: PromiseLike<any>[] = [];
6246
6248
 
6247
6249
  if (rawContent.length > 50) {
6248
6250
  immediateWrites.push(supabase.from("agent_memories").insert({
@@ -0,0 +1,8 @@
1
+ // Ambient declaration for the OpenClaw plugin SDK. The gateway resolves this
2
+ // module at runtime; npm has no published types. Keep loose — the plugin only
3
+ // uses a small surface (logger, on, registerTool, registerCommand, etc.).
4
+
5
+ declare module "openclaw/plugin-sdk" {
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ export type OpenClawPluginApi = any;
8
+ }