@questionbase/deskfree 0.3.0-alpha.19 → 0.3.0-alpha.20
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 +3 -4
- package/dist/index.d.ts +61 -80
- package/dist/index.js +388 -572
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/deskfree/SKILL.md +238 -77
- package/skills/deskfree/references/tools.md +32 -70
package/README.md
CHANGED
|
@@ -21,8 +21,7 @@ Agents can pick up tasks, post progress updates, mark work as done or blocked, m
|
|
|
21
21
|
│ deskfree_classify_task │
|
|
22
22
|
│ deskfree_learn_from_task │
|
|
23
23
|
│ deskfree_update_deliverable │
|
|
24
|
-
│ deskfree_send_message
|
|
25
|
-
│ deskfree_suggest_tasks │
|
|
24
|
+
│ deskfree_send_message (+ task suggestions) │
|
|
26
25
|
└──────────┬───────────────────────────┬───────────────────────────┘
|
|
27
26
|
│ │
|
|
28
27
|
▼ ▼
|
|
@@ -40,7 +39,7 @@ Agents can pick up tasks, post progress updates, mark work as done or blocked, m
|
|
|
40
39
|
The plugin registers three things with OpenClaw:
|
|
41
40
|
|
|
42
41
|
1. **Channel** — bidirectional messaging between DeskFree users and the agent
|
|
43
|
-
2. **Tools** — 10 task, activity, and messaging tools the agent can call
|
|
42
|
+
2. **Tools** — 10 task, activity, and messaging tools the agent can call
|
|
44
43
|
3. **Skill** — workflow knowledge that teaches the agent how to use the tools correctly
|
|
45
44
|
|
|
46
45
|
## Install
|
|
@@ -119,7 +118,7 @@ Edit your OpenClaw config file (`~/.openclaw/config.json5`):
|
|
|
119
118
|
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.
|
|
120
119
|
|
|
121
120
|
```
|
|
122
|
-
|
|
121
|
+
bot ──[start_task]──> bot (is_working) ──[complete_task(done)]──> human
|
|
123
122
|
│ │
|
|
124
123
|
└──[complete_task(blocked)]──> │
|
|
125
124
|
human approves/declines
|
package/dist/index.d.ts
CHANGED
|
@@ -415,20 +415,11 @@ interface WsNotification {
|
|
|
415
415
|
action: 'notify';
|
|
416
416
|
hint: string;
|
|
417
417
|
}
|
|
418
|
-
interface Activity {
|
|
419
|
-
id: string;
|
|
420
|
-
botId: string;
|
|
421
|
-
name: string;
|
|
422
|
-
description?: string | null;
|
|
423
|
-
instructions?: string | null;
|
|
424
|
-
taskCount: number;
|
|
425
|
-
createdAt: string;
|
|
426
|
-
updatedAt: string;
|
|
427
|
-
}
|
|
428
418
|
interface Task {
|
|
429
419
|
taskId: string;
|
|
430
420
|
title: string;
|
|
431
|
-
status: '
|
|
421
|
+
status: 'bot' | 'human' | 'done';
|
|
422
|
+
isWorking?: boolean;
|
|
432
423
|
instructions?: string;
|
|
433
424
|
createdAt: string;
|
|
434
425
|
updatedAt: string;
|
|
@@ -436,6 +427,7 @@ interface Task {
|
|
|
436
427
|
createdById: string;
|
|
437
428
|
reason?: string | null;
|
|
438
429
|
deliverable?: string | null;
|
|
430
|
+
deliverableFormat?: 'markdown' | 'html' | null;
|
|
439
431
|
}
|
|
440
432
|
interface TaskMessage {
|
|
441
433
|
messageId: string;
|
|
@@ -464,22 +456,37 @@ interface CompleteTaskInput {
|
|
|
464
456
|
interface WorkspaceStateTask {
|
|
465
457
|
taskId: string;
|
|
466
458
|
title: string;
|
|
467
|
-
status: '
|
|
459
|
+
status: 'bot' | 'human' | 'done';
|
|
460
|
+
isWorking?: boolean;
|
|
468
461
|
instructions?: string | null;
|
|
469
462
|
deliverable?: string | null;
|
|
470
463
|
createdAt: string;
|
|
471
464
|
updatedAt: string;
|
|
472
465
|
}
|
|
473
|
-
interface WorkspaceStateActivity {
|
|
474
|
-
id: string;
|
|
475
|
-
name: string;
|
|
476
|
-
description?: string | null;
|
|
477
|
-
instructions?: string | null;
|
|
478
|
-
taskCount: number;
|
|
479
|
-
}
|
|
480
466
|
interface WorkspaceState {
|
|
481
467
|
tasks: WorkspaceStateTask[];
|
|
482
468
|
recentlyDone: WorkspaceStateTask[];
|
|
469
|
+
waysOfWorking: string | null;
|
|
470
|
+
pendingEvaluations: Array<{
|
|
471
|
+
taskId: string;
|
|
472
|
+
taskNumber: number;
|
|
473
|
+
title: string;
|
|
474
|
+
}>;
|
|
475
|
+
}
|
|
476
|
+
interface EvaluationTaskMessage {
|
|
477
|
+
messageId: string;
|
|
478
|
+
authorType: string;
|
|
479
|
+
content: string;
|
|
480
|
+
createdAt: string;
|
|
481
|
+
userName: string | null;
|
|
482
|
+
}
|
|
483
|
+
interface ClaimEvaluationResponse {
|
|
484
|
+
task: Task & {
|
|
485
|
+
evaluationPending: boolean;
|
|
486
|
+
};
|
|
487
|
+
waysOfWorking: string | null;
|
|
488
|
+
currentVersion: number;
|
|
489
|
+
messages: EvaluationTaskMessage[];
|
|
483
490
|
}
|
|
484
491
|
|
|
485
492
|
/** Enhanced error class for DeskFree API errors with user-friendly messages */
|
|
@@ -521,13 +528,13 @@ declare class DeskFreeClient {
|
|
|
521
528
|
content: string;
|
|
522
529
|
}>;
|
|
523
530
|
/**
|
|
524
|
-
* Send a text message (with optional attachments) to a DeskFree conversation.
|
|
531
|
+
* Send a text message (with optional attachments or suggestions) to a DeskFree conversation.
|
|
525
532
|
*
|
|
526
|
-
* @param input - Message content, optional userId, taskId, and
|
|
533
|
+
* @param input - Message content, optional userId, taskId, attachments, and suggestions
|
|
527
534
|
*/
|
|
528
535
|
sendMessage(input: {
|
|
529
536
|
userId?: string;
|
|
530
|
-
content
|
|
537
|
+
content?: string;
|
|
531
538
|
taskId?: string;
|
|
532
539
|
attachments?: Array<{
|
|
533
540
|
s3Key: string;
|
|
@@ -535,6 +542,10 @@ declare class DeskFreeClient {
|
|
|
535
542
|
contentType: string;
|
|
536
543
|
size: number;
|
|
537
544
|
}>;
|
|
545
|
+
suggestions?: Array<{
|
|
546
|
+
title: string;
|
|
547
|
+
instructions?: string;
|
|
548
|
+
}>;
|
|
538
549
|
}): Promise<{
|
|
539
550
|
messageId: string;
|
|
540
551
|
content: string;
|
|
@@ -547,41 +558,6 @@ declare class DeskFreeClient {
|
|
|
547
558
|
}): Promise<MessagesResponse>;
|
|
548
559
|
/** Obtain a one-time WebSocket authentication ticket for real-time notifications. */
|
|
549
560
|
getWsTicket(): Promise<WsTicketResponse>;
|
|
550
|
-
/** Create a new activity — a knowledge container for a type of work. */
|
|
551
|
-
createActivity(input: {
|
|
552
|
-
name: string;
|
|
553
|
-
description?: string;
|
|
554
|
-
instructions?: string;
|
|
555
|
-
}): Promise<{
|
|
556
|
-
activity: Activity;
|
|
557
|
-
}>;
|
|
558
|
-
/** Update an activity's name, description, or instructions. */
|
|
559
|
-
updateActivity(input: {
|
|
560
|
-
activityId: string;
|
|
561
|
-
name?: string;
|
|
562
|
-
description?: string;
|
|
563
|
-
instructions?: string;
|
|
564
|
-
}): Promise<{
|
|
565
|
-
activity: Activity;
|
|
566
|
-
}>;
|
|
567
|
-
/** Find activities relevant to a task. Returns scored matches. */
|
|
568
|
-
classifyTask(input: {
|
|
569
|
-
taskTitle: string;
|
|
570
|
-
taskInstructions?: string;
|
|
571
|
-
}): Promise<{
|
|
572
|
-
matches: Array<Activity & {
|
|
573
|
-
score: number;
|
|
574
|
-
}>;
|
|
575
|
-
suggestNew: boolean;
|
|
576
|
-
}>;
|
|
577
|
-
/** Link a task to an activity and record learnings. */
|
|
578
|
-
learnFromTask(input: {
|
|
579
|
-
taskId: string;
|
|
580
|
-
activityId: string;
|
|
581
|
-
additionalInstructions?: string;
|
|
582
|
-
}): Promise<{
|
|
583
|
-
activity: Activity;
|
|
584
|
-
}>;
|
|
585
561
|
/** Create a new task, optionally with a recurring schedule. */
|
|
586
562
|
createTask(input: {
|
|
587
563
|
title: string;
|
|
@@ -599,10 +575,11 @@ declare class DeskFreeClient {
|
|
|
599
575
|
claimTask(input: {
|
|
600
576
|
taskId: string;
|
|
601
577
|
}): Promise<TaskWithContext>;
|
|
602
|
-
/** Update the deliverable (markdown content) for a task. */
|
|
578
|
+
/** Update the deliverable (markdown or HTML content) for a task. */
|
|
603
579
|
updateDeliverable(input: {
|
|
604
580
|
taskId: string;
|
|
605
581
|
deliverable: string;
|
|
582
|
+
format?: 'markdown' | 'html';
|
|
606
583
|
}): Promise<void>;
|
|
607
584
|
/** Send an agent status update to DeskFree. */
|
|
608
585
|
statusUpdate(input: {
|
|
@@ -633,23 +610,6 @@ declare class DeskFreeClient {
|
|
|
633
610
|
}): Promise<{
|
|
634
611
|
accepted: number;
|
|
635
612
|
}>;
|
|
636
|
-
/** Get short-lived AWS credentials for S3 workspace access. */
|
|
637
|
-
workspaceCredentials(): Promise<{
|
|
638
|
-
accessKeyId: string;
|
|
639
|
-
secretAccessKey: string;
|
|
640
|
-
sessionToken: string;
|
|
641
|
-
expiration: Date;
|
|
642
|
-
s3Uri: string;
|
|
643
|
-
region: string;
|
|
644
|
-
}>;
|
|
645
|
-
/** Notify DeskFree that workspace files have changed locally. */
|
|
646
|
-
workspaceRead(input: {
|
|
647
|
-
path: string;
|
|
648
|
-
}): Promise<{
|
|
649
|
-
path: string;
|
|
650
|
-
content: string;
|
|
651
|
-
lastModified: string;
|
|
652
|
-
}>;
|
|
653
613
|
/** Get full workspace snapshot — active tasks and recently done. */
|
|
654
614
|
getState(): Promise<WorkspaceState>;
|
|
655
615
|
/** Report token usage for a task. Atomically increments rollup columns. */
|
|
@@ -663,11 +623,11 @@ declare class DeskFreeClient {
|
|
|
663
623
|
}): Promise<{
|
|
664
624
|
success: boolean;
|
|
665
625
|
}>;
|
|
666
|
-
/** Complete a task with an outcome. Moves task to
|
|
626
|
+
/** Complete a task with an outcome. Moves task to human. */
|
|
667
627
|
completeTask(input: CompleteTaskInput): Promise<Task & {
|
|
668
628
|
outcome: 'done' | 'blocked';
|
|
669
629
|
}>;
|
|
670
|
-
/** Suggest new tasks for the human to review and approve. */
|
|
630
|
+
/** Suggest new tasks for the human to review and approve (via messages.send with suggestions). */
|
|
671
631
|
suggestTasks(input: {
|
|
672
632
|
tasks: Array<{
|
|
673
633
|
title: string;
|
|
@@ -675,8 +635,29 @@ declare class DeskFreeClient {
|
|
|
675
635
|
}>;
|
|
676
636
|
taskId?: string;
|
|
677
637
|
}): Promise<{
|
|
678
|
-
|
|
679
|
-
|
|
638
|
+
messageId: string;
|
|
639
|
+
content: string;
|
|
640
|
+
}>;
|
|
641
|
+
/**
|
|
642
|
+
* Claim a pending evaluation for a task. Atomically sets isWorking=true where
|
|
643
|
+
* evaluationPending=true and isWorking=false. Returns null if already claimed.
|
|
644
|
+
*/
|
|
645
|
+
claimEvaluation(input: {
|
|
646
|
+
taskId: string;
|
|
647
|
+
}): Promise<ClaimEvaluationResponse | null>;
|
|
648
|
+
/**
|
|
649
|
+
* Submit the result of a ways-of-working evaluation.
|
|
650
|
+
* If hasChanges is true and updatedContent is provided, inserts a new version.
|
|
651
|
+
* Clears evaluationPending and isWorking on the task.
|
|
652
|
+
*/
|
|
653
|
+
submitEvaluation(input: {
|
|
654
|
+
taskId: string;
|
|
655
|
+
updatedContent?: string;
|
|
656
|
+
reasoning: string;
|
|
657
|
+
hasChanges: boolean;
|
|
658
|
+
}): Promise<{
|
|
659
|
+
success: boolean;
|
|
660
|
+
version?: number;
|
|
680
661
|
}>;
|
|
681
662
|
/**
|
|
682
663
|
* Lightweight health check that verifies connectivity and authentication.
|
|
@@ -744,4 +725,4 @@ declare const plugin: {
|
|
|
744
725
|
register(api: OpenClawPluginApi): void;
|
|
745
726
|
};
|
|
746
727
|
|
|
747
|
-
export { type
|
|
728
|
+
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 ClaimEvaluationResponse, type CompleteTaskInput, type CreateTaskResponse, type DeskFreeChannelConfig, DeskFreeClient, DeskFreeError, type EvaluationTaskMessage, type FinalizedMsgContext, 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 TaskWithContext, type WizardPrompter, type WorkspaceState, type WorkspaceStateTask, type WsNotification, type WsTicketResponse, plugin as default, reportError };
|