@questionbase/deskfree 0.5.2 → 0.5.3
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 +425 -296
- package/dist/bin.js.map +1 -1
- package/dist/index.d.ts +1 -36
- package/dist/index.js +412 -277
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -75,35 +75,6 @@ interface WorkerQueryOptions {
|
|
|
75
75
|
*/
|
|
76
76
|
declare function runWorker(opts: WorkerQueryOptions): Query;
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Manages daily log files for memory observations.
|
|
80
|
-
*
|
|
81
|
-
* Logs are stored at `{stateDir}/memory/{botId}/daily/YYYY-MM-DD.md`.
|
|
82
|
-
* Each entry is a single line: `- [ISO timestamp] (task: {taskId}) {content}`
|
|
83
|
-
*
|
|
84
|
-
* Appends are atomic via O_APPEND flag (safe for writes <4KB on Linux).
|
|
85
|
-
*/
|
|
86
|
-
declare class DailyLogManager {
|
|
87
|
-
private readonly dailyDir;
|
|
88
|
-
constructor(stateDir: string, botId: string);
|
|
89
|
-
/** Ensure the daily log directory exists. */
|
|
90
|
-
init(): void;
|
|
91
|
-
/** Append a learning entry to today's log file. */
|
|
92
|
-
appendLearning(content: string, taskId?: string): Promise<void>;
|
|
93
|
-
/** Read today's daily log, or null if it doesn't exist. */
|
|
94
|
-
readToday(): Promise<string | null>;
|
|
95
|
-
/** Read all daily logs, concatenated with date headers. */
|
|
96
|
-
readAllLogs(): Promise<string | null>;
|
|
97
|
-
/**
|
|
98
|
-
* Read recent daily logs up to a character budget (newest first).
|
|
99
|
-
* Returns as many days as fit. Quiet week → 14 days. Busy day → just today.
|
|
100
|
-
*/
|
|
101
|
-
readRecentWithBudget(maxChars: number): Promise<string | null>;
|
|
102
|
-
/** Delete daily log files older than the given number of days. */
|
|
103
|
-
pruneOlderThan(days: number): void;
|
|
104
|
-
private todayPath;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
78
|
interface WorkerManagerDeps {
|
|
108
79
|
client: DeskFreeClient;
|
|
109
80
|
createWorkerServer: () => McpSdkServerConfigWithInstance;
|
|
@@ -111,10 +82,6 @@ interface WorkerManagerDeps {
|
|
|
111
82
|
log: PluginLogger;
|
|
112
83
|
/** Max concurrent workers. Defaults to 5. */
|
|
113
84
|
maxConcurrentWorkers?: number;
|
|
114
|
-
/** DailyLogManager for injecting recent observations into worker context. */
|
|
115
|
-
dailyLog?: DailyLogManager;
|
|
116
|
-
/** Character budget for daily log injection (~4 chars/token). Defaults to 16000. */
|
|
117
|
-
dailyLogCharBudget?: number;
|
|
118
85
|
/** Path to persist session history JSON (taskId → sessionId). */
|
|
119
86
|
sessionHistoryPath?: string;
|
|
120
87
|
/** Runtime context for templated system prompts. */
|
|
@@ -226,7 +193,7 @@ declare function sanitizeFileName(fileName: string): string;
|
|
|
226
193
|
* function is wrapped to scan file content for prompt injection before
|
|
227
194
|
* allowing the write.
|
|
228
195
|
*/
|
|
229
|
-
declare function createWorkerMcpServer(client: DeskFreeClient, customTools?: DeskFreeTool[], contentScanner?: ContentScanner
|
|
196
|
+
declare function createWorkerMcpServer(client: DeskFreeClient, customTools?: DeskFreeTool[], contentScanner?: ContentScanner): _anthropic_ai_claude_agent_sdk.McpSdkServerConfigWithInstance;
|
|
230
197
|
|
|
231
198
|
/**
|
|
232
199
|
* MCP Tool Adapter
|
|
@@ -398,8 +365,6 @@ interface RuntimeConfig extends LocalConfig {
|
|
|
398
365
|
botName: string;
|
|
399
366
|
/** Deployment type (aws, docker, local) */
|
|
400
367
|
deploymentType: 'aws' | 'docker' | 'local' | null;
|
|
401
|
-
/** File ID for the bot's Memory file (null if not created yet) */
|
|
402
|
-
memoryFileId: string | null;
|
|
403
368
|
/** Hour of day (0-23) in local time for the nightly sleep cycle (null = disabled) */
|
|
404
369
|
sleepHour: number | null;
|
|
405
370
|
/** Hour of day (0-23) in local time for the evening dusk planning cycle (null = disabled) */
|