@desplega.ai/agent-swarm 1.83.0 → 1.83.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/openapi.json +177 -10
- package/package.json +6 -6
- package/src/artifact-sdk/server.ts +23 -1
- package/src/be/budget-admission.ts +28 -4
- package/src/be/budget-refusal-notify.ts +19 -3
- package/src/be/db-queries/oauth.ts +43 -0
- package/src/be/db.ts +37 -4
- package/src/be/migrations/074_user_budget_scope.sql +85 -0
- package/src/be/schedules/validate.ts +21 -0
- package/src/be/skill-sync.ts +65 -15
- package/src/commands/resume-session.ts +118 -0
- package/src/commands/runner.ts +178 -121
- package/src/http/core.ts +4 -1
- package/src/http/index.ts +16 -0
- package/src/http/integrations.ts +26 -0
- package/src/http/mcp-user.ts +111 -0
- package/src/http/poll.ts +19 -5
- package/src/http/schedules.ts +35 -10
- package/src/http/skills.ts +27 -2
- package/src/http/users.ts +107 -2
- package/src/jira/client.ts +3 -5
- package/src/jira/oauth.ts +1 -0
- package/src/jira/sync.ts +2 -2
- package/src/oauth/ensure-token.ts +1 -0
- package/src/oauth/wrapper.ts +38 -7
- package/src/providers/claude-adapter.ts +7 -2
- package/src/providers/claude-managed-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +30 -0
- package/src/providers/opencode-adapter.ts +149 -14
- package/src/providers/pi-mono-adapter.ts +41 -1
- package/src/providers/types.ts +1 -1
- package/src/server-user.ts +117 -0
- package/src/tests/artifact-sdk.test.ts +23 -19
- package/src/tests/budget-user-scope.test.ts +376 -0
- package/src/tests/claude-managed-adapter.test.ts +6 -0
- package/src/tests/codex-adapter.test.ts +192 -0
- package/src/tests/codex-rate-limit-parse.test.ts +256 -0
- package/src/tests/db-queries-oauth.test.ts +43 -0
- package/src/tests/ensure-token.test.ts +93 -0
- package/src/tests/error-tracker.test.ts +52 -0
- package/src/tests/fetch-resolved-env.test.ts +33 -20
- package/src/tests/http-api-integration.test.ts +36 -0
- package/src/tests/http-users.test.ts +29 -1
- package/src/tests/mcp-user-route.test.ts +325 -0
- package/src/tests/opencode-adapter.test.ts +75 -0
- package/src/tests/pi-mono-adapter.test.ts +21 -1
- package/src/tests/rate-limit-event.test.ts +69 -6
- package/src/tests/resume-session.test.ts +93 -0
- package/src/tests/runner-skills-refresh.test.ts +200 -0
- package/src/tests/schedule-validation-helper.test.ts +51 -0
- package/src/tests/skill-sync.test.ts +73 -9
- package/src/tests/skills-signature.test.ts +141 -0
- package/src/tests/task-tools-ctx.test.ts +100 -0
- package/src/tests/task-tools-ownership.test.ts +167 -0
- package/src/tests/update-schedule-mcp-tool.test.ts +161 -0
- package/src/tests/user-token-routes.test.ts +221 -0
- package/src/tools/cancel-task.ts +137 -83
- package/src/tools/get-task-details.ts +73 -59
- package/src/tools/get-tasks.ts +134 -126
- package/src/tools/schedules/update-schedule.ts +48 -8
- package/src/tools/send-task.ts +312 -312
- package/src/tools/slack-upload-file.ts +17 -5
- package/src/tools/task-action.ts +464 -367
- package/src/tools/task-tool-ctx.ts +43 -0
- package/src/types.ts +6 -2
- package/src/utils/error-tracker.ts +122 -9
- package/src/utils/skills-refresh.ts +123 -0
|
@@ -13,6 +13,13 @@ const WORKSPACE_DIR = "/workspace";
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Resolves a file path to an absolute path and checks if it exists.
|
|
16
|
+
*
|
|
17
|
+
* NOTE: existence is checked on the API server's filesystem (where this tool
|
|
18
|
+
* runs), NOT the caller's. Worker/lead containers have their own `/tmp` that
|
|
19
|
+
* the API server cannot see — the only volume mounted on both is
|
|
20
|
+
* `/workspace/shared/`. Files outside `/workspace/shared/` must be passed
|
|
21
|
+
* inline via the `content` (base64) param instead of `filePath`.
|
|
22
|
+
*
|
|
16
23
|
* Handles several common patterns:
|
|
17
24
|
* 1. Relative paths (e.g., "shared/file.png") -> resolved from /workspace
|
|
18
25
|
* 2. Absolute paths under /workspace (e.g., "/workspace/shared/file.png") -> used as-is
|
|
@@ -110,14 +117,17 @@ export const registerSlackUploadFileTool = (server: McpServer) => {
|
|
|
110
117
|
.optional()
|
|
111
118
|
.describe(
|
|
112
119
|
"Path to the file to upload. Either filePath OR content must be provided. " +
|
|
113
|
-
"
|
|
114
|
-
"
|
|
120
|
+
"IMPORTANT: the file is read on the API server's filesystem (where this tool runs), NOT on the caller's. " +
|
|
121
|
+
"Worker/lead containers do NOT share /tmp or /workspace/personal/ with the API server — the only shared volume is /workspace/shared/. " +
|
|
122
|
+
"Use /workspace/shared/<agent-id>/file.png (or a relative path like 'shared/<agent-id>/file.png'). " +
|
|
123
|
+
"For files that only live on the caller (e.g. /tmp), pass them inline via `content` (base64) instead.",
|
|
115
124
|
),
|
|
116
125
|
content: z
|
|
117
126
|
.string()
|
|
118
127
|
.optional()
|
|
119
128
|
.describe(
|
|
120
|
-
"Base64-encoded file content. Use this when the file
|
|
129
|
+
"Base64-encoded file content. Use this when the file lives on the caller's filesystem and isn't reachable by the API server " +
|
|
130
|
+
"(e.g. anything under /tmp on a worker/lead container). Either filePath OR content must be provided.",
|
|
121
131
|
),
|
|
122
132
|
filename: z
|
|
123
133
|
.string()
|
|
@@ -287,9 +297,11 @@ export const registerSlackUploadFileTool = (server: McpServer) => {
|
|
|
287
297
|
`${pathResult.error}\n` +
|
|
288
298
|
`Provided path: ${filePath}\n` +
|
|
289
299
|
`Tried locations:\n${triedPathsList}\n\n` +
|
|
300
|
+
`Note: this tool reads the file on the API server's filesystem, NOT the caller's. ` +
|
|
301
|
+
`Worker/lead containers do not share /tmp or /workspace/personal/ with the API server — only /workspace/shared/.\n\n` +
|
|
290
302
|
`Tips:\n` +
|
|
291
|
-
`-
|
|
292
|
-
`- Or
|
|
303
|
+
`- Put the file in /workspace/shared/<agent-id>/ (e.g., '/workspace/shared/<agent-id>/my-file.png') and pass that path.\n` +
|
|
304
|
+
`- Or pass the file inline via the \`content\` arg as base64 (with \`filename\`) so no shared-mount round-trip is needed.`;
|
|
293
305
|
return {
|
|
294
306
|
content: [{ type: "text", text: errorMsg }],
|
|
295
307
|
structuredContent: { success: false, message: errorMsg },
|