closeclaw 3.0.0 → 3.0.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.
@@ -1 +1,2 @@
1
+ #!/usr/bin/env node
1
2
  require("bytenode"); require("./cli.jsc");
package/dist/cli.cjs CHANGED
@@ -7801,14 +7801,22 @@ var import_node_fs7 = require("fs");
7801
7801
  var import_node_path6 = require("path");
7802
7802
  var import_node_child_process3 = require("child_process");
7803
7803
  var import_node_readline = require("readline");
7804
- var import_meta3 = {};
7805
7804
  var HOME = process.env.HOME || process.env.USERPROFILE || "~";
7806
7805
  var PID_FILE = (0, import_node_path6.join)(HOME, ".closeclaw", "platform.pid");
7807
- var PKG_PATH = new URL("../package.json", import_meta3.url);
7808
7806
  function readPkgVersion() {
7809
7807
  try {
7810
- const pkg = JSON.parse((0, import_node_fs7.readFileSync)(PKG_PATH, "utf-8"));
7811
- return pkg.version ?? "unknown";
7808
+ const candidates = [
7809
+ (0, import_node_path6.join)(__dirname, "..", "package.json"),
7810
+ (0, import_node_path6.join)(__dirname, "package.json"),
7811
+ (0, import_node_path6.join)(process.cwd(), "package.json")
7812
+ ];
7813
+ for (const p of candidates) {
7814
+ if ((0, import_node_fs7.existsSync)(p)) {
7815
+ const pkg = JSON.parse((0, import_node_fs7.readFileSync)(p, "utf-8"));
7816
+ return pkg.version ?? "unknown";
7817
+ }
7818
+ }
7819
+ return "unknown";
7812
7820
  } catch {
7813
7821
  return "unknown";
7814
7822
  }
@@ -7954,8 +7962,8 @@ async function commandStart(args) {
7954
7962
  const openclawPath = whichSync("openclaw");
7955
7963
  if (openclawPath) {
7956
7964
  try {
7957
- const pluginDir = (0, import_node_path6.join)(import_meta3.dirname || __dirname, "..", "packages", "platform-tools");
7958
- const altPluginDir = (0, import_node_path6.join)(import_meta3.dirname || __dirname, "..", "..", "platform-tools");
7965
+ const pluginDir = (0, import_node_path6.join)(__dirname, "..", "packages", "platform-tools");
7966
+ const altPluginDir = (0, import_node_path6.join)(__dirname, "..", "..", "platform-tools");
7959
7967
  const resolvedPluginDir = (0, import_node_fs7.existsSync)((0, import_node_path6.join)(pluginDir, "package.json")) ? pluginDir : (0, import_node_fs7.existsSync)((0, import_node_path6.join)(altPluginDir, "package.json")) ? altPluginDir : null;
7960
7968
  if (resolvedPluginDir) {
7961
7969
  const pluginCheck = (0, import_node_child_process3.execSync)(`${openclawPath} plugins list 2>/dev/null || true`, { encoding: "utf-8" });
package/dist/cli.jsc CHANGED
Binary file
@@ -1 +1,2 @@
1
+ #!/usr/bin/env node
1
2
  require("bytenode"); require("./index.jsc");
package/dist/index.jsc CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "closeclaw",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "CloseClaw — AI-powered project management platform. One command, full stack.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -1,160 +0,0 @@
1
- // Platform Tools — OpenClaw plugin for AI Alpha Tech
2
- // Two tools: update_task + get_task
3
- // Both call the backend at localhost:3001/internal/* (never touches DB directly)
4
-
5
- import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
6
- import { Type } from "@sinclair/typebox";
7
-
8
- const BACKEND_URL = "http://127.0.0.1:3001";
9
-
10
- export default definePluginEntry({
11
- id: "platform-tools",
12
- name: "Platform Tools",
13
- description:
14
- "AI Alpha Tech platform integration. Provides update_task and get_task tools for agents to interact with the project management backend.",
15
- register(api) {
16
- // Tool 1: update_task
17
- api.registerTool({
18
- name: "update_task",
19
- label: "Update Task",
20
- description:
21
- "Update a platform task's status, plan, or post a comment. " +
22
- "Use this to move tasks through the workflow, submit plans for review, " +
23
- "or communicate with the team.",
24
- parameters: Type.Object({
25
- task_id: Type.String({ description: "The task ID to update." }),
26
- status: Type.Optional(
27
- Type.String({
28
- description:
29
- "New task status. Use: ai_planning, ai_discuss, ai_plan_review, ai_in_progress, ai_done.",
30
- })
31
- ),
32
- ai_plan: Type.Optional(
33
- Type.String({
34
- description: "The plan text to submit for human review.",
35
- })
36
- ),
37
- ai_plan_status: Type.Optional(
38
- Type.String({
39
- description:
40
- 'Plan status. Use "pending_review" when submitting a plan.',
41
- })
42
- ),
43
- comment: Type.Optional(
44
- Type.String({
45
- description:
46
- "A comment to post on the task (visible to the team).",
47
- })
48
- ),
49
- }),
50
- async execute(_toolCallId, params) {
51
- const res = await fetch(`${BACKEND_URL}/internal/task-update`, {
52
- method: "POST",
53
- headers: { "Content-Type": "application/json" },
54
- body: JSON.stringify(params),
55
- });
56
-
57
- if (!res.ok) {
58
- const text = await res.text().catch(() => "Unknown error");
59
- return {
60
- content: [{ type: "text", text: `Failed to update task: ${text}` }],
61
- details: { status: "failed" },
62
- };
63
- }
64
-
65
- const data = await res.json();
66
- return {
67
- content: [
68
- {
69
- type: "text",
70
- text: `Task ${params.task_id} updated successfully.${params.status ? ` Status: ${params.status}.` : ""}${params.comment ? " Comment posted." : ""}${params.ai_plan ? " Plan submitted." : ""}`,
71
- },
72
- ],
73
- details: data,
74
- };
75
- },
76
- });
77
-
78
- // Tool 2: get_task
79
- api.registerTool({
80
- name: "get_task",
81
- label: "Get Task",
82
- description:
83
- "Retrieve full details of a platform task including description, " +
84
- "labels, comments, and checklists. Use this to understand what " +
85
- "needs to be done before planning or executing.",
86
- parameters: Type.Object({
87
- task_id: Type.String({ description: "The task ID to retrieve." }),
88
- }),
89
- async execute(_toolCallId, params) {
90
- const res = await fetch(`${BACKEND_URL}/internal/task-get`, {
91
- method: "POST",
92
- headers: { "Content-Type": "application/json" },
93
- body: JSON.stringify(params),
94
- });
95
-
96
- if (!res.ok) {
97
- const text = await res.text().catch(() => "Unknown error");
98
- return {
99
- content: [{ type: "text", text: `Failed to get task: ${text}` }],
100
- details: { status: "failed" },
101
- };
102
- }
103
-
104
- const data = await res.json();
105
- const task = data.task;
106
-
107
- if (!task) {
108
- return {
109
- content: [{ type: "text", text: "Task not found." }],
110
- details: { status: "not_found" },
111
- };
112
- }
113
-
114
- const lines = [
115
- `# Task: ${task.title}`,
116
- `ID: ${task.id}`,
117
- `Status: ${task.status}`,
118
- `Priority: ${task.priority || "none"}`,
119
- `Side: ${task.side}`,
120
- ];
121
-
122
- if (task.description) lines.push(`\n## Description\n${task.description}`);
123
- if (task.due_date) lines.push(`Due: ${task.due_date}`);
124
- if (task.story_points != null) lines.push(`Story Points: ${task.story_points}`);
125
-
126
- const labels = task.task_labels
127
- ?.map((tl) => tl.labels?.name)
128
- .filter(Boolean);
129
- if (labels?.length) {
130
- lines.push(`\nLabels: ${labels.join(", ")}`);
131
- }
132
-
133
- const comments = task.comments || [];
134
- if (comments.length > 0) {
135
- lines.push("\n## Comments");
136
- for (const c of comments) {
137
- const author = c.is_ai_message ? "AI Agent" : "Human";
138
- lines.push(`[${author}] ${c.content}`);
139
- }
140
- }
141
-
142
- const checklists = task.checklists || [];
143
- if (checklists.length > 0) {
144
- lines.push("\n## Checklists");
145
- for (const cl of checklists) {
146
- lines.push(`### ${cl.title}`);
147
- for (const item of cl.checklist_items || []) {
148
- lines.push(`- [${item.is_checked ? "x" : " "}] ${item.content}`);
149
- }
150
- }
151
- }
152
-
153
- return {
154
- content: [{ type: "text", text: lines.join("\n") }],
155
- details: task,
156
- };
157
- },
158
- });
159
- },
160
- });
@@ -1,11 +0,0 @@
1
- {
2
- "id": "platform-tools",
3
- "name": "Platform Tools",
4
- "description": "AI Alpha Tech platform integration — update_task and get_task tools that call the backend API.",
5
- "version": "1.0.7",
6
- "configSchema": {
7
- "type": "object",
8
- "additionalProperties": false,
9
- "properties": {}
10
- }
11
- }
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@prajwalshete/platform-tools",
3
- "version": "1.3.0",
4
- "type": "module",
5
- "description": "OpenClaw plugin — gives AI agents tools for task management and GitHub integration with worktree isolation (update_task, get_task, list_branches, create_branch, create_pr, commit_and_push, get_pr_status).",
6
- "openclaw": {
7
- "extensions": [
8
- "./index.ts"
9
- ]
10
- },
11
- "keywords": [
12
- "openclaw",
13
- "openclaw-plugin",
14
- "platform-tools",
15
- "agent-tools",
16
- "task-management"
17
- ],
18
- "license": "MIT",
19
- "dependencies": {
20
- "@sinclair/typebox": "0.34.48"
21
- },
22
- "peerDependencies": {
23
- "openclaw": ">=2026.3.0"
24
- }
25
- }