clawmon 0.2.0 → 0.2.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.
package/bin/clawmon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const BASE = process.env.CLAWMON_URL || "http://127.0.0.1:7070";
3
+ const BASE = globalThis.process?.env?.CLAWMON_URL || "http://127.0.0.1:7070";
4
4
 
5
5
  const [,, cmd, ...args] = process.argv;
6
6
 
@@ -117,12 +117,7 @@ async function main() {
117
117
  }
118
118
 
119
119
  case "open": {
120
- const { exec } = await import("node:child_process");
121
- const url = BASE;
122
- const platform = process.platform;
123
- const cmd = platform === "darwin" ? "open" : platform === "win32" ? "start" : "xdg-open";
124
- exec(`${cmd} ${url}`);
125
- console.log(`Opening ${url}`);
120
+ console.log(`Open in your browser: ${BASE}`);
126
121
  break;
127
122
  }
128
123
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "clawmon",
3
3
  "name": "clawmon",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "description": "Local task monitor with web UI — tracks running, stale, and failed tasks",
6
6
  "entry": "src/index.ts",
7
7
  "configSchema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmon",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Local task monitor plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/ui/app.js CHANGED
@@ -306,13 +306,38 @@
306
306
  "</div>" +
307
307
 
308
308
  '<div class="docs-section">' +
309
- "<h3>Agent Tools</h3>" +
309
+ "<h3>Loading Tasks</h3>" +
310
+ "<p>There are several ways to get tasks into ClawMon:</p>" +
311
+ '<pre class="code-block">' +
312
+ "# CLI — load from a JSON file\n" +
313
+ "clawmon load tasks.json\n\n" +
314
+ "# CLI — add one task\n" +
315
+ "clawmon add \"build-app\" --kind build\n\n" +
316
+ "# curl — bulk load\n" +
317
+ "curl -X POST http://127.0.0.1:7070/api/tasks/bulk \\\n" +
318
+ ' -H "Content-Type: application/json" \\\n' +
319
+ " -d '{\"tasks\": [{\"name\": \"t1\", \"kind\": \"build\"}, {\"name\": \"t2\"}]}'\n\n" +
320
+ "# JSON file format (array or {tasks: [...]})\n" +
321
+ "[\n" +
322
+ ' {"name": "build-app", "kind": "build", "status": "running"},\n' +
323
+ ' {"name": "run-tests", "kind": "test", "status": "pending"},\n' +
324
+ ' {"id": "custom-id", "name": "deploy", "kind": "deploy"}\n' +
325
+ "]" +
326
+ "</pre>" +
327
+ "</div>" +
328
+
329
+ '<div class="docs-section">' +
330
+ "<h3>Agent Tools (OpenClaw Integration)</h3>" +
331
+ "<p>When running as an OpenClaw plugin, the agent has direct access to these tools:</p>" +
310
332
  "<table><thead><tr><th>Tool</th><th>Description</th></tr></thead><tbody>" +
311
333
  "<tr><td>clawmon_create_task</td><td>Create a task. Input: {name, kind?, status?, pid?}</td></tr>" +
312
334
  "<tr><td>clawmon_update_task</td><td>Update a task. Input: {id, status?, exit_code?, error?}</td></tr>" +
313
335
  "<tr><td>clawmon_list_tasks</td><td>List tasks. Input: {status?, limit?}</td></tr>" +
314
336
  "<tr><td>clawmon_bulk_load</td><td>Bulk upsert. Input: {tasks: [...]}</td></tr>" +
315
337
  "</tbody></table>" +
338
+ "<p style='margin-top:12px;color:#a0a0b8'>Agent sessions are automatically tracked — " +
339
+ "a task is created on session start and marked done/failed on session end. " +
340
+ "The agent also receives a system prompt hint about available tools.</p>" +
316
341
  "</div>" +
317
342
 
318
343
  '<div class="docs-section">' +