@useorgx/openclaw-plugin 0.4.9 → 0.7.2

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 (224) hide show
  1. package/README.md +77 -11
  2. package/dashboard/dist/assets/6mILZQ2a.js +1 -0
  3. package/dashboard/dist/assets/6mILZQ2a.js.br +0 -0
  4. package/dashboard/dist/assets/6mILZQ2a.js.gz +0 -0
  5. package/dashboard/dist/assets/8dksYiq4.js +2 -0
  6. package/dashboard/dist/assets/8dksYiq4.js.br +0 -0
  7. package/dashboard/dist/assets/8dksYiq4.js.gz +0 -0
  8. package/dashboard/dist/assets/B5zYRHc3.js +1 -0
  9. package/dashboard/dist/assets/B5zYRHc3.js.br +0 -0
  10. package/dashboard/dist/assets/B5zYRHc3.js.gz +0 -0
  11. package/dashboard/dist/assets/B6wPWJ35.js +1 -0
  12. package/dashboard/dist/assets/B6wPWJ35.js.br +0 -0
  13. package/dashboard/dist/assets/B6wPWJ35.js.gz +0 -0
  14. package/dashboard/dist/assets/BJgZIVUQ.js +53 -0
  15. package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
  16. package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
  17. package/dashboard/dist/assets/BWEwjt1W.js +1 -0
  18. package/dashboard/dist/assets/BWEwjt1W.js.br +0 -0
  19. package/dashboard/dist/assets/BWEwjt1W.js.gz +0 -0
  20. package/dashboard/dist/assets/BgOYB78t.js +4 -0
  21. package/dashboard/dist/assets/BgOYB78t.js.br +0 -0
  22. package/dashboard/dist/assets/BgOYB78t.js.gz +0 -0
  23. package/dashboard/dist/assets/BzRbDCAD.css +1 -0
  24. package/dashboard/dist/assets/BzRbDCAD.css.br +0 -0
  25. package/dashboard/dist/assets/BzRbDCAD.css.gz +0 -0
  26. package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
  27. package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
  28. package/dashboard/dist/assets/C8uM3AX8.js +1 -0
  29. package/dashboard/dist/assets/C8uM3AX8.js.br +0 -0
  30. package/dashboard/dist/assets/C8uM3AX8.js.gz +0 -0
  31. package/dashboard/dist/assets/C9jy61eu.js +212 -0
  32. package/dashboard/dist/assets/C9jy61eu.js.br +0 -0
  33. package/dashboard/dist/assets/C9jy61eu.js.gz +0 -0
  34. package/dashboard/dist/assets/CC63EwFD.js +1 -0
  35. package/dashboard/dist/assets/CC63EwFD.js.br +0 -0
  36. package/dashboard/dist/assets/CC63EwFD.js.gz +0 -0
  37. package/dashboard/dist/assets/CL_wXqR7.js +1 -0
  38. package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
  39. package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
  40. package/dashboard/dist/assets/CZaT3ob_.js +1 -0
  41. package/dashboard/dist/assets/CZaT3ob_.js.br +0 -0
  42. package/dashboard/dist/assets/CZaT3ob_.js.gz +0 -0
  43. package/dashboard/dist/assets/CgaottFX.js +1 -0
  44. package/dashboard/dist/assets/CgaottFX.js.br +0 -0
  45. package/dashboard/dist/assets/CgaottFX.js.gz +0 -0
  46. package/dashboard/dist/assets/{CpJsfbXo.js → CxQ08qFN.js} +2 -2
  47. package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
  48. package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
  49. package/dashboard/dist/assets/CzCxAZlW.js +1 -0
  50. package/dashboard/dist/assets/CzCxAZlW.js.br +0 -0
  51. package/dashboard/dist/assets/CzCxAZlW.js.gz +0 -0
  52. package/dashboard/dist/assets/D3iMTYEj.js +1 -0
  53. package/dashboard/dist/assets/D3iMTYEj.js.br +0 -0
  54. package/dashboard/dist/assets/D3iMTYEj.js.gz +0 -0
  55. package/dashboard/dist/assets/D8JNX8kq.js +2 -0
  56. package/dashboard/dist/assets/D8JNX8kq.js.br +0 -0
  57. package/dashboard/dist/assets/D8JNX8kq.js.gz +0 -0
  58. package/dashboard/dist/assets/DnA8dpj6.js +1 -0
  59. package/dashboard/dist/assets/DnA8dpj6.js.br +0 -0
  60. package/dashboard/dist/assets/DnA8dpj6.js.gz +0 -0
  61. package/dashboard/dist/assets/IUexzymk.js +1 -0
  62. package/dashboard/dist/assets/IUexzymk.js.br +0 -0
  63. package/dashboard/dist/assets/IUexzymk.js.gz +0 -0
  64. package/dashboard/dist/assets/cNrhgGc1.js +8 -0
  65. package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
  66. package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
  67. package/dashboard/dist/assets/ic2FaMnh.js +1 -0
  68. package/dashboard/dist/assets/ic2FaMnh.js.br +0 -0
  69. package/dashboard/dist/assets/ic2FaMnh.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/rttbDbEx.js +1 -0
  74. package/dashboard/dist/assets/rttbDbEx.js.br +0 -0
  75. package/dashboard/dist/assets/rttbDbEx.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 +34 -8
  88. package/dist/agent-context-store.js +79 -17
  89. package/dist/agent-run-store.js +44 -3
  90. package/dist/agent-suite.d.ts +9 -0
  91. package/dist/agent-suite.js +149 -9
  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/chat-store.d.ts +157 -0
  97. package/dist/chat-store.js +586 -0
  98. package/dist/cli/orgx.js +11 -0
  99. package/dist/contracts/client.d.ts +43 -3
  100. package/dist/contracts/client.js +159 -30
  101. package/dist/contracts/practice-exercise-schema.d.ts +216 -0
  102. package/dist/contracts/practice-exercise-schema.js +314 -0
  103. package/dist/contracts/retro-schema.d.ts +81 -0
  104. package/dist/contracts/retro-schema.js +80 -0
  105. package/dist/contracts/shared-types.d.ts +159 -0
  106. package/dist/contracts/shared-types.js +199 -1
  107. package/dist/contracts/skill-pack-schema.d.ts +192 -0
  108. package/dist/contracts/skill-pack-schema.js +180 -0
  109. package/dist/contracts/types.d.ts +247 -2
  110. package/dist/entities/auto-assignment.js +43 -17
  111. package/dist/event-sanitization.d.ts +11 -0
  112. package/dist/event-sanitization.js +113 -0
  113. package/dist/gateway-watchdog.d.ts +5 -0
  114. package/dist/gateway-watchdog.js +50 -0
  115. package/dist/hooks/post-reporting-event.mjs +1 -5
  116. package/dist/http/helpers/activity-headline.js +13 -132
  117. package/dist/http/helpers/auto-continue-engine.d.ts +198 -10
  118. package/dist/http/helpers/auto-continue-engine.js +3145 -186
  119. package/dist/http/helpers/autopilot-operations.d.ts +19 -0
  120. package/dist/http/helpers/autopilot-operations.js +182 -31
  121. package/dist/http/helpers/autopilot-runtime.d.ts +1 -0
  122. package/dist/http/helpers/autopilot-runtime.js +328 -25
  123. package/dist/http/helpers/autopilot-slice-utils.d.ts +18 -0
  124. package/dist/http/helpers/autopilot-slice-utils.js +514 -93
  125. package/dist/http/helpers/decision-mapper.d.ts +40 -0
  126. package/dist/http/helpers/decision-mapper.js +223 -7
  127. package/dist/http/helpers/dispatch-lifecycle.d.ts +19 -2
  128. package/dist/http/helpers/dispatch-lifecycle.js +242 -37
  129. package/dist/http/helpers/kickoff-context.js +104 -0
  130. package/dist/http/helpers/llm-client.d.ts +47 -0
  131. package/dist/http/helpers/llm-client.js +256 -0
  132. package/dist/http/helpers/mission-control.d.ts +102 -3
  133. package/dist/http/helpers/mission-control.js +498 -9
  134. package/dist/http/helpers/sentinel-catalog.d.ts +23 -0
  135. package/dist/http/helpers/sentinel-catalog.js +193 -0
  136. package/dist/http/helpers/session-classification.d.ts +9 -0
  137. package/dist/http/helpers/session-classification.js +564 -0
  138. package/dist/http/helpers/slice-experience-v2.d.ts +137 -0
  139. package/dist/http/helpers/slice-experience-v2.js +677 -0
  140. package/dist/http/helpers/slice-run-projections.d.ts +72 -0
  141. package/dist/http/helpers/slice-run-projections.js +877 -0
  142. package/dist/http/helpers/triage-mapper.d.ts +43 -0
  143. package/dist/http/helpers/triage-mapper.js +549 -0
  144. package/dist/http/helpers/value-utils.js +7 -2
  145. package/dist/http/helpers/workspace-scope.d.ts +15 -0
  146. package/dist/http/helpers/workspace-scope.js +170 -0
  147. package/dist/http/index.js +1420 -105
  148. package/dist/http/routes/agent-suite.d.ts +9 -0
  149. package/dist/http/routes/agent-suite.js +294 -8
  150. package/dist/http/routes/agents-catalog.js +64 -19
  151. package/dist/http/routes/chat.d.ts +19 -0
  152. package/dist/http/routes/chat.js +522 -0
  153. package/dist/http/routes/decision-actions.d.ts +8 -1
  154. package/dist/http/routes/decision-actions.js +42 -5
  155. package/dist/http/routes/dispatch-gateway-envelope.d.ts +25 -0
  156. package/dist/http/routes/dispatch-gateway-envelope.js +26 -0
  157. package/dist/http/routes/entities.d.ts +16 -0
  158. package/dist/http/routes/entities.js +232 -6
  159. package/dist/http/routes/live-legacy.d.ts +5 -0
  160. package/dist/http/routes/live-legacy.js +23 -509
  161. package/dist/http/routes/live-misc.d.ts +12 -0
  162. package/dist/http/routes/live-misc.js +251 -31
  163. package/dist/http/routes/live-snapshot.d.ts +49 -2
  164. package/dist/http/routes/live-snapshot.js +653 -23
  165. package/dist/http/routes/live-terminal.d.ts +11 -0
  166. package/dist/http/routes/live-terminal.js +154 -0
  167. package/dist/http/routes/live-triage.d.ts +61 -0
  168. package/dist/http/routes/live-triage.js +192 -0
  169. package/dist/http/routes/mission-control-actions.d.ts +49 -1
  170. package/dist/http/routes/mission-control-actions.js +1246 -84
  171. package/dist/http/routes/mission-control-read.d.ts +48 -3
  172. package/dist/http/routes/mission-control-read.js +1658 -20
  173. package/dist/http/routes/realtime-orchestrator.d.ts +10 -0
  174. package/dist/http/routes/realtime-orchestrator.js +74 -0
  175. package/dist/http/routes/run-control.d.ts +5 -2
  176. package/dist/http/routes/run-control.js +10 -0
  177. package/dist/http/routes/sentinels-catalog.d.ts +7 -0
  178. package/dist/http/routes/sentinels-catalog.js +24 -0
  179. package/dist/http/routes/summary.js +10 -3
  180. package/dist/http/routes/usage.d.ts +24 -0
  181. package/dist/http/routes/usage.js +362 -0
  182. package/dist/http/routes/work-artifacts.js +28 -9
  183. package/dist/index.js +165 -27
  184. package/dist/local-openclaw.js +29 -6
  185. package/dist/mcp-client-setup.js +3 -3
  186. package/dist/mcp-http-handler.d.ts +3 -0
  187. package/dist/mcp-http-handler.js +34 -60
  188. package/dist/next-up-queue-store.d.ts +16 -1
  189. package/dist/next-up-queue-store.js +89 -7
  190. package/dist/outbox.d.ts +5 -0
  191. package/dist/outbox.js +113 -9
  192. package/dist/paths.js +36 -5
  193. package/dist/reporting/rollups.d.ts +41 -0
  194. package/dist/reporting/rollups.js +113 -0
  195. package/dist/retro/domain-templates.d.ts +45 -0
  196. package/dist/retro/domain-templates.js +297 -0
  197. package/dist/retro/quality-rubric.d.ts +33 -0
  198. package/dist/retro/quality-rubric.js +213 -0
  199. package/dist/runtime-cleanup.d.ts +18 -0
  200. package/dist/runtime-cleanup.js +87 -0
  201. package/dist/services/background.d.ts +11 -0
  202. package/dist/services/background.js +22 -0
  203. package/dist/services/experiment-randomization.d.ts +21 -0
  204. package/dist/services/experiment-randomization.js +63 -0
  205. package/dist/skill-pack-state.d.ts +36 -5
  206. package/dist/skill-pack-state.js +273 -29
  207. package/dist/sync/local-agent-telemetry.d.ts +13 -0
  208. package/dist/sync/local-agent-telemetry.js +128 -0
  209. package/dist/sync/outbox-replay.js +131 -24
  210. package/dist/team-context-store.d.ts +23 -0
  211. package/dist/team-context-store.js +116 -0
  212. package/dist/telemetry/posthog.js +4 -2
  213. package/dist/tools/core-tools.d.ts +10 -14
  214. package/dist/tools/core-tools.js +1289 -24
  215. package/dist/types.d.ts +2 -0
  216. package/dist/types.js +2 -0
  217. package/dist/worker-supervisor.js +23 -0
  218. package/package.json +20 -6
  219. package/dashboard/dist/assets/B3ziCA02.js +0 -8
  220. package/dashboard/dist/assets/B5NEElEI.css +0 -1
  221. package/dashboard/dist/assets/BhapSNAs.js +0 -215
  222. package/dashboard/dist/assets/iFdvE7lx.js +0 -1
  223. package/dashboard/dist/assets/jRJsmpYM.js +0 -1
  224. package/dashboard/dist/assets/sAhvFnpk.js +0 -4
