@dotsetlabs/dotclaw 1.5.2 → 1.6.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 (82) hide show
  1. package/README.md +6 -3
  2. package/config-examples/runtime.json +9 -8
  3. package/config-examples/tool-policy.json +6 -0
  4. package/container/agent-runner/package-lock.json +2 -2
  5. package/container/agent-runner/package.json +1 -1
  6. package/container/agent-runner/src/agent-config.ts +6 -13
  7. package/container/agent-runner/src/container-protocol.ts +0 -6
  8. package/container/agent-runner/src/id.ts +4 -0
  9. package/container/agent-runner/src/index.ts +175 -178
  10. package/container/agent-runner/src/ipc.ts +3 -15
  11. package/container/agent-runner/src/prompt-packs.ts +5 -209
  12. package/container/agent-runner/src/tools.ts +6 -5
  13. package/dist/agent-execution.d.ts +0 -6
  14. package/dist/agent-execution.d.ts.map +1 -1
  15. package/dist/agent-execution.js +2 -2
  16. package/dist/agent-execution.js.map +1 -1
  17. package/dist/background-jobs.d.ts +1 -0
  18. package/dist/background-jobs.d.ts.map +1 -1
  19. package/dist/background-jobs.js +18 -3
  20. package/dist/background-jobs.js.map +1 -1
  21. package/dist/behavior-config.d.ts +0 -1
  22. package/dist/behavior-config.d.ts.map +1 -1
  23. package/dist/behavior-config.js +0 -3
  24. package/dist/behavior-config.js.map +1 -1
  25. package/dist/cli.js +294 -41
  26. package/dist/cli.js.map +1 -1
  27. package/dist/config.d.ts +1 -0
  28. package/dist/config.d.ts.map +1 -1
  29. package/dist/config.js +1 -0
  30. package/dist/config.js.map +1 -1
  31. package/dist/container-protocol.d.ts +0 -6
  32. package/dist/container-protocol.d.ts.map +1 -1
  33. package/dist/container-runner.d.ts +5 -0
  34. package/dist/container-runner.d.ts.map +1 -1
  35. package/dist/container-runner.js +44 -2
  36. package/dist/container-runner.js.map +1 -1
  37. package/dist/dashboard.js +1 -1
  38. package/dist/dashboard.js.map +1 -1
  39. package/dist/db.d.ts +19 -1
  40. package/dist/db.d.ts.map +1 -1
  41. package/dist/db.js +130 -28
  42. package/dist/db.js.map +1 -1
  43. package/dist/id.d.ts +2 -0
  44. package/dist/id.d.ts.map +1 -0
  45. package/dist/id.js +4 -0
  46. package/dist/id.js.map +1 -0
  47. package/dist/index.js +152 -272
  48. package/dist/index.js.map +1 -1
  49. package/dist/json-helpers.d.ts +1 -0
  50. package/dist/json-helpers.d.ts.map +1 -1
  51. package/dist/json-helpers.js +33 -1
  52. package/dist/json-helpers.js.map +1 -1
  53. package/dist/maintenance.d.ts +1 -0
  54. package/dist/maintenance.d.ts.map +1 -1
  55. package/dist/maintenance.js +13 -3
  56. package/dist/maintenance.js.map +1 -1
  57. package/dist/memory-embeddings.d.ts +1 -0
  58. package/dist/memory-embeddings.d.ts.map +1 -1
  59. package/dist/memory-embeddings.js +10 -1
  60. package/dist/memory-embeddings.js.map +1 -1
  61. package/dist/memory-store.d.ts.map +1 -1
  62. package/dist/memory-store.js +2 -1
  63. package/dist/memory-store.js.map +1 -1
  64. package/dist/metrics.d.ts +1 -0
  65. package/dist/metrics.d.ts.map +1 -1
  66. package/dist/metrics.js +16 -2
  67. package/dist/metrics.js.map +1 -1
  68. package/dist/paths.d.ts +4 -2
  69. package/dist/paths.d.ts.map +1 -1
  70. package/dist/paths.js +4 -2
  71. package/dist/paths.js.map +1 -1
  72. package/dist/runtime-config.d.ts +4 -7
  73. package/dist/runtime-config.d.ts.map +1 -1
  74. package/dist/runtime-config.js +13 -16
  75. package/dist/runtime-config.js.map +1 -1
  76. package/dist/task-scheduler.d.ts +1 -0
  77. package/dist/task-scheduler.d.ts.map +1 -1
  78. package/dist/task-scheduler.js +10 -1
  79. package/dist/task-scheduler.js.map +1 -1
  80. package/dist/types.d.ts +14 -0
  81. package/dist/types.d.ts.map +1 -1
  82. package/package.json +6 -1
