@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
@@ -1,3 +1,201 @@
1
1
  // Canonical shared types consumed by both core plugin code and dashboard code.
2
2
  // Keep this file dependency-free so it can be imported across build boundaries.
3
- export {};
3
+ export const KNOWN_ACTIVITY_ACTION_TYPES = [
4
+ "orchestrator_dispatch",
5
+ "dispatch_slice",
6
+ "spawn_worker",
7
+ "run_heartbeat",
8
+ "run_state_transition",
9
+ "run_started",
10
+ "run_completed",
11
+ "run_failed",
12
+ "slice_handoff",
13
+ "question_asked",
14
+ "question_timeout_started",
15
+ "question_auto_answered",
16
+ "question_answer_applied",
17
+ "question_answer_failed",
18
+ "decision_requested",
19
+ "decision_resolved",
20
+ "review_item_created",
21
+ "review_item_resolved",
22
+ "status_updates_applied",
23
+ "status_updates_buffered",
24
+ "artifact_registered",
25
+ "spawn_guard_blocked",
26
+ "spawn_guard_rate_limited",
27
+ "behavior_config_review",
28
+ "auto_fix",
29
+ "auto_continue_started",
30
+ "auto_continue_stopped",
31
+ "autopilot_resumed",
32
+ "autopilot_paused",
33
+ "autopilot_blocked",
34
+ "milestone_completed",
35
+ "workflow_error",
36
+ ];
37
+ export const KNOWN_ACTIVITY_ACTION_PHASES = [
38
+ "intent",
39
+ "dispatch",
40
+ "execution",
41
+ "handoff",
42
+ "review",
43
+ "completed",
44
+ "blocked",
45
+ "error",
46
+ ];
47
+ const ACTIVITY_ACTION_TYPE_ALIASES = {
48
+ orchestrator: "orchestrator_dispatch",
49
+ dispatch: "dispatch_slice",
50
+ dispatched: "dispatch_slice",
51
+ question: "question_asked",
52
+ question_timeout: "question_timeout_started",
53
+ question_auto_answer: "question_auto_answered",
54
+ decision_auto_answer: "question_auto_answered",
55
+ decision_auto_answer_applied: "question_answer_applied",
56
+ decision_auto_answer_failed: "question_answer_failed",
57
+ decision_auto_answer_skipped: "review_item_created",
58
+ start: "run_started",
59
+ started: "run_started",
60
+ stop: "auto_continue_stopped",
61
+ stopped: "auto_continue_stopped",
62
+ pause: "autopilot_paused",
63
+ paused: "autopilot_paused",
64
+ resume: "autopilot_resumed",
65
+ resumed: "autopilot_resumed",
66
+ blocked: "autopilot_blocked",
67
+ complete: "run_completed",
68
+ completed: "run_completed",
69
+ fail: "run_failed",
70
+ failed: "run_failed",
71
+ };
72
+ export function normalizeActivityActionType(value) {
73
+ if (typeof value !== "string")
74
+ return null;
75
+ const normalized = value.trim().toLowerCase();
76
+ if (!normalized)
77
+ return null;
78
+ const alias = ACTIVITY_ACTION_TYPE_ALIASES[normalized];
79
+ if (alias)
80
+ return alias;
81
+ return normalized.replace(/\s+/g, "_");
82
+ }
83
+ export function isKnownActivityActionType(value) {
84
+ if (typeof value !== "string")
85
+ return false;
86
+ return KNOWN_ACTIVITY_ACTION_TYPES.includes(value);
87
+ }
88
+ export function normalizeActivityActionPhase(value) {
89
+ if (typeof value !== "string")
90
+ return null;
91
+ const normalized = value.trim().toLowerCase();
92
+ if (!normalized)
93
+ return null;
94
+ if (KNOWN_ACTIVITY_ACTION_PHASES.includes(normalized)) {
95
+ return normalized;
96
+ }
97
+ return null;
98
+ }
99
+ export const KNOWN_DECISION_ACTION_TYPES = [
100
+ "approve",
101
+ "reject",
102
+ "provide_context",
103
+ "request_info",
104
+ "confirm_scope",
105
+ "retry",
106
+ "resume",
107
+ "start",
108
+ "pause",
109
+ "defer",
110
+ "cancel",
111
+ "queue_top",
112
+ "queue_bottom",
113
+ "remove_from_queue",
114
+ "reassign",
115
+ "assign",
116
+ "notify",
117
+ "escalate",
118
+ "handoff",
119
+ "spawn",
120
+ "execute_task",
121
+ "review_blocker",
122
+ "review_decision",
123
+ "open_artifact",
124
+ "open_logs",
125
+ "open_session",
126
+ "open_run",
127
+ "open_workstream",
128
+ "open_task",
129
+ "open_initiative",
130
+ "open_pr",
131
+ "open_diff",
132
+ "open_branch",
133
+ "open_deal",
134
+ "update_deal",
135
+ "open_settings",
136
+ "open_workspace",
137
+ "connect_provider",
138
+ "refresh_credentials",
139
+ "auto_fix",
140
+ "ignore_once",
141
+ ];
142
+ const DECISION_ACTION_TYPE_ALIASES = {
143
+ declined: "reject",
144
+ decline: "reject",
145
+ deny: "reject",
146
+ dismiss: "ignore_once",
147
+ retry_slice: "retry",
148
+ continue: "resume",
149
+ restart: "resume",
150
+ play: "start",
151
+ stop: "pause",
152
+ snooze: "defer",
153
+ queue: "queue_bottom",
154
+ add_to_end: "queue_bottom",
155
+ add_to_queue: "queue_bottom",
156
+ queue_to_end: "queue_bottom",
157
+ queue_to_bottom: "queue_bottom",
158
+ queue_to_top: "queue_top",
159
+ move_to_top: "queue_top",
160
+ move_to_bottom: "queue_bottom",
161
+ remove: "remove_from_queue",
162
+ remove_queue: "remove_from_queue",
163
+ unqueue: "remove_from_queue",
164
+ openartifact: "open_artifact",
165
+ open_artifacts: "open_artifact",
166
+ open_pr_diff: "open_diff",
167
+ open_pull_request: "open_pr",
168
+ open_work_item: "open_task",
169
+ providecontext: "provide_context",
170
+ request_context: "request_info",
171
+ ask_info: "request_info",
172
+ ask_question: "request_info",
173
+ reassign_agent: "reassign",
174
+ assign_agent: "assign",
175
+ spawn_agent: "spawn",
176
+ connect_credentials: "connect_provider",
177
+ fix_credentials: "refresh_credentials",
178
+ refresh_credential: "refresh_credentials",
179
+ autofix: "auto_fix",
180
+ auto_resolve: "auto_fix",
181
+ };
182
+ const KNOWN_DECISION_ACTION_TYPE_SET = new Set(KNOWN_DECISION_ACTION_TYPES);
183
+ export function normalizeDecisionActionType(value) {
184
+ if (typeof value !== "string")
185
+ return null;
186
+ const normalized = value.trim().toLowerCase();
187
+ if (!normalized)
188
+ return null;
189
+ if (KNOWN_DECISION_ACTION_TYPE_SET.has(normalized)) {
190
+ return normalized;
191
+ }
192
+ if (DECISION_ACTION_TYPE_ALIASES[normalized]) {
193
+ return DECISION_ACTION_TYPE_ALIASES[normalized];
194
+ }
195
+ return normalized;
196
+ }
197
+ export function isKnownDecisionActionType(value) {
198
+ if (typeof value !== "string")
199
+ return false;
200
+ return KNOWN_DECISION_ACTION_TYPE_SET.has(value.trim().toLowerCase());
201
+ }
@@ -0,0 +1,192 @@
1
+ export declare const OPENCLAW_SKILL_PACK_SCHEMA_VERSION: "openclaw-skill-pack.v1";
2
+ export declare const ORGX_AGENT_DOMAINS: readonly ["engineering", "product", "design", "marketing", "sales", "operations", "orchestration"];
3
+ export type OrgxAgentDomainName = (typeof ORGX_AGENT_DOMAINS)[number];
4
+ export type ManifestConfigType = "openclaw_skills" | "openclawSkills" | "openclaw.skills" | "none";
5
+ export declare const OPENCLAW_SKILLS_MAP_JSON_SCHEMA: {
6
+ readonly type: "object";
7
+ readonly additionalProperties: false;
8
+ readonly properties: {
9
+ readonly engineering: {
10
+ readonly type: "string";
11
+ readonly minLength: 1;
12
+ };
13
+ readonly product: {
14
+ readonly type: "string";
15
+ readonly minLength: 1;
16
+ };
17
+ readonly design: {
18
+ readonly type: "string";
19
+ readonly minLength: 1;
20
+ };
21
+ readonly marketing: {
22
+ readonly type: "string";
23
+ readonly minLength: 1;
24
+ };
25
+ readonly sales: {
26
+ readonly type: "string";
27
+ readonly minLength: 1;
28
+ };
29
+ readonly operations: {
30
+ readonly type: "string";
31
+ readonly minLength: 1;
32
+ };
33
+ readonly orchestration: {
34
+ readonly type: "string";
35
+ readonly minLength: 1;
36
+ };
37
+ };
38
+ };
39
+ export declare const OPENCLAW_SKILL_PACK_MANIFEST_JSON_SCHEMA: {
40
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
41
+ readonly $id: "https://schemas.useorgx.com/openclaw-skill-pack/v1.json";
42
+ readonly title: "OrgX OpenClaw Skill Pack Manifest";
43
+ readonly description: "Behavior config manifest for OpenClaw skill overrides by domain.";
44
+ readonly type: "object";
45
+ readonly additionalProperties: true;
46
+ readonly oneOf: readonly [{
47
+ readonly type: "object";
48
+ readonly additionalProperties: true;
49
+ readonly properties: {
50
+ readonly schema_version: {
51
+ readonly type: "string";
52
+ readonly const: "openclaw-skill-pack.v1";
53
+ };
54
+ readonly openclaw_skills: {
55
+ readonly type: "object";
56
+ readonly additionalProperties: false;
57
+ readonly properties: {
58
+ readonly engineering: {
59
+ readonly type: "string";
60
+ readonly minLength: 1;
61
+ };
62
+ readonly product: {
63
+ readonly type: "string";
64
+ readonly minLength: 1;
65
+ };
66
+ readonly design: {
67
+ readonly type: "string";
68
+ readonly minLength: 1;
69
+ };
70
+ readonly marketing: {
71
+ readonly type: "string";
72
+ readonly minLength: 1;
73
+ };
74
+ readonly sales: {
75
+ readonly type: "string";
76
+ readonly minLength: 1;
77
+ };
78
+ readonly operations: {
79
+ readonly type: "string";
80
+ readonly minLength: 1;
81
+ };
82
+ readonly orchestration: {
83
+ readonly type: "string";
84
+ readonly minLength: 1;
85
+ };
86
+ };
87
+ };
88
+ };
89
+ readonly required: readonly ["openclaw_skills"];
90
+ }, {
91
+ readonly type: "object";
92
+ readonly additionalProperties: true;
93
+ readonly properties: {
94
+ readonly schema_version: {
95
+ readonly type: "string";
96
+ readonly const: "openclaw-skill-pack.v1";
97
+ };
98
+ readonly openclawSkills: {
99
+ readonly type: "object";
100
+ readonly additionalProperties: false;
101
+ readonly properties: {
102
+ readonly engineering: {
103
+ readonly type: "string";
104
+ readonly minLength: 1;
105
+ };
106
+ readonly product: {
107
+ readonly type: "string";
108
+ readonly minLength: 1;
109
+ };
110
+ readonly design: {
111
+ readonly type: "string";
112
+ readonly minLength: 1;
113
+ };
114
+ readonly marketing: {
115
+ readonly type: "string";
116
+ readonly minLength: 1;
117
+ };
118
+ readonly sales: {
119
+ readonly type: "string";
120
+ readonly minLength: 1;
121
+ };
122
+ readonly operations: {
123
+ readonly type: "string";
124
+ readonly minLength: 1;
125
+ };
126
+ readonly orchestration: {
127
+ readonly type: "string";
128
+ readonly minLength: 1;
129
+ };
130
+ };
131
+ };
132
+ };
133
+ readonly required: readonly ["openclawSkills"];
134
+ }, {
135
+ readonly type: "object";
136
+ readonly additionalProperties: true;
137
+ readonly properties: {
138
+ readonly schema_version: {
139
+ readonly type: "string";
140
+ readonly const: "openclaw-skill-pack.v1";
141
+ };
142
+ readonly openclaw: {
143
+ readonly type: "object";
144
+ readonly additionalProperties: true;
145
+ readonly properties: {
146
+ readonly skills: {
147
+ readonly type: "object";
148
+ readonly additionalProperties: false;
149
+ readonly properties: {
150
+ readonly engineering: {
151
+ readonly type: "string";
152
+ readonly minLength: 1;
153
+ };
154
+ readonly product: {
155
+ readonly type: "string";
156
+ readonly minLength: 1;
157
+ };
158
+ readonly design: {
159
+ readonly type: "string";
160
+ readonly minLength: 1;
161
+ };
162
+ readonly marketing: {
163
+ readonly type: "string";
164
+ readonly minLength: 1;
165
+ };
166
+ readonly sales: {
167
+ readonly type: "string";
168
+ readonly minLength: 1;
169
+ };
170
+ readonly operations: {
171
+ readonly type: "string";
172
+ readonly minLength: 1;
173
+ };
174
+ readonly orchestration: {
175
+ readonly type: "string";
176
+ readonly minLength: 1;
177
+ };
178
+ };
179
+ };
180
+ };
181
+ readonly required: readonly ["skills"];
182
+ };
183
+ };
184
+ readonly required: readonly ["openclaw"];
185
+ }];
186
+ };
187
+ export declare function validateOpenClawSkillPackManifest(manifest: unknown): {
188
+ ok: boolean;
189
+ configType: ManifestConfigType;
190
+ openclaw_skills: Partial<Record<OrgxAgentDomainName, string>>;
191
+ errors: string[];
192
+ };
@@ -0,0 +1,180 @@
1
+ export const OPENCLAW_SKILL_PACK_SCHEMA_VERSION = "openclaw-skill-pack.v1";
2
+ export const ORGX_AGENT_DOMAINS = [
3
+ "engineering",
4
+ "product",
5
+ "design",
6
+ "marketing",
7
+ "sales",
8
+ "operations",
9
+ "orchestration",
10
+ ];
11
+ const DOMAIN_SET = new Set(ORGX_AGENT_DOMAINS);
12
+ function isRecord(value) {
13
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
14
+ }
15
+ function hasOwn(record, key) {
16
+ return Object.prototype.hasOwnProperty.call(record, key);
17
+ }
18
+ const DOMAIN_STRING_SCHEMA = {
19
+ type: "string",
20
+ minLength: 1,
21
+ };
22
+ export const OPENCLAW_SKILLS_MAP_JSON_SCHEMA = {
23
+ type: "object",
24
+ additionalProperties: false,
25
+ properties: {
26
+ engineering: DOMAIN_STRING_SCHEMA,
27
+ product: DOMAIN_STRING_SCHEMA,
28
+ design: DOMAIN_STRING_SCHEMA,
29
+ marketing: DOMAIN_STRING_SCHEMA,
30
+ sales: DOMAIN_STRING_SCHEMA,
31
+ operations: DOMAIN_STRING_SCHEMA,
32
+ orchestration: DOMAIN_STRING_SCHEMA,
33
+ },
34
+ };
35
+ export const OPENCLAW_SKILL_PACK_MANIFEST_JSON_SCHEMA = {
36
+ $schema: "https://json-schema.org/draft/2020-12/schema",
37
+ $id: "https://schemas.useorgx.com/openclaw-skill-pack/v1.json",
38
+ title: "OrgX OpenClaw Skill Pack Manifest",
39
+ description: "Behavior config manifest for OpenClaw skill overrides by domain.",
40
+ type: "object",
41
+ additionalProperties: true,
42
+ oneOf: [
43
+ {
44
+ type: "object",
45
+ additionalProperties: true,
46
+ properties: {
47
+ schema_version: { type: "string", const: OPENCLAW_SKILL_PACK_SCHEMA_VERSION },
48
+ openclaw_skills: OPENCLAW_SKILLS_MAP_JSON_SCHEMA,
49
+ },
50
+ required: ["openclaw_skills"],
51
+ },
52
+ {
53
+ type: "object",
54
+ additionalProperties: true,
55
+ properties: {
56
+ schema_version: { type: "string", const: OPENCLAW_SKILL_PACK_SCHEMA_VERSION },
57
+ openclawSkills: OPENCLAW_SKILLS_MAP_JSON_SCHEMA,
58
+ },
59
+ required: ["openclawSkills"],
60
+ },
61
+ {
62
+ type: "object",
63
+ additionalProperties: true,
64
+ properties: {
65
+ schema_version: { type: "string", const: OPENCLAW_SKILL_PACK_SCHEMA_VERSION },
66
+ openclaw: {
67
+ type: "object",
68
+ additionalProperties: true,
69
+ properties: {
70
+ skills: OPENCLAW_SKILLS_MAP_JSON_SCHEMA,
71
+ },
72
+ required: ["skills"],
73
+ },
74
+ },
75
+ required: ["openclaw"],
76
+ },
77
+ ],
78
+ };
79
+ function resolveManifestConfigType(manifest) {
80
+ const hasOpenclawSkills = hasOwn(manifest, "openclaw_skills");
81
+ const hasOpenclawSkillsCamel = hasOwn(manifest, "openclawSkills");
82
+ const openclaw = manifest.openclaw;
83
+ const hasOpenclawNestedSkills = isRecord(openclaw) && hasOwn(openclaw, "skills");
84
+ const errors = [];
85
+ const selectedConfigTypes = [
86
+ hasOpenclawSkills ? "openclaw_skills" : null,
87
+ hasOpenclawSkillsCamel ? "openclawSkills" : null,
88
+ hasOpenclawNestedSkills ? "openclaw.skills" : null,
89
+ ].filter((value) => value !== null);
90
+ if (selectedConfigTypes.length > 1) {
91
+ errors.push("manifest must define only one config container: openclaw_skills, openclawSkills, or openclaw.skills");
92
+ }
93
+ if (hasOpenclawSkills) {
94
+ const value = manifest.openclaw_skills;
95
+ if (!isRecord(value)) {
96
+ return {
97
+ type: "openclaw_skills",
98
+ rawMap: null,
99
+ errors: [...errors, "manifest.openclaw_skills must be an object"],
100
+ };
101
+ }
102
+ return { type: "openclaw_skills", rawMap: value, errors };
103
+ }
104
+ if (hasOpenclawSkillsCamel) {
105
+ const value = manifest.openclawSkills;
106
+ if (!isRecord(value)) {
107
+ return {
108
+ type: "openclawSkills",
109
+ rawMap: null,
110
+ errors: [...errors, "manifest.openclawSkills must be an object"],
111
+ };
112
+ }
113
+ return { type: "openclawSkills", rawMap: value, errors };
114
+ }
115
+ if (hasOpenclawNestedSkills) {
116
+ const value = openclaw.skills;
117
+ if (!isRecord(value)) {
118
+ return {
119
+ type: "openclaw.skills",
120
+ rawMap: null,
121
+ errors: [...errors, "manifest.openclaw.skills must be an object"],
122
+ };
123
+ }
124
+ return { type: "openclaw.skills", rawMap: value, errors };
125
+ }
126
+ return { type: "none", rawMap: null, errors };
127
+ }
128
+ export function validateOpenClawSkillPackManifest(manifest) {
129
+ if (!isRecord(manifest)) {
130
+ return {
131
+ ok: false,
132
+ configType: "none",
133
+ openclaw_skills: {},
134
+ errors: ["manifest must be an object"],
135
+ };
136
+ }
137
+ const errors = [];
138
+ if ("schema_version" in manifest) {
139
+ const version = manifest.schema_version;
140
+ if (typeof version !== "string") {
141
+ errors.push("manifest.schema_version must be a string");
142
+ }
143
+ else if (version.trim() !== OPENCLAW_SKILL_PACK_SCHEMA_VERSION) {
144
+ errors.push(`manifest.schema_version must equal "${OPENCLAW_SKILL_PACK_SCHEMA_VERSION}"`);
145
+ }
146
+ }
147
+ const { type, rawMap, errors: manifestConfigErrors } = resolveManifestConfigType(manifest);
148
+ errors.push(...manifestConfigErrors);
149
+ if (!rawMap) {
150
+ return {
151
+ ok: errors.length === 0,
152
+ configType: type,
153
+ openclaw_skills: {},
154
+ errors,
155
+ };
156
+ }
157
+ const openclaw_skills = {};
158
+ for (const [domain, rawValue] of Object.entries(rawMap)) {
159
+ if (!DOMAIN_SET.has(domain)) {
160
+ errors.push(`unknown domain key "${domain}" in manifest ${type}`);
161
+ continue;
162
+ }
163
+ if (typeof rawValue !== "string") {
164
+ errors.push(`manifest ${type}.${domain} must be a string`);
165
+ continue;
166
+ }
167
+ const normalized = rawValue.trim();
168
+ if (!normalized) {
169
+ errors.push(`manifest ${type}.${domain} must not be empty`);
170
+ continue;
171
+ }
172
+ openclaw_skills[domain] = normalized;
173
+ }
174
+ return {
175
+ ok: errors.length === 0,
176
+ configType: type,
177
+ openclaw_skills,
178
+ errors,
179
+ };
180
+ }