@desplega.ai/agent-swarm 1.124.0 → 1.125.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-z3d0fk7z.js → actions-3aky6er5.js} +6 -5
- package/dist/{app-q2rc9tdr.js → app-xbt4n4mt.js} +4 -3
- package/dist/{assistant-3stjq7fz.js → assistant-ncftbs9t.js} +12 -10
- package/dist/{boot-reembed-v6r1df32.js → boot-reembed-00cxm1mj.js} +5 -4
- package/dist/{boot-reembed-5867whnb.js → boot-reembed-5xxzva12.js} +4 -3
- package/dist/{boot-scrub-logs-8b8jegk3.js → boot-scrub-logs-9cmcq6ez.js} +3 -2
- package/dist/{cli-0925phzv.js → cli-0w3mk6r2.js} +1 -1
- package/dist/{cli-zxb72ctk.js → cli-3x5aphbt.js} +2 -2
- package/dist/{cli-exfs8aym.js → cli-3y8xyp0b.js} +7 -1
- package/dist/{cli-2yr6edr7.js → cli-4xft7caa.js} +4 -4
- package/dist/{cli-kk58tg33.js → cli-5a4nmfrn.js} +12 -10
- package/dist/{cli-5jn6wnd9.js → cli-88r31vx9.js} +2 -2
- package/dist/{cli-sqv6c9b8.js → cli-8bkwn1wv.js} +11 -9
- package/dist/{cli-p0zgv8pj.js → cli-8vzddbs7.js} +2 -1
- package/dist/{cli-qf7acvyr.js → cli-94796kxr.js} +2 -2
- package/dist/{cli-wn3m6q54.js → cli-dbmh9yqn.js} +7 -5
- package/dist/{cli-p0ec4vv6.js → cli-ff8b5cbe.js} +1 -1
- package/dist/{cli-y43n987v.js → cli-gbx122ge.js} +1 -1
- package/dist/{cli-ykthjw29.js → cli-jcavqvh7.js} +20 -24
- package/dist/cli-k1py8264.js +1129 -0
- package/dist/{cli-qwsagsmg.js → cli-k5c6jfzn.js} +1 -1
- package/dist/{cli-gkvf8d83.js → cli-n02497b2.js} +5 -3
- package/dist/{cli-vm20sh8d.js → cli-nqq9tthd.js} +9 -7
- package/dist/{cli-jp4mdj9d.js → cli-pqtrhrss.js} +2 -2
- package/dist/{cli-gzjsamwc.js → cli-q92pr3rt.js} +1 -1
- package/dist/{cli-mmk5vagg.js → cli-qzy21svh.js} +2 -2
- package/dist/{cli-dq2ssyf0.js → cli-refygp3c.js} +5 -5
- package/dist/{cli-perb20ma.js → cli-tar44ekp.js} +1 -1
- package/dist/{cli-h89g0qrd.js → cli-v292k2fv.js} +1 -1
- package/dist/{cli-mcez7z4p.js → cli-vvbwy286.js} +1 -1
- package/dist/{cli-x268say8.js → cli-wbcsjpyv.js} +366 -68
- package/dist/cli-wdrrgv4m.js +22 -0
- package/dist/{cli-3z4q09tn.js → cli-yr11vvst.js} +32 -1127
- package/dist/{cli-92bqgbgy.js → cli-zhp3t49e.js} +4 -2
- package/dist/cli.js +23 -10
- package/dist/{codex-adapter-vcseqpwf.js → codex-adapter-mqczt8xv.js} +1 -1
- package/dist/codex-hook-emq42pfq.js +106 -0
- package/dist/{codex-session-runner-jec9e9t1.js → codex-session-runner-mrwz1h50.js} +1 -1
- package/dist/{commands-sda76yn8.js → commands-7dbx98fp.js} +5 -3
- package/dist/{db-vn9e4rqj.js → db-r5705rk8.js} +7 -2
- package/dist/{handlers-xfja18ac.js → handlers-8kj038es.js} +12 -10
- package/dist/{hook-2medrp47.js → hook-2590fnyk.js} +1 -1
- package/dist/{http-937pyjfc.js → http-8yej35d0.js} +77 -55
- package/dist/{index-vah60vxp.js → index-hy73j39b.js} +8 -7
- package/dist/{index-knqczmnm.js → index-kgay2v5w.js} +11 -10
- package/dist/{index-gw4en7jg.js → index-v3n4hb3w.js} +10 -9
- package/dist/{index-2bqd2q9v.js → index-x1n3tybc.js} +12 -11
- package/dist/{keepalive-20rd6hxh.js → keepalive-q8yg6d6r.js} +6 -5
- package/dist/{lead-7w2k3a49.js → lead-yxtt169p.js} +23 -21
- package/dist/{maintenance-p3x918yw.js → maintenance-70cskw5t.js} +5 -4
- package/dist/{oauth-refresh-sweep-shm0nzm4.js → oauth-refresh-sweep-90h9rzx8.js} +5 -4
- package/dist/{onboard-py9dnf54.js → onboard-20reqz6j.js} +2 -2
- package/dist/{otel-impl-7yjkfg68.js → otel-impl-vja8f9mm.js} +1 -1
- package/dist/{pricing-refresh-3snb6370.js → pricing-refresh-34mbexgm.js} +5 -4
- package/dist/{rbac-roles-gqxdp8st.js → rbac-roles-s1qnewkt.js} +5 -4
- package/dist/{rbac-roles-5e72bbpk.js → rbac-roles-sa59eyp4.js} +4 -3
- package/dist/{seed-pricing-bg42d7h2.js → seed-pricing-p5fnj0qd.js} +4 -3
- package/dist/{setup-nzk3kbbq.js → setup-p9yq3mb2.js} +2 -2
- package/dist/{worker-0p1jdzkm.js → worker-21zrq8cd.js} +23 -21
- package/openapi.json +1 -1
- package/package.json +2 -1
- package/src/be/db.ts +30 -0
- package/src/cli.tsx +12 -0
- package/src/commands/runner.ts +11 -23
- package/src/hooks/codex-hook.ts +157 -0
- package/src/http/kv.ts +37 -8
- package/src/http/mcp-bridge.ts +3 -2
- package/src/kv-overflow.ts +20 -0
- package/src/prompts/steering-delivery.ts +32 -0
- package/src/providers/codex-adapter.ts +20 -4
- package/src/providers/types.ts +8 -0
- package/src/script-workflows/harness.ts +5 -1
- package/src/script-workflows/workflow-ctx.ts +6 -7
- package/src/scripts-runtime/eval-harness.ts +11 -2
- package/src/scripts-runtime/extract-args-schema.ts +5 -1
- package/src/scripts-runtime/response-limit.ts +50 -0
- package/src/scripts-runtime/swarm-sdk.ts +3 -4
- package/src/tests/claude-adapter-binary.test.ts +64 -32
- package/src/tests/codex-steering-hook.test.ts +224 -0
- package/src/tests/kv-http.test.ts +35 -1
- package/src/tests/kv-storage.test.ts +45 -0
- package/src/tests/kv-tool.test.ts +51 -0
- package/src/tests/run-bun-tests.test.ts +171 -0
- package/src/tests/scripts-mcp-e2e.test.ts +105 -1
- package/src/tests/scripts-runtime.test.ts +33 -0
- package/src/tests/sdk-allowlist.test.ts +27 -1
- package/src/tests/slack-read-boundaries.test.ts +229 -0
- package/src/tests/steering-core.test.ts +19 -19
- package/src/tests/steering-transport.test.ts +21 -3
- package/src/tests/store-progress-attachments-handler.test.ts +45 -10
- package/src/tests/swarm-tool-result-gate.test.ts +300 -21
- package/src/tests/tool-output-agent-id.test.ts +9 -3
- package/src/tests/tool-registrar-no-input.test.ts +6 -0
- package/src/tools/kv/kv-get.ts +10 -0
- package/src/tools/kv/kv-list.ts +7 -0
- package/src/tools/kv/kv-read-auth.ts +13 -0
- package/src/tools/kv/kv-write-auth.ts +4 -0
- package/src/tools/steer-task.ts +1 -1
- package/src/tools/store-progress.ts +24 -7
- package/src/tools/utils.ts +403 -43
- package/src/types.ts +7 -1
|
@@ -98,6 +98,8 @@ import {
|
|
|
98
98
|
loadGlobalConfigsIntoEnv,
|
|
99
99
|
markKapsoMessageRead,
|
|
100
100
|
markKapsoMessageSeen,
|
|
101
|
+
markScriptSdkRequestOrigin,
|
|
102
|
+
mcpOverflowAuthError,
|
|
101
103
|
mergeScheduleTiming,
|
|
102
104
|
parseBody,
|
|
103
105
|
parseQueryParams,
|
|
@@ -145,7 +147,7 @@ import {
|
|
|
145
147
|
withRemoteContext,
|
|
146
148
|
withSpanContext,
|
|
147
149
|
writeSkillsToFilesystem
|
|
148
|
-
} from "./cli-
|
|
150
|
+
} from "./cli-wbcsjpyv.js";
|
|
149
151
|
import"./cli-1z7048dy.js";
|
|
150
152
|
import {
|
|
151
153
|
Anthropic
|
|
@@ -168,23 +170,23 @@ import {
|
|
|
168
170
|
ensure,
|
|
169
171
|
initialize,
|
|
170
172
|
require_dist
|
|
171
|
-
} from "./cli-
|
|
173
|
+
} from "./cli-4xft7caa.js";
|
|
172
174
|
import {
|
|
173
175
|
getModelsCatalog
|
|
174
|
-
} from "./cli-
|
|
176
|
+
} from "./cli-94796kxr.js";
|
|
175
177
|
import {
|
|
176
178
|
normalizeModelKey
|
|
177
|
-
} from "./cli-
|
|
179
|
+
} from "./cli-q92pr3rt.js";
|
|
178
180
|
import {
|
|
179
181
|
getUserGrant
|
|
180
|
-
} from "./cli-
|
|
182
|
+
} from "./cli-3x5aphbt.js";
|
|
181
183
|
import {
|
|
182
184
|
can,
|
|
183
185
|
clearAuditSink,
|
|
184
186
|
decideToolAdmission,
|
|
185
187
|
isRbacEnabled,
|
|
186
188
|
setAuditSink
|
|
187
|
-
} from "./cli-
|
|
189
|
+
} from "./cli-gbx122ge.js";
|
|
188
190
|
import {
|
|
189
191
|
ensureAgentFsCredentialsForAgent,
|
|
190
192
|
extractArgsJsonSchema,
|
|
@@ -193,16 +195,16 @@ import {
|
|
|
193
195
|
scriptSdkTypesWithGeneratedApis,
|
|
194
196
|
scriptStdlibTypesWithGeneratedApis,
|
|
195
197
|
typecheckScript
|
|
196
|
-
} from "./cli-
|
|
198
|
+
} from "./cli-88r31vx9.js";
|
|
197
199
|
import {
|
|
198
200
|
checkHeartbeatChecklist,
|
|
199
201
|
runHeartbeatSweep,
|
|
200
202
|
stopHeartbeat
|
|
201
|
-
} from "./cli-
|
|
203
|
+
} from "./cli-nqq9tthd.js";
|
|
202
204
|
import {
|
|
203
205
|
createResumeFollowUp,
|
|
204
206
|
createWorkerTaskFollowUp
|
|
205
|
-
} from "./cli-
|
|
207
|
+
} from "./cli-n02497b2.js";
|
|
206
208
|
import {
|
|
207
209
|
RawLlmConfigSchema,
|
|
208
210
|
TriggerSchemaError,
|
|
@@ -224,7 +226,7 @@ import {
|
|
|
224
226
|
validateDefinition,
|
|
225
227
|
validateJsonSchema,
|
|
226
228
|
verifyHmacSignature
|
|
227
|
-
} from "./cli-
|
|
229
|
+
} from "./cli-5a4nmfrn.js";
|
|
228
230
|
import {
|
|
229
231
|
getApiKey
|
|
230
232
|
} from "./cli-f14fvzag.js";
|
|
@@ -235,7 +237,7 @@ import {
|
|
|
235
237
|
forceRefreshAuthorizationOrThrow,
|
|
236
238
|
forceRefreshTokenOrThrow,
|
|
237
239
|
oauthAppRowToProviderConfig
|
|
238
|
-
} from "./cli-
|
|
240
|
+
} from "./cli-v292k2fv.js";
|
|
239
241
|
import {
|
|
240
242
|
ConnectionAuthInputSchema,
|
|
241
243
|
applyMcpOAuthRefresh,
|
|
@@ -286,11 +288,11 @@ import {
|
|
|
286
288
|
upsertMcpOAuthToken,
|
|
287
289
|
upsertScriptByName,
|
|
288
290
|
upsertScriptConnection
|
|
289
|
-
} from "./cli-
|
|
291
|
+
} from "./cli-dbmh9yqn.js";
|
|
290
292
|
import"./cli-jkhwmmgg.js";
|
|
291
293
|
import {
|
|
292
294
|
searchScripts
|
|
293
|
-
} from "./cli-
|
|
295
|
+
} from "./cli-qzy21svh.js";
|
|
294
296
|
import {
|
|
295
297
|
CANDIDATE_SET_MULTIPLIER,
|
|
296
298
|
getEmbeddingProvider,
|
|
@@ -298,7 +300,7 @@ import {
|
|
|
298
300
|
init_constants,
|
|
299
301
|
init_reranker,
|
|
300
302
|
rerank
|
|
301
|
-
} from "./cli-
|
|
303
|
+
} from "./cli-ff8b5cbe.js";
|
|
302
304
|
import"./cli-q25ejbyn.js";
|
|
303
305
|
import {
|
|
304
306
|
acquireOAuthRefreshLock,
|
|
@@ -318,14 +320,14 @@ import {
|
|
|
318
320
|
updateAuthorizationIdentity,
|
|
319
321
|
updateOAuthAppById,
|
|
320
322
|
upsertAuthorization
|
|
321
|
-
} from "./cli-
|
|
323
|
+
} from "./cli-vvbwy286.js";
|
|
322
324
|
import"./cli-fad8m16k.js";
|
|
323
325
|
import {
|
|
324
326
|
FilesError,
|
|
325
327
|
getFileStorageProvider,
|
|
326
328
|
normalizeFilesError
|
|
327
329
|
} from "./cli-95kferzh.js";
|
|
328
|
-
import"./cli-
|
|
330
|
+
import"./cli-zhp3t49e.js";
|
|
329
331
|
import {
|
|
330
332
|
findUserById,
|
|
331
333
|
fingerprintApiKey,
|
|
@@ -341,15 +343,15 @@ import {
|
|
|
341
343
|
resolveUserByToken,
|
|
342
344
|
revokeToken,
|
|
343
345
|
unlinkIdentity
|
|
344
|
-
} from "./cli-
|
|
346
|
+
} from "./cli-0w3mk6r2.js";
|
|
345
347
|
import {
|
|
346
348
|
createTaskWithSiblingAwareness
|
|
347
|
-
} from "./cli-
|
|
349
|
+
} from "./cli-k5c6jfzn.js";
|
|
348
350
|
import {
|
|
349
351
|
getSlackApp,
|
|
350
352
|
startSlackApp,
|
|
351
353
|
stopSlackApp
|
|
352
|
-
} from "./cli-
|
|
354
|
+
} from "./cli-refygp3c.js";
|
|
353
355
|
import"./cli-rkndnn90.js";
|
|
354
356
|
import"./cli-b0p7rfnd.js";
|
|
355
357
|
import"./cli-5ncdb7ff.js";
|
|
@@ -492,7 +494,6 @@ import {
|
|
|
492
494
|
getAllServices,
|
|
493
495
|
getAllSessionCosts,
|
|
494
496
|
getAllTasks,
|
|
495
|
-
getAllTemplateDefinitions,
|
|
496
497
|
getAllUsers,
|
|
497
498
|
getApprovalRequestById,
|
|
498
499
|
getAvailableKeyIndices,
|
|
@@ -565,7 +566,6 @@ import {
|
|
|
565
566
|
getTaskStats,
|
|
566
567
|
getTaskSteeringFields,
|
|
567
568
|
getTasksCount,
|
|
568
|
-
getTemplateDefinition,
|
|
569
569
|
getUnassignedTaskIdsForAgent,
|
|
570
570
|
getUserById,
|
|
571
571
|
getWorkflow,
|
|
@@ -584,15 +584,10 @@ import {
|
|
|
584
584
|
init_credential_broker,
|
|
585
585
|
init_date_utils,
|
|
586
586
|
init_db,
|
|
587
|
-
init_env_flag,
|
|
588
|
-
init_registry,
|
|
589
587
|
init_request_auth_context,
|
|
590
|
-
init_resolver,
|
|
591
588
|
init_steering,
|
|
592
|
-
init_steering_enabled,
|
|
593
589
|
init_swarm_config_guard,
|
|
594
590
|
init_telemetry,
|
|
595
|
-
init_template,
|
|
596
591
|
init_templates1 as init_templates,
|
|
597
592
|
init_types,
|
|
598
593
|
insertActiveSession,
|
|
@@ -600,11 +595,8 @@ import {
|
|
|
600
595
|
insertTaskAttachment,
|
|
601
596
|
installMcpServer,
|
|
602
597
|
installSkill,
|
|
603
|
-
interpolate,
|
|
604
|
-
isEnvFlagEnabled,
|
|
605
598
|
isReservedConfigKey,
|
|
606
|
-
isSteeringEnabled,
|
|
607
|
-
isSteeringEnabled1 as isSteeringEnabled2,
|
|
599
|
+
isSteeringEnabled as isSteeringEnabled2,
|
|
608
600
|
isTerminalTaskStatus,
|
|
609
601
|
listAgentsWithCredStatusByProvider,
|
|
610
602
|
listAllMetrics,
|
|
@@ -647,7 +639,6 @@ import {
|
|
|
647
639
|
resetPromptTemplateToDefault,
|
|
648
640
|
resolveApprovalRequest,
|
|
649
641
|
resolvePromptTemplate,
|
|
650
|
-
resolveTemplate,
|
|
651
642
|
resumeTask,
|
|
652
643
|
searchSkills,
|
|
653
644
|
setAgentHarnessProvider,
|
|
@@ -694,12 +685,25 @@ import {
|
|
|
694
685
|
upsertSwarmConfig,
|
|
695
686
|
validateConfigValue,
|
|
696
687
|
withFavoriteFlags
|
|
697
|
-
} from "./cli-
|
|
688
|
+
} from "./cli-yr11vvst.js";
|
|
689
|
+
import {
|
|
690
|
+
getAllTemplateDefinitions,
|
|
691
|
+
getTemplateDefinition,
|
|
692
|
+
init_env_flag,
|
|
693
|
+
init_registry,
|
|
694
|
+
init_resolver,
|
|
695
|
+
init_steering_enabled,
|
|
696
|
+
init_template,
|
|
697
|
+
interpolate,
|
|
698
|
+
isEnvFlagEnabled,
|
|
699
|
+
isSteeringEnabled,
|
|
700
|
+
resolveTemplate
|
|
701
|
+
} from "./cli-k1py8264.js";
|
|
698
702
|
import"./cli-z2zcxes1.js";
|
|
699
703
|
import {
|
|
700
704
|
init_package,
|
|
701
705
|
package_default
|
|
702
|
-
} from "./cli-
|
|
706
|
+
} from "./cli-8vzddbs7.js";
|
|
703
707
|
import {
|
|
704
708
|
init_secret_scrubber,
|
|
705
709
|
registerVolatileSecret,
|
|
@@ -4298,6 +4302,10 @@ function buildAuthCtx(req) {
|
|
|
4298
4302
|
return { callerAgentId, hasPageHeader: pageId !== undefined && pageId !== "", isLead };
|
|
4299
4303
|
}
|
|
4300
4304
|
function authorizeWrite(namespace, ctx) {
|
|
4305
|
+
const overflowAuthErr = mcpOverflowAuthError(namespace, ctx.callerAgentId);
|
|
4306
|
+
if (overflowAuthErr) {
|
|
4307
|
+
return { status: 403, message: overflowAuthErr };
|
|
4308
|
+
}
|
|
4301
4309
|
if (namespace.startsWith("task:page:")) {
|
|
4302
4310
|
if (!ctx.hasPageHeader) {
|
|
4303
4311
|
return { status: 403, message: "task:page:* writes require a page-proxy request" };
|
|
@@ -4318,6 +4326,10 @@ function authorizeWrite(namespace, ctx) {
|
|
|
4318
4326
|
}
|
|
4319
4327
|
return null;
|
|
4320
4328
|
}
|
|
4329
|
+
function authorizeRead(namespace, ctx) {
|
|
4330
|
+
const overflowAuthErr = mcpOverflowAuthError(namespace, ctx.callerAgentId);
|
|
4331
|
+
return overflowAuthErr ? { status: 403, message: overflowAuthErr } : null;
|
|
4332
|
+
}
|
|
4321
4333
|
function encodeValueOrError(res, value, valueType) {
|
|
4322
4334
|
try {
|
|
4323
4335
|
if (valueType === "json") {
|
|
@@ -4374,7 +4386,7 @@ async function handleKv(req, res, pathSegments, queryParams) {
|
|
|
4374
4386
|
const key = decodeKvSegment(res, parsed.params.key, "key");
|
|
4375
4387
|
if (!key)
|
|
4376
4388
|
return true;
|
|
4377
|
-
return sendGet(res, ns, key);
|
|
4389
|
+
return sendGet(req, res, ns, key);
|
|
4378
4390
|
}
|
|
4379
4391
|
if (putKvExplicit.match(req.method, pathSegments)) {
|
|
4380
4392
|
if (enforceContentLengthCap(req, res, MAX_KV_BODY_BYTES) === BODY_TOO_LARGE)
|
|
@@ -4409,7 +4421,7 @@ async function handleKv(req, res, pathSegments, queryParams) {
|
|
|
4409
4421
|
const ns = decodeKvSegment(res, parsed.params.namespace, "namespace");
|
|
4410
4422
|
if (!ns)
|
|
4411
4423
|
return true;
|
|
4412
|
-
return sendList(res, ns, parsed.query);
|
|
4424
|
+
return sendList(req, res, ns, parsed.query);
|
|
4413
4425
|
}
|
|
4414
4426
|
if (getKvHeader.match(req.method, pathSegments)) {
|
|
4415
4427
|
const parsed = await getKvHeader.parse(req, res, pathSegments, queryParams);
|
|
@@ -4423,7 +4435,7 @@ async function handleKv(req, res, pathSegments, queryParams) {
|
|
|
4423
4435
|
const key = decodeKvSegment(res, parsed.params.key, "key");
|
|
4424
4436
|
if (!key)
|
|
4425
4437
|
return true;
|
|
4426
|
-
return sendGet(res, ns, key);
|
|
4438
|
+
return sendGet(req, res, ns, key);
|
|
4427
4439
|
}
|
|
4428
4440
|
if (putKvHeader.match(req.method, pathSegments)) {
|
|
4429
4441
|
if (enforceContentLengthCap(req, res, MAX_KV_BODY_BYTES) === BODY_TOO_LARGE)
|
|
@@ -4464,7 +4476,7 @@ async function handleKv(req, res, pathSegments, queryParams) {
|
|
|
4464
4476
|
jsonError(res, "namespace is required (pass X-Source-Task-Id or X-Agent-ID)", 400);
|
|
4465
4477
|
return true;
|
|
4466
4478
|
}
|
|
4467
|
-
return sendList(res, ns, parsed.query);
|
|
4479
|
+
return sendList(req, res, ns, parsed.query);
|
|
4468
4480
|
}
|
|
4469
4481
|
return false;
|
|
4470
4482
|
}
|
|
@@ -4528,7 +4540,12 @@ async function handleIncr(req, res, pathSegments, queryParams, explicit) {
|
|
|
4528
4540
|
}
|
|
4529
4541
|
return true;
|
|
4530
4542
|
}
|
|
4531
|
-
function sendGet(res, namespace, key) {
|
|
4543
|
+
function sendGet(req, res, namespace, key) {
|
|
4544
|
+
const authErr = authorizeRead(namespace, buildAuthCtx(req));
|
|
4545
|
+
if (authErr) {
|
|
4546
|
+
jsonError(res, authErr.message, authErr.status);
|
|
4547
|
+
return true;
|
|
4548
|
+
}
|
|
4532
4549
|
const entry = getKv(namespace, key);
|
|
4533
4550
|
if (!entry) {
|
|
4534
4551
|
jsonError(res, "not found", 404);
|
|
@@ -4582,7 +4599,12 @@ function sendDelete2(req, res, namespace, key) {
|
|
|
4582
4599
|
res.end();
|
|
4583
4600
|
return true;
|
|
4584
4601
|
}
|
|
4585
|
-
function sendList(res, namespace, query) {
|
|
4602
|
+
function sendList(req, res, namespace, query) {
|
|
4603
|
+
const authErr = authorizeRead(namespace, buildAuthCtx(req));
|
|
4604
|
+
if (authErr) {
|
|
4605
|
+
jsonError(res, authErr.message, authErr.status);
|
|
4606
|
+
return true;
|
|
4607
|
+
}
|
|
4586
4608
|
const limit = Math.min(query.limit ?? 100, MAX_KV_LIST_LIMIT);
|
|
4587
4609
|
const offset = query.offset ?? 0;
|
|
4588
4610
|
const prefix = query.prefix && query.prefix.length > 0 ? query.prefix : undefined;
|
|
@@ -5996,7 +6018,7 @@ async function handleMcpBridge(req, res, pathSegments, _queryParams, myAgentId)
|
|
|
5996
6018
|
return true;
|
|
5997
6019
|
}
|
|
5998
6020
|
const sourceTaskId = Array.isArray(req.headers["x-source-task-id"]) ? req.headers["x-source-task-id"][0] : req.headers["x-source-task-id"];
|
|
5999
|
-
const extra = {
|
|
6021
|
+
const extra = markScriptSdkRequestOrigin({
|
|
6000
6022
|
sessionId: "mcp-bridge",
|
|
6001
6023
|
requestInfo: {
|
|
6002
6024
|
headers: {
|
|
@@ -6004,7 +6026,7 @@ async function handleMcpBridge(req, res, pathSegments, _queryParams, myAgentId)
|
|
|
6004
6026
|
...sourceTaskId ? { "x-source-task-id": sourceTaskId } : {}
|
|
6005
6027
|
}
|
|
6006
6028
|
}
|
|
6007
|
-
};
|
|
6029
|
+
});
|
|
6008
6030
|
try {
|
|
6009
6031
|
const result = tool.inputSchema ? await Promise.resolve(tool.handler(args, extra)) : await Promise.resolve(tool.handler(extra));
|
|
6010
6032
|
if (result && typeof result === "object" && "structuredContent" in result) {
|
|
@@ -20783,14 +20805,14 @@ async function shutdown() {
|
|
|
20783
20805
|
sessionsProcessed: getServerSessionsProcessed()
|
|
20784
20806
|
});
|
|
20785
20807
|
if (hasCapability("scheduling")) {
|
|
20786
|
-
const { stopScheduler } = await import("./index-
|
|
20808
|
+
const { stopScheduler } = await import("./index-kgay2v5w.js");
|
|
20787
20809
|
stopScheduler();
|
|
20788
20810
|
}
|
|
20789
20811
|
stopHeartbeat();
|
|
20790
20812
|
stopScriptRunSupervisor();
|
|
20791
20813
|
await stopSlackApp();
|
|
20792
20814
|
if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
|
|
20793
|
-
const { stopOAuthKeepalive } = await import("./keepalive-
|
|
20815
|
+
const { stopOAuthKeepalive } = await import("./keepalive-q8yg6d6r.js");
|
|
20794
20816
|
await stopOAuthKeepalive();
|
|
20795
20817
|
}
|
|
20796
20818
|
stopOAuthPendingGc();
|
|
@@ -20852,15 +20874,15 @@ try {
|
|
|
20852
20874
|
console.warn("[startup] CAPABILITIES upgrade seed failed (non-fatal):", err);
|
|
20853
20875
|
}
|
|
20854
20876
|
try {
|
|
20855
|
-
const { seedPricingFromModelsDev } = await import("./seed-pricing-
|
|
20877
|
+
const { seedPricingFromModelsDev } = await import("./seed-pricing-p5fnj0qd.js");
|
|
20856
20878
|
seedPricingFromModelsDev();
|
|
20857
|
-
const { startPricingRefreshLoop } = await import("./pricing-refresh-
|
|
20879
|
+
const { startPricingRefreshLoop } = await import("./pricing-refresh-34mbexgm.js");
|
|
20858
20880
|
startPricingRefreshLoop();
|
|
20859
20881
|
} catch (err) {
|
|
20860
20882
|
console.error("[startup] Failed to seed pricing rows:", err);
|
|
20861
20883
|
}
|
|
20862
20884
|
try {
|
|
20863
|
-
const { ensureRbacSeedsSynced } = await import("./rbac-roles-
|
|
20885
|
+
const { ensureRbacSeedsSynced } = await import("./rbac-roles-s1qnewkt.js");
|
|
20864
20886
|
ensureRbacSeedsSynced();
|
|
20865
20887
|
} catch (err) {
|
|
20866
20888
|
console.error("[startup] Failed to sync RBAC seed rows:", err);
|
|
@@ -20868,7 +20890,7 @@ try {
|
|
|
20868
20890
|
throw err;
|
|
20869
20891
|
}
|
|
20870
20892
|
try {
|
|
20871
|
-
const { runAllSeeders } = await import("./index-
|
|
20893
|
+
const { runAllSeeders } = await import("./index-hy73j39b.js");
|
|
20872
20894
|
await runAllSeeders({ scriptEmbeddingMode: "skip" });
|
|
20873
20895
|
} catch (err) {
|
|
20874
20896
|
console.error("[startup] Failed to seed built-in entities:", err);
|
|
@@ -20904,35 +20926,35 @@ httpServer.listen(port, async () => {
|
|
|
20904
20926
|
initWorkflows();
|
|
20905
20927
|
startScriptRunSupervisor(getMcpBaseUrl());
|
|
20906
20928
|
if (hasCapability("scheduling")) {
|
|
20907
|
-
const { startScheduler } = await import("./index-
|
|
20908
|
-
const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-
|
|
20929
|
+
const { startScheduler } = await import("./index-kgay2v5w.js");
|
|
20930
|
+
const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-v3n4hb3w.js");
|
|
20909
20931
|
const intervalMs = Number(process.env.SCHEDULER_INTERVAL_MS) || 1e4;
|
|
20910
20932
|
startScheduler(getExecutorRegistry2(), intervalMs, {
|
|
20911
20933
|
runId: globalState.__runId
|
|
20912
20934
|
});
|
|
20913
20935
|
}
|
|
20914
20936
|
if (!isEnvFlagEnabled("HEARTBEAT_DISABLE", false)) {
|
|
20915
|
-
const { startHeartbeat } = await import("./index-
|
|
20937
|
+
const { startHeartbeat } = await import("./index-x1n3tybc.js");
|
|
20916
20938
|
const heartbeatMs = Number(process.env.HEARTBEAT_INTERVAL_MS) || 90000;
|
|
20917
20939
|
startHeartbeat(heartbeatMs);
|
|
20918
20940
|
}
|
|
20919
20941
|
if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
|
|
20920
|
-
const { startOAuthKeepalive } = await import("./keepalive-
|
|
20942
|
+
const { startOAuthKeepalive } = await import("./keepalive-q8yg6d6r.js");
|
|
20921
20943
|
startOAuthKeepalive();
|
|
20922
20944
|
}
|
|
20923
20945
|
if (process.env.OAUTH_REFRESH_SWEEP_DISABLE !== "true") {
|
|
20924
|
-
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-
|
|
20946
|
+
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-90h9rzx8.js");
|
|
20925
20947
|
startOAuthRefreshSweep();
|
|
20926
20948
|
}
|
|
20927
20949
|
startOAuthPendingGc();
|
|
20928
20950
|
startMemoryGc();
|
|
20929
|
-
import("./boot-reembed-
|
|
20951
|
+
import("./boot-reembed-5xxzva12.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
|
|
20930
20952
|
console.error("[boot-reembed] startup backfill failed (non-fatal):", err);
|
|
20931
20953
|
});
|
|
20932
|
-
import("./boot-reembed-
|
|
20954
|
+
import("./boot-reembed-00cxm1mj.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
|
|
20933
20955
|
console.error("[boot-reembed-scripts] startup backfill failed (non-fatal):", err);
|
|
20934
20956
|
});
|
|
20935
|
-
import("./boot-scrub-logs-
|
|
20957
|
+
import("./boot-scrub-logs-9cmcq6ez.js").then(({ runBootScrubLogs }) => runBootScrubLogs()).catch((err) => {
|
|
20936
20958
|
console.error("[boot-scrub-logs] startup scrub failed (non-fatal):", err);
|
|
20937
20959
|
});
|
|
20938
20960
|
}).on("error", (err) => {
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
extractArgsJsonSchema,
|
|
4
4
|
extractScriptSignature,
|
|
5
5
|
typecheckScript
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-88r31vx9.js";
|
|
7
7
|
import {
|
|
8
8
|
getScript,
|
|
9
9
|
upsertScriptByName,
|
|
10
10
|
validateScriptImports
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-dbmh9yqn.js";
|
|
12
12
|
import"./cli-jkhwmmgg.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
import"./cli-qzy21svh.js";
|
|
14
|
+
import"./cli-ff8b5cbe.js";
|
|
15
15
|
import"./cli-q25ejbyn.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-vvbwy286.js";
|
|
17
17
|
import {
|
|
18
18
|
computeContentHash,
|
|
19
19
|
createSkill,
|
|
@@ -21,9 +21,10 @@ import {
|
|
|
21
21
|
getSkillByName,
|
|
22
22
|
init_db,
|
|
23
23
|
updateSkill
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-yr11vvst.js";
|
|
25
|
+
import"./cli-k1py8264.js";
|
|
25
26
|
import"./cli-z2zcxes1.js";
|
|
26
|
-
import"./cli-
|
|
27
|
+
import"./cli-8vzddbs7.js";
|
|
27
28
|
import"./cli-4j2mrzag.js";
|
|
28
29
|
import"./cli-bw80ck94.js";
|
|
29
30
|
import"./cli-xz9aq0rf.js";
|
|
@@ -4,22 +4,23 @@ import {
|
|
|
4
4
|
runScheduleNow,
|
|
5
5
|
startScheduler,
|
|
6
6
|
stopScheduler
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import"./cli-
|
|
7
|
+
} from "./cli-4xft7caa.js";
|
|
8
|
+
import"./cli-5a4nmfrn.js";
|
|
9
9
|
import"./cli-f14fvzag.js";
|
|
10
10
|
import"./cli-3dpj7atn.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
import"./cli-v292k2fv.js";
|
|
12
|
+
import"./cli-dbmh9yqn.js";
|
|
13
13
|
import"./cli-jkhwmmgg.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
14
|
+
import"./cli-qzy21svh.js";
|
|
15
|
+
import"./cli-ff8b5cbe.js";
|
|
16
16
|
import"./cli-q25ejbyn.js";
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
17
|
+
import"./cli-vvbwy286.js";
|
|
18
|
+
import"./cli-k5c6jfzn.js";
|
|
19
19
|
import"./cli-dh55d5fg.js";
|
|
20
|
-
import"./cli-
|
|
20
|
+
import"./cli-yr11vvst.js";
|
|
21
|
+
import"./cli-k1py8264.js";
|
|
21
22
|
import"./cli-z2zcxes1.js";
|
|
22
|
-
import"./cli-
|
|
23
|
+
import"./cli-8vzddbs7.js";
|
|
23
24
|
import"./cli-4j2mrzag.js";
|
|
24
25
|
import"./cli-bw80ck94.js";
|
|
25
26
|
import"./cli-xz9aq0rf.js";
|
|
@@ -20,23 +20,24 @@ import {
|
|
|
20
20
|
stopWaitPoller,
|
|
21
21
|
subscribeWaitToBus,
|
|
22
22
|
validateTemplateVariables
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-5a4nmfrn.js";
|
|
24
24
|
import"./cli-f14fvzag.js";
|
|
25
25
|
import"./cli-3dpj7atn.js";
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
26
|
+
import"./cli-v292k2fv.js";
|
|
27
|
+
import"./cli-dbmh9yqn.js";
|
|
28
28
|
import"./cli-jkhwmmgg.js";
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
29
|
+
import"./cli-qzy21svh.js";
|
|
30
|
+
import"./cli-ff8b5cbe.js";
|
|
31
31
|
import"./cli-q25ejbyn.js";
|
|
32
|
-
import"./cli-
|
|
33
|
-
import"./cli-
|
|
32
|
+
import"./cli-vvbwy286.js";
|
|
33
|
+
import"./cli-k5c6jfzn.js";
|
|
34
34
|
import"./cli-dh55d5fg.js";
|
|
35
|
+
import"./cli-yr11vvst.js";
|
|
35
36
|
import {
|
|
36
37
|
interpolate
|
|
37
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-k1py8264.js";
|
|
38
39
|
import"./cli-z2zcxes1.js";
|
|
39
|
-
import"./cli-
|
|
40
|
+
import"./cli-8vzddbs7.js";
|
|
40
41
|
import"./cli-4j2mrzag.js";
|
|
41
42
|
import"./cli-bw80ck94.js";
|
|
42
43
|
import"./cli-xz9aq0rf.js";
|
|
@@ -4,24 +4,25 @@ import {
|
|
|
4
4
|
runRebootSweep,
|
|
5
5
|
startHeartbeat,
|
|
6
6
|
stopHeartbeat
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
7
|
+
} from "./cli-nqq9tthd.js";
|
|
8
|
+
import"./cli-n02497b2.js";
|
|
9
|
+
import"./cli-5a4nmfrn.js";
|
|
10
10
|
import"./cli-f14fvzag.js";
|
|
11
11
|
import"./cli-3dpj7atn.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
import"./cli-v292k2fv.js";
|
|
13
|
+
import"./cli-dbmh9yqn.js";
|
|
14
14
|
import"./cli-jkhwmmgg.js";
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
import"./cli-qzy21svh.js";
|
|
16
|
+
import"./cli-ff8b5cbe.js";
|
|
17
17
|
import"./cli-q25ejbyn.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-vvbwy286.js";
|
|
19
|
+
import"./cli-k5c6jfzn.js";
|
|
20
20
|
import"./cli-wspgs9bt.js";
|
|
21
21
|
import"./cli-dh55d5fg.js";
|
|
22
|
-
import"./cli-
|
|
22
|
+
import"./cli-yr11vvst.js";
|
|
23
|
+
import"./cli-k1py8264.js";
|
|
23
24
|
import"./cli-z2zcxes1.js";
|
|
24
|
-
import"./cli-
|
|
25
|
+
import"./cli-8vzddbs7.js";
|
|
25
26
|
import"./cli-4j2mrzag.js";
|
|
26
27
|
import"./cli-bw80ck94.js";
|
|
27
28
|
import"./cli-xz9aq0rf.js";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureAuthorizationTokenOrThrow
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-v292k2fv.js";
|
|
4
4
|
import {
|
|
5
5
|
listKeepAliveAuthorizations
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-vvbwy286.js";
|
|
7
|
+
import"./cli-yr11vvst.js";
|
|
8
|
+
import"./cli-k1py8264.js";
|
|
8
9
|
import"./cli-z2zcxes1.js";
|
|
9
|
-
import"./cli-
|
|
10
|
+
import"./cli-8vzddbs7.js";
|
|
10
11
|
import"./cli-4j2mrzag.js";
|
|
11
12
|
import"./cli-bw80ck94.js";
|
|
12
13
|
import"./cli-xz9aq0rf.js";
|
|
@@ -59,7 +60,7 @@ async function notifySlack(text) {
|
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
62
|
try {
|
|
62
|
-
const { getSlackApp } = await import("./app-
|
|
63
|
+
const { getSlackApp } = await import("./app-xbt4n4mt.js");
|
|
63
64
|
const app = getSlackApp();
|
|
64
65
|
if (!app) {
|
|
65
66
|
console.warn("[OAuth Keepalive] Slack not available, cannot send notification");
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAgent
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-jcavqvh7.js";
|
|
4
|
+
import"./cli-wdrrgv4m.js";
|
|
5
|
+
import"./cli-3y8xyp0b.js";
|
|
5
6
|
import"./cli-jj1arm18.js";
|
|
6
7
|
import"./cli-07er7wrs.js";
|
|
7
8
|
import"./cli-w5r4wfm5.js";
|
|
@@ -14,7 +15,7 @@ import"./cli-d6n0thxw.js";
|
|
|
14
15
|
import"./cli-v1mwc5v2.js";
|
|
15
16
|
import {
|
|
16
17
|
getEnabledCapabilities
|
|
17
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-wbcsjpyv.js";
|
|
18
19
|
import"./cli-1z7048dy.js";
|
|
19
20
|
import"./cli-gz9sbyk3.js";
|
|
20
21
|
import"./cli-ftyf58xj.js";
|
|
@@ -25,36 +26,37 @@ import"./cli-tng3131n.js";
|
|
|
25
26
|
import"./cli-zm7njwzd.js";
|
|
26
27
|
import"./cli-cw70hymf.js";
|
|
27
28
|
import"./cli-e61fs2hp.js";
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
30
|
-
import"./cli-
|
|
31
|
-
import"./cli-
|
|
32
|
-
import"./cli-
|
|
33
|
-
import"./cli-
|
|
34
|
-
import"./cli-
|
|
29
|
+
import"./cli-4xft7caa.js";
|
|
30
|
+
import"./cli-94796kxr.js";
|
|
31
|
+
import"./cli-q92pr3rt.js";
|
|
32
|
+
import"./cli-3x5aphbt.js";
|
|
33
|
+
import"./cli-gbx122ge.js";
|
|
34
|
+
import"./cli-n02497b2.js";
|
|
35
|
+
import"./cli-5a4nmfrn.js";
|
|
35
36
|
import"./cli-f14fvzag.js";
|
|
36
37
|
import"./cli-3dpj7atn.js";
|
|
37
|
-
import"./cli-
|
|
38
|
-
import"./cli-
|
|
38
|
+
import"./cli-v292k2fv.js";
|
|
39
|
+
import"./cli-dbmh9yqn.js";
|
|
39
40
|
import"./cli-jkhwmmgg.js";
|
|
40
|
-
import"./cli-
|
|
41
|
-
import"./cli-
|
|
41
|
+
import"./cli-qzy21svh.js";
|
|
42
|
+
import"./cli-ff8b5cbe.js";
|
|
42
43
|
import"./cli-q25ejbyn.js";
|
|
43
|
-
import"./cli-
|
|
44
|
+
import"./cli-vvbwy286.js";
|
|
44
45
|
import"./cli-fad8m16k.js";
|
|
45
46
|
import"./cli-7zd05xb4.js";
|
|
46
|
-
import"./cli-
|
|
47
|
-
import"./cli-
|
|
48
|
-
import"./cli-
|
|
49
|
-
import"./cli-
|
|
47
|
+
import"./cli-zhp3t49e.js";
|
|
48
|
+
import"./cli-0w3mk6r2.js";
|
|
49
|
+
import"./cli-k5c6jfzn.js";
|
|
50
|
+
import"./cli-refygp3c.js";
|
|
50
51
|
import"./cli-rkndnn90.js";
|
|
51
52
|
import"./cli-b0p7rfnd.js";
|
|
52
53
|
import"./cli-5ncdb7ff.js";
|
|
53
54
|
import"./cli-wspgs9bt.js";
|
|
54
55
|
import"./cli-dh55d5fg.js";
|
|
55
|
-
import"./cli-
|
|
56
|
+
import"./cli-yr11vvst.js";
|
|
57
|
+
import"./cli-k1py8264.js";
|
|
56
58
|
import"./cli-z2zcxes1.js";
|
|
57
|
-
import"./cli-
|
|
59
|
+
import"./cli-8vzddbs7.js";
|
|
58
60
|
import"./cli-4j2mrzag.js";
|
|
59
61
|
import"./cli-bw80ck94.js";
|
|
60
62
|
import"./cli-xz9aq0rf.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reembedAllScripts
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-qzy21svh.js";
|
|
4
|
+
import"./cli-ff8b5cbe.js";
|
|
5
5
|
import"./cli-q25ejbyn.js";
|
|
6
|
-
import"./cli-
|
|
6
|
+
import"./cli-yr11vvst.js";
|
|
7
|
+
import"./cli-k1py8264.js";
|
|
7
8
|
import"./cli-z2zcxes1.js";
|
|
8
|
-
import"./cli-
|
|
9
|
+
import"./cli-8vzddbs7.js";
|
|
9
10
|
import"./cli-4j2mrzag.js";
|
|
10
11
|
import"./cli-bw80ck94.js";
|
|
11
12
|
import"./cli-xz9aq0rf.js";
|