lobstah-openclaw-plugin 0.7.3 → 0.7.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/index.js +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/core";
|
|
|
4
4
|
// apps/node/src/tools.ts
|
|
5
5
|
import * as fs7 from "node:fs";
|
|
6
6
|
import * as path5 from "node:path";
|
|
7
|
-
import { randomUUID } from "node:crypto";
|
|
7
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
8
8
|
|
|
9
9
|
// packages/core/dist/types.js
|
|
10
10
|
var VERBS = ["working", "needs-decision", "blocked", "paused", "done", "failed"];
|
|
@@ -14,6 +14,10 @@ var TERMINAL_VERBS = ["done", "failed"];
|
|
|
14
14
|
import * as os from "node:os";
|
|
15
15
|
import * as path from "node:path";
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
|
+
import { randomUUID } from "node:crypto";
|
|
18
|
+
function uniqueTempPath(file) {
|
|
19
|
+
return `${file}.tmp-${process.pid}-${randomUUID()}`;
|
|
20
|
+
}
|
|
17
21
|
function lobstahHome() {
|
|
18
22
|
return process.env.LOBSTAH_HOME ?? path.join(os.homedir(), ".lobstah");
|
|
19
23
|
}
|
|
@@ -84,7 +88,7 @@ function reconcile({ log, lastEventAt: lastEventAt2, now = Date.now(), busyThres
|
|
|
84
88
|
|
|
85
89
|
// packages/core/dist/queue.js
|
|
86
90
|
function atomicWrite(file, content) {
|
|
87
|
-
const tmp =
|
|
91
|
+
const tmp = uniqueTempPath(file);
|
|
88
92
|
fs3.writeFileSync(tmp, content);
|
|
89
93
|
fs3.renameSync(tmp, file);
|
|
90
94
|
}
|
|
@@ -972,7 +976,7 @@ function sendMessage(id, lane, text2, from, attachments = []) {
|
|
|
972
976
|
const existing = fs5.readdirSync(dir).filter((f) => f.endsWith(".msg")).length;
|
|
973
977
|
const handled = fs5.readdirSync(path4.join(dir, "handled")).filter((f) => f.endsWith(".msg")).length;
|
|
974
978
|
const name = `${String(existing + handled + 1).padStart(3, "0")}.msg`;
|
|
975
|
-
const tmp = path4.join(dir,
|
|
979
|
+
const tmp = uniqueTempPath(path4.join(dir, name));
|
|
976
980
|
if (from !== void 0 || attachments.length > 0) {
|
|
977
981
|
const meta = { from: from ?? "unknown", at: (/* @__PURE__ */ new Date()).toISOString(), ...attachments.length ? { attachments } : {} };
|
|
978
982
|
const metaTmp = `${tmp}.meta`;
|
|
@@ -1071,7 +1075,7 @@ function dispatchTool() {
|
|
|
1071
1075
|
const brief = param(params, "brief");
|
|
1072
1076
|
if (!repo || !brief) throw new Error("lobstah_dispatch requires brief, and repo or pool");
|
|
1073
1077
|
const d = {
|
|
1074
|
-
id:
|
|
1078
|
+
id: randomUUID2(),
|
|
1075
1079
|
repo,
|
|
1076
1080
|
brief,
|
|
1077
1081
|
harness: param(params, "harness"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lobstah-openclaw-plugin",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "OpenClaw plugin for lobstah: gives fleet agents dispatch/status/send/cancel tools and operators a /lobstah command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "aequitas labs LLC",
|