Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to `@useorgx/openclaw-plugin` are documented in this file.

## 0.7.28 - 2026-03-13

### Release Management
- Patch release bump for npm package + plugin manifest metadata.
- Published release tag `v0.7.28`.

### Plugin Dispatch Bridge
- Added dispatch job reporting to the OrgX server so plugin-driven autonomous work can surface its execution state in the control plane.
- Added plugin-side preflight checks before dispatching work so invalid or incomplete launches fail fast with actionable server-visible diagnostics.

### QA Tooling
- Added the reusable Mission Control QA harness script for button/card/state audits.
- Ignored generated QA audit artifacts and scratch markdown outputs while keeping the harness itself tracked in the repo.

## 0.7.27 - 2026-03-12

### Release Management
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ The plugin currently registers **30 MCP tools** from `src/tools/core-tools.ts`.
Core sync/reporting:
- `orgx_status`
- `orgx_sync`
- `orgx_query_org_memory`
- `orgx_recommend_next_action`
- `orgx_get_morning_brief`
- `orgx_emit_activity`
- `orgx_report_progress`
- `orgx_register_artifact`
Expand All @@ -195,7 +198,7 @@ Quality, proof, and outcomes:
- `orgx_proof_status`
- `orgx_verify_completion`
- `orgx_record_outcome`
- `orgx_get_outcome_attribution`
- `orgx_get_outcome_attribution` (compatibility alias)

Entity and stream management:
- `orgx_create_entity`
Expand Down
7 changes: 5 additions & 2 deletions docs/plugin-feature-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ Scope: current repository state in `src/` and `dashboard/src/`

Source of truth: `src/tools/core-tools.ts` (registered by `registerCoreTools`).

Current count: **27 tools**
Current count: **30 tools**

