@questionbase/deskfree 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.
Files changed (52) hide show
  1. package/README.md +129 -0
  2. package/dist/channel.d.ts +3 -0
  3. package/dist/channel.d.ts.map +1 -0
  4. package/dist/channel.js +503 -0
  5. package/dist/channel.js.map +1 -0
  6. package/dist/client.d.ts +148 -0
  7. package/dist/client.d.ts.map +1 -0
  8. package/dist/client.js +255 -0
  9. package/dist/client.js.map +1 -0
  10. package/dist/deliver.d.ts +22 -0
  11. package/dist/deliver.d.ts.map +1 -0
  12. package/dist/deliver.js +350 -0
  13. package/dist/deliver.js.map +1 -0
  14. package/dist/gateway.d.ts +13 -0
  15. package/dist/gateway.d.ts.map +1 -0
  16. package/dist/gateway.js +687 -0
  17. package/dist/gateway.js.map +1 -0
  18. package/dist/index.d.ts +11 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +19 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/llm-definitions.d.ts +116 -0
  23. package/dist/llm-definitions.d.ts.map +1 -0
  24. package/dist/llm-definitions.js +148 -0
  25. package/dist/llm-definitions.js.map +1 -0
  26. package/dist/offline-queue.d.ts +45 -0
  27. package/dist/offline-queue.d.ts.map +1 -0
  28. package/dist/offline-queue.js +109 -0
  29. package/dist/offline-queue.js.map +1 -0
  30. package/dist/paths.d.ts +10 -0
  31. package/dist/paths.d.ts.map +1 -0
  32. package/dist/paths.js +29 -0
  33. package/dist/paths.js.map +1 -0
  34. package/dist/runtime.d.ts +17 -0
  35. package/dist/runtime.d.ts.map +1 -0
  36. package/dist/runtime.js +24 -0
  37. package/dist/runtime.js.map +1 -0
  38. package/dist/tools.d.ts +35 -0
  39. package/dist/tools.d.ts.map +1 -0
  40. package/dist/tools.js +527 -0
  41. package/dist/tools.js.map +1 -0
  42. package/dist/types.d.ts +389 -0
  43. package/dist/types.d.ts.map +1 -0
  44. package/dist/types.js +2 -0
  45. package/dist/types.js.map +1 -0
  46. package/dist/workspace.d.ts +18 -0
  47. package/dist/workspace.d.ts.map +1 -0
  48. package/dist/workspace.js +83 -0
  49. package/dist/workspace.js.map +1 -0
  50. package/openclaw.plugin.json +8 -0
  51. package/package.json +63 -0
  52. package/skills/deskfree/SKILL.md +271 -0
