@useorgx/openclaw-plugin 0.4.8 → 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 +38 -26
- package/dist/agent-context-store.js +84 -42
- package/dist/agent-run-store.js +49 -28
- package/dist/agent-suite.d.ts +9 -0
- package/dist/agent-suite.js +150 -17
- 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/auth/flows.d.ts +47 -0
- package/dist/auth/flows.js +169 -0
- package/dist/auth-store.js +6 -26
- package/dist/byok-store.js +5 -19
- package/dist/chat-store.d.ts +157 -0
- package/dist/chat-store.js +586 -0
- package/dist/cli/orgx.d.ts +66 -0
- package/dist/cli/orgx.js +102 -0
- package/dist/config/refresh.d.ts +32 -0
- package/dist/config/refresh.js +55 -0
- package/dist/config/resolution.d.ts +37 -0
- package/dist/config/resolution.js +178 -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 +306 -0
- package/dist/contracts/shared-types.js +179 -0
- 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 +224 -132
- package/dist/contracts/types.js +5 -0
- package/dist/entities/auto-assignment.d.ts +36 -0
- package/dist/entities/auto-assignment.js +141 -0
- package/dist/entity-comment-store.js +5 -25
- 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/hash-utils.d.ts +2 -0
- package/dist/hash-utils.js +12 -0
- package/dist/hooks/post-reporting-event.mjs +1 -5
- package/dist/http/helpers/activity-headline.d.ts +10 -0
- package/dist/http/helpers/activity-headline.js +73 -0
- package/dist/http/helpers/artifact-fallback.d.ts +13 -0
- package/dist/http/helpers/artifact-fallback.js +148 -0
- package/dist/http/helpers/auto-continue-engine.d.ts +486 -0
- package/dist/http/helpers/auto-continue-engine.js +3563 -0
- package/dist/http/helpers/autopilot-operations.d.ts +176 -0
- package/dist/http/helpers/autopilot-operations.js +554 -0
- package/dist/http/helpers/autopilot-runtime.d.ts +43 -0
- package/dist/http/helpers/autopilot-runtime.js +607 -0
- package/dist/http/helpers/autopilot-slice-utils.d.ts +56 -0
- package/dist/http/helpers/autopilot-slice-utils.js +899 -0
- package/dist/http/helpers/decision-mapper.d.ts +52 -0
- package/dist/http/helpers/decision-mapper.js +260 -0
- package/dist/http/helpers/dispatch-lifecycle.d.ts +119 -0
- package/dist/http/helpers/dispatch-lifecycle.js +809 -0
- package/dist/http/helpers/hash-utils.d.ts +1 -0
- package/dist/http/helpers/hash-utils.js +1 -0
- package/dist/http/helpers/kickoff-context.d.ts +12 -0
- package/dist/http/helpers/kickoff-context.js +228 -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 +193 -0
- package/dist/http/helpers/mission-control.js +1383 -0
- package/dist/http/helpers/openclaw-cli.d.ts +37 -0
- package/dist/http/helpers/openclaw-cli.js +283 -0
- package/dist/http/helpers/runtime-sse.d.ts +20 -0
- package/dist/http/helpers/runtime-sse.js +110 -0
- 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.d.ts +6 -0
- package/dist/http/helpers/value-utils.js +72 -0
- package/dist/http/helpers/workspace-scope.d.ts +15 -0
- package/dist/http/helpers/workspace-scope.js +170 -0
- package/dist/http/index.d.ts +88 -0
- package/dist/http/index.js +3610 -0
- package/dist/http/router.d.ts +23 -0
- package/dist/http/router.js +23 -0
- package/dist/http/routes/agent-control.d.ts +79 -0
- package/dist/http/routes/agent-control.js +684 -0
- package/dist/http/routes/agent-suite.d.ts +38 -0
- package/dist/http/routes/agent-suite.js +397 -0
- package/dist/http/routes/agents-catalog.d.ts +40 -0
- package/dist/http/routes/agents-catalog.js +128 -0
- package/dist/http/routes/billing.d.ts +23 -0
- package/dist/http/routes/billing.js +55 -0
- package/dist/http/routes/chat.d.ts +19 -0
- package/dist/http/routes/chat.js +522 -0
- package/dist/http/routes/debug.d.ts +14 -0
- package/dist/http/routes/debug.js +21 -0
- package/dist/http/routes/decision-actions.d.ts +20 -0
- package/dist/http/routes/decision-actions.js +103 -0
- package/dist/http/routes/delegation.d.ts +19 -0
- package/dist/http/routes/delegation.js +32 -0
- 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 +63 -0
- package/dist/http/routes/entities.js +440 -0
- package/dist/http/routes/entity-dynamic.d.ts +25 -0
- package/dist/http/routes/entity-dynamic.js +191 -0
- package/dist/http/routes/health.d.ts +22 -0
- package/dist/http/routes/health.js +49 -0
- package/dist/http/routes/live-legacy.d.ts +115 -0
- package/dist/http/routes/live-legacy.js +112 -0
- package/dist/http/routes/live-misc.d.ts +81 -0
- package/dist/http/routes/live-misc.js +426 -0
- package/dist/http/routes/live-snapshot.d.ts +136 -0
- package/dist/http/routes/live-snapshot.js +916 -0
- 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 +131 -0
- package/dist/http/routes/mission-control-actions.js +1791 -0
- package/dist/http/routes/mission-control-read.d.ts +73 -0
- package/dist/http/routes/mission-control-read.js +1640 -0
- package/dist/http/routes/onboarding.d.ts +34 -0
- package/dist/http/routes/onboarding.js +101 -0
- 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 +27 -0
- package/dist/http/routes/run-control.js +96 -0
- package/dist/http/routes/runtime-hooks.d.ts +69 -0
- package/dist/http/routes/runtime-hooks.js +437 -0
- package/dist/http/routes/sentinels-catalog.d.ts +7 -0
- package/dist/http/routes/sentinels-catalog.js +24 -0
- package/dist/http/routes/settings-byok.d.ts +23 -0
- package/dist/http/routes/settings-byok.js +163 -0
- package/dist/http/routes/summary.d.ts +18 -0
- package/dist/http/routes/summary.js +49 -0
- package/dist/http/routes/usage.d.ts +24 -0
- package/dist/http/routes/usage.js +362 -0
- package/dist/http/routes/work-artifacts.d.ts +9 -0
- package/dist/http/routes/work-artifacts.js +55 -0
- package/dist/http/shared-state.d.ts +16 -0
- package/dist/http/shared-state.js +1 -0
- package/dist/http-handler.d.ts +1 -88
- package/dist/http-handler.js +1 -10605
- package/dist/index.js +287 -2284
- package/dist/json-utils.d.ts +1 -0
- package/dist/json-utils.js +8 -0
- 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 +93 -25
- 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/runtime-instance-store.js +5 -31
- package/dist/services/background.d.ts +34 -0
- package/dist/services/background.js +45 -0
- package/dist/services/experiment-randomization.d.ts +21 -0
- package/dist/services/experiment-randomization.js +63 -0
- package/dist/services/instrumentation.d.ts +29 -0
- package/dist/services/instrumentation.js +136 -0
- package/dist/skill-pack-state.d.ts +36 -5
- package/dist/skill-pack-state.js +273 -29
- package/dist/snapshot-store.js +5 -25
- package/dist/stores/json-store.d.ts +11 -0
- package/dist/stores/json-store.js +42 -0
- package/dist/sync/local-agent-telemetry.d.ts +13 -0
- package/dist/sync/local-agent-telemetry.js +128 -0
- package/dist/sync/outbox-replay.d.ts +55 -0
- package/dist/sync/outbox-replay.js +621 -0
- 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 +72 -0
- package/dist/tools/core-tools.js +2270 -0
- 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/BNeJ0kpF.js +0 -1
- package/dashboard/dist/assets/BzkiMPmM.js +0 -215
- package/dashboard/dist/assets/CUV9IHHi.js +0 -1
- package/dashboard/dist/assets/Ie7d9Iq2.css +0 -1
- package/dashboard/dist/assets/sAhvFnpk.js +0 -4
package/dist/agent-suite.js
CHANGED
|
@@ -3,6 +3,7 @@ import { existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
|
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { writeFileAtomicSync } from "./fs-utils.js";
|
|
6
|
+
import { parseJsonSafe } from "./json-utils.js";
|
|
6
7
|
import { getOpenClawDir } from "./paths.js";
|
|
7
8
|
export const ORGX_AGENT_SUITE_PACK_ID = "orgx-agent-suite";
|
|
8
9
|
export const ORGX_AGENT_SUITE_AGENTS = [
|
|
@@ -29,14 +30,6 @@ const SUITE_FILES = [
|
|
|
29
30
|
function isRecord(value) {
|
|
30
31
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
31
32
|
}
|
|
32
|
-
function parseJsonSafe(raw) {
|
|
33
|
-
try {
|
|
34
|
-
return JSON.parse(raw);
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
33
|
function isSafeAgentId(value) {
|
|
41
34
|
const trimmed = value.trim();
|
|
42
35
|
if (!trimmed)
|
|
@@ -116,6 +109,19 @@ function loadTextFile(path) {
|
|
|
116
109
|
function normalizeNewlines(value) {
|
|
117
110
|
return value.replace(/\r\n/g, "\n");
|
|
118
111
|
}
|
|
112
|
+
function readFileMtimeMs(path) {
|
|
113
|
+
try {
|
|
114
|
+
if (!existsSync(path))
|
|
115
|
+
return null;
|
|
116
|
+
return statSync(path).mtimeMs;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function roundRate(value) {
|
|
123
|
+
return Number(value.toFixed(3));
|
|
124
|
+
}
|
|
119
125
|
function domainPersona(domain) {
|
|
120
126
|
switch (domain) {
|
|
121
127
|
case "engineering":
|
|
@@ -124,7 +130,12 @@ function domainPersona(domain) {
|
|
|
124
130
|
voice: ["Direct, calm, technical.", "Prefer concrete evidence over confidence."],
|
|
125
131
|
autonomy: ["Default to implementing the fix.", "Escalate only when a decision is truly required."],
|
|
126
132
|
care: ["Respect time: minimize churn and surprises.", "Explain tradeoffs without lecturing."],
|
|
127
|
-
defaults: [
|
|
133
|
+
defaults: [
|
|
134
|
+
"Reproduce before fixing.",
|
|
135
|
+
"Add tests when feasible.",
|
|
136
|
+
"Keep diffs small.",
|
|
137
|
+
"Register artifacts as engineering.commit with commit_sha and verification signals.",
|
|
138
|
+
],
|
|
128
139
|
};
|
|
129
140
|
case "product":
|
|
130
141
|
return {
|
|
@@ -132,7 +143,12 @@ function domainPersona(domain) {
|
|
|
132
143
|
voice: ["Clear, structured, user-centered.", "Make decisions explicit; avoid fuzzy scope."],
|
|
133
144
|
autonomy: ["Propose a smallest viable slice.", "Write acceptance criteria before building."],
|
|
134
145
|
care: ["Call out risks and non-goals early.", "Optimize for the user's confidence and clarity."],
|
|
135
|
-
defaults: [
|
|
146
|
+
defaults: [
|
|
147
|
+
"Define success metrics.",
|
|
148
|
+
"Document assumptions.",
|
|
149
|
+
"Keep language concrete.",
|
|
150
|
+
"Register artifacts as product.spec with acceptance_criteria and success_metric.",
|
|
151
|
+
],
|
|
136
152
|
};
|
|
137
153
|
case "design":
|
|
138
154
|
return {
|
|
@@ -140,7 +156,12 @@ function domainPersona(domain) {
|
|
|
140
156
|
voice: ["Precise, opinionated, kind.", "Avoid generic UI patterns and 'AI slop'."],
|
|
141
157
|
autonomy: ["Iterate fast with constraints.", "Verify mobile + critical states."],
|
|
142
158
|
care: ["Protect coherence of the design system.", "Prioritize accessibility as a baseline."],
|
|
143
|
-
defaults: [
|
|
159
|
+
defaults: [
|
|
160
|
+
"Use tokens.",
|
|
161
|
+
"Avoid new visual language.",
|
|
162
|
+
"Capture QA evidence.",
|
|
163
|
+
"Register artifacts as design.component with evidence_url and tokens_referenced.",
|
|
164
|
+
],
|
|
144
165
|
};
|
|
145
166
|
case "marketing":
|
|
146
167
|
return {
|
|
@@ -148,7 +169,11 @@ function domainPersona(domain) {
|
|
|
148
169
|
voice: ["Specific, energetic, grounded in reality.", "No generic claims without proof."],
|
|
149
170
|
autonomy: ["Pick a target audience and promise.", "Deliver channel-ready outputs."],
|
|
150
171
|
care: ["Avoid hype that creates trust debt.", "Respect brand voice; keep it crisp."],
|
|
151
|
-
defaults: [
|
|
172
|
+
defaults: [
|
|
173
|
+
"Audience -> promise -> proof -> CTA.",
|
|
174
|
+
"Include measurement hooks.",
|
|
175
|
+
"Register artifacts as marketing.asset with audience, channel, and measurement_hook.",
|
|
176
|
+
],
|
|
152
177
|
};
|
|
153
178
|
case "sales":
|
|
154
179
|
return {
|
|
@@ -156,7 +181,11 @@ function domainPersona(domain) {
|
|
|
156
181
|
voice: ["Concise, empathetic, commercially sharp.", "Anticipate objections; answer plainly."],
|
|
157
182
|
autonomy: ["Start with ICP + disqualifiers.", "Write talk tracks that sound human."],
|
|
158
183
|
care: ["Never overclaim.", "Optimize for trust and next steps."],
|
|
159
|
-
defaults: [
|
|
184
|
+
defaults: [
|
|
185
|
+
"MEDDIC-style qualification.",
|
|
186
|
+
"Objection handling + CTA.",
|
|
187
|
+
"Register artifacts as sales.qualification with buyer_stage and next_action.",
|
|
188
|
+
],
|
|
160
189
|
};
|
|
161
190
|
case "operations":
|
|
162
191
|
return {
|
|
@@ -164,7 +193,12 @@ function domainPersona(domain) {
|
|
|
164
193
|
voice: ["Cautious, thorough, pragmatic.", "Prefer runbooks over heroics."],
|
|
165
194
|
autonomy: ["Default to reversible changes.", "Add guardrails before speed."],
|
|
166
195
|
care: ["Assume production is fragile unless proven otherwise.", "Reduce on-call burden."],
|
|
167
|
-
defaults: [
|
|
196
|
+
defaults: [
|
|
197
|
+
"Rollback paths.",
|
|
198
|
+
"Detection + alerting.",
|
|
199
|
+
"Post-incident learning.",
|
|
200
|
+
"Register artifacts as operations.runbook with rollback_path and affected_systems.",
|
|
201
|
+
],
|
|
168
202
|
};
|
|
169
203
|
case "orchestration":
|
|
170
204
|
return {
|
|
@@ -172,7 +206,12 @@ function domainPersona(domain) {
|
|
|
172
206
|
voice: ["Structured, decisive, transparent.", "Keep boundaries straight (OrgX vs OpenClaw vs plugin)."],
|
|
173
207
|
autonomy: ["Decompose into verifiable tasks.", "Sequence work to keep momentum."],
|
|
174
208
|
care: ["Minimize context switching.", "Keep stakeholders informed."],
|
|
175
|
-
defaults: [
|
|
209
|
+
defaults: [
|
|
210
|
+
"One unverified item at a time.",
|
|
211
|
+
"Reference the canonical plan.",
|
|
212
|
+
"Update statuses with proof.",
|
|
213
|
+
"Register artifacts as orchestration.routing with rationale and unblocked_work.",
|
|
214
|
+
],
|
|
176
215
|
};
|
|
177
216
|
default:
|
|
178
217
|
return {
|
|
@@ -225,6 +264,11 @@ function buildManagedFileContent(input) {
|
|
|
225
264
|
"orgx_register_artifact",
|
|
226
265
|
"orgx_request_decision",
|
|
227
266
|
"orgx_spawn_check",
|
|
267
|
+
"orgx_quality_score",
|
|
268
|
+
"orgx_proof_status",
|
|
269
|
+
"orgx_record_outcome",
|
|
270
|
+
"orgx_get_outcome_attribution",
|
|
271
|
+
"orgx_verify_completion",
|
|
228
272
|
],
|
|
229
273
|
product: [
|
|
230
274
|
"orgx_status",
|
|
@@ -234,6 +278,11 @@ function buildManagedFileContent(input) {
|
|
|
234
278
|
"orgx_register_artifact",
|
|
235
279
|
"orgx_request_decision",
|
|
236
280
|
"orgx_spawn_check",
|
|
281
|
+
"orgx_quality_score",
|
|
282
|
+
"orgx_proof_status",
|
|
283
|
+
"orgx_record_outcome",
|
|
284
|
+
"orgx_get_outcome_attribution",
|
|
285
|
+
"orgx_verify_completion",
|
|
237
286
|
],
|
|
238
287
|
design: [
|
|
239
288
|
"orgx_status",
|
|
@@ -243,6 +292,11 @@ function buildManagedFileContent(input) {
|
|
|
243
292
|
"orgx_register_artifact",
|
|
244
293
|
"orgx_request_decision",
|
|
245
294
|
"orgx_spawn_check",
|
|
295
|
+
"orgx_quality_score",
|
|
296
|
+
"orgx_proof_status",
|
|
297
|
+
"orgx_record_outcome",
|
|
298
|
+
"orgx_get_outcome_attribution",
|
|
299
|
+
"orgx_verify_completion",
|
|
246
300
|
],
|
|
247
301
|
marketing: [
|
|
248
302
|
"orgx_status",
|
|
@@ -252,6 +306,11 @@ function buildManagedFileContent(input) {
|
|
|
252
306
|
"orgx_register_artifact",
|
|
253
307
|
"orgx_request_decision",
|
|
254
308
|
"orgx_spawn_check",
|
|
309
|
+
"orgx_quality_score",
|
|
310
|
+
"orgx_proof_status",
|
|
311
|
+
"orgx_record_outcome",
|
|
312
|
+
"orgx_get_outcome_attribution",
|
|
313
|
+
"orgx_verify_completion",
|
|
255
314
|
],
|
|
256
315
|
sales: [
|
|
257
316
|
"orgx_status",
|
|
@@ -261,6 +320,11 @@ function buildManagedFileContent(input) {
|
|
|
261
320
|
"orgx_register_artifact",
|
|
262
321
|
"orgx_request_decision",
|
|
263
322
|
"orgx_spawn_check",
|
|
323
|
+
"orgx_quality_score",
|
|
324
|
+
"orgx_proof_status",
|
|
325
|
+
"orgx_record_outcome",
|
|
326
|
+
"orgx_get_outcome_attribution",
|
|
327
|
+
"orgx_verify_completion",
|
|
264
328
|
],
|
|
265
329
|
operations: [
|
|
266
330
|
"orgx_status",
|
|
@@ -270,7 +334,13 @@ function buildManagedFileContent(input) {
|
|
|
270
334
|
"orgx_register_artifact",
|
|
271
335
|
"orgx_request_decision",
|
|
272
336
|
"orgx_spawn_check",
|
|
337
|
+
"orgx_quality_score",
|
|
338
|
+
"orgx_proof_status",
|
|
339
|
+
"orgx_record_outcome",
|
|
340
|
+
"orgx_get_outcome_attribution",
|
|
341
|
+
"orgx_verify_completion",
|
|
273
342
|
"orgx_apply_changeset",
|
|
343
|
+
"orgx_reassign_stream",
|
|
274
344
|
],
|
|
275
345
|
orchestration: [
|
|
276
346
|
"orgx_status",
|
|
@@ -280,7 +350,13 @@ function buildManagedFileContent(input) {
|
|
|
280
350
|
"orgx_register_artifact",
|
|
281
351
|
"orgx_request_decision",
|
|
282
352
|
"orgx_spawn_check",
|
|
353
|
+
"orgx_quality_score",
|
|
354
|
+
"orgx_proof_status",
|
|
355
|
+
"orgx_record_outcome",
|
|
356
|
+
"orgx_get_outcome_attribution",
|
|
357
|
+
"orgx_verify_completion",
|
|
283
358
|
"orgx_apply_changeset",
|
|
359
|
+
"orgx_reassign_stream",
|
|
284
360
|
],
|
|
285
361
|
};
|
|
286
362
|
const scopeKey = `orgx-openclaw-${input.agent.domain}`;
|
|
@@ -295,6 +371,12 @@ function buildManagedFileContent(input) {
|
|
|
295
371
|
"- orgx_register_artifact",
|
|
296
372
|
"- orgx_request_decision",
|
|
297
373
|
"- orgx_spawn_check",
|
|
374
|
+
"- orgx_quality_score",
|
|
375
|
+
"- orgx_proof_status",
|
|
376
|
+
"- orgx_record_outcome",
|
|
377
|
+
"- orgx_get_outcome_attribution",
|
|
378
|
+
"- orgx_verify_completion",
|
|
379
|
+
"- orgx_reassign_stream",
|
|
298
380
|
"",
|
|
299
381
|
"## Scoped MCP (Recommended)",
|
|
300
382
|
`If your client supports MCP server selection, prefer the scoped server key: \`${scopeKey}\`.`,
|
|
@@ -306,6 +388,7 @@ function buildManagedFileContent(input) {
|
|
|
306
388
|
"Rules:",
|
|
307
389
|
"- Return structured JSON for tool outputs when applicable.",
|
|
308
390
|
"- Do not print secrets (API keys, tokens, cookies). Mask as `oxk_...abcd`.",
|
|
391
|
+
"- When calling `orgx_register_artifact`, self-assess and include `confidence_score` in [0,1].",
|
|
309
392
|
"- If a tool fails, capture the exact error and fix root cause.",
|
|
310
393
|
"- Prefer dry-run/previews when writing to user config.",
|
|
311
394
|
"",
|
|
@@ -400,6 +483,12 @@ function buildManagedFileContent(input) {
|
|
|
400
483
|
"- Avoid destructive git ops unless explicitly requested.",
|
|
401
484
|
"- Keep scope tight: do the asked work, then stop.",
|
|
402
485
|
"",
|
|
486
|
+
"## Team Awareness",
|
|
487
|
+
"- Your prompt may include a \"Team Activity\" section showing other agents' recent work.",
|
|
488
|
+
"- Reference team outputs naturally when relevant (\"Building on the auth endpoints\" not \"The Engineering agent completed...\").",
|
|
489
|
+
"- If your task connects to recent team work, mention the connection briefly.",
|
|
490
|
+
"- Do not duplicate work another agent has completed.",
|
|
491
|
+
"",
|
|
403
492
|
"## Provenance",
|
|
404
493
|
`- ${provenance}`,
|
|
405
494
|
"",
|
|
@@ -473,7 +562,7 @@ export function computeOrgxAgentSuitePlan(input) {
|
|
|
473
562
|
const { path: cfgPath, parsed } = readOpenclawConfig(openclawDir);
|
|
474
563
|
const suiteWorkspaceRoot = resolveSuiteWorkspaceRoot(parsed);
|
|
475
564
|
const upsert = upsertSuiteAgentsIntoConfig({ openclaw: parsed, suiteWorkspaceRoot });
|
|
476
|
-
const
|
|
565
|
+
const baseAgents = ORGX_AGENT_SUITE_AGENTS.map((agent) => {
|
|
477
566
|
const workspace = join(suiteWorkspaceRoot, agent.id);
|
|
478
567
|
const list = Array.isArray(parsed?.agents?.list) ? parsed?.agents?.list : [];
|
|
479
568
|
const configured = list.some((entry) => String(entry?.id ?? "").trim() === agent.id);
|
|
@@ -485,7 +574,8 @@ export function computeOrgxAgentSuitePlan(input) {
|
|
|
485
574
|
};
|
|
486
575
|
});
|
|
487
576
|
const workspaceFiles = [];
|
|
488
|
-
|
|
577
|
+
const healthStats = new Map();
|
|
578
|
+
for (const agent of baseAgents) {
|
|
489
579
|
for (const file of SUITE_FILES) {
|
|
490
580
|
const managedPath = join(agent.workspace, SUITE_MANAGED_DIR, file);
|
|
491
581
|
const localPath = join(agent.workspace, SUITE_LOCAL_DIR, file);
|
|
@@ -516,8 +606,51 @@ export function computeOrgxAgentSuitePlan(input) {
|
|
|
516
606
|
compositePath,
|
|
517
607
|
action,
|
|
518
608
|
});
|
|
609
|
+
const stats = healthStats.get(agent.id) ?? {
|
|
610
|
+
totalChecks: 0,
|
|
611
|
+
passedChecks: 0,
|
|
612
|
+
failedChecks: 0,
|
|
613
|
+
lastChangedMs: null,
|
|
614
|
+
};
|
|
615
|
+
stats.totalChecks += 1;
|
|
616
|
+
if (action === "noop") {
|
|
617
|
+
stats.passedChecks += 1;
|
|
618
|
+
}
|
|
619
|
+
if (action === "conflict") {
|
|
620
|
+
stats.failedChecks += 1;
|
|
621
|
+
}
|
|
622
|
+
const changedMs = readFileMtimeMs(compositePath);
|
|
623
|
+
if (typeof changedMs === "number" && (stats.lastChangedMs == null || changedMs > stats.lastChangedMs)) {
|
|
624
|
+
stats.lastChangedMs = changedMs;
|
|
625
|
+
}
|
|
626
|
+
healthStats.set(agent.id, stats);
|
|
519
627
|
}
|
|
520
628
|
}
|
|
629
|
+
const agents = baseAgents.map((agent) => {
|
|
630
|
+
const stats = healthStats.get(agent.id) ?? {
|
|
631
|
+
totalChecks: 0,
|
|
632
|
+
passedChecks: 0,
|
|
633
|
+
failedChecks: 0,
|
|
634
|
+
lastChangedMs: null,
|
|
635
|
+
};
|
|
636
|
+
const status = stats.failedChecks > 0
|
|
637
|
+
? "conflict"
|
|
638
|
+
: stats.totalChecks > 0 && stats.passedChecks === stats.totalChecks
|
|
639
|
+
? "healthy"
|
|
640
|
+
: "needs_apply";
|
|
641
|
+
const evalPassRate = stats.totalChecks > 0 ? roundRate(stats.passedChecks / stats.totalChecks) : 0;
|
|
642
|
+
return {
|
|
643
|
+
...agent,
|
|
644
|
+
configHealth: {
|
|
645
|
+
status,
|
|
646
|
+
lastChangedAt: stats.lastChangedMs == null ? null : new Date(stats.lastChangedMs).toISOString(),
|
|
647
|
+
evalPassRate,
|
|
648
|
+
totalChecks: stats.totalChecks,
|
|
649
|
+
passedChecks: stats.passedChecks,
|
|
650
|
+
failedChecks: stats.failedChecks,
|
|
651
|
+
},
|
|
652
|
+
};
|
|
653
|
+
});
|
|
521
654
|
return {
|
|
522
655
|
packId: ORGX_AGENT_SUITE_PACK_ID,
|
|
523
656
|
packVersion,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain artifact metadata schemas for the OrgX Proof Ladder.
|
|
3
|
+
*
|
|
4
|
+
* Each domain has one or more canonical "atomic unit types" with required
|
|
5
|
+
* metadata fields. Validation is warn-only in phase 1 — artifacts that fail
|
|
6
|
+
* schema checks are still registered but tagged with `schema_validated: false`.
|
|
7
|
+
*/
|
|
8
|
+
import type { OrgxAgentDomain } from "../contracts/types.js";
|
|
9
|
+
export declare const ATOMIC_UNIT_TYPES: readonly ["engineering.commit", "engineering.pr", "product.spec", "product.decision", "design.component", "design.a11y", "marketing.asset", "marketing.experiment", "sales.qualification", "sales.proposal", "operations.runbook", "operations.incident", "orchestration.routing", "orchestration.decomp"];
|
|
10
|
+
export type AtomicUnitType = (typeof ATOMIC_UNIT_TYPES)[number];
|
|
11
|
+
export interface QueueRef {
|
|
12
|
+
initiative_id?: string;
|
|
13
|
+
workstream_id?: string;
|
|
14
|
+
task_id?: string;
|
|
15
|
+
queue_snapshot?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface RunRef {
|
|
18
|
+
run_id?: string;
|
|
19
|
+
correlation_id?: string;
|
|
20
|
+
session_id?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface QualityGateRef {
|
|
23
|
+
passed: boolean;
|
|
24
|
+
score: number;
|
|
25
|
+
threshold: number;
|
|
26
|
+
}
|
|
27
|
+
interface FieldSpec {
|
|
28
|
+
/** Human-readable name */
|
|
29
|
+
label: string;
|
|
30
|
+
/** When true, warn if missing */
|
|
31
|
+
required: boolean;
|
|
32
|
+
}
|
|
33
|
+
type SchemaFields = Record<string, FieldSpec>;
|
|
34
|
+
export interface DomainArtifactSchema {
|
|
35
|
+
atomicUnitType: AtomicUnitType;
|
|
36
|
+
domain: OrgxAgentDomain;
|
|
37
|
+
receiptName: string;
|
|
38
|
+
fields: SchemaFields;
|
|
39
|
+
}
|
|
40
|
+
export declare const DOMAIN_ARTIFACT_SCHEMAS: Record<AtomicUnitType, DomainArtifactSchema>;
|
|
41
|
+
export declare const DOMAIN_DEFAULT_ATOMIC_TYPES: Record<OrgxAgentDomain, AtomicUnitType[]>;
|
|
42
|
+
export declare const DOMAIN_QUALITY_THRESHOLDS: Record<OrgxAgentDomain, number>;
|
|
43
|
+
export interface ArtifactValidationResult {
|
|
44
|
+
valid: boolean;
|
|
45
|
+
atomicUnitType: string;
|
|
46
|
+
missingRequired: string[];
|
|
47
|
+
missingOptional: string[];
|
|
48
|
+
warnings: string[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Validate artifact metadata against its domain schema.
|
|
52
|
+
*
|
|
53
|
+
* Returns validation result with missing fields listed. In phase 1 this is
|
|
54
|
+
* advisory (warn-only); callers should not block artifact registration.
|
|
55
|
+
*/
|
|
56
|
+
export declare function validateArtifactMetadata(atomicUnitType: string, metadata: Record<string, unknown>): ArtifactValidationResult;
|
|
57
|
+
/**
|
|
58
|
+
* Infer the canonical atomic unit type from a freeform artifact_type string.
|
|
59
|
+
*
|
|
60
|
+
* Maps existing artifact_type conventions (e.g. "eng.diff_pack",
|
|
61
|
+
* "shared.project_handbook") into one of the 14 canonical types.
|
|
62
|
+
* Returns null if no mapping is found — the artifact still registers
|
|
63
|
+
* but won't be schema-validated.
|
|
64
|
+
*/
|
|
65
|
+
export declare function normalizeArtifactType(artifactType: string): AtomicUnitType | null;
|
|
66
|
+
export {};
|