@useorgx/openclaw-plugin 0.7.5 → 0.7.8
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/hash-utils.js
CHANGED
|
@@ -7,6 +7,7 @@ export function idempotencyKey(parts) {
|
|
|
7
7
|
.filter((part) => typeof part === "string" && part.length > 0)
|
|
8
8
|
.join(":");
|
|
9
9
|
const cleaned = raw.replace(/[^a-zA-Z0-9:_-]/g, "-").slice(0, 84);
|
|
10
|
+
const prefix = cleaned.length > 0 ? cleaned : "openclaw";
|
|
10
11
|
const suffix = stableHash(raw).slice(0, 20);
|
|
11
|
-
return `${
|
|
12
|
+
return `${prefix}:${suffix}`.slice(0, 120);
|
|
12
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { pickNumber, pickString, toIsoString } from "./value-utils.js";
|
|
2
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2
3
|
export const SLICE_SCOPE_MAX_TASKS = {
|
|
3
4
|
task: 6,
|
|
4
5
|
milestone: 15,
|
|
@@ -641,6 +642,9 @@ export async function listEntitiesSafe(client, type, filters) {
|
|
|
641
642
|
}
|
|
642
643
|
}
|
|
643
644
|
export async function buildMissionControlGraph(client, initiativeId, options) {
|
|
645
|
+
if (!UUID_RE.test(initiativeId)) {
|
|
646
|
+
throw new Error(`buildMissionControlGraph: initiativeId must be a UUID, got "${initiativeId}"`);
|
|
647
|
+
}
|
|
644
648
|
const degraded = [];
|
|
645
649
|
const preloadedInitiative = options?.initiativeEntity ?? null;
|
|
646
650
|
const [initiativeResult, workstreamResult, milestoneResult, taskResult] = await Promise.all([
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveWorkspaceScope, workspaceScopeFromHeaders, } from "../helpers/workspace-scope.js";
|
|
2
2
|
import { summarizeTaskStatuses } from "../../reporting/rollups.js";
|
|
3
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
3
4
|
function asRecord(input) {
|
|
4
5
|
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
5
6
|
return null;
|
|
@@ -447,9 +448,9 @@ export function registerLiveMiscRoutes(router, deps) {
|
|
|
447
448
|
let totalActiveAgents = 0;
|
|
448
449
|
for (const initiative of initiatives) {
|
|
449
450
|
totalActiveAgents += initiative.activeAgents;
|
|
450
|
-
// Try to get task statuses from graph
|
|
451
|
+
// Try to get task statuses from graph (skip local placeholder IDs like "agent:orgx")
|
|
451
452
|
let taskStatuses = [];
|
|
452
|
-
if (deps.buildMissionControlGraph) {
|
|
453
|
+
if (deps.buildMissionControlGraph && UUID_RE.test(initiative.id)) {
|
|
453
454
|
try {
|
|
454
455
|
const graphRaw = await deps.buildMissionControlGraph(initiative.id);
|
|
455
456
|
const graph = asRecord(graphRaw);
|
package/dist/mcp-http-handler.js
CHANGED
|
@@ -38,6 +38,8 @@ export const ORGX_MCP_ALLOWED_TOOLS_BY_SCOPE = {
|
|
|
38
38
|
// Stream reassignment is a targeted operational mutation.
|
|
39
39
|
"orgx_reassign_stream",
|
|
40
40
|
"orgx_reassign_streams",
|
|
41
|
+
// Session resume (read-only visibility for operations).
|
|
42
|
+
"orgx_agent_sessions",
|
|
41
43
|
],
|
|
42
44
|
orchestration: [
|
|
43
45
|
...ORGX_BASE_TOOLS,
|
|
@@ -46,6 +48,10 @@ export const ORGX_MCP_ALLOWED_TOOLS_BY_SCOPE = {
|
|
|
46
48
|
"orgx_apply_changeset",
|
|
47
49
|
"orgx_reassign_stream",
|
|
48
50
|
"orgx_reassign_streams",
|
|
51
|
+
// Session resume tools.
|
|
52
|
+
"orgx_agent_sessions",
|
|
53
|
+
"orgx_resume_agent_session",
|
|
54
|
+
"orgx_clear_agent_session",
|
|
49
55
|
],
|
|
50
56
|
};
|
|
51
57
|
function isRecord(value) {
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED