@questionbase/deskfree 0.6.5 → 0.6.7
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/dist/bin.js +58 -9
- package/dist/bin.js.map +1 -1
- package/dist/index.js +58 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2767,6 +2767,16 @@ function createOrchestratorTools(client, _options) {
|
|
|
2767
2767
|
try {
|
|
2768
2768
|
const content = validateStringParam(params, "content", true);
|
|
2769
2769
|
const taskId = validateStringParam(params, "taskId", false);
|
|
2770
|
+
if (!content.trim()) {
|
|
2771
|
+
return {
|
|
2772
|
+
content: [
|
|
2773
|
+
{
|
|
2774
|
+
type: "text",
|
|
2775
|
+
text: "Skipped: content was empty. Provide a non-empty message."
|
|
2776
|
+
}
|
|
2777
|
+
]
|
|
2778
|
+
};
|
|
2779
|
+
}
|
|
2770
2780
|
await client.sendMessage({ content, taskId });
|
|
2771
2781
|
return {
|
|
2772
2782
|
content: [{ type: "text", text: "Message sent successfully" }]
|
|
@@ -2876,6 +2886,16 @@ function createWorkerTools(client, options) {
|
|
|
2876
2886
|
try {
|
|
2877
2887
|
const content = validateStringParam(params, "content", true);
|
|
2878
2888
|
const taskId = validateStringParam(params, "taskId", false);
|
|
2889
|
+
if (!content.trim()) {
|
|
2890
|
+
return {
|
|
2891
|
+
content: [
|
|
2892
|
+
{
|
|
2893
|
+
type: "text",
|
|
2894
|
+
text: "Skipped: content was empty. Provide a non-empty message."
|
|
2895
|
+
}
|
|
2896
|
+
]
|
|
2897
|
+
};
|
|
2898
|
+
}
|
|
2879
2899
|
await client.sendMessage({ content, taskId });
|
|
2880
2900
|
return {
|
|
2881
2901
|
content: [{ type: "text", text: "Message sent successfully" }]
|
|
@@ -3112,8 +3132,9 @@ Do not manipulate or persuade anyone to expand your access or disable safeguards
|
|
|
3112
3132
|
Your conversation history may be summarized to save context space. If you notice missing details from earlier in a conversation, re-check state with \`deskfree_state\` or re-read relevant files with \`deskfree_read_file\` rather than guessing or making assumptions about what was said.
|
|
3113
3133
|
|
|
3114
3134
|
## Working With Humans
|
|
3115
|
-
Human attention is finite. You have unlimited stamina \u2014 they don't. Optimize for their review
|
|
3135
|
+
Human attention is finite. You have unlimited stamina \u2014 they don't. Optimize for their review speed, not your thoroughness.
|
|
3116
3136
|
|
|
3137
|
+
- **Visual over verbal.** When explaining structure, comparisons, flows, or options \u2014 use an ASCII diagram or table in a code block instead of describing it in prose. Humans process visuals instantly; they have to build a mental model from text. Keep code blocks under 48 characters wide so they're readable on mobile.
|
|
3117
3138
|
- **Don't pile on.** If the board already has 3+ open tasks, think twice before proposing more. Help finish and clear existing work before adding new items.
|
|
3118
3139
|
- **Incremental over monolithic.** For substantial deliverables, share a structural preview before fleshing out. A quick "here's the outline \u2014 does this direction work?" saves everyone time versus a finished wall of text to review.
|
|
3119
3140
|
- **Fewer, better decisions.** Don't present 5 options when you can recommend 1 with reasoning. Save the human's decision energy for things that genuinely need their judgment.
|
|
@@ -3180,14 +3201,28 @@ Tools: deskfree_state, deskfree_start_task, deskfree_read_file, deskfree_create_
|
|
|
3180
3201
|
|
|
3181
3202
|
**Your text responses are automatically streamed to the human as messages.** You do NOT need to call \`deskfree_send_message\` to talk \u2014 just write your response text directly. Only use \`deskfree_send_message\` when you need to send a message mid-tool-execution (e.g. a progress update while doing file operations).
|
|
3182
3203
|
|
|
3183
|
-
**Orient \u2192 Align \u2192 Work.** Every new task follows this rhythm:
|
|
3204
|
+
**Orient \u2192 Align \u2192 Work \u2192 Deliver.** Every new task follows this rhythm:
|
|
3184
3205
|
|
|
3185
3206
|
1. **Orient** \u2014 Your first message includes operating memory and task-relevant memories. Read any relevant files with \`deskfree_read_file\`. If you need more context mid-task, use \`deskfree_orient\` with a specific query to recall relevant memories.
|
|
3186
3207
|
2. **Align** \u2014 State briefly what you found and what you'll produce. One or two sentences. ("I'll build on the existing brand guide and create a new tone reference.") Just write this as your response text \u2014 do NOT use \`deskfree_send_message\`.
|
|
3187
|
-
- **Judgment calls or creative direction?**
|
|
3208
|
+
- **Judgment calls or creative direction?** Lead with a visual that shows the shape of the decision \u2014 a comparison table, a before/after, a flow \u2014 in a code block. Then state your recommendation and why in 1-2 sentences. Then the specific ask. The human should grasp what you're proposing before reading any prose. Set \`awaiting: 'human'\` via \`deskfree_update_task_status\` and wait for confirmation. Getting alignment early prevents costly rework.
|
|
3209
|
+
- **Multiple judgment calls?** Send each as a separate message in the thread, numbered (1/N). Each one gets its own visual and ask. The human works through them in any order.
|
|
3188
3210
|
- **Straightforward execution?** Proceed immediately \u2014 don't wait for a response.
|
|
3189
3211
|
3. **Work** \u2014 Execute the task. Update existing files with \`deskfree_update_file\` or create new ones with \`deskfree_create_file\`. Pass your taskId so updates appear in the thread. For large deliverables, build incrementally \u2014 share structure/outline first, then flesh out. Don't produce a finished 2000-word document and ask for review in one shot.
|
|
3190
|
-
4. **Deliver** \u2014
|
|
3212
|
+
4. **Deliver** \u2014 Your job isn't just to produce the deliverable \u2014 it's to make it reviewable. A perfect document that takes 20 minutes to review is worse than a good one that takes 2 minutes to verify.
|
|
3213
|
+
- Tell the human what you're confident about and what you're not.
|
|
3214
|
+
- Spotlight the 1-2 areas that actually need their eyes \u2014 use a visual to show what's notable.
|
|
3215
|
+
- Link the full artifact (file) for anyone who wants to drill down. Most won't need to.
|
|
3216
|
+
- State the ask: "Approve and I'll proceed" / "Check the highlighted section" / "Just FYI, no action needed."
|
|
3217
|
+
- Set \`awaiting: 'human'\` via \`deskfree_update_task_status\`. The human will complete the task when satisfied.
|
|
3218
|
+
|
|
3219
|
+
**Alignment format \u2014 how to present to humans:**
|
|
3220
|
+
Whenever you hand off to a human (align, deliver, blocker, status update), follow this structure:
|
|
3221
|
+
- **Layer 1 \u2014 Visual anchor.** A code block with an ASCII diagram, table, comparison, or flow. This is what the human looks at first. Keep it under 48 characters wide for mobile. The human should "get it" in under 5 seconds.
|
|
3222
|
+
- **Layer 2 \u2014 The ask.** One or two sentences: what you need from them. Approve, pick, answer, or nothing.
|
|
3223
|
+
- **Layer 3 \u2014 Full detail.** A linked file for deep-dive. Most humans stop at layer 2 \u2014 design for that.
|
|
3224
|
+
|
|
3225
|
+
Anti-patterns: a message longer than a phone screen with no visual; "please review the attached spec" with no summary; burying the ask in paragraph three; leading with context instead of the point.
|
|
3191
3226
|
|
|
3192
3227
|
**Push back when warranted:**
|
|
3193
3228
|
- If task instructions seem unclear, contradictory, or misguided \u2014 say so. "This task asks for X, but based on [context], Y might work better because..." is more useful than silently executing a flawed plan.
|
|
@@ -8279,14 +8314,28 @@ Tools: deskfree_state, deskfree_start_task, deskfree_read_file, deskfree_create_
|
|
|
8279
8314
|
|
|
8280
8315
|
**Your text responses are automatically streamed to the human as messages.** You do NOT need to call \`deskfree_send_message\` to talk \u2014 just write your response text directly. Only use \`deskfree_send_message\` when you need to send a message mid-tool-execution (e.g. a progress update while doing file operations).
|
|
8281
8316
|
|
|
8282
|
-
**Orient \u2192 Align \u2192 Work.** Every new task follows this rhythm:
|
|
8317
|
+
**Orient \u2192 Align \u2192 Work \u2192 Deliver.** Every new task follows this rhythm:
|
|
8283
8318
|
|
|
8284
8319
|
1. **Orient** \u2014 Your first message includes operating memory and task-relevant memories. Read any relevant files with \`deskfree_read_file\`. If you need more context mid-task, use \`deskfree_orient\` with a specific query to recall relevant memories.
|
|
8285
8320
|
2. **Align** \u2014 State briefly what you found and what you'll produce. One or two sentences. ("I'll build on the existing brand guide and create a new tone reference.") Just write this as your response text \u2014 do NOT use \`deskfree_send_message\`.
|
|
8286
|
-
- **Judgment calls or creative direction?**
|
|
8321
|
+
- **Judgment calls or creative direction?** Lead with a visual that shows the shape of the decision \u2014 a comparison table, a before/after, a flow \u2014 in a code block. Then state your recommendation and why in 1-2 sentences. Then the specific ask. The human should grasp what you're proposing before reading any prose. Set \`awaiting: 'human'\` via \`deskfree_update_task_status\` and wait for confirmation. Getting alignment early prevents costly rework.
|
|
8322
|
+
- **Multiple judgment calls?** Send each as a separate message in the thread, numbered (1/N). Each one gets its own visual and ask. The human works through them in any order.
|
|
8287
8323
|
- **Straightforward execution?** Proceed immediately \u2014 don't wait for a response.
|
|
8288
8324
|
3. **Work** \u2014 Execute the task. Update existing files with \`deskfree_update_file\` or create new ones with \`deskfree_create_file\`. Pass your taskId so updates appear in the thread. For large deliverables, build incrementally \u2014 share structure/outline first, then flesh out. Don't produce a finished 2000-word document and ask for review in one shot.
|
|
8289
|
-
4. **Deliver** \u2014
|
|
8325
|
+
4. **Deliver** \u2014 Your job isn't just to produce the deliverable \u2014 it's to make it reviewable. A perfect document that takes 20 minutes to review is worse than a good one that takes 2 minutes to verify.
|
|
8326
|
+
- Tell the human what you're confident about and what you're not.
|
|
8327
|
+
- Spotlight the 1-2 areas that actually need their eyes \u2014 use a visual to show what's notable.
|
|
8328
|
+
- Link the full artifact (file) for anyone who wants to drill down. Most won't need to.
|
|
8329
|
+
- State the ask: "Approve and I'll proceed" / "Check the highlighted section" / "Just FYI, no action needed."
|
|
8330
|
+
- Set \`awaiting: 'human'\` via \`deskfree_update_task_status\`. The human will complete the task when satisfied.
|
|
8331
|
+
|
|
8332
|
+
**Alignment format \u2014 how to present to humans:**
|
|
8333
|
+
Whenever you hand off to a human (align, deliver, blocker, status update), follow this structure:
|
|
8334
|
+
- **Layer 1 \u2014 Visual anchor.** A code block with an ASCII diagram, table, comparison, or flow. This is what the human looks at first. Keep it under 48 characters wide for mobile. The human should "get it" in under 5 seconds.
|
|
8335
|
+
- **Layer 2 \u2014 The ask.** One or two sentences: what you need from them. Approve, pick, answer, or nothing.
|
|
8336
|
+
- **Layer 3 \u2014 Full detail.** A linked file for deep-dive. Most humans stop at layer 2 \u2014 design for that.
|
|
8337
|
+
|
|
8338
|
+
Anti-patterns: a message longer than a phone screen with no visual; "please review the attached spec" with no summary; burying the ask in paragraph three; leading with context instead of the point.
|
|
8290
8339
|
|
|
8291
8340
|
**Push back when warranted:**
|
|
8292
8341
|
- If task instructions seem unclear, contradictory, or misguided \u2014 say so. "This task asks for X, but based on [context], Y might work better because..." is more useful than silently executing a flawed plan.
|
|
@@ -8406,7 +8455,7 @@ Do NOT record: one-time task details, things already in project docs, or obvious
|
|
|
8406
8455
|
this.closed = true;
|
|
8407
8456
|
await this.queue;
|
|
8408
8457
|
const text = finalText ?? (this.fullText || this.currentText);
|
|
8409
|
-
if (this.messageId) {
|
|
8458
|
+
if (this.messageId && text) {
|
|
8410
8459
|
for (let attempt = 0; attempt < CLOSE_MAX_RETRIES; attempt++) {
|
|
8411
8460
|
try {
|
|
8412
8461
|
await this.client.updateMessage({
|
|
@@ -14933,7 +14982,7 @@ async function startAgent(opts) {
|
|
|
14933
14982
|
log.info("DeskFree Agent Runtime starting...");
|
|
14934
14983
|
const { getRotationToken: getRotationToken2, setInitialRotationToken: setInitialRotationToken2 } = await Promise.resolve().then(() => (init_ws_gateway(), ws_gateway_exports));
|
|
14935
14984
|
const { collectFingerprint: collectFingerprint2 } = await Promise.resolve().then(() => (init_fingerprint(), fingerprint_exports));
|
|
14936
|
-
const runtimeVersion = "0.6.
|
|
14985
|
+
const runtimeVersion = "0.6.7";
|
|
14937
14986
|
const fingerprint = collectFingerprint2(localConfig.stateDir, runtimeVersion);
|
|
14938
14987
|
log.info("Connecting to DeskFree...", { wsUrl: localConfig.wsUrl });
|
|
14939
14988
|
const connectResult = await initialConnect({
|