@desplega.ai/agent-swarm 2.5.3 → 2.5.4
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-gr2fcyyj.js → acp-adapter-ek38cwsv.js} +4 -4
- package/dist/{actions-wv766ghf.js → actions-92mepq03.js} +17 -17
- package/dist/{amp-adapter-speb906t.js → amp-adapter-9gaxg015.js} +2 -2
- package/dist/{app-ag29n14f.js → app-ctn8gsgx.js} +3 -3
- package/dist/{assistant-3x8bz3eg.js → assistant-zyr5kz47.js} +19 -19
- package/dist/{boot-reembed-jsmfrpzf.js → boot-reembed-dwzfttdr.js} +1 -1
- package/dist/{boot-reembed-5b3d2eea.js → boot-reembed-w75maga2.js} +1 -1
- package/dist/{boot-scrub-sweep-s73gerxy.js → boot-scrub-sweep-e9kq43kf.js} +3 -3
- package/dist/{boot-seeds-5zmax2wr.js → boot-seeds-x28v3fhb.js} +4 -4
- package/dist/{claude-adapter-hswdnm3t.js → claude-adapter-f0afqnne.js} +4 -4
- package/dist/{claude-managed-adapter-cvbzj1h6.js → claude-managed-adapter-x81a7r65.js} +3 -3
- package/dist/{claude-managed-setup-3k8m3hhc.js → claude-managed-setup-bqzwjd9x.js} +1 -1
- package/dist/{claude-sdk-session-fkbyk66x.js → claude-sdk-session-7b7whkaq.js} +9307 -9254
- package/dist/{cli-a5ebc95n.js → cli-0shx9j93.js} +16 -13
- package/dist/{cli-vwn81jbs.js → cli-19202kew.js} +3 -3
- package/dist/{cli-svrj71pg.js → cli-1r5ad7j5.js} +7 -7
- package/dist/{cli-hhxjnjzs.js → cli-25n3mv5d.js} +8 -6
- package/dist/cli-2655k16q.js +140 -0
- package/dist/{cli-hcpj2xqz.js → cli-277c31dw.js} +1 -1
- package/dist/{cli-35gtk1p6.js → cli-4b2z6n0m.js} +29 -7
- package/dist/{cli-40jsnrjm.js → cli-5bnsc0e1.js} +7 -5
- package/dist/{cli-fzcn3d87.js → cli-621ce7kw.js} +1 -1
- package/dist/{cli-s49hpn37.js → cli-64mh9mf3.js} +19 -5
- package/dist/{cli-e8jyq7d8.js → cli-6a1xg1p7.js} +6 -2
- package/dist/{cli-p9rafdrb.js → cli-7p4jxgtt.js} +4 -4
- package/dist/{cli-w1zwctj2.js → cli-9j129brq.js} +9 -3
- package/dist/{cli-ce0ak9ms.js → cli-abs8ndtr.js} +11 -11
- package/dist/{cli-aecdcr77.js → cli-asq5ydm4.js} +123 -50
- package/dist/{cli-n45mr7zh.js → cli-bvpgr9ny.js} +2 -2
- package/dist/{cli-210xd1f4.js → cli-c61mbdds.js} +3 -3
- package/dist/{cli-e5bxnjps.js → cli-c952c7ac.js} +5 -5
- package/dist/{cli-p859hcc8.js → cli-dew6x255.js} +1 -1
- package/dist/{cli-tx00c0h6.js → cli-dqygeeh5.js} +17 -1
- package/dist/{cli-gpv60278.js → cli-e42vss7b.js} +2 -2
- package/dist/{cli-s53vp709.js → cli-eftzyh9y.js} +1 -1
- package/dist/{cli-3ngdk5te.js → cli-ethgy7ha.js} +1 -1
- package/dist/{cli-99xgw26r.js → cli-ff1tm9n9.js} +1 -1
- package/dist/{cli-ewm3pwbq.js → cli-g9vd9ece.js} +37 -12
- package/dist/{cli-jjznk3f7.js → cli-gbfxp48k.js} +62 -28
- package/dist/{cli-z21whrrg.js → cli-gn5af0x5.js} +14 -14
- package/dist/{cli-1fc85mvt.js → cli-gwhjmh8g.js} +4 -4
- package/dist/{cli-avdvgcay.js → cli-hh5we352.js} +24 -5
- package/dist/{cli-0ebey9hg.js → cli-j6rktc91.js} +1 -1
- package/dist/{cli-kxawjrxg.js → cli-jb30dzvk.js} +332 -36
- package/dist/{cli-25j01dpj.js → cli-jbnn4vxb.js} +3 -3
- package/dist/{cli-qzme5949.js → cli-k4tjsdx9.js} +44 -39
- package/dist/{cli-8s5wx3nz.js → cli-m4ecdxvz.js} +40 -13
- package/dist/{cli-ta8bd7th.js → cli-pzatvw94.js} +1 -1
- package/dist/{cli-p6zs9h4y.js → cli-rr7zx19j.js} +767 -249
- package/dist/{cli-502eqv93.js → cli-s682zgqz.js} +1 -1
- package/dist/{cli-fsdprwrg.js → cli-sbwsxvtd.js} +1 -1
- package/dist/{cli-0xk505e8.js → cli-sxgtf5fw.js} +1 -1
- package/dist/{cli-egjggehm.js → cli-tsma7p8v.js} +1 -1
- package/dist/{cli-qgf8emrn.js → cli-wghjkr0e.js} +5 -5
- package/dist/{cli-p0rzjkya.js → cli-wx2nj19m.js} +29 -10
- package/dist/{cli-e2ar4bp1.js → cli-x0f2v69c.js} +111 -42
- package/dist/{cli-y561h5a9.js → cli-xtrz6bzs.js} +5 -5
- package/dist/{cli-gpsz7g88.js → cli-xzfq4at3.js} +7 -7
- package/dist/cli.js +18 -18
- package/dist/{codex-adapter-n8ka66vf.js → codex-adapter-wch12q99.js} +2 -2
- package/dist/{codex-hook-e2he7aca.js → codex-hook-brpnycn5.js} +1 -1
- package/dist/{codex-session-runner-fsebts37.js → codex-session-runner-41pfcr95.js} +2 -2
- package/dist/{commands-t04rt2pc.js → commands-9849dkj6.js} +2 -2
- package/dist/{controller-rgna04r2.js → controller-ja0sd95p.js} +27 -1
- package/dist/{controllers-connect-bqm1rtft.js → controllers-connect-xp05dj6x.js} +16 -16
- package/dist/{cursor-adapter-swr2k95y.js → cursor-adapter-623qxqew.js} +1 -2
- package/dist/{db-a4m7haw0.js → db-47vj40dy.js} +3 -3
- package/dist/{db-24ck09xy.js → db-w759qmx0.js} +2 -2
- package/dist/{dispatcher-nwf9ss0q.js → dispatcher-7b8e4z2j.js} +15 -15
- package/dist/{docker-nfy2gc8t.js → docker-s84hjs91.js} +2 -2
- package/dist/{dsh-adapter-kpdnhjst.js → dsh-adapter-2ezw3xea.js} +1 -2
- package/dist/{external-channel-j1e2p34p.js → external-channel-e2s028da.js} +2 -2
- package/dist/{grok-adapter-qtjz0whk.js → grok-adapter-ys7gaqee.js} +5 -5
- package/dist/{handlers-19xr6dnz.js → handlers-wy1dr6ja.js} +18 -18
- package/dist/{heartbeat-vtesda5d.js → heartbeat-w3mntghj.js} +17 -17
- package/dist/{hook-8wqaszda.js → hook-3jjywnpb.js} +9 -3
- package/dist/{hook-b2hhj6rd.js → hook-g7kvv6x9.js} +3 -2
- package/dist/{http-mxcqhhcs.js → http-tkp7d4kb.js} +267 -75
- package/dist/{index-srg522m6.js → index-1ef1myq2.js} +15 -15
- package/dist/{index-1r8wfpzs.js → index-3n8m9ea2.js} +1 -1
- package/dist/{index-kw2mmat7.js → index-nmm79qgr.js} +17 -17
- package/dist/{index-n1vbvta9.js → index-q7m26kvs.js} +24 -22
- package/dist/{index-spwxjgay.js → index-xdaahthb.js} +15 -15
- package/dist/{keepalive-dsd8rtgx.js → keepalive-v4ta8wgg.js} +3 -3
- package/dist/{lead-zyerk1x2.js → lead-sawnyqxk.js} +33 -33
- package/dist/{maintenance-jqmqwnet.js → maintenance-84n1ex21.js} +1 -1
- package/dist/{oauth-refresh-sweep-q2c3bnvm.js → oauth-refresh-sweep-vjnnandw.js} +2 -2
- package/dist/{onboard-w4yd7s8t.js → onboard-sfmpe4np.js} +2 -2
- package/dist/{opencode-adapter-9tppvxar.js → opencode-adapter-jmpst4q4.js} +3 -3
- package/dist/{otel-impl-f36byzbd.js → otel-impl-v6cc0zve.js} +1 -1
- package/dist/{pi-mono-adapter-tqsge1ay.js → pi-mono-adapter-fk8fkcf6.js} +33 -6
- package/dist/{pricing-refresh-xvak5p4v.js → pricing-refresh-fsk1e1zc.js} +3 -3
- package/dist/{rbac-roles-gfn30fb8.js → rbac-roles-prmkdnkw.js} +2 -2
- package/dist/{rbac-roles-682k2mt5.js → rbac-roles-zxmxqa39.js} +1 -1
- package/dist/{render-v2-hgytz8nn.js → render-v2-pjwxvnkw.js} +3 -3
- package/dist/{resume-2dvq348g.js → resume-frdtgfa0.js} +8 -6
- package/dist/{session-access-7f21ekq9.js → session-access-fpez4y5q.js} +4 -4
- package/dist/{setup-epffxtbk.js → setup-mq6m3m8q.js} +1 -1
- package/dist/{work-objects-xz1a5rqk.js → work-objects-kfahhjsq.js} +18 -18
- package/dist/{worker-42t8emjt.js → worker-v5e5rxj3.js} +33 -33
- package/openapi.json +68 -3
- package/package.json +5 -5
- package/plugin/commands/create-pr.md +2 -2
- package/plugin/pi-skills/create-pr/SKILL.md +2 -2
- package/src/be/db/approvals.ts +48 -0
- package/src/be/db/tasks/write.ts +15 -5
- package/src/be/db/workflow-idempotency.ts +183 -0
- package/src/be/db/workflow-runs.ts +318 -7
- package/src/be/db.ts +67 -17
- package/src/be/migrations/242_workflow_idempotency_keys.sql +40 -0
- package/src/be/sealed-json.ts +1 -0
- package/src/be/seed-scripts/catalog/compound-insights.inline.ts +2 -2
- package/src/be/seed-scripts/catalog/compound-insights.ts +2 -2
- package/src/be/seed-skills/bundled-files.generated.json +1 -1
- package/src/be/sql-connections.ts +7 -1
- package/src/be/swarm-config-guard.ts +2 -0
- package/src/be/users.ts +9 -0
- package/src/commands/controller.ts +33 -0
- package/src/commands/runner.ts +6 -2
- package/src/extensions/apply-task-create.ts +57 -11
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/contract.ts +25 -0
- package/src/extensions/dispatcher.ts +4 -0
- package/src/extensions/post-bridge.ts +8 -0
- package/src/hooks/context-bound-note.ts +196 -0
- package/src/hooks/hook.ts +12 -0
- package/src/http/config.ts +48 -16
- package/src/http/idempotency-key.ts +117 -0
- package/src/http/workflows.ts +129 -24
- package/src/prompts/context-bound-note.ts +48 -0
- package/src/prompts/session-templates.ts +25 -1
- package/src/providers/amp-adapter.ts +30 -8
- package/src/providers/claude-adapter.ts +29 -4
- package/src/providers/claude-managed-adapter.ts +26 -0
- package/src/providers/claude-sdk-session.ts +10 -0
- package/src/providers/claude-session-events.ts +13 -0
- package/src/providers/codex-adapter.ts +12 -0
- package/src/providers/opencode-adapter.ts +18 -0
- package/src/providers/pi-mono-adapter.ts +35 -0
- package/src/runtime-providers/docker.ts +6 -2
- package/src/scripts-runtime/types/swarm-extension.d.ts +35 -0
- package/src/tests/amp-adapter.test.ts +97 -0
- package/src/tests/approval-requests.test.ts +10 -7
- package/src/tests/approval-sweeps.test.ts +12 -6
- package/src/tests/base-prompt.test.ts +1 -1
- package/src/tests/claude-hook-output.test.ts +79 -1
- package/src/tests/claude-managed-adapter.test.ts +275 -0
- package/src/tests/codex-adapter.test.ts +163 -0
- package/src/tests/context-bound-note.test.ts +269 -0
- package/src/tests/extensions-pre-task.test.ts +273 -0
- package/src/tests/fetch-resolved-env.test.ts +17 -0
- package/src/tests/fixtures/extensions/record-blocks/hooks.ts +10 -0
- package/src/tests/fixtures/extensions/record-blocks/manifest.json +7 -0
- package/src/tests/fixtures/fake-amp.ts +22 -8
- package/src/tests/fixtures/held-template-render.ts +42 -0
- package/src/tests/fixtures/workflow-idempotency-trigger.child.ts +73 -0
- package/src/tests/openapi-route-headers.test.ts +2 -0
- package/src/tests/opencode-adapter.test.ts +134 -0
- package/src/tests/pi-mono-adapter.test.ts +105 -0
- package/src/tests/prompt-template-session.test.ts +4 -3
- package/src/tests/runner-push-delivery.test.ts +25 -0
- package/src/tests/runtime-controller-liveness.test.ts +133 -0
- package/src/tests/runtime-providers-docker.test.ts +2 -0
- package/src/tests/script-connections.test.ts +3 -0
- package/src/tests/script-run-config-scope.test.ts +91 -3
- package/src/tests/session-logs.test.ts +70 -0
- package/src/tests/sessions-tree.test.ts +37 -0
- package/src/tests/workflow-cascade-cancel.test.ts +1169 -0
- package/src/tests/workflow-foreach-supersede-retry.test.ts +488 -0
- package/src/tests/workflow-idempotency.test.ts +915 -0
- package/src/tools/workflows/cancel-workflow-run.ts +1 -1
- package/src/utils/context-window.ts +8 -6
- package/src/workflows/approval-cancel.ts +15 -13
- package/src/workflows/approval-notifications.ts +5 -1
- package/src/workflows/checkpoint.ts +6 -3
- package/src/workflows/engine.ts +30 -8
- package/src/workflows/executors/foreach.ts +2 -2
- package/src/workflows/foreach-driver.ts +10 -3
- package/src/workflows/foreach-join.ts +29 -6
- package/src/workflows/recovery.ts +6 -1
- package/src/workflows/resume.ts +168 -56
- package/src/workflows/retry-poller.ts +49 -3
- package/src/workflows/task-step-routing.ts +29 -7
- package/templates/ai-toolbox.manifest.json +8 -8
- package/templates/community/open-prompt-showreel/PLAYBOOK.md +5 -6
- package/templates/community/open-prompt-showreel/lead-prompt.md +1 -1
- package/templates/community/open-prompt-showreel/skills/open-prompt-showreel/SKILL.md +4 -4
- package/templates/skills/agent-browser/SKILL.md +4 -4
- package/templates/skills/agent-browser/content.md +4 -4
- package/templates/skills/code-quality/config.json +1 -1
- package/templates/skills/code-quality/content.md +2 -2
- package/templates/skills/delegate-work/content.md +29 -25
- package/templates/skills/delegate-work/files/scripts/codex-exec.sh +5 -5
- package/templates/skills/qa/content.md +2 -2
- package/templates/skills/researching/content.md +2 -0
- package/templates/skills/work-on-task/SKILL.md +1 -1
- package/templates/skills/work-on-task/content.md +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSteeringDelivery
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-sxgtf5fw.js";
|
|
4
4
|
import {
|
|
5
5
|
authJsonToCredentialSelection,
|
|
6
6
|
credentialsToAuthJson,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
renderMemoriesPrompt,
|
|
21
21
|
isUnknownModelError,
|
|
22
22
|
writeSkillsToFilesystem
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-277c31dw.js";
|
|
24
24
|
import {
|
|
25
25
|
isPollTracingEnabled,
|
|
26
26
|
initOtel,
|
|
@@ -30,10 +30,7 @@ import {
|
|
|
30
30
|
injectTraceContext2,
|
|
31
31
|
initialize,
|
|
32
32
|
ensure
|
|
33
|
-
} from "./cli-
|
|
34
|
-
import {
|
|
35
|
-
getContextWindowSize
|
|
36
|
-
} from "./cli-a5ebc95n.js";
|
|
33
|
+
} from "./cli-abs8ndtr.js";
|
|
37
34
|
import {
|
|
38
35
|
MAX_RATE_LIMIT_RESET_MS,
|
|
39
36
|
isRateLimitMessage,
|
|
@@ -51,7 +48,7 @@ import {
|
|
|
51
48
|
canonicalAzureDevOpsRepoUrl,
|
|
52
49
|
parseAzureDevOpsRepoUrl,
|
|
53
50
|
resolveScriptsOnlyMode
|
|
54
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-asq5ydm4.js";
|
|
55
52
|
import {
|
|
56
53
|
ACP_TARGET_IDS,
|
|
57
54
|
isAcpTarget
|
|
@@ -59,32 +56,36 @@ import {
|
|
|
59
56
|
import {
|
|
60
57
|
checkAmpCredentials2,
|
|
61
58
|
liveTestAmpCredentials2
|
|
62
|
-
} from "./cli-
|
|
59
|
+
} from "./cli-wx2nj19m.js";
|
|
63
60
|
import {
|
|
64
61
|
checkClaudeCredentials2
|
|
65
|
-
} from "./cli-
|
|
62
|
+
} from "./cli-g9vd9ece.js";
|
|
66
63
|
import {
|
|
67
64
|
checkClaudeManagedCredentials2
|
|
68
|
-
} from "./cli-
|
|
65
|
+
} from "./cli-4b2z6n0m.js";
|
|
69
66
|
import {
|
|
70
67
|
codexUserHome,
|
|
71
68
|
checkCodexCredentials2
|
|
72
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-64mh9mf3.js";
|
|
73
70
|
import {
|
|
74
71
|
checkCursorCredentials2
|
|
75
|
-
} from "./cli-
|
|
72
|
+
} from "./cli-25n3mv5d.js";
|
|
76
73
|
import {
|
|
77
74
|
checkDevinCredentials2
|
|
78
75
|
} from "./cli-g1cw7xtt.js";
|
|
79
76
|
import {
|
|
80
77
|
checkDshCredentials2
|
|
81
|
-
} from "./cli-
|
|
78
|
+
} from "./cli-5bnsc0e1.js";
|
|
82
79
|
import {
|
|
83
80
|
checkOpencodeCredentials2
|
|
84
|
-
} from "./cli-
|
|
81
|
+
} from "./cli-hh5we352.js";
|
|
85
82
|
import {
|
|
86
83
|
checkGrokCredentials2
|
|
87
|
-
} from "./cli-
|
|
84
|
+
} from "./cli-621ce7kw.js";
|
|
85
|
+
import {
|
|
86
|
+
getContextWindowSize,
|
|
87
|
+
init_context_window
|
|
88
|
+
} from "./cli-0shx9j93.js";
|
|
88
89
|
import {
|
|
89
90
|
CODEX_OAUTH_POOL_SLOTS_ENV,
|
|
90
91
|
isCodexOAuthConfigKey,
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
} from "./cli-j4bwnpkm.js";
|
|
94
95
|
import {
|
|
95
96
|
validateJsonSchema
|
|
96
|
-
} from "./cli-
|
|
97
|
+
} from "./cli-gbfxp48k.js";
|
|
97
98
|
import {
|
|
98
99
|
mapTriggerSurface,
|
|
99
100
|
init_telemetry_context,
|
|
@@ -111,7 +112,7 @@ import {
|
|
|
111
112
|
init_vcs_repo_match,
|
|
112
113
|
isApiDrainingResponse,
|
|
113
114
|
init_api_drain
|
|
114
|
-
} from "./cli-
|
|
115
|
+
} from "./cli-jb30dzvk.js";
|
|
115
116
|
import {
|
|
116
117
|
parseWorkerModelTierOverrides,
|
|
117
118
|
resolveTaskModelSelection,
|
|
@@ -143,7 +144,7 @@ import {
|
|
|
143
144
|
resolveClaudeMdPath,
|
|
144
145
|
syncProfileFilesToServer,
|
|
145
146
|
init_profile_sync
|
|
146
|
-
} from "./cli-
|
|
147
|
+
} from "./cli-e42vss7b.js";
|
|
147
148
|
import {
|
|
148
149
|
isSteeringEnabled2,
|
|
149
150
|
init_steering_enabled
|
|
@@ -157,14 +158,7 @@ import {
|
|
|
157
158
|
} from "./cli-zw88zjba.js";
|
|
158
159
|
import {
|
|
159
160
|
init_templates3
|
|
160
|
-
} from "./cli-
|
|
161
|
-
import {
|
|
162
|
-
interpolate,
|
|
163
|
-
init_template,
|
|
164
|
-
configureHttpResolver,
|
|
165
|
-
resolveTemplateAsync,
|
|
166
|
-
init_resolver
|
|
167
|
-
} from "./cli-tx00c0h6.js";
|
|
161
|
+
} from "./cli-j6rktc91.js";
|
|
168
162
|
import {
|
|
169
163
|
modelFamilyOf,
|
|
170
164
|
windowForModelFamily,
|
|
@@ -182,6 +176,13 @@ import {
|
|
|
182
176
|
getOpenRouterAttributionHeaders,
|
|
183
177
|
init_openrouter_base_url
|
|
184
178
|
} from "./cli-dfyv0jdy.js";
|
|
179
|
+
import {
|
|
180
|
+
interpolate,
|
|
181
|
+
init_template,
|
|
182
|
+
configureHttpResolver,
|
|
183
|
+
resolveTemplateAsync,
|
|
184
|
+
init_resolver
|
|
185
|
+
} from "./cli-dqygeeh5.js";
|
|
185
186
|
import {
|
|
186
187
|
runtimeHarnessSections,
|
|
187
188
|
refreshRuntimeModelCatalog,
|
|
@@ -246,19 +247,19 @@ async function materializeCodexAuthJson(_slot, creds, deps = {}) {
|
|
|
246
247
|
async function createProviderAdapter(provider) {
|
|
247
248
|
switch (provider) {
|
|
248
249
|
case "claude": {
|
|
249
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
250
|
+
const { ClaudeAdapter } = await import("./claude-adapter-f0afqnne.js");
|
|
250
251
|
return new ClaudeAdapter;
|
|
251
252
|
}
|
|
252
253
|
case "pi": {
|
|
253
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
254
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-fk8fkcf6.js");
|
|
254
255
|
return new PiMonoAdapter;
|
|
255
256
|
}
|
|
256
257
|
case "codex": {
|
|
257
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
258
|
+
const { CodexAdapter } = await import("./codex-adapter-wch12q99.js");
|
|
258
259
|
return new CodexAdapter;
|
|
259
260
|
}
|
|
260
261
|
case "claude-managed": {
|
|
261
|
-
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-
|
|
262
|
+
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-x81a7r65.js");
|
|
262
263
|
return new ClaudeManagedAdapter;
|
|
263
264
|
}
|
|
264
265
|
case "devin": {
|
|
@@ -266,27 +267,27 @@ async function createProviderAdapter(provider) {
|
|
|
266
267
|
return new DevinAdapter;
|
|
267
268
|
}
|
|
268
269
|
case "opencode": {
|
|
269
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
270
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-jmpst4q4.js");
|
|
270
271
|
return new OpencodeAdapter;
|
|
271
272
|
}
|
|
272
273
|
case "dsh": {
|
|
273
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
274
|
+
const { DshAdapter } = await import("./dsh-adapter-2ezw3xea.js");
|
|
274
275
|
return new DshAdapter;
|
|
275
276
|
}
|
|
276
277
|
case "amp": {
|
|
277
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
278
|
+
const { AmpAdapter } = await import("./amp-adapter-9gaxg015.js");
|
|
278
279
|
return new AmpAdapter;
|
|
279
280
|
}
|
|
280
281
|
case "cursor": {
|
|
281
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
282
|
+
const { CursorAdapter } = await import("./cursor-adapter-623qxqew.js");
|
|
282
283
|
return new CursorAdapter;
|
|
283
284
|
}
|
|
284
285
|
case "grok": {
|
|
285
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
286
|
+
const { GrokAdapter } = await import("./grok-adapter-ys7gaqee.js");
|
|
286
287
|
return new GrokAdapter;
|
|
287
288
|
}
|
|
288
289
|
case "acp": {
|
|
289
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
290
|
+
const { ACPAdapter } = await import("./acp-adapter-ek38cwsv.js");
|
|
290
291
|
return new ACPAdapter;
|
|
291
292
|
}
|
|
292
293
|
default:
|
|
@@ -503,6 +504,7 @@ init_codex_auth_failure();
|
|
|
503
504
|
init_config_env_export();
|
|
504
505
|
init_config_secrets();
|
|
505
506
|
init_constants2();
|
|
507
|
+
init_context_window();
|
|
506
508
|
init_credentials();
|
|
507
509
|
|
|
508
510
|
// src/utils/harness-cli-version.ts
|
|
@@ -1267,7 +1269,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
1267
1269
|
devin: (env) => checkDevinCredentials2(env),
|
|
1268
1270
|
opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
|
|
1269
1271
|
pi: async (env, opts) => {
|
|
1270
|
-
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-
|
|
1272
|
+
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-fk8fkcf6.js");
|
|
1271
1273
|
return {
|
|
1272
1274
|
...await checkPiMonoCredentials(env, opts),
|
|
1273
1275
|
opencodeGoModels: listPiOpencodeGoModelIds()
|
|
@@ -1539,7 +1541,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1539
1541
|
latency_ms: Date.now() - startedAt
|
|
1540
1542
|
};
|
|
1541
1543
|
}
|
|
1542
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1544
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-623qxqew.js");
|
|
1543
1545
|
const result = await liveTestCursorKey(apiKey);
|
|
1544
1546
|
return result.ok ? { ok: true, latency_ms: Date.now() - startedAt } : { ok: false, error: result.error, latency_ms: Date.now() - startedAt };
|
|
1545
1547
|
}
|
|
@@ -3910,6 +3912,8 @@ async function pollForTriggerOnce(opts) {
|
|
|
3910
3912
|
headers["X-Model-Tier-Overrides"] = encodeURIComponent(JSON.stringify(workerModelTierOverrides(opts.harnessProvider)));
|
|
3911
3913
|
}
|
|
3912
3914
|
while (Date.now() - startTime < opts.pollTimeout) {
|
|
3915
|
+
if (opts.shouldStop?.())
|
|
3916
|
+
return null;
|
|
3913
3917
|
try {
|
|
3914
3918
|
let url = `${opts.apiUrl}/api/poll`;
|
|
3915
3919
|
if (opts.since) {
|
|
@@ -6120,7 +6124,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6120
6124
|
push: deliveryChecks.push,
|
|
6121
6125
|
activeCount: state.activeTasks.size,
|
|
6122
6126
|
maxConcurrent: exitAfterTasks === null ? state.maxConcurrent : Math.min(state.maxConcurrent, Math.max(0, exitAfterTasks - state.tasksProcessed)),
|
|
6123
|
-
draining: state.apiDraining,
|
|
6127
|
+
draining: state.apiDraining || shuttingDown,
|
|
6124
6128
|
lastPushPingAt,
|
|
6125
6129
|
pollInterval: PollIntervalMs
|
|
6126
6130
|
});
|
|
@@ -6147,6 +6151,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6147
6151
|
runtimeInstanceId,
|
|
6148
6152
|
pollTimeout: effectiveTimeout,
|
|
6149
6153
|
singlePoll: schedule.singlePoll,
|
|
6154
|
+
shouldStop: () => shuttingDown,
|
|
6150
6155
|
onPollFailure,
|
|
6151
6156
|
harnessProvider: state.harnessProvider,
|
|
6152
6157
|
onApiDrainSignal: (draining) => applyApiDrainSignal(state, role, draining)
|
|
@@ -3,10 +3,6 @@ import {
|
|
|
3
3
|
registerProcessGroup,
|
|
4
4
|
terminateProcessGroup
|
|
5
5
|
} from "./cli-3ggwdtb0.js";
|
|
6
|
-
import {
|
|
7
|
-
getContextWindowSize,
|
|
8
|
-
clampContextPercent
|
|
9
|
-
} from "./cli-a5ebc95n.js";
|
|
10
6
|
import {
|
|
11
7
|
ACP_TARGET_IDS,
|
|
12
8
|
isAcpTarget,
|
|
@@ -18,10 +14,15 @@ import {
|
|
|
18
14
|
import {
|
|
19
15
|
applyOpenRouterBaseUrlOverride2,
|
|
20
16
|
buildOpenAICompatibleProviderBlock2
|
|
21
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-hh5we352.js";
|
|
22
18
|
import {
|
|
23
19
|
fetchInstalledMcpServers
|
|
24
20
|
} from "./cli-bst1vp7e.js";
|
|
21
|
+
import {
|
|
22
|
+
getContextWindowSize,
|
|
23
|
+
clampContextPercent,
|
|
24
|
+
init_context_window
|
|
25
|
+
} from "./cli-0shx9j93.js";
|
|
25
26
|
import {
|
|
26
27
|
NEVER,
|
|
27
28
|
string2,
|
|
@@ -43,7 +44,7 @@ import {
|
|
|
43
44
|
import {
|
|
44
45
|
init_package,
|
|
45
46
|
package_default
|
|
46
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-xtrz6bzs.js";
|
|
47
48
|
import {
|
|
48
49
|
scrubSecrets,
|
|
49
50
|
init_secret_scrubber
|
|
@@ -3006,21 +3007,44 @@ class MessageBuffer {
|
|
|
3006
3007
|
|
|
3007
3008
|
// node_modules/@agentclientprotocol/sdk/dist/core/line-buffer.js
|
|
3008
3009
|
var newline = 10;
|
|
3010
|
+
var carriageReturn = 13;
|
|
3009
3011
|
|
|
3010
3012
|
class LineBuffer {
|
|
3011
3013
|
#pending;
|
|
3012
3014
|
#maxMessageBytes;
|
|
3013
|
-
|
|
3015
|
+
#splitOnCarriageReturn;
|
|
3016
|
+
#afterCarriageReturn = false;
|
|
3017
|
+
constructor(maxMessageBytes, { splitOnCarriageReturn = false } = {}) {
|
|
3014
3018
|
this.#maxMessageBytes = resolveMaxMessageBytes(maxMessageBytes);
|
|
3015
3019
|
this.#pending = new MessageBuffer(Math.min(Number.MAX_SAFE_INTEGER, this.#maxMessageBytes + 1));
|
|
3020
|
+
this.#splitOnCarriageReturn = splitOnCarriageReturn;
|
|
3016
3021
|
}
|
|
3017
3022
|
*push(chunk) {
|
|
3018
3023
|
let start = 0;
|
|
3024
|
+
if (this.#afterCarriageReturn && chunk.byteLength > 0) {
|
|
3025
|
+
this.#afterCarriageReturn = false;
|
|
3026
|
+
if (chunk[0] === newline) {
|
|
3027
|
+
start = 1;
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3019
3030
|
let newlineIndex = chunk.indexOf(newline, start);
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3031
|
+
let carriageReturnIndex = this.#splitOnCarriageReturn ? chunk.indexOf(carriageReturn, start) : -1;
|
|
3032
|
+
while (newlineIndex !== -1 || carriageReturnIndex !== -1) {
|
|
3033
|
+
if (carriageReturnIndex === -1 || newlineIndex !== -1 && newlineIndex < carriageReturnIndex) {
|
|
3034
|
+
yield this.#takeLine(chunk.subarray(start, newlineIndex));
|
|
3035
|
+
start = newlineIndex + 1;
|
|
3036
|
+
newlineIndex = chunk.indexOf(newline, start);
|
|
3037
|
+
} else {
|
|
3038
|
+
yield this.#takeLine(chunk.subarray(start, carriageReturnIndex));
|
|
3039
|
+
start = carriageReturnIndex + 1;
|
|
3040
|
+
if (start === chunk.byteLength) {
|
|
3041
|
+
this.#afterCarriageReturn = true;
|
|
3042
|
+
} else if (chunk[start] === newline) {
|
|
3043
|
+
start++;
|
|
3044
|
+
newlineIndex = chunk.indexOf(newline, start);
|
|
3045
|
+
}
|
|
3046
|
+
carriageReturnIndex = chunk.indexOf(carriageReturn, start);
|
|
3047
|
+
}
|
|
3024
3048
|
}
|
|
3025
3049
|
if (start < chunk.byteLength) {
|
|
3026
3050
|
const tail = chunk.subarray(start);
|
|
@@ -3029,12 +3053,14 @@ class LineBuffer {
|
|
|
3029
3053
|
}
|
|
3030
3054
|
}
|
|
3031
3055
|
flush() {
|
|
3056
|
+
this.#afterCarriageReturn = false;
|
|
3032
3057
|
if (this.#pending.byteLength === 0) {
|
|
3033
3058
|
return;
|
|
3034
3059
|
}
|
|
3035
3060
|
return stripCarriageReturn(this.#pending.take());
|
|
3036
3061
|
}
|
|
3037
3062
|
clear() {
|
|
3063
|
+
this.#afterCarriageReturn = false;
|
|
3038
3064
|
this.#pending.clear();
|
|
3039
3065
|
}
|
|
3040
3066
|
#takeLine(tail) {
|
|
@@ -3047,7 +3073,7 @@ class LineBuffer {
|
|
|
3047
3073
|
}
|
|
3048
3074
|
#checkLine(tail) {
|
|
3049
3075
|
const lastByte = tail.byteLength > 0 ? tail[tail.byteLength - 1] : this.#pending.lastByte;
|
|
3050
|
-
const byteLength = this.#pending.byteLength + tail.byteLength - (lastByte ===
|
|
3076
|
+
const byteLength = this.#pending.byteLength + tail.byteLength - (lastByte === carriageReturn ? 1 : 0);
|
|
3051
3077
|
if (byteLength > this.#maxMessageBytes) {
|
|
3052
3078
|
this.clear();
|
|
3053
3079
|
throw new MessageTooLargeError(this.#maxMessageBytes);
|
|
@@ -3055,7 +3081,7 @@ class LineBuffer {
|
|
|
3055
3081
|
}
|
|
3056
3082
|
}
|
|
3057
3083
|
function stripCarriageReturn(line) {
|
|
3058
|
-
return line[line.byteLength - 1] ===
|
|
3084
|
+
return line[line.byteLength - 1] === carriageReturn ? line.subarray(0, -1) : line;
|
|
3059
3085
|
}
|
|
3060
3086
|
|
|
3061
3087
|
// node_modules/@agentclientprotocol/sdk/dist/core/stream.js
|
|
@@ -4104,6 +4130,7 @@ function translateAcpSessionNotification(notification) {
|
|
|
4104
4130
|
|
|
4105
4131
|
// src/providers/acp-targets.ts
|
|
4106
4132
|
init_src2();
|
|
4133
|
+
init_context_window();
|
|
4107
4134
|
import { mkdir, mkdtemp, rm } from "node:fs/promises";
|
|
4108
4135
|
import { tmpdir } from "node:os";
|
|
4109
4136
|
import { join } from "node:path";
|