@dotsetlabs/dotclaw 2.0.0 → 2.1.0

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.
Files changed (101) hide show
  1. package/README.md +2 -4
  2. package/config-examples/runtime.json +16 -122
  3. package/config-examples/tool-policy.json +2 -15
  4. package/container/agent-runner/src/agent-config.ts +9 -43
  5. package/container/agent-runner/src/container-protocol.ts +3 -10
  6. package/container/agent-runner/src/index.ts +207 -453
  7. package/container/agent-runner/src/ipc.ts +0 -62
  8. package/container/agent-runner/src/tools.ts +2 -260
  9. package/dist/agent-execution.d.ts +4 -10
  10. package/dist/agent-execution.d.ts.map +1 -1
  11. package/dist/agent-execution.js +14 -22
  12. package/dist/agent-execution.js.map +1 -1
  13. package/dist/config.d.ts +1 -2
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +1 -2
  16. package/dist/config.js.map +1 -1
  17. package/dist/container-protocol.d.ts +3 -10
  18. package/dist/container-protocol.d.ts.map +1 -1
  19. package/dist/dashboard.d.ts +0 -6
  20. package/dist/dashboard.d.ts.map +1 -1
  21. package/dist/dashboard.js +1 -55
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/db.d.ts +1 -46
  24. package/dist/db.d.ts.map +1 -1
  25. package/dist/db.js +0 -192
  26. package/dist/db.js.map +1 -1
  27. package/dist/error-messages.d.ts.map +1 -1
  28. package/dist/error-messages.js +5 -1
  29. package/dist/error-messages.js.map +1 -1
  30. package/dist/index.js +6 -52
  31. package/dist/index.js.map +1 -1
  32. package/dist/ipc-dispatcher.d.ts.map +1 -1
  33. package/dist/ipc-dispatcher.js +0 -183
  34. package/dist/ipc-dispatcher.js.map +1 -1
  35. package/dist/maintenance.d.ts.map +1 -1
  36. package/dist/maintenance.js +3 -13
  37. package/dist/maintenance.js.map +1 -1
  38. package/dist/message-pipeline.d.ts +1 -1
  39. package/dist/message-pipeline.d.ts.map +1 -1
  40. package/dist/message-pipeline.js +146 -370
  41. package/dist/message-pipeline.js.map +1 -1
  42. package/dist/metrics.d.ts +0 -3
  43. package/dist/metrics.d.ts.map +1 -1
  44. package/dist/metrics.js +2 -33
  45. package/dist/metrics.js.map +1 -1
  46. package/dist/providers/discord/discord-provider.d.ts.map +1 -1
  47. package/dist/providers/discord/discord-provider.js +6 -3
  48. package/dist/providers/discord/discord-provider.js.map +1 -1
  49. package/dist/request-router.d.ts +9 -31
  50. package/dist/request-router.d.ts.map +1 -1
  51. package/dist/request-router.js +12 -128
  52. package/dist/request-router.js.map +1 -1
  53. package/dist/runtime-config.d.ts +15 -101
  54. package/dist/runtime-config.d.ts.map +1 -1
  55. package/dist/runtime-config.js +37 -159
  56. package/dist/runtime-config.js.map +1 -1
  57. package/dist/streaming.d.ts +58 -0
  58. package/dist/streaming.d.ts.map +1 -0
  59. package/dist/streaming.js +196 -0
  60. package/dist/streaming.js.map +1 -0
  61. package/dist/task-scheduler.d.ts.map +1 -1
  62. package/dist/task-scheduler.js +9 -47
  63. package/dist/task-scheduler.js.map +1 -1
  64. package/dist/tool-policy.d.ts.map +1 -1
  65. package/dist/tool-policy.js +0 -10
  66. package/dist/tool-policy.js.map +1 -1
  67. package/dist/types.d.ts +0 -41
  68. package/dist/types.d.ts.map +1 -1
  69. package/package.json +1 -2
  70. package/scripts/configure.js +81 -0
  71. package/scripts/install.sh +1 -1
  72. package/config-examples/plugin-http.json +0 -18
  73. package/container/skills/agent-browser.md +0 -159
  74. package/dist/background-job-classifier.d.ts +0 -20
  75. package/dist/background-job-classifier.d.ts.map +0 -1
  76. package/dist/background-job-classifier.js +0 -145
  77. package/dist/background-job-classifier.js.map +0 -1
  78. package/dist/background-jobs.d.ts +0 -56
  79. package/dist/background-jobs.d.ts.map +0 -1
  80. package/dist/background-jobs.js +0 -559
  81. package/dist/background-jobs.js.map +0 -1
  82. package/dist/orchestration.d.ts +0 -39
  83. package/dist/orchestration.d.ts.map +0 -1
  84. package/dist/orchestration.js +0 -136
  85. package/dist/orchestration.js.map +0 -1
  86. package/dist/planner-probe.d.ts +0 -14
  87. package/dist/planner-probe.d.ts.map +0 -1
  88. package/dist/planner-probe.js +0 -97
  89. package/dist/planner-probe.js.map +0 -1
  90. package/dist/tool-intent-probe.d.ts +0 -11
  91. package/dist/tool-intent-probe.d.ts.map +0 -1
  92. package/dist/tool-intent-probe.js +0 -63
  93. package/dist/tool-intent-probe.js.map +0 -1
  94. package/dist/workflow-engine.d.ts +0 -51
  95. package/dist/workflow-engine.d.ts.map +0 -1
  96. package/dist/workflow-engine.js +0 -281
  97. package/dist/workflow-engine.js.map +0 -1
  98. package/dist/workflow-store.d.ts +0 -39
  99. package/dist/workflow-store.d.ts.map +0 -1
  100. package/dist/workflow-store.js +0 -173
  101. package/dist/workflow-store.js.map +0 -1