@@ -4,6 +4,7 @@ export type OrgxSuiteAgentSpec = {
4
4
  name: string;
5
5
  domain: OrgxSuiteDomain;
6
6
  };
7
+ export type OrgxAgentConfigHealthStatus = "healthy" | "needs_apply" | "conflict";
7
8
  export declare const ORGX_AGENT_SUITE_PACK_ID = "orgx-agent-suite";
8
9
  export declare const ORGX_AGENT_SUITE_AGENTS: OrgxSuiteAgentSpec[];
9
10
  declare const SUITE_FILES: readonly ["AGENTS.md", "TOOLS.md", "IDENTITY.md", "SKILL.md", "SOUL.md", "USER.md", "HEARTBEAT.md"];
@@ -47,6 +48,14 @@ export type OrgxAgentSuiteStatus = {
47
48
  workspace: string;
48
49
  configuredInOpenclaw: boolean;
49
50
  workspaceExists: boolean;
51
+ configHealth: {
52
+ status: OrgxAgentConfigHealthStatus;
53
+ lastChangedAt: string | null;
54
+ evalPassRate: number;
55
+ totalChecks: number;
56
+ passedChecks: number;
57
+ failedChecks: number;
58
+ };
50
59
  }>;
51
60
  };
52
61
  export type OrgxAgentSuitePlan = OrgxAgentSuiteStatus & {
@@ -109,6 +109,19 @@ function loadTextFile(path) {
109
109
  function normalizeNewlines(value) {
110
110
  return value.replace(/\r\n/g, "\n");
111
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
+ }
112
125
  function domainPersona(domain) {
113
126
  switch (domain) {
114
127
  case "engineering":
@@ -117,7 +130,12 @@ function domainPersona(domain) {
117
130
  voice: ["Direct, calm, technical.", "Prefer concrete evidence over confidence."],
118
131
  autonomy: ["Default to implementing the fix.", "Escalate only when a decision is truly required."],
119
132
  care: ["Respect time: minimize churn and surprises.", "Explain tradeoffs without lecturing."],
120
- 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
+ ],
121
139
  };
122
140
  case "product":
123
141
  return {
@@ -125,7 +143,12 @@ function domainPersona(domain) {
125
143
  voice: ["Clear, structured, user-centered.", "Make decisions explicit; avoid fuzzy scope."],
126
144
  autonomy: ["Propose a smallest viable slice.", "Write acceptance criteria before building."],
127
145
  care: ["Call out risks and non-goals early.", "Optimize for the user's confidence and clarity."],
128
- 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
+ ],
129
152
  };
130
153
  case "design":
131
154
  return {
@@ -133,7 +156,12 @@ function domainPersona(domain) {
133
156
  voice: ["Precise, opinionated, kind.", "Avoid generic UI patterns and 'AI slop'."],
134
157
  autonomy: ["Iterate fast with constraints.", "Verify mobile + critical states."],
135
158
  care: ["Protect coherence of the design system.", "Prioritize accessibility as a baseline."],
136
- 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
+ ],
137
165
  };
138
166
  case "marketing":
139
167
  return {
@@ -141,7 +169,11 @@ function domainPersona(domain) {
141
169
  voice: ["Specific, energetic, grounded in reality.", "No generic claims without proof."],
142
170
  autonomy: ["Pick a target audience and promise.", "Deliver channel-ready outputs."],
143
171
  care: ["Avoid hype that creates trust debt.", "Respect brand voice; keep it crisp."],
144
- 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
+ ],
145
177
  };
146
178
  case "sales":
147
179
  return {
@@ -149,7 +181,11 @@ function domainPersona(domain) {
149
181
  voice: ["Concise, empathetic, commercially sharp.", "Anticipate objections; answer plainly."],
150
182
  autonomy: ["Start with ICP + disqualifiers.", "Write talk tracks that sound human."],
151
183
  care: ["Never overclaim.", "Optimize for trust and next steps."],
152
- 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
+ ],
153
189
  };
154
190
  case "operations":
155
191
  return {
@@ -157,7 +193,12 @@ function domainPersona(domain) {
157
193
  voice: ["Cautious, thorough, pragmatic.", "Prefer runbooks over heroics."],
158
194
  autonomy: ["Default to reversible changes.", "Add guardrails before speed."],
159
195
  care: ["Assume production is fragile unless proven otherwise.", "Reduce on-call burden."],
160
- 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
+ ],
161
202
  };
162
203
  case "orchestration":
163
204
  return {
@@ -165,7 +206,12 @@ function domainPersona(domain) {
165
206
  voice: ["Structured, decisive, transparent.", "Keep boundaries straight (OrgX vs OpenClaw vs plugin)."],
166
207
  autonomy: ["Decompose into verifiable tasks.", "Sequence work to keep momentum."],
167
208
  care: ["Minimize context switching.", "Keep stakeholders informed."],
168
- 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
+ ],
169
215
  };
170
216
  default:
171
217
  return {
@@ -218,6 +264,11 @@ function buildManagedFileContent(input) {
218
264
  "orgx_register_artifact",
219
265
  "orgx_request_decision",
220
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",
221
272
  ],
222
273
  product: [
223
274
  "orgx_status",
@@ -227,6 +278,11 @@ function buildManagedFileContent(input) {
227
278
  "orgx_register_artifact",
228
279
  "orgx_request_decision",
229
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",
230
286
  ],
231
287
  design: [
232
288
  "orgx_status",
@@ -236,6 +292,11 @@ function buildManagedFileContent(input) {
236
292
  "orgx_register_artifact",
237
293
  "orgx_request_decision",
238
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",
239
300
  ],
240
301
  marketing: [
241
302
  "orgx_status",
@@ -245,6 +306,11 @@ function buildManagedFileContent(input) {
245
306
  "orgx_register_artifact",
246
307
  "orgx_request_decision",
247
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",
248
314
  ],
249
315
  sales: [
250
316
  "orgx_status",
@@ -254,6 +320,11 @@ function buildManagedFileContent(input) {
254
320
  "orgx_register_artifact",
255
321
  "orgx_request_decision",
256
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",
257
328
  ],
258
329
  operations: [
259
330
  "orgx_status",
@@ -263,7 +334,13 @@ function buildManagedFileContent(input) {
263
334
  "orgx_register_artifact",
264
335
  "orgx_request_decision",
265
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",
266
342
  "orgx_apply_changeset",
343
+ "orgx_reassign_stream",
267
344
  ],
268
345
  orchestration: [
269
346
  "orgx_status",
@@ -273,7 +350,13 @@ function buildManagedFileContent(input) {
273
350
  "orgx_register_artifact",
274
351
  "orgx_request_decision",
275
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",
276
358
  "orgx_apply_changeset",
359
+ "orgx_reassign_stream",
277
360
  ],
278
361
  };
279
362
  const scopeKey = `orgx-openclaw-${input.agent.domain}`;
@@ -288,6 +371,12 @@ function buildManagedFileContent(input) {
288
371
  "- orgx_register_artifact",
289
372
  "- orgx_request_decision",
290
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",
291
380
  "",
292
381
  "## Scoped MCP (Recommended)",
293
382
  `If your client supports MCP server selection, prefer the scoped server key: \`${scopeKey}\`.`,
@@ -299,6 +388,7 @@ function buildManagedFileContent(input) {
299
388
  "Rules:",
300
389
  "- Return structured JSON for tool outputs when applicable.",
301
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].",
302
392
  "- If a tool fails, capture the exact error and fix root cause.",
303
393
  "- Prefer dry-run/previews when writing to user config.",
304
394
  "",
@@ -393,6 +483,12 @@ function buildManagedFileContent(input) {
393
483
  "- Avoid destructive git ops unless explicitly requested.",
394
484
  "- Keep scope tight: do the asked work, then stop.",
395
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
+ "",
396
492
  "## Provenance",
397
493
  `- ${provenance}`,
398
494
  "",
@@ -466,7 +562,7 @@ export function computeOrgxAgentSuitePlan(input) {
466
562
  const { path: cfgPath, parsed } = readOpenclawConfig(openclawDir);
467
563
  const suiteWorkspaceRoot = resolveSuiteWorkspaceRoot(parsed);
468
564
  const upsert = upsertSuiteAgentsIntoConfig({ openclaw: parsed, suiteWorkspaceRoot });
469
- const agents = ORGX_AGENT_SUITE_AGENTS.map((agent) => {
565
+ const baseAgents = ORGX_AGENT_SUITE_AGENTS.map((agent) => {
470
566
  const workspace = join(suiteWorkspaceRoot, agent.id);
471
567
  const list = Array.isArray(parsed?.agents?.list) ? parsed?.agents?.list : [];
472
568
  const configured = list.some((entry) => String(entry?.id ?? "").trim() === agent.id);
@@ -478,7 +574,8 @@ export function computeOrgxAgentSuitePlan(input) {
478
574
  };
479
575
  });
480
576
  const workspaceFiles = [];
481
- for (const agent of agents) {
577
+ const healthStats = new Map();
578
+ for (const agent of baseAgents) {
482
579
  for (const file of SUITE_FILES) {
483
580
  const managedPath = join(agent.workspace, SUITE_MANAGED_DIR, file);
484
581
  const localPath = join(agent.workspace, SUITE_LOCAL_DIR, file);
@@ -509,8 +606,51 @@ export function computeOrgxAgentSuitePlan(input) {
509
606
  compositePath,
510
607
  action,
511
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);
512
627
  }
513
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
+ });
514
654
  return {
515
655
  packId: ORGX_AGENT_SUITE_PACK_ID,
516
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 {};