ofiere-openclaw-plugin 1.1.1 → 3.0.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 +21 -9
- package/index.ts +4 -3
- package/package.json +2 -2
- package/src/prompt.ts +80 -11
- package/src/tools.ts +1223 -281
package/README.md
CHANGED
|
@@ -40,15 +40,27 @@ Once configured, the plugin connects to your Supabase database at gateway startu
|
|
|
40
40
|
|
|
41
41
|
Changes made by the agent are immediately visible on the Ofiere dashboard (Vercel) via Supabase real-time subscriptions.
|
|
42
42
|
|
|
43
|
-
## AI Tools
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
|
48
|
-
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
|
|
43
|
+
## AI Meta-Tools
|
|
44
|
+
|
|
45
|
+
The plugin uses a scalable meta-tool architecture. Each tool handles one domain with an `action` parameter to select the operation.
|
|
46
|
+
|
|
47
|
+
| Tool | Actions | Description |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `OFIERE_TASK_OPS` | `list`, `create`, `update`, `delete` | Manage PM tasks — list, create, update status/priority, delete |
|
|
50
|
+
| `OFIERE_AGENT_OPS` | `list` | Query available agents for task assignment |
|
|
51
|
+
|
|
52
|
+
### Example
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
// Create a task
|
|
56
|
+
OFIERE_TASK_OPS({ action: "create", title: "Deploy v2", agent_id: "ivy" })
|
|
57
|
+
|
|
58
|
+
// List tasks
|
|
59
|
+
OFIERE_TASK_OPS({ action: "list", status: "PENDING", limit: 10 })
|
|
60
|
+
|
|
61
|
+
// Update a task
|
|
62
|
+
OFIERE_TASK_OPS({ action: "update", task_id: "task-123", status: "DONE" })
|
|
63
|
+
```
|
|
52
64
|
|
|
53
65
|
## CLI Commands
|
|
54
66
|
|
package/index.ts
CHANGED
|
@@ -74,12 +74,13 @@ const ofierePlugin = {
|
|
|
74
74
|
// Probe the api object for any agent identity info (for debugging + fallback)
|
|
75
75
|
probeApiForAgentName(api, api.logger);
|
|
76
76
|
|
|
77
|
-
registerTools
|
|
78
|
-
|
|
77
|
+
// registerTools now returns the count — no more hardcoding
|
|
78
|
+
const toolCount = registerTools(api, supabase, config);
|
|
79
|
+
promptState.toolCount = toolCount;
|
|
79
80
|
promptState.ready = true;
|
|
80
81
|
const agentLabel = config.agentId || "auto-detect";
|
|
81
82
|
api.logger.info(
|
|
82
|
-
`[ofiere] Ready —
|
|
83
|
+
`[ofiere] Ready — ${toolCount} meta-tools registered (agent: ${agentLabel})`,
|
|
83
84
|
);
|
|
84
85
|
} catch (e) {
|
|
85
86
|
const msg = e instanceof Error ? e.message : String(e);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ofiere-openclaw-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "OpenClaw plugin for Ofiere PM —
|
|
5
|
+
"description": "OpenClaw plugin for Ofiere PM — 9 meta-tools covering tasks, agents, projects, scheduling, knowledge, workflows, notifications, memory, and prompts",
|
|
6
6
|
"keywords": ["openclaw", "ofiere", "project-management", "agents", "plugin"],
|
|
7
7
|
"homepage": "https://github.com/gilanggemar/Ofiere",
|
|
8
8
|
"repository": {
|
package/src/prompt.ts
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
+
// src/prompt.ts — Dynamic system prompt for Ofiere PM plugin
|
|
2
|
+
//
|
|
3
|
+
// The prompt is built dynamically based on plugin state.
|
|
4
|
+
// Tool documentation is structured so adding a new meta-tool
|
|
5
|
+
// only requires adding a new entry to TOOL_DOCS below.
|
|
6
|
+
|
|
7
|
+
// ─── Tool Documentation Registry ────────────────────────────────────────────
|
|
8
|
+
// Add new meta-tool docs here when expanding. Each entry maps to one
|
|
9
|
+
// registered meta-tool and will be included in the system prompt.
|
|
10
|
+
|
|
11
|
+
const TOOL_DOCS: Record<string, string> = {
|
|
12
|
+
OFIERE_TASK_OPS: `- **OFIERE_TASK_OPS** — Manage tasks (action: "list", "create", "update", "delete")
|
|
13
|
+
- list: Filter by status, agent_id, space_id, folder_id, limit. Returns execution_plan, goals, constraints if present
|
|
14
|
+
- create: Requires title. Optional: agent_id, description, instructions, execution_plan, goals, constraints, system_prompt, priority, tags, dates
|
|
15
|
+
- For COMPLEX tasks: include execution_plan (step-by-step), goals, constraints, and system_prompt
|
|
16
|
+
- For SIMPLE tasks: just title and optionally description
|
|
17
|
+
- update: Requires task_id. All create fields + progress
|
|
18
|
+
- delete: Requires task_id. Removes task and subtasks`,
|
|
19
|
+
|
|
20
|
+
OFIERE_AGENT_OPS: `- **OFIERE_AGENT_OPS** — Query agents (action: "list")
|
|
21
|
+
- list: See all agents with IDs, names, roles for task assignment`,
|
|
22
|
+
|
|
23
|
+
OFIERE_PROJECT_OPS: `- **OFIERE_PROJECT_OPS** — Manage PM hierarchy (action: "list_spaces", "create_space", "update_space", "delete_space", "list_folders", "create_folder", "update_folder", "delete_folder", "list_dependencies", "add_dependency", "remove_dependency")
|
|
24
|
+
- Spaces: Top-level containers. CRUD with name, icon, icon_color
|
|
25
|
+
- Folders: Live inside spaces. Can nest via parent_folder_id. Types: folder, project
|
|
26
|
+
- Dependencies: Link tasks with predecessor/successor relationships
|
|
27
|
+
- Types: finish_to_start (default), start_to_start, finish_to_finish, start_to_finish
|
|
28
|
+
- lag_days: optional delay between linked tasks`,
|
|
29
|
+
|
|
30
|
+
OFIERE_SCHEDULE_OPS: `- **OFIERE_SCHEDULE_OPS** — Calendar events (action: "list", "create", "update", "delete")
|
|
31
|
+
- list: Filter by start_date, end_date, agent_id
|
|
32
|
+
- create: Requires title + scheduled_date (YYYY-MM-DD). Optional: scheduled_time, duration_minutes, task_id, agent_id, recurrence_type, color
|
|
33
|
+
- Recurrence: none, hourly, daily, weekly, monthly with interval`,
|
|
34
|
+
|
|
35
|
+
OFIERE_KNOWLEDGE_OPS: `- **OFIERE_KNOWLEDGE_OPS** — Knowledge base documents (action: "search", "list", "create", "update", "delete")
|
|
36
|
+
- search: Keyword search across all docs. Requires: query
|
|
37
|
+
- list: Paginated listing with optional search filter
|
|
38
|
+
- create: Add knowledge. Requires: file_name. Optional: content, source, author, credibility_tier
|
|
39
|
+
- update/delete: By document ID`,
|
|
40
|
+
|
|
41
|
+
OFIERE_WORKFLOW_OPS: `- **OFIERE_WORKFLOW_OPS** — Automated workflows (action: "list", "get", "create", "list_runs", "trigger")
|
|
42
|
+
- list: All workflows, filter by status (draft, active, paused, archived)
|
|
43
|
+
- get: Full workflow details by ID
|
|
44
|
+
- create: New workflow with name, steps, schedule
|
|
45
|
+
- list_runs: Recent execution history for a workflow
|
|
46
|
+
- trigger: Start a workflow run (creates a run record)`,
|
|
47
|
+
|
|
48
|
+
OFIERE_NOTIFY_OPS: `- **OFIERE_NOTIFY_OPS** — Notifications (action: "list", "mark_read", "mark_all_read", "delete")
|
|
49
|
+
- list: Recent notifications. unread_only=true for unread only
|
|
50
|
+
- mark_read: Mark one notification read by ID
|
|
51
|
+
- mark_all_read: Mark all as read`,
|
|
52
|
+
|
|
53
|
+
OFIERE_MEMORY_OPS: `- **OFIERE_MEMORY_OPS** — Conversation history & knowledge memory (action: "list_conversations", "get_messages", "search_messages", "add_knowledge", "search_knowledge")
|
|
54
|
+
- list_conversations: Recent chats, filter by agent_id
|
|
55
|
+
- get_messages: Full message history for a conversation
|
|
56
|
+
- search_messages: Search across all messages by keyword
|
|
57
|
+
- add_knowledge: Store a knowledge fragment (requires agent_id, content, source)
|
|
58
|
+
- search_knowledge: Search stored knowledge for an agent`,
|
|
59
|
+
|
|
60
|
+
OFIERE_PROMPT_OPS: `- **OFIERE_PROMPT_OPS** — Manage prompt instruction chunks (action: "list", "get", "create", "update", "delete")
|
|
61
|
+
- list: All prompt chunks, filter by agent_id
|
|
62
|
+
- create: New chunk with label + content. These modify agent behavior
|
|
63
|
+
- update: Change label, content, enabled state, or sort_order
|
|
64
|
+
- All modifications are logged for audit`,
|
|
65
|
+
};
|
|
66
|
+
|
|
1
67
|
export function getSystemPrompt(state: {
|
|
2
68
|
ready: boolean;
|
|
3
69
|
toolCount: number;
|
|
@@ -13,28 +79,31 @@ export function getSystemPrompt(state: {
|
|
|
13
79
|
? `When you create a task without specifying agent_id, it is assigned to YOU (${state.agentId}).`
|
|
14
80
|
: `When you create a task without specifying agent_id, it is assigned to YOU automatically.`;
|
|
15
81
|
|
|
82
|
+
// Build tool docs from registry — only include docs for tools that exist
|
|
83
|
+
const toolDocs = Object.values(TOOL_DOCS).join("\n");
|
|
84
|
+
|
|
16
85
|
return `<ofiere-pm>
|
|
17
86
|
You are connected to the Ofiere Project Management dashboard via the Ofiere PM plugin.
|
|
18
87
|
${agentLine}
|
|
19
88
|
|
|
20
|
-
## Your Ofiere PM
|
|
21
|
-
|
|
89
|
+
## Your Ofiere PM Tools (${state.toolCount} meta-tools)
|
|
90
|
+
|
|
91
|
+
Each tool uses an "action" parameter to select the operation. Always include action.
|
|
22
92
|
|
|
23
|
-
|
|
24
|
-
- **OFIERE_CREATE_TASK** — Create new tasks (auto-assigned to you if no agent_id given)
|
|
25
|
-
- **OFIERE_UPDATE_TASK** — Update task status, priority, progress, etc.
|
|
26
|
-
- **OFIERE_DELETE_TASK** — Delete tasks
|
|
27
|
-
- **OFIERE_LIST_AGENTS** — See all available agents for task assignment
|
|
93
|
+
${toolDocs}
|
|
28
94
|
|
|
29
95
|
## Rules
|
|
30
96
|
- ${assignRule}
|
|
31
97
|
- To create an unassigned task, pass agent_id as "none" or "unassigned".
|
|
32
|
-
- When the user says "create a task for [agent name]", use
|
|
98
|
+
- When the user says "create a task for [agent name]", use OFIERE_AGENT_OPS action:"list" to find the agent ID, then use OFIERE_TASK_OPS action:"create" with that agent_id.
|
|
33
99
|
- Always confirm task creation/updates by reporting back what was done.
|
|
34
|
-
- Task statuses
|
|
100
|
+
- Task statuses: PENDING, IN_PROGRESS, DONE, FAILED.
|
|
35
101
|
- Priority levels: 0=LOW, 1=MEDIUM, 2=HIGH, 3=CRITICAL.
|
|
36
|
-
- Changes
|
|
37
|
-
- Do NOT fabricate task IDs —
|
|
102
|
+
- Changes appear in the Ofiere dashboard immediately via real-time sync.
|
|
103
|
+
- Do NOT fabricate task IDs — use OFIERE_TASK_OPS action:"list" to look up real IDs.
|
|
104
|
+
- For complex tasks, ALWAYS include execution_plan, goals, and constraints. For simple tasks, just title is enough.
|
|
105
|
+
- When creating dependencies, use OFIERE_PROJECT_OPS to link predecessor/successor tasks.
|
|
106
|
+
- Prompt chunk modifications (OFIERE_PROMPT_OPS) are powerful — use thoughtfully as they change agent behavior.
|
|
38
107
|
</ofiere-pm>`;
|
|
39
108
|
}
|
|
40
109
|
|