@desplega.ai/agent-swarm 2.8.1 → 2.8.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/dist/{acp-adapter-pdy3qsvg.js → acp-adapter-fqzkxyra.js} +3 -3
- package/dist/{actions-pwjpn0j6.js → actions-kxek041g.js} +17 -17
- package/dist/{amp-adapter-cq9jgj6x.js → amp-adapter-ce7jjke4.js} +1 -1
- package/dist/{app-cnfffgwg.js → app-v6zz8yh0.js} +3 -3
- package/dist/{assistant-kpn317y1.js → assistant-m0sw9xx2.js} +18 -18
- package/dist/{boot-args-schema-pbbnhmc3.js → boot-args-schema-66bk37wv.js} +1 -1
- package/dist/{boot-reembed-9m0ysxma.js → boot-reembed-edjpwsc1.js} +1 -1
- package/dist/{boot-reembed-majbn53m.js → boot-reembed-y27n09tz.js} +1 -1
- package/dist/{boot-scrub-sweep-app8g8ym.js → boot-scrub-sweep-1xc35965.js} +3 -3
- package/dist/{boot-seeds-pbtmvcjm.js → boot-seeds-7hjj91qj.js} +4 -4
- package/dist/{boxd-qbkxy6ap.js → boxd-ent8ch04.js} +1 -1
- package/dist/{claude-adapter-wn1g3qp5.js → claude-adapter-stw7jdcf.js} +3 -3
- package/dist/{claude-managed-setup-pd47nzch.js → claude-managed-setup-y6z2perp.js} +1 -1
- package/dist/{claude-sdk-session-3a2a6589.js → claude-sdk-session-vvya8wqk.js} +3 -3
- package/dist/{cli-wk18cm92.js → cli-0cq8y6m7.js} +1 -1
- package/dist/{cli-p1w18yhx.js → cli-1pz0330a.js} +1 -1
- package/dist/{cli-d3p5vwbk.js → cli-1qkz151v.js} +3 -3
- package/dist/{cli-89cqnasv.js → cli-26ctbcdp.js} +18 -6
- package/dist/{cli-syybb0p1.js → cli-2kvhc7x8.js} +7 -7
- package/dist/{cli-93k32c37.js → cli-3e875j5p.js} +128 -41
- package/dist/{cli-k0615eh8.js → cli-3sy2xags.js} +10 -10
- package/dist/{cli-dy32zecz.js → cli-3vmb0n58.js} +1 -1
- package/dist/{cli-4r05hnqa.js → cli-4vzgeta4.js} +13 -13
- package/dist/{cli-b5rs97a6.js → cli-5y340nzn.js} +4 -4
- package/dist/{cli-7p1kvkck.js → cli-6rc5frdm.js} +1 -1
- package/dist/{cli-jcpr5smb.js → cli-837vfs2x.js} +2 -2
- package/dist/{cli-b085njxz.js → cli-959kp5h2.js} +12 -11
- package/dist/{cli-k93bq1wq.js → cli-97ae65rz.js} +4 -4
- package/dist/{cli-m4dqmnbp.js → cli-9mb2q6pb.js} +1 -1
- package/dist/{cli-bb431xey.js → cli-a0z912j7.js} +121 -33
- package/dist/{cli-k26bkr9t.js → cli-b98a65ed.js} +3 -3
- package/dist/{cli-k0wwfqbg.js → cli-dns0y538.js} +4 -0
- package/dist/{cli-tk7cjj8h.js → cli-dzpc6en0.js} +1 -1
- package/dist/{cli-6mma83xa.js → cli-e1p3n5gq.js} +4 -4
- package/dist/{cli-re4raaj0.js → cli-f4e8r23x.js} +1 -1
- package/dist/{cli-qmqk2yc2.js → cli-f4r3g076.js} +1 -1
- package/dist/{cli-pcad4cb1.js → cli-f6bahpn5.js} +1 -1
- package/dist/{cli-b8e9nb04.js → cli-fpjmegdb.js} +1 -1
- package/dist/{cli-0ntbxyaa.js → cli-fwy8kfd6.js} +271 -37
- package/dist/{cli-tacge1w0.js → cli-g5mtmf6t.js} +6 -6
- package/dist/{cli-sn7rtnj4.js → cli-gyt3zydq.js} +3 -3
- package/dist/{cli-vbh10fqa.js → cli-j24zbska.js} +3 -3
- package/dist/{cli-vqptjbr7.js → cli-jdknh18m.js} +10 -10
- package/dist/{cli-7b8sbmag.js → cli-kjtwrhea.js} +1 -1
- package/dist/{cli-9vhebtjz.js → cli-mxn1qvbn.js} +3 -2
- package/dist/{cli-zcsw143p.js → cli-n6vtrcht.js} +1 -1
- package/dist/{cli-2zp0et3v.js → cli-pchypa1s.js} +55 -19
- package/dist/{cli-gax7fk3t.js → cli-pfs8adn4.js} +1 -1
- package/dist/{cli-1xh9a7hn.js → cli-q24n86d2.js} +2 -2
- package/dist/{cli-7w69ne2f.js → cli-rcecc3yq.js} +167 -43
- package/dist/{cli-xae4g51r.js → cli-rh15cakt.js} +1 -1
- package/dist/{cli-yn2bbre9.js → cli-rmzsadkf.js} +1 -1
- package/dist/{cli-a3b239vq.js → cli-t2tma8gb.js} +1 -1
- package/dist/{cli-9wngrawf.js → cli-tekytdq9.js} +2 -2
- package/dist/{cli-tqegb8eq.js → cli-vdektqgf.js} +1 -1
- package/dist/{cli-cyhbbd1z.js → cli-w401b9tq.js} +1 -1
- package/dist/{cli-jywyhqws.js → cli-xf3qw745.js} +3 -3
- package/dist/{cli-hxpyc9sn.js → cli-z1w943va.js} +2 -2
- package/dist/{cli-yncmerje.js → cli-zh9rsbqf.js} +2 -2
- package/dist/cli.js +16 -16
- package/dist/{codex-adapter-nha71q3n.js → codex-adapter-zerf5qsp.js} +1 -1
- package/dist/{codex-hook-h3vk6xzr.js → codex-hook-30gyhzxe.js} +1 -1
- package/dist/{codex-session-runner-ak9x1k1h.js → codex-session-runner-89s304py.js} +1 -1
- package/dist/{commands-f587qpq8.js → commands-jeh1b51j.js} +3 -3
- package/dist/{controller-hxx8wwy1.js → controller-mctfbrse.js} +3 -3
- package/dist/{controllers-connect-k5sg9m9h.js → controllers-connect-nxa1ddwn.js} +18 -18
- package/dist/{cursor-adapter-n5nc3mfe.js → cursor-adapter-qj8vehv6.js} +1 -1
- package/dist/{db-nzf8zb5z.js → db-2dvay0es.js} +3 -3
- package/dist/{db-amm8w15a.js → db-b36qn6k3.js} +2 -2
- package/dist/{dispatcher-89zrts8f.js → dispatcher-gndbta01.js} +16 -16
- package/dist/{dsh-adapter-nrhbrjz8.js → dsh-adapter-f75sz821.js} +1 -1
- package/dist/{e2b-jkwfhbcv.js → e2b-3gpc2n3w.js} +1 -1
- package/dist/{e2b-s16txnpx.js → e2b-jbm7mj93.js} +1 -1
- package/dist/{embedding-space-ezwenjmj.js → embedding-space-4p05vb2x.js} +6 -6
- package/dist/{embeddings-np74ht6g.js → embeddings-m6768mgh.js} +1 -1
- package/dist/{external-channel-z46yx9d7.js → external-channel-gjv3jne3.js} +2 -2
- package/dist/{fx-adapter-3q12snn6.js → fx-adapter-rpsgb1tw.js} +4 -4
- package/dist/{grok-adapter-ahb1w033.js → grok-adapter-n2m3zjg1.js} +4 -4
- package/dist/handlers-nv8edn19.js +32 -0
- package/dist/{heartbeat-dt9qw9c8.js → heartbeat-a1tv60gt.js} +19 -19
- package/dist/{hook-8k6fbz9b.js → hook-8h5dzcgq.js} +2 -2
- package/dist/{hook-jgcgygex.js → hook-cyaps9ba.js} +4 -4
- package/dist/{http-haw4r8ne.js → http-t15mhbd9.js} +1731 -77
- package/dist/{index-s4ewdma4.js → index-ksmyd6kc.js} +16 -16
- package/dist/{index-tez78qj3.js → index-qav6455f.js} +13 -11
- package/dist/index-rjnrje98.js +32 -0
- package/dist/index-tv3413wy.js +33 -0
- package/dist/{index-5gk12my8.js → index-w1zqf680.js} +1 -1
- package/dist/{keepalive-xn6s7rmg.js → keepalive-91s7hzrb.js} +3 -3
- package/dist/{lead-6ygbfhbh.js → lead-3hmddvrm.js} +30 -30
- package/dist/{maintenance-vdts800b.js → maintenance-7pjmy5xy.js} +1 -1
- package/dist/{oauth-refresh-sweep-094c8wfk.js → oauth-refresh-sweep-rzqfm94j.js} +2 -2
- package/dist/{onboard-v99eh56m.js → onboard-74st7pag.js} +3 -3
- package/dist/{opencode-adapter-dsagkhtw.js → opencode-adapter-arn7gm8q.js} +2 -2
- package/dist/{otel-impl-q7yr9yp0.js → otel-impl-rnzey8cb.js} +1 -1
- package/dist/{pi-mono-adapter-546cd1cc.js → pi-mono-adapter-6mkwq64n.js} +3 -2
- package/dist/{pricing-refresh-7dh2yase.js → pricing-refresh-ha21jhk7.js} +2 -2
- package/dist/{rbac-roles-npbmdh77.js → rbac-roles-59dxachk.js} +2 -2
- package/dist/{rbac-roles-mdmc96p4.js → rbac-roles-wqhma4dr.js} +3 -3
- package/dist/{render-v2-twhhwmms.js → render-v2-14kpzx12.js} +3 -3
- package/dist/{resume-5gsrjd5e.js → resume-gsa5fb5f.js} +6 -6
- package/dist/{session-access-m191x30x.js → session-access-skm7bnp6.js} +4 -4
- package/dist/{session-source-backfill-nt923ask.js → session-source-backfill-pbqzbncv.js} +2 -2
- package/dist/{setup-wv467afy.js → setup-5yermsem.js} +1 -1
- package/dist/{work-objects-8zkrpy13.js → work-objects-xj0ck0w4.js} +19 -19
- package/dist/{worker-follow-up-cecqszem.js → worker-follow-up-911xc0b8.js} +18 -16
- package/dist/{worker-mz5z7kj0.js → worker-qgg0m2gw.js} +30 -30
- package/openapi.json +1741 -290
- package/package.json +2 -2
- package/src/apps/catalog.generated.json +120 -1
- package/src/apps/definition.ts +38 -11
- package/src/apps/page-validator.ts +88 -0
- package/src/be/db/model-profiles.ts +110 -11
- package/src/be/db/tasks/read.ts +20 -0
- package/src/be/db/workflow-run-definitions.ts +19 -8
- package/src/be/db-client.ts +43 -5
- package/src/be/db.ts +9 -3
- package/src/be/migrations/284_model_profile_fallbacks.sql +9 -0
- package/src/be/model-profile-check.ts +43 -18
- package/src/be/runtime-pools/routing.ts +1 -0
- package/src/be/savings/calibrate.ts +468 -0
- package/src/be/savings/compute.ts +182 -0
- package/src/be/savings/model.ts +406 -0
- package/src/be/scripts/typecheck.ts +5 -0
- package/src/be/seed/agent-fs-provision.ts +48 -11
- package/src/be/seed/workflows-seeder.ts +67 -23
- package/src/be/skill-parser.ts +19 -7
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/provider-error-class.ts +97 -0
- package/src/commands/runner.ts +99 -17
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/http/all-routes.ts +2 -0
- package/src/http/fs.ts +8 -2
- package/src/http/index.ts +4 -0
- package/src/http/model-profiles.ts +43 -10
- package/src/http/poll.ts +1 -0
- package/src/http/savings-calibration.ts +277 -0
- package/src/http/savings.ts +363 -0
- package/src/http/tasks.ts +46 -4
- package/src/http/trackers/authorize-gate.ts +41 -0
- package/src/http/trackers/jira.ts +26 -4
- package/src/http/trackers/linear.ts +26 -4
- package/src/integrations/chat-sdk/limits.ts +6 -1
- package/src/jira/oauth.ts +7 -1
- package/src/linear/README.md +2 -1
- package/src/linear/oauth.ts +7 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +3 -0
- package/src/providers/pi-mono-adapter.ts +6 -5
- package/src/providers/types.ts +7 -0
- package/src/scripts-runtime/sdk-allowlist.ts +11 -1
- package/src/scripts-runtime/swarm-sdk.ts +6 -0
- package/src/scripts-runtime/types/stdlib.d.ts +9 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +34 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +9 -0
- package/src/tasks/worker-follow-up.ts +142 -3
- package/src/tests/agent-fs-provision-seeder.test.ts +81 -0
- package/src/tests/apps-chart-shell.test.ts +170 -0
- package/src/tests/apps-icon.test.ts +156 -2
- package/src/tests/chat-sdk-relay.test.ts +12 -0
- package/src/tests/codex-adapter.test.ts +11 -0
- package/src/tests/comb-default.test.ts +6 -0
- package/src/tests/core-auth.test.ts +7 -6
- package/src/tests/db-client-busy-retry.test.ts +58 -6
- package/src/tests/deploy-guard.test.ts +154 -0
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/fixtures/app-shell-charts-definition.json.txt +180 -0
- package/src/tests/model-profile-fallbacks.test.ts +482 -0
- package/src/tests/model-profiles-api.test.ts +1 -0
- package/src/tests/pi-mono-session-cost-on-abort.test.ts +115 -0
- package/src/tests/provider-error-class.test.ts +174 -0
- package/src/tests/runner-provider-fallback.test.ts +197 -0
- package/src/tests/savings-calibration-api.test.ts +264 -0
- package/src/tests/savings-calibration.test.ts +201 -0
- package/src/tests/savings-compute.test.ts +406 -0
- package/src/tests/savings-model.test.ts +287 -0
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/sdk-allowlist.test.ts +40 -0
- package/src/tests/seed-workflows.test.ts +167 -11
- package/src/tests/skill-parser.test.ts +45 -0
- package/src/tests/tracker-oauth-authorize-auth.test.ts +262 -0
- package/src/tests/workflow-definition-pinning.test.ts +128 -3
- package/src/tests/workflow-script-principal.test.ts +94 -4
- package/src/tools/app-upsert.ts +1 -1
- package/src/tools/model-profiles/list-model-profiles.ts +4 -2
- package/src/tools/update-profile.ts +1 -1
- package/src/types.ts +115 -33
- package/src/utils/constants.ts +2 -0
- package/templates/skills/apps/SKILL.md +62 -3
- package/templates/skills/apps/content.md +62 -3
- package/templates/skills/swarm-docs/content.md +2 -0
- package/dist/handlers-vbww69re.js +0 -32
- package/dist/index-4xwaf5th.js +0 -32
- package/dist/index-f0hcrs8e.js +0 -33
|
@@ -56,11 +56,11 @@ import {
|
|
|
56
56
|
checkDependencies2,
|
|
57
57
|
emitBuiltInIntegrationConnectedOnce2,
|
|
58
58
|
init_db4
|
|
59
|
-
} from "./cli-
|
|
59
|
+
} from "./cli-rcecc3yq.js";
|
|
60
60
|
import {
|
|
61
61
|
getChannelBlockReason2,
|
|
62
62
|
init_external_channel
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-fpjmegdb.js";
|
|
64
64
|
import {
|
|
65
65
|
workflowEventBus2,
|
|
66
66
|
init_event_bus
|
|
@@ -90,11 +90,11 @@ import {
|
|
|
90
90
|
import {
|
|
91
91
|
isTerminalTaskStatus,
|
|
92
92
|
init_types4
|
|
93
|
-
} from "./cli-
|
|
93
|
+
} from "./cli-pchypa1s.js";
|
|
94
94
|
import {
|
|
95
95
|
taskAttachmentDisplayUrl,
|
|
96
96
|
init_task_attachment_links
|
|
97
|
-
} from "./cli-
|
|
97
|
+
} from "./cli-dzpc6en0.js";
|
|
98
98
|
import {
|
|
99
99
|
getSlackConfiguration,
|
|
100
100
|
init_config4
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
import {
|
|
113
113
|
getAppUrl,
|
|
114
114
|
init_constants3
|
|
115
|
-
} from "./cli-
|
|
115
|
+
} from "./cli-dns0y538.js";
|
|
116
116
|
import {
|
|
117
117
|
isEnvFlagEnabled,
|
|
118
118
|
init_env_flag
|
|
@@ -12155,7 +12155,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
|
|
|
12155
12155
|
return;
|
|
12156
12156
|
initialized = true;
|
|
12157
12157
|
try {
|
|
12158
|
-
const impl = await import("./otel-impl-
|
|
12158
|
+
const impl = await import("./otel-impl-rnzey8cb.js");
|
|
12159
12159
|
await impl.boot(serviceRole, {
|
|
12160
12160
|
exportConsoleLogs: serviceRole === "api" && isApiLogExportEnabled()
|
|
12161
12161
|
});
|
|
@@ -16341,17 +16341,17 @@ async function initSlackApp2() {
|
|
|
16341
16341
|
installSocketWorkspaceGate(receiver.client);
|
|
16342
16342
|
initialized2 = true;
|
|
16343
16343
|
app.use(slackInboundOutcomeMiddleware());
|
|
16344
|
-
const { registerMessageHandler } = await import("./handlers-
|
|
16345
|
-
const { registerCommandHandler } = await import("./commands-
|
|
16346
|
-
const { registerActionHandlers } = await import("./actions-
|
|
16347
|
-
const { registerWorkObjectHandlers } = await import("./work-objects-
|
|
16344
|
+
const { registerMessageHandler } = await import("./handlers-nv8edn19.js");
|
|
16345
|
+
const { registerCommandHandler } = await import("./commands-jeh1b51j.js");
|
|
16346
|
+
const { registerActionHandlers } = await import("./actions-kxek041g.js");
|
|
16347
|
+
const { registerWorkObjectHandlers } = await import("./work-objects-xj0ck0w4.js");
|
|
16348
16348
|
registerMessageHandler(app);
|
|
16349
16349
|
registerCommandHandler(app);
|
|
16350
16350
|
registerActionHandlers(app);
|
|
16351
16351
|
registerWorkObjectHandlers(app);
|
|
16352
|
-
const { createAssistant } = await import("./assistant-
|
|
16352
|
+
const { createAssistant } = await import("./assistant-m0sw9xx2.js");
|
|
16353
16353
|
app.assistant(createAssistant());
|
|
16354
|
-
const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-
|
|
16354
|
+
const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-gjv3jne3.js");
|
|
16355
16355
|
if (isBlockExternalEnabled()) {
|
|
16356
16356
|
scanExternalChannelsOnBoot(app.client).catch((error) => {
|
|
16357
16357
|
console.error("[Slack] External channel boot scan failed:", error);
|
|
@@ -16378,7 +16378,7 @@ async function startSlackApp2() {
|
|
|
16378
16378
|
}
|
|
16379
16379
|
startRetryAttempt = 0;
|
|
16380
16380
|
startSocketWatchdog();
|
|
16381
|
-
const { isSlackRenderV2Enabled } = await import("./render-v2-
|
|
16381
|
+
const { isSlackRenderV2Enabled } = await import("./render-v2-14kpzx12.js");
|
|
16382
16382
|
if (isSlackRenderV2Enabled())
|
|
16383
16383
|
await ensureSlackRenderV2Activation2();
|
|
16384
16384
|
await recoverSlackInboundAfterRestart();
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
init_active_sessions,
|
|
15
15
|
getSteeringMessageById2,
|
|
16
16
|
init_db4
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-rcecc3yq.js";
|
|
18
18
|
import {
|
|
19
19
|
userHoldsExplicitVerb2,
|
|
20
20
|
getUserGrant2,
|
|
21
21
|
init_rbac_roles
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-q24n86d2.js";
|
|
23
23
|
import {
|
|
24
24
|
findUserById,
|
|
25
25
|
findUserByExternalId,
|
|
26
26
|
init_users
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-f4e8r23x.js";
|
|
28
28
|
import {
|
|
29
29
|
init_zod
|
|
30
30
|
} from "./cli-zcfpsfzf.js";
|
|
@@ -502,7 +502,7 @@ function route(def) {
|
|
|
502
502
|
try {
|
|
503
503
|
const rawBody = def.body ? await parseBody(req, def.maxBodyBytes) : undefined;
|
|
504
504
|
if (def.session && "bodyTaskIds" in def.session) {
|
|
505
|
-
const { bodySessionDenial } = await import("./session-access-
|
|
505
|
+
const { bodySessionDenial } = await import("./session-access-skm7bnp6.js");
|
|
506
506
|
const denial = await bodySessionDenial(req, def.session.bodyTaskIds(rawBody));
|
|
507
507
|
if (denial) {
|
|
508
508
|
jsonError(res, denial, 403);
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
publicEndpointSsrfOptions,
|
|
7
7
|
init_mcp_wrapper
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-n6vtrcht.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeOrgWebsite,
|
|
11
11
|
init_org_website,
|
|
12
12
|
assertUrlSafe
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-rcecc3yq.js";
|
|
14
14
|
import {
|
|
15
15
|
getOpenRouterBaseUrl,
|
|
16
16
|
getOpenRouterAttributionHeaders,
|
|
@@ -70,19 +70,19 @@ import {
|
|
|
70
70
|
getStaleApprovalRequests2,
|
|
71
71
|
upsertKv2,
|
|
72
72
|
init_db4
|
|
73
|
-
} from "./cli-
|
|
73
|
+
} from "./cli-rcecc3yq.js";
|
|
74
74
|
import {
|
|
75
75
|
listRuntimePools2,
|
|
76
76
|
init_db2
|
|
77
|
-
} from "./cli-
|
|
77
|
+
} from "./cli-97ae65rz.js";
|
|
78
78
|
import {
|
|
79
79
|
userHoldsOperatorGrantedRole2,
|
|
80
80
|
assertMayActOnOperatorGrantedTarget2,
|
|
81
81
|
init_rbac_roles
|
|
82
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-q24n86d2.js";
|
|
83
83
|
import {
|
|
84
84
|
remediateStalledRuntime
|
|
85
|
-
} from "./cli-
|
|
85
|
+
} from "./cli-3sy2xags.js";
|
|
86
86
|
import {
|
|
87
87
|
repointTrackerSyncBySwarmId,
|
|
88
88
|
init_tracker,
|
|
@@ -110,13 +110,13 @@ import {
|
|
|
110
110
|
init_approval_cancel,
|
|
111
111
|
canClaim,
|
|
112
112
|
init_budget_admission
|
|
113
|
-
} from "./cli-
|
|
113
|
+
} from "./cli-3e875j5p.js";
|
|
114
114
|
import {
|
|
115
115
|
runScriptWithRunCredential,
|
|
116
116
|
init_run_credential,
|
|
117
117
|
runSavedScriptAsAgent,
|
|
118
118
|
init_run_saved
|
|
119
|
-
} from "./cli-
|
|
119
|
+
} from "./cli-fwy8kfd6.js";
|
|
120
120
|
import {
|
|
121
121
|
runtimeStaleThresholdMinutes,
|
|
122
122
|
countActiveRuntimeInstancesForAgent,
|
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
init_multi_runtime,
|
|
127
127
|
createApprovalFollowUpTask,
|
|
128
128
|
init_approval_notifications
|
|
129
|
-
} from "./cli-
|
|
129
|
+
} from "./cli-jdknh18m.js";
|
|
130
130
|
import {
|
|
131
131
|
isMultiRuntimeEnabled,
|
|
132
132
|
init_multi_runtime2
|
|
@@ -135,13 +135,13 @@ import {
|
|
|
135
135
|
recordIdentityEvent,
|
|
136
136
|
mintToken,
|
|
137
137
|
init_users
|
|
138
|
-
} from "./cli-
|
|
138
|
+
} from "./cli-f4e8r23x.js";
|
|
139
139
|
import {
|
|
140
140
|
TERMINAL_TASK_STATUSES,
|
|
141
141
|
OPEN_TASK_STATUSES,
|
|
142
142
|
SUPERSEDED_WORKFLOW_TASK_REASON,
|
|
143
143
|
init_types4
|
|
144
|
-
} from "./cli-
|
|
144
|
+
} from "./cli-pchypa1s.js";
|
|
145
145
|
import {
|
|
146
146
|
DEFAULT_OPENROUTER_BASE_URL,
|
|
147
147
|
getOpenRouterBaseUrl,
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
import {
|
|
157
157
|
init_package,
|
|
158
158
|
package_default
|
|
159
|
-
} from "./cli-
|
|
159
|
+
} from "./cli-zh9rsbqf.js";
|
|
160
160
|
import {
|
|
161
161
|
isEnvFlagEnabled,
|
|
162
162
|
init_env_flag
|
|
@@ -306,7 +306,8 @@ async function routePoolTasks(opts = {}) {
|
|
|
306
306
|
if (ok === undefined) {
|
|
307
307
|
const result = await checkProfileForAgent(agent.id, task.profile, {
|
|
308
308
|
vcsRepo: task.vcsRepo,
|
|
309
|
-
includeRepoSecrets
|
|
309
|
+
includeRepoSecrets,
|
|
310
|
+
fallbacks: false
|
|
310
311
|
});
|
|
311
312
|
ok = result?.ok !== false;
|
|
312
313
|
profileOk.set(memoKey, ok);
|
|
@@ -16,17 +16,17 @@ import {
|
|
|
16
16
|
getSwarmConfigs2,
|
|
17
17
|
upsertSwarmConfig2,
|
|
18
18
|
init_db4
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-rcecc3yq.js";
|
|
20
20
|
import {
|
|
21
21
|
createRuntimeProvider,
|
|
22
22
|
init_runtime_providers
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-z1w943va.js";
|
|
24
24
|
import {
|
|
25
25
|
closeSessionTokenConnections,
|
|
26
26
|
init_session_token_connections,
|
|
27
27
|
insertSessionToken,
|
|
28
28
|
init_users
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-f4e8r23x.js";
|
|
30
30
|
import {
|
|
31
31
|
RuntimeControllerCreateSchema,
|
|
32
32
|
RuntimeControllerUpdateSchema,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
RuntimePoolUpdateSchema,
|
|
35
35
|
RuntimePoolCreateAgentSchema,
|
|
36
36
|
init_types4
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-pchypa1s.js";
|
|
38
38
|
import {
|
|
39
39
|
poolCacheKey,
|
|
40
40
|
init_types5
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
checkDeepSeekApiKey,
|
|
12
12
|
checkOpenAICompatibleProvider,
|
|
13
13
|
writeSkillsToFilesystem
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-837vfs2x.js";
|
|
15
15
|
import {
|
|
16
16
|
renderSteeringDelivery
|
|
17
17
|
} from "./cli-2gxeg5gr.js";
|
|
@@ -38,35 +38,35 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
checkAmpCredentials2,
|
|
40
40
|
liveTestAmpCredentials2
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-tekytdq9.js";
|
|
42
42
|
import {
|
|
43
43
|
checkClaudeCredentials2
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-1qkz151v.js";
|
|
45
45
|
import {
|
|
46
46
|
checkClaudeManagedCredentials2
|
|
47
47
|
} from "./cli-vj75tyaw.js";
|
|
48
48
|
import {
|
|
49
49
|
codexUserHome,
|
|
50
50
|
checkCodexCredentials2
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-mxn1qvbn.js";
|
|
52
52
|
import {
|
|
53
53
|
checkCursorCredentials2
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-kjtwrhea.js";
|
|
55
55
|
import {
|
|
56
56
|
checkDevinCredentials2
|
|
57
57
|
} from "./cli-mrt48bx7.js";
|
|
58
58
|
import {
|
|
59
59
|
checkDshCredentials2
|
|
60
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-0cq8y6m7.js";
|
|
61
61
|
import {
|
|
62
62
|
checkOpencodeCredentials2
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-6rc5frdm.js";
|
|
64
64
|
import {
|
|
65
65
|
checkFxCredentials2
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-pfs8adn4.js";
|
|
67
67
|
import {
|
|
68
68
|
checkGrokCredentials2
|
|
69
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-f6bahpn5.js";
|
|
70
70
|
import {
|
|
71
71
|
CODEX_OAUTH_POOL_SLOTS_ENV,
|
|
72
72
|
isCodexOAuthConfigKey,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
init_azure_devops,
|
|
85
85
|
resolveScriptsOnlyMode,
|
|
86
86
|
init_scripts_only_mode
|
|
87
|
-
} from "./cli-
|
|
87
|
+
} from "./cli-3e875j5p.js";
|
|
88
88
|
import {
|
|
89
89
|
terminateRegisteredProcessGroups,
|
|
90
90
|
init_process_group
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
import {
|
|
93
93
|
validateJsonSchema,
|
|
94
94
|
init_json_schema_validator
|
|
95
|
-
} from "./cli-
|
|
95
|
+
} from "./cli-jdknh18m.js";
|
|
96
96
|
import {
|
|
97
97
|
authJsonToCredentialSelection,
|
|
98
98
|
credentialsToAuthJson,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
initialize,
|
|
112
112
|
ensure,
|
|
113
113
|
init_business_use
|
|
114
|
-
} from "./cli-
|
|
114
|
+
} from "./cli-4vzgeta4.js";
|
|
115
115
|
import {
|
|
116
116
|
mapTriggerSurface,
|
|
117
117
|
init_telemetry_context,
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
init_vcs_repo_match,
|
|
132
132
|
resumedTaskModelSelection,
|
|
133
133
|
init_model_pin
|
|
134
|
-
} from "./cli-
|
|
134
|
+
} from "./cli-rcecc3yq.js";
|
|
135
135
|
import {
|
|
136
136
|
parseWorkerModelTierOverrides,
|
|
137
137
|
resolveTaskModelSelection,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
ProviderNameSchema,
|
|
140
140
|
WorkerNudgeSchema,
|
|
141
141
|
init_types4
|
|
142
|
-
} from "./cli-
|
|
142
|
+
} from "./cli-pchypa1s.js";
|
|
143
143
|
import {
|
|
144
144
|
isCodexAuthFailureReason,
|
|
145
145
|
init_codex_auth_failure
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
resolveClaudeMdPath,
|
|
170
170
|
syncProfileFilesToServer,
|
|
171
171
|
init_profile_sync
|
|
172
|
-
} from "./cli-
|
|
172
|
+
} from "./cli-dzpc6en0.js";
|
|
173
173
|
import {
|
|
174
174
|
isSteeringEnabled2,
|
|
175
175
|
init_steering_enabled
|
|
@@ -207,7 +207,7 @@ import {
|
|
|
207
207
|
import {
|
|
208
208
|
getMcpBaseUrl,
|
|
209
209
|
init_constants3
|
|
210
|
-
} from "./cli-
|
|
210
|
+
} from "./cli-dns0y538.js";
|
|
211
211
|
import {
|
|
212
212
|
isEnvFlagEnabled,
|
|
213
213
|
init_env_flag
|
|
@@ -271,15 +271,15 @@ init_storage();
|
|
|
271
271
|
async function createProviderAdapter(provider) {
|
|
272
272
|
switch (provider) {
|
|
273
273
|
case "claude": {
|
|
274
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
274
|
+
const { ClaudeAdapter } = await import("./claude-adapter-stw7jdcf.js");
|
|
275
275
|
return new ClaudeAdapter;
|
|
276
276
|
}
|
|
277
277
|
case "pi": {
|
|
278
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
278
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-6mkwq64n.js");
|
|
279
279
|
return new PiMonoAdapter;
|
|
280
280
|
}
|
|
281
281
|
case "codex": {
|
|
282
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
282
|
+
const { CodexAdapter } = await import("./codex-adapter-zerf5qsp.js");
|
|
283
283
|
return new CodexAdapter;
|
|
284
284
|
}
|
|
285
285
|
case "claude-managed": {
|
|
@@ -291,31 +291,31 @@ async function createProviderAdapter(provider) {
|
|
|
291
291
|
return new DevinAdapter;
|
|
292
292
|
}
|
|
293
293
|
case "opencode": {
|
|
294
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
294
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-arn7gm8q.js");
|
|
295
295
|
return new OpencodeAdapter;
|
|
296
296
|
}
|
|
297
297
|
case "dsh": {
|
|
298
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
298
|
+
const { DshAdapter } = await import("./dsh-adapter-f75sz821.js");
|
|
299
299
|
return new DshAdapter;
|
|
300
300
|
}
|
|
301
301
|
case "amp": {
|
|
302
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
302
|
+
const { AmpAdapter } = await import("./amp-adapter-ce7jjke4.js");
|
|
303
303
|
return new AmpAdapter;
|
|
304
304
|
}
|
|
305
305
|
case "cursor": {
|
|
306
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
306
|
+
const { CursorAdapter } = await import("./cursor-adapter-qj8vehv6.js");
|
|
307
307
|
return new CursorAdapter;
|
|
308
308
|
}
|
|
309
309
|
case "grok": {
|
|
310
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
310
|
+
const { GrokAdapter } = await import("./grok-adapter-n2m3zjg1.js");
|
|
311
311
|
return new GrokAdapter;
|
|
312
312
|
}
|
|
313
313
|
case "fx": {
|
|
314
|
-
const { FxAdapter } = await import("./fx-adapter-
|
|
314
|
+
const { FxAdapter } = await import("./fx-adapter-rpsgb1tw.js");
|
|
315
315
|
return new FxAdapter;
|
|
316
316
|
}
|
|
317
317
|
case "acp": {
|
|
318
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
318
|
+
const { ACPAdapter } = await import("./acp-adapter-fqzkxyra.js");
|
|
319
319
|
return new ACPAdapter;
|
|
320
320
|
}
|
|
321
321
|
default:
|
|
@@ -1315,7 +1315,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
1315
1315
|
devin: (env) => checkDevinCredentials2(env),
|
|
1316
1316
|
opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
|
|
1317
1317
|
pi: async (env, opts) => {
|
|
1318
|
-
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-
|
|
1318
|
+
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-6mkwq64n.js");
|
|
1319
1319
|
return {
|
|
1320
1320
|
...await checkPiMonoCredentials(env, opts),
|
|
1321
1321
|
opencodeGoModels: listPiOpencodeGoModelIds()
|
|
@@ -1594,7 +1594,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1594
1594
|
latency_ms: Date.now() - startedAt
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1597
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-qj8vehv6.js");
|
|
1598
1598
|
return checkEachKey("CURSOR_API_KEY", apiKey, async (member) => {
|
|
1599
1599
|
const start = Date.now();
|
|
1600
1600
|
const result = await liveTestCursorKey(member);
|
|
@@ -2015,6 +2015,52 @@ async function refreshIdentityIfChanged(ctx, cached) {
|
|
|
2015
2015
|
// src/commands/runner.ts
|
|
2016
2016
|
init_profile_sync();
|
|
2017
2017
|
|
|
2018
|
+
// src/commands/provider-error-class.ts
|
|
2019
|
+
init_codex_auth_failure();
|
|
2020
|
+
init_model_rate_limit_windows();
|
|
2021
|
+
var NEVER_FALLBACK = /max turns exceeded|budget limit exceeded|error_max_budget|context (window|length|limit)|prompt is too long|maximum context length|context_length_exceeded/i;
|
|
2022
|
+
var AUTH_FAILURE = /authentication[ _](?:failed|error)|invalid[ _]api[ _]key|\bhttp 401\b|\b401 unauthori[sz]ed/i;
|
|
2023
|
+
var OVERLOADED = /overloaded|\b529\b/i;
|
|
2024
|
+
var SERVER_ERROR = /\b(?:status|http|error|code)[ :]*5\d\d\b|internal server error|bad gateway|service unavailable|gateway time-?out|insufficient storage|server_error/i;
|
|
2025
|
+
function classifyProviderError(result, failureReason, rateLimitOutcome) {
|
|
2026
|
+
if (result.exitCode === 0)
|
|
2027
|
+
return null;
|
|
2028
|
+
if (result.errorCategory === "cancelled")
|
|
2029
|
+
return null;
|
|
2030
|
+
if (result.errorOrigin === "harness")
|
|
2031
|
+
return null;
|
|
2032
|
+
const text = failureReason ?? "";
|
|
2033
|
+
if (NEVER_FALLBACK.test(text))
|
|
2034
|
+
return null;
|
|
2035
|
+
switch (rateLimitOutcome.kind) {
|
|
2036
|
+
case "seat":
|
|
2037
|
+
return { errorClass: "seat" };
|
|
2038
|
+
case "model":
|
|
2039
|
+
return { errorClass: "model_window" };
|
|
2040
|
+
case "key":
|
|
2041
|
+
return {
|
|
2042
|
+
errorClass: isCodexCreditsExhaustedMessage(text) ? "credits" : "rate_limit"
|
|
2043
|
+
};
|
|
2044
|
+
case "none":
|
|
2045
|
+
break;
|
|
2046
|
+
}
|
|
2047
|
+
if (!text)
|
|
2048
|
+
return null;
|
|
2049
|
+
if (isCodexAuthFailureReason(text) || AUTH_FAILURE.test(text))
|
|
2050
|
+
return { errorClass: "auth" };
|
|
2051
|
+
if (OVERLOADED.test(text))
|
|
2052
|
+
return { errorClass: "overloaded" };
|
|
2053
|
+
if (SERVER_ERROR.test(text))
|
|
2054
|
+
return { errorClass: "server_error" };
|
|
2055
|
+
return null;
|
|
2056
|
+
}
|
|
2057
|
+
function classifyProviderErrorOf(result, failureReason, model, codexCreditsExhaustedCooldownMs, nowMs = Date.now()) {
|
|
2058
|
+
if (result.exitCode === 0)
|
|
2059
|
+
return null;
|
|
2060
|
+
const outcome = classifyRateLimitOutcome(result, failureReason, nowMs, codexCreditsExhaustedCooldownMs, modelFamilyOf(model));
|
|
2061
|
+
return classifyProviderError(result, failureReason, outcome)?.errorClass ?? null;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2018
2064
|
// src/commands/push-delivery.ts
|
|
2019
2065
|
init_secret_scrubber();
|
|
2020
2066
|
function resolveWorkerDeliveryMode(serverMode, isLead, env = process.env, pollRequired = false) {
|
|
@@ -3327,7 +3373,29 @@ async function createSessionReportingAuthFailure(adapter, config, report) {
|
|
|
3327
3373
|
throw err;
|
|
3328
3374
|
}
|
|
3329
3375
|
}
|
|
3330
|
-
async function
|
|
3376
|
+
async function requestProviderFallback(config, role, taskId, input) {
|
|
3377
|
+
if (!input.resolvedProfile || !input.errorClass)
|
|
3378
|
+
return { superseded: false };
|
|
3379
|
+
const outcome = await supersedeTaskViaAPI(config, role, taskId, "provider_fallback", {
|
|
3380
|
+
errorClass: input.errorClass
|
|
3381
|
+
});
|
|
3382
|
+
if (!outcome.ok)
|
|
3383
|
+
return { superseded: false };
|
|
3384
|
+
if (outcome.kind === "resumed") {
|
|
3385
|
+
console.log(`[${role}] Task ${taskId.slice(0, 8)} hit ${input.errorClass} on ${input.resolvedProfile}; resuming on the next fallback profile`);
|
|
3386
|
+
return { superseded: true };
|
|
3387
|
+
}
|
|
3388
|
+
if (outcome.kind === "noFallback" && outcome.failureReason) {
|
|
3389
|
+
return {
|
|
3390
|
+
superseded: false,
|
|
3391
|
+
failureReason: input.failureReason ? `${outcome.failureReason}
|
|
3392
|
+
|
|
3393
|
+
${input.failureReason}` : outcome.failureReason
|
|
3394
|
+
};
|
|
3395
|
+
}
|
|
3396
|
+
return { superseded: false };
|
|
3397
|
+
}
|
|
3398
|
+
async function supersedeTaskViaAPI(config, role, taskId, reason, extra = {}) {
|
|
3331
3399
|
const headers = {
|
|
3332
3400
|
"X-Agent-ID": config.agentId,
|
|
3333
3401
|
"Content-Type": "application/json"
|
|
@@ -3339,14 +3407,14 @@ async function supersedeTaskViaAPI(config, role, taskId, reason) {
|
|
|
3339
3407
|
const response = await fetch(`${config.apiUrl}/api/tasks/${taskId}/supersede`, {
|
|
3340
3408
|
method: "POST",
|
|
3341
3409
|
headers,
|
|
3342
|
-
body: JSON.stringify({ reason })
|
|
3410
|
+
body: JSON.stringify({ reason, ...extra })
|
|
3343
3411
|
});
|
|
3344
3412
|
if (response.ok) {
|
|
3345
3413
|
const body = await response.json().catch(() => null);
|
|
3346
3414
|
const resumeTaskId = body?.resumeTaskId ?? null;
|
|
3347
3415
|
const kind = body?.kind ?? "resumed";
|
|
3348
3416
|
console.log(`[${role}] Task ${taskId.slice(0, 8)} superseded (kind=${kind}, resume=${resumeTaskId ? resumeTaskId.slice(0, 8) : "none"})`);
|
|
3349
|
-
return { ok: true, resumeTaskId, kind };
|
|
3417
|
+
return { ok: true, resumeTaskId, kind, failureReason: body?.failureReason ?? null };
|
|
3350
3418
|
}
|
|
3351
3419
|
if (response.status === 404 || response.status === 405) {
|
|
3352
3420
|
console.warn(`[${role}] Supersede route missing for task ${taskId.slice(0, 8)} (${response.status}); falling back to pause`);
|
|
@@ -4437,7 +4505,15 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
4437
4505
|
if ((err instanceof ModelWindowExhaustedError || err instanceof CredentialAllowlistError) && realTaskId) {
|
|
4438
4506
|
const reason = err.message;
|
|
4439
4507
|
console.warn(`[${opts.role}] ${reason}`);
|
|
4440
|
-
|
|
4508
|
+
const apiConfig = { apiUrl: opts.apiUrl, apiKey: opts.apiKey, agentId: opts.agentId };
|
|
4509
|
+
const fallback = await requestProviderFallback(apiConfig, opts.role, realTaskId, {
|
|
4510
|
+
resolvedProfile: opts.resolvedProfile,
|
|
4511
|
+
errorClass: "pool_empty",
|
|
4512
|
+
failureReason: reason
|
|
4513
|
+
});
|
|
4514
|
+
if (!fallback.superseded) {
|
|
4515
|
+
await ensureTaskFinished(apiConfig, opts.role, realTaskId, 1, fallback.failureReason ?? reason, undefined, opts.harnessProvider);
|
|
4516
|
+
}
|
|
4441
4517
|
}
|
|
4442
4518
|
throw err;
|
|
4443
4519
|
}
|
|
@@ -5067,6 +5143,7 @@ async function spawnProviderProcess(adapter, opts, logDir) {
|
|
|
5067
5143
|
harnessProvider: opts.harnessProvider,
|
|
5068
5144
|
hasLocalEnvironment: adapter.traits.hasLocalEnvironment,
|
|
5069
5145
|
model: model || undefined,
|
|
5146
|
+
resolvedProfile: opts.resolvedProfile,
|
|
5070
5147
|
assistantText: assistantTextHolder,
|
|
5071
5148
|
finalProgress: finalProgressHolder,
|
|
5072
5149
|
lastCost: lastCostHolder
|
|
@@ -5198,6 +5275,7 @@ async function checkCompletedProcesses(state, role, apiConfig, cancelledSignaled
|
|
|
5198
5275
|
harnessVariant: task.harnessVariant,
|
|
5199
5276
|
harnessVariantMeta: task.harnessVariantMeta,
|
|
5200
5277
|
model: task.model,
|
|
5278
|
+
resolvedProfile: task.resolvedProfile,
|
|
5201
5279
|
durationMs: Date.now() - task.startTime.getTime(),
|
|
5202
5280
|
assistantText: task.assistantText,
|
|
5203
5281
|
finalProgress: task.finalProgress,
|
|
@@ -5219,6 +5297,7 @@ async function checkCompletedProcesses(state, role, apiConfig, cancelledSignaled
|
|
|
5219
5297
|
harnessVariant,
|
|
5220
5298
|
harnessVariantMeta,
|
|
5221
5299
|
model,
|
|
5300
|
+
resolvedProfile,
|
|
5222
5301
|
durationMs,
|
|
5223
5302
|
assistantText,
|
|
5224
5303
|
finalProgress,
|
|
@@ -5287,7 +5366,16 @@ ${bridgeDiagnostics.paneTail}` : undefined;
|
|
|
5287
5366
|
model,
|
|
5288
5367
|
codexCreditsExhaustedCooldownMs: state.codexCreditsExhaustedCooldownMs,
|
|
5289
5368
|
modelWindowBlocks: state.modelWindowBlocks
|
|
5290
|
-
}, () =>
|
|
5369
|
+
}, async () => {
|
|
5370
|
+
const fallback = await requestProviderFallback(apiConfig, role, taskId, {
|
|
5371
|
+
resolvedProfile,
|
|
5372
|
+
failureReason,
|
|
5373
|
+
errorClass: resolvedProfile ? classifyProviderErrorOf(result, failureReason, model, state.codexCreditsExhaustedCooldownMs) : null
|
|
5374
|
+
});
|
|
5375
|
+
if (fallback.superseded)
|
|
5376
|
+
return;
|
|
5377
|
+
await ensureTaskFinished(apiConfig, role, taskId, result.exitCode, fallback.failureReason ?? failureReason, resolveProviderOutput(result, assistantText), harnessProvider, bridgeFailureDiagnostics, finalProgress?.value, deadline);
|
|
5378
|
+
});
|
|
5291
5379
|
const sessionTriggerSurface = workerTriggerSurface(triggerSurface);
|
|
5292
5380
|
const sessionActor = { userId: requestedByUserId ?? null };
|
|
5293
5381
|
telemetry.taskEvent("session_completed", {
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
createModelProfile,
|
|
10
10
|
init_model_profiles,
|
|
11
11
|
init_db4
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-rcecc3yq.js";
|
|
13
13
|
import {
|
|
14
14
|
ensureRbacSeedsSynced2,
|
|
15
15
|
init_rbac_roles
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-q24n86d2.js";
|
|
17
17
|
import {
|
|
18
18
|
MODEL_TIERS,
|
|
19
19
|
DEFAULT_MODEL_TIER_MAP,
|
|
20
20
|
ProviderNameSchema,
|
|
21
21
|
init_types4
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-pchypa1s.js";
|
|
23
23
|
import {
|
|
24
24
|
__esm
|
|
25
25
|
} from "./cli-242037k3.js";
|
|
@@ -133,6 +133,8 @@ function isBrowserReachableUrl(value) {
|
|
|
133
133
|
return false;
|
|
134
134
|
if (parsed.slice(0, 5).every((x) => x === 0) && g(5) === 65535) {
|
|
135
135
|
const a = g(6) >> 8;
|
|
136
|
+
if (a === 0)
|
|
137
|
+
return false;
|
|
136
138
|
return a === 127 || !isPrivateIpv4(a, g(6) & 255);
|
|
137
139
|
}
|
|
138
140
|
return true;
|
|
@@ -140,6 +142,8 @@ function isBrowserReachableUrl(value) {
|
|
|
140
142
|
const octets = host.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
|
|
141
143
|
if (octets) {
|
|
142
144
|
const [a, b] = [Number(octets[1]), Number(octets[2])];
|
|
145
|
+
if (a === 0)
|
|
146
|
+
return false;
|
|
143
147
|
return a === 127 || !isPrivateIpv4(a, b);
|
|
144
148
|
}
|
|
145
149
|
if (!host.includes("."))
|