@questionbase/deskfree 0.3.0-alpha.9 → 0.4.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/package.json CHANGED
@@ -1,64 +1,54 @@
1
1
  {
2
2
  "name": "@questionbase/deskfree",
3
- "version": "0.3.0-alpha.9",
4
- "description": "OpenClaw channel plugin for DeskFree turns DeskFree into a messaging platform for OpenClaw AI agents",
3
+ "version": "0.4.0",
4
+ "description": "DeskFree agent runtimeconnect AI agents to DeskFree projects",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- }
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/questionbase/deskfree.git",
10
+ "directory": "packages/runtime"
13
11
  },
14
- "openclaw": {
15
- "extensions": [
16
- "./dist/index.js"
17
- ]
12
+ "keywords": [
13
+ "deskfree",
14
+ "agent",
15
+ "ai",
16
+ "project-management"
17
+ ],
18
+ "bin": {
19
+ "deskfree-agent": "dist/bin.js"
18
20
  },
19
21
  "files": [
20
- "dist/",
21
- "openclaw.plugin.json",
22
- "skills/"
22
+ "dist/"
23
23
  ],
24
- "scripts": {
25
- "build": "tsup",
26
- "dev": "tsup --watch",
27
- "test": "vitest run",
28
- "tsc": "tsc --noEmit",
29
- "typecheck": "tsc --noEmit",
30
- "prepublishOnly": "npm run build"
31
- },
32
- "engines": {
33
- "node": ">=18.0.0"
34
- },
35
24
  "publishConfig": {
36
25
  "access": "public"
37
26
  },
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/questionbase/deskfree.git"
27
+ "engines": {
28
+ "node": ">=18.0.0"
41
29
  },
42
- "peerDependencies": {
43
- "openclaw": ">=0.1.0"
30
+ "scripts": {
31
+ "build": "tsup",
32
+ "start": "node dist/bin.js",
33
+ "dev": "tsx src/bin.ts",
34
+ "tsc": "tsc --noEmit",
35
+ "test": "vitest run"
44
36
  },
45
37
  "dependencies": {
46
- "@sinclair/typebox": "^0.34.0",
47
- "ws": "^8.18.0"
38
+ "@anthropic-ai/claude-agent-sdk": "^0.2.71",
39
+ "@aws-sdk/client-bedrock-runtime": "^3.700.0",
40
+ "zod": "4.3.6"
48
41
  },
49
42
  "devDependencies": {
43
+ "@anthropic-ai/sdk": "0.78.0",
44
+ "@deskfree/core": "*",
45
+ "@sinclair/typebox": "^0.34.48",
46
+ "@types/node": "^22.0.0",
50
47
  "@types/ws": "^8.5.0",
51
- "tsup": "8.5.1",
52
- "typescript": "^5.9.0",
53
- "vitest": "^4.0.18"
54
- },
55
- "keywords": [
56
- "openclaw",
57
- "deskfree",
58
- "channel",
59
- "plugin",
60
- "ai",
61
- "agent"
62
- ],
63
- "license": "MIT"
48
+ "tsup": "^8.0.0",
49
+ "tsx": "^4.0.0",
50
+ "typescript": "^5.7.0",
51
+ "vitest": "^3.0.0",
52
+ "ws": "^8.18.0"
53
+ }
64
54
  }