package/README.md CHANGED
@@ -45,9 +45,6 @@ After installation, use the `dotclaw` CLI:
45
45
  ```bash
46
46
  dotclaw setup # Full setup (init + configure + build + install service)
47
47
  dotclaw configure # Re-configure API keys and model
48
- dotclaw add-instance # Create and start an isolated instance
49
- dotclaw instances # List discovered instances
50
- dotclaw build # Build the Docker container image
51
48
  dotclaw start # Start the service
52
49
  dotclaw stop # Stop the service
53
50
  dotclaw restart # Restart the service
@@ -55,6 +52,12 @@ dotclaw logs # View logs (add --follow to tail)
55
52
  dotclaw status # Show service status
56
53
  dotclaw doctor # Run diagnostics
57
54
  dotclaw register # Register a new Telegram chat
55
+ dotclaw unregister # Remove a registered Telegram chat
56
+ dotclaw groups # List registered Telegram chats
57
+ dotclaw build # Build the Docker container image
58
+ dotclaw add-instance # Create and start an isolated instance
59
+ dotclaw instances # List discovered instances
60
+ dotclaw version # Show installed version
58
61
  ```
59
62
 
60
63
  Instance flags:
@@ -10,7 +10,8 @@
10
10
  "enabled": true
11
11
  },
12
12
  "dashboard": {
13
- "enabled": true
13
+ "enabled": true,
14
+ "port": 3002
14
15
  },
