@useorgx/openclaw-plugin 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/dashboard/dist/assets/index-BJj_VPzn.css +1 -0
- package/dashboard/dist/assets/index-DqHqHn4Z.js +103 -0
- package/dashboard/dist/index.html +15 -0
- package/dist/api.d.ts +47 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +162 -0
- package/dist/api.js.map +1 -0
- package/dist/dashboard-api.d.ts +50 -0
- package/dist/dashboard-api.d.ts.map +1 -0
- package/dist/dashboard-api.js +107 -0
- package/dist/dashboard-api.js.map +1 -0
- package/dist/http-handler.d.ts +28 -0
- package/dist/http-handler.d.ts.map +1 -0
- package/dist/http-handler.js +215 -0
- package/dist/http-handler.js.map +1 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +459 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +182 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/openclaw.plugin.json +73 -0
- package/package.json +74 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-handler.js","sourceRoot":"","sources":["../src/http-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAoB5B,gFAAgF;AAChF,uBAAuB;AACvB,gFAAgF;AAEhF,MAAM,UAAU,GAA2B;IACzC,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,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,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrgX Clawdbot Plugin — Main Entry Point
|
|
3
|
+
*
|
|
4
|
+
* This is the canonical entry point for the OrgX plugin.
|
|
5
|
+
* It exports the plugin interface for Clawdbot consumption.
|
|
6
|
+
*
|
|
7
|
+
* Registers:
|
|
8
|
+
* - Background sync service ("orgx-sync")
|
|
9
|
+
* - MCP Tools (orgx_status, orgx_sync, orgx_spawn_check, etc.)
|
|
10
|
+
* - CLI command ("orgx" with status/sync subcommands)
|
|
11
|
+
* - HTTP handler for dashboard + API proxy
|
|
12
|
+
*/
|
|
13
|
+
import type { OrgXConfig } from "./types.js";
|
|
14
|
+
export type { OrgXConfig, OrgSnapshot } from "./types.js";
|
|
15
|
+
export { OrgXClient } from "./api.js";
|
|
16
|
+
export interface PluginAPI {
|
|
17
|
+
config?: {
|
|
18
|
+
plugins?: {
|
|
19
|
+
entries?: {
|
|
20
|
+
orgx?: {
|
|
21
|
+
config?: Partial<OrgXConfig & {
|
|
22
|
+
dashboardEnabled: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
log?: {
|
|
29
|
+
info?: (msg: string, meta?: Record<string, unknown>) => void;
|
|
30
|
+
warn?: (msg: string, meta?: Record<string, unknown>) => void;
|
|
31
|
+
debug?: (msg: string, meta?: Record<string, unknown>) => void;
|
|
32
|
+
};
|
|
33
|
+
registerService: (service: {
|
|
34
|
+
id: string;
|
|
35
|
+
start: () => Promise<void>;
|
|
36
|
+
stop: () => Promise<void>;
|
|
37
|
+
}) => void;
|
|
38
|
+
registerTool: (tool: {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
parameters: Record<string, unknown>;
|
|
42
|
+
execute: (callId: string, params?: any) => Promise<ToolResult>;
|
|
43
|
+
}, options?: {
|
|
44
|
+
optional?: boolean;
|
|
45
|
+
}) => void;
|
|
46
|
+
registerCli: (fn: (ctx: {
|
|
47
|
+
program: any;
|
|
48
|
+
}) => void, options?: {
|
|
49
|
+
commands?: string[];
|
|
50
|
+
}) => void;
|
|
51
|
+
registerHttpHandler: (handler: unknown) => void;
|
|
52
|
+
}
|
|
53
|
+
export interface ToolResult {
|
|
54
|
+
content: Array<{
|
|
55
|
+
type: "text";
|
|
56
|
+
text: string;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Plugin registration function.
|
|
61
|
+
* Called by Clawdbot when the plugin is loaded.
|
|
62
|
+
*
|
|
63
|
+
* @param api - The Clawdbot plugin API
|
|
64
|
+
*/
|
|
65
|
+
export default function register(api: PluginAPI): void;
|
|
66
|
+
export { register };
|
|
67
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,YAAY,CAAC;AAO1D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMtC,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE;YACR,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,EAAE;oBACL,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,GAAG;wBAAE,gBAAgB,EAAE,OAAO,CAAA;qBAAE,CAAC,CAAC;iBAC9D,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QAC7D,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AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAobrD;AAMD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrgX Clawdbot Plugin — Main Entry Point
|
|
3
|
+
*
|
|
4
|
+
* This is the canonical entry point for the OrgX plugin.
|
|
5
|
+
* It exports the plugin interface for Clawdbot consumption.
|
|
6
|
+
*
|
|
7
|
+
* Registers:
|
|
8
|
+
* - Background sync service ("orgx-sync")
|
|
9
|
+
* - MCP Tools (orgx_status, orgx_sync, orgx_spawn_check, etc.)
|
|
10
|
+
* - CLI command ("orgx" with status/sync subcommands)
|
|
11
|
+
* - HTTP handler for dashboard + API proxy
|
|
12
|
+
*/
|
|
13
|
+
import { OrgXClient } from "./api.js";
|
|
14
|
+
import { createHttpHandler } from "./http-handler.js";
|
|
15
|
+
import { readFileSync } from "node:fs";
|
|
16
|
+
import { join } from "node:path";
|
|
17
|
+
import { homedir } from "node:os";
|
|
18
|
+
export { OrgXClient } from "./api.js";
|
|
19
|
+
// =============================================================================
|
|
20
|
+
// HELPERS
|
|
21
|
+
// =============================================================================
|
|
22
|
+
function resolveConfig(api) {
|
|
23
|
+
const pluginConf = api.config?.plugins?.entries?.orgx?.config ?? {};
|
|
24
|
+
let apiKey = pluginConf.apiKey || process.env.ORGX_API_KEY || "";
|
|
25
|
+
if (!apiKey) {
|
|
26
|
+
try {
|
|
27
|
+
const envPath = join(homedir(), "Code", "orgx", "orgx", ".env.local");
|
|
28
|
+
const envContent = readFileSync(envPath, "utf-8");
|
|
29
|
+
const match = envContent.match(/^ORGX_(?:API_KEY|SERVICE_KEY)=["']?([^"'\n]+)["']?$/m);
|
|
30
|
+
if (match)
|
|
31
|
+
apiKey = match[1].trim();
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// .env.local not found
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Resolve user ID for X-Orgx-User-Id header
|
|
38
|
+
let userId = pluginConf.userId || process.env.ORGX_USER_ID || "";
|
|
39
|
+
if (!userId) {
|
|
40
|
+
try {
|
|
41
|
+
const envPath = join(homedir(), "Code", "orgx", "orgx", ".env.local");
|
|
42
|
+
const envContent = readFileSync(envPath, "utf-8");
|
|
43
|
+
const match = envContent.match(/^ORGX_USER_ID=["']?([^"'\n]+)["']?$/m);
|
|
44
|
+
if (match)
|
|
45
|
+
userId = match[1].trim();
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// .env.local not found
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
apiKey,
|
|
53
|
+
userId,
|
|
54
|
+
baseUrl: pluginConf.baseUrl ||
|
|
55
|
+
process.env.ORGX_BASE_URL ||
|
|
56
|
+
"https://www.useorgx.com",
|
|
57
|
+
syncIntervalMs: pluginConf.syncIntervalMs ?? 300_000,
|
|
58
|
+
enabled: pluginConf.enabled ?? true,
|
|
59
|
+
dashboardEnabled: pluginConf.dashboardEnabled ?? true,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function text(s) {
|
|
63
|
+
return { content: [{ type: "text", text: s }] };
|
|
64
|
+
}
|
|
65
|
+
function json(label, data) {
|
|
66
|
+
return text(`${label}\n\`\`\`json\n${JSON.stringify(data, null, 2)}\n\`\`\``);
|
|
67
|
+
}
|
|
68
|
+
function formatSnapshot(snap) {
|
|
69
|
+
const lines = ["# OrgX Status\n"];
|
|
70
|
+
if (snap.initiatives?.length) {
|
|
71
|
+
lines.push("## Initiatives");
|
|
72
|
+
for (const init of snap.initiatives) {
|
|
73
|
+
const pct = init.progress != null ? ` (${init.progress}%)` : "";
|
|
74
|
+
lines.push(`- **${init.title}** — ${init.status}${pct}`);
|
|
75
|
+
}
|
|
76
|
+
lines.push("");
|
|
77
|
+
}
|
|
78
|
+
if (snap.agents?.length) {
|
|
79
|
+
lines.push("## Agents");
|
|
80
|
+
for (const a of snap.agents) {
|
|
81
|
+
const task = a.currentTask ? ` → ${a.currentTask}` : "";
|
|
82
|
+
lines.push(`- **${a.name}** [${a.domain}]: ${a.status}${task}`);
|
|
83
|
+
}
|
|
84
|
+
lines.push("");
|
|
85
|
+
}
|
|
86
|
+
if (snap.activeTasks?.length) {
|
|
87
|
+
lines.push("## Active Tasks");
|
|
88
|
+
for (const t of snap.activeTasks) {
|
|
89
|
+
const tier = t.modelTier ? ` (${t.modelTier})` : "";
|
|
90
|
+
lines.push(`- ${t.title} — ${t.status}${tier}`);
|
|
91
|
+
}
|
|
92
|
+
lines.push("");
|
|
93
|
+
}
|
|
94
|
+
if (snap.pendingDecisions?.length) {
|
|
95
|
+
lines.push("## Pending Decisions");
|
|
96
|
+
for (const d of snap.pendingDecisions) {
|
|
97
|
+
lines.push(`- [${d.urgency.toUpperCase()}] ${d.title}`);
|
|
98
|
+
}
|
|
99
|
+
lines.push("");
|
|
100
|
+
}
|
|
101
|
+
if (snap.syncedAt)
|
|
102
|
+
lines.push(`_Last synced: ${snap.syncedAt}_`);
|
|
103
|
+
return lines.join("\n");
|
|
104
|
+
}
|
|
105
|
+
// =============================================================================
|
|
106
|
+
// PLUGIN STATE
|
|
107
|
+
// =============================================================================
|
|
108
|
+
let cachedSnapshot = null;
|
|
109
|
+
let lastSnapshotAt = 0;
|
|
110
|
+
// =============================================================================
|
|
111
|
+
// PLUGIN ENTRY — DEFAULT EXPORT
|
|
112
|
+
// =============================================================================
|
|
113
|
+
/**
|
|
114
|
+
* Plugin registration function.
|
|
115
|
+
* Called by Clawdbot when the plugin is loaded.
|
|
116
|
+
*
|
|
117
|
+
* @param api - The Clawdbot plugin API
|
|
118
|
+
*/
|
|
119
|
+
export default function register(api) {
|
|
120
|
+
const config = resolveConfig(api);
|
|
121
|
+
if (!config.enabled) {
|
|
122
|
+
api.log?.info?.("[orgx] Plugin disabled");
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (!config.apiKey) {
|
|
126
|
+
api.log?.warn?.("[orgx] No API key. Set plugins.entries.orgx.config.apiKey, ORGX_API_KEY env, or ~/Code/orgx/orgx/.env.local");
|
|
127
|
+
}
|
|
128
|
+
const client = new OrgXClient(config.apiKey, config.baseUrl, config.userId);
|
|
129
|
+
// ---------------------------------------------------------------------------
|
|
130
|
+
// 1. Background Sync Service
|
|
131
|
+
// ---------------------------------------------------------------------------
|
|
132
|
+
let syncTimer = null;
|
|
133
|
+
async function doSync() {
|
|
134
|
+
try {
|
|
135
|
+
cachedSnapshot = await client.getOrgSnapshot();
|
|
136
|
+
lastSnapshotAt = Date.now();
|
|
137
|
+
api.log?.debug?.("[orgx] Sync OK");
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
api.log?.warn?.(`[orgx] Sync failed: ${err instanceof Error ? err.message : err}`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
api.registerService({
|
|
144
|
+
id: "orgx-sync",
|
|
145
|
+
start: async () => {
|
|
146
|
+
api.log?.info?.("[orgx] Starting sync service", {
|
|
147
|
+
interval: config.syncIntervalMs,
|
|
148
|
+
});
|
|
149
|
+
await doSync();
|
|
150
|
+
syncTimer = setInterval(doSync, config.syncIntervalMs);
|
|
151
|
+
},
|
|
152
|
+
stop: async () => {
|
|
153
|
+
if (syncTimer)
|
|
154
|
+
clearInterval(syncTimer);
|
|
155
|
+
syncTimer = null;
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
// ---------------------------------------------------------------------------
|
|
159
|
+
// 2. MCP Tools (Model Context Protocol compatible)
|
|
160
|
+
// ---------------------------------------------------------------------------
|
|
161
|
+
// --- orgx_status ---
|
|
162
|
+
api.registerTool({
|
|
163
|
+
name: "orgx_status",
|
|
164
|
+
description: "Get current OrgX org status: active initiatives, agent states, pending decisions, active tasks.",
|
|
165
|
+
parameters: {
|
|
166
|
+
type: "object",
|
|
167
|
+
properties: {},
|
|
168
|
+
additionalProperties: false,
|
|
169
|
+
},
|
|
170
|
+
async execute(_callId) {
|
|
171
|
+
if (!cachedSnapshot ||
|
|
172
|
+
Date.now() - lastSnapshotAt > config.syncIntervalMs) {
|
|
173
|
+
await doSync();
|
|
174
|
+
}
|
|
175
|
+
if (!cachedSnapshot) {
|
|
176
|
+
return text("❌ Failed to fetch OrgX status. Check API key and connectivity.");
|
|
177
|
+
}
|
|
178
|
+
return text(formatSnapshot(cachedSnapshot));
|
|
179
|
+
},
|
|
180
|
+
}, { optional: true });
|
|
181
|
+
// --- orgx_sync ---
|
|
182
|
+
api.registerTool({
|
|
183
|
+
name: "orgx_sync",
|
|
184
|
+
description: "Push/pull memory sync with OrgX. Send local memory/daily log; receive initiatives, tasks, decisions, model routing policy.",
|
|
185
|
+
parameters: {
|
|
186
|
+
type: "object",
|
|
187
|
+
properties: {
|
|
188
|
+
memory: {
|
|
189
|
+
type: "string",
|
|
190
|
+
description: "Local memory snapshot to push",
|
|
191
|
+
},
|
|
192
|
+
dailyLog: {
|
|
193
|
+
type: "string",
|
|
194
|
+
description: "Today's session log to push",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
async execute(_callId, params = {}) {
|
|
199
|
+
try {
|
|
200
|
+
const resp = await client.syncMemory({
|
|
201
|
+
memory: params.memory,
|
|
202
|
+
dailyLog: params.dailyLog,
|
|
203
|
+
});
|
|
204
|
+
return json("Sync complete:", resp);
|
|
205
|
+
}
|
|
206
|
+
catch (err) {
|
|
207
|
+
return text(`❌ Sync failed: ${err instanceof Error ? err.message : err}`);
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
}, { optional: true });
|
|
211
|
+
// --- orgx_spawn_check ---
|
|
212
|
+
api.registerTool({
|
|
213
|
+
name: "orgx_spawn_check",
|
|
214
|
+
description: "Check quality gate + get model routing before spawning a sub-agent. Returns allowed/denied, model tier, and check details.",
|
|
215
|
+
parameters: {
|
|
216
|
+
type: "object",
|
|
217
|
+
properties: {
|
|
218
|
+
domain: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Agent domain (engineering, product, marketing, data, operations, design)",
|
|
221
|
+
},
|
|
222
|
+
taskId: {
|
|
223
|
+
type: "string",
|
|
224
|
+
description: "OrgX task ID to check",
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
required: ["domain"],
|
|
228
|
+
},
|
|
229
|
+
async execute(_callId, params = { domain: "" }) {
|
|
230
|
+
try {
|
|
231
|
+
const result = await client.checkSpawnGuard(params.domain, params.taskId);
|
|
232
|
+
const status = result.allowed ? "✅ Allowed" : "🚫 Blocked";
|
|
233
|
+
return json(`${status} — model tier: ${result.modelTier}`, result);
|
|
234
|
+
}
|
|
235
|
+
catch (err) {
|
|
236
|
+
return text(`❌ Spawn check failed: ${err instanceof Error ? err.message : err}`);
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
}, { optional: true });
|
|
240
|
+
// --- orgx_quality_score ---
|
|
241
|
+
api.registerTool({
|
|
242
|
+
name: "orgx_quality_score",
|
|
243
|
+
description: "Record a quality score (1-5) for completed agent work. Used to gate future spawns and track performance.",
|
|
244
|
+
parameters: {
|
|
245
|
+
type: "object",
|
|
246
|
+
properties: {
|
|
247
|
+
taskId: {
|
|
248
|
+
type: "string",
|
|
249
|
+
description: "ID of the completed task",
|
|
250
|
+
},
|
|
251
|
+
domain: {
|
|
252
|
+
type: "string",
|
|
253
|
+
description: "Agent domain that did the work",
|
|
254
|
+
},
|
|
255
|
+
score: {
|
|
256
|
+
type: "number",
|
|
257
|
+
description: "Quality 1 (poor) to 5 (excellent)",
|
|
258
|
+
minimum: 1,
|
|
259
|
+
maximum: 5,
|
|
260
|
+
},
|
|
261
|
+
notes: {
|
|
262
|
+
type: "string",
|
|
263
|
+
description: "Notes on the assessment",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
required: ["taskId", "domain", "score"],
|
|
267
|
+
},
|
|
268
|
+
async execute(_callId, params = { taskId: "", domain: "", score: 0 }) {
|
|
269
|
+
try {
|
|
270
|
+
await client.recordQuality(params);
|
|
271
|
+
return text(`✅ Quality score recorded: ${params.score}/5 for task ${params.taskId} (${params.domain})`);
|
|
272
|
+
}
|
|
273
|
+
catch (err) {
|
|
274
|
+
return text(`❌ Quality recording failed: ${err instanceof Error ? err.message : err}`);
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
}, { optional: true });
|
|
278
|
+
// --- orgx_create_entity ---
|
|
279
|
+
api.registerTool({
|
|
280
|
+
name: "orgx_create_entity",
|
|
281
|
+
description: "Create an OrgX entity (initiative, workstream, task, decision, milestone, etc.).",
|
|
282
|
+
parameters: {
|
|
283
|
+
type: "object",
|
|
284
|
+
properties: {
|
|
285
|
+
type: {
|
|
286
|
+
type: "string",
|
|
287
|
+
description: "Entity type: initiative, workstream, task, decision, milestone, artifact, agent, blocker",
|
|
288
|
+
},
|
|
289
|
+
title: {
|
|
290
|
+
type: "string",
|
|
291
|
+
description: "Entity title",
|
|
292
|
+
},
|
|
293
|
+
summary: {
|
|
294
|
+
type: "string",
|
|
295
|
+
description: "Description",
|
|
296
|
+
},
|
|
297
|
+
status: {
|
|
298
|
+
type: "string",
|
|
299
|
+
description: "Initial status (active, not_started, todo)",
|
|
300
|
+
},
|
|
301
|
+
initiative_id: {
|
|
302
|
+
type: "string",
|
|
303
|
+
description: "Parent initiative ID (for workstreams/tasks)",
|
|
304
|
+
},
|
|
305
|
+
workstream_id: {
|
|
306
|
+
type: "string",
|
|
307
|
+
description: "Parent workstream ID (for tasks)",
|
|
308
|
+
},
|
|
309
|
+
command_center_id: {
|
|
310
|
+
type: "string",
|
|
311
|
+
description: "Command center ID (for initiatives)",
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
required: ["type", "title"],
|
|
315
|
+
},
|
|
316
|
+
async execute(_callId, params = {}) {
|
|
317
|
+
try {
|
|
318
|
+
const { type, ...data } = params;
|
|
319
|
+
const entity = await client.createEntity(type, data);
|
|
320
|
+
return json(`✅ Created ${type}: ${entity.title ?? entity.id}`, entity);
|
|
321
|
+
}
|
|
322
|
+
catch (err) {
|
|
323
|
+
return text(`❌ Creation failed: ${err instanceof Error ? err.message : err}`);
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
}, { optional: true });
|
|
327
|
+
// --- orgx_update_entity ---
|
|
328
|
+
api.registerTool({
|
|
329
|
+
name: "orgx_update_entity",
|
|
330
|
+
description: "Update an existing OrgX entity by type and ID.",
|
|
331
|
+
parameters: {
|
|
332
|
+
type: "object",
|
|
333
|
+
properties: {
|
|
334
|
+
type: {
|
|
335
|
+
type: "string",
|
|
336
|
+
description: "Entity type",
|
|
337
|
+
},
|
|
338
|
+
id: {
|
|
339
|
+
type: "string",
|
|
340
|
+
description: "Entity UUID",
|
|
341
|
+
},
|
|
342
|
+
status: {
|
|
343
|
+
type: "string",
|
|
344
|
+
description: "New status",
|
|
345
|
+
},
|
|
346
|
+
title: {
|
|
347
|
+
type: "string",
|
|
348
|
+
description: "New title",
|
|
349
|
+
},
|
|
350
|
+
summary: {
|
|
351
|
+
type: "string",
|
|
352
|
+
description: "New summary",
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
required: ["type", "id"],
|
|
356
|
+
},
|
|
357
|
+
async execute(_callId, params = {}) {
|
|
358
|
+
try {
|
|
359
|
+
const { type, id, ...updates } = params;
|
|
360
|
+
const entity = await client.updateEntity(type, id, updates);
|
|
361
|
+
return json(`✅ Updated ${type} ${id.slice(0, 8)}`, entity);
|
|
362
|
+
}
|
|
363
|
+
catch (err) {
|
|
364
|
+
return text(`❌ Update failed: ${err instanceof Error ? err.message : err}`);
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
}, { optional: true });
|
|
368
|
+
// --- orgx_list_entities ---
|
|
369
|
+
api.registerTool({
|
|
370
|
+
name: "orgx_list_entities",
|
|
371
|
+
description: "List OrgX entities of a given type with optional status filter.",
|
|
372
|
+
parameters: {
|
|
373
|
+
type: "object",
|
|
374
|
+
properties: {
|
|
375
|
+
type: {
|
|
376
|
+
type: "string",
|
|
377
|
+
description: "Entity type: initiative, workstream, task, decision, agent",
|
|
378
|
+
},
|
|
379
|
+
status: {
|
|
380
|
+
type: "string",
|
|
381
|
+
description: "Filter by status",
|
|
382
|
+
},
|
|
383
|
+
limit: {
|
|
384
|
+
type: "number",
|
|
385
|
+
description: "Max results (default 20)",
|
|
386
|
+
default: 20,
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
required: ["type"],
|
|
390
|
+
},
|
|
391
|
+
async execute(_callId, params = { type: "" }) {
|
|
392
|
+
try {
|
|
393
|
+
const { type, ...filters } = params;
|
|
394
|
+
const resp = await client.listEntities(type, filters);
|
|
395
|
+
const entities = resp.data ?? resp;
|
|
396
|
+
const count = Array.isArray(entities) ? entities.length : "?";
|
|
397
|
+
return json(`${count} ${type}(s):`, entities);
|
|
398
|
+
}
|
|
399
|
+
catch (err) {
|
|
400
|
+
return text(`❌ List failed: ${err instanceof Error ? err.message : err}`);
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
}, { optional: true });
|
|
404
|
+
// ---------------------------------------------------------------------------
|
|
405
|
+
// 3. CLI Command
|
|
406
|
+
// ---------------------------------------------------------------------------
|
|
407
|
+
api.registerCli(({ program }) => {
|
|
408
|
+
const cmd = program.command("orgx").description("OrgX integration commands");
|
|
409
|
+
cmd
|
|
410
|
+
.command("status")
|
|
411
|
+
.description("Show current OrgX org status")
|
|
412
|
+
.action(async () => {
|
|
413
|
+
try {
|
|
414
|
+
const snap = await client.getOrgSnapshot();
|
|
415
|
+
console.log(formatSnapshot(snap));
|
|
416
|
+
}
|
|
417
|
+
catch (err) {
|
|
418
|
+
console.error(`Error: ${err instanceof Error ? err.message : err}`);
|
|
419
|
+
process.exit(1);
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
cmd
|
|
423
|
+
.command("sync")
|
|
424
|
+
.description("Trigger manual memory sync")
|
|
425
|
+
.option("--memory <text>", "Memory to push")
|
|
426
|
+
.option("--daily-log <text>", "Daily log to push")
|
|
427
|
+
.action(async (opts = {}) => {
|
|
428
|
+
try {
|
|
429
|
+
const resp = await client.syncMemory({
|
|
430
|
+
memory: opts.memory,
|
|
431
|
+
dailyLog: opts.dailyLog,
|
|
432
|
+
});
|
|
433
|
+
console.log("Sync complete:");
|
|
434
|
+
console.log(` Initiatives: ${resp.initiatives?.length ?? 0}`);
|
|
435
|
+
console.log(` Active tasks: ${resp.activeTasks?.length ?? 0}`);
|
|
436
|
+
console.log(` Pending decisions: ${resp.pendingDecisions?.length ?? 0}`);
|
|
437
|
+
}
|
|
438
|
+
catch (err) {
|
|
439
|
+
console.error(`Sync failed: ${err instanceof Error ? err.message : err}`);
|
|
440
|
+
process.exit(1);
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}, { commands: ["orgx"] });
|
|
444
|
+
// ---------------------------------------------------------------------------
|
|
445
|
+
// 4. HTTP Handler — Dashboard + API proxy
|
|
446
|
+
// ---------------------------------------------------------------------------
|
|
447
|
+
const httpHandler = createHttpHandler(config, client, () => cachedSnapshot);
|
|
448
|
+
api.registerHttpHandler(httpHandler);
|
|
449
|
+
api.log?.info?.("[orgx] Plugin registered", {
|
|
450
|
+
baseUrl: config.baseUrl,
|
|
451
|
+
hasApiKey: !!config.apiKey,
|
|
452
|
+
dashboardEnabled: config.dashboardEnabled,
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
// =============================================================================
|
|
456
|
+
// NAMED EXPORT FOR FLEXIBILITY
|
|
457
|
+
// =============================================================================
|
|
458
|
+
export { register };
|
|
459
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC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