package/README.md DELETED
@@ -1,137 +0,0 @@
1
- # @questionbase/deskfree
2
-
3
- OpenClaw plugin that connects AI agents to [DeskFree](https://github.com/deskfree) — a task management platform built for human-AI collaboration.
4
-
5
- Agents can pick up tasks, post progress updates, mark work as done or blocked, manage goals, and exchange messages with humans — all through a structured workflow with human oversight gates.
6
-
7
- ## How it works
8
-
9
- ```
10
- ┌──────────────────────────────────────────────────────────────────┐
11
- │ OpenClaw Agent │
12
- │ │
13
- │ Tools (HTTP) Channel (WebSocket + polling) │
14
- │ ───────────── ────────────────────────────── │
15
- │ deskfree_state Inbound messages from humans │
16
- │ deskfree_start_task Outbound replies from agent │
17
- │ deskfree_complete_task Real-time notifications │
18
- │ deskfree_create_task │
19
- │ deskfree_create_goal │
20
- │ deskfree_update_goal │
21
- │ deskfree_update_deliverable │
22
- │ deskfree_send_message │
23
- └──────────┬───────────────────────────┬───────────────────────────┘
24
- │ │
25
- ▼ ▼
26
- ┌──────────────────────────────────────────────────────────────────┐
27
- │ DeskFree Backend │
28
- │ │
29
- │ Tasks Goals Messages WebSocket Gateway │
30
- │ ────── ───── ──────── ─────────────────│
31
- │ State machine Hierarchical 1:1 bot↔user DynamoDB-backed │
32
- │ RLS-scoped organization Threaded by Thin notifs │
33
- │ Atomic claims task + polling fallback│
34
- └──────────────────────────────────────────────────────────────────┘
35
- ```
36
-
37
- The plugin registers three things with OpenClaw:
38
-
39
- 1. **Channel** — bidirectional messaging between DeskFree users and the agent
40
- 2. **Tools** — 8 task and goal management tools the agent can call
41
- 3. **Skill** — workflow knowledge that teaches the agent how to use the tools correctly
42
-
43
- ## Install
44
-
45
- ```bash
46
- openclaw plugins install @questionbase/deskfree
47
- ```
48
-
49
- Requires OpenClaw >= 0.1.0.
50
-
51
- This installs the plugin to `~/.openclaw/extensions/deskfree/` and enables it automatically.
52
-
53
- ### Verify
54
-
55
- ```bash
56
- openclaw plugins list
57
- openclaw plugins info deskfree
58
- ```
59
-
60
- ## Configuration
61
-
62
- After installation, configure the DeskFree channel. You can either:
63
-
64
- ### Option A: Interactive setup
65
-
66
- Run the OpenClaw onboarding wizard — it will detect the unconfigured DeskFree channel and prompt for credentials.
67
-
68
- ### Option B: Manual config
69
-
70
- Edit your OpenClaw config file (`~/.openclaw/config.json5`):
71
-
72
- **Single account (most common):**
73
- ```json5
74
- {
75
- channels: {
76
- deskfree: {
77
- botToken: "bot_...",
78
- apiUrl: "https://api.example.com/v1/bot",
79
- wsUrl: "wss://ws.example.com"
80
- }
81
- }
82
- }
83
- ```
84
-
85
- **Multiple accounts:**
86
- ```json5
87
- {
88
- channels: {
89
- deskfree: {
90
- accounts: {
91
- "my-bot": {
92
- botToken: "bot_...",
93
- apiUrl: "https://api.example.com/v1/bot",
94
- wsUrl: "wss://ws.example.com"
95
- }
96
- }
97
- }
98
- }
99
- }
100
- ```
101
-
102
- | Field | Description |
103
- |-------|-------------|
104
- | `botToken` | Bot authentication token (starts with `bot_`) |
105
- | `apiUrl` | DeskFree bot API base URL (the `/v1/bot` tRPC endpoint) |
106
- | `wsUrl` | WebSocket gateway URL for real-time notifications |
107
-
108
- ### Getting credentials
109
-
110
- 1. Create a bot in your DeskFree instance
111
- 2. Copy the bot token from the bot settings page
112
- 3. Your DeskFree admin can provide the API and WebSocket URLs
113
-
114
- ## Task workflow
115
-
116
- Tasks follow a strict state machine. The agent claims a task, works on it, and completes it (done or blocked) — always returning control to a human.
117
-
118
- ```
119
- ready_for_bot ──[start_task]──> working_on_it ──[complete_task(done)]──> waiting_for_human
120
- │ │
121
- └──[complete_task(blocked)]──> │
122
- human approves/declines
123
-
124
- [approve] → done
125
- ```
126
-
127
- See [docs/tools.md](docs/tools.md) for the full tool reference and [docs/architecture.md](docs/architecture.md) for how the system works under the hood.
128
-
129
- ## Documentation
130
-
131
- - **[Architecture](docs/architecture.md)** — system design, message flow, WebSocket gateway
132
- - **[Tools reference](docs/tools.md)** — all 8 agent tools with parameters and behavior
133
- - **[Publishing](PUBLISH.md)** — how to release new versions
134
-
135
- ## License
136
-
137
- MIT
@@ -1,8 +0,0 @@
1
- {
2
- "id": "deskfree",
3
- "name": "DeskFree",
4
- "description": "Channel plugin and agent tools for DeskFree project management",
5
- "configSchema": { "type": "object", "additionalProperties": true },
6
- "channels": ["deskfree"],
7
- "skills": ["./skills"]
8
- }
@@ -1,243 +0,0 @@
1
- ---
2
- name: deskfree
3
- description: >
4
- DeskFree task management and human-AI collaboration workflows.
5
- Use when: creating goals/tasks, managing work items, updating deliverables,
6
- communicating with humans through DeskFree, checking workspace state,
7
- handling task lifecycle (start → work → complete → review).
8
- Do NOT use for: general project management advice without DeskFree tools,
9
- OpenClaw configuration or gateway setup, non-DeskFree platforms (Jira, Asana, etc.),
10
- direct file/code operations (use standard tools for those, create DeskFree tasks for tracking).
11
- version: 4.0.0
12
- metadata: { 'openclaw': { 'emoji': '🏠' } }
13
- ---
14
-
15
- # DeskFree Workflow Guide
16
-
17
- ## ⚠️ Critical — Read First
18
-
19
- ### State Machine (memorize this)
20
-
21
- ```
22
- create_task → ready_for_bot → [start_task] → working_on_it → [complete_task] → waiting_for_human
23
- ↑ |
24
- | human approves/declines |
25
- └────────────────────────────────────────────────────────────────┘
26
- |
27
- [approve] → done
28
- ```
29
-
30
- - `complete_task` outcome `done` = work complete for review
31
- - `complete_task` outcome `blocked` = need human input (send message FIRST explaining why)
32
- - Both outcomes move to `waiting_for_human` — the human triages from there
33
-
34
- ### Three Rules That Break Everything If Ignored
35
-
36
- 1. **Always self-task.** Create a DeskFree task before starting ANY work. Tasks are cheap — invisible work is expensive. No exceptions.
37
- 2. **Always check state first.** Call `deskfree_state` before creating tasks or goals. Prevents duplicates, shows what needs attention.
38
- 3. **Always complete tasks.** Never leave a task in `working_on_it`. End with `deskfree_complete_task` — outcome `done` or `blocked`.
39
-
40
- ### Auto-Threading
41
-
42
- After `deskfree_start_task`, ALL your outbound messages automatically thread into that task. No need to pass `taskId` to `deskfree_send_message`. After `deskfree_complete_task`, auto-threading stops.
43
-
44
- The task sidebar is your human's window into your work — every message appears there in real-time.
45
-
46
- ---
47
-
48
- ## Validation Gates
49
-
50
- ### Pre-Flight (before ANY work)
51
-
52
- - [ ] Called `deskfree_state` — confirmed it returned data (not empty/error)
53
- - [ ] Checked for existing goals/tasks that match intent — no duplicates
54
- - [ ] Created a task with clear, action-oriented title (max 200 chars)
55
- - [ ] Called `deskfree_start_task` — confirmed task moved to `working_on_it`
56
-
57
- ### Mid-Work
58
-
59
- - [ ] Deliverable started immediately after starting task (not waiting until end)
60
- - [ ] `deskfree_update_deliverable` succeeded (no error response)
61
- - [ ] If blocked: sent message explaining WHY before calling `complete_task` with `blocked`
62
-
63
- ### Pre-Completion
64
-
65
- - [ ] Deliverable is non-empty and meaningful (not just headers/placeholders)
66
- - [ ] Deliverable is well-structured markdown that stands alone
67
- - [ ] Called `deskfree_complete_task` — confirmed task moved to `waiting_for_human`
68
- - [ ] If sub-agent: terminated after completion (one task per sub-agent)
69
-
70
- ---
71
-
72
- ## Goals vs Tasks
73
-
74
- | Signal | Action |
75
- |---|---|
76
- | Multi-step objective ("grow my LinkedIn") | **Goal** → break into 3-5 tasks |
77
- | Single deliverable ("write a blog post") | **Task** only |
78
- | Vague ambition ("help me with marketing") | **Goal** → clarify via tasks |
79
- | Quick fix ("fix this bug") | **Task** only |
80
-
81
- ### Goal Management
82
-
83
- - Create goals with `deskfree_create_goal` for multi-step objectives
84
- - Link tasks to goals via `goalId` parameter in `deskfree_create_task`
85
- - **Drip tasks:** Max 3 pending tasks per goal. Create next when one completes.
86
- - **Stale goals (48h no activity):** Create a task or message the human
87
- - Mark completed with `deskfree_update_goal` when all objectives met
88
-
89
- ---
90
-
91
- ## Task Workflow
92
-
93
- ### Orchestrator Flow (main session)
94
-
95
- ```
96
- 1. deskfree_state → assess workspace
97
- 2. deskfree_create_task → create with clear title + instructions
98
- 3. deskfree_start_task → claim it (returns full context)
99
- 4. deskfree_update_deliverable → build incrementally as you work
100
- 5. deskfree_complete_task → outcome "done" or "blocked"
101
- ```
102
-
103
- ### Sub-Agent Flow (recommended for tasks > 5 min)
104
-
105
- ```
106
- Orchestrator: deskfree_create_task → deskfree_start_task → spawn sub-agent with full task context
107
- Sub-agent: deskfree_update_deliverable (incrementally) → deskfree_complete_task → terminate
108
- ```
109
-
110
- Sub-agents have **3 tools only:** `deskfree_update_deliverable`, `deskfree_complete_task`, `deskfree_send_message`. They cannot create goals, create tasks, or read workspace state.
111
-
112
- ### When to Use Main vs Sub-Agent
113
-
114
- | Main session | Sub-agent |
115
- |---|---|
116
- | Quick tasks (< 5 min) | Research, reports, analysis |
117
- | Interactive/back-and-forth | Code development, debugging |
118
- | Urgent fixes | Long operations (> 10 min) |
119
- | | Background work while human may message |
120
-
121
- ---
122
-
123
- ## Messaging
124
-
125
- **Normal replies:** Just respond — the channel handles routing automatically. No tool needed.
126
-
127
- **Use `deskfree_send_message` only for:**
128
- - Progress updates during task execution
129
- - Questions needing human input mid-task
130
- - Status reports for long-running tasks
131
-
132
- **Never use it for:** Normal conversation replies (channel handles those).
133
-
134
- ---
135
-
136
- ## Decision Tree
137
-
138
- ### Heartbeat / Proactive Check
139
-
140
- 1. `deskfree_state` → get workspace snapshot
141
- 2. Active goals without pending tasks? → `deskfree_create_task` for next step
142
- 3. `ready_for_bot` tasks? → `deskfree_start_task` + spawn sub-agents
143
- 4. Goals stale 48h? → Create task or nudge human
144
- 5. `working_on_it` with no active sub-agent? → Complete as blocked or resume
145
-
146
- ### Human Gives You Work
147
-
148
- 1. `deskfree_state` → check existing goals/tasks
149
- 2. `deskfree_create_task` → clear title + instructions
150
- 3. `deskfree_start_task` → claim it
151
- 4. Work → `deskfree_update_deliverable` incrementally
152
- 5. `deskfree_complete_task` → outcome `done` or `blocked`
153
-
154
- ---
155
-
156
- ## Tools Reference
157
-
158
- > **Full parameter details:** See `references/tools.md`
159
-
160
- ### Orchestrator (8 tools)
161
-
162
- | Tool | What it does |
163
- |---|---|
164
- | `deskfree_state` | Full workspace snapshot — goals, tasks, recently done |
165
- | `deskfree_create_goal` | Create high-level objective |
166
- | `deskfree_update_goal` | Update goal status/title/description |
167
- | `deskfree_create_task` | Create task (→ `ready_for_bot`), optionally link to goal |
168
- | `deskfree_start_task` | Claim task → `working_on_it`, returns full context |
169
- | `deskfree_update_deliverable` | Build deliverable markdown incrementally |
170
- | `deskfree_complete_task` | Mark done or blocked → `waiting_for_human` |
171
- | `deskfree_send_message` | Message in task thread |
172
-
173
- ### Worker (3 tools — sub-agents only)
174
-
175
- `deskfree_update_deliverable`, `deskfree_complete_task`, `deskfree_send_message`
176
-
177
- ---
178
-
179
- ## Deliverable Best Practices
180
-
181
- Structure deliverables as **standalone markdown documents:**
182
-
183
- ```markdown
184
- # Task Title
185
-
186
- ## Summary
187
- Brief overview of what was accomplished.
188
-
189
- ## Key Findings / Results
190
- - Main points with supporting detail
191
-
192
- ## Details
193
- Detailed analysis, implementation notes, etc.
194
-
195
- ## Next Steps (if applicable)
196
- - Follow-up actions, outstanding questions
197
- ```
198
-
199
- **Build incrementally** — start with outline immediately after `deskfree_start_task`, fill sections as you go, polish before completing. A half-complete deliverable is infinitely better than none.
200
-
201
- ---
202
-
203
- ## Error Handling
204
-
205
- | Error | Cause | Action |
206
- |---|---|---|
207
- | `deskfree_state` returns empty | No goals or tasks exist | Create a goal or task if appropriate. **Do NOT retry in a loop.** |
208
- | 404 on `deskfree_start_task` | Task not `ready_for_bot` or doesn't exist | Another bot claimed it. Call `deskfree_state`, try a different task. |
209
- | 404 on `deskfree_complete_task` | Task not `working_on_it` | Already completed or released. Check state. |
210
- | 409 on `deskfree_start_task` | Race condition — another bot claimed it | Call `deskfree_state`, pick a different task. |
211
- | 401 Unauthorized | Bot token invalid or expired | Check channel configuration. Do not retry. |
212
- | `deskfree_update_deliverable` fails | Task not in `working_on_it` or network error | Verify task state with `deskfree_state`. If task was released, re-claim or abort. |
213
- | `deskfree_create_goal` fails | Validation error (title too long, etc.) | Check parameter constraints. Title max 200 chars. |
214
- | Sub-agent spawn fails | Resource limits, config error | Complete task as `blocked` with explanation. Do not leave in `working_on_it`. |
215
- | WebSocket disconnected | Network issue | Plugin auto-reconnects with backoff. Messages fall back to HTTP polling. No action needed. |
216
-
217
- ### Recovery Pattern
218
-
219
- If anything goes wrong mid-task:
220
- 1. Send a message explaining what happened (`deskfree_send_message`)
221
- 2. Save whatever partial deliverable you have (`deskfree_update_deliverable`)
222
- 3. Complete as `blocked` (`deskfree_complete_task` with outcome `blocked`)
223
- 4. **Never leave a task stranded in `working_on_it`**
224
-
225
- ---
226
-
227
- ## Task Title Examples
228
-
229
- **Good (short, scannable, action-oriented):**
230
- - "Research competitor HumanLayer"
231
- - "Deploy staging hotfix"
232
- - "Write API docs for /users endpoint"
233
-
234
- **Bad (verbose, unclear):**
235
- - "Do some research on a competitor called HumanLayer and write up findings"
236
- - "There's a bug in staging that needs fixing"
237
-
238
- ---
239
-
240
- ## Human Review Outcomes
241
-
242
- - **Approve** → task moves to `done`. Work accepted.
243
- - **Decline / request changes** → task returns to `ready_for_bot` with feedback. Restart it.
@@ -1,102 +0,0 @@
1
- # DeskFree Tools — Full Parameter Reference
2
-
3
- ## Orchestrator Tools (8)
4
-
5
- ### `deskfree_state`
6
- Get full workspace snapshot — all goals with tasks, unlinked tasks, recently done.
7
-
8
- | Parameter | Type | Required | Description |
9
- |-----------|------|----------|-------------|
10
- | *(none)* | — | — | — |
11
-
12
- **Returns:** Goals array (each with nested tasks), unlinked tasks, recently completed tasks.
13
-
14
- ---
15
-
16
- ### `deskfree_create_goal`
17
- Create a high-level objective to break into tasks.
18
-
19
- | Parameter | Type | Required | Description |
20
- |-----------|------|----------|-------------|
21
- | `title` | string | Yes | Goal title (max 200 chars) |
22
- | `description` | string | No | What the user wants to achieve — the big picture |
23
-
24
- **Returns:** Created goal object with ID.
25
-
26
- ---
27
-
28
- ### `deskfree_update_goal`
29
- Update a goal's status, title, or description.
30
-
31
- | Parameter | Type | Required | Description |
32
- |-----------|------|----------|-------------|
33
- | `goalId` | string | Yes | Goal ID to update |
34
- | `title` | string | No | New title (max 200 chars) |
35
- | `description` | string | No | Updated description |
36
- | `status` | string | No | New status: `active`, `paused`, `completed`, `archived` |
37
-
38
- ---
39
-
40
- ### `deskfree_create_task`
41
- Create a new task (starts as `ready_for_bot`). Optionally link to a goal.
42
-
43
- | Parameter | Type | Required | Description |
44
- |-----------|------|----------|-------------|
45
- | `title` | string | Yes | Task title (max 200 chars) |
46
- | `instructions` | string | No | Detailed instructions for the task |
47
- | `goalId` | string | No | Link this task to a goal |
48
-
49
- ---
50
-
51
- ### `deskfree_start_task`
52
- Claim a `ready_for_bot` task → moves to `working_on_it`. Returns full context.
53
-
54
- | Parameter | Type | Required | Description |
55
- |-----------|------|----------|-------------|
56
- | `taskId` | string | Yes | Task UUID to claim |
57
-
58
- **Returns:** Full task context — instructions, current deliverable, message history. Use this to populate sub-agent spawn prompts.
59
-
60
- **Errors:** 404 if task not `ready_for_bot` or doesn't exist. 409 if already claimed.
61
-
62
- ---
63
-
64
- ### `deskfree_update_deliverable`
65
- Update task deliverable. Build incrementally as you work.
66
-
67
- | Parameter | Type | Required | Description |
68
- |-----------|------|----------|-------------|
69
- | `taskId` | string | Yes | Task UUID |
70
- | `deliverable` | string | Yes | Full markdown deliverable content (replaces previous) |
71
-
72
- **Note:** Each call replaces the entire deliverable. Always send the complete current version, not just new additions.
73
-
74
- ---
75
-
76
- ### `deskfree_complete_task`
77
- Finish a task → moves to `waiting_for_human`.
78
-
79
- | Parameter | Type | Required | Description |
80
- |-----------|------|----------|-------------|
81
- | `taskId` | string | Yes | Task UUID |
82
- | `outcome` | string | Yes | `done` (work complete) or `blocked` (need human input) |
83
-
84
- **Important:** If `blocked`, send a message explaining WHY before calling this.
85
-
86
- ---
87
-
88
- ### `deskfree_send_message`
89
- Send a message in the task thread.
90
-
91
- | Parameter | Type | Required | Description |
92
- |-----------|------|----------|-------------|
93
- | `content` | string | Yes | Message content |
94
- | `taskId` | string | No | Task UUID (optional — auto-threaded to active task if omitted) |
95
-
96
- ---
97
-
98
- ## Worker Tools (3 — sub-agents only)
99
-
100
- Sub-agents receive: `deskfree_update_deliverable`, `deskfree_complete_task`, `deskfree_send_message`
101
-
102
- They **cannot** use: `deskfree_state`, `deskfree_create_goal`, `deskfree_update_goal`, `deskfree_create_task`, `deskfree_start_task`