package/README.md CHANGED
@@ -11,12 +11,10 @@ Personal OpenRouter-based assistant for Telegram and Discord. Each request runs
11
11
  - Voice transcription and text-to-speech
12
12
  - Browser automation (Chromium in-container)
13
13
  - MCP server integration (stdio transport)
14
- - Lifecycle hooks (message, agent, job, task, memory events)
15
- - Multi-agent orchestration (parallel fan-out with aggregation)
16
- - Declarative YAML/JSON workflows (multi-step pipelines)
14
+ - Lifecycle hooks (message, agent, task, memory events)
15
+ - Real-time streaming responses with edit-in-place delivery
17
16
  - Long-term memory with embeddings and semantic search
18
17
  - Scheduled tasks (cron and one-off)
19
- - Background jobs for long-running work
20
18
  - Tool policies and daily budgets
21
19
  - Plugin tools and Autotune optimization
22
20
  - Prometheus-compatible metrics and status dashboard
@@ -19,114 +19,20 @@
19
19
  "enabled": true
20
20
  }
21
21
  },
22
- "backgroundJobs": {
23
- "enabled": true,
24
- "maxConcurrent": 2,
25
- "maxRuntimeMs": 2400000,
26
- "maxToolSteps": 256,
27
- "toolDeny": ["mcp__dotclaw__spawn_job"],
28
- "progress": {
29
- "enabled": false,
30
- "startDelayMs": 30000,
31
- "intervalMs": 120000,
32
- "maxUpdates": 3
33
- },
34
- "autoSpawn": {
35
- "enabled": true,
36
- "foregroundTimeoutMs": 90000,
37
- "onTimeout": true,
38
- "onToolLimit": true,
39
- "classifier": {
40
- "enabled": true,
41
- "model": "deepseek/deepseek-v3.2",
42
- "timeoutMs": 3000,
43
- "maxOutputTokens": 32,
44
- "temperature": 0,
45
- "confidenceThreshold": 0.6,
46
- "adaptive": {
47
- "enabled": true,
48
- "minThreshold": 0.55,
49
- "maxThreshold": 0.65,
50
- "queueDepthLow": 0,
51
- "queueDepthHigh": 4
52
- }
53
- }
54
- }
55
- },
56
22
  "routing": {
23
+ "model": "moonshotai/kimi-k2.5",
24
+ "fallbacks": ["anthropic/claude-sonnet-4-5", "openai/gpt-4.1"],
25
+ "maxOutputTokens": 4096,
26
+ "maxToolSteps": 50,
27
+ "temperature": 0.2,
28
+ "recallMaxResults": 8,
29
+ "recallMaxTokens": 1500
30
+ },
31
+ "streaming": {
57
32
  "enabled": true,
58
- "maxFastChars": 200,
59
- "maxStandardChars": 1200,
60
- "backgroundMinChars": 2000,
61
- "fastKeywords": ["hi", "hello", "hey", "who are you", "what can you do", "help", "thanks", "thank you"],
62
- "deepKeywords": ["research", "analysis", "analyze", "report", "dashboard", "vibe", "refactor", "architecture", "design", "spec", "strategy", "migration", "benchmark", "investigate", "evaluate", "summarize", "long-running"],
63
- "backgroundKeywords": ["background", "long-running", "research", "deep dive", "multi-step", "multi step", "dashboard", "refactor", "benchmark", "report", "analysis", "survey", "crawl", "scrape", "codebase"],
64
- "classifierFallback": {
65
- "enabled": true,
66
- "minChars": 600
67
- },
68
- "plannerProbe": {
69
- "enabled": true,
70
- "model": "deepseek/deepseek-v3.2",
71
- "timeoutMs": 3000,
72
- "maxOutputTokens": 120,
73
- "temperature": 0,
74
- "minChars": 700,
75
- "minSteps": 4,
76
- "minTools": 3
77
- },
78
- "profiles": {
79
- "fast": {
80
- "model": "deepseek/deepseek-v3.2",
81
- "maxOutputTokens": 4096,
82
- "maxToolSteps": 12,
83
- "recallMaxResults": 0,
84
- "recallMaxTokens": 0,
85
- "enablePlanner": false,
86
- "enableValidation": false,
87
- "responseValidationMaxRetries": 0,
88
- "enableMemoryRecall": false,
89
- "enableMemoryExtraction": false,
90
- "progress": { "enabled": false }
91
- },
92
- "standard": {
93
- "model": "moonshotai/kimi-k2.5",
94
- "maxOutputTokens": 4096,
95
- "maxToolSteps": 48,
96
- "recallMaxResults": 6,
97
- "recallMaxTokens": 1500,
98
- "enablePlanner": true,
99
- "enableValidation": true,
100
- "responseValidationMaxRetries": 1,
101
- "enableMemoryRecall": true,
102
- "enableMemoryExtraction": true
103
- },
104
- "deep": {
105
- "model": "moonshotai/kimi-k2.5",
106
- "maxOutputTokens": 4096,
107
- "maxToolSteps": 128,
108
- "recallMaxResults": 12,
109
- "recallMaxTokens": 2500,
110
- "enablePlanner": true,
111
- "enableValidation": true,
112
- "responseValidationMaxRetries": 2,
113
- "enableMemoryRecall": true,
114
- "enableMemoryExtraction": true
115
- },
116
- "background": {
117
- "model": "moonshotai/kimi-k2.5",
118
- "maxOutputTokens": 4096,
119
- "maxToolSteps": 256,
120
- "recallMaxResults": 16,
121
- "recallMaxTokens": 4000,
122
- "enablePlanner": true,
123
- "enableValidation": true,
124
- "responseValidationMaxRetries": 2,
125
- "enableMemoryRecall": true,
126
- "enableMemoryExtraction": true,
127
- "progress": { "enabled": true, "initialMs": 15000, "intervalMs": 60000, "maxUpdates": 3 }
128
- }
129
- }
33
+ "chunkFlushIntervalMs": 200,
34
+ "editIntervalMs": 400,
35
+ "maxEditLength": 3800
130
36
  },
