@useorgx/openclaw-plugin 0.2.1 → 0.3.1

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 (80) hide show
  1. package/README.md +64 -2
  2. package/dashboard/dist/assets/index-BjqNjHpY.css +1 -0
  3. package/dashboard/dist/assets/index-DCLkU4AM.js +57 -0
  4. package/dashboard/dist/assets/orgx-logo-QSE5QWy4.png +0 -0
  5. package/dashboard/dist/brand/anthropic-mark.svg +10 -0
  6. package/dashboard/dist/brand/control-tower.png +0 -0
  7. package/dashboard/dist/brand/design-codex.png +0 -0
  8. package/dashboard/dist/brand/engineering-autopilot.png +0 -0
  9. package/dashboard/dist/brand/launch-captain.png +0 -0
  10. package/dashboard/dist/brand/openai-mark.svg +10 -0
  11. package/dashboard/dist/brand/openclaw-mark.svg +11 -0
  12. package/dashboard/dist/brand/orgx-logo.png +0 -0
  13. package/dashboard/dist/brand/pipeline-intelligence.png +0 -0
  14. package/dashboard/dist/brand/product-orchestrator.png +0 -0
  15. package/dashboard/dist/index.html +2 -2
  16. package/dist/adapters/outbox.d.ts +8 -0
  17. package/dist/adapters/outbox.d.ts.map +1 -0
  18. package/dist/adapters/outbox.js +6 -0
  19. package/dist/adapters/outbox.js.map +1 -0
  20. package/dist/agent-context-store.d.ts +24 -0
  21. package/dist/agent-context-store.d.ts.map +1 -0
  22. package/dist/agent-context-store.js +110 -0
  23. package/dist/agent-context-store.js.map +1 -0
  24. package/dist/agent-run-store.d.ts +31 -0
  25. package/dist/agent-run-store.d.ts.map +1 -0
  26. package/dist/agent-run-store.js +158 -0
  27. package/dist/agent-run-store.js.map +1 -0
  28. package/dist/api.d.ts +4 -131
  29. package/dist/api.d.ts.map +1 -1
  30. package/dist/api.js +4 -285
  31. package/dist/api.js.map +1 -1
  32. package/dist/auth-store.d.ts +20 -0
  33. package/dist/auth-store.d.ts.map +1 -0
  34. package/dist/auth-store.js +154 -0
  35. package/dist/auth-store.js.map +1 -0
  36. package/dist/byok-store.d.ts +11 -0
  37. package/dist/byok-store.d.ts.map +1 -0
  38. package/dist/byok-store.js +94 -0
  39. package/dist/byok-store.js.map +1 -0
  40. package/dist/contracts/client.d.ts +154 -0
  41. package/dist/contracts/client.d.ts.map +1 -0
  42. package/dist/contracts/client.js +422 -0
  43. package/dist/contracts/client.js.map +1 -0
  44. package/dist/contracts/types.d.ts +430 -0
  45. package/dist/contracts/types.d.ts.map +1 -0
  46. package/dist/contracts/types.js +8 -0
  47. package/dist/contracts/types.js.map +1 -0
  48. package/dist/dashboard-api.d.ts +2 -7
  49. package/dist/dashboard-api.d.ts.map +1 -1
  50. package/dist/dashboard-api.js +2 -4
  51. package/dist/dashboard-api.js.map +1 -1
  52. package/dist/http-handler.d.ts +37 -3
  53. package/dist/http-handler.d.ts.map +1 -1
  54. package/dist/http-handler.js +3880 -80
  55. package/dist/http-handler.js.map +1 -1
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +1615 -41
  58. package/dist/index.js.map +1 -1
  59. package/dist/local-openclaw.d.ts +87 -0
  60. package/dist/local-openclaw.d.ts.map +1 -0
  61. package/dist/local-openclaw.js +816 -0
  62. package/dist/local-openclaw.js.map +1 -0
  63. package/dist/openclaw.plugin.json +76 -0
  64. package/dist/outbox.d.ts +27 -0
  65. package/dist/outbox.d.ts.map +1 -0
  66. package/dist/outbox.js +174 -0
  67. package/dist/outbox.js.map +1 -0
  68. package/dist/snapshot-store.d.ts +10 -0
  69. package/dist/snapshot-store.d.ts.map +1 -0
  70. package/dist/snapshot-store.js +64 -0
  71. package/dist/snapshot-store.js.map +1 -0
  72. package/dist/types.d.ts +5 -320
  73. package/dist/types.d.ts.map +1 -1
  74. package/dist/types.js +5 -4
  75. package/dist/types.js.map +1 -1
  76. package/openclaw.plugin.json +4 -3
  77. package/package.json +14 -2
  78. package/skills/orgx/SKILL.md +180 -0
  79. package/dashboard/dist/assets/index-C_w24A8p.css +0 -1
  80. package/dashboard/dist/assets/index-DfkN5JSS.js +0 -48
