@desplega.ai/agent-swarm 1.158.0 → 1.159.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-adapter-xaq4n6pc.js → acp-adapter-qhch0n2v.js} +1 -1
- package/dist/{actions-p9hz5yat.js → actions-dtsh1mfb.js} +33 -29
- package/dist/{anthropic-messages-51pz26qe.js → anthropic-messages-f2h06k64.js} +8 -3
- package/dist/{app-g26wdcz6.js → app-y1b9srva.js} +10 -9
- package/dist/{assistant-wydfqkb3.js → assistant-31hwy5xj.js} +34 -30
- package/dist/{azure-openai-responses-8gksqtmz.js → azure-openai-responses-0k1mfax5.js} +12 -13
- package/dist/{boot-reembed-se8zmdcp.js → boot-reembed-48d2qpkt.js} +11 -11
- package/dist/{boot-reembed-g5ckg9yb.js → boot-reembed-w0bryhkr.js} +12 -12
- package/dist/{boot-scrub-logs-wfxqan61.js → boot-scrub-logs-t65wbrn7.js} +9 -8
- package/dist/{boot-seeds-s3q01xj3.js → boot-seeds-h7c32hvm.js} +12 -11
- package/dist/{claude-adapter-tv2x4f36.js → claude-adapter-1t6611ne.js} +26 -21
- package/dist/{claude-managed-adapter-41b2s7fd.js → claude-managed-adapter-werp659j.js} +4 -2
- package/dist/{claude-managed-setup-60g8aazx.js → claude-managed-setup-y6rdgbc1.js} +11 -2
- package/dist/claude-sdk-session-zhkyk8yw.js +29319 -0
- package/dist/{cli-vj6h9kc2.js → cli-0m7wct0d.js} +59 -1
- package/dist/{cli-wscdvcqz.js → cli-0n2e4x49.js} +1 -1
- package/dist/cli-0xqde53b.js +176 -0
- package/dist/{cli-xberxa1r.js → cli-10ym38qc.js} +2 -2
- package/dist/{cli-5b6b62tz.js → cli-13hw4z91.js} +1 -1
- package/dist/{cli-rqz8qbw7.js → cli-20035trh.js} +50 -18
- package/dist/{cli-k0g1sjzm.js → cli-31nkw3g3.js} +3 -3
- package/dist/cli-3gvrr8vj.js +1422 -0
- package/dist/{cli-c07r9a2m.js → cli-48527fpw.js} +9 -8
- package/dist/{cli-24k806sc.js → cli-4aj25szq.js} +2 -2
- package/dist/{cli-7gtvvpbh.js → cli-4tvgz99m.js} +7 -7
- package/dist/cli-503ya656.js +455 -0
- package/dist/{cli-cw9zck8j.js → cli-5f2hq128.js} +8 -4
- package/dist/{cli-s8eet254.js → cli-68bmme5p.js} +11078 -27833
- package/dist/{cli-ftfvggzx.js → cli-79aq9cgb.js} +794 -563
- package/dist/cli-7cxw8b60.js +14910 -0
- package/dist/cli-7kyk9jr3.js +22 -0
- package/dist/cli-7zttzetj.js +324 -0
- package/dist/{cli-y95wp3tg.js → cli-96qd5psa.js} +1 -1
- package/dist/{cli-g8djp6qe.js → cli-9yg65c1j.js} +22 -0
- package/dist/{cli-3gmcwfyx.js → cli-ardpzhjm.js} +5 -5
- package/dist/{cli-7s3syk22.js → cli-b6thtzac.js} +5 -5
- package/dist/{cli-00w2c66p.js → cli-bgv70kym.js} +13 -2
- package/dist/{cli-j55n64b6.js → cli-bv0a38v9.js} +163 -44
- package/dist/cli-ca2w7zv7.js +115 -0
- package/dist/cli-cpvsaqsw.js +333 -0
- package/dist/cli-cygyqj3b.js +754 -0
- package/dist/{cli-x24pshtq.js → cli-dvjpkkjd.js} +6 -6
- package/dist/{cli-5d10vd2m.js → cli-e0ndxhtk.js} +4 -4
- package/dist/{cli-4198qc9v.js → cli-e4xnc0qp.js} +15 -3
- package/dist/{cli-rjehvrts.js → cli-eg7cdg68.js} +8 -8
- package/dist/cli-ejpygnqz.js +3815 -0
- package/dist/{cli-fgqxwrpv.js → cli-fjtp3463.js} +1631 -127
- package/dist/{cli-zt1227k1.js → cli-fkqhbg8g.js} +5 -3
- package/dist/{cli-47m6dkd3.js → cli-g9df2m37.js} +409 -168
- package/dist/cli-gzyh0j0g.js +8455 -0
- package/dist/cli-hgqfttfc.js +183 -0
- package/dist/cli-hj65wsts.js +17755 -0
- package/dist/cli-j9z8mfx3.js +476 -0
- package/dist/{cli-aehm1rbq.js → cli-kc3dp84d.js} +1135 -61
- package/dist/{cli-h38x0qhg.js → cli-kdnehe0t.js} +4 -3
- package/dist/{cli-20cj37vt.js → cli-m4excttz.js} +136 -2216
- package/dist/{cli-8qmme6vd.js → cli-mg24hkt4.js} +2 -2
- package/dist/{cli-xhaeg2nc.js → cli-mzkqpxee.js} +1 -1
- package/dist/{cli-q67y4wzm.js → cli-phsaj4xq.js} +24 -2
- package/dist/{cli-pw9rj5t9.js → cli-pqetb83f.js} +1 -176
- package/dist/{cli-rj19hc34.js → cli-qjxy52w7.js} +1 -1
- package/dist/{cli-53sz8gkz.js → cli-qv4jv8bx.js} +1 -1
- package/dist/cli-qvnnx4ct.js +1051 -0
- package/dist/cli-rb9m6rpe.js +4980 -0
- package/dist/{cli-tt9k8r35.js → cli-rfezr056.js} +476 -909
- package/dist/{cli-ggm92wcn.js → cli-rgjprct3.js} +1 -0
- package/dist/{cli-9httdpyq.js → cli-rrqmqr1s.js} +1 -1
- package/dist/cli-rykfmgwg.js +102 -0
- package/dist/{cli-eetrvv91.js → cli-t3p77qk1.js} +1 -1
- package/dist/{cli-68w09sjw.js → cli-vn0qv9cj.js} +25 -88
- package/dist/{cli-987hg0aa.js → cli-vwbbaecp.js} +2 -2
- package/dist/cli-wd9hz40d.js +69 -0
- package/dist/{cli-j57qkrpq.js → cli-wgjx0q33.js} +13 -13
- package/dist/cli-xgpf00sk.js +2149 -0
- package/dist/{cli-mcnhgnn1.js → cli-ykk5jaax.js} +184 -26
- package/dist/{cli-aky8tctm.js → cli-z9x0sh1t.js} +3 -3
- package/dist/{cli-1hkrch3k.js → cli-zw65mab6.js} +5 -5
- package/dist/cli.js +38 -29
- package/dist/cloudflare-workers-ai-system-one-1sg586qv.js +46 -0
- package/dist/{codex-adapter-cnm8wk11.js → codex-adapter-jqfqqa21.js} +21 -14
- package/dist/{codex-hook-9hptmdhj.js → codex-hook-5eys3dya.js} +2 -2
- package/dist/{codex-session-runner-gfg547zj.js → codex-session-runner-zd341dsm.js} +21 -14
- package/dist/{commands-e3bn0p75.js → commands-vfsysz4s.js} +9 -8
- package/dist/{db-03v9kzr2.js → db-s3znhvbn.js} +15 -10
- package/dist/{dispatcher-nrmg8yht.js → dispatcher-5xn0c7rf.js} +32 -28
- package/dist/{dsh-adapter-k03nfqa6.js → dsh-adapter-894mgfvs.js} +3 -3
- package/dist/{e2b-93x1k0j5.js → e2b-ez07znam.js} +4 -3
- package/dist/execute-71ysgv35.js +965 -0
- package/dist/{google-generative-ai-bxmv50nc.js → google-generative-ai-1nfcdphp.js} +5 -4
- package/dist/{google-vertex-809af514.js → google-vertex-1tqcd7b1.js} +5 -4
- package/dist/{handlers-aqcedbyb.js → handlers-5w4jwycr.js} +35 -31
- package/dist/{hook-7vkskkre.js → hook-853bxrr6.js} +16 -13
- package/dist/{hook-ybvmrmhq.js → hook-z0hbxj85.js} +16 -13
- package/dist/{http-2eqa8t24.js → http-akc3wy3m.js} +600 -123
- package/dist/{index-f6cryxwe.js → index-4a5njnm1.js} +2 -59
- package/dist/{index-a3vn96n8.js → index-5sz16ksh.js} +187 -47
- package/dist/{index-c6zsv1bd.js → index-bjmjh9h4.js} +11 -11
- package/dist/{index-chgdkq36.js → index-cd151qkq.js} +32 -28
- package/dist/{index-x71bvq0p.js → index-k661dzzr.js} +33 -29
- package/dist/{index-1yks3qcr.js → index-ttpbhnjg.js} +32 -28
- package/dist/{keepalive-vtkf5n99.js → keepalive-8p9rpvz5.js} +11 -10
- package/dist/{lead-h3sp357x.js → lead-jp69z5h3.js} +49 -45
- package/dist/llama-cpp-classify-t2tccams.js +335 -0
- package/dist/{maintenance-jzeqtk3q.js → maintenance-fwx4ev0k.js} +12 -12
- package/dist/{mistral-conversations-zx0kn554.js → mistral-conversations-bhvwqcnk.js} +14 -17
- package/dist/{oauth-refresh-sweep-qp3dzmdp.js → oauth-refresh-sweep-cwcq1ctx.js} +10 -9
- package/dist/{onboard-tmsp0qbz.js → onboard-2b4q0t84.js} +6 -5
- package/dist/{openai-codex-responses-4vjqzvjp.js → openai-codex-responses-nekthgks.js} +21 -8
- package/dist/{openai-completions-9hjrqbw8.js → openai-completions-hxtzwj0s.js} +8 -11
- package/dist/{openai-responses-7b1pn0xt.js → openai-responses-w4r118w7.js} +22 -17
- package/dist/{opencode-adapter-x6x2da1z.js → opencode-adapter-zz7xvjj6.js} +6 -4
- package/dist/{openrouter-images-9f9ek4rw.js → openrouter-images-b6sqqjgn.js} +4 -6
- package/dist/{otel-impl-9mz73q65.js → otel-impl-g8rs4vwr.js} +1 -1
- package/dist/{pi-messages-txpjj39q.js → pi-messages-vxdt8v7j.js} +2 -1
- package/dist/{pi-mono-adapter-m6dvv0dz.js → pi-mono-adapter-n0me28wt.js} +29 -17
- package/dist/pricing-refresh-0v77385v.js +39 -0
- package/dist/{rbac-roles-c9wqz83x.js → rbac-roles-krjyazbj.js} +10 -9
- package/dist/{render-v2-gryrh9h8.js → render-v2-3wjsp9aw.js} +10 -9
- package/dist/runtime-ktjysacx.js +24 -0
- package/dist/{setup-q9720bt6.js → setup-yeqryke6.js} +6 -5
- package/dist/typesafe-system-one-96960jxp.js +27 -0
- package/dist/{virtual-modules-3htpgn8x.js → virtual-modules-dzdeq1sf.js} +21 -13
- package/dist/{work-objects-b76x7deb.js → work-objects-3pakpkw0.js} +35 -31
- package/dist/{worker-6vrxbv41.js → worker-85testgj.js} +49 -45
- package/openapi.json +863 -14
- package/package.json +9 -8
- package/src/be/db/agents.ts +20 -0
- package/src/be/db/tasks/human-free.ts +442 -0
- package/src/be/db/tasks/read.ts +56 -1
- package/src/be/db/tasks/write.ts +107 -11
- package/src/be/db.ts +89 -165
- package/src/be/harness-model-support.ts +182 -0
- package/src/be/human-free-drain.ts +67 -0
- package/src/be/migrations/182_task_human_free_flag.sql +63 -0
- package/src/be/migrations/183_human_free_reclassify_queue.sql +25 -0
- package/src/be/migrations/184_model_catalog.sql +120 -0
- package/src/be/model-catalog-store.ts +644 -0
- package/src/be/model-tier-keys.ts +31 -0
- package/src/be/model-tier-resolution.ts +489 -0
- package/src/be/model-validation.ts +112 -0
- package/src/be/models-catalog.ts +61 -7
- package/src/be/modelsdev-cache.json +82 -0
- package/src/be/modelsdev-cache.ts +2 -0
- package/src/be/pricing-refresh.ts +154 -12
- package/src/be/scripts/typecheck.ts +15 -0
- package/src/be/seed-scripts/catalog/task-failure-audit.ts +61 -9
- package/src/be/swarm-config-guard.ts +6 -0
- package/src/cli.tsx +10 -0
- package/src/commands/claude-managed-setup.ts +3 -1
- package/src/commands/runner.ts +76 -2
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/heartbeat/heartbeat.ts +64 -15
- package/src/heartbeat/templates.ts +2 -2
- package/src/http/agents.ts +49 -1
- package/src/http/index.ts +8 -0
- package/src/http/models-catalog.ts +357 -8
- package/src/http/poll.ts +45 -2
- package/src/http/schedules.ts +36 -6
- package/src/http/session-data.ts +2 -5
- package/src/http/stats.ts +6 -8
- package/src/http/tasks.ts +26 -1
- package/src/http/usage-cache.ts +56 -15
- package/src/http/workflows.ts +35 -8
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/claude-managed-models.ts +47 -161
- package/src/providers/codex-adapter.ts +4 -4
- package/src/providers/codex-models.ts +65 -198
- package/src/providers/reasoning-effort.ts +44 -140
- package/src/rbac/legacy-policy.ts +25 -0
- package/src/rbac/permissions.ts +10 -0
- package/src/scripts-runtime/sdk-allowlist.ts +4 -0
- package/src/scripts-runtime/types/stdlib.d.ts +15 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +3 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +15 -0
- package/src/server.ts +6 -0
- package/src/slack/message-text.ts +56 -2
- package/src/slack/thread-buffer.ts +10 -2
- package/src/tests/agents-list-model-display.test.ts +4 -6
- package/src/tests/base-prompt.test.ts +3 -0
- package/src/tests/claude-adapter.test.ts +10 -0
- package/src/tests/claude-managed-adapter.test.ts +12 -18
- package/src/tests/codex-adapter.test.ts +2 -1
- package/src/tests/codex-gpt6-release.test.ts +66 -5
- package/src/tests/context-window.test.ts +7 -5
- package/src/tests/db-extraction-contract.test.ts +1 -0
- package/src/tests/db-task-read-contract.test.ts +5 -1
- package/src/tests/db-task-write-contract.test.ts +4 -1
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/explicit-model-validation.test.ts +332 -0
- package/src/tests/harness-model-support.test.ts +374 -0
- package/src/tests/heartbeat-checklist-config.test.ts +71 -0
- package/src/tests/heartbeat-checklist.test.ts +4 -2
- package/src/tests/heartbeat-orphan-resume.test.ts +48 -0
- package/src/tests/human-free-flag.test.ts +279 -0
- package/src/tests/human-free-oracle.ts +57 -0
- package/src/tests/human-free-reclassify.test.ts +669 -0
- package/src/tests/migration-046-budgets.test.ts +3 -3
- package/src/tests/model-catalog-migration.test.ts +134 -0
- package/src/tests/model-catalog-table.test.ts +249 -0
- package/src/tests/model-catalog-write-access.test.ts +387 -0
- package/src/tests/model-tier-resolution.test.ts +519 -0
- package/src/tests/models-catalog.test.ts +1 -1
- package/src/tests/multi-runtime-enabled-stats.test.ts +65 -1
- package/src/tests/package-publish.test.ts +137 -36
- package/src/tests/pricing-routes.test.ts +2 -2
- package/src/tests/rbac-engine.test.ts +42 -2
- package/src/tests/reasoning-effort.test.ts +109 -0
- package/src/tests/refresh-modelsdev-carryforward.test.ts +5 -5
- package/src/tests/runtime-model-catalog.test.ts +86 -0
- package/src/tests/script-connections.test.ts +5 -0
- package/src/tests/seed-scripts.test.ts +89 -0
- package/src/tests/session-costs.test.ts +14 -11
- package/src/tests/slack-message-text.test.ts +101 -0
- package/src/tests/slack-thread-buffer-context.test.ts +93 -0
- package/src/tests/task-cascade-fail.test.ts +148 -2
- package/src/tests/tool-annotations.test.ts +1 -1
- package/src/tests/usage-cache.test.ts +166 -0
- package/src/tests/workflow-executors.test.ts +5 -2
- package/src/tests/workflow-system-one-decision-review.test.ts +1021 -0
- package/src/tests/workflow-system-one-decision-save-warnings.test.ts +365 -0
- package/src/tests/workflow-system-one-decision.test.ts +2063 -0
- package/src/tools/model-catalog/index.ts +137 -0
- package/src/tools/schedules/create-schedule.ts +16 -1
- package/src/tools/schedules/patch-schedule.ts +17 -0
- package/src/tools/schedules/update-schedule.ts +17 -0
- package/src/tools/send-task.ts +14 -0
- package/src/tools/task-action.ts +12 -0
- package/src/tools/tool-config.ts +3 -1
- package/src/tools/workflows/create-workflow.ts +9 -2
- package/src/tools/workflows/patch-workflow-node.ts +17 -7
- package/src/tools/workflows/patch-workflow.ts +9 -2
- package/src/tools/workflows/update-workflow.ts +9 -2
- package/src/types.ts +30 -1
- package/src/utils/context-window.ts +47 -53
- package/src/utils/harness-cli-version.ts +115 -0
- package/src/utils/harness-model-error.ts +33 -0
- package/src/utils/runtime-model-catalog.ts +137 -0
- package/src/workflows/approval-resolution.ts +39 -0
- package/src/workflows/definition.ts +7 -0
- package/src/workflows/engine.ts +69 -1
- package/src/workflows/executors/agent-task.ts +9 -0
- package/src/workflows/executors/base.ts +53 -0
- package/src/workflows/executors/human-in-the-loop.ts +8 -8
- package/src/workflows/executors/index.ts +1 -0
- package/src/workflows/executors/registry.ts +2 -0
- package/src/workflows/executors/system-one-decision.ts +1232 -0
- package/src/workflows/executors/system-one-providers.ts +301 -0
- package/src/workflows/executors/workflow-llm.ts +13 -1
- package/src/workflows/readiness.ts +86 -0
- package/src/workflows/recovery.ts +12 -12
- package/src/workflows/resume.ts +23 -9
- package/templates/schedules/daily-blocker-digest/content.md +4 -5
- package/templates/skills/agent-browser/SKILL.md +6 -5
- package/templates/skills/agent-browser/content.md +6 -5
- package/templates/skills/heartbeat-runbook/config.json +1 -1
- package/templates/skills/heartbeat-runbook/content.md +2 -2
- package/templates/skills/swarm-scripts/SKILL.md +1 -1
- package/templates/skills/swarm-scripts/content.md +1 -1
- package/templates/skills/workflow-iterate/content.md +81 -1
- package/templates/workflows/claude-code-changelog-watch/content.md +2 -0
- package/templates/workflows/pr-review-status-sweep/content.md +2 -0
- package/dist/claude-sdk-session-t442qz6f.js +0 -39108
- package/dist/cli-0xjkj1j7.js +0 -61
- package/dist/cli-65hjmev5.js +0 -1141
- package/dist/cli-aw1jwp1r.js +0 -14075
- package/dist/cli-h967nb6r.js +0 -6603
- package/dist/cli-vapyk8sw.js +0 -20
- package/dist/cli-ws6rqycm.js +0 -247
- package/dist/pricing-refresh-v1cbr9te.js +0 -27
- package/src/providers/modelsdev-reasoning.json +0 -6453
- package/dist/{codex-login-x3jk4etn.js → codex-login-he9vrn90.js} +3 -3
- package/dist/{index-f24115ge.js → index-2wsdsnmm.js} +3 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// node_modules/@earendil-works/pi-ai/dist/utils/headers.js
|
|
2
|
+
function headersToRecord(headers) {
|
|
3
|
+
const result = {};
|
|
4
|
+
for (const [key, value] of headers.entries()) {
|
|
5
|
+
result[key] = value;
|
|
6
|
+
}
|
|
7
|
+
return result;
|
|
8
|
+
}
|
|
9
|
+
function providerHeadersToRecord(...headerSources) {
|
|
10
|
+
const merged = new Map;
|
|
11
|
+
for (const source of headerSources) {
|
|
12
|
+
for (const [name, value] of Object.entries(source ?? {})) {
|
|
13
|
+
const normalizedName = name.toLowerCase();
|
|
14
|
+
merged.delete(normalizedName);
|
|
15
|
+
if (value !== null)
|
|
16
|
+
merged.set(normalizedName, [name, value]);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return merged.size > 0 ? Object.fromEntries(merged.values()) : undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { headersToRecord, providerHeadersToRecord };
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__esm
|
|
3
|
+
} from "./cli-bc05qbss.js";
|
|
4
|
+
|
|
5
|
+
// packages/model-catalog/src/harness-models.ts
|
|
6
|
+
function harnessCatalogSection(harness) {
|
|
7
|
+
return HARNESS_CATALOG_SECTION[harness] ?? null;
|
|
8
|
+
}
|
|
9
|
+
function isHarnessCatalogModel(harness, id, model = {}) {
|
|
10
|
+
const lower = id.toLowerCase();
|
|
11
|
+
if (model.status === "deprecated")
|
|
12
|
+
return false;
|
|
13
|
+
const section = harnessCatalogSection(harness);
|
|
14
|
+
if (section === "anthropic") {
|
|
15
|
+
if (!lower.startsWith("claude-"))
|
|
16
|
+
return false;
|
|
17
|
+
if (DATED_ID_RE.test(lower) || lower.endsWith("-latest"))
|
|
18
|
+
return false;
|
|
19
|
+
if (/^claude-\d/.test(lower))
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
if (section === "openai") {
|
|
24
|
+
const match = /^gpt-(\d+)/.exec(lower);
|
|
25
|
+
if (!match || Number(match[1]) < CODEX_MIN_GPT_MAJOR)
|
|
26
|
+
return false;
|
|
27
|
+
if (DATED_ID_RE.test(lower) || ISO_DATED_ID_RE.test(lower))
|
|
28
|
+
return false;
|
|
29
|
+
if (model.reasoning === false)
|
|
30
|
+
return false;
|
|
31
|
+
for (const token of lower.split("-")) {
|
|
32
|
+
if (CODEX_EXCLUDED_TOKENS.has(token))
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
function compareNewestFirst(a, b) {
|
|
40
|
+
const ra = a.release_date ?? "9999";
|
|
41
|
+
const rb = b.release_date ?? "9999";
|
|
42
|
+
if (ra !== rb)
|
|
43
|
+
return ra > rb ? -1 : 1;
|
|
44
|
+
return a.id > b.id ? -1 : a.id < b.id ? 1 : 0;
|
|
45
|
+
}
|
|
46
|
+
function harnessModelIds(harness, models) {
|
|
47
|
+
return Object.entries(models ?? {}).filter(([id, m]) => isHarnessCatalogModel(harness, id, m)).map(([id, m]) => ({ id, release_date: m.release_date ?? null })).sort(compareNewestFirst).map((m) => m.id);
|
|
48
|
+
}
|
|
49
|
+
function modelFamilyKey(id) {
|
|
50
|
+
const slash = id.lastIndexOf("/");
|
|
51
|
+
const tail = (slash >= 0 ? id.slice(slash + 1) : id).toLowerCase();
|
|
52
|
+
return tail.split("-").filter((token) => token !== "" && !/^\d+(\.\d+)*$/.test(token)).join("-");
|
|
53
|
+
}
|
|
54
|
+
function buildClaudeShortnameMap(models) {
|
|
55
|
+
const best = new Map;
|
|
56
|
+
for (const [rawId, m] of Object.entries(models ?? {})) {
|
|
57
|
+
const id = rawId.toLowerCase();
|
|
58
|
+
if (!id.startsWith("claude"))
|
|
59
|
+
continue;
|
|
60
|
+
if (DATED_ID_RE.test(id) || id.endsWith("-latest"))
|
|
61
|
+
continue;
|
|
62
|
+
if (m.status === "deprecated")
|
|
63
|
+
continue;
|
|
64
|
+
const candidate = { id: rawId, release_date: m.release_date ?? null };
|
|
65
|
+
for (const token of id.split("-")) {
|
|
66
|
+
if (token === "claude" || !/^[a-z]+$/.test(token))
|
|
67
|
+
continue;
|
|
68
|
+
const current = best.get(token);
|
|
69
|
+
if (!current || compareNewestFirst(candidate, current) < 0)
|
|
70
|
+
best.set(token, candidate);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const out = {};
|
|
74
|
+
for (const [alias, model] of best)
|
|
75
|
+
out[alias] = model.id;
|
|
76
|
+
return out;
|
|
77
|
+
}
|
|
78
|
+
var HARNESS_CATALOG_SECTION, DATED_ID_RE, ISO_DATED_ID_RE, CODEX_EXCLUDED_TOKENS, CODEX_MIN_GPT_MAJOR = 5;
|
|
79
|
+
var init_harness_models = __esm(() => {
|
|
80
|
+
HARNESS_CATALOG_SECTION = {
|
|
81
|
+
claude: "anthropic",
|
|
82
|
+
"claude-managed": "anthropic",
|
|
83
|
+
codex: "openai"
|
|
84
|
+
};
|
|
85
|
+
DATED_ID_RE = /-\d{8}$/;
|
|
86
|
+
ISO_DATED_ID_RE = /-\d{4}-\d{2}-\d{2}$/;
|
|
87
|
+
CODEX_EXCLUDED_TOKENS = new Set([
|
|
88
|
+
"chat",
|
|
89
|
+
"latest",
|
|
90
|
+
"pro",
|
|
91
|
+
"nano",
|
|
92
|
+
"spark",
|
|
93
|
+
"realtime",
|
|
94
|
+
"audio",
|
|
95
|
+
"image",
|
|
96
|
+
"search",
|
|
97
|
+
"transcribe",
|
|
98
|
+
"tts",
|
|
99
|
+
"deep",
|
|
100
|
+
"research",
|
|
101
|
+
"oss"
|
|
102
|
+
]);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// packages/model-catalog/src/reasoning.ts
|
|
106
|
+
function isReasoningHarness(harness) {
|
|
107
|
+
return REASONING_HARNESSES.includes(harness);
|
|
108
|
+
}
|
|
109
|
+
function levelsFromReasoningOptions(options) {
|
|
110
|
+
const effortEntry = options?.find((o) => o.type === "effort");
|
|
111
|
+
if (!effortEntry?.values?.length)
|
|
112
|
+
return [];
|
|
113
|
+
const mapped = new Set(effortEntry.values.map((v) => EFFORT_VALUE_MAP[v]).filter((v) => v !== undefined));
|
|
114
|
+
return REASONING_EFFORT_LEVELS.filter((level) => mapped.has(level));
|
|
115
|
+
}
|
|
116
|
+
function applyHarnessOverrides(harness, modelId, facts, levels) {
|
|
117
|
+
let result = levels;
|
|
118
|
+
if (harness === "claude") {
|
|
119
|
+
if (facts.reasoning_options?.some((o) => o.type === "budget_tokens") && !result.includes("off")) {
|
|
120
|
+
result = ["off", ...result];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (harness !== "codex") {
|
|
124
|
+
result = result.filter((l) => l !== "max");
|
|
125
|
+
}
|
|
126
|
+
if (harness === "codex") {
|
|
127
|
+
const isCodexMax = /-codex-max$/.test(modelId);
|
|
128
|
+
const isCodexNonMax = /-codex$/.test(modelId) && !isCodexMax;
|
|
129
|
+
if (isCodexMax && !result.includes("xhigh"))
|
|
130
|
+
result = [...result, "xhigh"];
|
|
131
|
+
if (isCodexNonMax)
|
|
132
|
+
result = result.filter((l) => l !== "xhigh");
|
|
133
|
+
}
|
|
134
|
+
return REASONING_EFFORT_LEVELS.filter((level) => result.includes(level));
|
|
135
|
+
}
|
|
136
|
+
function reasoningLevelsFor(harness, modelId, facts) {
|
|
137
|
+
if (!isReasoningHarness(harness) || !facts || !facts.reasoning)
|
|
138
|
+
return [];
|
|
139
|
+
let levels = levelsFromReasoningOptions(facts.reasoning_options);
|
|
140
|
+
if (levels.length === 0)
|
|
141
|
+
levels = [...FALLBACK_LEVELS];
|
|
142
|
+
return applyHarnessOverrides(harness, modelId, facts, levels);
|
|
143
|
+
}
|
|
144
|
+
function claudeCatalogModelId(modelId, models) {
|
|
145
|
+
if (!modelId || models?.[modelId])
|
|
146
|
+
return modelId;
|
|
147
|
+
return buildClaudeShortnameMap(models)[modelId] ?? modelId;
|
|
148
|
+
}
|
|
149
|
+
var REASONING_EFFORT_LEVELS, REASONING_HARNESSES, FALLBACK_LEVELS, EFFORT_VALUE_MAP;
|
|
150
|
+
var init_reasoning = __esm(() => {
|
|
151
|
+
init_harness_models();
|
|
152
|
+
REASONING_EFFORT_LEVELS = ["off", "low", "medium", "high", "xhigh", "max"];
|
|
153
|
+
REASONING_HARNESSES = ["claude", "codex", "pi", "opencode"];
|
|
154
|
+
FALLBACK_LEVELS = ["low", "medium", "high"];
|
|
155
|
+
EFFORT_VALUE_MAP = {
|
|
156
|
+
none: "off",
|
|
157
|
+
low: "low",
|
|
158
|
+
medium: "medium",
|
|
159
|
+
high: "high",
|
|
160
|
+
xhigh: "xhigh",
|
|
161
|
+
max: "max"
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
// packages/model-catalog/src/display.ts
|
|
166
|
+
var init_display = () => {};
|
|
167
|
+
|
|
168
|
+
// packages/model-catalog/src/merge.ts
|
|
169
|
+
var init_merge = () => {};
|
|
170
|
+
|
|
171
|
+
// packages/model-catalog/src/model-alias.ts
|
|
172
|
+
function buildClaudeAliasMap(models) {
|
|
173
|
+
const best = new Map;
|
|
174
|
+
for (const model of models) {
|
|
175
|
+
const id = model.id.toLowerCase();
|
|
176
|
+
if (!id.startsWith("claude"))
|
|
177
|
+
continue;
|
|
178
|
+
if (DATED_ID_RE2.test(id) || id.endsWith("-latest"))
|
|
179
|
+
continue;
|
|
180
|
+
for (const token of id.split("-")) {
|
|
181
|
+
if (token === "claude" || !FAMILY_TOKEN_RE.test(token))
|
|
182
|
+
continue;
|
|
183
|
+
const current = best.get(token);
|
|
184
|
+
if (!current || isNewer(model, current))
|
|
185
|
+
best.set(token, model);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const out = {};
|
|
189
|
+
for (const [alias, model] of best)
|
|
190
|
+
out[alias] = model.id;
|
|
191
|
+
return out;
|
|
192
|
+
}
|
|
193
|
+
function isNewer(a, b) {
|
|
194
|
+
const ra = a.releaseDate ?? "";
|
|
195
|
+
const rb = b.releaseDate ?? "";
|
|
196
|
+
if (ra !== rb)
|
|
197
|
+
return ra > rb;
|
|
198
|
+
return a.id > b.id;
|
|
199
|
+
}
|
|
200
|
+
var DATED_ID_RE2, FAMILY_TOKEN_RE;
|
|
201
|
+
var init_model_alias = __esm(() => {
|
|
202
|
+
DATED_ID_RE2 = /-\d{8}$/;
|
|
203
|
+
FAMILY_TOKEN_RE = /^[a-z]+$/;
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
// packages/model-catalog/src/resolve-alias.ts
|
|
207
|
+
function isAlias(value) {
|
|
208
|
+
return value.trim().toLowerCase().startsWith(LATEST_PREFIX);
|
|
209
|
+
}
|
|
210
|
+
function parseAlias(alias) {
|
|
211
|
+
let value = alias.trim().toLowerCase();
|
|
212
|
+
if (!value.startsWith(LATEST_PREFIX))
|
|
213
|
+
return null;
|
|
214
|
+
let channel = "stable";
|
|
215
|
+
const at = value.lastIndexOf("@");
|
|
216
|
+
if (at >= 0) {
|
|
217
|
+
const suffix = value.slice(at + 1);
|
|
218
|
+
if (suffix !== "stable" && suffix !== "any")
|
|
219
|
+
return null;
|
|
220
|
+
channel = suffix;
|
|
221
|
+
value = value.slice(0, at);
|
|
222
|
+
}
|
|
223
|
+
const rest = value.slice(LATEST_PREFIX.length);
|
|
224
|
+
const slash = rest.indexOf("/");
|
|
225
|
+
if (slash <= 0)
|
|
226
|
+
return null;
|
|
227
|
+
const section = rest.slice(0, slash);
|
|
228
|
+
const target = rest.slice(slash + 1);
|
|
229
|
+
if (target.length === 0)
|
|
230
|
+
return null;
|
|
231
|
+
if (section === "anthropic") {
|
|
232
|
+
return /^[a-z]+$/.test(target) ? { kind: "anthropic", family: target, channel } : null;
|
|
233
|
+
}
|
|
234
|
+
if (section === "openrouter" && !OPENROUTER_VENDOR_RE.test(target))
|
|
235
|
+
return null;
|
|
236
|
+
if (section === "openrouter" || section === "openai") {
|
|
237
|
+
return GLOB_TARGET_RE.test(target) ? { kind: section, glob: target, channel } : null;
|
|
238
|
+
}
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
function globToRegExp(glob) {
|
|
242
|
+
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
|
|
243
|
+
return new RegExp(`^${escaped}$`);
|
|
244
|
+
}
|
|
245
|
+
function isNewer2(a, b) {
|
|
246
|
+
if (a.releaseDate !== b.releaseDate)
|
|
247
|
+
return a.releaseDate > b.releaseDate;
|
|
248
|
+
return a.id > b.id;
|
|
249
|
+
}
|
|
250
|
+
function passesPolicy(id, releaseDate, channel, named, policy) {
|
|
251
|
+
if (policy.isSupported && !policy.isSupported(id))
|
|
252
|
+
return false;
|
|
253
|
+
if (channel === "any")
|
|
254
|
+
return true;
|
|
255
|
+
const lower = id.toLowerCase();
|
|
256
|
+
if (!named.includes("preview") && lower.includes("preview"))
|
|
257
|
+
return false;
|
|
258
|
+
if (!named.includes("experimental") && lower.includes("experimental"))
|
|
259
|
+
return false;
|
|
260
|
+
const soakDays = policy.soakDays ?? 0;
|
|
261
|
+
if (soakDays > 0 && releaseDate) {
|
|
262
|
+
const released = Date.parse(releaseDate);
|
|
263
|
+
const now = (policy.now ?? new Date).getTime();
|
|
264
|
+
if (!Number.isNaN(released) && now - released < soakDays * DAY_MS)
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
function resolveAlias(alias, catalog, policy = {}) {
|
|
270
|
+
const parsed = parseAlias(alias);
|
|
271
|
+
if (!parsed)
|
|
272
|
+
return null;
|
|
273
|
+
if (parsed.kind === "anthropic") {
|
|
274
|
+
const models = catalog.anthropic?.models ?? {};
|
|
275
|
+
const map = buildClaudeAliasMap(Object.entries(models).filter(([id, m]) => passesPolicy(id, m.release_date, parsed.channel, "", policy)).map(([id, m]) => ({ id, releaseDate: m.release_date ?? null })));
|
|
276
|
+
return map[parsed.family] ?? null;
|
|
277
|
+
}
|
|
278
|
+
const re = globToRegExp(parsed.glob);
|
|
279
|
+
const allowFree = parsed.glob.includes(":free");
|
|
280
|
+
const allowLatest = parsed.glob.includes("latest");
|
|
281
|
+
const allowPreview = parsed.glob.includes("preview");
|
|
282
|
+
let best = null;
|
|
283
|
+
for (const [id, m] of Object.entries(catalog[parsed.kind]?.models ?? {})) {
|
|
284
|
+
const lower = id.toLowerCase();
|
|
285
|
+
if (!re.test(lower))
|
|
286
|
+
continue;
|
|
287
|
+
if (DATED_ID_RE3.test(lower))
|
|
288
|
+
continue;
|
|
289
|
+
if (!allowLatest && lower.endsWith("-latest"))
|
|
290
|
+
continue;
|
|
291
|
+
if (!allowFree && lower.endsWith(":free"))
|
|
292
|
+
continue;
|
|
293
|
+
if (parsed.channel === "stable" && !allowPreview && lower.includes("preview"))
|
|
294
|
+
continue;
|
|
295
|
+
if (!passesPolicy(id, m.release_date, parsed.channel, parsed.glob, policy))
|
|
296
|
+
continue;
|
|
297
|
+
const candidate = { id, releaseDate: m.release_date ?? "" };
|
|
298
|
+
if (!best || isNewer2(candidate, best))
|
|
299
|
+
best = candidate;
|
|
300
|
+
}
|
|
301
|
+
if (!best)
|
|
302
|
+
return null;
|
|
303
|
+
return parsed.kind === "openrouter" ? `openrouter/${best.id}` : best.id;
|
|
304
|
+
}
|
|
305
|
+
var LATEST_PREFIX = "latest:", DATED_ID_RE3, DAY_MS, GLOB_TARGET_RE, OPENROUTER_VENDOR_RE;
|
|
306
|
+
var init_resolve_alias = __esm(() => {
|
|
307
|
+
init_model_alias();
|
|
308
|
+
DATED_ID_RE3 = /-\d{8}$/;
|
|
309
|
+
DAY_MS = 24 * 60 * 60 * 1000;
|
|
310
|
+
GLOB_TARGET_RE = /^[a-z0-9._:~*/-]+$/;
|
|
311
|
+
OPENROUTER_VENDOR_RE = /^[a-z0-9._~-]+\//;
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
// packages/model-catalog/src/index.ts
|
|
315
|
+
var init_src = __esm(() => {
|
|
316
|
+
init_display();
|
|
317
|
+
init_harness_models();
|
|
318
|
+
init_merge();
|
|
319
|
+
init_model_alias();
|
|
320
|
+
init_reasoning();
|
|
321
|
+
init_resolve_alias();
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
export { harnessCatalogSection, harnessModelIds, modelFamilyKey, buildClaudeShortnameMap, reasoningLevelsFor, claudeCatalogModelId, isAlias, parseAlias, resolveAlias, init_src };
|
|
@@ -160,6 +160,14 @@ var PERMISSIONS = {
|
|
|
160
160
|
description: "Delete any swarm-config entry.",
|
|
161
161
|
namespace: "config"
|
|
162
162
|
},
|
|
163
|
+
"models.catalog.write": {
|
|
164
|
+
description: "Force a model-catalog refresh from models.dev or write/delete model-catalog overlay rows.",
|
|
165
|
+
namespace: "models"
|
|
166
|
+
},
|
|
167
|
+
"models.harness-support.write": {
|
|
168
|
+
description: "Record whether a pinned harness CLI version accepts a model (a worker reports its own probe results; the operator may correct any row).",
|
|
169
|
+
namespace: "models"
|
|
170
|
+
},
|
|
163
171
|
"config.read.secrets": {
|
|
164
172
|
description: "Read unmasked secret config values.",
|
|
165
173
|
namespace: "config"
|
|
@@ -338,6 +346,16 @@ var leadOrOperatorOrUser = {
|
|
|
338
346
|
denyReason: "requires lead agent, operator, or user authentication",
|
|
339
347
|
evaluate: (principal) => principal.kind === "operator" || principal.kind === "user" || actsAsLead(principal)
|
|
340
348
|
};
|
|
349
|
+
var leadOrOperator = {
|
|
350
|
+
name: "lead-or-operator",
|
|
351
|
+
denyReason: "requires lead agent or operator authentication",
|
|
352
|
+
evaluate: (principal) => principal.kind === "operator" || actsAsLead(principal)
|
|
353
|
+
};
|
|
354
|
+
var agentOrOperator = {
|
|
355
|
+
name: "agent-or-operator",
|
|
356
|
+
denyReason: "requires a registered agent or operator authentication",
|
|
357
|
+
evaluate: (principal) => principal.kind === "operator" || principal.kind === "agent" && principal.agentId !== ""
|
|
358
|
+
};
|
|
341
359
|
var extensionWrite = {
|
|
342
360
|
name: "extension-owner-or-elevated",
|
|
343
361
|
denyReason: "requires extension owner, lead agent, operator, or user authentication",
|
|
@@ -437,6 +455,8 @@ var taskFsMutate = {
|
|
|
437
455
|
var LEGACY_RULES = {
|
|
438
456
|
"operator-or-user": operatorOrUser,
|
|
439
457
|
"lead-or-operator-or-user": leadOrOperatorOrUser,
|
|
458
|
+
"lead-or-operator": leadOrOperator,
|
|
459
|
+
"agent-or-operator": agentOrOperator,
|
|
440
460
|
"lead-only": leadOnly,
|
|
441
461
|
"lead-or-task-creator": leadOrTaskCreator,
|
|
442
462
|
"lead-or-resource-owner": leadOrResourceOwner,
|
|
@@ -481,6 +501,8 @@ var LEGACY_POLICY = {
|
|
|
481
501
|
"config.write.any": leadOnly,
|
|
482
502
|
"config.delete.any": leadOnly,
|
|
483
503
|
"config.read.secrets": leadOnly,
|
|
504
|
+
"models.catalog.write": leadOrOperator,
|
|
505
|
+
"models.harness-support.write": agentOrOperator,
|
|
484
506
|
"skill.create.swarm": leadOnly,
|
|
485
507
|
"skill.install.any": leadOnly,
|
|
486
508
|
"skill.install.global": leadOnly,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getSlackConfiguration,
|
|
3
|
+
init_config
|
|
4
|
+
} from "./cli-n7h1kqpf.js";
|
|
1
5
|
import {
|
|
2
6
|
init_registry,
|
|
3
7
|
init_resolver,
|
|
@@ -6,11 +10,7 @@ import {
|
|
|
6
10
|
isSteeringEnabled,
|
|
7
11
|
registerTemplate,
|
|
8
12
|
resolveTemplateAsync
|
|
9
|
-
} from "./cli-
|
|
10
|
-
import {
|
|
11
|
-
getSlackConfiguration,
|
|
12
|
-
init_config
|
|
13
|
-
} from "./cli-n7h1kqpf.js";
|
|
13
|
+
} from "./cli-rgjprct3.js";
|
|
14
14
|
import {
|
|
15
15
|
__esm
|
|
16
16
|
} from "./cli-bc05qbss.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
materializeClaudeMd,
|
|
3
3
|
stopClaudeMd
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-qjxy52w7.js";
|
|
5
5
|
import {
|
|
6
6
|
summarizeSession
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-5f2hq128.js";
|
|
8
8
|
import {
|
|
9
9
|
checkToolLoop,
|
|
10
10
|
clearToolHistory
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
fetchRetrievalsForTask,
|
|
16
16
|
isLlmRaterEnabled,
|
|
17
17
|
postRatings
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-cpvsaqsw.js";
|
|
19
19
|
import {
|
|
20
20
|
getApiKey
|
|
21
21
|
} from "./cli-f14fvzag.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
init_profile_sync,
|
|
27
27
|
readIdentityBaselines,
|
|
28
28
|
warnProfileFileTooLarge
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-10ym38qc.js";
|
|
30
30
|
import {
|
|
31
31
|
MAX_PROFILE_FILE_LENGTH,
|
|
32
32
|
getMcpBaseUrl,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
init_package,
|
|
37
37
|
package_default
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-48527fpw.js";
|
|
39
39
|
import {
|
|
40
40
|
init_secret_scrubber,
|
|
41
41
|
scrubSecrets
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
resolveGrammarConstrainedSampling,
|
|
9
9
|
resolveJsonSchemaStrictSampling,
|
|
10
10
|
transformMessages
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-31nkw3g3.js";
|
|
12
12
|
import {
|
|
13
13
|
sanitizeSurrogates
|
|
14
14
|
} from "./cli-y2apkfe2.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
renderSystemMessageUpdate,
|
|
22
22
|
resolveTranscript,
|
|
23
23
|
resolveTranscriptTools
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-ykk5jaax.js";
|
|
25
25
|
|
|
26
26
|
// node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js
|
|
27
27
|
function encodeTextSignatureV1(id, phase) {
|
|
@@ -453,6 +453,7 @@ async function processResponsesStream(openaiStream, output, stream, model, optio
|
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
for await (const event of openaiStream) {
|
|
456
|
+
await options?.onProviderStreamEvent?.(event, model);
|
|
456
457
|
if (event.type === "response.created") {
|
|
457
458
|
output.responseId = event.response.id;
|
|
458
459
|
} else if (event.type === "response.output_item.added") {
|
|
@@ -617,6 +618,16 @@ async function processResponsesStream(openaiStream, output, stream, model, optio
|
|
|
617
618
|
if (!sawTerminalResponseEvent) {
|
|
618
619
|
throw new Error("OpenAI Responses stream ended before a terminal response event");
|
|
619
620
|
}
|
|
621
|
+
if (output.stopReason === "toolUse") {
|
|
622
|
+
for (const block of output.content) {
|
|
623
|
+
if (block.type !== "toolCall")
|
|
624
|
+
continue;
|
|
625
|
+
const toolCall = block;
|
|
626
|
+
if (toolCall.partialJson !== undefined || toolCall.customInput !== undefined) {
|
|
627
|
+
throw new Error(`OpenAI Responses stream completed with an unfinished tool call: ${toolCall.name} (${toolCall.id})`);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
620
631
|
}
|
|
621
632
|
function mapStopReason(status, incompleteReason) {
|
|
622
633
|
if (!status)
|