131
37
  "toolBudgets": {
132
38
  "enabled": false
@@ -134,26 +40,14 @@
134
40
  },
135
41
  "agent": {
136
42
  "assistantName": "Rain",
43
+ "reasoning": { "effort": "low" },
137
44
  "promptPacks": {
138
45
  "enabled": true
139
46
  },
140
- "planner": {
141
- "enabled": true,
142
- "mode": "auto"
143
- },
144
- "responseValidation": {
145
- "enabled": true,
146
- "minPromptTokens": 400,
147
- "minResponseTokens": 160
148
- },
149
47
  "tools": {
150
- "progress": {
151
- "enabled": true,
152
- "minIntervalMs": 30000,
153
- "notifyTools": [],
154
- "notifyOnStart": false,
155
- "notifyOnError": false
156
- }
48
+ "enableBash": true,
49
+ "enableWebSearch": true,
50
+ "enableWebFetch": true
157
51
  }
158
52
  }
159
53
  }
@@ -12,6 +12,7 @@
12
12
  "WebFetch",
13
13
  "Bash",
14
14
  "Python",
15
+ "Browser",
15
16
  "mcp__dotclaw__send_message",
16
17
  "mcp__dotclaw__send_file",
17
18
  "mcp__dotclaw__send_photo",
@@ -24,6 +25,7 @@
24
25
  "mcp__dotclaw__edit_message",
