@desplega.ai/agent-swarm 1.55.0 → 1.56.2
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/package.json +1 -1
- package/src/be/db.ts +9 -1
- package/src/be/migrations/025_workflow_run_cancelled_status.sql +0 -2
- package/src/be/migrations/027_heartbeat_md.sql +1 -0
- package/src/be/migrations/runner.ts +8 -0
- package/src/commands/runner.ts +24 -1
- package/src/heartbeat/heartbeat.ts +201 -92
- package/src/heartbeat/templates.ts +64 -9
- package/src/http/agents.ts +5 -2
- package/src/http/heartbeat.ts +29 -1
- package/src/tests/heartbeat-checklist.test.ts +417 -0
- package/src/tests/heartbeat.test.ts +2 -57
- package/src/tests/prompt-template-remaining.test.ts +1 -1
- package/src/tools/update-profile.ts +21 -3
- package/src/types.ts +3 -0
- package/templates/official/lead/CLAUDE.md +3 -0
- package/templates/official/lead/HEARTBEAT.md +12 -0
- package/templates/official/lead/config.json +2 -1
- package/templates/schema.ts +2 -0
package/src/types.ts
CHANGED
|
@@ -175,6 +175,8 @@ export const AgentSchema = z.object({
|
|
|
175
175
|
setupScript: z.string().max(65536).optional(),
|
|
176
176
|
// Tools/environment reference: Operational knowledge (synced to /workspace/TOOLS.md)
|
|
177
177
|
toolsMd: z.string().max(65536).optional(),
|
|
178
|
+
// Heartbeat checklist: Standing orders checked periodically (synced to /workspace/HEARTBEAT.md)
|
|
179
|
+
heartbeatMd: z.string().max(65536).optional(),
|
|
178
180
|
|
|
179
181
|
// Concurrency limit (defaults to 1 for backwards compatibility)
|
|
180
182
|
maxTasks: z.number().int().min(1).max(20).optional(),
|
|
@@ -218,6 +220,7 @@ export const VersionableFieldSchema = z.enum([
|
|
|
218
220
|
"toolsMd",
|
|
219
221
|
"claudeMd",
|
|
220
222
|
"setupScript",
|
|
223
|
+
"heartbeatMd",
|
|
221
224
|
]);
|
|
222
225
|
|
|
223
226
|
export const ContextVersionSchema = z.object({
|
|
@@ -18,6 +18,9 @@ of each session and edit them as you grow:
|
|
|
18
18
|
|
|
19
19
|
- **`/workspace/SOUL.md`** — Your persona, values, and behavioral directives
|
|
20
20
|
- **`/workspace/IDENTITY.md`** — Your expertise, working style, and quirks
|
|
21
|
+
- **`/workspace/HEARTBEAT.md`** — Your periodic checklist. The system reads this every 30 minutes
|
|
22
|
+
and creates a task for you with system status + your standing orders. Edit to add/remove checks.
|
|
23
|
+
Leave empty (or all comments) to disable periodic checks at zero cost.
|
|
21
24
|
|
|
22
25
|
These files are injected into your system prompt AND available as editable files.
|
|
23
26
|
When you edit them, changes sync to the database automatically. They persist across sessions.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Heartbeat Checklist
|
|
2
|
+
|
|
3
|
+
<!-- Keep this section empty to skip periodic heartbeat checks (no LLM cost). -->
|
|
4
|
+
<!-- Add actionable items below when you want periodic checks. -->
|
|
5
|
+
<!-- The lead agent reads this every 30 minutes and acts on any items found. -->
|
|
6
|
+
|
|
7
|
+
<!-- Examples (uncomment to activate):
|
|
8
|
+
- Check Slack for unaddressed requests older than 1 hour
|
|
9
|
+
- Review active tasks for any that seem stuck or blocked
|
|
10
|
+
- If idle workers exist and unassigned tasks are available, investigate why auto-assignment didn't handle them
|
|
11
|
+
- Post a daily summary to #agent-status at 5pm
|
|
12
|
+
-->
|
package/templates/schema.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface TemplateConfig {
|
|
|
20
20
|
identityMd: string | null;
|
|
21
21
|
toolsMd: string | null;
|
|
22
22
|
setupScript: string | null;
|
|
23
|
+
heartbeatMd: string | null;
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -31,5 +32,6 @@ export interface TemplateResponse {
|
|
|
31
32
|
identityMd: string;
|
|
32
33
|
toolsMd: string;
|
|
33
34
|
setupScript: string;
|
|
35
|
+
heartbeatMd: string;
|
|
34
36
|
};
|
|
35
37
|
}
|