ofiere-openclaw-plugin 4.39.0 → 4.39.2
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 +10 -2
- package/src/attachments.ts +3 -1
- package/src/tools.ts +4 -2
- package/src/types/openclaw.d.ts +8 -0
- package/tsconfig.json +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ofiere-openclaw-plugin",
|
|
3
|
-
"version": "4.39.
|
|
3
|
+
"version": "4.39.2",
|
|
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"],
|
|
@@ -14,8 +14,13 @@
|
|
|
14
14
|
"index.ts",
|
|
15
15
|
"src",
|
|
16
16
|
"openclaw.plugin.json",
|
|
17
|
-
"README.md"
|
|
17
|
+
"README.md",
|
|
18
|
+
"tsconfig.json"
|
|
18
19
|
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
22
|
+
"build": "tsc --noEmit"
|
|
23
|
+
},
|
|
19
24
|
"openclaw": {
|
|
20
25
|
"extensions": [
|
|
21
26
|
"./index.ts"
|
|
@@ -32,5 +37,8 @@
|
|
|
32
37
|
"dependencies": {
|
|
33
38
|
"@supabase/supabase-js": "^2.98.0",
|
|
34
39
|
"zod": "^3.25.11"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"typescript": "^5.6.0"
|
|
35
43
|
}
|
|
36
44
|
}
|
package/src/attachments.ts
CHANGED
|
@@ -408,7 +408,9 @@ export function registerAttachmentContextHook(args: {
|
|
|
408
408
|
return block ? { appendSystemContext: block } : undefined;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"noImplicitAny": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"allowImportingTsExtensions": false,
|
|
15
|
+
"isolatedModules": true
|
|
16
|
+
},
|
|
17
|
+
"include": ["index.ts", "src/**/*.ts"],
|
|
18
|
+
"exclude": ["node_modules"]
|
|
19
|
+
}
|