@useorgx/openclaw-plugin 0.4.9 → 0.7.0
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/README.md +35 -0
- package/dashboard/dist/assets/BJgZIVUQ.js +53 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
- package/dashboard/dist/assets/BXWDRGm-.js +1 -0
- package/dashboard/dist/assets/BXWDRGm-.js.br +0 -0
- package/dashboard/dist/assets/BXWDRGm-.js.gz +0 -0
- package/dashboard/dist/assets/BgOYB78t.js +4 -0
- package/dashboard/dist/assets/BgOYB78t.js.br +0 -0
- package/dashboard/dist/assets/BgOYB78t.js.gz +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
- package/dashboard/dist/assets/CE38zU4U.js +1 -0
- package/dashboard/dist/assets/CE38zU4U.js.br +0 -0
- package/dashboard/dist/assets/CE38zU4U.js.gz +0 -0
- package/dashboard/dist/assets/CFGKRAzG.js +1 -0
- package/dashboard/dist/assets/CFGKRAzG.js.br +0 -0
- package/dashboard/dist/assets/CFGKRAzG.js.gz +0 -0
- package/dashboard/dist/assets/CGGR2GZh.js +1 -0
- package/dashboard/dist/assets/CGGR2GZh.js.br +0 -0
- package/dashboard/dist/assets/CGGR2GZh.js.gz +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js +1 -0
- package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
- package/dashboard/dist/assets/CPFiTmlw.js +8 -0
- package/dashboard/dist/assets/CPFiTmlw.js.br +0 -0
- package/dashboard/dist/assets/CPFiTmlw.js.gz +0 -0
- package/dashboard/dist/assets/CZZTvkQZ.js +1 -0
- package/dashboard/dist/assets/CZZTvkQZ.js.br +0 -0
- package/dashboard/dist/assets/CZZTvkQZ.js.gz +0 -0
- package/dashboard/dist/assets/{CpJsfbXo.js → CxQ08qFN.js} +2 -2
- package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
- package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
- package/dashboard/dist/assets/D-bf6hEI.js +213 -0
- package/dashboard/dist/assets/D-bf6hEI.js.br +0 -0
- package/dashboard/dist/assets/D-bf6hEI.js.gz +0 -0
- package/dashboard/dist/assets/DG6y9wJI.js +2 -0
- package/dashboard/dist/assets/DG6y9wJI.js.br +0 -0
- package/dashboard/dist/assets/DG6y9wJI.js.gz +0 -0
- package/dashboard/dist/assets/DNxKz-GV.js +1 -0
- package/dashboard/dist/assets/DNxKz-GV.js.br +0 -0
- package/dashboard/dist/assets/DNxKz-GV.js.gz +0 -0
- package/dashboard/dist/assets/DW_rKUic.js +11 -0
- package/dashboard/dist/assets/DW_rKUic.js.br +0 -0
- package/dashboard/dist/assets/DW_rKUic.js.gz +0 -0
- package/dashboard/dist/assets/DbNoijHm.js +1 -0
- package/dashboard/dist/assets/DbNoijHm.js.br +0 -0
- package/dashboard/dist/assets/DbNoijHm.js.gz +0 -0
- package/dashboard/dist/assets/DjcdE6jC.js +2 -0
- package/dashboard/dist/assets/DjcdE6jC.js.br +0 -0
- package/dashboard/dist/assets/DjcdE6jC.js.gz +0 -0
- package/dashboard/dist/assets/FZYuCDnt.js +1 -0
- package/dashboard/dist/assets/FZYuCDnt.js.br +0 -0
- package/dashboard/dist/assets/FZYuCDnt.js.gz +0 -0
- package/dashboard/dist/assets/PAUiij_z.js +1 -0
- package/dashboard/dist/assets/PAUiij_z.js.br +0 -0
- package/dashboard/dist/assets/PAUiij_z.js.gz +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js +8 -0
- package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
- package/dashboard/dist/assets/h5biQs2I.css +1 -0
- package/dashboard/dist/assets/h5biQs2I.css.br +0 -0
- package/dashboard/dist/assets/h5biQs2I.css.gz +0 -0
- package/dashboard/dist/assets/ic2FaMnh.js +1 -0
- package/dashboard/dist/assets/ic2FaMnh.js.br +0 -0
- package/dashboard/dist/assets/ic2FaMnh.js.gz +0 -0
- package/dashboard/dist/assets/nByHNHoW.js +1 -0
- package/dashboard/dist/assets/nByHNHoW.js.br +0 -0
- package/dashboard/dist/assets/nByHNHoW.js.gz +0 -0
- package/dashboard/dist/assets/qm8xLgv-.css +1 -0
- package/dashboard/dist/assets/qm8xLgv-.css.br +0 -0
- package/dashboard/dist/assets/qm8xLgv-.css.gz +0 -0
- package/dashboard/dist/assets/tS9mbYZi.js +1 -0
- package/dashboard/dist/assets/tS9mbYZi.js.br +0 -0
- package/dashboard/dist/assets/tS9mbYZi.js.gz +0 -0
- package/dashboard/dist/brand/anthropic-mark.svg.br +0 -0
- package/dashboard/dist/brand/anthropic-mark.svg.gz +0 -0
- package/dashboard/dist/brand/openai-mark.svg.br +0 -0
- package/dashboard/dist/brand/openai-mark.svg.gz +0 -0
- package/dashboard/dist/brand/openclaw-mark.svg.br +0 -0
- package/dashboard/dist/brand/openclaw-mark.svg.gz +0 -0
- package/dashboard/dist/brand/xandy-orchestrator.png +0 -0
- package/dashboard/dist/index.html +7 -5
- package/dashboard/dist/index.html.br +0 -0
- package/dashboard/dist/index.html.gz +0 -0
- package/dist/activity-actor-fields.js +26 -4
- package/dist/activity-store.js +34 -8
- package/dist/agent-context-store.js +79 -17
- package/dist/agent-run-store.js +44 -3
- package/dist/agent-suite.d.ts +9 -0
- package/dist/agent-suite.js +149 -9
- package/dist/artifacts/artifact-domain-schemas.d.ts +66 -0
- package/dist/artifacts/artifact-domain-schemas.js +357 -0
- package/dist/artifacts/register-artifact.d.ts +4 -3
- package/dist/artifacts/register-artifact.js +170 -57
- package/dist/chat-store.d.ts +157 -0
- package/dist/chat-store.js +586 -0
- package/dist/cli/orgx.js +11 -0
- package/dist/contracts/client.d.ts +43 -3
- package/dist/contracts/client.js +159 -30
- package/dist/contracts/retro-schema.d.ts +81 -0
- package/dist/contracts/retro-schema.js +80 -0
- package/dist/contracts/shared-types.d.ts +159 -0
- package/dist/contracts/shared-types.js +177 -1
- package/dist/contracts/skill-pack-schema.d.ts +192 -0
- package/dist/contracts/skill-pack-schema.js +180 -0
- package/dist/contracts/types.d.ts +227 -2
- package/dist/entities/auto-assignment.js +43 -17
- package/dist/event-sanitization.d.ts +11 -0
- package/dist/event-sanitization.js +113 -0
- package/dist/fs-utils.js +13 -1
- package/dist/gateway-watchdog.d.ts +5 -0
- package/dist/gateway-watchdog.js +50 -0
- package/dist/hooks/post-reporting-event.mjs +1 -5
- package/dist/http/helpers/activity-headline.js +13 -132
- package/dist/http/helpers/auto-continue-engine.d.ts +198 -10
- package/dist/http/helpers/auto-continue-engine.js +2531 -186
- package/dist/http/helpers/autopilot-operations.d.ts +19 -0
- package/dist/http/helpers/autopilot-operations.js +182 -31
- package/dist/http/helpers/autopilot-runtime.d.ts +1 -0
- package/dist/http/helpers/autopilot-runtime.js +308 -20
- package/dist/http/helpers/autopilot-slice-utils.d.ts +18 -0
- package/dist/http/helpers/autopilot-slice-utils.js +516 -93
- package/dist/http/helpers/decision-mapper.d.ts +40 -0
- package/dist/http/helpers/decision-mapper.js +223 -7
- package/dist/http/helpers/dispatch-lifecycle.d.ts +19 -2
- package/dist/http/helpers/dispatch-lifecycle.js +242 -37
- package/dist/http/helpers/kickoff-context.js +74 -0
- package/dist/http/helpers/llm-client.d.ts +47 -0
- package/dist/http/helpers/llm-client.js +256 -0
- package/dist/http/helpers/mission-control.d.ts +102 -3
- package/dist/http/helpers/mission-control.js +498 -9
- package/dist/http/helpers/sentinel-catalog.d.ts +23 -0
- package/dist/http/helpers/sentinel-catalog.js +193 -0
- package/dist/http/helpers/session-classification.d.ts +9 -0
- package/dist/http/helpers/session-classification.js +564 -0
- package/dist/http/helpers/slice-experience-v2.d.ts +137 -0
- package/dist/http/helpers/slice-experience-v2.js +677 -0
- package/dist/http/helpers/slice-run-projections.d.ts +72 -0
- package/dist/http/helpers/slice-run-projections.js +860 -0
- package/dist/http/helpers/triage-mapper.d.ts +43 -0
- package/dist/http/helpers/triage-mapper.js +549 -0
- package/dist/http/helpers/value-utils.js +7 -2
- package/dist/http/helpers/workspace-scope.d.ts +15 -0
- package/dist/http/helpers/workspace-scope.js +170 -0
- package/dist/http/index.js +1354 -97
- package/dist/http/routes/agent-suite.d.ts +9 -0
- package/dist/http/routes/agent-suite.js +207 -8
- package/dist/http/routes/agents-catalog.js +64 -19
- package/dist/http/routes/chat.d.ts +19 -0
- package/dist/http/routes/chat.js +522 -0
- package/dist/http/routes/decision-actions.d.ts +8 -1
- package/dist/http/routes/decision-actions.js +42 -5
- package/dist/http/routes/dispatch-gateway-envelope.d.ts +25 -0
- package/dist/http/routes/dispatch-gateway-envelope.js +26 -0
- package/dist/http/routes/entities.d.ts +16 -0
- package/dist/http/routes/entities.js +294 -6
- package/dist/http/routes/live-legacy.d.ts +5 -0
- package/dist/http/routes/live-legacy.js +23 -509
- package/dist/http/routes/live-misc.d.ts +12 -0
- package/dist/http/routes/live-misc.js +251 -31
- package/dist/http/routes/live-snapshot.d.ts +48 -2
- package/dist/http/routes/live-snapshot.js +638 -19
- package/dist/http/routes/live-terminal.d.ts +11 -0
- package/dist/http/routes/live-terminal.js +261 -0
- package/dist/http/routes/live-triage.d.ts +61 -0
- package/dist/http/routes/live-triage.js +248 -0
- package/dist/http/routes/mission-control-actions.d.ts +49 -1
- package/dist/http/routes/mission-control-actions.js +1334 -84
- package/dist/http/routes/mission-control-read.d.ts +48 -3
- package/dist/http/routes/mission-control-read.js +1593 -20
- package/dist/http/routes/realtime-orchestrator.d.ts +10 -0
- package/dist/http/routes/realtime-orchestrator.js +74 -0
- package/dist/http/routes/run-control.d.ts +5 -2
- package/dist/http/routes/run-control.js +10 -0
- package/dist/http/routes/sentinels-catalog.d.ts +7 -0
- package/dist/http/routes/sentinels-catalog.js +24 -0
- package/dist/http/routes/summary.js +10 -3
- package/dist/http/routes/usage.d.ts +24 -0
- package/dist/http/routes/usage.js +362 -0
- package/dist/http/routes/work-artifacts.js +28 -9
- package/dist/index.js +165 -27
- package/dist/local-openclaw.js +29 -6
- package/dist/mcp-client-setup.js +3 -3
- package/dist/mcp-http-handler.js +33 -59
- package/dist/next-up-queue-store.d.ts +16 -1
- package/dist/next-up-queue-store.js +89 -7
- package/dist/outbox.d.ts +5 -0
- package/dist/outbox.js +113 -9
- package/dist/paths.js +24 -5
- package/dist/reporting/rollups.d.ts +53 -0
- package/dist/reporting/rollups.js +148 -0
- package/dist/retro/domain-templates.d.ts +45 -0
- package/dist/retro/domain-templates.js +297 -0
- package/dist/retro/quality-rubric.d.ts +33 -0
- package/dist/retro/quality-rubric.js +213 -0
- package/dist/runtime-cleanup.d.ts +18 -0
- package/dist/runtime-cleanup.js +87 -0
- package/dist/services/background.d.ts +11 -0
- package/dist/services/background.js +22 -0
- package/dist/services/experiment-randomization.d.ts +21 -0
- package/dist/services/experiment-randomization.js +63 -0
- package/dist/skill-pack-state.d.ts +36 -5
- package/dist/skill-pack-state.js +273 -29
- package/dist/sync/local-agent-telemetry.d.ts +13 -0
- package/dist/sync/local-agent-telemetry.js +128 -0
- package/dist/sync/outbox-replay.js +131 -24
- package/dist/team-context-store.d.ts +23 -0
- package/dist/team-context-store.js +116 -0
- package/dist/telemetry/posthog.js +4 -2
- package/dist/tools/core-tools.d.ts +10 -14
- package/dist/tools/core-tools.js +1289 -24
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -0
- package/dist/worker-supervisor.js +23 -0
- package/package.json +14 -4
- package/dashboard/dist/assets/B3ziCA02.js +0 -8
- package/dashboard/dist/assets/B5NEElEI.css +0 -1
- package/dashboard/dist/assets/BhapSNAs.js +0 -215
- package/dashboard/dist/assets/iFdvE7lx.js +0 -1
- package/dashboard/dist/assets/jRJsmpYM.js +0 -1
- package/dashboard/dist/assets/sAhvFnpk.js +0 -4
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
const ALL_SCOPE_TOKENS = new Set(["all", "__all__", "*"]);
|
|
2
|
+
function normalizeScopeId(value) {
|
|
3
|
+
if (Array.isArray(value)) {
|
|
4
|
+
for (const entry of value) {
|
|
5
|
+
const normalized = normalizeScopeId(entry);
|
|
6
|
+
if (normalized)
|
|
7
|
+
return normalized;
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
if (typeof value !== "string")
|
|
12
|
+
return null;
|
|
13
|
+
const trimmed = value.trim();
|
|
14
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
15
|
+
}
|
|
16
|
+
function readScopeValue(input, keys) {
|
|
17
|
+
if (!input)
|
|
18
|
+
return null;
|
|
19
|
+
if (input instanceof URLSearchParams) {
|
|
20
|
+
for (const key of keys) {
|
|
21
|
+
const value = normalizeScopeId(input.get(key));
|
|
22
|
+
if (value)
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
for (const key of keys) {
|
|
28
|
+
const value = normalizeScopeId(input[key]);
|
|
29
|
+
if (value)
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
function isAllScopeToken(value) {
|
|
35
|
+
if (typeof value !== "string")
|
|
36
|
+
return false;
|
|
37
|
+
const normalized = value.trim().toLowerCase();
|
|
38
|
+
return ALL_SCOPE_TOKENS.has(normalized);
|
|
39
|
+
}
|
|
40
|
+
function readWorkspaceCandidates(input) {
|
|
41
|
+
return {
|
|
42
|
+
workspaceId: readScopeValue(input, [
|
|
43
|
+
"workspace_id",
|
|
44
|
+
"workspaceId",
|
|
45
|
+
"x-orgx-workspace-id",
|
|
46
|
+
"x_orgx_workspace_id",
|
|
47
|
+
]),
|
|
48
|
+
commandCenterId: readScopeValue(input, [
|
|
49
|
+
"command_center_id",
|
|
50
|
+
"commandCenterId",
|
|
51
|
+
"x-orgx-command-center-id",
|
|
52
|
+
"x_orgx_command_center_id",
|
|
53
|
+
]),
|
|
54
|
+
centerId: readScopeValue(input, ["center"]),
|
|
55
|
+
projectId: readScopeValue(input, ["project_id", "projectId"]),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function workspaceScopeFromHeaders(headers) {
|
|
59
|
+
if (!headers || typeof headers !== "object")
|
|
60
|
+
return null;
|
|
61
|
+
const workspaceId = readScopeValue(headers, [
|
|
62
|
+
"workspace_id",
|
|
63
|
+
"workspaceId",
|
|
64
|
+
"x-orgx-workspace-id",
|
|
65
|
+
"x_orgx_workspace_id",
|
|
66
|
+
]);
|
|
67
|
+
const commandCenterId = readScopeValue(headers, [
|
|
68
|
+
"command_center_id",
|
|
69
|
+
"commandCenterId",
|
|
70
|
+
"x-orgx-command-center-id",
|
|
71
|
+
"x_orgx_command_center_id",
|
|
72
|
+
]);
|
|
73
|
+
if (workspaceId && commandCenterId && workspaceId !== commandCenterId) {
|
|
74
|
+
return {
|
|
75
|
+
workspace_id: workspaceId,
|
|
76
|
+
command_center_id: commandCenterId,
|
|
77
|
+
center: workspaceId,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const canonical = workspaceId ?? commandCenterId;
|
|
81
|
+
if (!canonical)
|
|
82
|
+
return null;
|
|
83
|
+
return {
|
|
84
|
+
workspace_id: canonical,
|
|
85
|
+
command_center_id: canonical,
|
|
86
|
+
center: canonical,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function mergeCandidates(payloadCandidates, queryCandidates) {
|
|
90
|
+
return {
|
|
91
|
+
workspaceId: payloadCandidates.workspaceId ?? queryCandidates.workspaceId,
|
|
92
|
+
commandCenterId: payloadCandidates.commandCenterId ?? queryCandidates.commandCenterId,
|
|
93
|
+
centerId: payloadCandidates.centerId ?? queryCandidates.centerId,
|
|
94
|
+
projectId: payloadCandidates.projectId ?? queryCandidates.projectId,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export function resolveWorkspaceScope(query, payload, options) {
|
|
98
|
+
const merged = mergeCandidates(readWorkspaceCandidates(payload ?? null), readWorkspaceCandidates(query));
|
|
99
|
+
const allowProjectScope = Boolean(options?.allowProjectScope);
|
|
100
|
+
const canonical = merged.workspaceId ?? merged.commandCenterId ?? merged.centerId;
|
|
101
|
+
if (merged.workspaceId &&
|
|
102
|
+
merged.commandCenterId &&
|
|
103
|
+
merged.workspaceId !== merged.commandCenterId) {
|
|
104
|
+
return {
|
|
105
|
+
workspaceId: null,
|
|
106
|
+
error: "workspace_id and command_center_id must match when both are provided",
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (canonical && merged.centerId && canonical !== merged.centerId) {
|
|
110
|
+
return {
|
|
111
|
+
workspaceId: null,
|
|
112
|
+
error: "center must match workspace_id/command_center_id when combined",
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (canonical && merged.projectId && canonical !== merged.projectId) {
|
|
116
|
+
return {
|
|
117
|
+
workspaceId: null,
|
|
118
|
+
error: "project_id cannot be combined with a different workspace scope identifier",
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
if (canonical && isAllScopeToken(canonical)) {
|
|
122
|
+
return {
|
|
123
|
+
workspaceId: null,
|
|
124
|
+
isAll: true,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (canonical) {
|
|
128
|
+
return { workspaceId: canonical };
|
|
129
|
+
}
|
|
130
|
+
if (merged.projectId) {
|
|
131
|
+
if (isAllScopeToken(merged.projectId)) {
|
|
132
|
+
return {
|
|
133
|
+
workspaceId: null,
|
|
134
|
+
isAll: true,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (!allowProjectScope) {
|
|
138
|
+
return {
|
|
139
|
+
workspaceId: null,
|
|
140
|
+
error: "project_id is no longer accepted for workspace scope; use workspace_id (or command_center_id alias)",
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
workspaceId: merged.projectId,
|
|
145
|
+
usedLegacyProjectScope: true,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
return { workspaceId: null };
|
|
149
|
+
}
|
|
150
|
+
export function setCanonicalWorkspaceScopeParams(params, workspaceId, options) {
|
|
151
|
+
params.delete("project_id");
|
|
152
|
+
params.delete("projectId");
|
|
153
|
+
const normalized = normalizeScopeId(workspaceId);
|
|
154
|
+
if (!normalized) {
|
|
155
|
+
if (options?.allTokenWhenMissing) {
|
|
156
|
+
params.set("workspace_id", "all");
|
|
157
|
+
params.set("command_center_id", "all");
|
|
158
|
+
params.set("center", "all");
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
params.delete("workspace_id");
|
|
162
|
+
params.delete("command_center_id");
|
|
163
|
+
params.delete("center");
|
|
164
|
+
}
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
params.set("workspace_id", normalized);
|
|
168
|
+
params.set("command_center_id", normalized);
|
|
169
|
+
params.set("center", normalized);
|
|
170
|
+
}
|