@desplega.ai/agent-swarm 1.92.0 → 1.92.1
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 +1 -1
- package/openapi.json +276 -3
- package/package.json +6 -6
- package/plugin/skills/pages/SKILL.md +5 -2
- package/src/be/db.ts +327 -20
- package/src/be/memory/constants.ts +2 -1
- package/src/be/memory/providers/openai-embedding.ts +2 -5
- package/src/be/memory/providers/sqlite-store.ts +293 -76
- package/src/be/memory/types.ts +35 -0
- package/src/be/migrations/084_script_run_journal_duration.sql +5 -0
- package/src/be/migrations/085_script_runs_kind.sql +9 -0
- package/src/be/migrations/086_pages_default_authed.sql +64 -0
- package/src/be/migrations/087_skill_files.sql +19 -0
- package/src/be/modelsdev-cache.json +264 -328
- package/src/be/seed-scripts/catalog/boot-triage.ts +221 -0
- package/src/be/seed-scripts/catalog/catalog-report.ts +457 -0
- package/src/be/seed-scripts/catalog/compound-insights.ts +94 -0
- package/src/be/seed-scripts/catalog/gh-pr-snapshot.ts +1 -1
- package/src/be/seed-scripts/catalog/memory-eval.ts +1059 -0
- package/src/be/seed-scripts/catalog/ops-catalog-audit.ts +34 -439
- package/src/be/seed-scripts/catalog/schedule-health.ts +78 -2
- package/src/be/seed-scripts/catalog/task-failure-audit.ts +48 -1
- package/src/be/seed-scripts/index.ts +32 -4
- package/src/be/seed-skills/index.ts +0 -7
- package/src/be/skill-sync.ts +91 -7
- package/src/commands/runner.ts +6 -2
- package/src/heartbeat/templates.ts +20 -16
- package/src/http/index.ts +41 -7
- package/src/http/mcp-user.ts +23 -0
- package/src/http/mcp.ts +58 -0
- package/src/http/memory.ts +58 -0
- package/src/http/pages.ts +1 -1
- package/src/http/script-runs.ts +2 -0
- package/src/http/scripts.ts +39 -2
- package/src/http/skills.ts +225 -0
- package/src/providers/claude-adapter.ts +56 -24
- package/src/script-workflows/workflow-ctx.ts +7 -3
- package/src/scripts-runtime/sdk-allowlist.ts +1 -0
- package/src/scripts-runtime/swarm-sdk.ts +13 -0
- package/src/scripts-runtime/types/stdlib.d.ts +1 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +1 -0
- package/src/server.ts +2 -0
- package/src/tests/claude-adapter-binary.test.ts +135 -81
- package/src/tests/create-page-tool.test.ts +19 -2
- package/src/tests/heartbeat-checklist.test.ts +36 -0
- package/src/tests/mcp-transport-gc.test.ts +58 -0
- package/src/tests/memory-health-endpoint.test.ts +78 -0
- package/src/tests/memory-store.test.ts +221 -1
- package/src/tests/pages-http.test.ts +20 -2
- package/src/tests/pages-storage.test.ts +26 -0
- package/src/tests/scripts-mcp-e2e.test.ts +53 -0
- package/src/tests/seed-scripts.test.ts +123 -3
- package/src/tests/skill-files-http.test.ts +171 -0
- package/src/tests/skill-files.test.ts +162 -0
- package/src/tests/skill-get-file-tool.test.ts +110 -0
- package/src/tests/skill-sync.test.ts +125 -6
- package/src/tools/create-page.ts +2 -2
- package/src/tools/skills/index.ts +1 -0
- package/src/tools/skills/skill-get-file.ts +80 -0
- package/src/tools/tool-config.ts +2 -1
- package/src/types.ts +20 -0
- package/src/utils/internal-ai/complete-structured.ts +2 -2
- package/templates/schedules/daily-blocker-digest/content.md +68 -54
- package/templates/schedules/daily-compounding-reflection/content.md +4 -4
- package/templates/schedules/daily-hn-briefing/content.md +5 -5
- package/templates/schedules/daily-workflow-health-audit/content.md +6 -6
- package/templates/schedules/gtm-weekly-review/content.md +9 -9
- package/templates/schedules/weekly-dependabot-triage/content.md +24 -20
- package/templates/skills/agentmail-sending/content.md +6 -7
- package/templates/skills/desloppify/content.md +8 -9
- package/templates/skills/jira-interaction/content.md +25 -33
- package/templates/skills/kapso-whatsapp/content.md +29 -30
- package/templates/skills/linear-interaction/content.md +8 -9
- package/templates/skills/profile-corruption-escalation/content.md +44 -85
- package/templates/skills/sprite-cli/content.md +4 -5
- package/templates/skills/turso-interaction/content.md +14 -17
- package/templates/skills/workflow-iterate/content.md +38 -391
- package/templates/skills/x-api-interactions/content.md +4 -6
- package/templates/skills/scheduled-task-resilience/config.json +0 -14
- package/templates/skills/scheduled-task-resilience/content.md +0 -95
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { publishCatalogReportPage } from "./catalog-report";
|
|
2
3
|
|
|
3
4
|
export const argsSchema = z.object({
|
|
4
5
|
days: z
|
|
@@ -21,6 +22,7 @@ export const argsSchema = z.object({
|
|
|
21
22
|
.boolean()
|
|
22
23
|
.optional()
|
|
23
24
|
.describe("Include per-agent task/completion/failure breakdown (default true)"),
|
|
25
|
+
publishPage: z.boolean().optional().describe("Publish an authed HTML page (default true)"),
|
|
24
26
|
});
|
|
25
27
|
|
|
26
28
|
/**
|
|
@@ -120,6 +122,7 @@ export default async function compoundInsights(args: any, ctx: any) {
|
|
|
120
122
|
const includeMemoryHealth = parsed.data.includeMemoryHealth !== false;
|
|
121
123
|
const includeScriptCandidates = parsed.data.includeScriptCandidates !== false;
|
|
122
124
|
const includeByAgent = parsed.data.includeByAgent !== false;
|
|
125
|
+
const publishPage = parsed.data.publishPage !== false;
|
|
123
126
|
|
|
124
127
|
// `days` is a validated positive int, so it is safe to interpolate into the
|
|
125
128
|
// SQLite datetime modifier. EXCLUDED_FAIL is a fixed constant list.
|
|
@@ -394,5 +397,96 @@ export default async function compoundInsights(args: any, ctx: any) {
|
|
|
394
397
|
}));
|
|
395
398
|
}
|
|
396
399
|
|
|
400
|
+
if (publishPage) {
|
|
401
|
+
const failureFindings = (insights.failureClusters || []).map((cluster: any) => ({
|
|
402
|
+
id: `failure.${String(cluster.reason || "unknown").slice(0, 48)}`,
|
|
403
|
+
severity: cluster.count >= 5 ? "high" : cluster.count >= 2 ? "medium" : "low",
|
|
404
|
+
summary: `${cluster.count} real failure(s): ${cluster.reason}`,
|
|
405
|
+
action: "Review the repeated failure mode and decide whether to fix, retry, or add a temporary watch item.",
|
|
406
|
+
samples: [cluster],
|
|
407
|
+
}));
|
|
408
|
+
const scheduleFindings = (insights.scheduleHealth || []).map((schedule: any) => ({
|
|
409
|
+
id: `schedule.${schedule.id}`,
|
|
410
|
+
severity: schedule.failureRate >= 50 ? "high" : "medium",
|
|
411
|
+
summary: `${schedule.name} has ${schedule.failureRate}% real-failure rate.`,
|
|
412
|
+
action: "Inspect recent schedule tasks and repair, retarget, or disable the schedule.",
|
|
413
|
+
samples: [schedule],
|
|
414
|
+
}));
|
|
415
|
+
const memoryPollution = insights.memoryHealth?.pollution;
|
|
416
|
+
const memoryFindings = memoryPollution?.autoSnapshotPercent
|
|
417
|
+
? [
|
|
418
|
+
{
|
|
419
|
+
id: "memory.auto-snapshot-share",
|
|
420
|
+
severity: memoryPollution.autoSnapshotPercent >= 40 ? "high" : "medium",
|
|
421
|
+
summary: `Automatic snapshots are ${memoryPollution.autoSnapshotPercent}% of memory.`,
|
|
422
|
+
action: "Review memory gates and prune low-use automatic snapshots before adding more.",
|
|
423
|
+
samples: [memoryPollution],
|
|
424
|
+
},
|
|
425
|
+
]
|
|
426
|
+
: [];
|
|
427
|
+
const scriptFindings = (insights.scriptCandidates || []).map((candidate: any) => ({
|
|
428
|
+
id: `script-candidate.${candidate.suggestedName || "unnamed"}`,
|
|
429
|
+
severity: candidate.count >= 3 ? "medium" : "low",
|
|
430
|
+
summary: `${candidate.count} repeated tool triplet(s): ${candidate.tools.join(" -> ")}`,
|
|
431
|
+
action: "Consider turning this repeated workflow into a reusable seeded script.",
|
|
432
|
+
samples: [candidate],
|
|
433
|
+
}));
|
|
434
|
+
|
|
435
|
+
insights.page = await publishCatalogReportPage(
|
|
436
|
+
{
|
|
437
|
+
title: "Compound Insights Audit",
|
|
438
|
+
slug: "compound-insights",
|
|
439
|
+
description: "Swarm-wide daily ops snapshot for compounding and reliability review.",
|
|
440
|
+
generatedAt: insights.generatedAt,
|
|
441
|
+
lede: `Swarm-wide ${days}-day snapshot: ${insights.taskSummary.total} task(s), ${insights.taskSummary.completionRate}% completion rate, ${insights.taskSummary.failureRate}% failure rate.`,
|
|
442
|
+
metrics: [
|
|
443
|
+
["Tasks", insights.taskSummary.total],
|
|
444
|
+
["Completed", insights.taskSummary.completed],
|
|
445
|
+
["Failed", insights.taskSummary.failed],
|
|
446
|
+
["Failure clusters", insights.failureClusters?.length || 0],
|
|
447
|
+
],
|
|
448
|
+
sections: [
|
|
449
|
+
{
|
|
450
|
+
key: "failures",
|
|
451
|
+
goal: "Expose repeated real failure modes without counting bookkeeping noise.",
|
|
452
|
+
findingCount: failureFindings.length,
|
|
453
|
+
checks: insights.taskSummary,
|
|
454
|
+
findings: failureFindings,
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
key: "schedules",
|
|
458
|
+
goal: "Keep schedule failures visible before daily work compounds stale assumptions.",
|
|
459
|
+
findingCount: scheduleFindings.length,
|
|
460
|
+
checks: { unhealthySchedules: scheduleFindings.length },
|
|
461
|
+
findings: scheduleFindings,
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
key: "memory",
|
|
465
|
+
goal: "Detect memory bloat and low-use automatic snapshots.",
|
|
466
|
+
findingCount: memoryFindings.length,
|
|
467
|
+
checks: insights.memoryHealth
|
|
468
|
+
? {
|
|
469
|
+
total: insights.memoryHealth.total,
|
|
470
|
+
autoSnapshotPercent: memoryPollution?.autoSnapshotPercent ?? 0,
|
|
471
|
+
sampledAutoSnapshots:
|
|
472
|
+
memoryPollution?.similarityCheck?.sampledAutoSnapshots ?? 0,
|
|
473
|
+
}
|
|
474
|
+
: {},
|
|
475
|
+
findings: memoryFindings,
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
key: "script-candidates",
|
|
479
|
+
goal: "Find repeated tool chains worth compressing into reusable scripts.",
|
|
480
|
+
findingCount: scriptFindings.length,
|
|
481
|
+
checks: { candidates: scriptFindings.length },
|
|
482
|
+
findings: scriptFindings,
|
|
483
|
+
},
|
|
484
|
+
],
|
|
485
|
+
appendix: insights,
|
|
486
|
+
},
|
|
487
|
+
ctx,
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
397
491
|
return insights;
|
|
398
492
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
export const argsSchema = z.object({
|
|
4
|
-
repo: z.string().describe("Repository in 'owner/name' form, e.g. '
|
|
4
|
+
repo: z.string().describe("Repository in 'owner/name' form, e.g. 'owner/name'"),
|
|
5
5
|
number: z.number().int().positive().describe("Pull request number"),
|
|
6
6
|
token: z
|
|
7
7
|
.string()
|