@desplega.ai/agent-swarm 1.102.0 → 1.103.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-j9399ktm.js → actions-7txktrdj.js} +6 -6
- package/dist/{app-tnq1pz27.js → app-xm3xsdye.js} +3 -3
- package/dist/{assistant-c7y92gkw.js → assistant-qpv63wk6.js} +9 -9
- package/dist/{boot-reembed-k7e6fc1p.js → boot-reembed-9cxqka3e.js} +3 -3
- package/dist/{boot-reembed-b97r699t.js → boot-reembed-chxhrwv8.js} +4 -4
- package/dist/{boot-scrub-logs-14kbc61y.js → boot-scrub-logs-8qtfkcz8.js} +2 -2
- package/dist/{claude-managed-adapter-g07dbz3b.js → claude-managed-adapter-z29hjgzz.js} +3 -3
- package/dist/{cli-tsz1q7gk.js → cli-2307phk1.js} +375 -23
- package/dist/{cli-g5px3d7x.js → cli-2957pqpj.js} +24 -1
- package/dist/{cli-9qascwj7.js → cli-2qynerth.js} +1 -1
- package/dist/{cli-k1ghyj8b.js → cli-4fnp2tc3.js} +1 -1
- package/dist/{cli-hc4rd6sv.js → cli-85pf4z38.js} +1 -1
- package/dist/{cli-zk4gn40w.js → cli-8hyv6c2v.js} +6 -14
- package/dist/{cli-k81y1cjb.js → cli-8w95v19d.js} +1 -1
- package/dist/{cli-7xdq3jg3.js → cli-92fqyjcv.js} +1 -1
- package/dist/{cli-zctkpdmd.js → cli-dz3d6zjg.js} +1 -1
- package/dist/{cli-d0t4854c.js → cli-fedn86nz.js} +213 -476
- package/dist/{cli-g861fwjp.js → cli-fwxdt7kt.js} +3 -3
- package/dist/{cli-2aaa9mqr.js → cli-fygaw191.js} +2 -2
- package/dist/{cli-qbc6mncp.js → cli-gzepjz54.js} +2 -2
- package/dist/{cli-r68m8arr.js → cli-jt9d9fjw.js} +1 -1
- package/dist/{cli-axtg1zaa.js → cli-khe4x17a.js} +1 -1
- package/dist/{cli-sygq3fhn.js → cli-kk51f3tf.js} +5 -5
- package/dist/{cli-dgab5x2h.js → cli-krvxq8bc.js} +1 -1
- package/dist/{cli-xde8vhhp.js → cli-ksq38x4n.js} +2 -2
- package/dist/{cli-stqqf5kh.js → cli-m8f6qzck.js} +1 -1
- package/dist/{cli-ap4md0gc.js → cli-ns0r7mkr.js} +30 -5
- package/dist/{cli-t2jk33ta.js → cli-rttgde5f.js} +18 -6
- package/dist/{cli-mhj07xbq.js → cli-rvae030h.js} +3 -3
- package/dist/{cli-q6jzg6wj.js → cli-s14sb64w.js} +4 -4
- package/dist/{cli-zmf7refz.js → cli-v9283nma.js} +1 -1
- package/dist/{cli-fjx4x7nn.js → cli-xmtsan9k.js} +1 -1
- package/dist/{cli-vgck9mqq.js → cli-yeemwevj.js} +155 -37
- package/dist/{cli-5bqa41fd.js → cli-yfwwjeft.js} +1 -1
- package/dist/{cli-s8jw5bmg.js → cli-yp2krx5r.js} +2 -2
- package/dist/cli.js +9 -9
- package/dist/{codex-adapter-wf119mnw.js → codex-adapter-w0xharsg.js} +3 -3
- package/dist/{codex-session-runner-1gknw7mh.js → codex-session-runner-kzbjcm2k.js} +3 -3
- package/dist/{commands-2wyn3swb.js → commands-aqn63mcw.js} +2 -2
- package/dist/{db-567ntpxv.js → db-azrvwsnj.js} +2 -2
- package/dist/{handlers-wvwpk2kj.js → handlers-hf61har3.js} +9 -9
- package/dist/{hook-fatkywc0.js → hook-306p3yz4.js} +2 -2
- package/dist/{http-eq6wxve6.js → http-zts4haq7.js} +81 -62
- package/dist/{index-400x6p3j.js → index-29vg51x6.js} +6 -6
- package/dist/{index-9wqh5352.js → index-3c651yfk.js} +10 -10
- package/dist/{index-6aj8966p.js → index-bfh9hgek.js} +5 -5
- package/dist/{index-d1rm4ea3.js → index-h2yqjyk0.js} +8 -8
- package/dist/{keepalive-6x9nx92g.js → keepalive-a0dg5pds.js} +4 -4
- package/dist/{lead-5fgqwe13.js → lead-7mcxedkc.js} +21 -21
- package/dist/{maintenance-eajx5k1k.js → maintenance-mrzqd53t.js} +4 -4
- package/dist/{onboard-jc1w1edg.js → onboard-4dkpv9wa.js} +2 -2
- package/dist/{otel-impl-8k375amf.js → otel-impl-jt7gpyp9.js} +1 -1
- package/dist/{pi-mono-adapter-hf8sw7hs.js → pi-mono-adapter-zf7dt1wg.js} +1 -1
- package/dist/{pricing-refresh-zed6916t.js → pricing-refresh-xqnzh8dt.js} +4 -4
- package/dist/{seed-pricing-5805qzkz.js → seed-pricing-56tjm1fj.js} +3 -3
- package/dist/{setup-wz05vxh0.js → setup-tbwk8j10.js} +2 -2
- package/dist/{worker-j359graf.js → worker-e03za92t.js} +21 -21
- package/openapi.json +70 -1
- package/package.json +1 -1
- package/src/be/db.ts +83 -13
- package/src/be/migrations/098_repo_hooks_config.sql +3 -0
- package/src/be/task-lifecycle-events.ts +42 -0
- package/src/commands/runner.ts +174 -25
- package/src/github/task-reactions.ts +21 -0
- package/src/hooks/tool-loop-detection.test.ts +40 -0
- package/src/hooks/tool-loop-detection.ts +37 -1
- package/src/http/agents.ts +7 -0
- package/src/http/index.ts +16 -2
- package/src/http/prompt-templates.ts +1 -1
- package/src/http/repos.ts +5 -1
- package/src/http/schedules.ts +1 -1
- package/src/http/session-data.ts +2 -0
- package/src/http/tasks.ts +2 -1
- package/src/http/workflows.ts +1 -0
- package/src/prompts/resolver.ts +1 -1
- package/src/scheduler/scheduler.ts +25 -2
- package/src/server-runtime-counters.ts +12 -0
- package/src/server-user.ts +1 -2
- package/src/server.ts +5 -0
- package/src/telemetry.ts +18 -1
- package/src/tests/http-api-integration.test.ts +4 -0
- package/src/tests/model-control.test.ts +6 -6
- package/src/tests/swarm-repos.test.ts +25 -2
- package/src/tests/task-lifecycle-events.test.ts +53 -0
- package/src/tests/task-lifecycle-telemetry.test.ts +37 -1
- package/src/tests/telemetry-init.test.ts +32 -0
- package/src/tools/prompt-templates/preview.ts +1 -1
- package/src/tools/repos/update-repo.ts +6 -1
- package/src/tools/schedules/create-schedule.ts +1 -1
- package/src/tools/schedules/update-schedule.ts +1 -1
- package/src/tools/send-task.ts +7 -2
- package/src/tools/task-action.ts +6 -2
- package/src/types.ts +155 -1
- package/src/utils/template.ts +127 -0
- package/src/workflows/engine.ts +7 -0
- package/src/workflows/executors/agent-task.ts +1 -2
- package/src/workflows/template.ts +12 -121
- package/src/workflows/triggers.ts +6 -2
- package/templates/community/code-health-reports/PLAYBOOK.md +355 -0
- package/templates/community/code-health-reports/README.md +38 -0
- package/templates/community/code-health-reports/lead-prompt.md +52 -0
- package/templates/community/code-health-reports/report.mjs +378 -0
- package/templates/community/code-health-reports/run.sh +143 -0
- package/templates/schedules/weekly-code-health-reports/config.json +13 -0
- package/templates/schedules/weekly-code-health-reports/content.md +60 -0
- package/src/model-tiers.ts +0 -140
- package/templates/community/.gitkeep +0 -0
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
JSONRPCMessageSchema,
|
|
6
6
|
McpServer,
|
|
7
7
|
SUPPORTED_PROTOCOL_VERSIONS,
|
|
8
|
+
addIssueReaction,
|
|
9
|
+
addReaction,
|
|
8
10
|
agentWithCapacity,
|
|
9
11
|
applyRating,
|
|
10
12
|
assertSelectOnlyQuery,
|
|
@@ -20,6 +22,7 @@ import {
|
|
|
20
22
|
enforceContentLengthCap,
|
|
21
23
|
executeReadOnlyQuery,
|
|
22
24
|
getEnabledCapabilities,
|
|
25
|
+
getInstallationToken,
|
|
23
26
|
getKapsoConfig,
|
|
24
27
|
getKapsoNumberMapping,
|
|
25
28
|
getPathSegments,
|
|
@@ -32,7 +35,9 @@ import {
|
|
|
32
35
|
handleDbQuery,
|
|
33
36
|
hasCapability,
|
|
34
37
|
httpServerSemconvAttributes,
|
|
38
|
+
initGitHub,
|
|
35
39
|
initOtel,
|
|
40
|
+
isGitHubEnabled,
|
|
36
41
|
isInitializeRequest,
|
|
37
42
|
isJSONRPCErrorResponse,
|
|
38
43
|
isJSONRPCRequest,
|
|
@@ -49,6 +54,7 @@ import {
|
|
|
49
54
|
parseSkillContent,
|
|
50
55
|
recordRetrievals,
|
|
51
56
|
rerank,
|
|
57
|
+
resetGitHub,
|
|
52
58
|
resolveHttpAuditUserId,
|
|
53
59
|
route,
|
|
54
60
|
routeRegistry,
|
|
@@ -67,10 +73,11 @@ import {
|
|
|
67
73
|
triggerSchemaErrorResponse,
|
|
68
74
|
userCtx,
|
|
69
75
|
validateRecurringTiming,
|
|
76
|
+
verifyWebhookSignature,
|
|
70
77
|
withRemoteContext,
|
|
71
78
|
withSpanContext,
|
|
72
79
|
writeSkillsToFilesystem
|
|
73
|
-
} from "./cli-
|
|
80
|
+
} from "./cli-2307phk1.js";
|
|
74
81
|
import {
|
|
75
82
|
BROWSER_SDK_JS,
|
|
76
83
|
SWARM_UI_JS
|
|
@@ -95,23 +102,23 @@ import {
|
|
|
95
102
|
getOAuthApp,
|
|
96
103
|
getOAuthTokens,
|
|
97
104
|
upsertOAuthApp
|
|
98
|
-
} from "./cli-
|
|
99
|
-
import"./cli-
|
|
105
|
+
} from "./cli-v9283nma.js";
|
|
106
|
+
import"./cli-ksq38x4n.js";
|
|
100
107
|
import {
|
|
101
108
|
normalizeModelKey
|
|
102
|
-
} from "./cli-
|
|
109
|
+
} from "./cli-m8f6qzck.js";
|
|
103
110
|
import {
|
|
104
111
|
SCRIPT_SDK_TYPES,
|
|
105
112
|
SCRIPT_STDLIB_TYPES,
|
|
106
113
|
extractArgsJsonSchema,
|
|
107
114
|
extractScriptSignature,
|
|
108
115
|
typecheckScript
|
|
109
|
-
} from "./cli-
|
|
116
|
+
} from "./cli-krvxq8bc.js";
|
|
110
117
|
import {
|
|
111
118
|
checkHeartbeatChecklist,
|
|
112
119
|
runHeartbeatSweep,
|
|
113
120
|
stopHeartbeat
|
|
114
|
-
} from "./cli-
|
|
121
|
+
} from "./cli-fwxdt7kt.js";
|
|
115
122
|
import {
|
|
116
123
|
createResumeFollowUp,
|
|
117
124
|
createTrackerSync,
|
|
@@ -124,7 +131,7 @@ import {
|
|
|
124
131
|
markTrackerDelivery,
|
|
125
132
|
updateTrackerSync,
|
|
126
133
|
updateTrackerSyncSwarmId
|
|
127
|
-
} from "./cli-
|
|
134
|
+
} from "./cli-4fnp2tc3.js";
|
|
128
135
|
import {
|
|
129
136
|
RawLlmConfigSchema,
|
|
130
137
|
cancelWorkflowRun,
|
|
@@ -134,7 +141,7 @@ import {
|
|
|
134
141
|
retryFailedRun,
|
|
135
142
|
runScript,
|
|
136
143
|
snapshotWorkflow
|
|
137
|
-
} from "./cli-
|
|
144
|
+
} from "./cli-8hyv6c2v.js";
|
|
138
145
|
import {
|
|
139
146
|
getApiKey
|
|
140
147
|
} from "./cli-f14fvzag.js";
|
|
@@ -145,16 +152,16 @@ import {
|
|
|
145
152
|
listScriptVersions,
|
|
146
153
|
listScripts,
|
|
147
154
|
upsertScriptByName
|
|
148
|
-
} from "./cli-
|
|
155
|
+
} from "./cli-gzepjz54.js";
|
|
149
156
|
import {
|
|
150
157
|
searchScripts
|
|
151
|
-
} from "./cli-
|
|
158
|
+
} from "./cli-fygaw191.js";
|
|
152
159
|
import {
|
|
153
160
|
CANDIDATE_SET_MULTIPLIER,
|
|
154
161
|
getEmbeddingProvider,
|
|
155
162
|
getMemoryStore,
|
|
156
163
|
init_constants
|
|
157
|
-
} from "./cli-
|
|
164
|
+
} from "./cli-8w95v19d.js";
|
|
158
165
|
import"./cli-fad8m16k.js";
|
|
159
166
|
import {
|
|
160
167
|
calculateNextRun,
|
|
@@ -162,7 +169,7 @@ import {
|
|
|
162
169
|
ensure,
|
|
163
170
|
initialize,
|
|
164
171
|
require_dist
|
|
165
|
-
} from "./cli-
|
|
172
|
+
} from "./cli-ns0r7mkr.js";
|
|
166
173
|
import {
|
|
167
174
|
TriggerSchemaError,
|
|
168
175
|
WebhookError,
|
|
@@ -174,21 +181,21 @@ import {
|
|
|
174
181
|
validateDefinition,
|
|
175
182
|
validateJsonSchema,
|
|
176
183
|
verifyHmacSignature
|
|
177
|
-
} from "./cli-
|
|
184
|
+
} from "./cli-rttgde5f.js";
|
|
178
185
|
import {
|
|
179
186
|
createAdditiveBuffer
|
|
180
|
-
} from "./cli-
|
|
187
|
+
} from "./cli-dz3d6zjg.js";
|
|
181
188
|
import"./cli-2deg0cen.js";
|
|
182
189
|
import {
|
|
183
190
|
getSlackApp,
|
|
184
191
|
startSlackApp,
|
|
185
192
|
stopSlackApp
|
|
186
|
-
} from "./cli-
|
|
193
|
+
} from "./cli-kk51f3tf.js";
|
|
187
194
|
import"./cli-fete3y1e.js";
|
|
188
195
|
import"./cli-b0p7rfnd.js";
|
|
189
196
|
import {
|
|
190
197
|
recordUnmappedIdentity
|
|
191
|
-
} from "./cli-
|
|
198
|
+
} from "./cli-2qynerth.js";
|
|
192
199
|
import {
|
|
193
200
|
findOrCreateUserByEmail,
|
|
194
201
|
findUserByExternalId,
|
|
@@ -202,7 +209,7 @@ import {
|
|
|
202
209
|
resolveUserByToken,
|
|
203
210
|
revokeToken,
|
|
204
211
|
unlinkIdentity
|
|
205
|
-
} from "./cli-
|
|
212
|
+
} from "./cli-yfwwjeft.js";
|
|
206
213
|
import"./cli-z92pkwzn.js";
|
|
207
214
|
import {
|
|
208
215
|
getAppUrl,
|
|
@@ -219,7 +226,7 @@ import {
|
|
|
219
226
|
gitlabContextKey,
|
|
220
227
|
linearContextKey,
|
|
221
228
|
pageContextKey
|
|
222
|
-
} from "./cli-
|
|
229
|
+
} from "./cli-jt9d9fjw.js";
|
|
223
230
|
import {
|
|
224
231
|
AgentCredStatusSchema,
|
|
225
232
|
AgentLatestModelSchema,
|
|
@@ -254,6 +261,7 @@ import {
|
|
|
254
261
|
PricingTokenClassSchema,
|
|
255
262
|
ProviderNameSchema,
|
|
256
263
|
RepoGuidelinesSchema,
|
|
264
|
+
RepoHooksSchema,
|
|
257
265
|
ResumeReasonSchema,
|
|
258
266
|
ScriptFsModeSchema,
|
|
259
267
|
ScriptRunStatusSchema,
|
|
@@ -266,8 +274,6 @@ import {
|
|
|
266
274
|
WorkflowNodePatchSchema,
|
|
267
275
|
WorkflowPatchSchema,
|
|
268
276
|
WorkflowRunStatusSchema,
|
|
269
|
-
addIssueReaction,
|
|
270
|
-
addReaction,
|
|
271
277
|
backfillSupersedeTaskResumeTaskId,
|
|
272
278
|
cancelTask,
|
|
273
279
|
checkoutPromptTemplate,
|
|
@@ -356,7 +362,6 @@ import {
|
|
|
356
362
|
getEncryptionKey,
|
|
357
363
|
getInboxSummary,
|
|
358
364
|
getInjectableGlobalConfigs,
|
|
359
|
-
getInstallationToken,
|
|
360
365
|
getInstanceActivity,
|
|
361
366
|
getKeyCostSummary,
|
|
362
367
|
getKeyStatuses,
|
|
@@ -424,14 +429,10 @@ import {
|
|
|
424
429
|
heartbeatActiveSession,
|
|
425
430
|
incrKv,
|
|
426
431
|
incrementPageViewCount,
|
|
427
|
-
initGitHub,
|
|
428
432
|
initTelemetry,
|
|
429
|
-
init_app,
|
|
430
433
|
init_crypto,
|
|
431
434
|
init_date_utils,
|
|
432
435
|
init_db,
|
|
433
|
-
init_model_tiers,
|
|
434
|
-
init_reactions,
|
|
435
436
|
init_registry,
|
|
436
437
|
init_request_auth_context,
|
|
437
438
|
init_resolver,
|
|
@@ -445,7 +446,6 @@ import {
|
|
|
445
446
|
installMcpServer,
|
|
446
447
|
installSkill,
|
|
447
448
|
interpolate,
|
|
448
|
-
isGitHubEnabled,
|
|
449
449
|
isReservedConfigKey,
|
|
450
450
|
isTerminalTaskStatus,
|
|
451
451
|
listAgentsWithCredStatusByProvider,
|
|
@@ -476,7 +476,6 @@ import {
|
|
|
476
476
|
registerTemplate,
|
|
477
477
|
reservedKeyError,
|
|
478
478
|
resetEmptyPollCount,
|
|
479
|
-
resetGitHub,
|
|
480
479
|
resetOrphanedInProgressTasksForAgent,
|
|
481
480
|
resetPromptTemplateToDefault,
|
|
482
481
|
resolveApprovalRequest,
|
|
@@ -525,9 +524,8 @@ import {
|
|
|
525
524
|
upsertSkillFile,
|
|
526
525
|
upsertSkillFiles,
|
|
527
526
|
upsertSwarmConfig,
|
|
528
|
-
validateConfigValue
|
|
529
|
-
|
|
530
|
-
} from "./cli-d0t4854c.js";
|
|
527
|
+
validateConfigValue
|
|
528
|
+
} from "./cli-fedn86nz.js";
|
|
531
529
|
import"./cli-z2zcxes1.js";
|
|
532
530
|
import {
|
|
533
531
|
init_zod
|
|
@@ -542,7 +540,7 @@ import {
|
|
|
542
540
|
import {
|
|
543
541
|
init_package,
|
|
544
542
|
package_default
|
|
545
|
-
} from "./cli-
|
|
543
|
+
} from "./cli-85pf4z38.js";
|
|
546
544
|
import {
|
|
547
545
|
init_secret_scrubber,
|
|
548
546
|
refreshSecretScrubberCache,
|
|
@@ -9053,14 +9051,9 @@ async function handleMessageReceived(payload) {
|
|
|
9053
9051
|
}
|
|
9054
9052
|
// src/http/index.ts
|
|
9055
9053
|
init_db();
|
|
9056
|
-
|
|
9057
|
-
// src/github/index.ts
|
|
9058
|
-
init_app();
|
|
9059
|
-
|
|
9060
9054
|
// src/github/handlers.ts
|
|
9061
9055
|
init_db();
|
|
9062
9056
|
init_resolver();
|
|
9063
|
-
init_app();
|
|
9064
9057
|
|
|
9065
9058
|
// src/github/mentions.ts
|
|
9066
9059
|
var GITHUB_BOT_NAME = process.env.GITHUB_BOT_NAME || "agent-swarm-bot";
|
|
@@ -9095,9 +9088,6 @@ function isBotAssignee(assigneeLogin) {
|
|
|
9095
9088
|
return BOT_NAMES.includes(assigneeLogin.toLowerCase());
|
|
9096
9089
|
}
|
|
9097
9090
|
|
|
9098
|
-
// src/github/handlers.ts
|
|
9099
|
-
init_reactions();
|
|
9100
|
-
|
|
9101
9091
|
// src/github/templates.ts
|
|
9102
9092
|
init_registry();
|
|
9103
9093
|
registerTemplate({
|
|
@@ -10219,10 +10209,6 @@ async function handleWorkflowRun(event) {
|
|
|
10219
10209
|
console.log(`[GitHub:suppressed] workflow_run.${action} (${conclusion}) on ${repository.full_name} — CI events disabled by default`);
|
|
10220
10210
|
return { created: false };
|
|
10221
10211
|
}
|
|
10222
|
-
|
|
10223
|
-
// src/github/index.ts
|
|
10224
|
-
init_reactions();
|
|
10225
|
-
|
|
10226
10212
|
// src/gitlab/auth.ts
|
|
10227
10213
|
var initialized2 = false;
|
|
10228
10214
|
var webhookSecret2 = null;
|
|
@@ -11460,7 +11446,7 @@ async function notifySlack(text) {
|
|
|
11460
11446
|
return;
|
|
11461
11447
|
}
|
|
11462
11448
|
try {
|
|
11463
|
-
const { getSlackApp: getSlackApp2 } = await import("./app-
|
|
11449
|
+
const { getSlackApp: getSlackApp2 } = await import("./app-xm3xsdye.js");
|
|
11464
11450
|
const app = getSlackApp2();
|
|
11465
11451
|
if (!app) {
|
|
11466
11452
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -11529,7 +11515,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
11529
11515
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
11530
11516
|
}
|
|
11531
11517
|
async function overwriteWebhookIds(next) {
|
|
11532
|
-
const { getDb: getDb2 } = await import("./db-
|
|
11518
|
+
const { getDb: getDb2 } = await import("./db-azrvwsnj.js");
|
|
11533
11519
|
const db = getDb2();
|
|
11534
11520
|
const txn = db.transaction(() => {
|
|
11535
11521
|
const row = db.query("SELECT metadata FROM oauth_apps WHERE provider = 'jira'").get();
|
|
@@ -84318,6 +84304,15 @@ function stopScriptRunSupervisor() {
|
|
|
84318
84304
|
for (const runId of [...managed.keys()])
|
|
84319
84305
|
terminateScriptRunProcess(runId);
|
|
84320
84306
|
}
|
|
84307
|
+
|
|
84308
|
+
// src/server-runtime-counters.ts
|
|
84309
|
+
var runtimeCounters = globalThis;
|
|
84310
|
+
function incrementServerSessionsProcessed() {
|
|
84311
|
+
runtimeCounters.__agentSwarmServerSessionsProcessed = (runtimeCounters.__agentSwarmServerSessionsProcessed ?? 0) + 1;
|
|
84312
|
+
}
|
|
84313
|
+
function getServerSessionsProcessed() {
|
|
84314
|
+
return runtimeCounters.__agentSwarmServerSessionsProcessed ?? 0;
|
|
84315
|
+
}
|
|
84321
84316
|
// src/http/index.ts
|
|
84322
84317
|
init_telemetry();
|
|
84323
84318
|
init_secret_scrubber();
|
|
@@ -84517,6 +84512,7 @@ async function handleActiveSessions(req, res, pathSegments, queryParams, myAgent
|
|
|
84517
84512
|
// src/http/agents.ts
|
|
84518
84513
|
init_zod();
|
|
84519
84514
|
init_db();
|
|
84515
|
+
init_telemetry();
|
|
84520
84516
|
init_types();
|
|
84521
84517
|
var registerAgent = route({
|
|
84522
84518
|
method: "post",
|
|
@@ -84753,6 +84749,11 @@ async function handleAgentRegister(req, res, pathSegments, myAgentId) {
|
|
|
84753
84749
|
});
|
|
84754
84750
|
return { agent, created: true };
|
|
84755
84751
|
})();
|
|
84752
|
+
telemetry.agent("registered", {
|
|
84753
|
+
role: parsed.body.role,
|
|
84754
|
+
capabilities: parsed.body.capabilities ?? [],
|
|
84755
|
+
isReconnect: !result.created
|
|
84756
|
+
});
|
|
84756
84757
|
if (result.created) {
|
|
84757
84758
|
ensure({
|
|
84758
84759
|
id: "registered",
|
|
@@ -91675,7 +91676,7 @@ import { randomUUID as randomUUID2 } from "node:crypto";
|
|
|
91675
91676
|
// src/server-user.ts
|
|
91676
91677
|
init_zod();
|
|
91677
91678
|
init_package();
|
|
91678
|
-
|
|
91679
|
+
init_types();
|
|
91679
91680
|
var userSendTaskInputSchema = object({
|
|
91680
91681
|
task: string().min(1).describe("The task description to send."),
|
|
91681
91682
|
taskType: string().max(50).optional().describe("Task type (e.g., 'bug', 'feature', 'review')."),
|
|
@@ -95241,6 +95242,7 @@ var createRepo = route({
|
|
|
95241
95242
|
clonePath: exports_external.string().optional(),
|
|
95242
95243
|
defaultBranch: exports_external.string().optional(),
|
|
95243
95244
|
autoClone: exports_external.boolean().optional(),
|
|
95245
|
+
hooks: RepoHooksSchema.optional(),
|
|
95244
95246
|
guidelines: RepoGuidelinesSchema.nullable().optional()
|
|
95245
95247
|
}),
|
|
95246
95248
|
responses: {
|
|
@@ -95262,6 +95264,7 @@ var updateRepo = route({
|
|
|
95262
95264
|
clonePath: exports_external.string().optional(),
|
|
95263
95265
|
defaultBranch: exports_external.string().optional(),
|
|
95264
95266
|
autoClone: exports_external.boolean().optional(),
|
|
95267
|
+
hooks: RepoHooksSchema.nullable().optional(),
|
|
95265
95268
|
guidelines: RepoGuidelinesSchema.nullable().optional()
|
|
95266
95269
|
}),
|
|
95267
95270
|
responses: {
|
|
@@ -95319,6 +95322,7 @@ async function handleRepos(req, res, pathSegments, queryParams) {
|
|
|
95319
95322
|
clonePath: parsed.body.clonePath,
|
|
95320
95323
|
defaultBranch: parsed.body.defaultBranch,
|
|
95321
95324
|
autoClone: parsed.body.autoClone,
|
|
95325
|
+
hooks: parsed.body.hooks,
|
|
95322
95326
|
guidelines: parsed.body.guidelines
|
|
95323
95327
|
});
|
|
95324
95328
|
json(res, repo, 201);
|
|
@@ -95343,6 +95347,7 @@ async function handleRepos(req, res, pathSegments, queryParams) {
|
|
|
95343
95347
|
clonePath: parsed.body.clonePath,
|
|
95344
95348
|
defaultBranch: parsed.body.defaultBranch,
|
|
95345
95349
|
autoClone: parsed.body.autoClone,
|
|
95350
|
+
hooks: parsed.body.hooks,
|
|
95346
95351
|
guidelines: parsed.body.guidelines
|
|
95347
95352
|
});
|
|
95348
95353
|
if (!updated) {
|
|
@@ -95379,7 +95384,7 @@ async function handleRepos(req, res, pathSegments, queryParams) {
|
|
|
95379
95384
|
init_zod();
|
|
95380
95385
|
var import_cron_parser = __toESM(require_dist(), 1);
|
|
95381
95386
|
init_db();
|
|
95382
|
-
|
|
95387
|
+
init_types();
|
|
95383
95388
|
var createSchedule = route({
|
|
95384
95389
|
method: "post",
|
|
95385
95390
|
path: "/api/schedules",
|
|
@@ -96979,6 +96984,7 @@ async function handleSessionData(req, res, pathSegments, queryParams, _myAgentId
|
|
|
96979
96984
|
isError: parsed.body.isError ?? false,
|
|
96980
96985
|
costSource
|
|
96981
96986
|
});
|
|
96987
|
+
incrementServerSessionsProcessed();
|
|
96982
96988
|
json(res, { success: true, cost }, 201);
|
|
96983
96989
|
} catch (error) {
|
|
96984
96990
|
console.error("[HTTP] Failed to create session cost:", error);
|
|
@@ -98443,7 +98449,6 @@ async function handleTaskTemplates(req, res, pathSegments, queryParams) {
|
|
|
98443
98449
|
// src/http/tasks.ts
|
|
98444
98450
|
init_zod();
|
|
98445
98451
|
init_db();
|
|
98446
|
-
init_model_tiers();
|
|
98447
98452
|
init_types();
|
|
98448
98453
|
init_request_auth_context();
|
|
98449
98454
|
var listTasks = route({
|
|
@@ -101805,6 +101810,7 @@ async function handleWorkflows(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
101805
101810
|
let runId;
|
|
101806
101811
|
try {
|
|
101807
101812
|
runId = await startWorkflowExecution(workflow, body, getExecutorRegistry(), {
|
|
101813
|
+
triggerType: "api",
|
|
101808
101814
|
requestedByUserId: auth?.kind === "user" ? auth.userId : undefined
|
|
101809
101815
|
});
|
|
101810
101816
|
} catch (err) {
|
|
@@ -101883,6 +101889,8 @@ var apiKey = getApiKey();
|
|
|
101883
101889
|
var globalState = globalThis;
|
|
101884
101890
|
var API_GC_INTERVAL_MS = 5 * 60 * 1000;
|
|
101885
101891
|
var MCP_TRANSPORT_IDLE_TIMEOUT_MS = DEFAULT_MCP_TRANSPORT_IDLE_TIMEOUT_MS;
|
|
101892
|
+
var serverStartedAt = Date.now();
|
|
101893
|
+
var shutdownSignal = "unknown";
|
|
101886
101894
|
function scheduleApiGc(reason) {
|
|
101887
101895
|
const gc = globalThis.gc;
|
|
101888
101896
|
if (typeof gc !== "function")
|
|
@@ -102076,15 +102084,20 @@ globalState.__transportActivity = transportActivity;
|
|
|
102076
102084
|
globalState.__transportActivityUser = transportActivityUser;
|
|
102077
102085
|
async function shutdown() {
|
|
102078
102086
|
console.log("Shutting down HTTP server...");
|
|
102087
|
+
telemetry.server("shutdown", {
|
|
102088
|
+
signal: shutdownSignal,
|
|
102089
|
+
uptimeMs: Date.now() - serverStartedAt,
|
|
102090
|
+
sessionsProcessed: getServerSessionsProcessed()
|
|
102091
|
+
});
|
|
102079
102092
|
if (hasCapability("scheduling")) {
|
|
102080
|
-
const { stopScheduler } = await import("./index-
|
|
102093
|
+
const { stopScheduler } = await import("./index-bfh9hgek.js");
|
|
102081
102094
|
stopScheduler();
|
|
102082
102095
|
}
|
|
102083
102096
|
stopHeartbeat();
|
|
102084
102097
|
stopScriptRunSupervisor();
|
|
102085
102098
|
await stopSlackApp();
|
|
102086
102099
|
if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
|
|
102087
|
-
const { stopOAuthKeepalive } = await import("./keepalive-
|
|
102100
|
+
const { stopOAuthKeepalive } = await import("./keepalive-a0dg5pds.js");
|
|
102088
102101
|
await stopOAuthKeepalive();
|
|
102089
102102
|
}
|
|
102090
102103
|
stopMcpOAuthPendingGc();
|
|
@@ -102115,8 +102128,14 @@ async function shutdown() {
|
|
|
102115
102128
|
}
|
|
102116
102129
|
if (!globalState.__sigintRegistered) {
|
|
102117
102130
|
globalState.__sigintRegistered = true;
|
|
102118
|
-
process.on("SIGINT",
|
|
102119
|
-
|
|
102131
|
+
process.on("SIGINT", () => {
|
|
102132
|
+
shutdownSignal = "SIGINT";
|
|
102133
|
+
shutdown();
|
|
102134
|
+
});
|
|
102135
|
+
process.on("SIGTERM", () => {
|
|
102136
|
+
shutdownSignal = "SIGTERM";
|
|
102137
|
+
shutdown();
|
|
102138
|
+
});
|
|
102120
102139
|
}
|
|
102121
102140
|
if (!globalState.__runId) {
|
|
102122
102141
|
globalState.__runId = `run_${Date.now()}`;
|
|
@@ -102130,15 +102149,15 @@ try {
|
|
|
102130
102149
|
throw err;
|
|
102131
102150
|
}
|
|
102132
102151
|
try {
|
|
102133
|
-
const { seedPricingFromModelsDev } = await import("./seed-pricing-
|
|
102152
|
+
const { seedPricingFromModelsDev } = await import("./seed-pricing-56tjm1fj.js");
|
|
102134
102153
|
seedPricingFromModelsDev();
|
|
102135
|
-
const { startPricingRefreshLoop } = await import("./pricing-refresh-
|
|
102154
|
+
const { startPricingRefreshLoop } = await import("./pricing-refresh-xqnzh8dt.js");
|
|
102136
102155
|
startPricingRefreshLoop();
|
|
102137
102156
|
} catch (err) {
|
|
102138
102157
|
console.error("[startup] Failed to seed pricing rows:", err);
|
|
102139
102158
|
}
|
|
102140
102159
|
try {
|
|
102141
|
-
const { runAllSeeders } = await import("./index-
|
|
102160
|
+
const { runAllSeeders } = await import("./index-29vg51x6.js");
|
|
102142
102161
|
await runAllSeeders({ scriptEmbeddingMode: "skip" });
|
|
102143
102162
|
} catch (err) {
|
|
102144
102163
|
console.error("[startup] Failed to seed built-in entities:", err);
|
|
@@ -102171,31 +102190,31 @@ httpServer.listen(port, async () => {
|
|
|
102171
102190
|
initWorkflows();
|
|
102172
102191
|
startScriptRunSupervisor(getMcpBaseUrl());
|
|
102173
102192
|
if (hasCapability("scheduling")) {
|
|
102174
|
-
const { startScheduler } = await import("./index-
|
|
102175
|
-
const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-
|
|
102193
|
+
const { startScheduler } = await import("./index-bfh9hgek.js");
|
|
102194
|
+
const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-h2yqjyk0.js");
|
|
102176
102195
|
const intervalMs = Number(process.env.SCHEDULER_INTERVAL_MS) || 1e4;
|
|
102177
102196
|
startScheduler(getExecutorRegistry2(), intervalMs, {
|
|
102178
102197
|
runId: globalState.__runId
|
|
102179
102198
|
});
|
|
102180
102199
|
}
|
|
102181
102200
|
if (process.env.HEARTBEAT_DISABLE !== "true") {
|
|
102182
|
-
const { startHeartbeat } = await import("./index-
|
|
102201
|
+
const { startHeartbeat } = await import("./index-3c651yfk.js");
|
|
102183
102202
|
const heartbeatMs = Number(process.env.HEARTBEAT_INTERVAL_MS) || 90000;
|
|
102184
102203
|
startHeartbeat(heartbeatMs);
|
|
102185
102204
|
}
|
|
102186
102205
|
if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
|
|
102187
|
-
const { startOAuthKeepalive } = await import("./keepalive-
|
|
102206
|
+
const { startOAuthKeepalive } = await import("./keepalive-a0dg5pds.js");
|
|
102188
102207
|
startOAuthKeepalive();
|
|
102189
102208
|
}
|
|
102190
102209
|
startMcpOAuthPendingGc();
|
|
102191
102210
|
startMemoryGc();
|
|
102192
|
-
import("./boot-reembed-
|
|
102211
|
+
import("./boot-reembed-9cxqka3e.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
|
|
102193
102212
|
console.error("[boot-reembed] startup backfill failed (non-fatal):", err);
|
|
102194
102213
|
});
|
|
102195
|
-
import("./boot-reembed-
|
|
102214
|
+
import("./boot-reembed-chxhrwv8.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
|
|
102196
102215
|
console.error("[boot-reembed-scripts] startup backfill failed (non-fatal):", err);
|
|
102197
102216
|
});
|
|
102198
|
-
import("./boot-scrub-logs-
|
|
102217
|
+
import("./boot-scrub-logs-8qtfkcz8.js").then(({ runBootScrubLogs }) => runBootScrubLogs()).catch((err) => {
|
|
102199
102218
|
console.error("[boot-scrub-logs] startup scrub failed (non-fatal):", err);
|
|
102200
102219
|
});
|
|
102201
102220
|
}).on("error", (err) => {
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
extractArgsJsonSchema,
|
|
3
3
|
extractScriptSignature,
|
|
4
4
|
typecheckScript
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-krvxq8bc.js";
|
|
6
6
|
import {
|
|
7
7
|
getScript,
|
|
8
8
|
upsertScriptByName,
|
|
9
9
|
validateScriptImports
|
|
10
|
-
} from "./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
10
|
+
} from "./cli-gzepjz54.js";
|
|
11
|
+
import"./cli-fygaw191.js";
|
|
12
|
+
import"./cli-8w95v19d.js";
|
|
13
13
|
import {
|
|
14
14
|
computeContentHash,
|
|
15
15
|
createSkill,
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
getSkillByName,
|
|
18
18
|
init_db,
|
|
19
19
|
updateSkill
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-fedn86nz.js";
|
|
21
21
|
import"./cli-z2zcxes1.js";
|
|
22
22
|
import"./cli-q21d49ac.js";
|
|
23
23
|
import"./cli-anrj584m.js";
|
|
24
|
-
import"./cli-
|
|
24
|
+
import"./cli-85pf4z38.js";
|
|
25
25
|
import"./cli-3pp1362w.js";
|
|
26
26
|
import"./cli-p9swy5t3.js";
|
|
27
27
|
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
runRebootSweep,
|
|
4
4
|
startHeartbeat,
|
|
5
5
|
stopHeartbeat
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
} from "./cli-fwxdt7kt.js";
|
|
7
|
+
import"./cli-4fnp2tc3.js";
|
|
8
|
+
import"./cli-8hyv6c2v.js";
|
|
9
9
|
import"./cli-f14fvzag.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
10
|
+
import"./cli-gzepjz54.js";
|
|
11
|
+
import"./cli-fygaw191.js";
|
|
12
|
+
import"./cli-8w95v19d.js";
|
|
13
|
+
import"./cli-rttgde5f.js";
|
|
14
14
|
import"./cli-dh55d5fg.js";
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
import"./cli-jt9d9fjw.js";
|
|
16
|
+
import"./cli-fedn86nz.js";
|
|
17
17
|
import"./cli-z2zcxes1.js";
|
|
18
18
|
import"./cli-q21d49ac.js";
|
|
19
19
|
import"./cli-anrj584m.js";
|
|
20
|
-
import"./cli-
|
|
20
|
+
import"./cli-85pf4z38.js";
|
|
21
21
|
import"./cli-3pp1362w.js";
|
|
22
22
|
import"./cli-9aryf9tv.js";
|
|
23
23
|
import"./cli-p9swy5t3.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
runScheduleNow,
|
|
4
4
|
startScheduler,
|
|
5
5
|
stopScheduler
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
6
|
+
} from "./cli-ns0r7mkr.js";
|
|
7
|
+
import"./cli-rttgde5f.js";
|
|
8
|
+
import"./cli-jt9d9fjw.js";
|
|
9
|
+
import"./cli-fedn86nz.js";
|
|
10
10
|
import"./cli-z2zcxes1.js";
|
|
11
11
|
import"./cli-q21d49ac.js";
|
|
12
12
|
import"./cli-anrj584m.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-85pf4z38.js";
|
|
14
14
|
import"./cli-3pp1362w.js";
|
|
15
15
|
import"./cli-p9swy5t3.js";
|
|
16
16
|
export {
|
|
@@ -15,27 +15,27 @@ import {
|
|
|
15
15
|
stopWaitPoller,
|
|
16
16
|
subscribeWaitToBus,
|
|
17
17
|
validateTemplateVariables
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-8hyv6c2v.js";
|
|
19
19
|
import"./cli-f14fvzag.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
20
|
+
import"./cli-gzepjz54.js";
|
|
21
|
+
import"./cli-fygaw191.js";
|
|
22
|
+
import"./cli-8w95v19d.js";
|
|
23
23
|
import {
|
|
24
24
|
findEntryNodes,
|
|
25
25
|
getSuccessors,
|
|
26
26
|
handleScheduleTrigger,
|
|
27
27
|
handleWebhookTrigger,
|
|
28
28
|
startWorkflowExecution
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-rttgde5f.js";
|
|
30
30
|
import"./cli-dh55d5fg.js";
|
|
31
|
-
import"./cli-
|
|
31
|
+
import"./cli-jt9d9fjw.js";
|
|
32
32
|
import {
|
|
33
33
|
interpolate
|
|
34
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-fedn86nz.js";
|
|
35
35
|
import"./cli-z2zcxes1.js";
|
|
36
36
|
import"./cli-q21d49ac.js";
|
|
37
37
|
import"./cli-anrj584m.js";
|
|
38
|
-
import"./cli-
|
|
38
|
+
import"./cli-85pf4z38.js";
|
|
39
39
|
import"./cli-3pp1362w.js";
|
|
40
40
|
import {
|
|
41
41
|
workflowEventBus
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureTokenOrThrow
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-v9283nma.js";
|
|
4
|
+
import"./cli-fedn86nz.js";
|
|
5
5
|
import"./cli-z2zcxes1.js";
|
|
6
6
|
import"./cli-q21d49ac.js";
|
|
7
7
|
import"./cli-anrj584m.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-85pf4z38.js";
|
|
9
9
|
import"./cli-3pp1362w.js";
|
|
10
10
|
import {
|
|
11
11
|
__require
|
|
@@ -54,7 +54,7 @@ async function notifySlack(text) {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
try {
|
|
57
|
-
const { getSlackApp } = await import("./app-
|
|
57
|
+
const { getSlackApp } = await import("./app-xm3xsdye.js");
|
|
58
58
|
const app = getSlackApp();
|
|
59
59
|
if (!app) {
|
|
60
60
|
console.warn("[OAuth Keepalive] Slack not available, cannot send notification");
|