- `orgx_status`
- `orgx_sentinel_catalog`
- `orgx_sync`
- `orgx_query_org_memory`
- `orgx_recommend_next_action`
- `orgx_get_morning_brief`
- `orgx_delegation_preflight`
- `orgx_run_action`
- `orgx_checkpoints_list`
Expand All @@ -49,7 +52,7 @@ Current count: **27 tools**
- `orgx_proof_status`
- `orgx_verify_completion`
- `orgx_record_outcome`
- `orgx_get_outcome_attribution`
- `orgx_get_outcome_attribution` (compatibility alias)
- `orgx_create_entity`
- `orgx_update_entity`
- `orgx_reassign_stream`
Expand Down
2 changes: 1 addition & 1 deletion openclaw.plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "openclaw-plugin",
"name": "OrgX Integration",
"version": "0.7.27",
"version": "0.7.28",
"description": "Connects Clawdbot to OrgX for agent orchestration, quality gates, and model routing",
"entry": "./dist/index.js",
"author": "OrgX Team",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useorgx/openclaw-plugin",
"version": "0.7.27",
"version": "0.7.28",
"description": "OrgX plugin for OpenClaw — agent orchestration, quality gates, model routing, and live dashboard",
"type": "module",
"main": "./dist/index.js",
Expand Down
26 changes: 25 additions & 1 deletion src/agent-suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ function buildManagedFileContent(input: {
engineering: [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"orgx_emit_activity",
"orgx_report_progress",
"orgx_register_artifact",
Expand All @@ -407,6 +410,9 @@ function buildManagedFileContent(input: {
product: [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"orgx_emit_activity",
"orgx_report_progress",
"orgx_register_artifact",
Expand All @@ -421,6 +427,9 @@ function buildManagedFileContent(input: {
design: [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"orgx_emit_activity",
"orgx_report_progress",
"orgx_register_artifact",
Expand All @@ -435,6 +444,9 @@ function buildManagedFileContent(input: {
marketing: [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"orgx_emit_activity",
"orgx_report_progress",
"orgx_register_artifact",
Expand All @@ -449,6 +461,9 @@ function buildManagedFileContent(input: {
sales: [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"orgx_emit_activity",
"orgx_report_progress",
"orgx_register_artifact",
Expand All @@ -463,6 +478,9 @@ function buildManagedFileContent(input: {
operations: [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"orgx_emit_activity",
"orgx_report_progress",
"orgx_register_artifact",
Expand All @@ -479,6 +497,9 @@ function buildManagedFileContent(input: {
orchestration: [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"orgx_emit_activity",
"orgx_report_progress",
"orgx_register_artifact",
Expand All @@ -500,6 +521,9 @@ function buildManagedFileContent(input: {
"Primary tool surface (OrgX MCP tools exposed by this plugin):",
"- orgx_status",
"- orgx_sync",
"- orgx_query_org_memory",
"- orgx_recommend_next_action",
"- orgx_get_morning_brief",
"- orgx_emit_activity",
"- orgx_apply_changeset",
"- orgx_register_artifact",
Expand All @@ -508,7 +532,7 @@ function buildManagedFileContent(input: {
"- orgx_quality_score",
"- orgx_proof_status",
"- orgx_record_outcome",
"- orgx_get_outcome_attribution",
"- orgx_get_outcome_attribution (compatibility alias for older ROI workflows)",
"- orgx_verify_completion",
"- orgx_reassign_stream",
"",
Expand Down
81 changes: 81 additions & 0 deletions src/contracts/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ import type {
BillingStatus,
BillingCheckoutRequest,
BillingUrlResult,
OrgMemoryQueryRequest,
OrgMemoryQueryResponse,
RecommendNextActionRequest,
RecommendNextActionResponse,
MorningBriefResponse,
UsageControlPlaneSummary,
KickoffContextRequest,
KickoffContextResponse,
Expand Down Expand Up @@ -266,6 +271,34 @@ export class OrgXClient {
return this.request<T>("PATCH", path, body);
}

private async executeClientTool<T>(
toolId: "query_org_memory" | "recommend_next_action",
args: Record<string, unknown>,
context?: {
initiativeId?: string | null;
projectId?: string | null;
runId?: string | null;
}
): Promise<T> {
const response = await this.post<{
ok: boolean;
data?: T;
error?: string;
}>("/api/client/tools/execute", {
tool_id: toolId,
args,
initiative_id: context?.initiativeId ?? undefined,
project_id: context?.projectId ?? undefined,
run_id: context?.runId ?? undefined,
});

if (!response.ok) {
throw new Error(response.error ?? `Client tool ${toolId} failed`);
}

return response.data as T;
}

private buildQuery(params: Record<string, string | number | boolean | null | undefined>): string {
const entries = Object.entries(params).filter(([, value]) => value !== undefined && value !== null);
if (entries.length === 0) return "";
Expand Down Expand Up @@ -731,6 +764,54 @@ export class OrgXClient {
>("/api/usage/forecast");
}

async queryOrgMemory(
request: OrgMemoryQueryRequest
): Promise<OrgMemoryQueryResponse> {
return this.executeClientTool<OrgMemoryQueryResponse>(
"query_org_memory",
{
query: request.query,
scope: request.scope,
limit: request.limit,
}
);
}

async recommendNextAction(
request: RecommendNextActionRequest
): Promise<RecommendNextActionResponse> {
return this.executeClientTool<RecommendNextActionResponse>(
"recommend_next_action",
{
entity_type: request.entity_type,
entity_id: request.entity_id,
workspace_id: request.workspace_id,
command_center_id: request.command_center_id,
limit: request.limit,
cascade: request.cascade,
},
{
initiativeId:
request.entity_type === "initiative" ? request.entity_id ?? null : null,
}
);
}

async getMorningBrief(params: {
workspace_id: string;
session_id?: string;
}): Promise<MorningBriefResponse> {
const search = new URLSearchParams({
workspace_id: params.workspace_id,
});
if (params.session_id) {
search.set("session_id", params.session_id);
}
return this.get<MorningBriefResponse>(
`/api/flywheel/briefs?${search.toString()}`
);
}

// ===========================================================================
// Reporting Control Plane
// ===========================================================================
Expand Down
62 changes: 62 additions & 0 deletions src/contracts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,68 @@ export interface BillingUrlResult {
checkout_url?: string | null;
}

// =============================================================================
// Preferred MCP Read Surfaces
// =============================================================================

export type OrgMemoryScope = 'all' | 'artifacts' | 'decisions' | 'initiatives';

export interface OrgMemoryQueryRequest {
query: string;
scope?: OrgMemoryScope;
limit?: number;
}

export interface OrgMemoryQueryResponse {
query: string;
scope: OrgMemoryScope;
plan?: string | null;
retention_window_days?: number | null;
retention_applied?: boolean;
results: Array<{
id: string;
type: string;
title: string;
summary?: string | null;
relevance_score?: number | null;
created_at?: string | null;
}>;
total_found: number;
message?: string;
suggested_followups?: string[];
}

export interface RecommendNextActionRequest {
entity_type?: 'workspace' | 'initiative' | 'workstream' | 'milestone';
entity_id?: string;
workspace_id?: string;
command_center_id?: string;
limit?: number;
cascade?: boolean;
}

export interface RecommendNextActionResponse {
entity_type: string;
entity_id?: string | null;
workspace_id?: string | null;
command_center_id?: string | null;
recommendations: Array<Record<string, unknown>>;
next_action?: Record<string, unknown> | null;
capability_gaps?: Array<Record<string, unknown>>;
message?: string;
}

export interface MorningBriefResponse {
workspace_id: string;
session_summary: Record<string, unknown> | null;
intelligence?: Record<string, unknown>;
exceptions?: Array<Record<string, unknown>>;
trust_events?: Array<Record<string, unknown>>;
top_receipts?: Array<Record<string, unknown>>;
brief_markdown?: string | null;
message?: string;
}

// =============================================================================
// Usage Control Plane (Actual vs Forecast)
// =============================================================================
Expand Down
3 changes: 3 additions & 0 deletions src/mcp-http-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ type ToolScope = {
export const ORGX_BASE_TOOLS = [
"orgx_status",
"orgx_sync",
"orgx_query_org_memory",
"orgx_recommend_next_action",
"orgx_get_morning_brief",
"list_agent_configs",
"get_agent_config",
"orgx_emit_activity",
Expand Down
Loading
Loading