@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.
- package/README.md +4 -0
- package/openapi.json +74 -1
- package/package.json +6 -6
- package/plugin/skills/composio/SKILL.md +138 -63
- package/plugin/skills/composio-gmail/SKILL.md +83 -0
- package/plugin/skills/composio-google-calendar/SKILL.md +81 -0
- package/plugin/skills/composio-google-docs/SKILL.md +71 -0
- package/src/artifact-sdk/server.ts +2 -1
- package/src/be/db.ts +28 -0
- package/src/be/memory/providers/sqlite-store.ts +6 -1
- package/src/be/memory/types.ts +1 -0
- package/src/be/modelsdev-cache.json +752 -81
- package/src/be/scripts/typecheck.ts +132 -1
- package/src/be/seed-scripts/catalog/compound-insights.ts +188 -0
- package/src/be/seed-scripts/catalog/schedule-health.ts +73 -0
- package/src/be/seed-scripts/catalog/smart-recall.ts +65 -0
- package/src/be/seed-scripts/catalog/tool-usage.ts +56 -0
- package/src/be/seed-scripts/index.ts +36 -0
- package/src/commands/artifact.ts +3 -2
- package/src/commands/profile-sync.ts +310 -0
- package/src/commands/runner.ts +91 -1
- package/src/heartbeat/heartbeat.ts +54 -7
- package/src/hooks/hook.ts +32 -9
- package/src/http/index.ts +47 -0
- package/src/http/integrations.ts +6 -1
- package/src/http/mcp-bridge.ts +117 -0
- package/src/http/mcp-oauth.ts +97 -39
- package/src/http/memory.ts +5 -2
- package/src/http/openapi.ts +2 -2
- package/src/http/pages-public.ts +10 -11
- package/src/http/pages.ts +7 -11
- package/src/http/scripts.ts +24 -1
- package/src/http/tasks.ts +2 -0
- package/src/http/utils.ts +11 -4
- package/src/jira/app.ts +2 -3
- package/src/jira/webhook-lifecycle.ts +2 -1
- package/src/linear/app.ts +2 -3
- package/src/providers/claude-adapter.ts +26 -0
- package/src/scripts-runtime/executors/native.ts +1 -0
- package/src/scripts-runtime/sdk-allowlist.ts +121 -0
- package/src/scripts-runtime/swarm-sdk.ts +198 -3
- package/src/scripts-runtime/types/stdlib.d.ts +227 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +227 -0
- package/src/tasks/worker-follow-up.ts +19 -1
- package/src/tests/claude-adapter-otel.test.ts +85 -1
- package/src/tests/heartbeat-supersede-resume.test.ts +91 -1
- package/src/tests/hook-registration-nudge.test.ts +69 -0
- package/src/tests/mcp-oauth-manual-client.test.ts +213 -0
- package/src/tests/pages-public-html.test.ts +41 -0
- package/src/tests/pages-public-json-redirect.test.ts +37 -2
- package/src/tests/profile-sync.test.ts +282 -0
- package/src/tests/scripts-runtime.test.ts +33 -0
- package/src/tests/seed-scripts.test.ts +2 -2
- package/src/tools/create-metric.ts +2 -3
- package/src/tools/create-page.ts +3 -6
- package/src/tools/memory-rate.ts +2 -1
- package/src/tools/memory-search.ts +1 -0
- package/src/tools/register-kapso-number.ts +2 -4
- package/src/tools/request-human-input.ts +2 -1
- package/src/tools/script-common.ts +2 -4
- package/src/tools/script-run.ts +7 -0
- package/src/utils/constants.ts +58 -8
- 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 =
|
|
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
|
|