15
16
  "memory": {
16
17
  "embeddings": {
@@ -54,9 +55,9 @@
54
55
  "maxFastChars": 200,
55
56
  "maxStandardChars": 1200,
56
57
  "backgroundMinChars": 2000,
57
- "fastKeywords": ["hi", "hello", "hey", "who are you", "what can you do"],
58
- "deepKeywords": ["research", "analysis", "report", "dashboard", "refactor", "architecture", "design"],
59
- "backgroundKeywords": ["background", "long-running", "research", "dashboard", "refactor", "report"],
58
+ "fastKeywords": ["hi", "hello", "hey", "who are you", "what can you do", "help", "thanks", "thank you"],
59
+ "deepKeywords": ["research", "analysis", "analyze", "report", "dashboard", "vibe", "refactor", "architecture", "design", "spec", "strategy", "migration", "benchmark", "investigate", "evaluate", "summarize", "long-running"],
60
+ "backgroundKeywords": ["background", "long-running", "research", "deep dive", "multi-step", "multi step", "dashboard", "refactor", "benchmark", "report", "analysis", "survey", "crawl", "scrape", "codebase"],
60
61
  "classifierFallback": {
61
62
  "enabled": true,
62
63
  "minChars": 600
@@ -74,7 +75,7 @@
74
75
  "profiles": {
75
76
  "fast": {
76
77
  "model": "openai/gpt-5-nano",
77
- "maxOutputTokens": 256,
78
+ "maxOutputTokens": 4096,
78
79
  "maxToolSteps": 6,
79
80
  "recallMaxResults": 0,
80
81
  "recallMaxTokens": 0,
@@ -87,7 +88,7 @@
87
88
  },
88
89
  "standard": {
89
90
  "model": "openai/gpt-5-mini",
90
- "maxOutputTokens": 768,
91
+ "maxOutputTokens": 4096,
91
92
  "maxToolSteps": 16,
92
93
  "recallMaxResults": 6,
93
94
  "recallMaxTokens": 1500,
@@ -99,7 +100,7 @@
99
100
  },
100
101
  "deep": {
101
102
  "model": "moonshotai/kimi-k2.5",
102
- "maxOutputTokens": 1536,
103
+ "maxOutputTokens": 4096,
103
104
  "maxToolSteps": 32,
104
105
  "recallMaxResults": 12,
105
106
  "recallMaxTokens": 2500,
@@ -111,7 +112,7 @@
111
112
  },
112
113
  "background": {
113
114
  "model": "moonshotai/kimi-k2.5",
114
- "maxOutputTokens": 2048,
115
+ "maxOutputTokens": 4096,
115
116
  "maxToolSteps": 64,
116
117
  "recallMaxResults": 16,
117
118
  "recallMaxTokens": 4000,
@@ -14,11 +14,17 @@
14
14
  "Python",
15
15
  "mcp__dotclaw__send_message",
16
16
  "mcp__dotclaw__schedule_task",
17
+ "mcp__dotclaw__run_task",
17
18
  "mcp__dotclaw__list_tasks",
18
19
  "mcp__dotclaw__pause_task",
19
20
  "mcp__dotclaw__resume_task",
20
21
  "mcp__dotclaw__cancel_task",
21
22
  "mcp__dotclaw__update_task",
23
+ "mcp__dotclaw__spawn_job",
24
+ "mcp__dotclaw__job_status",
25
+ "mcp__dotclaw__list_jobs",
26
+ "mcp__dotclaw__cancel_job",
27
+ "mcp__dotclaw__job_update",
22
28
  "mcp__dotclaw__register_group",
23
29
  "mcp__dotclaw__remove_group",
24
30
  "mcp__dotclaw__list_groups",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "dotclaw-agent-runner",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "dotclaw-agent-runner",
9
- "version": "1.5.2",
9
+ "version": "1.6.0",
10
10
  "dependencies": {
11
11
  "@openrouter/sdk": "^0.3.0",
12
12
  "cron-parser": "^5.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotclaw-agent-runner",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "description": "Container-side agent runner for DotClaw",
6
6
  "main": "dist/index.js",
@@ -103,10 +103,6 @@ export type AgentRuntimeConfig = {
103
103
  tools: string[];
104
104
  };
105
105
  };
106
- streaming: {
107
- minIntervalMs: number;
108
- minChars: number;
109
- };
110
106
  ipc: {
111
107
  requestTimeoutMs: number;
112
108
  requestPollMs: number;
@@ -143,7 +139,7 @@ const DEFAULT_AGENT_CONFIG: AgentRuntimeConfig['agent'] = {
143
139
  recentContextTokens: 8000,
144
140
  summaryUpdateEveryMessages: 20,
145
141
  maxOutputTokens: 1024,
146
- summaryMaxOutputTokens: 600,
142
+ summaryMaxOutputTokens: 2048,
147
143
  temperature: 0.2,
148
144
  maxContextMessageTokens: 3000
149
145
  },
@@ -154,7 +150,7 @@ const DEFAULT_AGENT_CONFIG: AgentRuntimeConfig['agent'] = {
154
150
  enabled: true,
155
151
  async: true,
156
152
  maxMessages: 4,
157
- maxOutputTokens: 200
153
+ maxOutputTokens: 1024
158
154
  },
159
155
  archiveSync: true,
160
156
  extractScheduled: false
@@ -171,12 +167,12 @@ const DEFAULT_AGENT_CONFIG: AgentRuntimeConfig['agent'] = {
171
167
  mode: 'auto',
172
168
  minTokens: 800,
173
169
  triggerRegex: '(plan|steps|roadmap|research|design|architecture|spec|strategy)',
174
- maxOutputTokens: 200,
170
+ maxOutputTokens: 1024,
175
171
  temperature: 0.2
176
172
  },
177
173
  responseValidation: {
178
174
  enabled: true,
179
- maxOutputTokens: 120,
175
+ maxOutputTokens: 1024,
180
176
  temperature: 0,
181
177
  maxRetries: 1,
182
178
  allowToolCalls: false,
@@ -223,10 +219,6 @@ const DEFAULT_AGENT_CONFIG: AgentRuntimeConfig['agent'] = {
223
219
  tools: ['WebFetch']
224
220
  }
225
221
  },
226
- streaming: {
227
- minIntervalMs: 800,
228
- minChars: 120
229
- },
230
222
  ipc: {
231
223
  requestTimeoutMs: 6000,
232
224
  requestPollMs: 150
@@ -275,7 +267,8 @@ function readJson(filePath: string): unknown {
275
267
  const raw = fs.readFileSync(filePath, 'utf-8');
276
268
  if (!raw.trim()) return null;
277
269
  return JSON.parse(raw);
278
- } catch {
270
+ } catch (err) {
271
+ console.error(`[agent-runner] Failed to load config ${filePath}: ${err instanceof Error ? err.message : String(err)}`);
279
272
  return null;
280
273
  }
281
274
  }
@@ -45,12 +45,6 @@ export interface ContainerInput {
45
45
  disableResponseValidation?: boolean;
46
46
  responseValidationMaxRetries?: number;
47
47
  disableMemoryExtraction?: boolean;
48
- streaming?: {
49
- enabled?: boolean;
50
- draftId?: number;
51
- minIntervalMs?: number;
52
- minChars?: number;
53
- };
54
48
  }
55
49
 
56
50
  export interface ContainerOutput {
@@ -0,0 +1,4 @@
1
+ export function generateId(prefix: string): string {
2
+ if (!prefix) return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
3
+ return `${prefix}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
4
+ }