@questionbase/deskfree 0.3.0-alpha.23 → 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 +3 -6
- package/dist/index.d.ts +9 -55
- package/dist/index.js +83 -68
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/deskfree/SKILL.md +110 -358
- package/skills/deskfree/references/tools.md +71 -82
package/README.md
CHANGED
|
@@ -117,12 +117,9 @@ Edit your OpenClaw config file (`~/.openclaw/config.json5`):
|
|
|
117
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.
|
|
118
118
|
|
|
119
119
|
```
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
human approves/declines
|
|
124
|
-
│
|
|
125
|
-
[approve] → done
|
|
120
|
+
pending ──[start_task]──> active ──[complete_task(review)]──> review ──[bot completes]──> done
|
|
121
|
+
└──[complete_task(done)]──> done
|
|
122
|
+
└──[complete_task(blocked)]──> review
|
|
126
123
|
```
|
|
127
124
|
|
|
128
125
|
See `skills/deskfree/references/tools.md` for the full tool reference.
|
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;
|
|
@@ -476,8 +474,7 @@ interface CompleteTaskInput {
|
|
|
476
474
|
interface WorkspaceStateTask {
|
|
477
475
|
taskId: string;
|
|
478
476
|
title: string;
|
|
479
|
-
status: '
|
|
480
|
-
isWorking?: boolean;
|
|
477
|
+
status: 'pending' | 'active' | 'review' | 'done';
|
|
481
478
|
instructions?: string | null;
|
|
482
479
|
fileId?: string | null;
|
|
483
480
|
fileName?: string | null;
|
|
@@ -505,35 +502,9 @@ interface WorkspaceState {
|
|
|
505
502
|
tasks: WorkspaceStateTask[];
|
|
506
503
|
recentlyDone: WorkspaceStateTask[];
|
|
507
504
|
waysOfWorking: string | null;
|
|
508
|
-
pendingEvaluations: Array<{
|
|
509
|
-
taskId: string;
|
|
510
|
-
taskNumber: number;
|
|
511
|
-
title: string;
|
|
512
|
-
initiativeId?: string | null;
|
|
513
|
-
}>;
|
|
514
505
|
initiatives: Initiative[];
|
|
515
506
|
files: WorkspaceFile[];
|
|
516
507
|
}
|
|
517
|
-
interface EvaluationTaskMessage {
|
|
518
|
-
messageId: string;
|
|
519
|
-
authorType: string;
|
|
520
|
-
content: string;
|
|
521
|
-
createdAt: string;
|
|
522
|
-
userName: string | null;
|
|
523
|
-
}
|
|
524
|
-
interface ClaimEvaluationResponse {
|
|
525
|
-
task: Task & {
|
|
526
|
-
evaluationPending: boolean;
|
|
527
|
-
};
|
|
528
|
-
waysOfWorking: string | null;
|
|
529
|
-
currentVersion: number;
|
|
530
|
-
messages: EvaluationTaskMessage[];
|
|
531
|
-
initiative?: {
|
|
532
|
-
id: string;
|
|
533
|
-
title: string;
|
|
534
|
-
content: string;
|
|
535
|
-
} | null;
|
|
536
|
-
}
|
|
537
508
|
|
|
538
509
|
/** Enhanced error class for DeskFree API errors with user-friendly messages */
|
|
539
510
|
declare class DeskFreeError extends Error {
|
|
@@ -722,29 +693,12 @@ declare class DeskFreeClient {
|
|
|
722
693
|
}): Promise<{
|
|
723
694
|
messageId: string;
|
|
724
695
|
}>;
|
|
725
|
-
/**
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
taskId: string;
|
|
731
|
-
}): Promise<ClaimEvaluationResponse | null>;
|
|
732
|
-
/**
|
|
733
|
-
* Submit the result of a ways-of-working evaluation.
|
|
734
|
-
* Dual output: globalWoW (applies everywhere) and initiative (applies to the task's initiative).
|
|
735
|
-
* Clears evaluationPending and isWorking on the task.
|
|
736
|
-
*/
|
|
737
|
-
submitEvaluation(input: {
|
|
738
|
-
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;
|
|
739
701
|
reasoning: string;
|
|
740
|
-
globalWoW: {
|
|
741
|
-
hasChanges: boolean;
|
|
742
|
-
updatedContent?: string;
|
|
743
|
-
};
|
|
744
|
-
initiative: {
|
|
745
|
-
hasChanges: boolean;
|
|
746
|
-
updatedContent?: string;
|
|
747
|
-
};
|
|
748
702
|
}): Promise<{
|
|
749
703
|
success: boolean;
|
|
750
704
|
globalVersion?: number;
|
|
@@ -816,4 +770,4 @@ declare const plugin: {
|
|
|
816
770
|
register(api: OpenClawPluginApi): void;
|
|
817
771
|
};
|
|
818
772
|
|
|
819
|
-
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 };
|
package/dist/index.js
CHANGED
|
@@ -3954,23 +3954,10 @@ var DeskFreeClient = class {
|
|
|
3954
3954
|
}
|
|
3955
3955
|
return this.request("POST", "tasks.propose", input);
|
|
3956
3956
|
}
|
|
3957
|
-
/**
|
|
3958
|
-
|
|
3959
|
-
* evaluationPending=true and isWorking=false. Returns null if already claimed.
|
|
3960
|
-
*/
|
|
3961
|
-
async claimEvaluation(input) {
|
|
3962
|
-
this.requireNonEmpty(input.taskId, "taskId");
|
|
3963
|
-
return this.request("POST", "waysOfWorking.claim", input);
|
|
3964
|
-
}
|
|
3965
|
-
/**
|
|
3966
|
-
* Submit the result of a ways-of-working evaluation.
|
|
3967
|
-
* Dual output: globalWoW (applies everywhere) and initiative (applies to the task's initiative).
|
|
3968
|
-
* Clears evaluationPending and isWorking on the task.
|
|
3969
|
-
*/
|
|
3970
|
-
async submitEvaluation(input) {
|
|
3971
|
-
this.requireNonEmpty(input.taskId, "taskId");
|
|
3957
|
+
/** Update ways of working and/or initiative content based on learnings. */
|
|
3958
|
+
async updateKnowledge(input) {
|
|
3972
3959
|
this.requireNonEmpty(input.reasoning, "reasoning");
|
|
3973
|
-
return this.request("POST", "waysOfWorking.
|
|
3960
|
+
return this.request("POST", "waysOfWorking.update", input);
|
|
3974
3961
|
}
|
|
3975
3962
|
/**
|
|
3976
3963
|
* Lightweight health check that verifies connectivity and authentication.
|
|
@@ -4476,7 +4463,7 @@ function truncateAtWord(text, maxLen) {
|
|
|
4476
4463
|
return (lastSpace > 0 ? truncated.slice(0, lastSpace) : truncated) + "\u2026";
|
|
4477
4464
|
}
|
|
4478
4465
|
function buildBodyForAgent(task, content, recentMessages) {
|
|
4479
|
-
let prefix = `[Task thread: "${task.title}" | status: ${task.status}
|
|
4466
|
+
let prefix = `[Task thread: "${task.title}" | status: ${task.status}]`;
|
|
4480
4467
|
if (task.instructions) {
|
|
4481
4468
|
prefix += "\n" + truncateAtWord(task.instructions, MAX_INSTRUCTIONS_LENGTH);
|
|
4482
4469
|
}
|
|
@@ -4491,10 +4478,10 @@ function buildBodyForAgent(task, content, recentMessages) {
|
|
|
4491
4478
|
return prefix + "\n\n" + content;
|
|
4492
4479
|
}
|
|
4493
4480
|
function resolveTaskRouting(task, hasAttachments) {
|
|
4494
|
-
if (task.
|
|
4481
|
+
if (task.status === "active") {
|
|
4495
4482
|
return { target: "runner" };
|
|
4496
4483
|
}
|
|
4497
|
-
if (hasAttachments && (task.status === "
|
|
4484
|
+
if (hasAttachments && (task.status === "review" || task.status === "done")) {
|
|
4498
4485
|
return { target: "auto-reopen" };
|
|
4499
4486
|
}
|
|
4500
4487
|
return { target: "orchestrator" };
|
|
@@ -7912,6 +7899,30 @@ var ORCHESTRATOR_TOOLS = {
|
|
|
7912
7899
|
)
|
|
7913
7900
|
})
|
|
7914
7901
|
},
|
|
7902
|
+
UPDATE_KNOWLEDGE: {
|
|
7903
|
+
name: "deskfree_update_knowledge",
|
|
7904
|
+
description: "Update ways of working and/or initiative content based on learnings from completed tasks.",
|
|
7905
|
+
parameters: Type.Object({
|
|
7906
|
+
globalWoW: Type.Optional(
|
|
7907
|
+
Type.String({
|
|
7908
|
+
description: "Full updated global ways-of-working markdown content"
|
|
7909
|
+
})
|
|
7910
|
+
),
|
|
7911
|
+
initiativeId: Type.Optional(
|
|
7912
|
+
Type.String({
|
|
7913
|
+
description: "Initiative ID to update"
|
|
7914
|
+
})
|
|
7915
|
+
),
|
|
7916
|
+
initiativeContent: Type.Optional(
|
|
7917
|
+
Type.String({
|
|
7918
|
+
description: "Full updated initiative content markdown (required if initiativeId provided)"
|
|
7919
|
+
})
|
|
7920
|
+
),
|
|
7921
|
+
reasoning: Type.String({
|
|
7922
|
+
description: "Explanation of why these updates were made and what was learned"
|
|
7923
|
+
})
|
|
7924
|
+
})
|
|
7925
|
+
},
|
|
7915
7926
|
SEND_MESSAGE: {
|
|
7916
7927
|
name: "deskfree_send_message",
|
|
7917
7928
|
description: "Send a message (progress update, question, status report). Used for communication outside of task threads.",
|
|
@@ -8049,60 +8060,29 @@ var SHARED_TOOLS = {
|
|
|
8049
8060
|
},
|
|
8050
8061
|
COMPLETE_TASK: {
|
|
8051
8062
|
name: "deskfree_complete_task",
|
|
8052
|
-
description:
|
|
8063
|
+
description: "Finish a task. Transitions to review/done status based on outcome.",
|
|
8053
8064
|
parameters: Type.Object({
|
|
8054
8065
|
taskId: Type.String({ description: "Task UUID" }),
|
|
8055
|
-
outcome: Type.Union(
|
|
8056
|
-
|
|
8057
|
-
|
|
8066
|
+
outcome: Type.Union(
|
|
8067
|
+
[
|
|
8068
|
+
Type.Literal("review"),
|
|
8069
|
+
Type.Literal("done"),
|
|
8070
|
+
Type.Literal("blocked"),
|
|
8071
|
+
Type.Literal("cancelled")
|
|
8072
|
+
],
|
|
8073
|
+
{
|
|
8074
|
+
description: '"review" = ready for human review, "done" = work complete, "blocked" = need human input, "cancelled" = task cancelled'
|
|
8075
|
+
}
|
|
8076
|
+
),
|
|
8058
8077
|
summary: Type.Optional(
|
|
8059
8078
|
Type.String({
|
|
8060
|
-
description:
|
|
8079
|
+
description: "Brief summary of what was accomplished (max 2000 chars)"
|
|
8061
8080
|
})
|
|
8062
8081
|
),
|
|
8063
|
-
|
|
8064
|
-
Type.
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
description: "Explanation of your evaluation \u2014 what you analyzed and why you did or did not update the ways of working and/or initiative content"
|
|
8068
|
-
}),
|
|
8069
|
-
globalWoW: Type.Object(
|
|
8070
|
-
{
|
|
8071
|
-
hasChanges: Type.Boolean({
|
|
8072
|
-
description: "Whether the global ways of working should be updated"
|
|
8073
|
-
}),
|
|
8074
|
-
updatedContent: Type.Optional(
|
|
8075
|
-
Type.String({
|
|
8076
|
-
description: "Full updated global ways-of-working markdown (required if hasChanges=true)"
|
|
8077
|
-
})
|
|
8078
|
-
)
|
|
8079
|
-
},
|
|
8080
|
-
{
|
|
8081
|
-
description: "Global ways-of-working update \u2014 patterns that apply across all work"
|
|
8082
|
-
}
|
|
8083
|
-
),
|
|
8084
|
-
initiative: Type.Optional(
|
|
8085
|
-
Type.Object(
|
|
8086
|
-
{
|
|
8087
|
-
hasChanges: Type.Boolean({
|
|
8088
|
-
description: "Whether the initiative content should be updated (ignored if task has no initiative)"
|
|
8089
|
-
}),
|
|
8090
|
-
updatedContent: Type.Optional(
|
|
8091
|
-
Type.String({
|
|
8092
|
-
description: "Full updated initiative content markdown (required if hasChanges=true)"
|
|
8093
|
-
})
|
|
8094
|
-
)
|
|
8095
|
-
},
|
|
8096
|
-
{
|
|
8097
|
-
description: "Initiative content update \u2014 what was learned about this specific area of focus. Ignored if the task has no initiative_id."
|
|
8098
|
-
}
|
|
8099
|
-
)
|
|
8100
|
-
)
|
|
8101
|
-
},
|
|
8102
|
-
{
|
|
8103
|
-
description: 'Required when completing an evaluation task (mode="evaluation") with outcome "done". Review global WoW and initiative content and provide your analysis.'
|
|
8104
|
-
}
|
|
8105
|
-
)
|
|
8082
|
+
learnings: Type.Optional(
|
|
8083
|
+
Type.String({
|
|
8084
|
+
description: "Key insights, patterns, or lessons learned from completing this task. Used to improve future work."
|
|
8085
|
+
})
|
|
8106
8086
|
)
|
|
8107
8087
|
})
|
|
8108
8088
|
},
|
|
@@ -8228,7 +8208,7 @@ var SHARED_TOOLS = {
|
|
|
8228
8208
|
var WORKER_TOOLS = {
|
|
8229
8209
|
START_TASK: {
|
|
8230
8210
|
name: "deskfree_start_task",
|
|
8231
|
-
description:
|
|
8211
|
+
description: "Claim a pending task and start working. Returns full context (instructions, message history, and fileContext if the task has a linked file \u2014 use the file content as working context).",
|
|
8232
8212
|
parameters: Type.Object({
|
|
8233
8213
|
taskId: Type.String({ description: "Task UUID to claim" }),
|
|
8234
8214
|
runnerId: Type.Optional(
|
|
@@ -9099,6 +9079,41 @@ function createOrchestratorTools(api) {
|
|
|
9099
9079
|
...ORCHESTRATOR_TOOLS.REOPEN_TASK,
|
|
9100
9080
|
execute: makeReopenTaskHandler(client)
|
|
9101
9081
|
},
|
|
9082
|
+
{
|
|
9083
|
+
...ORCHESTRATOR_TOOLS.UPDATE_KNOWLEDGE,
|
|
9084
|
+
async execute(_id, params) {
|
|
9085
|
+
try {
|
|
9086
|
+
const globalWoW = validateStringParam(params, "globalWoW", false);
|
|
9087
|
+
const initiativeId = validateStringParam(
|
|
9088
|
+
params,
|
|
9089
|
+
"initiativeId",
|
|
9090
|
+
false
|
|
9091
|
+
);
|
|
9092
|
+
const initiativeContent = validateStringParam(
|
|
9093
|
+
params,
|
|
9094
|
+
"initiativeContent",
|
|
9095
|
+
false
|
|
9096
|
+
);
|
|
9097
|
+
const reasoning = validateStringParam(params, "reasoning", true);
|
|
9098
|
+
const result = await client.updateKnowledge({
|
|
9099
|
+
globalWoW,
|
|
9100
|
+
initiativeId,
|
|
9101
|
+
initiativeContent,
|
|
9102
|
+
reasoning
|
|
9103
|
+
});
|
|
9104
|
+
return {
|
|
9105
|
+
content: [
|
|
9106
|
+
{
|
|
9107
|
+
type: "text",
|
|
9108
|
+
text: `Knowledge updated successfully: ${JSON.stringify(result, null, 2)}`
|
|
9109
|
+
}
|
|
9110
|
+
]
|
|
9111
|
+
};
|
|
9112
|
+
} catch (err) {
|
|
9113
|
+
return errorResult(err);
|
|
9114
|
+
}
|
|
9115
|
+
}
|
|
9116
|
+
},
|
|
9102
9117
|
{
|
|
9103
9118
|
...ORCHESTRATOR_TOOLS.SEND_MESSAGE,
|
|
9104
9119
|
execute: makeSendMessageHandler(client)
|