@@ -0,0 +1,271 @@
1
+ ---
2
+ name: deskfree
3
+ description: Workflow knowledge for DeskFree task management and messaging.
4
+ version: 2.1.0
5
+ metadata: { 'openclaw': { 'emoji': '🏠' } }
6
+ ---
7
+
8
+ # DeskFree Workflow Guide
9
+
10
+ > **Overview:** This guide teaches AI agents how to work with DeskFree — a task management platform for human-AI collaboration. Use it to claim tasks, update deliverables, and communicate with humans through structured workflows.
11
+
12
+ ## Table of Contents
13
+
14
+ - [🚀 Quick Start](#-quick-start)
15
+ - [💬 Messaging](#-messaging)
16
+ - [🔁 Auto-Threading](#-auto-threading)
17
+ - [🔄 Task Workflow](#-task-workflow)
18
+ - [🛠️ Tools Reference](#️-tools-reference)
19
+ - [📋 Decision Tree](#-decision-tree)
20
+ - [📝 Deliverable Best Practices](#-deliverable-best-practices)
21
+ - [❌ Error Handling](#-error-handling)
22
+ - [🔧 Troubleshooting](#-troubleshooting)
23
+
24
+ ## 🚀 Quick Start
25
+
26
+ ### Installation
27
+
28
+ After installing the DeskFree plugin, run `deskfree_setup` to configure your workspace. This adds the self-tasking directive to your AGENTS.md so you'll always create tasks before starting work.
29
+
30
+ ## 💬 Messaging
31
+
32
+ You are connected to DeskFree via a 1:1 messaging channel. When a human sends you a message, **just reply naturally** — the channel handles routing automatically. You do not need to use any tool to send or receive messages.
33
+
34
+ - **Inbound:** Human messages appear as regular conversation messages with full context
35
+ - **Outbound:** Your replies are automatically delivered back to the human
36
+ - **Threading:** Messages may be linked to a task ID. When replying in task context, your messages are automatically threaded to that task
37
+ - **Task context:** If you receive a message with task context, your replies will be threaded to that task automatically
38
+
39
+ No special syntax, no user IDs, no targeting required. Just respond to the conversation.
40
+
41
+ ### Using `deskfree_send_message`
42
+ Use the `deskfree_send_message` tool only for:
43
+ - **Progress updates** during task execution ("Starting phase 2...", "Encountered an issue with X")
44
+ - **Questions** that need human input mid-task ("Should I proceed with approach A or B?")
45
+ - **Status reports** for long-running tasks ("50% complete, ETA 2 hours")
46
+
47
+ **Don't use it for:** Normal conversation replies (those are handled automatically by the channel).
48
+
49
+ ## 🔁 Auto-Threading
50
+
51
+ **Your messages are automatically threaded into your active task. No need to specify taskId manually.**
52
+
53
+ When you claim a task, the plugin tracks it as your "active task." From that point on, **all outbound messages** — whether replies, progress updates, or proactive messages — are automatically threaded into that task's conversation. This means:
54
+
55
+ - After `deskfree_claim_task`: all your messages thread into that task
56
+ - After `deskfree_request_review` or `deskfree_release_task`: auto-threading stops
57
+ - You never need to pass `taskId` to `deskfree_send_message` manually (though you still can to override)
58
+ - The task sidebar shows a complete timeline of your work — every message, every update
59
+
60
+ **The task sidebar is your human's window into your work. Make it useful.** Every message you send while working on a task appears there, giving your human real-time visibility into progress without them having to ask.
61
+
62
+ ## 🔄 Task Workflow
63
+
64
+ Tasks follow a strict state machine. Understand this before using any tool.
65
+
66
+ ```
67
+ ready_for_bot ──[claim]──> working_on_it ──[request_review]──> waiting_for_human ──[approve]──> done
68
+ ▲ │ │
69
+ │ [release] [decline]
70
+ └──────────────┘ │
71
+ └─────────────────────────────────────────────┘
72
+ ```
73
+
74
+ ### Statuses
75
+
76
+ | Status | Meaning |
77
+ |---|---|
78
+ | `ready_for_bot` | Available for a bot to claim |
79
+ | `working_on_it` | A bot is actively working on this task |
80
+ | `waiting_for_human` | Bot submitted for human review |
81
+ | `done` | Human approved the deliverable |
82
+
83
+ ## 🛠️ Tools Reference
84
+
85
+ | Tool | Description |
86
+ |---|---|
87
+ | `deskfree_create_task` | Create a new task (starts as `ready_for_bot`) |
88
+ | `deskfree_list_tasks` | List tasks, optionally filtered by status |
89
+ | `deskfree_get_task` | Fetch full task context by ID (instructions, deliverable, messages) |
90
+ | `deskfree_claim_task` | Claim a specific `ready_for_bot` task → `working_on_it` |
91
+ | `deskfree_release_task` | Release a task back to `ready_for_bot` (failure recovery) |
92
+ | `deskfree_update_deliverable` | Update the task's deliverable markdown incrementally |
93
+ | `deskfree_request_review` | Signal human to review → `waiting_for_human`. Bot should stop after this. |
94
+ | `deskfree_send_message` | Send a message in the task thread (progress updates, questions) |
95
+ | `deskfree_snooze_task` | Snooze a task until a future time (hidden from active views until then) |
96
+ | `deskfree_unsnooze_task` | Unsnooze a task immediately, making it visible again |
97
+ | `deskfree_setup` | One-time setup: returns AGENTS.md directive block |
98
+
99
+ ### Self-Tasking
100
+
101
+ **ALWAYS create a task before starting work.** This applies whether a human asked you to do something or you're working proactively. Tasks are cheap — when in doubt, create one.
102
+
103
+ **Why:** Tasks give your human visibility into what you're doing, create a paper trail of deliverables, and let you collaborate through comments. Work without a task is invisible work. The task sidebar is your human's window into your work — make it useful.
104
+
105
+ **Flow:**
106
+ 1. **Create:** `deskfree_create_task` with a clear title and instructions
107
+ 2. **Claim:** `deskfree_claim_task` with the task ID to move it to `working_on_it` (auto-threading starts here)
108
+ 3. **Work:** Do the work. Start building the deliverable immediately with `deskfree_update_deliverable` — don't wait until the end. Send progress updates naturally; they auto-thread into the task.
109
+ 4. **Review:** `deskfree_request_review` when done. The human will approve or decline.
110
+
111
+ **Sub-agent pattern (recommended for longer tasks):**
112
+ 1. Main session creates + claims the task
113
+ 2. Spawn a sub-agent with the task ID
114
+ 3. Sub-agent calls `deskfree_get_task` to load full context
115
+ 4. Sub-agent works, updates deliverable incrementally, then calls `deskfree_request_review`
116
+ 5. One task per sub-agent to keep context clean
117
+
118
+ ### Task Titles: Examples
119
+
120
+ **Good titles (short, scannable, action-oriented):**
121
+ - "Research competitor HumanLayer"
122
+ - "Deploy staging environment hotfix"
123
+ - "Analyze Q3 sales data trends"
124
+ - "Write API documentation for /users endpoint"
125
+
126
+ **Bad titles (verbose, unclear scope):**
127
+ - "Do some research on a competitor called HumanLayer and write up findings"
128
+ - "There's a bug in the staging environment that needs to be fixed somehow"
129
+ - "Look at the sales numbers and figure out what's going on"
130
+ - "Document stuff for the API"
131
+
132
+ ### When to Use Main Session vs. Sub-Agent
133
+
134
+ **Stay in main session for:**
135
+ - Quick tasks (< 5 minutes): Simple lookups, config changes, one-liner scripts
136
+ - Interactive work: Tasks requiring back-and-forth with the human
137
+ - Urgent fixes: Immediate response needed, no time for sub-agent setup
138
+
139
+ **Use sub-agent for:**
140
+ - Research tasks: Multi-step analysis, data gathering, report writing
141
+ - Code development: Writing features, debugging, refactoring
142
+ - Long operations: Tasks taking > 10 minutes or requiring multiple steps
143
+ - Background work: When human might message while you're working
144
+
145
+ **Sub-agent handoff pattern:**
146
+ ```
147
+ Main: deskfree_create_task → deskfree_claim_task → spawn sub-agent with taskId
148
+ Sub: deskfree_get_task → work → deskfree_update_deliverable → deskfree_request_review
149
+ ```
150
+
151
+ ## 📋 Decision Tree
152
+
153
+ When checking for work:
154
+ 1. Call `deskfree_list_tasks` with `status: "ready_for_bot"` to see available tasks
155
+ 2. **Got tasks?** Pick one, `deskfree_claim_task`, then work on it
156
+ 3. **Empty list?** No tasks available — stop checking
157
+ 4. **Can't complete?** Call `deskfree_release_task` to put it back, or `deskfree_request_review` with a comment explaining the blocker
158
+
159
+ When given work by a human (chat, Slack, etc.):
160
+ 1. Create a task via `deskfree_create_task`
161
+ 2. Claim it via `deskfree_claim_task`
162
+ 3. Work on it, build deliverable incrementally from the start, then `deskfree_request_review`
163
+
164
+ ## Human Review Outcomes
165
+
166
+ - **Approve:** Task moves to `done`. Work is accepted.
167
+ - **Decline:** Task moves back to `ready_for_bot` with the human's feedback. Bot can claim and retry with the feedback incorporated.
168
+
169
+ ### Snoozing Tasks
170
+
171
+ Use `deskfree_snooze_task` to temporarily hide a task from active views until a specific time. This is useful for:
172
+ - Tasks that are blocked until a certain date (e.g., "deploy after Friday's release")
173
+ - Recurring tasks you want to defer until the next scheduled time
174
+ - Reducing clutter in your task list
175
+
176
+ Use `deskfree_unsnooze_task` to make a snoozed task visible again immediately if priorities change.
177
+
178
+ ## Rules
179
+
180
+ 1. **Always self-task:** Create a DeskFree task before starting work — tasks are cheap, invisible work is expensive
181
+ 2. **Build deliverables early:** Start `deskfree_update_deliverable` from the beginning, not at the end
182
+ 3. **Status gates:** You can only `request_review` or `release` tasks in `working_on_it` status
183
+ 4. **No manual status changes:** All state transitions happen through the tools above
184
+ 5. **Deliverables in markdown:** Build up the deliverable incrementally using `update_deliverable`
185
+ 6. **Request review, don't just finish:** Always end with `deskfree_request_review` so the human can approve
186
+ 7. **Release early:** If you can't complete a task, `deskfree_release_task` to free it — don't spin
187
+ 8. **One task per sub-agent:** Spawn a dedicated sub-agent for each task to keep context clean
188
+ 9. **No assignment required:** Any bot can claim any `ready_for_bot` task
189
+ 10. **Auto-threading just works:** Your messages automatically thread into your active task — no manual taskId needed
190
+
191
+ ## 📝 Deliverable Best Practices
192
+
193
+ Deliverables should be **markdown documents** that stand alone. Structure them like a professional report:
194
+
195
+ ### Good Deliverable Structure
196
+ ```markdown
197
+ # Task Title
198
+
199
+ ## Summary
200
+ Brief overview of what was accomplished.
201
+
202
+ ## Key Findings
203
+ - Main point 1 with supporting detail
204
+ - Main point 2 with supporting detail
205
+
206
+ ## Details
207
+ ### Section 1
208
+ Detailed analysis...
209
+
210
+ ### Section 2
211
+ Implementation notes...
212
+
213
+ ## Next Steps (if applicable)
214
+ - Recommended follow-up actions
215
+ - Outstanding questions
216
+
217
+ ## Resources
218
+ - Links to relevant documentation
219
+ - Code repository URLs
220
+ - External references
221
+ ```
222
+
223
+ ### Incremental Updates
224
+ Start building the deliverable **immediately** when you claim a task — don't wait until you're done. Use `deskfree_update_deliverable` to build it up gradually:
225
+
226
+ 1. **Start:** Create outline with headers right after claiming
227
+ 2. **Progress:** Fill in sections as you complete them
228
+ 3. **Finish:** Add summary and polish before review
229
+
230
+ This gives your human real-time visibility into progress through the task sidebar. A half-complete deliverable is infinitely more useful than no deliverable.
231
+
232
+ **Example progression:**
233
+ ```
234
+ Update 1: "# Research DeskFree Competitors\n\n## Summary\n[In progress]\n\n## Findings\n### HumanLayer\n- Founded 2023..."
235
+ Update 2: "...### Anthropic Constitutional AI\n- Different approach to human oversight..."
236
+ Update 3: "## Summary\nAnalyzed 3 main competitors. HumanLayer is closest match..."
237
+ ```
238
+
239
+ ## ❌ Error Handling
240
+
241
+ | Error | Meaning | Action |
242
+ |---|---|---|
243
+ | `deskfree_list_tasks` returns empty | No tasks available | Stop checking — do not retry in a loop |
244
+ | 404 on `deskfree_claim_task` | Task not in `ready_for_bot` or doesn't exist | Another bot may have claimed it. Try a different task. |
245
+ | 404 on `deskfree_request_review` | Task not in `working_on_it` status | Check if task was already reviewed or released |
246
+ | 404 on `deskfree_release_task` | Task not in `working_on_it` status | Task may have been released already |
247
+ | 401 Unauthorized | Bot token invalid | Check channel configuration |
248
+
249
+ ## 🔧 Troubleshooting
250
+
251
+ ### "Task not found" or 404 Errors
252
+ - **Check task status** with `deskfree_get_task` - task may have changed state
253
+ - **List current tasks** with `deskfree_list_tasks` to see what's available
254
+ - **Another bot claimed it** - tasks are first-come-first-served
255
+
256
+ ### Connection Issues
257
+ - **"Channel not configured"** - Run the channel setup flow in OpenClaw
258
+ - **"WebSocket connection failed"** - Check firewall, network connectivity
259
+ - **Messages not arriving** - Verify bot token has correct permissions
260
+
261
+ ### Common Workflow Mistakes
262
+ - **Forgetting to claim** - Created task but didn't claim it (still `ready_for_bot`)
263
+ - **Working without task** - Doing work without creating/claiming a task first
264
+ - **Not requesting review** - Finished work but didn't call `deskfree_request_review`
265
+ - **Duplicate work** - Multiple bots claiming same task type without checking existing tasks
266
+
267
+ ### Best Practices for Reliability
268
+ 1. **Always check status first** - Use `deskfree_list_tasks` before creating new tasks
269
+ 2. **Handle race conditions** - If claim fails, check if another bot got it
270
+ 3. **Update deliverable frequently** - Don't wait until the end to document progress
271
+ 4. **Include context in messages** - Help humans understand current state when asking questions