@desplega.ai/agent-swarm 1.89.0 → 1.91.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 (63) hide show
  1. package/README.md +4 -0
  2. package/openapi.json +74 -1
  3. package/package.json +6 -6
  4. package/plugin/skills/composio/SKILL.md +138 -63
  5. package/plugin/skills/composio-gmail/SKILL.md +83 -0
  6. package/plugin/skills/composio-google-calendar/SKILL.md +81 -0
  7. package/plugin/skills/composio-google-docs/SKILL.md +71 -0
  8. package/src/artifact-sdk/server.ts +2 -1
  9. package/src/be/db.ts +28 -0
  10. package/src/be/memory/providers/sqlite-store.ts +6 -1
  11. package/src/be/memory/types.ts +1 -0
  12. package/src/be/modelsdev-cache.json +752 -81
  13. package/src/be/scripts/typecheck.ts +132 -1
  14. package/src/be/seed-scripts/catalog/compound-insights.ts +188 -0
  15. package/src/be/seed-scripts/catalog/schedule-health.ts +73 -0
  16. package/src/be/seed-scripts/catalog/smart-recall.ts +65 -0
  17. package/src/be/seed-scripts/catalog/tool-usage.ts +56 -0
  18. package/src/be/seed-scripts/index.ts +36 -0
  19. package/src/commands/artifact.ts +3 -2
  20. package/src/commands/profile-sync.ts +310 -0
  21. package/src/commands/runner.ts +91 -1
  22. package/src/heartbeat/heartbeat.ts +54 -7
  23. package/src/hooks/hook.ts +32 -9
  24. package/src/http/index.ts +47 -0
  25. package/src/http/integrations.ts +6 -1
  26. package/src/http/mcp-bridge.ts +117 -0
  27. package/src/http/mcp-oauth.ts +97 -39
  28. package/src/http/memory.ts +5 -2
  29. package/src/http/openapi.ts +2 -2
  30. package/src/http/pages-public.ts +10 -11
  31. package/src/http/pages.ts +7 -11
  32. package/src/http/scripts.ts +24 -1
  33. package/src/http/tasks.ts +2 -0
  34. package/src/http/utils.ts +11 -4
  35. package/src/jira/app.ts +2 -3
  36. package/src/jira/webhook-lifecycle.ts +2 -1
  37. package/src/linear/app.ts +2 -3
  38. package/src/providers/claude-adapter.ts +26 -0
  39. package/src/scripts-runtime/executors/native.ts +1 -0
  40. package/src/scripts-runtime/sdk-allowlist.ts +121 -0
  41. package/src/scripts-runtime/swarm-sdk.ts +198 -3
  42. package/src/scripts-runtime/types/stdlib.d.ts +227 -0
  43. package/src/scripts-runtime/types/swarm-sdk.d.ts +227 -0
  44. package/src/tasks/worker-follow-up.ts +19 -1
  45. package/src/tests/claude-adapter-otel.test.ts +85 -1
  46. package/src/tests/heartbeat-supersede-resume.test.ts +91 -1
  47. package/src/tests/hook-registration-nudge.test.ts +69 -0
  48. package/src/tests/mcp-oauth-manual-client.test.ts +213 -0
  49. package/src/tests/pages-public-html.test.ts +41 -0
  50. package/src/tests/pages-public-json-redirect.test.ts +37 -2
  51. package/src/tests/profile-sync.test.ts +282 -0
  52. package/src/tests/scripts-runtime.test.ts +33 -0
  53. package/src/tests/seed-scripts.test.ts +2 -2
  54. package/src/tools/create-metric.ts +2 -3
  55. package/src/tools/create-page.ts +3 -6
  56. package/src/tools/memory-rate.ts +2 -1
  57. package/src/tools/memory-search.ts +1 -0
  58. package/src/tools/register-kapso-number.ts +2 -4
  59. package/src/tools/request-human-input.ts +2 -1
  60. package/src/tools/script-common.ts +2 -4
  61. package/src/tools/script-run.ts +7 -0
  62. package/src/utils/constants.ts +58 -8
  63. package/templates/skills/swarm-scripts/content.md +46 -7