package/dist/types.d.ts CHANGED
@@ -1,324 +1,9 @@
1
1
  /**
2
- * OrgX Clawdbot Plugin — Shared Types
2
+ * Public types entrypoint.
3
3
  *
4
- * Types for the plugin's API client and tool interfaces.
5
- * Mirrors the server-side types in orgx/lib/client-integration/types.ts
4
+ * Kept stable because consumers import `@useorgx/openclaw-plugin/types`.
5
+ * The actual definitions live under `src/contracts/types.ts` so we can
6
+ * share contracts across codebases without tangling with runtime modules.
6
7
  */
7
- export interface OrgXConfig {
8
- /** OrgX API key */
9
- apiKey: string;
10
- /** OrgX user ID for X-Orgx-User-Id header */
11
- userId: string;
12
- /** OrgX API base URL */
13
- baseUrl: string;
14
- /** Background sync interval in ms */
15
- syncIntervalMs: number;
16
- /** Plugin enabled */
17
- enabled: boolean;
18
- }
19
- export interface OrgSnapshot {
20
- /** Active initiatives */
21
- initiatives: Initiative[];
22
- /** Agent states */
23
- agents: AgentState[];
24
- /** Active tasks across workstreams */
25
- activeTasks: TaskSummary[];
26
- /** Pending decisions needing attention */
27
- pendingDecisions: Decision[];
28
- /** Last sync timestamp */
29
- syncedAt: string;
30
- }
31
- export interface Initiative {
32
- id: string;
33
- title: string;
34
- status: string;
35
- progress?: number;
36
- workstreams?: string[];
37
- }
38
- export interface AgentState {
39
- id: string;
40
- name: string;
41
- domain: string;
42
- status: "active" | "idle" | "throttled";
43
- currentTask?: string;
44
- lastActive?: string;
45
- }
46
- export interface TaskSummary {
47
- id: string;
48
- title: string;
49
- status: string;
50
- domain?: string;
51
- modelTier?: ModelTier;
52
- assignee?: string;
53
- }
54
- export interface Decision {
55
- id: string;
56
- title: string;
57
- urgency: "low" | "medium" | "high";
58
- context?: string;
59
- }
60
- export interface SyncPayload {
61
- /** Client-side memory snapshot */
62
- memory?: string;
63
- /** Today's session log */
64
- dailyLog?: string;
65
- /** Workspace state for local↔cloud handoff continuity */
66
- workspaceState?: HandoffWorkspaceState;
67
- /** Decisions made this session */
68
- decisions?: Array<{
69
- id: string;
70
- action: "approved" | "rejected";
71
- note?: string;
72
- }>;
73
- /** Optional sync cursor from client */
74
- memoryCursor?: {
75
- lastSyncEventId?: string;
76
- lastAppliedHandoffId?: string;
77
- };
78
- }
79
- export interface SyncResponse {
80
- /** Active initiatives summary */
81
- initiatives: Array<{
82
- id: string;
83
- title: string;
84
- status: string;
85
- }>;
86
- /** In-progress tasks */
87
- activeTasks: Array<{
88
- id: string;
89
- title: string;
90
- status: string;
91
- domain?: string;
92
- modelTier: ModelTier;
93
- }>;
94
- /** Pending decisions needing attention */
95
- pendingDecisions: Array<{
96
- id: string;
97
- title: string;
98
- urgency: "low" | "medium" | "high";
99
- }>;
100
- /** Quality stats per domain */
101
- qualityStats: QualityStats[];
102
- /** Model routing policy */
103
- modelPolicy: ModelRoutingPolicy;
104
- /** Workspace state echo and server-side handoff status */
105
- workspaceState: HandoffWorkspaceState;
106
- /** Sync cursor for incremental sync */
107
- memoryCursor: {
108
- lastSyncEventId: string | null;
109
- lastAppliedHandoffId: string | null;
110
- };
111
- /** Server timestamp */
112
- syncedAt: string;
113
- }
114
- export type RunPhase = 'intent' | 'execution' | 'blocked' | 'review' | 'handoff' | 'completed';
115
- export interface HandoffWorkspaceState {
116
- git?: {
117
- branch?: string | null;
118
- headSha?: string | null;
119
- dirtyFiles?: string[];
120
- untrackedFilesCount?: number;
121
- };
122
- handoff?: {
123
- pendingHandoffIds?: string[];
124
- lastAppliedHandoffId?: string | null;
125
- };
126
- memoryCursor?: {
127
- lastSyncEventId?: string | null;
128
- };
129
- }
130
- export interface CheckpointSummary {
131
- id: string;
132
- runId: string;
133
- createdAt: string;
134
- tokenCount: number;
135
- stepId?: string | null;
136
- summary?: string | null;
137
- payload: Record<string, unknown>;
138
- }
139
- export interface RestoreRequest {
140
- checkpointId: string;
141
- reason?: string;
142
- }
143
- export interface DelegationPreflightResult {
144
- scope_quality: 'strong' | 'workable' | 'ambiguous';
145
- ambiguities: string[];
146
- eta_range: {
147
- min_minutes: number;
148
- max_minutes: number;
149
- confidence: number;
150
- };
151
- cost_estimate: {
152
- min_usd: number;
153
- max_usd: number;
154
- basis: 'heuristic';
155
- };
156
- recommended_split: Array<{
157
- id: string;
158
- title: string;
159
- owner_domain: string;
160
- acceptance_criteria: string[];
161
- }>;
162
- }
163
- export type ModelTier = "opus" | "sonnet" | "local";
164
- export type TaskComplexity = "planning" | "execution" | "routine";
165
- export interface ModelRouting {
166
- tier: ModelTier;
167
- reason: string;
168
- complexity: TaskComplexity;
169
- estimatedTokens: number;
170
- }
171
- export interface ModelRoutingPolicy {
172
- planningPatterns: string[];
173
- executionPatterns: string[];
174
- routinePatterns: string[];
175
- domainOverrides: Record<string, ModelTier>;
176
- budget: {
177
- dailyUsd: number;
178
- opusMaxPercentage: number;
179
- localMinPercentage: number;
180
- };
181
- }
182
- export interface QualityScore {
183
- taskId: string;
184
- domain: string;
185
- score: number;
186
- notes?: string;
187
- scoredBy?: "human" | "auto" | "peer";
188
- }
189
- export interface QualityStats {
190
- domain: string;
191
- totalTasks: number;
192
- avgScore: number;
193
- recentTrend: "improving" | "stable" | "declining";
194
- isThrottled: boolean;
195
- throttleReason?: string;
196
- }
197
- export interface SpawnGuardResult {
198
- allowed: boolean;
199
- modelTier: ModelTier;
200
- checks: {
201
- rateLimit: {
202
- passed: boolean;
203
- current: number;
204
- max: number;
205
- };
206
- qualityGate: {
207
- passed: boolean;
208
- score: number;
209
- threshold: number;
210
- };
211
- taskAssigned: {
212
- passed: boolean;
213
- taskId?: string;
214
- status?: string;
215
- };
216
- };
217
- blockedReason?: string;
218
- }
219
- export interface Entity {
220
- id: string;
221
- type: string;
222
- title: string;
223
- summary?: string;
224
- status?: string;
225
- parentId?: string;
226
- createdAt?: string;
227
- updatedAt?: string;
228
- [key: string]: unknown;
229
- }
230
- export interface EntityCreatePayload {
231
- title: string;
232
- summary?: string;
233
- status?: string;
234
- parentId?: string;
235
- [key: string]: unknown;
236
- }
237
- export interface EntityUpdatePayload {
238
- [key: string]: unknown;
239
- }
240
- export interface EntityListFilters {
241
- status?: string;
242
- limit?: number;
243
- [key: string]: unknown;
244
- }
245
- export type LiveActivityType = 'run_started' | 'run_completed' | 'run_failed' | 'artifact_created' | 'decision_requested' | 'decision_resolved' | 'handoff_requested' | 'handoff_claimed' | 'handoff_fulfilled' | 'blocker_created' | 'milestone_completed' | 'delegation';
246
- export interface LiveActivityItem {
247
- id: string;
248
- type: LiveActivityType;
249
- title: string;
250
- description: string | null;
251
- agentId: string | null;
252
- agentName: string | null;
253
- runId: string | null;
254
- initiativeId: string | null;
255
- timestamp: string;
256
- phase?: RunPhase | null;
257
- state?: string | null;
258
- kind?: string | null;
259
- summary?: string | null;
260
- decisionRequired?: boolean;
261
- costDelta?: number | null;
262
- metadata?: Record<string, unknown>;
263
- }
264
- export interface SessionTreeNode {
265
- id: string;
266
- parentId: string | null;
267
- runId: string;
268
- title: string;
269
- agentId: string | null;
270
- agentName: string | null;
271
- status: string;
272
- progress: number | null;
273
- initiativeId: string | null;
274
- workstreamId: string | null;
275
- groupId: string;
276
- groupLabel: string;
277
- startedAt: string | null;
278
- updatedAt: string | null;
279
- lastEventAt: string | null;
280
- lastEventSummary: string | null;
281
- blockers: string[];
282
- phase?: RunPhase | null;
283
- state?: string | null;
284
- eta?: string | null;
285
- cost?: number | null;
286
- checkpointCount?: number | null;
287
- blockerReason?: string | null;
288
- }
289
- export interface SessionTreeEdge {
290
- parentId: string;
291
- childId: string;
292
- }
293
- export interface SessionTreeGroup {
294
- id: string;
295
- label: string;
296
- status: string | null;
297
- }
298
- export interface SessionTreeResponse {
299
- nodes: SessionTreeNode[];
300
- edges: SessionTreeEdge[];
301
- groups: SessionTreeGroup[];
302
- }
303
- export interface HandoffEvent {
304
- id: string;
305
- handoffId: string;
306
- eventType: string;
307
- actorType: string | null;
308
- actorId: string | null;
309
- payload: Record<string, unknown> | null;
310
- createdAt: string;
311
- }
312
- export interface HandoffSummary {
313
- id: string;
314
- title: string;
315
- status: string;
316
- priority: string | null;
317
- summary: string | null;
318
- currentActorType: string | null;
319
- currentActorId: string | null;
320
- createdAt: string;
321
- updatedAt: string;
322
- events: HandoffEvent[];
323
- }
8
+ export * from "./contracts/types.js";
324
9
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,UAAU;IACzB,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAMD,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,mBAAmB;IACnB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,sCAAsC;IACtC,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,0CAA0C;IAC1C,gBAAgB,EAAE,QAAQ,EAAE,CAAC;IAC7B,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,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"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sBAAsB,CAAC"}
package/dist/types.js CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
- * OrgX Clawdbot Plugin — Shared Types
2
+ * Public types entrypoint.
3
3
  *