25
26
  "mcp__dotclaw__delete_message",
26
27
  "mcp__dotclaw__download_url",
28
+ "mcp__dotclaw__text_to_speech",
27
29
  "mcp__dotclaw__schedule_task",
28
30
  "mcp__dotclaw__run_task",
29
31
  "mcp__dotclaw__list_tasks",
@@ -31,11 +33,6 @@
31
33
  "mcp__dotclaw__resume_task",
32
34
  "mcp__dotclaw__cancel_task",
33
35
  "mcp__dotclaw__update_task",
34
- "mcp__dotclaw__spawn_job",
35
- "mcp__dotclaw__job_status",
36
- "mcp__dotclaw__list_jobs",
37
- "mcp__dotclaw__cancel_job",
38
- "mcp__dotclaw__job_update",
39
36
  "mcp__dotclaw__register_group",
40
37
  "mcp__dotclaw__remove_group",
41
38
  "mcp__dotclaw__list_groups",
@@ -54,15 +51,5 @@
54
51
  "WebFetch": 60
55
52
  },
56
53
  "default_max_per_run": 256
57
- },
58
- "groups": {
59
- "main": {
60
- "allow": ["Bash", "WebSearch", "WebFetch"]
61
- }
62
- },
63
- "users": {
64
- "123456789": {
65
- "deny": ["Bash"]
66
- }
67
54
  }
68
55
  }