@@ -1,6 +1,7 @@
1
1
  import { Hono } from "hono";
2
2
  import { serveStatic } from "hono/bun";
3
3
  import { getApiKey } from "../utils/api-key";
4
+ import { getMcpBaseUrl } from "../utils/constants";
4
5
  import { BROWSER_SDK_JS } from "./browser-sdk";
5
6
  import { getAvailablePort } from "./port";
6
7
  import { createTunnel } from "./tunnel";
@@ -47,7 +48,7 @@ export function createBunHonoFetchHandler(app: Hono): (req: Request) => Promise<
47
48
  export function createArtifactServer(opts: ArtifactServerOptions): ArtifactServer {
48
49
  const agentId = process.env.AGENT_ID || "unknown";
49
50
  const apiKey = getApiKey();
50
- const mcpBaseUrl = process.env.MCP_BASE_URL || `http://localhost:${process.env.PORT || "3013"}`;
51
+ const mcpBaseUrl = getMcpBaseUrl();
51
52
 
52
53
  const app = new Hono();
53
54
 
package/src/be/db.ts CHANGED
@@ -2198,6 +2198,34 @@ export function supersedeTask(
2198
2198
  return row ? rowToAgentTask(row) : null;
2199
2199
  }
2200
2200
 
2201
+ export function backfillSupersedeTaskResumeTaskId(taskId: string, resumeTaskId: string): boolean {
2202
+ const row = getDb()
2203
+ .prepare<{ id: string; metadata: string | null }, [string]>(
2204
+ `SELECT id, metadata
2205
+ FROM agent_log
2206
+ WHERE taskId = ? AND eventType = 'task_superseded'
2207
+ ORDER BY createdAt DESC
2208
+ LIMIT 1`,
2209
+ )
2210
+ .get(taskId);
2211
+ if (!row) return false;
2212
+
2213
+ let metadata: Record<string, unknown> = {};
2214
+ if (row.metadata) {
2215
+ try {
2216
+ metadata = JSON.parse(row.metadata) as Record<string, unknown>;
2217
+ } catch {
2218
+ metadata = {};
2219
+ }
2220
+ }
2221
+ metadata.resumeTaskId = resumeTaskId;
2222
+
2223
+ const result = getDb()
2224
+ .prepare("UPDATE agent_log SET metadata = ? WHERE id = ?")
2225
+ .run(JSON.stringify(metadata), row.id);
2226
+ return result.changes > 0;
2227
+ }
2228
+
2201
2229
  /**
2202
2230
  * Pause a task that is currently in progress.
2203
2231
  * Used during graceful shutdown to allow tasks to resume after container restart.
@@ -383,7 +383,7 @@ export class SqliteMemoryStore implements MemoryStore {
383
383
  }
384
384
 
385
385
  list(agentId: string, options: MemoryListOptions = {}): AgentMemory[] {
386
- const { scope = "all", limit = 20, offset = 0, isLead = false } = options;
386
+ const { scope = "all", limit = 20, offset = 0, isLead = false, source } = options;
387
387
  const db = getDb();
388
388
 
389
389
  const conditions: string[] = [];
@@ -407,6 +407,11 @@ export class SqliteMemoryStore implements MemoryStore {
407
407
  }
408
408
  }
409
409
 
410
+ if (source) {
411
+ conditions.push("source = ?");
412
+ params.push(source);
413
+ }
414
+
410
415
  const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
411
416
  params.push(limit, offset);
412
417
 
@@ -70,6 +70,7 @@ export interface MemoryListOptions {
70
70
  limit?: number;
71
71
  offset?: number;
72
72
  isLead?: boolean;
73
+ source?: AgentMemorySource;
73
74
  }
74
75
 
75
76
  export interface MemoryStats {