@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.
Files changed (284) hide show
  1. package/README.md +35 -0
  2. package/dashboard/dist/assets/BJgZIVUQ.js +53 -0
  3. package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
  4. package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
  5. package/dashboard/dist/assets/BXWDRGm-.js +1 -0
  6. package/dashboard/dist/assets/BXWDRGm-.js.br +0 -0
  7. package/dashboard/dist/assets/BXWDRGm-.js.gz +0 -0
  8. package/dashboard/dist/assets/BgOYB78t.js +4 -0
  9. package/dashboard/dist/assets/BgOYB78t.js.br +0 -0
  10. package/dashboard/dist/assets/BgOYB78t.js.gz +0 -0
  11. package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
  12. package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
  13. package/dashboard/dist/assets/CE38zU4U.js +1 -0
  14. package/dashboard/dist/assets/CE38zU4U.js.br +0 -0
  15. package/dashboard/dist/assets/CE38zU4U.js.gz +0 -0
  16. package/dashboard/dist/assets/CFGKRAzG.js +1 -0
  17. package/dashboard/dist/assets/CFGKRAzG.js.br +0 -0
  18. package/dashboard/dist/assets/CFGKRAzG.js.gz +0 -0
  19. package/dashboard/dist/assets/CGGR2GZh.js +1 -0
  20. package/dashboard/dist/assets/CGGR2GZh.js.br +0 -0
  21. package/dashboard/dist/assets/CGGR2GZh.js.gz +0 -0
  22. package/dashboard/dist/assets/CL_wXqR7.js +1 -0
  23. package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
  24. package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
  25. package/dashboard/dist/assets/CPFiTmlw.js +8 -0
  26. package/dashboard/dist/assets/CPFiTmlw.js.br +0 -0
  27. package/dashboard/dist/assets/CPFiTmlw.js.gz +0 -0
  28. package/dashboard/dist/assets/CZZTvkQZ.js +1 -0
  29. package/dashboard/dist/assets/CZZTvkQZ.js.br +0 -0
  30. package/dashboard/dist/assets/CZZTvkQZ.js.gz +0 -0
  31. package/dashboard/dist/assets/{CpJsfbXo.js → CxQ08qFN.js} +2 -2
  32. package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
  33. package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
  34. package/dashboard/dist/assets/D-bf6hEI.js +213 -0
  35. package/dashboard/dist/assets/D-bf6hEI.js.br +0 -0
  36. package/dashboard/dist/assets/D-bf6hEI.js.gz +0 -0
  37. package/dashboard/dist/assets/DG6y9wJI.js +2 -0
  38. package/dashboard/dist/assets/DG6y9wJI.js.br +0 -0
  39. package/dashboard/dist/assets/DG6y9wJI.js.gz +0 -0
  40. package/dashboard/dist/assets/DNxKz-GV.js +1 -0
  41. package/dashboard/dist/assets/DNxKz-GV.js.br +0 -0
  42. package/dashboard/dist/assets/DNxKz-GV.js.gz +0 -0
  43. package/dashboard/dist/assets/DW_rKUic.js +11 -0
  44. package/dashboard/dist/assets/DW_rKUic.js.br +0 -0
  45. package/dashboard/dist/assets/DW_rKUic.js.gz +0 -0
  46. package/dashboard/dist/assets/DbNoijHm.js +1 -0
  47. package/dashboard/dist/assets/DbNoijHm.js.br +0 -0
  48. package/dashboard/dist/assets/DbNoijHm.js.gz +0 -0
  49. package/dashboard/dist/assets/DjcdE6jC.js +2 -0
  50. package/dashboard/dist/assets/DjcdE6jC.js.br +0 -0
  51. package/dashboard/dist/assets/DjcdE6jC.js.gz +0 -0
  52. package/dashboard/dist/assets/FZYuCDnt.js +1 -0
  53. package/dashboard/dist/assets/FZYuCDnt.js.br +0 -0
  54. package/dashboard/dist/assets/FZYuCDnt.js.gz +0 -0
  55. package/dashboard/dist/assets/PAUiij_z.js +1 -0
  56. package/dashboard/dist/assets/PAUiij_z.js.br +0 -0
  57. package/dashboard/dist/assets/PAUiij_z.js.gz +0 -0
  58. package/dashboard/dist/assets/cNrhgGc1.js +8 -0
  59. package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
  60. package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
  61. package/dashboard/dist/assets/h5biQs2I.css +1 -0
  62. package/dashboard/dist/assets/h5biQs2I.css.br +0 -0
  63. package/dashboard/dist/assets/h5biQs2I.css.gz +0 -0
  64. package/dashboard/dist/assets/ic2FaMnh.js +1 -0
  65. package/dashboard/dist/assets/ic2FaMnh.js.br +0 -0
  66. package/dashboard/dist/assets/ic2FaMnh.js.gz +0 -0
  67. package/dashboard/dist/assets/nByHNHoW.js +1 -0
  68. package/dashboard/dist/assets/nByHNHoW.js.br +0 -0
  69. package/dashboard/dist/assets/nByHNHoW.js.gz +0 -0
  70. package/dashboard/dist/assets/qm8xLgv-.css +1 -0
  71. package/dashboard/dist/assets/qm8xLgv-.css.br +0 -0
  72. package/dashboard/dist/assets/qm8xLgv-.css.gz +0 -0
  73. package/dashboard/dist/assets/tS9mbYZi.js +1 -0
  74. package/dashboard/dist/assets/tS9mbYZi.js.br +0 -0
  75. package/dashboard/dist/assets/tS9mbYZi.js.gz +0 -0
  76. package/dashboard/dist/brand/anthropic-mark.svg.br +0 -0
  77. package/dashboard/dist/brand/anthropic-mark.svg.gz +0 -0
  78. package/dashboard/dist/brand/openai-mark.svg.br +0 -0
  79. package/dashboard/dist/brand/openai-mark.svg.gz +0 -0
  80. package/dashboard/dist/brand/openclaw-mark.svg.br +0 -0
  81. package/dashboard/dist/brand/openclaw-mark.svg.gz +0 -0
  82. package/dashboard/dist/brand/xandy-orchestrator.png +0 -0
  83. package/dashboard/dist/index.html +7 -5
  84. package/dashboard/dist/index.html.br +0 -0
  85. package/dashboard/dist/index.html.gz +0 -0
  86. package/dist/activity-actor-fields.js +26 -4
  87. package/dist/activity-store.js +38 -26
  88. package/dist/agent-context-store.js +84 -42
  89. package/dist/agent-run-store.js +49 -28
  90. package/dist/agent-suite.d.ts +9 -0
  91. package/dist/agent-suite.js +150 -17
  92. package/dist/artifacts/artifact-domain-schemas.d.ts +66 -0
  93. package/dist/artifacts/artifact-domain-schemas.js +357 -0
  94. package/dist/artifacts/register-artifact.d.ts +4 -3
  95. package/dist/artifacts/register-artifact.js +170 -57
  96. package/dist/auth/flows.d.ts +47 -0
  97. package/dist/auth/flows.js +169 -0
  98. package/dist/auth-store.js +6 -26
  99. package/dist/byok-store.js +5 -19
  100. package/dist/chat-store.d.ts +157 -0
  101. package/dist/chat-store.js +586 -0
  102. package/dist/cli/orgx.d.ts +66 -0
  103. package/dist/cli/orgx.js +102 -0
  104. package/dist/config/refresh.d.ts +32 -0
  105. package/dist/config/refresh.js +55 -0
  106. package/dist/config/resolution.d.ts +37 -0
  107. package/dist/config/resolution.js +178 -0
  108. package/dist/contracts/client.d.ts +43 -3
  109. package/dist/contracts/client.js +159 -30
  110. package/dist/contracts/retro-schema.d.ts +81 -0
  111. package/dist/contracts/retro-schema.js +80 -0
  112. package/dist/contracts/shared-types.d.ts +306 -0
  113. package/dist/contracts/shared-types.js +179 -0
  114. package/dist/contracts/skill-pack-schema.d.ts +192 -0
  115. package/dist/contracts/skill-pack-schema.js +180 -0
  116. package/dist/contracts/types.d.ts +224 -132
  117. package/dist/contracts/types.js +5 -0
  118. package/dist/entities/auto-assignment.d.ts +36 -0
  119. package/dist/entities/auto-assignment.js +141 -0
  120. package/dist/entity-comment-store.js +5 -25
  121. package/dist/event-sanitization.d.ts +11 -0
  122. package/dist/event-sanitization.js +113 -0
  123. package/dist/fs-utils.js +13 -1
  124. package/dist/gateway-watchdog.d.ts +5 -0
  125. package/dist/gateway-watchdog.js +50 -0
  126. package/dist/hash-utils.d.ts +2 -0
  127. package/dist/hash-utils.js +12 -0
  128. package/dist/hooks/post-reporting-event.mjs +1 -5
  129. package/dist/http/helpers/activity-headline.d.ts +10 -0
  130. package/dist/http/helpers/activity-headline.js +73 -0
  131. package/dist/http/helpers/artifact-fallback.d.ts +13 -0
  132. package/dist/http/helpers/artifact-fallback.js +148 -0
  133. package/dist/http/helpers/auto-continue-engine.d.ts +486 -0
  134. package/dist/http/helpers/auto-continue-engine.js +3563 -0
  135. package/dist/http/helpers/autopilot-operations.d.ts +176 -0
  136. package/dist/http/helpers/autopilot-operations.js +554 -0
  137. package/dist/http/helpers/autopilot-runtime.d.ts +43 -0
  138. package/dist/http/helpers/autopilot-runtime.js +607 -0
  139. package/dist/http/helpers/autopilot-slice-utils.d.ts +56 -0
  140. package/dist/http/helpers/autopilot-slice-utils.js +899 -0
  141. package/dist/http/helpers/decision-mapper.d.ts +52 -0
  142. package/dist/http/helpers/decision-mapper.js +260 -0
  143. package/dist/http/helpers/dispatch-lifecycle.d.ts +119 -0
  144. package/dist/http/helpers/dispatch-lifecycle.js +809 -0
  145. package/dist/http/helpers/hash-utils.d.ts +1 -0
  146. package/dist/http/helpers/hash-utils.js +1 -0
  147. package/dist/http/helpers/kickoff-context.d.ts +12 -0
  148. package/dist/http/helpers/kickoff-context.js +228 -0
  149. package/dist/http/helpers/llm-client.d.ts +47 -0
  150. package/dist/http/helpers/llm-client.js +256 -0
  151. package/dist/http/helpers/mission-control.d.ts +193 -0
  152. package/dist/http/helpers/mission-control.js +1383 -0
  153. package/dist/http/helpers/openclaw-cli.d.ts +37 -0
  154. package/dist/http/helpers/openclaw-cli.js +283 -0
  155. package/dist/http/helpers/runtime-sse.d.ts +20 -0
  156. package/dist/http/helpers/runtime-sse.js +110 -0
  157. package/dist/http/helpers/sentinel-catalog.d.ts +23 -0
  158. package/dist/http/helpers/sentinel-catalog.js +193 -0
  159. package/dist/http/helpers/session-classification.d.ts +9 -0
  160. package/dist/http/helpers/session-classification.js +564 -0
  161. package/dist/http/helpers/slice-experience-v2.d.ts +137 -0
  162. package/dist/http/helpers/slice-experience-v2.js +677 -0
  163. package/dist/http/helpers/slice-run-projections.d.ts +72 -0
  164. package/dist/http/helpers/slice-run-projections.js +860 -0
  165. package/dist/http/helpers/triage-mapper.d.ts +43 -0
  166. package/dist/http/helpers/triage-mapper.js +549 -0
  167. package/dist/http/helpers/value-utils.d.ts +6 -0
  168. package/dist/http/helpers/value-utils.js +72 -0
  169. package/dist/http/helpers/workspace-scope.d.ts +15 -0
  170. package/dist/http/helpers/workspace-scope.js +170 -0
  171. package/dist/http/index.d.ts +88 -0
  172. package/dist/http/index.js +3610 -0
  173. package/dist/http/router.d.ts +23 -0
  174. package/dist/http/router.js +23 -0
  175. package/dist/http/routes/agent-control.d.ts +79 -0
  176. package/dist/http/routes/agent-control.js +684 -0
  177. package/dist/http/routes/agent-suite.d.ts +38 -0
  178. package/dist/http/routes/agent-suite.js +397 -0
  179. package/dist/http/routes/agents-catalog.d.ts +40 -0
  180. package/dist/http/routes/agents-catalog.js +128 -0
  181. package/dist/http/routes/billing.d.ts +23 -0
  182. package/dist/http/routes/billing.js +55 -0
  183. package/dist/http/routes/chat.d.ts +19 -0
  184. package/dist/http/routes/chat.js +522 -0
  185. package/dist/http/routes/debug.d.ts +14 -0
  186. package/dist/http/routes/debug.js +21 -0
  187. package/dist/http/routes/decision-actions.d.ts +20 -0
  188. package/dist/http/routes/decision-actions.js +103 -0
  189. package/dist/http/routes/delegation.d.ts +19 -0
  190. package/dist/http/routes/delegation.js +32 -0
  191. package/dist/http/routes/dispatch-gateway-envelope.d.ts +25 -0
  192. package/dist/http/routes/dispatch-gateway-envelope.js +26 -0
  193. package/dist/http/routes/entities.d.ts +63 -0
  194. package/dist/http/routes/entities.js +440 -0
  195. package/dist/http/routes/entity-dynamic.d.ts +25 -0
  196. package/dist/http/routes/entity-dynamic.js +191 -0
  197. package/dist/http/routes/health.d.ts +22 -0
  198. package/dist/http/routes/health.js +49 -0
  199. package/dist/http/routes/live-legacy.d.ts +115 -0
  200. package/dist/http/routes/live-legacy.js +112 -0
  201. package/dist/http/routes/live-misc.d.ts +81 -0
  202. package/dist/http/routes/live-misc.js +426 -0
  203. package/dist/http/routes/live-snapshot.d.ts +136 -0
  204. package/dist/http/routes/live-snapshot.js +916 -0
  205. package/dist/http/routes/live-terminal.d.ts +11 -0
  206. package/dist/http/routes/live-terminal.js +261 -0
  207. package/dist/http/routes/live-triage.d.ts +61 -0
  208. package/dist/http/routes/live-triage.js +248 -0
  209. package/dist/http/routes/mission-control-actions.d.ts +131 -0
  210. package/dist/http/routes/mission-control-actions.js +1791 -0
  211. package/dist/http/routes/mission-control-read.d.ts +73 -0
  212. package/dist/http/routes/mission-control-read.js +1640 -0
  213. package/dist/http/routes/onboarding.d.ts +34 -0
  214. package/dist/http/routes/onboarding.js +101 -0
  215. package/dist/http/routes/realtime-orchestrator.d.ts +10 -0
  216. package/dist/http/routes/realtime-orchestrator.js +74 -0
  217. package/dist/http/routes/run-control.d.ts +27 -0
  218. package/dist/http/routes/run-control.js +96 -0
  219. package/dist/http/routes/runtime-hooks.d.ts +69 -0
  220. package/dist/http/routes/runtime-hooks.js +437 -0
  221. package/dist/http/routes/sentinels-catalog.d.ts +7 -0
  222. package/dist/http/routes/sentinels-catalog.js +24 -0
  223. package/dist/http/routes/settings-byok.d.ts +23 -0
  224. package/dist/http/routes/settings-byok.js +163 -0
  225. package/dist/http/routes/summary.d.ts +18 -0
  226. package/dist/http/routes/summary.js +49 -0
  227. package/dist/http/routes/usage.d.ts +24 -0
  228. package/dist/http/routes/usage.js +362 -0
  229. package/dist/http/routes/work-artifacts.d.ts +9 -0
  230. package/dist/http/routes/work-artifacts.js +55 -0
  231. package/dist/http/shared-state.d.ts +16 -0
  232. package/dist/http/shared-state.js +1 -0
  233. package/dist/http-handler.d.ts +1 -88
  234. package/dist/http-handler.js +1 -10605
  235. package/dist/index.js +287 -2284
  236. package/dist/json-utils.d.ts +1 -0
  237. package/dist/json-utils.js +8 -0
  238. package/dist/local-openclaw.js +29 -6
  239. package/dist/mcp-client-setup.js +3 -3
  240. package/dist/mcp-http-handler.js +33 -59
  241. package/dist/next-up-queue-store.d.ts +16 -1
  242. package/dist/next-up-queue-store.js +93 -25
  243. package/dist/outbox.d.ts +5 -0
  244. package/dist/outbox.js +113 -9
  245. package/dist/paths.js +24 -5
  246. package/dist/reporting/rollups.d.ts +53 -0
  247. package/dist/reporting/rollups.js +148 -0
  248. package/dist/retro/domain-templates.d.ts +45 -0
  249. package/dist/retro/domain-templates.js +297 -0
  250. package/dist/retro/quality-rubric.d.ts +33 -0
  251. package/dist/retro/quality-rubric.js +213 -0
  252. package/dist/runtime-cleanup.d.ts +18 -0
  253. package/dist/runtime-cleanup.js +87 -0
  254. package/dist/runtime-instance-store.js +5 -31
  255. package/dist/services/background.d.ts +34 -0
  256. package/dist/services/background.js +45 -0
  257. package/dist/services/experiment-randomization.d.ts +21 -0
  258. package/dist/services/experiment-randomization.js +63 -0
  259. package/dist/services/instrumentation.d.ts +29 -0
  260. package/dist/services/instrumentation.js +136 -0
  261. package/dist/skill-pack-state.d.ts +36 -5
  262. package/dist/skill-pack-state.js +273 -29
  263. package/dist/snapshot-store.js +5 -25
  264. package/dist/stores/json-store.d.ts +11 -0
  265. package/dist/stores/json-store.js +42 -0
  266. package/dist/sync/local-agent-telemetry.d.ts +13 -0
  267. package/dist/sync/local-agent-telemetry.js +128 -0
  268. package/dist/sync/outbox-replay.d.ts +55 -0
  269. package/dist/sync/outbox-replay.js +621 -0
  270. package/dist/team-context-store.d.ts +23 -0
  271. package/dist/team-context-store.js +116 -0
  272. package/dist/telemetry/posthog.js +4 -2
  273. package/dist/tools/core-tools.d.ts +72 -0
  274. package/dist/tools/core-tools.js +2270 -0
  275. package/dist/types.d.ts +2 -0
  276. package/dist/types.js +2 -0
  277. package/dist/worker-supervisor.js +23 -0
  278. package/package.json +14 -4
  279. package/dashboard/dist/assets/B3ziCA02.js +0 -8
  280. package/dashboard/dist/assets/BNeJ0kpF.js +0 -1
  281. package/dashboard/dist/assets/BzkiMPmM.js +0 -215
  282. package/dashboard/dist/assets/CUV9IHHi.js +0 -1
  283. package/dashboard/dist/assets/Ie7d9Iq2.css +0 -1
  284. package/dashboard/dist/assets/sAhvFnpk.js +0 -4
@@ -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: ["Reproduce before fixing.", "Add tests when feasible.", "Keep diffs small."],
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: ["Define success metrics.", "Document assumptions.", "Keep language concrete."],
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: ["Use tokens.", "Avoid new visual language.", "Capture QA evidence."],
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: ["Audience -> promise -> proof -> CTA.", "Include measurement hooks."],
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: ["MEDDIC-style qualification.", "Objection handling + CTA."],
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: ["Rollback paths.", "Detection + alerting.", "Post-incident learning."],
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: ["One unverified item at a time.", "Reference the canonical plan.", "Update statuses with proof."],
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 agents = ORGX_AGENT_SUITE_AGENTS.map((agent) => {
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
- for (const agent of agents) {
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 {};