@@ -43,26 +43,6 @@ export type AgentRuntimeConfig = {
43
43
  models: {
44
44
  summary: string;
45
45
  memory: string;
46
- planner: string;
47
- responseValidation: string;
48
- toolSummary: string;
49
- };
50
- planner: {
51
- enabled: boolean;
52
- mode: string;
53
- minTokens: number;
54
- triggerRegex: string;
55
- maxOutputTokens: number;
56
- temperature: number;
57
- };
58
- responseValidation: {
59
- enabled: boolean;
60
- maxOutputTokens: number;
61
- temperature: number;
62
- maxRetries: number;
63
- allowToolCalls: boolean;
64
- minPromptTokens: number;
65
- minResponseTokens: number;
66
46
  };
67
47
  tools: {
68
48
  maxToolSteps: number;
@@ -136,6 +116,9 @@ export type AgentRuntimeConfig = {
136
116
  }>;
137
117
  connectionTimeoutMs: number;
138
118
  };
119
+ reasoning: {
120
+ effort: 'off' | 'low' | 'medium' | 'high';
121
+ };
139
122
  skills: {
140
123
  enabled: boolean;
141
124
  maxSkills: number;
@@ -168,7 +151,7 @@ const DEFAULT_AGENT_CONFIG: AgentRuntimeConfig['agent'] = {
168
151
  compactionTriggerTokens: 20_000,
169
152
  recentContextTokens: 8000,
170
153
  summaryUpdateEveryMessages: 20,
171
- maxOutputTokens: 1024,
154
+ maxOutputTokens: 4096,
172
155
  summaryMaxOutputTokens: 2048,
173
156
  temperature: 0.2,
174
157
  maxContextMessageTokens: 3000
@@ -187,30 +170,10 @@ const DEFAULT_AGENT_CONFIG: AgentRuntimeConfig['agent'] = {
187
170
  },
188
171
  models: {
189
172
  summary: 'deepseek/deepseek-v3.2',
190
- memory: 'deepseek/deepseek-v3.2',
191
- planner: 'deepseek/deepseek-v3.2',
192
- responseValidation: 'deepseek/deepseek-v3.2',
193
- toolSummary: 'deepseek/deepseek-v3.2'
194
- },
195
- planner: {
196
- enabled: true,
197
- mode: 'auto',
198
- minTokens: 800,
199
- triggerRegex: '(plan|steps|roadmap|research|design|architecture|spec|strategy)',
200
- maxOutputTokens: 1024,
201
- temperature: 0.2
202
- },
203
- responseValidation: {
204
- enabled: true,
205
- maxOutputTokens: 1024,
206
- temperature: 0,
207
- maxRetries: 1,
208
- allowToolCalls: false,
209
- minPromptTokens: 400,
210
- minResponseTokens: 160
173
+ memory: 'deepseek/deepseek-v3.2'
211
174
  },
212
175
  tools: {
213
- maxToolSteps: 96,
176
+ maxToolSteps: 50,
214
177
  outputLimitBytes: 400_000,
215
178
  enableBash: true,
216
179
  enableWebSearch: true,
@@ -274,6 +237,9 @@ const DEFAULT_AGENT_CONFIG: AgentRuntimeConfig['agent'] = {
274
237
  servers: [],
275
238
  connectionTimeoutMs: 10_000
276
239
  },
240
+ reasoning: {
241
+ effort: 'low',
242
+ },
277
243
  skills: {
278
244
  enabled: true,
279
245
  maxSkills: 32,
@@ -8,10 +8,7 @@ export interface ContainerInput {
8
8
  chatJid: string;
9
9
  isMain: boolean;
10
10
  isScheduledTask?: boolean;
11
- isBackgroundTask?: boolean;
12
- isBackgroundJob?: boolean;
13
11
  taskId?: string;
14
- jobId?: string;
15
12
  userId?: string;
16
13
  userName?: string;
17
14
  maxToolSteps?: number;
@@ -37,16 +34,14 @@ export interface ContainerInput {
37
34
  behaviorConfig?: Record<string, unknown>;
38
35
  toolPolicy?: Record<string, unknown>;
39
36
  modelOverride?: string;
37
+ modelFallbacks?: string[];
38
+ reasoningEffort?: 'off' | 'low' | 'medium' | 'high';
40
39
  modelContextTokens?: number;
41
40
  modelMaxOutputTokens?: number;
42
41
  modelTemperature?: number;
43
42
  timezone?: string;
44
43
  hostPlatform?: string;
45
- disablePlanner?: boolean;
46
- disableResponseValidation?: boolean;
47
- responseValidationMaxRetries?: number;
48
- disableMemoryExtraction?: boolean;
49
- profile?: 'fast' | 'standard' | 'deep' | 'background';
44
+ streamDir?: string;
50
45
  attachments?: Array<{
51
46
  type: 'photo' | 'document' | 'voice' | 'video' | 'audio';
52
47
  path: string;
@@ -76,8 +71,6 @@ export interface ContainerOutput {
76
71
  memory_items_upserted?: number;
77
72
  memory_items_extracted?: number;
78
73
  timings?: {
79
- planner_ms?: number;
80
- response_validation_ms?: number;
81
74
  memory_extraction_ms?: number;
82
75
  tool_ms?: number;
83
76
  };