4
- * Types for the plugin's API client and tool interfaces.
5
- * Mirrors the server-side types in orgx/lib/client-integration/types.ts
4
+ * Kept stable because consumers import `@useorgx/openclaw-plugin/types`.
5
+ * The actual definitions live under `src/contracts/types.ts` so we can
6
+ * share contracts across codebases without tangling with runtime modules.
6
7
  */
7
- export {};
8
+ export * from "./contracts/types.js";
8
9
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sBAAsB,CAAC"}
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "id": "orgx",
3
3
  "name": "OrgX Integration",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "Connects Clawdbot to OrgX for agent orchestration, quality gates, and model routing",
6
6
  "entry": "./dist/index.js",
7
7
  "author": "OrgX Team",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/orgx/orgx"
11
+ "url": "https://github.com/useorgx/openclaw-plugin.git"
12
12
  },
13
13
  "engines": {
14
14
  "node": ">=18.0.0"
15
15
  },
16
+ "skills": ["skills"],
16
17
  "capabilities": {
17
18
  "tools": true,
18
19
  "services": true,
@@ -53,7 +54,7 @@
53
54
  "apiKey": {
54
55
  "label": "OrgX API Key",
55
56
  "sensitive": true,
56
- "placeholder": "orgx_..."
57
+ "placeholder": "oxk_..."
57
58
  },
58
59
  "baseUrl": {
59
60
  "label": "OrgX API Base URL",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useorgx/openclaw-plugin",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "OrgX plugin for OpenClaw — agent orchestration, quality gates, model routing, and live dashboard",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,13 +27,24 @@
27
27
  "files": [
28
28
  "dist/",
29
29
  "dashboard/dist/",
30
+ "skills/",
30
31
  "openclaw.plugin.json",
31
32
  "README.md"
32
33
  ],
33
34
  "scripts": {
34
35
  "typecheck": "tsc --noEmit",
35
- "build": "tsc",
36
+ "test:hooks": "npm run build:core && node --test tests/**/*.test.mjs",
37
+ "job:dispatch": "npm run build:core && node ./scripts/run-codex-dispatch-job.mjs",
38
+ "verify:clean-install": "node ./scripts/verify-clean-install.mjs",
39
+ "verify:billing": "npm run build:core && node ./scripts/verify-billing-scenarios.mjs",
40
+ "qa:capture": "node ./scripts/capture-qa-evidence.mjs",
41
+ "ops:launch-checklist": "node ./scripts/run-launch-checklist.mjs",
42
+ "install:dashboard": "npm --prefix dashboard ci",
43
+ "build:dashboard": "npm run install:dashboard && npm --prefix dashboard run build",
44
+ "build:core": "tsc && node ./scripts/copy-manifest.mjs",
45
+ "build": "npm run build:dashboard && npm run build:core",
36
46
  "clean": "rm -rf dist",
47
+ "pack": "npm run build && mkdir -p artifacts && npm pack --pack-destination artifacts",
37
48
  "prepublishOnly": "npm run build"
38
49
  },
39
50
  "keywords": [
@@ -69,6 +80,7 @@
69
80
  },
70
81
  "devDependencies": {
71
82
  "@types/node": "^20.19.30",
83
+ "playwright-core": "^1.58.2",
72
84
  "typescript": "^5.9.3"
73
85
  }
74
86
  }
@@ -0,0 +1,180 @@
1
+ ---
2
+ name: orgx
3
+ description: Use when managing work with OrgX — reporting progress, requesting decisions, registering artifacts, syncing memory, checking quality gates, or viewing org status. Activates for phrases like "report progress", "request approval", "create initiative", "check orgx", "sync with orgx", "register artifact".
4
+ version: 3.0.0
5
+ user-invocable: true
6
+ tags:
7
+ - orchestration
8
+ - multi-agent
9
+ - productivity
10
+ - reporting
11
+ ---
12
+
13
+ # OrgX Integration
14
+
15
+ Connect to OrgX for multi-agent orchestration, decision workflows, initiative tracking, model routing, quality gates, and structured work reporting.
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Install the plugin
21
+ openclaw plugins install @useorgx/openclaw-plugin
22
+
23
+ # Or via npx
24
+ npx @useorgx/openclaw-plugin
25
+ ```
26
+
27
+ After installing, pair with OrgX via the live dashboard at `http://127.0.0.1:18789/orgx/live` or set `ORGX_API_KEY` in your environment.
28
+
29
+ ## MCP Tools Reference
30
+
31
+ ### Work Reporting (primary contract)
32
+
33
+ Use the **two-tool reporting contract** for launch reporting:
34
+
35
+ **`orgx_emit_activity`** — Append-only telemetry (frequent updates).
36
+ ```
37
+ orgx_emit_activity({
38
+ initiative_id: "aa6d16dc-d450-417f-8a17-fd89bd597195",
39
+ message: "Implemented auth middleware and validated redirects",
40
+ phase: "execution", // intent | execution | blocked | review | handoff | completed
41
+ progress_pct: 60, // optional 0-100
42
+ next_step: "Add integration tests" // optional
43
+ })
44
+ ```
45
+
46
+ **`orgx_apply_changeset`** — Transactional state mutations (batched, idempotent).
47
+ ```
48
+ orgx_apply_changeset({
49
+ initiative_id: "aa6d16dc-d450-417f-8a17-fd89bd597195",
50
+ idempotency_key: "run_abc_turn_7_commit_1",
51
+ operations: [
52
+ { op: "task.update", task_id: "task_uuid", status: "in_progress" },
53
+ { op: "decision.create", title: "Use SSE for live updates", urgency: "medium" }
54
+ ]
55
+ })
56
+ ```
57
+
58
+ Backward-compatible aliases:
59
+ - `orgx_report_progress` delegates to `orgx_emit_activity`
60
+ - `orgx_request_decision` delegates to `orgx_apply_changeset` (`decision.create`)
61
+
62
+ **`orgx_register_artifact`** — Register a deliverable (PR, document, config, etc.).
63
+ ```
64
+ orgx_register_artifact({
65
+ name: "PR #107: Fix Vercel build size",
66
+ artifact_type: "pr", // pr | commit | document | config | report | design | other
67
+ description: "Reduced function size by pruning recursive assets",
68
+ url: "https://github.com/org/repo/pull/107" // (optional)
69
+ })
70
+ ```
71
+
72
+ ### Org Status & Sync
73
+
74
+ **`orgx_status`** — View active initiatives, agent states, pending decisions, tasks.
75
+
76
+ **`orgx_sync`** — Push local memory/daily log to OrgX, receive org context back.
77
+ ```
78
+ orgx_sync({
79
+ memory: "Contents of MEMORY.md",
80
+ dailyLog: "Today's session summary"
81
+ })
82
+ ```
83
+
84
+ ### Quality & Spawning
85
+
86
+ **`orgx_spawn_check`** — Check quality gate + get model routing before spawning a sub-agent.
87
+ ```
88
+ orgx_spawn_check({ domain: "engineering", taskId: "..." })
89
+ // Returns: { allowed: true, modelTier: "sonnet", checks: {...} }
90
+ ```
91
+
92
+ **`orgx_quality_score`** — Record quality score (1-5) for completed work.
93
+ ```
94
+ orgx_quality_score({
95
+ taskId: "...",
96
+ domain: "engineering",
97
+ score: 4,
98
+ notes: "Clean implementation, good test coverage"
99
+ })
100
+ ```
101
+
102
+ ### Entity Management
103
+
104
+ **`orgx_create_entity`** — Create an initiative, workstream, task, decision, milestone, artifact, or blocker.
105
+
106
+ **`orgx_update_entity`** — Update status/fields on any entity.
107
+
108
+ **`orgx_list_entities`** — Query entities by type and status.
109
+
110
+ ### Run Control
111
+
112
+ **`orgx_delegation_preflight`** — Score scope quality and estimate ETA/cost before execution.
113
+
114
+ **`orgx_run_action`** — Pause, resume, cancel, or rollback a run.
115
+
116
+ **`orgx_checkpoints_list`** / **`orgx_checkpoint_restore`** — List and restore run checkpoints.
117
+
118
+ ## Reporting Protocol
119
+
120
+ When working on a task or initiative, follow the two-tool reporting contract. This keeps state deterministic and idempotent.
121
+
122
+ ### On task start
123
+ Call `orgx_emit_activity` with `phase: "intent"` and a brief summary of what you're about to do.
124
+
125
+ ### At meaningful progress points
126
+ Call `orgx_emit_activity` at natural checkpoints: after finishing research, after implementation passes, after tests pass, etc. Include `progress_pct` when possible.
127
+
128
+ ### When you need a human decision
129
+ Call `orgx_apply_changeset` with a `decision.create` operation including clear context/options. Set `blocking: true` when work must pause. Set urgency appropriately:
130
+ - **low** — Can wait hours/days
131
+ - **medium** — Should be decided today
132
+ - **high** — Blocking progress, needs attention soon
133
+ - **urgent** — Critical path, needs immediate attention
134
+
135
+ ### When you produce a deliverable
136
+ Call `orgx_register_artifact` for anything the team should see: PRs, documents, config changes, reports, design files. Include a URL when available.
137
+
138
+ ### On task completion
139
+ 1. Call `orgx_emit_activity` with `phase: "completed"` and `progress_pct: 100`
140
+ 2. Call `orgx_apply_changeset` to mark task/milestone completion or record final decisions
141
+ 3. Call `orgx_quality_score` to self-assess your work (1-5 scale)
142
+
143
+ ### On blockers
144
+ Call `orgx_emit_activity` with `phase: "blocked"` and describe the blocker. If human intervention is needed, use `orgx_apply_changeset` with a `decision.create` op.
145
+
146
+ ## Model Routing
147
+
148
+ OrgX classifies tasks for model selection:
149
+
150
+ | Task Type | Tier | Model |
151
+ |---|---|---|
152
+ | Architecture, strategy, decisions, RFCs | **opus** | `anthropic/claude-opus-4-6` |
153
+ | Implementation, code, features, docs | **sonnet** | `anthropic/claude-sonnet-4` |
154
+ | Status checks, formatting, templates | **local** | `ollama/qwen2.5-coder:32b` |
155
+
156
+ Always call `orgx_spawn_check` before spawning sub-agents to get the right model tier.
157
+
158
+ ## Live Dashboard
159
+
160
+ The plugin serves a live dashboard at `http://127.0.0.1:18789/orgx/live` showing:
161
+ - **Activity Timeline** — Real-time feed of agent work with threaded session views
162
+ - **Agents/Chats** — Active sessions grouped by agent
163
+ - **Decisions** — Pending approvals with inline approve/reject
164
+ - **Initiatives** — Active workstreams and progress
165
+
166
+ ## Entity API
167
+
168
+ For direct API access:
169
+ ```
170
+ GET /api/entities?type={type}&status={status}&limit={n}
171
+ POST /api/entities
172
+ PATCH /api/entities
173
+ POST /api/entities/{type}/{id}/{action}
174
+ ```
175
+
176
+ Entity types: `initiative`, `workstream`, `task`, `decision`, `milestone`, `artifact`, `agent`, `blocker`
177
+
178
+ ## MCP Server (mcp.useorgx.com)
179
+
180
+ For environments that support MCP servers directly (Claude Desktop, Cursor, etc.), connect to `mcp.useorgx.com` for the full suite of 26+ OrgX tools including initiative management, decision workflows, and agent orchestration.