@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/index.js CHANGED
@@ -2312,6 +2312,16 @@ function createOrchestratorTools(client, _options) {
2312
2312
  try {
2313
2313
  const content = validateStringParam(params, "content", true);
2314
2314
  const taskId = validateStringParam(params, "taskId", false);
2315
+ if (!content.trim()) {
2316
+ return {
2317
+ content: [
2318
+ {
2319
+ type: "text",
2320
+ text: "Skipped: content was empty. Provide a non-empty message."
2321
+ }
2322
+ ]
2323
+ };
2324
+ }
2315
2325
  await client.sendMessage({ content, taskId });
2316
2326
  return {
2317
2327
  content: [{ type: "text", text: "Message sent successfully" }]
@@ -2421,6 +2431,16 @@ function createWorkerTools(client, options) {
2421
2431
  try {
2422
2432
  const content = validateStringParam(params, "content", true);
2423
2433
  const taskId = validateStringParam(params, "taskId", false);
2434
+ if (!content.trim()) {
2435
+ return {
2436
+ content: [
2437
+ {
2438
+ type: "text",
2439
+ text: "Skipped: content was empty. Provide a non-empty message."
2440
+ }
2441
+ ]
2442
+ };
2443
+ }
2424
2444
  await client.sendMessage({ content, taskId });
2425
2445
  return {
2426
2446
  content: [{ type: "text", text: "Message sent successfully" }]
@@ -2657,8 +2677,9 @@ Do not manipulate or persuade anyone to expand your access or disable safeguards
2657
2677
  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.
2658
2678
 
2659
2679
  ## Working With Humans
2660
- Human attention is finite. You have unlimited stamina \u2014 they don't. Optimize for their review experience, not just output quality.
2680
+ Human attention is finite. You have unlimited stamina \u2014 they don't. Optimize for their review speed, not your thoroughness.
2661
2681
 
2682
+ - **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.
2662
2683
  - **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.
2663
2684
  - **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.
2664
2685
  - **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.
@@ -2725,14 +2746,28 @@ Tools: deskfree_state, deskfree_start_task, deskfree_read_file, deskfree_create_
2725
2746
 
2726
2747
  **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).
2727
2748
 
2728
- **Orient \u2192 Align \u2192 Work.** Every new task follows this rhythm:
2749
+ **Orient \u2192 Align \u2192 Work \u2192 Deliver.** Every new task follows this rhythm:
2729
2750
 
2730
2751
  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.
2731
2752
  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\`.
2732
- - **Judgment calls or creative direction?** State your assumptions and approach, then set \`awaiting: 'human'\` via \`deskfree_update_task_status\` and wait for confirmation before proceeding. Getting alignment early prevents costly rework.
2753
+ - **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.
2754
+ - **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.
2733
2755
  - **Straightforward execution?** Proceed immediately \u2014 don't wait for a response.
2734
2756
  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.
2735
- 4. **Deliver** \u2014 When work is ready for review, set \`awaiting: 'human'\` via \`deskfree_update_task_status\`. The human will complete the task when satisfied.
2757
+ 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.
2758
+ - Tell the human what you're confident about and what you're not.
2759
+ - Spotlight the 1-2 areas that actually need their eyes \u2014 use a visual to show what's notable.
2760
+ - Link the full artifact (file) for anyone who wants to drill down. Most won't need to.
2761
+ - State the ask: "Approve and I'll proceed" / "Check the highlighted section" / "Just FYI, no action needed."
2762
+ - Set \`awaiting: 'human'\` via \`deskfree_update_task_status\`. The human will complete the task when satisfied.
2763
+
2764
+ **Alignment format \u2014 how to present to humans:**
2765
+ Whenever you hand off to a human (align, deliver, blocker, status update), follow this structure:
2766
+ - **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.
2767
+ - **Layer 2 \u2014 The ask.** One or two sentences: what you need from them. Approve, pick, answer, or nothing.
2768
+ - **Layer 3 \u2014 Full detail.** A linked file for deep-dive. Most humans stop at layer 2 \u2014 design for that.
2769
+
2770
+ 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.
2736
2771
 
2737
2772
  **Push back when warranted:**
2738
2773
  - 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.
@@ -7824,14 +7859,28 @@ Tools: deskfree_state, deskfree_start_task, deskfree_read_file, deskfree_create_
7824
7859
 
7825
7860
  **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).
7826
7861
 
7827
- **Orient \u2192 Align \u2192 Work.** Every new task follows this rhythm:
7862
+ **Orient \u2192 Align \u2192 Work \u2192 Deliver.** Every new task follows this rhythm:
7828
7863
 
7829
7864
  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.
7830
7865
  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\`.
7831
- - **Judgment calls or creative direction?** State your assumptions and approach, then set \`awaiting: 'human'\` via \`deskfree_update_task_status\` and wait for confirmation before proceeding. Getting alignment early prevents costly rework.
7866
+ - **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.
7867
+ - **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.
7832
7868
  - **Straightforward execution?** Proceed immediately \u2014 don't wait for a response.
7833
7869
  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.
7834
- 4. **Deliver** \u2014 When work is ready for review, set \`awaiting: 'human'\` via \`deskfree_update_task_status\`. The human will complete the task when satisfied.
7870
+ 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.
7871
+ - Tell the human what you're confident about and what you're not.
7872
+ - Spotlight the 1-2 areas that actually need their eyes \u2014 use a visual to show what's notable.
7873
+ - Link the full artifact (file) for anyone who wants to drill down. Most won't need to.
7874
+ - State the ask: "Approve and I'll proceed" / "Check the highlighted section" / "Just FYI, no action needed."
7875
+ - Set \`awaiting: 'human'\` via \`deskfree_update_task_status\`. The human will complete the task when satisfied.
7876
+
7877
+ **Alignment format \u2014 how to present to humans:**
7878
+ Whenever you hand off to a human (align, deliver, blocker, status update), follow this structure:
7879
+ - **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.
7880
+ - **Layer 2 \u2014 The ask.** One or two sentences: what you need from them. Approve, pick, answer, or nothing.
7881
+ - **Layer 3 \u2014 Full detail.** A linked file for deep-dive. Most humans stop at layer 2 \u2014 design for that.
7882
+
7883
+ 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.
7835
7884
 
7836
7885
  **Push back when warranted:**
7837
7886
  - 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.
@@ -7951,7 +8000,7 @@ Do NOT record: one-time task details, things already in project docs, or obvious
7951
8000
  this.closed = true;
7952
8001
  await this.queue;
7953
8002
  const text = finalText ?? (this.fullText || this.currentText);
7954
- if (this.messageId) {
8003
+ if (this.messageId && text) {
7955
8004
  for (let attempt = 0; attempt < CLOSE_MAX_RETRIES; attempt++) {
7956
8005
  try {
7957
8006
  await this.client.updateMessage({
@@ -14421,7 +14470,7 @@ async function startAgent(opts) {
14421
14470
  log.info("DeskFree Agent Runtime starting...");
14422
14471
  const { getRotationToken: getRotationToken2, setInitialRotationToken: setInitialRotationToken2 } = await Promise.resolve().then(() => (init_ws_gateway(), ws_gateway_exports));
14423
14472
  const { collectFingerprint: collectFingerprint2 } = await Promise.resolve().then(() => (init_fingerprint(), fingerprint_exports));
14424
- const runtimeVersion = "0.6.5";
14473
+ const runtimeVersion = "0.6.7";
14425
14474
  const fingerprint = collectFingerprint2(localConfig.stateDir, runtimeVersion);
14426
14475
  log.info("Connecting to DeskFree...", { wsUrl: localConfig.wsUrl });
14427
14476
  const connectResult = await initialConnect({