@questionbase/deskfree 0.3.0-alpha.22 → 0.3.0-alpha.24
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 +16 -20
- package/dist/index.d.ts +51 -66
- package/dist/index.js +524 -525
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/deskfree/SKILL.md +135 -625
- package/skills/deskfree/references/tools.md +71 -82
package/README.md
CHANGED
|
@@ -15,31 +15,30 @@ Agents can pick up tasks, post progress updates, mark work as done or blocked, m
|
|
|
15
15
|
│ deskfree_state Inbound messages from humans │
|
|
16
16
|
│ deskfree_start_task Outbound replies from agent │
|
|
17
17
|
│ deskfree_complete_task Real-time notifications │
|
|
18
|
-
│
|
|
19
|
-
│
|
|
20
|
-
│
|
|
21
|
-
│
|
|
22
|
-
│
|
|
23
|
-
│
|
|
24
|
-
│ deskfree_send_message (+ task suggestions) │
|
|
18
|
+
│ deskfree_send_message │
|
|
19
|
+
│ deskfree_propose │
|
|
20
|
+
│ deskfree_update_file │
|
|
21
|
+
│ deskfree_create_file │
|
|
22
|
+
│ deskfree_claim_evaluation │
|
|
23
|
+
│ deskfree_submit_evaluation │
|
|
25
24
|
└──────────┬───────────────────────────┬───────────────────────────┘
|
|
26
25
|
│ │
|
|
27
26
|
▼ ▼
|
|
28
27
|
┌──────────────────────────────────────────────────────────────────┐
|
|
29
28
|
│ DeskFree Backend │
|
|
30
29
|
│ │
|
|
31
|
-
│ Tasks
|
|
32
|
-
│ ──────
|
|
33
|
-
│ State machine
|
|
34
|
-
│ RLS-scoped
|
|
35
|
-
│ Atomic claims
|
|
30
|
+
│ Tasks Files Messages WebSocket Gateway│
|
|
31
|
+
│ ────── ───── ──────── ─────────────── │
|
|
32
|
+
│ State machine Persistent 1:1 bot↔user DynamoDB-backed │
|
|
33
|
+
│ RLS-scoped documents Threaded by Thin notifs │
|
|
34
|
+
│ Atomic claims Versioned task + polling fallback│
|
|
36
35
|
└──────────────────────────────────────────────────────────────────┘
|
|
37
36
|
```
|
|
38
37
|
|
|
39
38
|
The plugin registers three things with OpenClaw:
|
|
40
39
|
|
|
41
40
|
1. **Channel** — bidirectional messaging between DeskFree users and the agent
|
|
42
|
-
2. **Tools** —
|
|
41
|
+
2. **Tools** — 9 task, file, and messaging tools the agent can call
|
|
43
42
|
3. **Skill** — workflow knowledge that teaches the agent how to use the tools correctly
|
|
44
43
|
|
|
45
44
|
## Install
|
|
@@ -118,12 +117,9 @@ Edit your OpenClaw config file (`~/.openclaw/config.json5`):
|
|
|
118
117
|
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.
|
|
119
118
|
|
|
120
119
|
```
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
human approves/declines
|
|
125
|
-
│
|
|
126
|
-
[approve] → done
|
|
120
|
+
pending ──[start_task]──> active ──[complete_task(review)]──> review ──[bot completes]──> done
|
|
121
|
+
└──[complete_task(done)]──> done
|
|
122
|
+
└──[complete_task(blocked)]──> review
|
|
127
123
|
```
|
|
128
124
|
|
|
129
125
|
See `skills/deskfree/references/tools.md` for the full tool reference.
|
|
@@ -132,7 +128,7 @@ See `skills/deskfree/references/tools.md` for the full tool reference.
|
|
|
132
128
|
|
|
133
129
|
**Inbound (human → agent):** WebSocket sends thin notification (`hint: "message.new"`) → plugin fetches full message via HTTP. Fallback: polls every 30s if WebSocket is unavailable.
|
|
134
130
|
|
|
135
|
-
**Outbound (agent → human):**
|
|
131
|
+
**Outbound (agent → human):** Supports streaming (progressive deltas via `streamChunk`, finalized via `updateMessage`) and non-streaming (direct `POST messages.send`). Text chunked at 2000 chars when streaming is not active.
|
|
136
132
|
|
|
137
133
|
### WebSocket Gateway
|
|
138
134
|
|
package/dist/index.d.ts
CHANGED
|
@@ -418,8 +418,7 @@ interface WsNotification {
|
|
|
418
418
|
interface Task {
|
|
419
419
|
taskId: string;
|
|
420
420
|
title: string;
|
|
421
|
-
status: '
|
|
422
|
-
isWorking?: boolean;
|
|
421
|
+
status: 'pending' | 'active' | 'review' | 'done';
|
|
423
422
|
instructions?: string;
|
|
424
423
|
createdAt: string;
|
|
425
424
|
updatedAt: string;
|
|
@@ -432,9 +431,8 @@ interface Task {
|
|
|
432
431
|
interface TaskSummary {
|
|
433
432
|
taskId: string;
|
|
434
433
|
title: string;
|
|
435
|
-
status: '
|
|
434
|
+
status: 'pending' | 'active' | 'review' | 'done';
|
|
436
435
|
instructions: string | null;
|
|
437
|
-
isWorking: boolean;
|
|
438
436
|
fileId: string | null;
|
|
439
437
|
fileName: string | null;
|
|
440
438
|
createdAt: string;
|
|
@@ -460,6 +458,13 @@ interface TaskWithContext extends Task {
|
|
|
460
458
|
instructions: string;
|
|
461
459
|
messages: TaskMessage[];
|
|
462
460
|
fileContext: FileContext | null;
|
|
461
|
+
skillContext?: Array<{
|
|
462
|
+
skillId: string;
|
|
463
|
+
name: string;
|
|
464
|
+
displayName: string;
|
|
465
|
+
instructions: string;
|
|
466
|
+
criticalSection: string;
|
|
467
|
+
}>;
|
|
463
468
|
}
|
|
464
469
|
interface CompleteTaskInput {
|
|
465
470
|
taskId: string;
|
|
@@ -469,8 +474,7 @@ interface CompleteTaskInput {
|
|
|
469
474
|
interface WorkspaceStateTask {
|
|
470
475
|
taskId: string;
|
|
471
476
|
title: string;
|
|
472
|
-
status: '
|
|
473
|
-
isWorking?: boolean;
|
|
477
|
+
status: 'pending' | 'active' | 'review' | 'done';
|
|
474
478
|
instructions?: string | null;
|
|
475
479
|
fileId?: string | null;
|
|
476
480
|
fileName?: string | null;
|
|
@@ -498,35 +502,9 @@ interface WorkspaceState {
|
|
|
498
502
|
tasks: WorkspaceStateTask[];
|
|
499
503
|
recentlyDone: WorkspaceStateTask[];
|
|
500
504
|
waysOfWorking: string | null;
|
|
501
|
-
pendingEvaluations: Array<{
|
|
502
|
-
taskId: string;
|
|
503
|
-
taskNumber: number;
|
|
504
|
-
title: string;
|
|
505
|
-
initiativeId?: string | null;
|
|
506
|
-
}>;
|
|
507
505
|
initiatives: Initiative[];
|
|
508
506
|
files: WorkspaceFile[];
|
|
509
507
|
}
|
|
510
|
-
interface EvaluationTaskMessage {
|
|
511
|
-
messageId: string;
|
|
512
|
-
authorType: string;
|
|
513
|
-
content: string;
|
|
514
|
-
createdAt: string;
|
|
515
|
-
userName: string | null;
|
|
516
|
-
}
|
|
517
|
-
interface ClaimEvaluationResponse {
|
|
518
|
-
task: Task & {
|
|
519
|
-
evaluationPending: boolean;
|
|
520
|
-
};
|
|
521
|
-
waysOfWorking: string | null;
|
|
522
|
-
currentVersion: number;
|
|
523
|
-
messages: EvaluationTaskMessage[];
|
|
524
|
-
initiative?: {
|
|
525
|
-
id: string;
|
|
526
|
-
title: string;
|
|
527
|
-
content: string;
|
|
528
|
-
} | null;
|
|
529
|
-
}
|
|
530
508
|
|
|
531
509
|
/** Enhanced error class for DeskFree API errors with user-friendly messages */
|
|
532
510
|
declare class DeskFreeError extends Error {
|
|
@@ -566,6 +544,17 @@ declare class DeskFreeClient {
|
|
|
566
544
|
messageId: string;
|
|
567
545
|
content: string;
|
|
568
546
|
}>;
|
|
547
|
+
/**
|
|
548
|
+
* Send a streaming chunk (delta only) for an in-progress message.
|
|
549
|
+
* Broadcasts delta over WS and stores full content in DynamoDB for crash recovery.
|
|
550
|
+
*/
|
|
551
|
+
streamChunk(input: {
|
|
552
|
+
messageId: string;
|
|
553
|
+
delta: string;
|
|
554
|
+
fullContent: string;
|
|
555
|
+
}): Promise<{
|
|
556
|
+
messageId: string;
|
|
557
|
+
}>;
|
|
569
558
|
/**
|
|
570
559
|
* Send a text message to a DeskFree conversation.
|
|
571
560
|
*
|
|
@@ -588,6 +577,7 @@ declare class DeskFreeClient {
|
|
|
588
577
|
/** Fetch paginated message history for a conversation. */
|
|
589
578
|
listMessages(input: {
|
|
590
579
|
userId?: string;
|
|
580
|
+
taskId?: string;
|
|
591
581
|
cursor?: string | null;
|
|
592
582
|
limit?: number;
|
|
593
583
|
}): Promise<MessagesResponse>;
|
|
@@ -596,6 +586,7 @@ declare class DeskFreeClient {
|
|
|
596
586
|
/** Claim a task so the bot can begin working on it. Returns enriched context. */
|
|
597
587
|
claimTask(input: {
|
|
598
588
|
taskId: string;
|
|
589
|
+
runnerId?: string;
|
|
599
590
|
}): Promise<TaskWithContext>;
|
|
600
591
|
/** Fetch a lightweight task summary by ID. Read-only, no side effects. */
|
|
601
592
|
getTask(input: {
|
|
@@ -672,48 +663,42 @@ declare class DeskFreeClient {
|
|
|
672
663
|
completeTask(input: CompleteTaskInput): Promise<Task & {
|
|
673
664
|
outcome: 'done' | 'blocked';
|
|
674
665
|
}>;
|
|
675
|
-
/**
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
666
|
+
/** Reopen a completed/human task back to bot status for further work. */
|
|
667
|
+
reopenTask(input: {
|
|
668
|
+
taskId: string;
|
|
669
|
+
reason?: string;
|
|
670
|
+
}): Promise<Task>;
|
|
671
|
+
/** Propose a plan — creates a proposal message with plan metadata. No DB rows until human approves. */
|
|
672
|
+
proposePlan(input: {
|
|
673
|
+
tasks: Array<{
|
|
674
|
+
title?: string;
|
|
679
675
|
instructions?: string;
|
|
676
|
+
substeps?: string[];
|
|
677
|
+
file?: {
|
|
678
|
+
type: 'existing';
|
|
679
|
+
existingId: string;
|
|
680
|
+
} | {
|
|
681
|
+
type: 'new';
|
|
682
|
+
name: string;
|
|
683
|
+
description?: string;
|
|
684
|
+
};
|
|
680
685
|
estimatedTokens?: number;
|
|
681
|
-
initiativeId?: string;
|
|
682
686
|
scheduledFor?: string;
|
|
683
687
|
}>;
|
|
684
|
-
|
|
685
|
-
initiativeSuggestions?: Array<{
|
|
688
|
+
initiative?: string | {
|
|
686
689
|
title: string;
|
|
687
690
|
content: string;
|
|
688
|
-
|
|
689
|
-
|
|
691
|
+
};
|
|
692
|
+
context?: string;
|
|
690
693
|
}): Promise<{
|
|
691
|
-
|
|
692
|
-
initiativeSuggestionIds?: string[];
|
|
694
|
+
messageId: string;
|
|
693
695
|
}>;
|
|
694
|
-
/**
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
taskId: string;
|
|
700
|
-
}): Promise<ClaimEvaluationResponse | null>;
|
|
701
|
-
/**
|
|
702
|
-
* Submit the result of a ways-of-working evaluation.
|
|
703
|
-
* Dual output: globalWoW (applies everywhere) and initiative (applies to the task's initiative).
|
|
704
|
-
* Clears evaluationPending and isWorking on the task.
|
|
705
|
-
*/
|
|
706
|
-
submitEvaluation(input: {
|
|
707
|
-
taskId: string;
|
|
696
|
+
/** Update ways of working and/or initiative content based on learnings. */
|
|
697
|
+
updateKnowledge(input: {
|
|
698
|
+
globalWoW?: string;
|
|
699
|
+
initiativeId?: string;
|
|
700
|
+
initiativeContent?: string;
|
|
708
701
|
reasoning: string;
|
|
709
|
-
globalWoW: {
|
|
710
|
-
hasChanges: boolean;
|
|
711
|
-
updatedContent?: string;
|
|
712
|
-
};
|
|
713
|
-
initiative: {
|
|
714
|
-
hasChanges: boolean;
|
|
715
|
-
updatedContent?: string;
|
|
716
|
-
};
|
|
717
702
|
}): Promise<{
|
|
718
703
|
success: boolean;
|
|
719
704
|
globalVersion?: number;
|
|
@@ -785,4 +770,4 @@ declare const plugin: {
|
|
|
785
770
|
register(api: OpenClawPluginApi): void;
|
|
786
771
|
};
|
|
787
772
|
|
|
788
|
-
export { type AnyAgentTool, type ChannelAccountSnapshot, type ChannelCapabilities, type ChannelConfigAdapter, type ChannelGatewayAdapter, type ChannelGatewayContext, type ChannelLogoutContext, type ChannelLogoutResult, type ChannelMessagingAdapter, type ChannelMessagingTargetResolver, type ChannelMeta, type ChannelOnboardingAdapter, type ChannelOnboardingResult, type ChannelOnboardingStatus, type ChannelOutboundAdapter, type ChannelOutboundContext, type ChannelPlugin, type ChannelProbeResult, type ChannelSecurityAdapter, type ChannelSecurityDmPolicy, type ChannelSetupAdapter, type ChannelStatusAdapter, type ChannelStatusIssue, type ChatMessage, type ChatMessageAttachment, type
|
|
773
|
+
export { type AnyAgentTool, type ChannelAccountSnapshot, type ChannelCapabilities, type ChannelConfigAdapter, type ChannelGatewayAdapter, type ChannelGatewayContext, type ChannelLogoutContext, type ChannelLogoutResult, type ChannelMessagingAdapter, type ChannelMessagingTargetResolver, type ChannelMeta, type ChannelOnboardingAdapter, type ChannelOnboardingResult, type ChannelOnboardingStatus, type ChannelOutboundAdapter, type ChannelOutboundContext, type ChannelPlugin, type ChannelProbeResult, type ChannelSecurityAdapter, type ChannelSecurityDmPolicy, type ChannelSetupAdapter, type ChannelStatusAdapter, type ChannelStatusIssue, type ChatMessage, type ChatMessageAttachment, type CompleteTaskInput, type DeskFreeChannelConfig, DeskFreeClient, DeskFreeError, type FileContext, type FinalizedMsgContext, type Initiative, type MessagesResponse, OfflineQueue, type OpenClawConfig, type OpenClawPluginApi, type OpenClawPluginToolContext, type OpenClawPluginToolFactory, type OpenClawPluginToolOptions, type OutboundDeliveryResult, type PluginHookAgentContext, type PluginHookBeforeAgentStartEvent, type PluginHookBeforeAgentStartResult, type PluginHookHandlerMap, type PluginHookName, type PluginLogger, type PluginRuntime, type ReplyDispatcher, type ResolvedDeskFreeAccount, type Task, type TaskMessage, type TaskSummary, type TaskWithContext, type WizardPrompter, type WorkspaceFile, type WorkspaceState, type WorkspaceStateTask, type WsNotification, type WsTicketResponse, plugin as default, reportError };
|