@desplega.ai/agent-swarm 1.119.0 → 1.119.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/{actions-cdhadphb.js → actions-6fvp3prn.js} +7 -7
- package/dist/{app-w2067dt3.js → app-spr18zx3.js} +3 -3
- package/dist/{assistant-cb02pb41.js → assistant-v625bfkb.js} +10 -10
- package/dist/{boot-reembed-b18pndap.js → boot-reembed-fk1zawyh.js} +4 -4
- package/dist/{boot-reembed-p00s3r7a.js → boot-reembed-knw7ta83.js} +3 -3
- package/dist/{boot-scrub-logs-b9ym4xx3.js → boot-scrub-logs-rqq0drek.js} +2 -2
- package/dist/{cli-9ed8efw3.js → cli-0qhghy2e.js} +1 -1
- package/dist/{cli-azvm6fss.js → cli-22xdkf0e.js} +22 -3
- package/dist/{cli-qf35kzka.js → cli-2pv9mf2n.js} +1 -1
- package/dist/{cli-x1m2hp0q.js → cli-3w3ay9kf.js} +11 -11
- package/dist/{cli-h1gg78hv.js → cli-5ne5v3gy.js} +37 -35
- package/dist/{cli-06xdf1gz.js → cli-62c45z8p.js} +1 -1
- package/dist/{cli-15m4y05s.js → cli-6h60nrdw.js} +5 -5
- package/dist/cli-95kferzh.js +439 -0
- package/dist/{cli-hyn69s0c.js → cli-bcev4a56.js} +1 -1
- package/dist/{cli-bx96sw2z.js → cli-befewsnp.js} +2 -2
- package/dist/{cli-qw9seygs.js → cli-cbz05wnr.js} +2 -2
- package/dist/{cli-9kbww4vb.js → cli-cjdjcx1h.js} +1 -1
- package/dist/{cli-zcra7f1h.js → cli-dd7eaykj.js} +2 -2
- package/dist/{cli-wh91zby6.js → cli-dh9eb7tt.js} +6 -6
- package/dist/{cli-qcm02dkk.js → cli-ed4s7b1n.js} +1 -1
- package/dist/{cli-mxennm5t.js → cli-g617qdzb.js} +2 -2
- package/dist/{cli-e7306swv.js → cli-hcpm1e90.js} +6 -6
- package/dist/{cli-j12px91x.js → cli-jkkjjdyn.js} +1 -1
- package/dist/{cli-06d436hx.js → cli-k2yqtwjk.js} +7 -7
- package/dist/{cli-dqxwy0td.js → cli-kb6wj6mf.js} +1 -1
- package/dist/{cli-vt51szy9.js → cli-n1rag5eq.js} +1 -1
- package/dist/{cli-txxvn1zb.js → cli-qfp2c1qs.js} +1 -1
- package/dist/{cli-q7eev82n.js → cli-vvty0cfn.js} +3 -3
- package/dist/{cli-chs2zh28.js → cli-vxesz4hy.js} +4 -4
- package/dist/{cli-jy7w6z37.js → cli-wen3f7km.js} +12 -12
- package/dist/{cli-vfq38b3e.js → cli-xem4ndhx.js} +1 -1
- package/dist/cli.js +13 -13
- package/dist/{codex-adapter-de3w0nch.js → codex-adapter-efskwfc4.js} +4 -4
- package/dist/{codex-session-runner-bnw8cysk.js → codex-session-runner-n7ad0jdv.js} +4 -4
- package/dist/{commands-rn6frj4c.js → commands-2nyhjm5e.js} +2 -2
- package/dist/{db-kmemzvqt.js → db-psx972cv.js} +2 -2
- package/dist/{handlers-mppa5zb3.js → handlers-drzntj65.js} +10 -10
- package/dist/{hook-ej6457r1.js → hook-sf4wxq2j.js} +3 -3
- package/dist/{http-wv092d70.js → http-kbavqgsx.js} +101 -495
- package/dist/{index-q1x8ttq6.js → index-1dcn9zk6.js} +6 -6
- package/dist/{index-bc90csfq.js → index-a2wmwh7d.js} +9 -9
- package/dist/{index-adgr531h.js → index-dnajx229.js} +10 -10
- package/dist/{index-n6xq6x5d.js → index-fjcjdmv1.js} +8 -8
- package/dist/{keepalive-yjx8f7cq.js → keepalive-t3hw5tb4.js} +4 -4
- package/dist/{lead-r01f3pft.js → lead-keecxwds.js} +25 -25
- package/dist/{maintenance-tr5vvp93.js → maintenance-h2h5dbf4.js} +4 -4
- package/dist/{oauth-refresh-sweep-s2jrst63.js → oauth-refresh-sweep-41nw0tkp.js} +3 -3
- package/dist/{onboard-czarh0tp.js → onboard-de1wkp0v.js} +2 -2
- package/dist/{otel-impl-3e0t0kga.js → otel-impl-251jnpdd.js} +1 -1
- package/dist/{pi-mono-adapter-05sck1ds.js → pi-mono-adapter-erghwha0.js} +7 -7
- package/dist/{pricing-refresh-0dvbj3rq.js → pricing-refresh-0n50xvtx.js} +4 -4
- package/dist/{rbac-roles-1q4v9s52.js → rbac-roles-2m5b327a.js} +3 -3
- package/dist/{rbac-roles-thnb7h7j.js → rbac-roles-z10gz1j8.js} +2 -2
- package/dist/registry-wejfsj31.js +13 -0
- package/dist/{seed-pricing-76xbxghj.js → seed-pricing-vetpp3cy.js} +3 -3
- package/dist/{setup-b134pfqr.js → setup-zvayft41.js} +2 -2
- package/dist/{worker-e1ssyv77.js → worker-feez5q1v.js} +25 -25
- package/openapi.json +53 -1
- package/package.json +1 -1
- package/src/be/seed/agent-fs-provision.ts +41 -1
- package/src/fs/registry.ts +13 -1
- package/src/http/core.ts +8 -0
- package/src/http/fs.ts +41 -1
- package/src/tests/agent-fs-provision-seeder.test.ts +40 -0
- package/src/tests/preload.ts +21 -0
- package/src/tests/prompt-template-resolver.test.ts +6 -0
- package/src/tests/prompt-template-session.test.ts +6 -0
- package/src/tests/template-registry-helpers.ts +29 -0
- package/dist/{azure-openai-responses-gm1ejtmn.js → azure-openai-responses-f57n5qy7.js} +4 -4
- package/dist/{claude-managed-setup-cm05wtek.js → claude-managed-setup-eac00cqn.js} +1 -1
- package/dist/{cli-6b4wwmm8.js → cli-0qy7bk86.js} +3 -3
- package/dist/{google-vertex-8bs2pzgn.js → google-vertex-9hhq68sw.js} +3 -3
- package/dist/{mistral-conversations-7gqnz2wt.js → mistral-conversations-tn4sj5qv.js} +3 -3
- package/dist/{openai-codex-responses-3nkvje79.js → openai-codex-responses-bex0bpn6.js} +2 -2
- package/dist/{openai-completions-0asftkwg.js → openai-completions-gygw5cxt.js} +8 -8
- package/dist/{openai-responses-pmatek45.js → openai-responses-8c0dgmty.js} +7 -7
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BROWSER_SDK_JS,
|
|
3
|
+
SWARM_UI_JS
|
|
4
|
+
} from "./cli-ppwm8c6e.js";
|
|
1
5
|
import {
|
|
2
6
|
AssetKeyAuthorizationError,
|
|
3
7
|
BODY_TOO_LARGE,
|
|
@@ -126,12 +130,11 @@ import {
|
|
|
126
130
|
withRemoteContext,
|
|
127
131
|
withSpanContext,
|
|
128
132
|
writeSkillsToFilesystem
|
|
129
|
-
} from "./cli-
|
|
133
|
+
} from "./cli-5ne5v3gy.js";
|
|
130
134
|
import"./cli-1z7048dy.js";
|
|
131
135
|
import {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
} from "./cli-ppwm8c6e.js";
|
|
136
|
+
Anthropic
|
|
137
|
+
} from "./cli-gz9sbyk3.js";
|
|
135
138
|
import {
|
|
136
139
|
REFERENCES_SOURCE_MAX_LENGTH,
|
|
137
140
|
sanitizeReferencesSource
|
|
@@ -141,19 +144,23 @@ import {
|
|
|
141
144
|
getValidCodexOAuth,
|
|
142
145
|
loadAllCodexOAuthSlots
|
|
143
146
|
} from "./cli-tk9vyqzh.js";
|
|
144
|
-
import {
|
|
145
|
-
Anthropic
|
|
146
|
-
} from "./cli-gz9sbyk3.js";
|
|
147
147
|
import {
|
|
148
148
|
reasoningCapability
|
|
149
149
|
} from "./cli-e61fs2hp.js";
|
|
150
|
-
import
|
|
150
|
+
import {
|
|
151
|
+
calculateNextRun,
|
|
152
|
+
dispatchScheduleTarget,
|
|
153
|
+
ensure,
|
|
154
|
+
initialize,
|
|
155
|
+
require_dist
|
|
156
|
+
} from "./cli-vxesz4hy.js";
|
|
157
|
+
import"./cli-g617qdzb.js";
|
|
151
158
|
import {
|
|
152
159
|
normalizeModelKey
|
|
153
|
-
} from "./cli-
|
|
160
|
+
} from "./cli-xem4ndhx.js";
|
|
154
161
|
import {
|
|
155
162
|
getUserGrant
|
|
156
|
-
} from "./cli-
|
|
163
|
+
} from "./cli-bcev4a56.js";
|
|
157
164
|
import {
|
|
158
165
|
can,
|
|
159
166
|
clearAuditSink,
|
|
@@ -165,27 +172,20 @@ import {
|
|
|
165
172
|
ensureAgentFsCredentialsForAgent,
|
|
166
173
|
extractArgsJsonSchema,
|
|
167
174
|
extractScriptSignature,
|
|
175
|
+
inviteEmailToSharedOrg,
|
|
168
176
|
scriptSdkTypesWithGeneratedApis,
|
|
169
177
|
scriptStdlibTypesWithGeneratedApis,
|
|
170
178
|
typecheckScript
|
|
171
|
-
} from "./cli-
|
|
179
|
+
} from "./cli-22xdkf0e.js";
|
|
172
180
|
import {
|
|
173
181
|
checkHeartbeatChecklist,
|
|
174
182
|
runHeartbeatSweep,
|
|
175
183
|
stopHeartbeat
|
|
176
|
-
} from "./cli-
|
|
184
|
+
} from "./cli-vvty0cfn.js";
|
|
177
185
|
import {
|
|
178
186
|
createResumeFollowUp,
|
|
179
187
|
createWorkerTaskFollowUp
|
|
180
|
-
} from "./cli-
|
|
181
|
-
import"./cli-fad8m16k.js";
|
|
182
|
-
import {
|
|
183
|
-
calculateNextRun,
|
|
184
|
-
dispatchScheduleTarget,
|
|
185
|
-
ensure,
|
|
186
|
-
initialize,
|
|
187
|
-
require_dist
|
|
188
|
-
} from "./cli-chs2zh28.js";
|
|
188
|
+
} from "./cli-0qhghy2e.js";
|
|
189
189
|
import {
|
|
190
190
|
RawLlmConfigSchema,
|
|
191
191
|
TriggerSchemaError,
|
|
@@ -207,10 +207,22 @@ import {
|
|
|
207
207
|
validateDefinition,
|
|
208
208
|
validateJsonSchema,
|
|
209
209
|
verifyHmacSignature
|
|
210
|
-
} from "./cli-
|
|
210
|
+
} from "./cli-wen3f7km.js";
|
|
211
211
|
import {
|
|
212
212
|
getApiKey
|
|
213
213
|
} from "./cli-f14fvzag.js";
|
|
214
|
+
import {
|
|
215
|
+
acquireOAuthRefreshLock,
|
|
216
|
+
buildAuthorizationUrl,
|
|
217
|
+
deleteOAuthTokens,
|
|
218
|
+
ensureTokenOrThrow,
|
|
219
|
+
exchangeCode,
|
|
220
|
+
forceRefreshTokenOrThrow,
|
|
221
|
+
getOAuthApp,
|
|
222
|
+
getOAuthTokens,
|
|
223
|
+
releaseOAuthRefreshLock,
|
|
224
|
+
upsertOAuthApp
|
|
225
|
+
} from "./cli-kb6wj6mf.js";
|
|
214
226
|
import {
|
|
215
227
|
CredentialBindingSchema,
|
|
216
228
|
applyMcpOAuthRefresh,
|
|
@@ -259,11 +271,11 @@ import {
|
|
|
259
271
|
upsertMcpOAuthToken,
|
|
260
272
|
upsertScriptByName,
|
|
261
273
|
upsertScriptConnection
|
|
262
|
-
} from "./cli-
|
|
274
|
+
} from "./cli-befewsnp.js";
|
|
263
275
|
import"./cli-jkhwmmgg.js";
|
|
264
276
|
import {
|
|
265
277
|
searchScripts
|
|
266
|
-
} from "./cli-
|
|
278
|
+
} from "./cli-cbz05wnr.js";
|
|
267
279
|
import {
|
|
268
280
|
CANDIDATE_SET_MULTIPLIER,
|
|
269
281
|
getEmbeddingProvider,
|
|
@@ -271,27 +283,21 @@ import {
|
|
|
271
283
|
init_constants,
|
|
272
284
|
init_reranker,
|
|
273
285
|
rerank
|
|
274
|
-
} from "./cli-
|
|
286
|
+
} from "./cli-ed4s7b1n.js";
|
|
275
287
|
import"./cli-q25ejbyn.js";
|
|
276
|
-
import {
|
|
277
|
-
acquireOAuthRefreshLock,
|
|
278
|
-
buildAuthorizationUrl,
|
|
279
|
-
deleteOAuthTokens,
|
|
280
|
-
ensureTokenOrThrow,
|
|
281
|
-
exchangeCode,
|
|
282
|
-
forceRefreshTokenOrThrow,
|
|
283
|
-
getOAuthApp,
|
|
284
|
-
getOAuthTokens,
|
|
285
|
-
releaseOAuthRefreshLock,
|
|
286
|
-
upsertOAuthApp
|
|
287
|
-
} from "./cli-dqxwy0td.js";
|
|
288
288
|
import"./cli-0pygq9r1.js";
|
|
289
|
-
import"./cli-
|
|
289
|
+
import"./cli-fad8m16k.js";
|
|
290
|
+
import {
|
|
291
|
+
FilesError,
|
|
292
|
+
getFileStorageProvider,
|
|
293
|
+
normalizeFilesError
|
|
294
|
+
} from "./cli-95kferzh.js";
|
|
295
|
+
import"./cli-62c45z8p.js";
|
|
290
296
|
import {
|
|
291
297
|
getSlackApp,
|
|
292
298
|
startSlackApp,
|
|
293
299
|
stopSlackApp
|
|
294
|
-
} from "./cli-
|
|
300
|
+
} from "./cli-6h60nrdw.js";
|
|
295
301
|
import"./cli-rkndnn90.js";
|
|
296
302
|
import"./cli-b0p7rfnd.js";
|
|
297
303
|
import {
|
|
@@ -311,12 +317,12 @@ import {
|
|
|
311
317
|
resolveUserByToken,
|
|
312
318
|
revokeToken,
|
|
313
319
|
unlinkIdentity
|
|
314
|
-
} from "./cli-
|
|
315
|
-
import"./cli-ma04faw5.js";
|
|
316
|
-
import"./cli-wspgs9bt.js";
|
|
320
|
+
} from "./cli-qfp2c1qs.js";
|
|
317
321
|
import {
|
|
318
322
|
createTaskWithSiblingAwareness
|
|
319
|
-
} from "./cli-
|
|
323
|
+
} from "./cli-2pv9mf2n.js";
|
|
324
|
+
import"./cli-ma04faw5.js";
|
|
325
|
+
import"./cli-wspgs9bt.js";
|
|
320
326
|
import {
|
|
321
327
|
getAppUrl,
|
|
322
328
|
getConfiguredAppUrls,
|
|
@@ -635,7 +641,7 @@ import {
|
|
|
635
641
|
upsertSwarmConfig,
|
|
636
642
|
validateConfigValue,
|
|
637
643
|
withFavoriteFlags
|
|
638
|
-
} from "./cli-
|
|
644
|
+
} from "./cli-jkkjjdyn.js";
|
|
639
645
|
import"./cli-z2zcxes1.js";
|
|
640
646
|
import {
|
|
641
647
|
init_zod
|
|
@@ -650,7 +656,7 @@ import {
|
|
|
650
656
|
import {
|
|
651
657
|
init_package,
|
|
652
658
|
package_default
|
|
653
|
-
} from "./cli-
|
|
659
|
+
} from "./cli-cjdjcx1h.js";
|
|
654
660
|
import {
|
|
655
661
|
init_secret_scrubber,
|
|
656
662
|
registerVolatileSecret,
|
|
@@ -664,16 +670,16 @@ import {
|
|
|
664
670
|
} from "./cli-9aryf9tv.js";
|
|
665
671
|
import {
|
|
666
672
|
bedrockProviderModule
|
|
667
|
-
} from "./cli-
|
|
673
|
+
} from "./cli-0qy7bk86.js";
|
|
668
674
|
import"./cli-cwy5hqbq.js";
|
|
669
675
|
import"./cli-jvv0g8bh.js";
|
|
670
676
|
import {
|
|
671
677
|
setBedrockProviderModule
|
|
672
678
|
} from "./cli-xw7p4wkq.js";
|
|
673
679
|
import"./cli-hv2fndhm.js";
|
|
674
|
-
import"./cli-pscrc6tw.js";
|
|
675
680
|
import"./cli-zyxs93y9.js";
|
|
676
681
|
import"./cli-4wgngmwv.js";
|
|
682
|
+
import"./cli-pscrc6tw.js";
|
|
677
683
|
import"./cli-bsyka9ta.js";
|
|
678
684
|
import"./cli-vapyk8sw.js";
|
|
679
685
|
import"./cli-y2apkfe2.js";
|
|
@@ -3860,440 +3866,6 @@ async function handleFavorites(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
3860
3866
|
init_zod();
|
|
3861
3867
|
init_db();
|
|
3862
3868
|
import { createHash as createHash2 } from "node:crypto";
|
|
3863
|
-
|
|
3864
|
-
// src/fs/provider.ts
|
|
3865
|
-
class FilesError extends Error {
|
|
3866
|
-
code;
|
|
3867
|
-
status;
|
|
3868
|
-
cause;
|
|
3869
|
-
constructor(code, message, opts = {}) {
|
|
3870
|
-
super(message);
|
|
3871
|
-
this.name = "FilesError";
|
|
3872
|
-
this.code = code;
|
|
3873
|
-
this.status = opts.status;
|
|
3874
|
-
this.cause = opts.cause;
|
|
3875
|
-
}
|
|
3876
|
-
}
|
|
3877
|
-
function providerPath(scope) {
|
|
3878
|
-
if (scope.key !== undefined && scope.key !== null && scope.key !== "") {
|
|
3879
|
-
return normalizeStoredKey(scope.key);
|
|
3880
|
-
}
|
|
3881
|
-
const safeName = normalizeName(scope.name);
|
|
3882
|
-
return `tasks/${encodeURIComponent(scope.taskId)}/${safeName}`;
|
|
3883
|
-
}
|
|
3884
|
-
function normalizeStoredKey(key) {
|
|
3885
|
-
const trimmed = key.trim().replace(/^\/+/, "");
|
|
3886
|
-
if (!trimmed || trimmed.includes("\x00")) {
|
|
3887
|
-
throw new FilesError("Provider", "Stored file key must be a non-empty path");
|
|
3888
|
-
}
|
|
3889
|
-
if (trimmed.split("/").some((part) => part === "..")) {
|
|
3890
|
-
throw new FilesError("Provider", "Stored file key must not contain parent path segments");
|
|
3891
|
-
}
|
|
3892
|
-
return trimmed;
|
|
3893
|
-
}
|
|
3894
|
-
function normalizeName(name) {
|
|
3895
|
-
const trimmed = name.trim().replace(/^\/+/, "");
|
|
3896
|
-
if (!trimmed || trimmed === "." || trimmed.includes("\x00")) {
|
|
3897
|
-
throw new FilesError("Provider", "File name must be a non-empty relative path");
|
|
3898
|
-
}
|
|
3899
|
-
const parts = trimmed.split("/");
|
|
3900
|
-
if (parts.some((part) => !part || part === "." || part === "..")) {
|
|
3901
|
-
throw new FilesError("Provider", "File name must not contain empty or parent path segments");
|
|
3902
|
-
}
|
|
3903
|
-
return parts.map(encodeURIComponent).join("/");
|
|
3904
|
-
}
|
|
3905
|
-
function fileObjectFromHeaders(providerId, scope, headers2, overrides = {}) {
|
|
3906
|
-
const sizeHeader = headers2.get("content-length");
|
|
3907
|
-
return {
|
|
3908
|
-
providerId,
|
|
3909
|
-
key: providerPath(scope),
|
|
3910
|
-
taskId: scope.taskId,
|
|
3911
|
-
name: scope.name,
|
|
3912
|
-
contentType: headers2.get("content-type") ?? undefined,
|
|
3913
|
-
sizeBytes: sizeHeader ? Number(sizeHeader) : undefined,
|
|
3914
|
-
etag: headers2.get("etag") ?? undefined,
|
|
3915
|
-
sha256: headers2.get("x-agent-fs-content-hash") ?? undefined,
|
|
3916
|
-
version: headers2.get("x-agent-fs-version") ?? undefined,
|
|
3917
|
-
...overrides
|
|
3918
|
-
};
|
|
3919
|
-
}
|
|
3920
|
-
function normalizeFilesError(error) {
|
|
3921
|
-
if (error instanceof FilesError) {
|
|
3922
|
-
return error;
|
|
3923
|
-
}
|
|
3924
|
-
return new FilesError("Provider", error instanceof Error ? error.message : "File provider error", {
|
|
3925
|
-
cause: error
|
|
3926
|
-
});
|
|
3927
|
-
}
|
|
3928
|
-
|
|
3929
|
-
// src/fs/agent-fs-provider.ts
|
|
3930
|
-
class AgentFsProvider {
|
|
3931
|
-
id = "agent-fs";
|
|
3932
|
-
capabilities = {
|
|
3933
|
-
signedUrl: { supported: true, maxExpiresIn: 3600 },
|
|
3934
|
-
search: true,
|
|
3935
|
-
comments: true,
|
|
3936
|
-
versioning: true
|
|
3937
|
-
};
|
|
3938
|
-
apiUrl;
|
|
3939
|
-
apiKey;
|
|
3940
|
-
orgId;
|
|
3941
|
-
driveId;
|
|
3942
|
-
fetchImpl;
|
|
3943
|
-
constructor(options = {}) {
|
|
3944
|
-
this.apiUrl = stripTrailingSlash(options.apiUrl ?? process.env.AGENT_FS_API_URL ?? "");
|
|
3945
|
-
this.apiKey = options.apiKey ?? process.env.API_AGENT_FS_API_KEY ?? process.env.AGENT_FS_API_KEY ?? "";
|
|
3946
|
-
this.orgId = options.orgId ?? process.env.AGENT_FS_DEFAULT_ORG_ID ?? process.env.AGENT_FS_SHARED_ORG_ID ?? "";
|
|
3947
|
-
this.driveId = options.driveId ?? process.env.AGENT_FS_DEFAULT_DRIVE_ID ?? "";
|
|
3948
|
-
this.fetchImpl = options.fetchImpl ?? globalThis.fetch;
|
|
3949
|
-
if (!this.apiUrl || !this.apiKey || !this.orgId || !this.driveId) {
|
|
3950
|
-
throw new FilesError("Provider", "AGENT_FS_API_URL, API_AGENT_FS_API_KEY or AGENT_FS_API_KEY, AGENT_FS_DEFAULT_ORG_ID, and AGENT_FS_DEFAULT_DRIVE_ID are required for the agent-fs provider");
|
|
3951
|
-
}
|
|
3952
|
-
}
|
|
3953
|
-
async upload(scope, body, options = {}) {
|
|
3954
|
-
const headers2 = new Headers(this.authHeaders());
|
|
3955
|
-
if (options.contentType) {
|
|
3956
|
-
headers2.set("content-type", options.contentType);
|
|
3957
|
-
}
|
|
3958
|
-
if (options.ifNoneMatch) {
|
|
3959
|
-
headers2.set("if-none-match", options.ifNoneMatch);
|
|
3960
|
-
}
|
|
3961
|
-
if (options.ifMatch) {
|
|
3962
|
-
headers2.set("if-match", options.ifMatch);
|
|
3963
|
-
}
|
|
3964
|
-
if (options.message) {
|
|
3965
|
-
headers2.set("x-agent-fs-message", options.message);
|
|
3966
|
-
}
|
|
3967
|
-
const response = await this.fetchRaw(scope, { method: "PUT", headers: headers2, body });
|
|
3968
|
-
const parsed = await response.json().catch(() => ({}));
|
|
3969
|
-
return fileObjectFromHeaders(this.id, scope, response.headers, {
|
|
3970
|
-
key: parsed.path ?? providerPath(scope),
|
|
3971
|
-
version: parsed.version === undefined ? response.headers.get("x-agent-fs-version") ?? undefined : String(parsed.version),
|
|
3972
|
-
sha256: parsed.contentHash ?? response.headers.get("x-agent-fs-content-hash") ?? undefined,
|
|
3973
|
-
metadata: { deduped: parsed.deduped }
|
|
3974
|
-
});
|
|
3975
|
-
}
|
|
3976
|
-
async download(scope) {
|
|
3977
|
-
return this.fetchRaw(scope, { method: "GET", headers: this.authHeaders() });
|
|
3978
|
-
}
|
|
3979
|
-
async head(scope) {
|
|
3980
|
-
const response = await this.download(scope);
|
|
3981
|
-
await response.body?.cancel();
|
|
3982
|
-
return fileObjectFromHeaders(this.id, scope, response.headers);
|
|
3983
|
-
}
|
|
3984
|
-
async exists(scope) {
|
|
3985
|
-
try {
|
|
3986
|
-
await this.head(scope);
|
|
3987
|
-
return true;
|
|
3988
|
-
} catch (error) {
|
|
3989
|
-
if (error instanceof FilesError && error.code === "NotFound") {
|
|
3990
|
-
return false;
|
|
3991
|
-
}
|
|
3992
|
-
throw error;
|
|
3993
|
-
}
|
|
3994
|
-
}
|
|
3995
|
-
async delete(scope) {
|
|
3996
|
-
await this.ops({ op: "rm", path: providerPath(scope) }, scope);
|
|
3997
|
-
}
|
|
3998
|
-
async copy(source, destination) {
|
|
3999
|
-
await this.ops({ op: "cp", path: providerPath(source), dest: providerPath(destination) });
|
|
4000
|
-
return this.head(destination);
|
|
4001
|
-
}
|
|
4002
|
-
async move(source, destination) {
|
|
4003
|
-
await this.ops({ op: "mv", path: providerPath(source), dest: providerPath(destination) });
|
|
4004
|
-
return this.head(destination);
|
|
4005
|
-
}
|
|
4006
|
-
async list(options) {
|
|
4007
|
-
const prefix = `tasks/${encodeURIComponent(options.taskId)}/${options.prefix ?? ""}`;
|
|
4008
|
-
const result = await this.ops({ op: "ls", path: prefix });
|
|
4009
|
-
const resultRecord = asRecord(result);
|
|
4010
|
-
const entries = Array.isArray(result) ? result : Array.isArray(resultRecord?.entries) ? resultRecord.entries : [];
|
|
4011
|
-
return entries.slice(0, options.limit).map((entry) => {
|
|
4012
|
-
const key = String(entry.path ?? entry.name ?? "");
|
|
4013
|
-
const name = key.startsWith(`tasks/${encodeURIComponent(options.taskId)}/`) ? key.slice(`tasks/${encodeURIComponent(options.taskId)}/`.length) : key;
|
|
4014
|
-
return {
|
|
4015
|
-
providerId: this.id,
|
|
4016
|
-
key,
|
|
4017
|
-
taskId: options.taskId,
|
|
4018
|
-
name: decodeURIComponent(name),
|
|
4019
|
-
contentType: typeof entry.mimeType === "string" ? entry.mimeType : undefined,
|
|
4020
|
-
sizeBytes: typeof entry.size === "number" ? entry.size : undefined,
|
|
4021
|
-
version: entry.version === undefined ? undefined : String(entry.version)
|
|
4022
|
-
};
|
|
4023
|
-
});
|
|
4024
|
-
}
|
|
4025
|
-
async* listAll(options) {
|
|
4026
|
-
for (const item of await this.list(options)) {
|
|
4027
|
-
yield item;
|
|
4028
|
-
}
|
|
4029
|
-
}
|
|
4030
|
-
async url(scope, options = {}) {
|
|
4031
|
-
const expiresIn = Math.min(options.expiresIn ?? 3600, this.capabilities.signedUrl.maxExpiresIn);
|
|
4032
|
-
const result = await this.ops({ op: "signed-url", path: providerPath(scope), expiresIn }, scope);
|
|
4033
|
-
if (typeof result === "string") {
|
|
4034
|
-
return result;
|
|
4035
|
-
}
|
|
4036
|
-
const resultRecord = asRecord(result);
|
|
4037
|
-
if (typeof resultRecord?.url === "string") {
|
|
4038
|
-
return resultRecord.url;
|
|
4039
|
-
}
|
|
4040
|
-
throw new FilesError("Provider", "agent-fs signed-url op did not return a URL");
|
|
4041
|
-
}
|
|
4042
|
-
async signedUploadUrl() {
|
|
4043
|
-
throw new FilesError("ReadOnly", "agent-fs does not support signed upload URLs");
|
|
4044
|
-
}
|
|
4045
|
-
async search(query) {
|
|
4046
|
-
const result = await this.ops({
|
|
4047
|
-
op: "search",
|
|
4048
|
-
query: query.query,
|
|
4049
|
-
path: `tasks/${encodeURIComponent(query.taskId)}`,
|
|
4050
|
-
limit: query.limit
|
|
4051
|
-
});
|
|
4052
|
-
return Array.isArray(result) ? result : [];
|
|
4053
|
-
}
|
|
4054
|
-
async addComment(input) {
|
|
4055
|
-
return await this.ops({
|
|
4056
|
-
op: "comment-add",
|
|
4057
|
-
path: providerPath(input),
|
|
4058
|
-
body: input.body,
|
|
4059
|
-
range: input.range
|
|
4060
|
-
});
|
|
4061
|
-
}
|
|
4062
|
-
async listComments(scope) {
|
|
4063
|
-
const result = await this.ops({ op: "comment-list", path: providerPath(scope) });
|
|
4064
|
-
return Array.isArray(result) ? result : [];
|
|
4065
|
-
}
|
|
4066
|
-
async listVersions(scope) {
|
|
4067
|
-
const result = await this.ops({ op: "log", path: providerPath(scope) });
|
|
4068
|
-
return Array.isArray(result) ? result : [];
|
|
4069
|
-
}
|
|
4070
|
-
async restoreVersion(scope) {
|
|
4071
|
-
return await this.ops({
|
|
4072
|
-
op: "revert",
|
|
4073
|
-
path: providerPath(scope),
|
|
4074
|
-
version: scope.version
|
|
4075
|
-
});
|
|
4076
|
-
}
|
|
4077
|
-
async fetchRaw(scope, init) {
|
|
4078
|
-
const response = await this.fetchImpl(this.rawUrl(scope), init);
|
|
4079
|
-
if (!response.ok) {
|
|
4080
|
-
throw await responseToFilesError(response);
|
|
4081
|
-
}
|
|
4082
|
-
return response;
|
|
4083
|
-
}
|
|
4084
|
-
async ops(body, scope) {
|
|
4085
|
-
const response = await this.fetchImpl(`${this.apiUrl}/orgs/${encodeURIComponent(this.orgFor(scope))}/ops`, {
|
|
4086
|
-
method: "POST",
|
|
4087
|
-
headers: {
|
|
4088
|
-
...this.authHeaders(),
|
|
4089
|
-
"content-type": "application/json"
|
|
4090
|
-
},
|
|
4091
|
-
body: JSON.stringify({ driveId: this.driveFor(scope), ...body })
|
|
4092
|
-
});
|
|
4093
|
-
if (!response.ok) {
|
|
4094
|
-
throw await responseToFilesError(response);
|
|
4095
|
-
}
|
|
4096
|
-
return response.json().catch(() => null);
|
|
4097
|
-
}
|
|
4098
|
-
rawUrl(scope) {
|
|
4099
|
-
return `${this.apiUrl}/orgs/${encodeURIComponent(this.orgFor(scope))}/drives/${encodeURIComponent(this.driveFor(scope))}/files/${providerPath(scope)}/raw`;
|
|
4100
|
-
}
|
|
4101
|
-
orgFor(scope) {
|
|
4102
|
-
return scope?.orgId?.trim() || this.orgId;
|
|
4103
|
-
}
|
|
4104
|
-
driveFor(scope) {
|
|
4105
|
-
return scope?.driveId?.trim() || this.driveId;
|
|
4106
|
-
}
|
|
4107
|
-
authHeaders() {
|
|
4108
|
-
return { authorization: `Bearer ${this.apiKey}` };
|
|
4109
|
-
}
|
|
4110
|
-
}
|
|
4111
|
-
function asRecord(value) {
|
|
4112
|
-
return value && typeof value === "object" ? value : null;
|
|
4113
|
-
}
|
|
4114
|
-
async function responseToFilesError(response) {
|
|
4115
|
-
const text = await response.text().catch(() => "");
|
|
4116
|
-
const message = text || `File provider returned HTTP ${response.status}`;
|
|
4117
|
-
if (response.status === 401 || response.status === 403) {
|
|
4118
|
-
return new FilesError("Unauthorized", message, { status: response.status });
|
|
4119
|
-
}
|
|
4120
|
-
if (response.status === 404) {
|
|
4121
|
-
return new FilesError("NotFound", message, { status: response.status });
|
|
4122
|
-
}
|
|
4123
|
-
if (response.status === 409 || response.status === 412) {
|
|
4124
|
-
return new FilesError("Conflict", message, { status: response.status });
|
|
4125
|
-
}
|
|
4126
|
-
return new FilesError("Provider", message, { status: response.status });
|
|
4127
|
-
}
|
|
4128
|
-
function stripTrailingSlash(value) {
|
|
4129
|
-
return value.replace(/\/+$/, "");
|
|
4130
|
-
}
|
|
4131
|
-
|
|
4132
|
-
// src/fs/local-fs-provider.ts
|
|
4133
|
-
import { mkdir as mkdir2, readdir, rm as rm2, stat } from "node:fs/promises";
|
|
4134
|
-
import { dirname, join, relative, sep } from "node:path";
|
|
4135
|
-
var DEFAULT_ROOT_DIR = "./data/fs";
|
|
4136
|
-
|
|
4137
|
-
class LocalFsProvider {
|
|
4138
|
-
id = "local-fs";
|
|
4139
|
-
capabilities = {
|
|
4140
|
-
signedUrl: { supported: false }
|
|
4141
|
-
};
|
|
4142
|
-
rootDir;
|
|
4143
|
-
constructor(options = {}) {
|
|
4144
|
-
this.rootDir = options.rootDir ?? process.env.AGENT_FS_LOCAL_DIR ?? DEFAULT_ROOT_DIR;
|
|
4145
|
-
}
|
|
4146
|
-
async upload(scope, body, options = {}) {
|
|
4147
|
-
const target = this.localPath(scope);
|
|
4148
|
-
await mkdir2(dirname(target), { recursive: true });
|
|
4149
|
-
if (options.ifNoneMatch === "*" && await this.exists(scope)) {
|
|
4150
|
-
throw new FilesError("Conflict", "File already exists");
|
|
4151
|
-
}
|
|
4152
|
-
await Bun.write(target, await new Response(body).arrayBuffer());
|
|
4153
|
-
if (options.contentType) {
|
|
4154
|
-
await Bun.write(this.metaPath(target), JSON.stringify({ contentType: options.contentType }));
|
|
4155
|
-
}
|
|
4156
|
-
return this.head(scope);
|
|
4157
|
-
}
|
|
4158
|
-
async download(scope) {
|
|
4159
|
-
const target = this.localPath(scope);
|
|
4160
|
-
if (!await this.exists(scope)) {
|
|
4161
|
-
throw new FilesError("NotFound", "File not found");
|
|
4162
|
-
}
|
|
4163
|
-
return new Response(Bun.file(target));
|
|
4164
|
-
}
|
|
4165
|
-
async head(scope) {
|
|
4166
|
-
const target = this.localPath(scope);
|
|
4167
|
-
try {
|
|
4168
|
-
const info = await stat(target);
|
|
4169
|
-
const storedContentType = await this.readStoredContentType(target);
|
|
4170
|
-
return {
|
|
4171
|
-
providerId: this.id,
|
|
4172
|
-
key: providerPath(scope),
|
|
4173
|
-
taskId: scope.taskId,
|
|
4174
|
-
name: scope.name,
|
|
4175
|
-
contentType: storedContentType ?? Bun.file(target).type ?? undefined,
|
|
4176
|
-
sizeBytes: info.size,
|
|
4177
|
-
updatedAt: info.mtime.toISOString()
|
|
4178
|
-
};
|
|
4179
|
-
} catch (error) {
|
|
4180
|
-
if (error.code === "ENOENT") {
|
|
4181
|
-
throw new FilesError("NotFound", "File not found", { cause: error });
|
|
4182
|
-
}
|
|
4183
|
-
throw new FilesError("Provider", "Unable to read file metadata", { cause: error });
|
|
4184
|
-
}
|
|
4185
|
-
}
|
|
4186
|
-
async exists(scope) {
|
|
4187
|
-
try {
|
|
4188
|
-
await stat(this.localPath(scope));
|
|
4189
|
-
return true;
|
|
4190
|
-
} catch (error) {
|
|
4191
|
-
if (error.code === "ENOENT") {
|
|
4192
|
-
return false;
|
|
4193
|
-
}
|
|
4194
|
-
throw new FilesError("Provider", "Unable to check file existence", { cause: error });
|
|
4195
|
-
}
|
|
4196
|
-
}
|
|
4197
|
-
async delete(scope) {
|
|
4198
|
-
const target = this.localPath(scope);
|
|
4199
|
-
await rm2(target, { force: true });
|
|
4200
|
-
await rm2(this.metaPath(target), { force: true });
|
|
4201
|
-
}
|
|
4202
|
-
async copy(source, destination) {
|
|
4203
|
-
const sourceHead = await this.head(source);
|
|
4204
|
-
const response = await this.download(source);
|
|
4205
|
-
await this.upload(destination, await response.arrayBuffer(), {
|
|
4206
|
-
contentType: sourceHead.contentType
|
|
4207
|
-
});
|
|
4208
|
-
return this.head(destination);
|
|
4209
|
-
}
|
|
4210
|
-
async move(source, destination) {
|
|
4211
|
-
const copied = await this.copy(source, destination);
|
|
4212
|
-
await this.delete(source);
|
|
4213
|
-
return copied;
|
|
4214
|
-
}
|
|
4215
|
-
async list(options) {
|
|
4216
|
-
const taskRoot = join(this.rootDir, "tasks", encodeURIComponent(options.taskId));
|
|
4217
|
-
const files = [];
|
|
4218
|
-
await this.walk(taskRoot, async (path) => {
|
|
4219
|
-
const rel = relative(taskRoot, path).split(sep).join("/");
|
|
4220
|
-
const name = decodePath(rel);
|
|
4221
|
-
if (options.prefix && !name.startsWith(options.prefix)) {
|
|
4222
|
-
return;
|
|
4223
|
-
}
|
|
4224
|
-
files.push(await this.head({ taskId: options.taskId, name }));
|
|
4225
|
-
});
|
|
4226
|
-
return typeof options.limit === "number" ? files.slice(0, options.limit) : files;
|
|
4227
|
-
}
|
|
4228
|
-
async* listAll(options) {
|
|
4229
|
-
for (const item of await this.list(options)) {
|
|
4230
|
-
yield item;
|
|
4231
|
-
}
|
|
4232
|
-
}
|
|
4233
|
-
async url(scope) {
|
|
4234
|
-
return `/api/fs/tasks/${encodeURIComponent(scope.taskId)}/files/${encodeURIComponent(scope.name)}/raw`;
|
|
4235
|
-
}
|
|
4236
|
-
async signedUploadUrl() {
|
|
4237
|
-
throw new FilesError("ReadOnly", "local-fs does not support signed upload URLs");
|
|
4238
|
-
}
|
|
4239
|
-
localPath(scope) {
|
|
4240
|
-
return join(this.rootDir, providerPath(scope));
|
|
4241
|
-
}
|
|
4242
|
-
metaPath(target) {
|
|
4243
|
-
return `${target}.meta.json`;
|
|
4244
|
-
}
|
|
4245
|
-
async readStoredContentType(target) {
|
|
4246
|
-
try {
|
|
4247
|
-
const metaFile = Bun.file(this.metaPath(target));
|
|
4248
|
-
if (!await metaFile.exists()) {
|
|
4249
|
-
return;
|
|
4250
|
-
}
|
|
4251
|
-
const meta = await metaFile.json();
|
|
4252
|
-
return typeof meta?.contentType === "string" ? meta.contentType : undefined;
|
|
4253
|
-
} catch {
|
|
4254
|
-
return;
|
|
4255
|
-
}
|
|
4256
|
-
}
|
|
4257
|
-
async walk(dir, visit) {
|
|
4258
|
-
let entries;
|
|
4259
|
-
try {
|
|
4260
|
-
entries = await readdir(dir, { withFileTypes: true });
|
|
4261
|
-
} catch (error) {
|
|
4262
|
-
if (error.code === "ENOENT") {
|
|
4263
|
-
return;
|
|
4264
|
-
}
|
|
4265
|
-
throw new FilesError("Provider", "Unable to list files", { cause: error });
|
|
4266
|
-
}
|
|
4267
|
-
for (const entry of entries) {
|
|
4268
|
-
const path = join(dir, entry.name);
|
|
4269
|
-
if (entry.isDirectory()) {
|
|
4270
|
-
await this.walk(path, visit);
|
|
4271
|
-
} else if (entry.isFile() && !entry.name.endsWith(".meta.json")) {
|
|
4272
|
-
await visit(path);
|
|
4273
|
-
}
|
|
4274
|
-
}
|
|
4275
|
-
}
|
|
4276
|
-
}
|
|
4277
|
-
function decodePath(path) {
|
|
4278
|
-
return path.split("/").map((part) => decodeURIComponent(part)).join("/");
|
|
4279
|
-
}
|
|
4280
|
-
|
|
4281
|
-
// src/fs/registry.ts
|
|
4282
|
-
var memoizedProvider = null;
|
|
4283
|
-
function getFileStorageProvider() {
|
|
4284
|
-
if (!memoizedProvider) {
|
|
4285
|
-
memoizedProvider = selectProvider();
|
|
4286
|
-
}
|
|
4287
|
-
return memoizedProvider;
|
|
4288
|
-
}
|
|
4289
|
-
function selectProvider() {
|
|
4290
|
-
if (process.env.AGENT_FS_API_URL && (process.env.API_AGENT_FS_API_KEY || process.env.AGENT_FS_API_KEY)) {
|
|
4291
|
-
return new AgentFsProvider;
|
|
4292
|
-
}
|
|
4293
|
-
return new LocalFsProvider;
|
|
4294
|
-
}
|
|
4295
|
-
|
|
4296
|
-
// src/http/fs.ts
|
|
4297
3869
|
init_request_auth_context();
|
|
4298
3870
|
init_secret_scrubber();
|
|
4299
3871
|
var MAX_UPLOAD_BYTES = 50 * 1024 * 1024;
|
|
@@ -4334,6 +3906,27 @@ var ensureAgentCredentialsRoute = route({
|
|
|
4334
3906
|
},
|
|
4335
3907
|
auth: { apiKey: true, agentId: true }
|
|
4336
3908
|
});
|
|
3909
|
+
var inviteMemberRoute = route({
|
|
3910
|
+
method: "post",
|
|
3911
|
+
path: "/api/fs/members/invite",
|
|
3912
|
+
pattern: ["api", "fs", "members", "invite"],
|
|
3913
|
+
summary: "Invite an external member into the agent-fs shared org",
|
|
3914
|
+
description: "The API server performs the invite with its own bootstrap credentials (which are API-only and never served over HTTP), provisioning the shared org/drive first when needed. Intended for the cloud control plane's Connect-to-Drive flow. No keys are returned; the invitee obtains their own key via agent-fs registration.",
|
|
3915
|
+
tags: ["FS"],
|
|
3916
|
+
body: exports_external.object({
|
|
3917
|
+
email: exports_external.email(),
|
|
3918
|
+
role: exports_external.enum(["viewer", "editor", "admin"]).default("editor")
|
|
3919
|
+
}),
|
|
3920
|
+
responses: {
|
|
3921
|
+
200: { description: "Invite state ({ orgId, invited })" },
|
|
3922
|
+
400: { description: "Invalid body" },
|
|
3923
|
+
500: { description: "Provisioning or invite failed" }
|
|
3924
|
+
},
|
|
3925
|
+
auth: { apiKey: true },
|
|
3926
|
+
rbac: {
|
|
3927
|
+
ungated: "Tenant API key is the org-owner credential; the invite runs under the API server's own bootstrap identity, no per-agent principal applies."
|
|
3928
|
+
}
|
|
3929
|
+
});
|
|
4337
3930
|
var listTaskFilesRoute = route({
|
|
4338
3931
|
method: "get",
|
|
4339
3932
|
path: "/api/fs/tasks/{taskId}/files",
|
|
@@ -4439,6 +4032,19 @@ async function handleFs(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
4439
4032
|
}
|
|
4440
4033
|
return true;
|
|
4441
4034
|
}
|
|
4035
|
+
if (inviteMemberRoute.match(req.method, pathSegments)) {
|
|
4036
|
+
const parsed = await inviteMemberRoute.parse(req, res, pathSegments, queryParams);
|
|
4037
|
+
if (!parsed)
|
|
4038
|
+
return true;
|
|
4039
|
+
try {
|
|
4040
|
+
const result = await inviteEmailToSharedOrg(parsed.body.email, parsed.body.role);
|
|
4041
|
+
json(res, result);
|
|
4042
|
+
} catch (error) {
|
|
4043
|
+
const message = scrubSecrets(error instanceof Error ? error.message : String(error));
|
|
4044
|
+
jsonError(res, `Failed to invite member to agent-fs shared org: ${message}`, 500);
|
|
4045
|
+
}
|
|
4046
|
+
return true;
|
|
4047
|
+
}
|
|
4442
4048
|
if (downloadTaskFileRoute.match(req.method, pathSegments)) {
|
|
4443
4049
|
const parsed = await downloadTaskFileRoute.parse(req, res, pathSegments, queryParams);
|
|
4444
4050
|
if (!parsed)
|
|
@@ -20689,14 +20295,14 @@ async function shutdown() {
|
|
|
20689
20295
|
sessionsProcessed: getServerSessionsProcessed()
|
|
20690
20296
|
});
|
|
20691
20297
|
if (hasCapability("scheduling")) {
|
|
20692
|
-
const { stopScheduler } = await import("./index-
|
|
20298
|
+
const { stopScheduler } = await import("./index-a2wmwh7d.js");
|
|
20693
20299
|
stopScheduler();
|
|
20694
20300
|
}
|
|
20695
20301
|
stopHeartbeat();
|
|
20696
20302
|
stopScriptRunSupervisor();
|
|
20697
20303
|
await stopSlackApp();
|
|
20698
20304
|
if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
|
|
20699
|
-
const { stopOAuthKeepalive } = await import("./keepalive-
|
|
20305
|
+
const { stopOAuthKeepalive } = await import("./keepalive-t3hw5tb4.js");
|
|
20700
20306
|
await stopOAuthKeepalive();
|
|
20701
20307
|
}
|
|
20702
20308
|
stopMcpOAuthPendingGc();
|
|
@@ -20753,15 +20359,15 @@ try {
|
|
|
20753
20359
|
throw err;
|
|
20754
20360
|
}
|
|
20755
20361
|
try {
|
|
20756
|
-
const { seedPricingFromModelsDev } = await import("./seed-pricing-
|
|
20362
|
+
const { seedPricingFromModelsDev } = await import("./seed-pricing-vetpp3cy.js");
|
|
20757
20363
|
seedPricingFromModelsDev();
|
|
20758
|
-
const { startPricingRefreshLoop } = await import("./pricing-refresh-
|
|
20364
|
+
const { startPricingRefreshLoop } = await import("./pricing-refresh-0n50xvtx.js");
|
|
20759
20365
|
startPricingRefreshLoop();
|
|
20760
20366
|
} catch (err) {
|
|
20761
20367
|
console.error("[startup] Failed to seed pricing rows:", err);
|
|
20762
20368
|
}
|
|
20763
20369
|
try {
|
|
20764
|
-
const { ensureRbacSeedsSynced } = await import("./rbac-roles-
|
|
20370
|
+
const { ensureRbacSeedsSynced } = await import("./rbac-roles-2m5b327a.js");
|
|
20765
20371
|
ensureRbacSeedsSynced();
|
|
20766
20372
|
} catch (err) {
|
|
20767
20373
|
console.error("[startup] Failed to sync RBAC seed rows:", err);
|
|
@@ -20769,7 +20375,7 @@ try {
|
|
|
20769
20375
|
throw err;
|
|
20770
20376
|
}
|
|
20771
20377
|
try {
|
|
20772
|
-
const { runAllSeeders } = await import("./index-
|
|
20378
|
+
const { runAllSeeders } = await import("./index-1dcn9zk6.js");
|
|
20773
20379
|
await runAllSeeders({ scriptEmbeddingMode: "skip" });
|
|
20774
20380
|
} catch (err) {
|
|
20775
20381
|
console.error("[startup] Failed to seed built-in entities:", err);
|
|
@@ -20805,35 +20411,35 @@ httpServer.listen(port, async () => {
|
|
|
20805
20411
|
initWorkflows();
|
|
20806
20412
|
startScriptRunSupervisor(getMcpBaseUrl());
|
|
20807
20413
|
if (hasCapability("scheduling")) {
|
|
20808
|
-
const { startScheduler } = await import("./index-
|
|
20809
|
-
const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-
|
|
20414
|
+
const { startScheduler } = await import("./index-a2wmwh7d.js");
|
|
20415
|
+
const { getExecutorRegistry: getExecutorRegistry2 } = await import("./index-fjcjdmv1.js");
|
|
20810
20416
|
const intervalMs = Number(process.env.SCHEDULER_INTERVAL_MS) || 1e4;
|
|
20811
20417
|
startScheduler(getExecutorRegistry2(), intervalMs, {
|
|
20812
20418
|
runId: globalState.__runId
|
|
20813
20419
|
});
|
|
20814
20420
|
}
|
|
20815
20421
|
if (process.env.HEARTBEAT_DISABLE !== "true") {
|
|
20816
|
-
const { startHeartbeat } = await import("./index-
|
|
20422
|
+
const { startHeartbeat } = await import("./index-dnajx229.js");
|
|
20817
20423
|
const heartbeatMs = Number(process.env.HEARTBEAT_INTERVAL_MS) || 90000;
|
|
20818
20424
|
startHeartbeat(heartbeatMs);
|
|
20819
20425
|
}
|
|
20820
20426
|
if (process.env.OAUTH_KEEPALIVE_DISABLE !== "true") {
|
|
20821
|
-
const { startOAuthKeepalive } = await import("./keepalive-
|
|
20427
|
+
const { startOAuthKeepalive } = await import("./keepalive-t3hw5tb4.js");
|
|
20822
20428
|
startOAuthKeepalive();
|
|
20823
20429
|
}
|
|
20824
20430
|
if (process.env.OAUTH_REFRESH_SWEEP_DISABLE !== "true") {
|
|
20825
|
-
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-
|
|
20431
|
+
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-41nw0tkp.js");
|
|
20826
20432
|
startOAuthRefreshSweep();
|
|
20827
20433
|
}
|
|
20828
20434
|
startMcpOAuthPendingGc();
|
|
20829
20435
|
startMemoryGc();
|
|
20830
|
-
import("./boot-reembed-
|
|
20436
|
+
import("./boot-reembed-knw7ta83.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
|
|
20831
20437
|
console.error("[boot-reembed] startup backfill failed (non-fatal):", err);
|
|
20832
20438
|
});
|
|
20833
|
-
import("./boot-reembed-
|
|
20439
|
+
import("./boot-reembed-fk1zawyh.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
|
|
20834
20440
|
console.error("[boot-reembed-scripts] startup backfill failed (non-fatal):", err);
|
|
20835
20441
|
});
|
|
20836
|
-
import("./boot-scrub-logs-
|
|
20442
|
+
import("./boot-scrub-logs-rqq0drek.js").then(({ runBootScrubLogs }) => runBootScrubLogs()).catch((err) => {
|
|
20837
20443
|
console.error("[boot-scrub-logs] startup scrub failed (non-fatal):", err);
|
|
20838
20444
|
});
|
|
20839
20445
|
}).on("error", (err) => {
|