@desplega.ai/agent-swarm 1.114.0 → 1.115.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/dist/{actions-bm8vdxys.js → actions-17ya5wde.js} +6 -6
- package/dist/{app-bhwdxmvp.js → app-4f718yk0.js} +4 -4
- package/dist/{assistant-15mp2apr.js → assistant-ah7csnjz.js} +9 -9
- package/dist/{boot-reembed-awr2179r.js → boot-reembed-4jpxhb25.js} +4 -4
- package/dist/{boot-reembed-b9sbk87z.js → boot-reembed-qata34xa.js} +3 -3
- package/dist/{boot-scrub-logs-c1zsaw9m.js → boot-scrub-logs-tv48nn3z.js} +2 -2
- package/dist/{claude-adapter-2k45y7p7.js → claude-adapter-3csn5bks.js} +2 -2
- package/dist/{cli-zmmp2r79.js → cli-12vb0xg6.js} +13 -2
- package/dist/{cli-jzwtn8rm.js → cli-15y7qhzp.js} +188 -18
- package/dist/{cli-w3nq88yc.js → cli-3samkyap.js} +2 -2
- package/dist/{cli-7rgh0w0k.js → cli-52fg7s7x.js} +10 -3
- package/dist/{cli-5afkmcfj.js → cli-65ekje01.js} +6 -6
- package/dist/{cli-113wmegp.js → cli-6aq8xhvm.js} +1 -1
- package/dist/{cli-byjcad11.js → cli-7xje5amz.js} +1 -1
- package/dist/{cli-0kgcv878.js → cli-86fdnerz.js} +63 -2
- package/dist/{cli-f5pzfvwb.js → cli-b23axgz4.js} +1 -1
- package/dist/{cli-a0t7vapf.js → cli-bc89my0z.js} +1 -1
- package/dist/{cli-q4e2x252.js → cli-beea4a3y.js} +73 -24
- package/dist/{cli-w4wk3kx6.js → cli-cchksf5q.js} +2 -2
- package/dist/{cli-f9n2jg31.js → cli-cmw9rzy5.js} +2 -2
- package/dist/{cli-hvg05qwm.js → cli-cnwssmsr.js} +1 -1
- package/dist/{cli-2t4e4ayk.js → cli-dcca6j8m.js} +46 -5
- package/dist/{cli-tkmm5nf9.js → cli-e61fs2hp.js} +59 -2
- package/dist/{cli-e2xbxmhd.js → cli-hrhye2rm.js} +90 -32
- package/dist/{cli-312v3c41.js → cli-k3y4z3h5.js} +1 -1
- package/dist/{cli-6xd0bvf8.js → cli-ma04faw5.js} +1 -1
- package/dist/{cli-ggy8c7tk.js → cli-mnbgv3w7.js} +1 -1
- package/dist/{cli-hq39e630.js → cli-pet3aev6.js} +95 -10
- package/dist/{cli-a6tzw6vq.js → cli-q1rx7g0d.js} +6 -6
- package/dist/{cli-pnfyyp6h.js → cli-r9f6ngrf.js} +6 -3
- package/dist/{cli-q1z5d5ss.js → cli-shvaxw27.js} +4 -4
- package/dist/{cli-49j095n9.js → cli-t0vqevnm.js} +1 -1
- package/dist/{cli-k6h2zkw3.js → cli-tece6zgm.js} +1 -1
- package/dist/{cli-5ktc9fd4.js → cli-tffvrh6j.js} +1 -1
- package/dist/cli-wh91zby6.js +187222 -0
- package/dist/{cli-r3mtrrzp.js → cli-zsrdty74.js} +12 -12
- package/dist/cli.js +10 -10
- package/dist/{codex-adapter-4z8m9mb5.js → codex-adapter-de3w0nch.js} +2 -2
- package/dist/{codex-session-runner-rbct46dg.js → codex-session-runner-bnw8cysk.js} +2 -2
- package/dist/{commands-zk4d6esf.js → commands-hch4e2k1.js} +2 -2
- package/dist/{db-stn16jp2.js → db-p3h2j06x.js} +12 -2
- package/dist/{handlers-gshprvpf.js → handlers-9er4zx9q.js} +9 -9
- package/dist/{hook-amzx9tap.js → hook-4axs756z.js} +1 -1
- package/dist/{http-6g0hfzax.js → http-809fvtz2.js} +182 -65
- package/dist/{index-ty42rxw9.js → index-47em3d2n.js} +10 -10
- package/dist/{index-jbm7qcqk.js → index-9fqaktjr.js} +8 -8
- package/dist/{index-f03rnnrs.js → index-9ht8gr56.js} +9 -9
- package/dist/{index-df8fmphk.js → index-rm85cfdx.js} +331 -30
- package/dist/{keepalive-pm6g2wpw.js → keepalive-3cps6e3e.js} +4 -4
- package/dist/{lead-h79fzpzw.js → lead-fkk95wgq.js} +24 -24
- package/dist/{maintenance-433zndy1.js → maintenance-fweqh0yj.js} +4 -4
- package/dist/{oauth-refresh-sweep-mjsbmsk2.js → oauth-refresh-sweep-sycqtbph.js} +3 -3
- package/dist/{onboard-vdr9hc3f.js → onboard-cy0rkgvx.js} +2 -2
- package/dist/{opencode-adapter-mqsxr170.js → opencode-adapter-p6bxnbm4.js} +2 -2
- package/dist/{otel-impl-yswd0fty.js → otel-impl-wbns8hf7.js} +1 -1
- package/dist/{pi-mono-adapter-vbrvg1p8.js → pi-mono-adapter-05sck1ds.js} +1 -1
- package/dist/{pricing-refresh-2kk2ap9b.js → pricing-refresh-0hvazmkf.js} +4 -4
- package/dist/{rbac-roles-xdc5208b.js → rbac-roles-kfesjy9y.js} +4 -4
- package/dist/{rbac-roles-2wgh9b5t.js → rbac-roles-mwcwhbxc.js} +11 -4
- package/dist/{seed-pricing-m9h69d2t.js → seed-pricing-h2kdq4cq.js} +3 -3
- package/dist/{setup-eynkvafa.js → setup-8506q97w.js} +2 -2
- package/dist/{worker-136q8dc2.js → worker-4r5c6zyb.js} +24 -24
- package/openapi.json +8 -4
- package/package.json +1 -1
- package/src/be/db.ts +253 -20
- package/src/be/migrations/113_task_routing_affinity.sql +9 -0
- package/src/be/migrations/114_backfill_gpt_5_6_pricing.sql +15 -0
- package/src/be/modelsdev-cache.json +135 -0
- package/src/be/rbac-audit.ts +19 -8
- package/src/be/rbac-roles.ts +8 -1
- package/src/be/script-connections.ts +4 -4
- package/src/be/scripts/typecheck.ts +11 -0
- package/src/be/seed-scripts/catalog/catalog-report.inline.ts +325 -24
- package/src/be/seed-scripts/catalog/catalog-report.ts +325 -24
- package/src/heartbeat/heartbeat.ts +143 -21
- package/src/http/favorites.ts +1 -5
- package/src/http/mcp-servers.ts +38 -0
- package/src/http/poll.ts +7 -2
- package/src/http/scripts.ts +6 -0
- package/src/http/skills.ts +11 -0
- package/src/http/tasks.ts +21 -9
- package/src/providers/codex-models.ts +100 -30
- package/src/providers/modelsdev-reasoning.json +51 -0
- package/src/providers/reasoning-effort.ts +11 -5
- package/src/rbac/admission.ts +26 -2
- package/src/rbac/index.ts +2 -2
- package/src/rbac/legacy-policy.ts +9 -0
- package/src/rbac/permissions.ts +36 -0
- package/src/scripts-runtime/api-client.ts +82 -6
- package/src/scripts-runtime/types/swarm-sdk.d.ts +11 -0
- package/src/server-user.ts +114 -59
- package/src/slack/responses.ts +91 -1
- package/src/slack/watcher.ts +9 -6
- package/src/tasks/worker-follow-up.ts +100 -3
- package/src/tests/codex-adapter.test.ts +46 -23
- package/src/tests/heartbeat.test.ts +48 -3
- package/src/tests/model-control.test.ts +8 -2
- package/src/tests/pool-affinity.test.ts +401 -0
- package/src/tests/rbac-admission-e2e.test.ts +152 -7
- package/src/tests/rbac-admission.test.ts +60 -1
- package/src/tests/rbac-engine.test.ts +9 -0
- package/src/tests/rbac-mcp-admission-e2e.test.ts +362 -0
- package/src/tests/rbac-roles.test.ts +2 -0
- package/src/tests/reasoning-effort.test.ts +15 -2
- package/src/tests/script-apis-mcp.test.ts +37 -13
- package/src/tests/script-connections.test.ts +27 -1
- package/src/tests/scripts-runtime.test.ts +187 -0
- package/src/tests/seed-scripts.test.ts +36 -0
- package/src/tests/slack-inline-output.test.ts +65 -0
- package/src/tests/user-token-rest-auth.test.ts +110 -0
- package/src/tools/script-apis.ts +62 -3
- package/src/tools/send-task.ts +15 -1
- package/src/tools/task-action.ts +34 -2
- package/src/tools/templates.ts +48 -0
- package/src/tools/utils.ts +2 -0
- package/src/types.ts +27 -5
- package/dist/cli-46b6kc7f.js +0 -1698
|
@@ -10,19 +10,19 @@ import {
|
|
|
10
10
|
} from "./cli-ftyf58xj.js";
|
|
11
11
|
import {
|
|
12
12
|
startPricingRefreshLoop
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-3samkyap.js";
|
|
14
14
|
import {
|
|
15
15
|
seedPricingFromModelsDev
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-tece6zgm.js";
|
|
17
17
|
import {
|
|
18
18
|
ensureRbacSeedsSynced,
|
|
19
19
|
getUserGrant
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-52fg7s7x.js";
|
|
21
21
|
import {
|
|
22
22
|
can,
|
|
23
23
|
decideAdmission,
|
|
24
24
|
isRbacEnabled
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-86fdnerz.js";
|
|
26
26
|
import {
|
|
27
27
|
createTrackerAgentMapping,
|
|
28
28
|
createTrackerSync,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
repointTrackerSyncBySwarmId,
|
|
38
38
|
updateTrackerSync,
|
|
39
39
|
updateTrackerSyncSwarmId
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-dcca6j8m.js";
|
|
41
41
|
import {
|
|
42
42
|
ZodFirstPartyTypeKind,
|
|
43
43
|
objectType
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
ensure,
|
|
48
48
|
require_dist,
|
|
49
49
|
runScheduleNow
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-shvaxw27.js";
|
|
51
51
|
import {
|
|
52
52
|
TriggerSchemaError,
|
|
53
53
|
applyDefinitionPatch,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
startWorkflowExecution,
|
|
62
62
|
validateDefinition,
|
|
63
63
|
validateJsonSchema
|
|
64
|
-
} from "./cli-
|
|
64
|
+
} from "./cli-q1rx7g0d.js";
|
|
65
65
|
import {
|
|
66
66
|
getApiKey
|
|
67
67
|
} from "./cli-f14fvzag.js";
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
setScriptConnectionEnabled,
|
|
82
82
|
upsertCredentialBinding,
|
|
83
83
|
upsertScriptConnection
|
|
84
|
-
} from "./cli-
|
|
84
|
+
} from "./cli-r9f6ngrf.js";
|
|
85
85
|
import {
|
|
86
86
|
CANDIDATE_SET_MULTIPLIER,
|
|
87
87
|
computeScore,
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
isGraphExpansionEnabled,
|
|
94
94
|
rerank,
|
|
95
95
|
rowToCandidate
|
|
96
|
-
} from "./cli-
|
|
96
|
+
} from "./cli-7xje5amz.js";
|
|
97
97
|
import {
|
|
98
98
|
buildAuthorizationUrl,
|
|
99
99
|
ensureToken,
|
|
@@ -101,17 +101,17 @@ import {
|
|
|
101
101
|
getOAuthApp,
|
|
102
102
|
getOAuthTokens,
|
|
103
103
|
upsertOAuthApp
|
|
104
|
-
} from "./cli-
|
|
104
|
+
} from "./cli-t0vqevnm.js";
|
|
105
105
|
import {
|
|
106
106
|
createAdditiveBuffer,
|
|
107
107
|
extractSlackMessageText,
|
|
108
108
|
parseSlackTs
|
|
109
|
-
} from "./cli-
|
|
109
|
+
} from "./cli-tffvrh6j.js";
|
|
110
110
|
import {
|
|
111
111
|
getSlackApp,
|
|
112
112
|
startSlackApp,
|
|
113
113
|
stopSlackApp
|
|
114
|
-
} from "./cli-
|
|
114
|
+
} from "./cli-pet3aev6.js";
|
|
115
115
|
import {
|
|
116
116
|
findOrCreateUserByEmail,
|
|
117
117
|
findUserByExternalId,
|
|
@@ -127,10 +127,10 @@ import {
|
|
|
127
127
|
resolveIdentityByEmail,
|
|
128
128
|
resolveUserByToken,
|
|
129
129
|
unlinkIdentity
|
|
130
|
-
} from "./cli-
|
|
130
|
+
} from "./cli-6aq8xhvm.js";
|
|
131
131
|
import {
|
|
132
132
|
markdownToSlack
|
|
133
|
-
} from "./cli-
|
|
133
|
+
} from "./cli-ma04faw5.js";
|
|
134
134
|
import {
|
|
135
135
|
agentContextKey,
|
|
136
136
|
agentmailContextKey,
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
createTaskWithSiblingAwareness,
|
|
139
139
|
githubContextKey,
|
|
140
140
|
linearContextKey
|
|
141
|
-
} from "./cli-
|
|
141
|
+
} from "./cli-k3y4z3h5.js";
|
|
142
142
|
import {
|
|
143
143
|
getAppUrl,
|
|
144
144
|
getMcpBaseUrl,
|
|
@@ -316,6 +316,7 @@ import {
|
|
|
316
316
|
installMcpServer,
|
|
317
317
|
installSkill,
|
|
318
318
|
interpolate,
|
|
319
|
+
isAgentEligibleForTask,
|
|
319
320
|
isReservedConfigKey,
|
|
320
321
|
isTerminalTaskStatus,
|
|
321
322
|
listKv,
|
|
@@ -368,7 +369,7 @@ import {
|
|
|
368
369
|
upsertService,
|
|
369
370
|
upsertSwarmConfig,
|
|
370
371
|
validateConfigValue
|
|
371
|
-
} from "./cli-
|
|
372
|
+
} from "./cli-15y7qhzp.js";
|
|
372
373
|
import {
|
|
373
374
|
init_zod
|
|
374
375
|
} from "./cli-bw80ck94.js";
|
|
@@ -412,7 +413,7 @@ import {
|
|
|
412
413
|
import {
|
|
413
414
|
init_package,
|
|
414
415
|
package_default
|
|
415
|
-
} from "./cli-
|
|
416
|
+
} from "./cli-b23axgz4.js";
|
|
416
417
|
import {
|
|
417
418
|
init_secret_scrubber,
|
|
418
419
|
refreshSecretScrubberCache,
|
|
@@ -19700,7 +19701,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
|
|
|
19700
19701
|
return;
|
|
19701
19702
|
initialized2 = true;
|
|
19702
19703
|
try {
|
|
19703
|
-
const impl = await import("./otel-impl-
|
|
19704
|
+
const impl = await import("./otel-impl-wbns8hf7.js");
|
|
19704
19705
|
await impl.boot(serviceRole);
|
|
19705
19706
|
realWithSpan = impl.withSpan;
|
|
19706
19707
|
realStartSpan = impl.startSpan;
|
|
@@ -27867,6 +27868,7 @@ var registerUpdateScheduleTool = (server) => {
|
|
|
27867
27868
|
};
|
|
27868
27869
|
// src/tools/script-apis.ts
|
|
27869
27870
|
init_zod();
|
|
27871
|
+
init_db();
|
|
27870
27872
|
init_secret_scrubber();
|
|
27871
27873
|
|
|
27872
27874
|
// src/tools/script-common.ts
|
|
@@ -27950,13 +27952,29 @@ function maskToken(endpoint) {
|
|
|
27950
27952
|
const { token: _drop, ...rest } = endpoint;
|
|
27951
27953
|
return { ...rest, token: endpoint.authMode === "bearer" ? "********" : null };
|
|
27952
27954
|
}
|
|
27953
|
-
function errorResult(message) {
|
|
27955
|
+
function errorResult(message, status = 400) {
|
|
27954
27956
|
return {
|
|
27955
27957
|
isError: true,
|
|
27956
27958
|
content: [{ type: "text", text: message }],
|
|
27957
|
-
structuredContent: { success: false, status
|
|
27959
|
+
structuredContent: { success: false, status, error: message }
|
|
27958
27960
|
};
|
|
27959
27961
|
}
|
|
27962
|
+
function requireScriptApiPermission(requestInfo, verb, message) {
|
|
27963
|
+
if (!requestInfo.agentId)
|
|
27964
|
+
return errorResult(SCRIPT_TRANSPORT_ERROR);
|
|
27965
|
+
const agent = getAgentById(requestInfo.agentId);
|
|
27966
|
+
const decision = can({
|
|
27967
|
+
principal: {
|
|
27968
|
+
kind: "agent",
|
|
27969
|
+
agentId: requestInfo.agentId,
|
|
27970
|
+
isLead: agent?.isLead ?? false
|
|
27971
|
+
},
|
|
27972
|
+
verb,
|
|
27973
|
+
resource: { kind: "none" },
|
|
27974
|
+
source: "mcp"
|
|
27975
|
+
});
|
|
27976
|
+
return decision.allow ? null : errorResult(message, 403);
|
|
27977
|
+
}
|
|
27960
27978
|
var registerScriptApisTool = (server) => {
|
|
27961
27979
|
createToolRegistrar(server)("script-apis", {
|
|
27962
27980
|
title: "Script APIs",
|
|
@@ -27977,6 +27995,9 @@ var registerScriptApisTool = (server) => {
|
|
|
27977
27995
|
const raw = result.structuredContent?.data;
|
|
27978
27996
|
let endpoints = (raw?.apis ?? []).map(maskToken);
|
|
27979
27997
|
if (args.includeSecrets) {
|
|
27998
|
+
const denied = requireScriptApiPermission(requestInfo, "script.api.read.secrets", "Only lead agents can reveal script API bearer tokens.");
|
|
27999
|
+
if (denied)
|
|
28000
|
+
return denied;
|
|
27980
28001
|
endpoints = await Promise.all(endpoints.map(async (endpoint) => {
|
|
27981
28002
|
if (endpoint.authMode !== "bearer")
|
|
27982
28003
|
return endpoint;
|
|
@@ -28000,6 +28021,9 @@ var registerScriptApisTool = (server) => {
|
|
|
28000
28021
|
};
|
|
28001
28022
|
}
|
|
28002
28023
|
if (args.action === "create") {
|
|
28024
|
+
const denied = requireScriptApiPermission(requestInfo, "script.api.create", "Only lead agents can create script API endpoints.");
|
|
28025
|
+
if (denied)
|
|
28026
|
+
return denied;
|
|
28003
28027
|
const result = await proxyScriptsApi({
|
|
28004
28028
|
method: "POST",
|
|
28005
28029
|
path: `/api/scripts/${args.scriptId}/apis`,
|
|
@@ -28021,6 +28045,9 @@ var registerScriptApisTool = (server) => {
|
|
|
28021
28045
|
if (args.action === "rotate") {
|
|
28022
28046
|
if (!args.endpointId)
|
|
28023
28047
|
return errorResult("endpointId is required for rotate.");
|
|
28048
|
+
const denied = requireScriptApiPermission(requestInfo, "script.api.rotate", "Only lead agents can rotate script API bearer tokens.");
|
|
28049
|
+
if (denied)
|
|
28050
|
+
return denied;
|
|
28024
28051
|
const result = await proxyScriptsApi({
|
|
28025
28052
|
method: "POST",
|
|
28026
28053
|
path: `/api/scripts/${args.scriptId}/apis/${args.endpointId}/rotate`,
|
|
@@ -28037,6 +28064,9 @@ var registerScriptApisTool = (server) => {
|
|
|
28037
28064
|
if (args.action === "update") {
|
|
28038
28065
|
if (!args.endpointId)
|
|
28039
28066
|
return errorResult("endpointId is required for update.");
|
|
28067
|
+
const denied = requireScriptApiPermission(requestInfo, "script.api.update", "Only lead agents can update script API endpoints.");
|
|
28068
|
+
if (denied)
|
|
28069
|
+
return denied;
|
|
28040
28070
|
return proxyScriptsApi({
|
|
28041
28071
|
method: "PATCH",
|
|
28042
28072
|
path: `/api/scripts/${args.scriptId}/apis/${args.endpointId}`,
|
|
@@ -28048,6 +28078,9 @@ var registerScriptApisTool = (server) => {
|
|
|
28048
28078
|
if (args.action === "delete") {
|
|
28049
28079
|
if (!args.endpointId)
|
|
28050
28080
|
return errorResult("endpointId is required for delete.");
|
|
28081
|
+
const denied = requireScriptApiPermission(requestInfo, "script.api.delete", "Only lead agents can delete script API endpoints.");
|
|
28082
|
+
if (denied)
|
|
28083
|
+
return denied;
|
|
28051
28084
|
return proxyScriptsApi({
|
|
28052
28085
|
method: "DELETE",
|
|
28053
28086
|
path: `/api/scripts/${args.scriptId}/apis/${args.endpointId}`,
|
|
@@ -28631,6 +28664,7 @@ var sendTaskInputSchema = object({
|
|
|
28631
28664
|
offerMode: boolean().default(false).describe("If true, offer the task instead of direct assign (agent must accept/reject)."),
|
|
28632
28665
|
taskType: string().max(50).optional().describe("Task type (e.g., 'bug', 'feature', 'review')."),
|
|
28633
28666
|
tags: array(string()).optional().describe("Tags for filtering (e.g., ['urgent', 'frontend'])."),
|
|
28667
|
+
requiredCapabilities: array(string()).optional().describe("Capabilities a claiming agent must have (declared via join-swarm/update-profile) to be pool-eligible for this task. Written into the created task's routingAffinity (role is left unset — only enforced when the pool auto-claim/claim-tool paths check it). Most useful when omitting agentId (unassigned pool task); a no-op for a task with an explicit agentId, which bypasses the pool gate entirely."),
|
|
28634
28668
|
priority: number().int().min(0).max(100).optional().describe("Priority 0-100 (default: 50)."),
|
|
28635
28669
|
dependsOn: array(uuid()).optional().describe("Task IDs this task depends on."),
|
|
28636
28670
|
parentTaskId: uuid().optional().describe("Parent task ID for session continuity. Child task will resume the parent's Claude session. Auto-routes to the same worker unless agentId is explicitly provided."),
|
|
@@ -28638,7 +28672,7 @@ var sendTaskInputSchema = object({
|
|
|
28638
28672
|
vcsRepo: string().optional().describe("VCS repo identifier (e.g., 'desplega-ai/agent-swarm' for GitHub or 'group/project' for GitLab). Links the task to a registered repo for workspace context."),
|
|
28639
28673
|
model: string().trim().min(1).optional().describe("Concrete model override for this task, interpreted by the assignee's harness/provider. This does not switch providers. Prefer modelTier for portable intent."),
|
|
28640
28674
|
modelTier: ModelTierSchema.optional().describe("Portable model tier for this task: 'smol', 'regular', 'smart', or 'ultra'. Resolved at claim/run time using the assignee's harness/provider. Legacy model shortnames map as haiku→smol, sonnet→regular, opus→smart, fable→ultra."),
|
|
28641
|
-
effort: ReasoningEffortSchema.optional().describe("Reasoning effort for this task: 'off', 'low', 'medium', 'high', or '
|
|
28675
|
+
effort: ReasoningEffortSchema.optional().describe("Reasoning effort for this task: 'off', 'low', 'medium', 'high', 'xhigh', or 'max'. If omitted, the assignee's REASONING_EFFORT_OVERRIDE/default applies."),
|
|
28642
28676
|
allowDuplicate: boolean().default(false).describe("If true, skip duplicate detection and create the task even if a similar one exists."),
|
|
28643
28677
|
slackChannelId: string().optional().describe("Slack channel ID to post progress updates to. Use this to propagate Slack context when delegating from a Slack thread."),
|
|
28644
28678
|
slackThreadTs: string().optional().describe("Slack thread timestamp. Required with slackChannelId for thread-level updates."),
|
|
@@ -28675,6 +28709,7 @@ async function sendTaskHandler(ctx, {
|
|
|
28675
28709
|
offerMode,
|
|
28676
28710
|
taskType,
|
|
28677
28711
|
tags,
|
|
28712
|
+
requiredCapabilities,
|
|
28678
28713
|
priority,
|
|
28679
28714
|
dependsOn,
|
|
28680
28715
|
dir,
|
|
@@ -28807,7 +28842,8 @@ async function sendTaskHandler(ctx, {
|
|
|
28807
28842
|
slackChannelId,
|
|
28808
28843
|
slackThreadTs,
|
|
28809
28844
|
slackUserId,
|
|
28810
|
-
followUpConfig
|
|
28845
|
+
followUpConfig,
|
|
28846
|
+
routingAffinity: requiredCapabilities?.length ? { capabilities: requiredCapabilities } : undefined
|
|
28811
28847
|
});
|
|
28812
28848
|
transferTrackerSyncToResumeChild({
|
|
28813
28849
|
parentTaskId: effectiveParentTaskId,
|
|
@@ -32705,17 +32741,18 @@ function enqueueAdmissionRow(input) {
|
|
|
32705
32741
|
if (isAuditDisabled())
|
|
32706
32742
|
return;
|
|
32707
32743
|
try {
|
|
32708
|
-
const
|
|
32744
|
+
const isMcp = input.source === "mcp";
|
|
32745
|
+
const method = isMcp ? undefined : (input.method ?? "UNKNOWN").toUpperCase();
|
|
32709
32746
|
enqueueRow({
|
|
32710
32747
|
principalType: "user",
|
|
32711
32748
|
principalId: input.userId,
|
|
32712
32749
|
originatorUserId: null,
|
|
32713
32750
|
verb: input.decision.verb ?? "(admission:no-verb)",
|
|
32714
|
-
resourceType: "http-route",
|
|
32715
|
-
resourceId: `${method} ${input.route}`,
|
|
32751
|
+
resourceType: isMcp ? "mcp-tool" : "http-route",
|
|
32752
|
+
resourceId: isMcp ? input.toolName : `${method} ${input.route}`,
|
|
32716
32753
|
decision: input.decision.allow ? "allow" : "deny",
|
|
32717
32754
|
reason: input.decision.allow ? null : input.decision.reason,
|
|
32718
|
-
source: "http"
|
|
32755
|
+
source: isMcp ? "mcp" : "http"
|
|
32719
32756
|
});
|
|
32720
32757
|
} catch (err) {
|
|
32721
32758
|
console.warn("[rbac-audit] enqueue failed, dropping admission row:", err.message);
|
|
@@ -34801,7 +34838,7 @@ async function notifySlack(text) {
|
|
|
34801
34838
|
return;
|
|
34802
34839
|
}
|
|
34803
34840
|
try {
|
|
34804
|
-
const { getSlackApp: getSlackApp2 } = await import("./app-
|
|
34841
|
+
const { getSlackApp: getSlackApp2 } = await import("./app-4f718yk0.js");
|
|
34805
34842
|
const app = getSlackApp2();
|
|
34806
34843
|
if (!app) {
|
|
34807
34844
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -34870,7 +34907,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
34870
34907
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
34871
34908
|
}
|
|
34872
34909
|
async function overwriteWebhookIds(next) {
|
|
34873
|
-
const { getDb: getDb2 } = await import("./db-
|
|
34910
|
+
const { getDb: getDb2 } = await import("./db-p3h2j06x.js");
|
|
34874
34911
|
const db = getDb2();
|
|
34875
34912
|
const txn = db.transaction(() => {
|
|
34876
34913
|
const row = db.query("SELECT metadata FROM oauth_apps WHERE provider = 'jira'").get();
|
|
@@ -110022,7 +110059,8 @@ var taskActionInputSchema = object({
|
|
|
110022
110059
|
dir: string().min(1).startsWith("/").optional().describe("Working directory (absolute path) for the agent to start in. Only used with 'create' action."),
|
|
110023
110060
|
model: string().trim().min(1).optional().describe("Concrete model override for the created task, interpreted by the claiming worker's harness/provider. This does not switch providers. Only used with 'create' action."),
|
|
110024
110061
|
modelTier: ModelTierSchema.optional().describe("Portable model tier for the created task: 'smol', 'regular', 'smart', or 'ultra'. Resolved when a worker claims/runs the task. Only used with 'create' action."),
|
|
110025
|
-
effort: ReasoningEffortSchema.optional().describe("Reasoning effort for the created task: 'off', 'low', 'medium', 'high', or '
|
|
110062
|
+
effort: ReasoningEffortSchema.optional().describe("Reasoning effort for the created task: 'off', 'low', 'medium', 'high', 'xhigh', or 'max'. Only used with 'create' action."),
|
|
110063
|
+
requiredCapabilities: array(string()).optional().describe("Capabilities a claiming agent must have (declared via join-swarm/update-profile) to be pool-eligible for this task. Written into the created task's routingAffinity (role is left unset). Only used with 'create' action.")
|
|
110026
110064
|
});
|
|
110027
110065
|
var taskActionOutputSchema = object({
|
|
110028
110066
|
yourAgentId: string().uuid().optional(),
|
|
@@ -110068,7 +110106,19 @@ function taskActionCallResult(result, agentId) {
|
|
|
110068
110106
|
};
|
|
110069
110107
|
}
|
|
110070
110108
|
async function taskActionHandler(ctx, input) {
|
|
110071
|
-
const {
|
|
110109
|
+
const {
|
|
110110
|
+
action,
|
|
110111
|
+
task,
|
|
110112
|
+
taskType,
|
|
110113
|
+
tags,
|
|
110114
|
+
priority,
|
|
110115
|
+
dependsOn,
|
|
110116
|
+
taskId,
|
|
110117
|
+
reason,
|
|
110118
|
+
dir,
|
|
110119
|
+
model,
|
|
110120
|
+
requiredCapabilities
|
|
110121
|
+
} = input;
|
|
110072
110122
|
const normalizedModel = splitLegacyModelAlias({ model, modelTier: input.modelTier });
|
|
110073
110123
|
if (ctx.kind === "user") {
|
|
110074
110124
|
if (action !== "to_backlog" && action !== "from_backlog") {
|
|
@@ -110148,7 +110198,8 @@ async function taskActionHandler(ctx, input) {
|
|
|
110148
110198
|
dir,
|
|
110149
110199
|
model: normalizedModel.model,
|
|
110150
110200
|
modelTier: normalizedModel.modelTier,
|
|
110151
|
-
effort: input.effort
|
|
110201
|
+
effort: input.effort,
|
|
110202
|
+
routingAffinity: requiredCapabilities?.length ? { capabilities: requiredCapabilities } : undefined
|
|
110152
110203
|
});
|
|
110153
110204
|
return {
|
|
110154
110205
|
success: true,
|
|
@@ -110185,6 +110236,13 @@ async function taskActionHandler(ctx, input) {
|
|
|
110185
110236
|
message: `Task "${taskId}" has unmet dependencies: ${blockedBy.join(", ")}. Cannot claim until dependencies are completed.`
|
|
110186
110237
|
};
|
|
110187
110238
|
}
|
|
110239
|
+
const claimingAgent = getAgentById(agentId);
|
|
110240
|
+
if (claimingAgent && !isAgentEligibleForTask(claimingAgent, existingTask)) {
|
|
110241
|
+
return {
|
|
110242
|
+
success: false,
|
|
110243
|
+
message: `Task "${taskId}" requires role "${existingTask.routingAffinity?.role ?? "(unspecified)"}"; yours is "${claimingAgent.role ?? "(unspecified)"}". Cannot claim.`
|
|
110244
|
+
};
|
|
110245
|
+
}
|
|
110188
110246
|
const claimedTask = claimTask(taskId, agentId);
|
|
110189
110247
|
if (!claimedTask) {
|
|
110190
110248
|
return {
|
|
@@ -112294,4 +112352,4 @@ function writeSkillsToFilesystem(entries, harnessType = "all", home) {
|
|
|
112294
112352
|
return { synced, removed, errors };
|
|
112295
112353
|
}
|
|
112296
112354
|
|
|
112297
|
-
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, userCtx, isPollTracingEnabled, initOtel, withSpan, startSpan, withSpanContext, withRemoteContext, injectTraceContext, recordSessionCost, createToolRegistrar, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, setCorsHeaders, parseQueryParams, getPathSegments, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, describeRequestRoute, route, assertSelectOnlyQuery, executeReadOnlyQuery, handleDbQuery, snapshotMetric, snapshotPage, assertOAuthProviderIsNotReserved, assertOAuthAppUrlsSafe, scopedResourceScopeIdSchema, resolveScopedResourceId, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, storeLinks, refreshLinks, canReadMemory, getLinksForMemory, recordRetrievals, expandCandidatesWithGraph, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, resolveTaskAuditUserId, resolveHttpAuditUserId, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, sendTaskOutputSchema, sendTaskHandler, parseSkillContent, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, enqueueAuditRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, hasCapability, getEnabledCapabilities, createServer, writeSkillsToFilesystem };
|
|
112355
|
+
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, userCtx, isPollTracingEnabled, initOtel, withSpan, startSpan, withSpanContext, withRemoteContext, injectTraceContext, recordSessionCost, createToolRegistrar, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, setCorsHeaders, parseQueryParams, getPathSegments, safeRequestUrlForLog, agentWithCapacity, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, describeRequestRoute, route, assertSelectOnlyQuery, executeReadOnlyQuery, handleDbQuery, snapshotMetric, snapshotPage, assertOAuthProviderIsNotReserved, assertOAuthAppUrlsSafe, scopedResourceScopeIdSchema, resolveScopedResourceId, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, storeLinks, refreshLinks, canReadMemory, getLinksForMemory, recordRetrievals, expandCandidatesWithGraph, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, resolveTaskAuditUserId, resolveHttpAuditUserId, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, sendTaskOutputSchema, sendTaskHandler, parseSkillContent, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, canClaim, emitBudgetRefusalSideEffects, taskActionInputSchema, taskActionOutputSchema, taskActionHandler, hasCapability, getEnabledCapabilities, createServer, writeSkillsToFilesystem };
|
|
@@ -294,4 +294,4 @@ function buildTreeBlocks(roots) {
|
|
|
294
294
|
return blocks;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
export { getTaskLink, markdownToSlack, formatAttachmentsBlockForSlack, formatDuration, buildCompletedBlocks, buildCompletedBlockBatches, buildFailedBlocks, buildProgressBlocks, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks };
|
|
297
|
+
export { getTaskLink, markdownToSlack, splitSlackSectionText, formatAttachmentsBlockForSlack, formatDuration, buildCompletedBlocks, buildCompletedBlockBatches, buildFailedBlocks, buildProgressBlocks, buildCancelledBlocks, buildBufferFlushBlocks, buildTreeBlocks };
|
|
@@ -14,8 +14,10 @@ import {
|
|
|
14
14
|
buildTreeBlocks,
|
|
15
15
|
formatAttachmentsBlockForSlack,
|
|
16
16
|
formatDuration,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
getTaskLink,
|
|
18
|
+
markdownToSlack,
|
|
19
|
+
splitSlackSectionText
|
|
20
|
+
} from "./cli-ma04faw5.js";
|
|
19
21
|
import {
|
|
20
22
|
getAgentById,
|
|
21
23
|
getChildTasks,
|
|
@@ -25,7 +27,7 @@ import {
|
|
|
25
27
|
getTaskById,
|
|
26
28
|
init_db,
|
|
27
29
|
setSlackMessageTracking
|
|
28
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-15y7qhzp.js";
|
|
29
31
|
import {
|
|
30
32
|
require_receiver,
|
|
31
33
|
require_sender,
|
|
@@ -54212,9 +54214,89 @@ function classifySlackUpdateError(error) {
|
|
|
54212
54214
|
return "failed";
|
|
54213
54215
|
}
|
|
54214
54216
|
var isDev = process.env.ENV === "development";
|
|
54217
|
+
var MIN_INLINE_OUTPUT_LENGTH = 20;
|
|
54218
|
+
var MAX_INLINE_OUTPUT_MESSAGE_LENGTH = 4000;
|
|
54219
|
+
var INLINE_OUTPUT_FALLBACKS = new Set([
|
|
54220
|
+
"done",
|
|
54221
|
+
"completed",
|
|
54222
|
+
"complete",
|
|
54223
|
+
"task completed",
|
|
54224
|
+
"process completed successfully",
|
|
54225
|
+
"process completed successfully (no output captured)"
|
|
54226
|
+
]);
|
|
54215
54227
|
function getAgentDisplayName(agent) {
|
|
54216
54228
|
return isDev ? `(dev) ${agent.name}` : agent.name;
|
|
54217
54229
|
}
|
|
54230
|
+
function shouldPostInlineCompletionOutput(task, attachments) {
|
|
54231
|
+
if (task.status !== "completed")
|
|
54232
|
+
return false;
|
|
54233
|
+
if (!task.slackChannelId || !task.slackThreadTs)
|
|
54234
|
+
return false;
|
|
54235
|
+
if (task.slackReplySent)
|
|
54236
|
+
return false;
|
|
54237
|
+
const output = task.output?.trim();
|
|
54238
|
+
if (!output || output.length < MIN_INLINE_OUTPUT_LENGTH)
|
|
54239
|
+
return false;
|
|
54240
|
+
if (INLINE_OUTPUT_FALLBACKS.has(output.toLowerCase()))
|
|
54241
|
+
return false;
|
|
54242
|
+
return !attachments.some((attachment) => attachment.isPrimary);
|
|
54243
|
+
}
|
|
54244
|
+
function formatInlineCompletionOutputText(opts) {
|
|
54245
|
+
const header = `✅ *${opts.agentName}* completed with output (${getTaskLink(opts.taskId)}):
|
|
54246
|
+
|
|
54247
|
+
`;
|
|
54248
|
+
const tail = `
|
|
54249
|
+
|
|
54250
|
+
…(full output in task ${getTaskLink(opts.taskId)})`;
|
|
54251
|
+
const slackOutput = markdownToSlack(opts.output.trim());
|
|
54252
|
+
const maxBodyLength = MAX_INLINE_OUTPUT_MESSAGE_LENGTH - header.length;
|
|
54253
|
+
if (slackOutput.length <= maxBodyLength) {
|
|
54254
|
+
return header + slackOutput;
|
|
54255
|
+
}
|
|
54256
|
+
const maxTruncatedBodyLength = Math.max(0, maxBodyLength - tail.length);
|
|
54257
|
+
let cut = slackOutput.lastIndexOf(`
|
|
54258
|
+
`, maxTruncatedBodyLength);
|
|
54259
|
+
if (cut < maxTruncatedBodyLength / 2) {
|
|
54260
|
+
cut = slackOutput.lastIndexOf(" ", maxTruncatedBodyLength);
|
|
54261
|
+
}
|
|
54262
|
+
if (cut < maxTruncatedBodyLength / 2) {
|
|
54263
|
+
cut = maxTruncatedBodyLength;
|
|
54264
|
+
}
|
|
54265
|
+
return header + slackOutput.slice(0, cut).trimEnd() + tail;
|
|
54266
|
+
}
|
|
54267
|
+
async function sendInlineTaskOutput(task) {
|
|
54268
|
+
const app = getSlackApp();
|
|
54269
|
+
if (!app || !task.slackChannelId || !task.slackThreadTs || !task.agentId || !task.output) {
|
|
54270
|
+
return false;
|
|
54271
|
+
}
|
|
54272
|
+
const agent = getAgentById(task.agentId);
|
|
54273
|
+
if (!agent) {
|
|
54274
|
+
console.error(`[Slack] Agent not found for task ${task.id}`);
|
|
54275
|
+
return false;
|
|
54276
|
+
}
|
|
54277
|
+
const text = formatInlineCompletionOutputText({
|
|
54278
|
+
agentName: agent.name,
|
|
54279
|
+
taskId: task.id,
|
|
54280
|
+
output: task.output
|
|
54281
|
+
});
|
|
54282
|
+
try {
|
|
54283
|
+
await sendWithPersona(app.client, {
|
|
54284
|
+
channel: task.slackChannelId,
|
|
54285
|
+
thread_ts: task.slackThreadTs,
|
|
54286
|
+
text,
|
|
54287
|
+
username: getAgentDisplayName(agent),
|
|
54288
|
+
icon_emoji: getAgentEmoji(agent),
|
|
54289
|
+
blocks: splitSlackSectionText(text).map((chunk) => ({
|
|
54290
|
+
type: "section",
|
|
54291
|
+
text: { type: "mrkdwn", text: chunk }
|
|
54292
|
+
}))
|
|
54293
|
+
});
|
|
54294
|
+
return true;
|
|
54295
|
+
} catch (error) {
|
|
54296
|
+
console.error(`[Slack] Failed to send inline output for task ${task.id}:`, error);
|
|
54297
|
+
return false;
|
|
54298
|
+
}
|
|
54299
|
+
}
|
|
54218
54300
|
async function sendTaskResponse(task) {
|
|
54219
54301
|
const app = getSlackApp();
|
|
54220
54302
|
if (!app || !task.slackChannelId || !task.slackThreadTs) {
|
|
@@ -54904,7 +54986,8 @@ function startTaskWatcher(intervalMs = 3000) {
|
|
|
54904
54986
|
if (lastSent && now2 - lastSent < MIN_SEND_INTERVAL)
|
|
54905
54987
|
continue;
|
|
54906
54988
|
if (taskToTree.has(task.id)) {
|
|
54907
|
-
|
|
54989
|
+
const attachments = task.status === "completed" ? getTaskAttachments(task.id) : [];
|
|
54990
|
+
if (!shouldPostInlineCompletionOutput(task, attachments)) {
|
|
54908
54991
|
notifiedCompletions.set(task.id, now2);
|
|
54909
54992
|
continue;
|
|
54910
54993
|
}
|
|
@@ -54912,8 +54995,10 @@ function startTaskWatcher(intervalMs = 3000) {
|
|
|
54912
54995
|
notifiedCompletions.set(task.id, now2);
|
|
54913
54996
|
lastSendTime.set(completionKey, now2);
|
|
54914
54997
|
try {
|
|
54915
|
-
await
|
|
54916
|
-
|
|
54998
|
+
const sent = await sendInlineTaskOutput(task);
|
|
54999
|
+
if (!sent)
|
|
55000
|
+
throw new Error("sendInlineTaskOutput returned false");
|
|
55001
|
+
console.log(`[Slack] Sent inline output for tree-tracked completion ${task.id.slice(0, 8)}`);
|
|
54917
55002
|
} catch (error) {
|
|
54918
55003
|
notifiedCompletions.delete(task.id);
|
|
54919
55004
|
lastSendTime.delete(completionKey);
|
|
@@ -54988,13 +55073,13 @@ async function initSlackApp() {
|
|
|
54988
55073
|
socketMode: true,
|
|
54989
55074
|
logLevel: import_bolt.LogLevel.DEBUG
|
|
54990
55075
|
});
|
|
54991
|
-
const { registerMessageHandler } = await import("./handlers-
|
|
54992
|
-
const { registerCommandHandler } = await import("./commands-
|
|
54993
|
-
const { registerActionHandlers } = await import("./actions-
|
|
55076
|
+
const { registerMessageHandler } = await import("./handlers-9er4zx9q.js");
|
|
55077
|
+
const { registerCommandHandler } = await import("./commands-hch4e2k1.js");
|
|
55078
|
+
const { registerActionHandlers } = await import("./actions-17ya5wde.js");
|
|
54994
55079
|
registerMessageHandler(app);
|
|
54995
55080
|
registerCommandHandler(app);
|
|
54996
55081
|
registerActionHandlers(app);
|
|
54997
|
-
const { createAssistant } = await import("./assistant-
|
|
55082
|
+
const { createAssistant } = await import("./assistant-ah7csnjz.js");
|
|
54998
55083
|
app.assistant(createAssistant());
|
|
54999
55084
|
return app;
|
|
55000
55085
|
}
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
getScriptVersion,
|
|
12
12
|
listRelationalCredentialBindings,
|
|
13
13
|
validateScriptImports
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-r9f6ngrf.js";
|
|
15
15
|
import {
|
|
16
16
|
ensureTokenOrThrow,
|
|
17
17
|
getOAuthApp,
|
|
18
18
|
getOAuthTokens,
|
|
19
19
|
isTokenExpiringSoon,
|
|
20
20
|
oauthAppRowToProviderConfig
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-t0vqevnm.js";
|
|
22
22
|
import {
|
|
23
23
|
withSiblingAwareness,
|
|
24
24
|
workflowContextKey
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-k3y4z3h5.js";
|
|
26
26
|
import {
|
|
27
27
|
getAppUrl
|
|
28
28
|
} from "./cli-dh55d5fg.js";
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
telemetry,
|
|
72
72
|
updateWorkflowRun,
|
|
73
73
|
updateWorkflowRunStep
|
|
74
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-15y7qhzp.js";
|
|
75
75
|
import {
|
|
76
76
|
init_zod
|
|
77
77
|
} from "./cli-bw80ck94.js";
|
|
@@ -2612,7 +2612,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
|
|
|
2612
2612
|
}
|
|
2613
2613
|
if (notification.channel === "slack") {
|
|
2614
2614
|
try {
|
|
2615
|
-
const { getSlackApp } = await import("./app-
|
|
2615
|
+
const { getSlackApp } = await import("./app-4f718yk0.js");
|
|
2616
2616
|
const slackApp = getSlackApp();
|
|
2617
2617
|
if (!slackApp) {
|
|
2618
2618
|
console.warn("[HITL] Slack not initialized — cannot send notification");
|
|
@@ -2726,7 +2726,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
2726
2726
|
}
|
|
2727
2727
|
}
|
|
2728
2728
|
case "slack": {
|
|
2729
|
-
const { getSlackApp } = await import("./app-
|
|
2729
|
+
const { getSlackApp } = await import("./app-4f718yk0.js");
|
|
2730
2730
|
const app = getSlackApp();
|
|
2731
2731
|
if (!app) {
|
|
2732
2732
|
return {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./cli-jkhwmmgg.js";
|
|
4
4
|
import {
|
|
5
5
|
embedScript
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-cmw9rzy5.js";
|
|
7
7
|
import {
|
|
8
8
|
calculatePKCECodeChallenge,
|
|
9
9
|
generateRandomCodeVerifier,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
init_date_utils,
|
|
23
23
|
init_db,
|
|
24
24
|
normalizeDateRequired
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-15y7qhzp.js";
|
|
26
26
|
import {
|
|
27
27
|
init_zod
|
|
28
28
|
} from "./cli-bw80ck94.js";
|
|
@@ -169786,7 +169786,10 @@ function buildGeneratedArtifacts(input) {
|
|
|
169786
169786
|
const generatedTypes = [
|
|
169787
169787
|
types,
|
|
169788
169788
|
`export interface ${pascal(slug)}Api {`,
|
|
169789
|
-
...operations.
|
|
169789
|
+
...operations.flatMap((operation) => [
|
|
169790
|
+
` ${operation.name}(args: ${operation.requestType}): Promise<${operation.responseType}>;`,
|
|
169791
|
+
` ${operation.name}(args: ${operation.requestType}, options: ScriptApiRawOptions): Promise<ScriptApiRawResult>;`
|
|
169792
|
+
]),
|
|
169790
169793
|
"}"
|
|
169791
169794
|
].join(`
|
|
169792
169795
|
`);
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
handleScheduleTrigger,
|
|
5
5
|
runScript,
|
|
6
6
|
startWorkflowExecution
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-q1rx7g0d.js";
|
|
8
8
|
import {
|
|
9
9
|
getScript,
|
|
10
10
|
getScriptApiConnectionDescriptors,
|
|
11
11
|
getScriptMcpConnectionDescriptors
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-r9f6ngrf.js";
|
|
13
13
|
import {
|
|
14
14
|
createTaskWithSiblingAwareness,
|
|
15
15
|
scheduleContextKey
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-k3y4z3h5.js";
|
|
17
17
|
import {
|
|
18
18
|
getDb,
|
|
19
19
|
getDueScheduledTasks,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
init_telemetry,
|
|
24
24
|
telemetry,
|
|
25
25
|
updateScheduledTask
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-15y7qhzp.js";
|
|
27
27
|
import {
|
|
28
28
|
__commonJS,
|
|
29
29
|
__require,
|