ofiere-openclaw-plugin 4.56.2 → 4.56.4
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/src/tools.js +20 -3
- package/package.json +1 -1
- package/src/tools.ts +19 -2
package/dist/src/tools.js
CHANGED
|
@@ -732,8 +732,13 @@ async function handleCreateTask(supabase, userId, resolveAgent, params, fallback
|
|
|
732
732
|
let { nextRunAtEpoch } = normalized;
|
|
733
733
|
const nowEpoch = Math.floor(Date.now() / 1000);
|
|
734
734
|
// Safety net: if computed time is in the past, schedule for now + 60s
|
|
735
|
+
// Fix #2 (2026-05-17): jitter past-time bump 0..5min so bulk creates
|
|
736
|
+
// don't all land on the same epoch second → same pg_cron tick → all
|
|
737
|
+
// N agents fire in one minute. v1 smoke (2026-05-17) burned 94% of
|
|
738
|
+
// the user's LLM budget in ~10 min when 32 past-time tasks
|
|
739
|
+
// synchronized on now+60s. Spread across 6 ticks instead of 1.
|
|
735
740
|
if (nextRunAtEpoch <= nowEpoch) {
|
|
736
|
-
nextRunAtEpoch = nowEpoch + 60;
|
|
741
|
+
nextRunAtEpoch = nowEpoch + 60 + Math.floor(Math.random() * 300);
|
|
737
742
|
}
|
|
738
743
|
await supabase.from("scheduler_events").insert({
|
|
739
744
|
id: crypto.randomUUID(),
|
|
@@ -810,9 +815,21 @@ async function handleUpdateTask(supabase, userId, params) {
|
|
|
810
815
|
"title", "description", "status", "priority", "progress",
|
|
811
816
|
"agent_id", "start_date", "due_date", "tags",
|
|
812
817
|
];
|
|
818
|
+
// Fix #8 (2026-05-17): Postgres rejects empty-string for timestamptz columns,
|
|
819
|
+
// so LLM callers passing start_date/due_date="" to clear a stale value would
|
|
820
|
+
// error instead of nulling the column. Coerce empty/whitespace → null here
|
|
821
|
+
// to match the dashboard native executor (see tool-executor.ts handleTaskOps).
|
|
822
|
+
const TIMESTAMP_FIELDS = ["start_date", "due_date"];
|
|
813
823
|
for (const f of fields) {
|
|
814
|
-
if (params[f] !== undefined)
|
|
815
|
-
|
|
824
|
+
if (params[f] !== undefined) {
|
|
825
|
+
if (TIMESTAMP_FIELDS.includes(f)) {
|
|
826
|
+
const v = params[f];
|
|
827
|
+
updates[f] = (typeof v === "string" && v.trim() === "") ? null : v;
|
|
828
|
+
}
|
|
829
|
+
else {
|
|
830
|
+
updates[f] = params[f];
|
|
831
|
+
}
|
|
832
|
+
}
|
|
816
833
|
}
|
|
817
834
|
// Cycle 13 (BUG 2): keep status and completed_at consistent. Setting status
|
|
818
835
|
// to DONE stamps completed_at + progress=100. Setting status to anything
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ofiere-openclaw-plugin",
|
|
3
|
-
"version": "4.56.
|
|
3
|
+
"version": "4.56.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw plugin for Ofiere PM - 18 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, corporate frameworks, agent office canvas, and PM gate approvals",
|
|
6
6
|
"keywords": [
|
package/src/tools.ts
CHANGED
|
@@ -818,8 +818,13 @@ async function handleCreateTask(
|
|
|
818
818
|
let { nextRunAtEpoch } = normalized;
|
|
819
819
|
const nowEpoch = Math.floor(Date.now() / 1000);
|
|
820
820
|
// Safety net: if computed time is in the past, schedule for now + 60s
|
|
821
|
+
// Fix #2 (2026-05-17): jitter past-time bump 0..5min so bulk creates
|
|
822
|
+
// don't all land on the same epoch second → same pg_cron tick → all
|
|
823
|
+
// N agents fire in one minute. v1 smoke (2026-05-17) burned 94% of
|
|
824
|
+
// the user's LLM budget in ~10 min when 32 past-time tasks
|
|
825
|
+
// synchronized on now+60s. Spread across 6 ticks instead of 1.
|
|
821
826
|
if (nextRunAtEpoch <= nowEpoch) {
|
|
822
|
-
nextRunAtEpoch = nowEpoch + 60;
|
|
827
|
+
nextRunAtEpoch = nowEpoch + 60 + Math.floor(Math.random() * 300);
|
|
823
828
|
}
|
|
824
829
|
|
|
825
830
|
await supabase.from("scheduler_events").insert({
|
|
@@ -900,8 +905,20 @@ async function handleUpdateTask(
|
|
|
900
905
|
"title", "description", "status", "priority", "progress",
|
|
901
906
|
"agent_id", "start_date", "due_date", "tags",
|
|
902
907
|
];
|
|
908
|
+
// Fix #8 (2026-05-17): Postgres rejects empty-string for timestamptz columns,
|
|
909
|
+
// so LLM callers passing start_date/due_date="" to clear a stale value would
|
|
910
|
+
// error instead of nulling the column. Coerce empty/whitespace → null here
|
|
911
|
+
// to match the dashboard native executor (see tool-executor.ts handleTaskOps).
|
|
912
|
+
const TIMESTAMP_FIELDS = ["start_date", "due_date"];
|
|
903
913
|
for (const f of fields) {
|
|
904
|
-
if (params[f] !== undefined)
|
|
914
|
+
if (params[f] !== undefined) {
|
|
915
|
+
if (TIMESTAMP_FIELDS.includes(f)) {
|
|
916
|
+
const v = params[f];
|
|
917
|
+
updates[f] = (typeof v === "string" && v.trim() === "") ? null : v;
|
|
918
|
+
} else {
|
|
919
|
+
updates[f] = params[f];
|
|
920
|
+
}
|
|
921
|
+
}
|
|
905
922
|
}
|
|
906
923
|
// Cycle 13 (BUG 2): keep status and completed_at consistent. Setting status
|
|
907
924
|
// to DONE stamps completed_at + progress=100. Setting status to anything
|