@desplega.ai/agent-swarm 2.7.6 → 2.7.7
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-bp91d37f.js → acp-adapter-7b4vk3h5.js} +5 -4
- package/dist/{actions-yj0eeaqh.js → actions-3tt153af.js} +18 -18
- package/dist/{amp-adapter-4pg9h34q.js → amp-adapter-njpts0yr.js} +1 -1
- package/dist/{anthropic-messages-x4q6rfq5.js → anthropic-messages-xey2skwx.js} +7 -7
- package/dist/{app-909e97cr.js → app-nky4378f.js} +3 -3
- package/dist/{assistant-qdyb5fyy.js → assistant-jnb669pa.js} +19 -19
- package/dist/{azure-openai-responses-s1w5n70z.js → azure-openai-responses-26t7j9ra.js} +5 -5
- package/dist/{boot-reembed-fk0s9z18.js → boot-reembed-9mgvaztt.js} +1 -1
- package/dist/{boot-reembed-gs1rzrnh.js → boot-reembed-qs2djdej.js} +1 -1
- package/dist/{boot-scrub-sweep-4qfd4kfx.js → boot-scrub-sweep-yjpdj7s1.js} +3 -3
- package/dist/{boot-seeds-yr00k13d.js → boot-seeds-5cm6ambd.js} +4 -4
- package/dist/{boxd-vdmfssd9.js → boxd-nv507va8.js} +1 -1
- package/dist/{claude-adapter-qta1f1xn.js → claude-adapter-fn287zmm.js} +5 -4
- package/dist/{claude-managed-setup-sc6j4dm0.js → claude-managed-setup-wtdz2mj2.js} +1 -1
- package/dist/{claude-sdk-session-zgrz6yvc.js → claude-sdk-session-x91kqyhm.js} +8288 -8224
- package/dist/{cli-wp9sp1qb.js → cli-08bmz9z9.js} +1 -1
- package/dist/{cli-yy3rhsdw.js → cli-1c6tzt8g.js} +7 -7
- package/dist/{cli-q0k1w5zd.js → cli-35rsp8ye.js} +1 -1
- package/dist/{cli-xnrwazav.js → cli-3fg0bdcv.js} +1 -1
- package/dist/{cli-89knwags.js → cli-5b456bpf.js} +2 -2
- package/dist/{cli-drr5v6av.js → cli-5jnhv72d.js} +1 -1
- package/dist/{cli-dxae2yg7.js → cli-5zx699j9.js} +2 -2
- package/dist/{cli-0at8w34w.js → cli-6g0hb4cp.js} +8 -8
- package/dist/{cli-e3r2neck.js → cli-6pfd54vx.js} +5 -5
- package/dist/{cli-bsn8nhrq.js → cli-6vcp76qk.js} +3 -3
- package/dist/{cli-ekwks2vs.js → cli-72v799xn.js} +1 -1
- package/dist/cli-82j36f2m.js +45 -0
- package/dist/{cli-yx4kfngt.js → cli-8305gbq0.js} +29 -16
- package/dist/{cli-4necwtsv.js → cli-8sckt74b.js} +8 -8
- package/dist/{cli-vvpx3gsx.js → cli-95jzxcp3.js} +1 -1
- package/dist/{cli-hr2e2fft.js → cli-adeegh7d.js} +7 -7
- package/dist/{cli-m48g6p95.js → cli-afkqkrtw.js} +3 -3
- package/dist/{cli-0qatpy8q.js → cli-ayayvfg4.js} +24 -4
- package/dist/{cli-bqt1mptt.js → cli-az48n0nr.js} +4 -4
- package/dist/{cli-zm72anhg.js → cli-bfv7vdg6.js} +9 -9
- package/dist/{cli-hgaazk69.js → cli-caj33vcq.js} +5 -5
- package/dist/{cli-3ypk9vk1.js → cli-cb2a8pna.js} +1 -1
- package/dist/{cli-waqbxg08.js → cli-cppkf404.js} +17 -17
- package/dist/{cli-yn4kxs06.js → cli-ddaanqkd.js} +4 -4
- package/dist/{cli-386tyxxg.js → cli-e0kmphd6.js} +2 -2
- package/dist/{cli-54t00gt8.js → cli-e46hg0xw.js} +1 -1
- package/dist/{cli-jm2vfpfd.js → cli-e5bzrn01.js} +1 -1
- package/dist/{cli-436532ck.js → cli-excnnjg2.js} +165 -153
- package/dist/{cli-71ptav7x.js → cli-ferkkrg9.js} +1 -1
- package/dist/{cli-vpf89f34.js → cli-fmjd0t1y.js} +3 -3
- package/dist/{cli-pd7vagab.js → cli-fyt2g4wd.js} +3 -3
- package/dist/{cli-gdhpcbhf.js → cli-g08zdaec.js} +1 -1
- package/dist/{cli-ehq736cn.js → cli-g7s47cc5.js} +4 -4
- package/dist/{cli-svj5090z.js → cli-gz6q4eve.js} +3 -3
- package/dist/{cli-8snvgs5r.js → cli-je518txm.js} +10 -10
- package/dist/{cli-rmmmrjkd.js → cli-jtjtabxe.js} +1 -1
- package/dist/{cli-611a1294.js → cli-k0wwfqbg.js} +18 -1
- package/dist/{cli-es6va8jk.js → cli-k1nje3v3.js} +38 -43
- package/dist/{cli-p5gp8pcx.js → cli-k8196sh2.js} +6 -6
- package/dist/{cli-nwj0ee2w.js → cli-k899ehvh.js} +2 -2
- package/dist/{cli-decfb6v8.js → cli-m0da8j35.js} +23 -9
- package/dist/{cli-he9wchme.js → cli-mkk9rnzz.js} +4 -4
- package/dist/{cli-nhrvpaj7.js → cli-n6bv12jn.js} +510 -4
- package/dist/{cli-8bc1w0tw.js → cli-nmzhp1b5.js} +14 -12
- package/dist/{cli-0yv5z2pg.js → cli-p82cnnjq.js} +1 -1
- package/dist/{cli-c60vetmm.js → cli-pc6n7fre.js} +1 -1
- package/dist/{cli-xds5f77d.js → cli-pjctyea3.js} +2 -2
- package/dist/{cli-xbbndvjy.js → cli-pq73h5mz.js} +3 -3
- package/dist/{cli-aa6yxc7m.js → cli-pz4rk021.js} +1 -1
- package/dist/{cli-xnqgpshy.js → cli-q3tkegby.js} +1 -1
- package/dist/cli-qghe0h66.js +67 -0
- package/dist/{cli-zbbwez0r.js → cli-qh4d4tvk.js} +4 -4
- package/dist/{cli-w6dt9ged.js → cli-rtt8g4v9.js} +1 -1
- package/dist/{cli-1h3wcpbw.js → cli-snpj5zbj.js} +2 -2
- package/dist/{cli-a7v854rf.js → cli-tgrv9cjx.js} +263 -12
- package/dist/{cli-faxe6thg.js → cli-vz22fyqv.js} +186 -54
- package/dist/{cli-k2gzwsj2.js → cli-wk5yrfwd.js} +160 -26
- package/dist/{cli-shpbx5ee.js → cli-ws19768n.js} +1641 -49
- package/dist/{cli-70r77n04.js → cli-xae4g51r.js} +1 -1
- package/dist/{cli-kqdg1bsb.js → cli-yndmfxb3.js} +2 -2
- package/dist/{cli-bjb3z51z.js → cli-yyj3j5m4.js} +2 -2
- package/dist/cli.js +21 -21
- package/dist/{cloudflare-workers-ai-system-one-bm60fjm0.js → cloudflare-workers-ai-system-one-ef2a980q.js} +2 -2
- package/dist/{codex-adapter-ayd1fb6h.js → codex-adapter-cf2yxe9m.js} +3 -2
- package/dist/{codex-hook-9efm2x1m.js → codex-hook-a0c6g6t6.js} +1 -1
- package/dist/{codex-session-runner-jesa32xc.js → codex-session-runner-6vfzdgbd.js} +3 -2
- package/dist/{commands-hanewgf2.js → commands-t3mfy7vn.js} +3 -3
- package/dist/{controller-dt1n3c1q.js → controller-q7xrbaz0.js} +3 -3
- package/dist/{controllers-connect-xx8x64n5.js → controllers-connect-c6nm70kg.js} +19 -19
- package/dist/{cursor-adapter-9s4dwwdw.js → cursor-adapter-ftd81ga8.js} +1 -1
- package/dist/{db-3vttcbv4.js → db-dk572x25.js} +3 -3
- package/dist/{db-9dv0g1ab.js → db-vemtpmcc.js} +4 -2
- package/dist/{dispatcher-tx9hd1sv.js → dispatcher-kh7ecxh9.js} +17 -17
- package/dist/{dsh-adapter-007y4ejs.js → dsh-adapter-v8628r89.js} +1 -1
- package/dist/{e2b-we6hs6q5.js → e2b-fr12yccx.js} +1 -1
- package/dist/{e2b-a19d28rz.js → e2b-x6ywzak3.js} +1 -1
- package/dist/{easter-egg-3d-rgbrqb8s.js → easter-egg-3d-nenw4x63.js} +1 -1
- package/dist/{embedding-space-ny1e2940.js → embedding-space-0jepb239.js} +6 -6
- package/dist/{embeddings-2t386t13.js → embeddings-xxt49yxg.js} +1 -1
- package/dist/{execute-pksh0ceh.js → execute-1mhw6e4x.js} +1 -1
- package/dist/{external-channel-phgmhmd7.js → external-channel-55v12e60.js} +2 -2
- package/dist/{fx-adapter-fy8rr921.js → fx-adapter-bs8wqrk5.js} +6 -5
- package/dist/{google-generative-ai-8y3m3k4b.js → google-generative-ai-v94hr7h0.js} +5 -5
- package/dist/{google-vertex-w3v98n7b.js → google-vertex-g7vr6cf8.js} +5 -5
- package/dist/{grok-adapter-q0abvpaj.js → grok-adapter-gpjqmkcq.js} +6 -5
- package/dist/handlers-zxmp1ta4.js +32 -0
- package/dist/{heartbeat-kadyek8p.js → heartbeat-k42svnr0.js} +20 -20
- package/dist/{hook-9k551xnj.js → hook-114m7hap.js} +4 -3
- package/dist/{hook-5zs3msf6.js → hook-6nphweh0.js} +24 -9
- package/dist/{http-mhz9vw1f.js → http-r8cc4wz7.js} +1025 -173
- package/dist/index-a8phxqnk.js +37 -0
- package/dist/{index-vdygbq10.js → index-e3s8wmxy.js} +1 -1
- package/dist/{index-q361cg2f.js → index-fpk4bcd9.js} +1 -1
- package/dist/index-k6h00t4c.js +30 -0
- package/dist/{index-rvr00sg7.js → index-nh3wyqdt.js} +1017 -574
- package/dist/index-xrz7te8h.js +33 -0
- package/dist/{keepalive-w56f32cg.js → keepalive-x060nt9p.js} +3 -3
- package/dist/lead-956sd2yc.js +71 -0
- package/dist/{maintenance-7mdgxcea.js → maintenance-2xxfexhf.js} +1 -1
- package/dist/{mistral-conversations-4pmwj1c0.js → mistral-conversations-3gjpdb4b.js} +4 -4
- package/dist/{oauth-refresh-sweep-29txy9vk.js → oauth-refresh-sweep-fckc4ar5.js} +2 -2
- package/dist/{onboard-kpsrkarj.js → onboard-zc48j237.js} +3 -3
- package/dist/{openai-codex-responses-44j573nm.js → openai-codex-responses-8pbxq9h5.js} +5 -5
- package/dist/{openai-completions-a4gee2a8.js → openai-completions-rm00s912.js} +4 -4
- package/dist/{openai-decisions-w4qkrcar.js → openai-decisions-8v957r2r.js} +1 -1
- package/dist/{openai-responses-rbp6h5kr.js → openai-responses-agxpf96k.js} +5 -5
- package/dist/{opencode-adapter-j25vm3rr.js → opencode-adapter-r690h1cr.js} +4 -3
- package/dist/{otel-impl-6kkct7a8.js → otel-impl-r5xbh81q.js} +4 -4
- package/dist/{pi-mono-adapter-exhkzhn2.js → pi-mono-adapter-c7v8sdec.js} +7 -6
- package/dist/{pricing-refresh-n2x7jh6k.js → pricing-refresh-3pmre11v.js} +3 -3
- package/dist/{rbac-roles-81ypx6es.js → rbac-roles-3vbshwsb.js} +1 -1
- package/dist/{rbac-roles-b5htkjby.js → rbac-roles-910mmkgz.js} +2 -2
- package/dist/{render-v2-qn6jmpk4.js → render-v2-pxykkbab.js} +3 -3
- package/dist/{resume-wd30wx23.js → resume-adda0bwy.js} +6 -6
- package/dist/{runtime-4hsg7h60.js → runtime-fnbm7stk.js} +1 -1
- package/dist/{session-access-5qvfevhk.js → session-access-2fvamrdc.js} +4 -4
- package/dist/{session-source-backfill-n1czavbr.js → session-source-backfill-08xvv0sm.js} +2 -2
- package/dist/{setup-dnb56qy5.js → setup-1aqmvmh1.js} +1 -1
- package/dist/{typesafe-system-one-5mavm259.js → typesafe-system-one-0bmqcxfg.js} +2 -2
- package/dist/{virtual-modules-76xxv9fs.js → virtual-modules-d2pjk9j1.js} +5 -5
- package/dist/{work-objects-4n21tfkm.js → work-objects-9s0yrm5j.js} +20 -20
- package/dist/{worker-follow-up-77hvzxww.js → worker-follow-up-3q78fqmr.js} +17 -17
- package/dist/worker-y15hy08h.js +71 -0
- package/openapi.json +197 -4
- package/package.json +5 -5
- package/src/apps/definition.ts +6 -5
- package/src/be/db/page-theme-tokens.ts +12 -0
- package/src/be/db/tasks/read.ts +9 -1
- package/src/be/db/tasks/write.ts +19 -0
- package/src/be/db-client.ts +107 -7
- package/src/be/db.ts +34 -2
- package/src/be/migrations/269_pages_design_system.sql +23 -0
- package/src/be/seed/schedules-seeder.ts +0 -10
- package/src/be/seed-scripts/catalog/catalog-report.inline.ts +2 -0
- package/src/be/seed-scripts/catalog/catalog-report.ts +2 -0
- package/src/be/seed-scripts/catalog/memory-eval.ts +2 -0
- package/src/be/seed-scripts/catalog/swarm-update-check.ts +150 -0
- package/src/be/seed-scripts/index.ts +9 -0
- package/src/be/seed-skills/bundled-files.generated.json +3 -3
- package/src/be/swarm-config-guard.ts +32 -0
- package/src/be/task-auto-title-listener.ts +127 -0
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/profile-sync.ts +151 -16
- package/src/commands/runner.ts +15 -7
- package/src/hooks/hook.ts +20 -9
- package/src/http/index.ts +3 -0
- package/src/http/pages-public.ts +93 -129
- package/src/http/pages.ts +94 -21
- package/src/pages/browser-sdk.ts +48 -21
- package/src/pages/color-literals.ts +115 -0
- package/src/pages/page-head.ts +766 -0
- package/src/pages/version.ts +3 -0
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +1 -0
- package/src/providers/codex-app-server.ts +27 -1
- package/src/providers/pi-mono-extension.ts +30 -15
- package/src/tasks/follow-up-gate.ts +318 -0
- package/src/tasks/worker-follow-up.ts +21 -1
- package/src/tests/codex-app-server.test.ts +59 -0
- package/src/tests/codex-gateway-route.test.ts +50 -1
- package/src/tests/create-page-tool.test.ts +501 -0
- package/src/tests/db-client-busy-retry.test.ts +81 -0
- package/src/tests/db-task-read-contract.test.ts +1 -0
- package/src/tests/db-task-write-contract.test.ts +2 -0
- package/src/tests/db-tasks-read.test.ts +21 -0
- package/src/tests/fixtures/pages/head-v1.html +56 -0
- package/src/tests/follow-up-gate-shadow.test.ts +513 -0
- package/src/tests/identity-field-budget.test.ts +1 -1
- package/src/tests/internal-ai/credentials.test.ts +62 -0
- package/src/tests/internal-ai/task-title.test.ts +283 -0
- package/src/tests/merge-gate-detect-changes.test.ts +145 -0
- package/src/tests/page-proxy.test.ts +1 -1
- package/src/tests/page-session-dev-cookie.test.ts +188 -0
- package/src/tests/pages-frame-ancestors.test.ts +28 -1
- package/src/tests/pages-head-v2.test.ts +534 -0
- package/src/tests/pages-http.test.ts +330 -0
- package/src/tests/pages-public-html.test.ts +43 -0
- package/src/tests/pages-storage.test.ts +182 -0
- package/src/tests/pages-versioning.test.ts +72 -0
- package/src/tests/profile-sync-stale-writeback.test.ts +334 -0
- package/src/tests/profile-sync.test.ts +11 -15
- package/src/tests/scheduled-task-required-params-migration.test.ts +3 -1
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/seed-registry.test.ts +28 -6
- package/src/tests/seed-schedules.test.ts +61 -8
- package/src/tests/seed-scripts.test.ts +142 -2
- package/src/tests/swarm-diff.test.ts +121 -2
- package/src/tests/task-auto-title-config-guard.test.ts +37 -0
- package/src/tests/task-auto-title-listener.test.ts +165 -0
- package/src/tests/theme-import.test.ts +758 -0
- package/src/tests/themes-page-theme.test.ts +155 -0
- package/src/tests/themes-presets.test.ts +172 -0
- package/src/tests/workflow-script-principal.test.ts +2 -1
- package/src/themes/classics.ts +949 -0
- package/src/themes/import.ts +420 -0
- package/src/themes/page-fields.ts +40 -0
- package/src/themes/page-theme.ts +102 -0
- package/src/themes/presets.ts +561 -0
- package/src/themes/tokens.ts +218 -0
- package/src/tools/app-upsert.ts +1 -1
- package/src/tools/create-page.ts +118 -12
- package/src/tools/utils.ts +33 -0
- package/src/types.ts +45 -3
- package/src/utils/constants.ts +19 -0
- package/src/utils/follow-up-gate-schedule-ids.ts +13 -0
- package/src/utils/internal-ai/credentials.ts +146 -93
- package/src/utils/internal-ai/index.ts +10 -0
- package/src/utils/internal-ai/models.ts +18 -0
- package/src/utils/internal-ai/task-title.ts +282 -0
- package/src/utils/page-session.ts +37 -0
- package/templates/schedules/daily-status-report/content.md +88 -2
- package/templates/schedules/daily-swarm-update-check/content.md +16 -40
- package/templates/skills/apps/SKILL.md +1 -1
- package/templates/skills/apps/content.md +1 -1
- package/templates/skills/heartbeat-runbook/content.md +1 -1
- package/templates/skills/pages/config.json +1 -1
- package/templates/skills/pages/content.md +539 -86
- package/templates/skills/pages/files/examples/annotated-pr.html +21 -12
- package/templates/skills/pages/files/examples/multiplayer-board.html +41 -41
- package/templates/skills/pages/files/examples/report-page.html +125 -124
- package/dist/cli-2pnswgh8.js +0 -189
- package/dist/handlers-by3sfxyx.js +0 -32
- package/dist/index-4f2pvxae.js +0 -37
- package/dist/index-98gz7tmp.js +0 -30
- package/dist/index-k08z2cak.js +0 -33
- package/dist/lead-enq35nqp.js +0 -70
- package/dist/worker-gg1576j3.js +0 -70
- package/templates/schedules/daily-workflow-health-audit/config.json +0 -19
- package/templates/schedules/daily-workflow-health-audit/content.md +0 -191
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bedrockProviderModule
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-g7s47cc5.js";
|
|
4
4
|
import {
|
|
5
5
|
chatThreadOfContextKey,
|
|
6
6
|
agentContextKey,
|
|
@@ -248,6 +248,7 @@ import {
|
|
|
248
248
|
updateTaskClaudeSessionId2,
|
|
249
249
|
recordTaskProviderIfUnset2,
|
|
250
250
|
updateTaskTitle2,
|
|
251
|
+
setTaskTitleIfUnset2,
|
|
251
252
|
completeTask2,
|
|
252
253
|
failTask2,
|
|
253
254
|
cancelTask2,
|
|
@@ -259,6 +260,7 @@ import {
|
|
|
259
260
|
getPausedTasksForAgent2,
|
|
260
261
|
resetOrphanedInProgressTasksForAgent2,
|
|
261
262
|
updateTaskProgress2,
|
|
263
|
+
init_write,
|
|
262
264
|
IdempotencyKeyTakenError,
|
|
263
265
|
workflowRequestFingerprint,
|
|
264
266
|
assertWorkflowIdempotencyKeyUnused,
|
|
@@ -477,7 +479,7 @@ import {
|
|
|
477
479
|
countScriptRunJournalSteps2,
|
|
478
480
|
countScriptRunJournalAgentTaskSteps2,
|
|
479
481
|
init_db4
|
|
480
|
-
} from "./cli-
|
|
482
|
+
} from "./cli-wk5yrfwd.js";
|
|
481
483
|
import {
|
|
482
484
|
PRIMARY_ROLE_NAMES2,
|
|
483
485
|
getUserGrant2,
|
|
@@ -488,8 +490,8 @@ import {
|
|
|
488
490
|
assertNotLastAdmin2,
|
|
489
491
|
setUserRoles2,
|
|
490
492
|
init_rbac_roles
|
|
491
|
-
} from "./cli-
|
|
492
|
-
import"./cli-
|
|
493
|
+
} from "./cli-jtjtabxe.js";
|
|
494
|
+
import"./cli-qh4d4tvk.js";
|
|
493
495
|
import {
|
|
494
496
|
upsertModelCatalogOverlay,
|
|
495
497
|
deleteModelCatalogOverlay,
|
|
@@ -497,12 +499,12 @@ import {
|
|
|
497
499
|
init_model_catalog_store,
|
|
498
500
|
requestModelCatalogRefresh2,
|
|
499
501
|
init_pricing_refresh
|
|
500
|
-
} from "./cli-
|
|
502
|
+
} from "./cli-5b456bpf.js";
|
|
501
503
|
import {
|
|
502
504
|
workflowEventBus2,
|
|
503
505
|
init_event_bus
|
|
504
506
|
} from "./cli-wx3rhnm0.js";
|
|
505
|
-
import"./cli-
|
|
507
|
+
import"./cli-rtt8g4v9.js";
|
|
506
508
|
import {
|
|
507
509
|
require_dist4,
|
|
508
510
|
getSlackConnectionState,
|
|
@@ -533,12 +535,12 @@ import {
|
|
|
533
535
|
startSlackApp2,
|
|
534
536
|
stopSlackApp2,
|
|
535
537
|
init_app3
|
|
536
|
-
} from "./cli-
|
|
538
|
+
} from "./cli-cppkf404.js";
|
|
537
539
|
import {
|
|
538
540
|
retryFailedRun2,
|
|
539
541
|
cancelWorkflowRun2,
|
|
540
542
|
init_resume
|
|
541
|
-
} from "./cli-
|
|
543
|
+
} from "./cli-afkqkrtw.js";
|
|
542
544
|
import {
|
|
543
545
|
DEFAULT_NEGOTIATED_PROTOCOL_VERSION,
|
|
544
546
|
SUPPORTED_PROTOCOL_VERSIONS,
|
|
@@ -626,6 +628,9 @@ import {
|
|
|
626
628
|
hasKvViewArgs,
|
|
627
629
|
resolveKvView,
|
|
628
630
|
init_kv_view,
|
|
631
|
+
COLOR_LITERAL_THRESHOLD,
|
|
632
|
+
countColorLiterals,
|
|
633
|
+
init_color_literals,
|
|
629
634
|
toolErr,
|
|
630
635
|
createToolRegistrar,
|
|
631
636
|
init_utils,
|
|
@@ -770,6 +775,7 @@ import {
|
|
|
770
775
|
extractPageSession,
|
|
771
776
|
extractLegacyPageSession,
|
|
772
777
|
extractAndVerifyCookie,
|
|
778
|
+
isLocalDevPageRequest,
|
|
773
779
|
pageSessionSetCookies,
|
|
774
780
|
init_page_session,
|
|
775
781
|
resolveHttpRequestAuth,
|
|
@@ -817,6 +823,12 @@ import {
|
|
|
817
823
|
init_page_versions,
|
|
818
824
|
snapshotPage,
|
|
819
825
|
init_version3,
|
|
826
|
+
DEFAULT_THEME_ID,
|
|
827
|
+
THEME_PRESET_IDS,
|
|
828
|
+
getThemePreset,
|
|
829
|
+
init_presets,
|
|
830
|
+
readThemeFields,
|
|
831
|
+
init_page_fields,
|
|
820
832
|
assertOAuthAppUrlsSafe,
|
|
821
833
|
assertOAuthEgressUrlSafe,
|
|
822
834
|
init_app_validation,
|
|
@@ -824,7 +836,7 @@ import {
|
|
|
824
836
|
listOAuthPresetIds,
|
|
825
837
|
getOAuthPreset,
|
|
826
838
|
hydrateOAuthAppFromPreset,
|
|
827
|
-
|
|
839
|
+
init_presets2,
|
|
828
840
|
scopedResourceScopeIdSchema,
|
|
829
841
|
resolveScopedResourceId,
|
|
830
842
|
init_scoped_resource,
|
|
@@ -947,7 +959,7 @@ import {
|
|
|
947
959
|
getEnabledCapabilities,
|
|
948
960
|
createServer,
|
|
949
961
|
init_server
|
|
950
|
-
} from "./cli-
|
|
962
|
+
} from "./cli-ws19768n.js";
|
|
951
963
|
import {
|
|
952
964
|
FilesError,
|
|
953
965
|
normalizeFilesError,
|
|
@@ -979,7 +991,7 @@ import {
|
|
|
979
991
|
resolvePoolDelivery2,
|
|
980
992
|
createPoolAgent2,
|
|
981
993
|
init_db2
|
|
982
|
-
} from "./cli-
|
|
994
|
+
} from "./cli-ddaanqkd.js";
|
|
983
995
|
import {
|
|
984
996
|
duplicateGuardedQueryKey,
|
|
985
997
|
warnIfCorsAllowsAnyOrigin,
|
|
@@ -1033,7 +1045,7 @@ import {
|
|
|
1033
1045
|
describeRequestRoute,
|
|
1034
1046
|
route,
|
|
1035
1047
|
init_route_def
|
|
1036
|
-
} from "./cli-
|
|
1048
|
+
} from "./cli-8sckt74b.js";
|
|
1037
1049
|
import {
|
|
1038
1050
|
startPoolRouting,
|
|
1039
1051
|
stopPoolRouting,
|
|
@@ -1046,13 +1058,17 @@ import {
|
|
|
1046
1058
|
checkHeartbeatChecklist2,
|
|
1047
1059
|
runHeartbeatSweep2,
|
|
1048
1060
|
stopHeartbeat2
|
|
1049
|
-
} from "./cli-
|
|
1050
|
-
import"./cli-
|
|
1061
|
+
} from "./cli-bfv7vdg6.js";
|
|
1062
|
+
import"./cli-3fg0bdcv.js";
|
|
1051
1063
|
import {
|
|
1052
1064
|
runtimeSupervisorStatus,
|
|
1053
1065
|
startRuntimeSupervisor,
|
|
1054
1066
|
stopRuntimeSupervisor
|
|
1055
|
-
} from "./cli-
|
|
1067
|
+
} from "./cli-je518txm.js";
|
|
1068
|
+
import {
|
|
1069
|
+
TASK_TITLE_TIMEOUT_MS,
|
|
1070
|
+
generateTaskTitle
|
|
1071
|
+
} from "./cli-vz22fyqv.js";
|
|
1056
1072
|
import"./cli-ns59dc6r.js";
|
|
1057
1073
|
import {
|
|
1058
1074
|
ACP_TARGET_IDS
|
|
@@ -1073,11 +1089,11 @@ import {
|
|
|
1073
1089
|
isUnknownModelError,
|
|
1074
1090
|
checkProviderPoolKey,
|
|
1075
1091
|
writeSkillsToFilesystem
|
|
1076
|
-
} from "./cli-
|
|
1092
|
+
} from "./cli-yyj3j5m4.js";
|
|
1077
1093
|
import {
|
|
1078
1094
|
inviteEmailToSharedOrg,
|
|
1079
1095
|
ensureAgentFsCredentialsForAgent
|
|
1080
|
-
} from "./cli-
|
|
1096
|
+
} from "./cli-pjctyea3.js";
|
|
1081
1097
|
import {
|
|
1082
1098
|
Anthropic
|
|
1083
1099
|
} from "./cli-318r69gq.js";
|
|
@@ -1093,7 +1109,7 @@ import {
|
|
|
1093
1109
|
ampBillsCacheWrites,
|
|
1094
1110
|
resolveAmpModel,
|
|
1095
1111
|
init_amp_models
|
|
1096
|
-
} from "./cli-
|
|
1112
|
+
} from "./cli-35rsp8ye.js";
|
|
1097
1113
|
import {
|
|
1098
1114
|
RATING_MODEL_MAX_LENGTH,
|
|
1099
1115
|
REFERENCES_SOURCE_MAX_LENGTH,
|
|
@@ -1103,7 +1119,7 @@ import {
|
|
|
1103
1119
|
import {
|
|
1104
1120
|
normalizeModelKey,
|
|
1105
1121
|
init_pricing_normalize
|
|
1106
|
-
} from "./cli-
|
|
1122
|
+
} from "./cli-pc6n7fre.js";
|
|
1107
1123
|
import {
|
|
1108
1124
|
require_dist2,
|
|
1109
1125
|
getMcpOAuthToken,
|
|
@@ -1192,7 +1208,7 @@ import {
|
|
|
1192
1208
|
init_typecheck,
|
|
1193
1209
|
parseSkillContent,
|
|
1194
1210
|
init_skill_parser
|
|
1195
|
-
} from "./cli-
|
|
1211
|
+
} from "./cli-adeegh7d.js";
|
|
1196
1212
|
import {
|
|
1197
1213
|
signalProcessGroup,
|
|
1198
1214
|
detachedProcessGroup,
|
|
@@ -1209,7 +1225,7 @@ import {
|
|
|
1209
1225
|
forceRefreshAuthorizationOrThrow,
|
|
1210
1226
|
forceRefreshTokenOrThrow,
|
|
1211
1227
|
init_ensure_token
|
|
1212
|
-
} from "./cli-
|
|
1228
|
+
} from "./cli-q3tkegby.js";
|
|
1213
1229
|
import {
|
|
1214
1230
|
automationIntegrationFixUrl,
|
|
1215
1231
|
preflightAutomation,
|
|
@@ -1253,7 +1269,7 @@ import {
|
|
|
1253
1269
|
definitionNodeIds,
|
|
1254
1270
|
validateDefinition,
|
|
1255
1271
|
init_definition2
|
|
1256
|
-
} from "./cli-
|
|
1272
|
+
} from "./cli-nmzhp1b5.js";
|
|
1257
1273
|
import {
|
|
1258
1274
|
_fetchHolder,
|
|
1259
1275
|
CLIENT_ID,
|
|
@@ -1277,7 +1293,7 @@ import {
|
|
|
1277
1293
|
import {
|
|
1278
1294
|
require_content_type
|
|
1279
1295
|
} from "./cli-yjdgea32.js";
|
|
1280
|
-
import"./cli-
|
|
1296
|
+
import"./cli-g08zdaec.js";
|
|
1281
1297
|
import {
|
|
1282
1298
|
isInvalidClientError,
|
|
1283
1299
|
publicEndpointSsrfOptions,
|
|
@@ -1295,11 +1311,11 @@ import {
|
|
|
1295
1311
|
revokeMcpToken,
|
|
1296
1312
|
computeExpiresAt,
|
|
1297
1313
|
init_mcp_wrapper
|
|
1298
|
-
} from "./cli-
|
|
1314
|
+
} from "./cli-caj33vcq.js";
|
|
1299
1315
|
import {
|
|
1300
1316
|
createRuntimeProvider,
|
|
1301
1317
|
init_runtime_providers
|
|
1302
|
-
} from "./cli-
|
|
1318
|
+
} from "./cli-yndmfxb3.js";
|
|
1303
1319
|
import {
|
|
1304
1320
|
registerSessionTokenConnection,
|
|
1305
1321
|
init_session_token_connections,
|
|
@@ -1326,12 +1342,12 @@ import {
|
|
|
1326
1342
|
revokeAgentTokens,
|
|
1327
1343
|
fingerprintApiKey,
|
|
1328
1344
|
init_users
|
|
1329
|
-
} from "./cli-
|
|
1345
|
+
} from "./cli-5jnhv72d.js";
|
|
1330
1346
|
import"./cli-v41kn3cd.js";
|
|
1331
1347
|
import {
|
|
1332
1348
|
setBedrockProviderModule,
|
|
1333
1349
|
init_bedrock_converse_stream_lazy
|
|
1334
|
-
} from "./cli-
|
|
1350
|
+
} from "./cli-pz4rk021.js";
|
|
1335
1351
|
import {
|
|
1336
1352
|
import_websocket,
|
|
1337
1353
|
import_websocket_server,
|
|
@@ -1354,6 +1370,10 @@ import {
|
|
|
1354
1370
|
init_key,
|
|
1355
1371
|
isSafeBundlePath,
|
|
1356
1372
|
init_bundle_path,
|
|
1373
|
+
PAGE_THEME_SHARED_TOKENS,
|
|
1374
|
+
PAGE_THEME_TOKENS,
|
|
1375
|
+
HIVE_PAGE_TOKENS,
|
|
1376
|
+
init_tokens2,
|
|
1357
1377
|
init_zod_openapi,
|
|
1358
1378
|
AssetKeySchema,
|
|
1359
1379
|
AssetEntityTypeSchema,
|
|
@@ -1444,6 +1464,7 @@ import {
|
|
|
1444
1464
|
WorkflowVersionSchema,
|
|
1445
1465
|
PageContentTypeSchema,
|
|
1446
1466
|
PageAuthModeSchema,
|
|
1467
|
+
PageThemeTokensInputSchema,
|
|
1447
1468
|
PageSchema,
|
|
1448
1469
|
PageVersionSchema,
|
|
1449
1470
|
MetricWidgetSchema,
|
|
@@ -1498,7 +1519,7 @@ import {
|
|
|
1498
1519
|
KvKeySchema,
|
|
1499
1520
|
KvEntrySchema,
|
|
1500
1521
|
init_types4
|
|
1501
|
-
} from "./cli-
|
|
1522
|
+
} from "./cli-n6bv12jn.js";
|
|
1502
1523
|
import {
|
|
1503
1524
|
CODEX_AUTH_FAILURE_BENCH_THRESHOLD,
|
|
1504
1525
|
CODEX_AUTH_WATCH_NAMESPACE,
|
|
@@ -1509,7 +1530,7 @@ import {
|
|
|
1509
1530
|
IDENTITY_FIELD_BUDGETS,
|
|
1510
1531
|
IdentityFieldBudgetError,
|
|
1511
1532
|
init_identity_field_budget
|
|
1512
|
-
} from "./cli-
|
|
1533
|
+
} from "./cli-tgrv9cjx.js";
|
|
1513
1534
|
import {
|
|
1514
1535
|
getSlackConfiguration,
|
|
1515
1536
|
init_config4
|
|
@@ -1575,14 +1596,10 @@ import {
|
|
|
1575
1596
|
ZodIssueCode,
|
|
1576
1597
|
exports_coerce
|
|
1577
1598
|
} from "./cli-agfm16v9.js";
|
|
1578
|
-
import {
|
|
1579
|
-
getNodeEnv,
|
|
1580
|
-
init_node_env
|
|
1581
|
-
} from "./cli-rgeadyvq.js";
|
|
1582
1599
|
import {
|
|
1583
1600
|
init_package,
|
|
1584
1601
|
package_default
|
|
1585
|
-
} from "./cli-
|
|
1602
|
+
} from "./cli-6pfd54vx.js";
|
|
1586
1603
|
import {
|
|
1587
1604
|
realtimeBus,
|
|
1588
1605
|
init_bus
|
|
@@ -1592,13 +1609,14 @@ import {
|
|
|
1592
1609
|
DEFAULT_APP_URL,
|
|
1593
1610
|
getConfiguredAppUrls,
|
|
1594
1611
|
getAppUrl,
|
|
1612
|
+
getLocalDevAppOrigins,
|
|
1595
1613
|
getMcpBaseUrl,
|
|
1596
1614
|
getPublicMcpBaseUrl,
|
|
1597
1615
|
agentFsFileRoute,
|
|
1598
1616
|
isCombEnabled,
|
|
1599
1617
|
isAgentFsProxyEnabled,
|
|
1600
1618
|
init_constants3
|
|
1601
|
-
} from "./cli-
|
|
1619
|
+
} from "./cli-k0wwfqbg.js";
|
|
1602
1620
|
import {
|
|
1603
1621
|
parseEnvFlag,
|
|
1604
1622
|
isEnvFlagEnabled,
|
|
@@ -2532,6 +2550,88 @@ async function seedLegacyCapabilitiesConfig() {
|
|
|
2532
2550
|
return { seeded: true, added: [...added] };
|
|
2533
2551
|
}
|
|
2534
2552
|
|
|
2553
|
+
// src/be/task-auto-title-listener.ts
|
|
2554
|
+
init_api_key();
|
|
2555
|
+
init_constants3();
|
|
2556
|
+
init_env_flag();
|
|
2557
|
+
init_secret_scrubber();
|
|
2558
|
+
init_event_bus();
|
|
2559
|
+
init_read();
|
|
2560
|
+
init_write();
|
|
2561
|
+
var TASK_AUTO_TITLE_CONCURRENCY = 3;
|
|
2562
|
+
function isTaskAutoTitleEnabled(env = process.env) {
|
|
2563
|
+
return parseEnvFlag(env.TASK_AUTO_TITLE_ENABLED, true);
|
|
2564
|
+
}
|
|
2565
|
+
function startTaskAutoTitleListener(options = {}) {
|
|
2566
|
+
const env = options.env ?? process.env;
|
|
2567
|
+
const generate = options.generate ?? generateTaskTitle;
|
|
2568
|
+
const queue = [];
|
|
2569
|
+
let active = 0;
|
|
2570
|
+
let idleWaiters = [];
|
|
2571
|
+
const settleIdle = () => {
|
|
2572
|
+
if (active > 0 || queue.length > 0)
|
|
2573
|
+
return;
|
|
2574
|
+
const waiters = idleWaiters;
|
|
2575
|
+
idleWaiters = [];
|
|
2576
|
+
for (const resolve of waiters)
|
|
2577
|
+
resolve();
|
|
2578
|
+
};
|
|
2579
|
+
const pump = () => {
|
|
2580
|
+
while (active < TASK_AUTO_TITLE_CONCURRENCY) {
|
|
2581
|
+
const taskId = queue.shift();
|
|
2582
|
+
if (!taskId)
|
|
2583
|
+
break;
|
|
2584
|
+
active++;
|
|
2585
|
+
titleTask(taskId, env, generate).catch((error) => console.error("[task-title] Failed:", scrubSecrets(String(error)))).finally(() => {
|
|
2586
|
+
active--;
|
|
2587
|
+
pump();
|
|
2588
|
+
settleIdle();
|
|
2589
|
+
});
|
|
2590
|
+
}
|
|
2591
|
+
};
|
|
2592
|
+
const onTaskCreated = (data) => {
|
|
2593
|
+
if (!isTaskAutoTitleEnabled(env))
|
|
2594
|
+
return;
|
|
2595
|
+
const taskId = data.taskId;
|
|
2596
|
+
if (typeof taskId !== "string" || !taskId)
|
|
2597
|
+
return;
|
|
2598
|
+
queue.push(taskId);
|
|
2599
|
+
pump();
|
|
2600
|
+
};
|
|
2601
|
+
workflowEventBus2.on("task.created", onTaskCreated);
|
|
2602
|
+
return {
|
|
2603
|
+
stop: () => workflowEventBus2.off("task.created", onTaskCreated),
|
|
2604
|
+
idle: () => new Promise((resolve) => {
|
|
2605
|
+
idleWaiters.push(resolve);
|
|
2606
|
+
settleIdle();
|
|
2607
|
+
})
|
|
2608
|
+
};
|
|
2609
|
+
}
|
|
2610
|
+
async function titleTask(taskId, env, generate) {
|
|
2611
|
+
const task = await getTaskById2(taskId);
|
|
2612
|
+
if (!task || task.title)
|
|
2613
|
+
return;
|
|
2614
|
+
const shortId = taskId.slice(0, 8);
|
|
2615
|
+
const startedAt = Date.now();
|
|
2616
|
+
const result = await generate({
|
|
2617
|
+
task: task.task,
|
|
2618
|
+
env,
|
|
2619
|
+
apiUrl: getMcpBaseUrl(),
|
|
2620
|
+
apiKey: getApiKey(),
|
|
2621
|
+
callerTag: `task-title:${task.source}`,
|
|
2622
|
+
signal: AbortSignal.timeout(TASK_TITLE_TIMEOUT_MS)
|
|
2623
|
+
});
|
|
2624
|
+
if (!result.ok) {
|
|
2625
|
+
if (result.reason !== "short-task") {
|
|
2626
|
+
console.log(`[task-title] ${shortId}: no title (${result.reason})`);
|
|
2627
|
+
}
|
|
2628
|
+
return;
|
|
2629
|
+
}
|
|
2630
|
+
const updated = await setTaskTitleIfUnset2(taskId, result.title);
|
|
2631
|
+
const elapsed = Date.now() - startedAt;
|
|
2632
|
+
console.log(scrubSecrets(`[task-title] ${shortId}: "${result.title}" via ${result.model} in ${elapsed}ms${updated ? "" : " (kept the existing title)"}`));
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2535
2635
|
// src/http/index.ts
|
|
2536
2636
|
init_telemetry_enable();
|
|
2537
2637
|
|
|
@@ -24166,9 +24266,10 @@ init_version3();
|
|
|
24166
24266
|
init_resolver();
|
|
24167
24267
|
init_session_templates();
|
|
24168
24268
|
init_sibling_awareness();
|
|
24269
|
+
init_page_fields();
|
|
24270
|
+
init_presets();
|
|
24169
24271
|
init_types4();
|
|
24170
24272
|
init_constants3();
|
|
24171
|
-
init_node_env();
|
|
24172
24273
|
init_page_session();
|
|
24173
24274
|
init_request_auth_context();
|
|
24174
24275
|
init_favorite_owner();
|
|
@@ -25887,11 +25988,22 @@ var PageWithShareUrlsSchema = PageSchema.extend({
|
|
|
25887
25988
|
api_url: string2(),
|
|
25888
25989
|
app_url: string2()
|
|
25889
25990
|
});
|
|
25890
|
-
var PageListItemSchema = PageSchema.partial({
|
|
25991
|
+
var PageListItemSchema = PageSchema.partial({
|
|
25992
|
+
body: true,
|
|
25993
|
+
passwordHash: true,
|
|
25994
|
+
theme: true,
|
|
25995
|
+
themeTokens: true,
|
|
25996
|
+
designVersion: true
|
|
25997
|
+
}).extend({
|
|
25891
25998
|
favorite: boolean(),
|
|
25892
25999
|
api_url: string2(),
|
|
25893
26000
|
app_url: string2()
|
|
25894
26001
|
});
|
|
26002
|
+
var pageDesignBodyFields = {
|
|
26003
|
+
theme: string2().nullable().optional().describe(`Theme preset id that restyles the whole page. One of: ${THEME_PRESET_IDS.join(", ")}. Omit to follow the viewer's theme. Pass null on update to clear it.`),
|
|
26004
|
+
themeTokens: PageThemeTokensInputSchema.nullable().optional().describe('Per-page token overrides, applied on top of the preset. Send { light, dark } maps of token name to CSS value, or { format: "css", css } with a CSS variable block (:root, .dark, @theme). Stored normalized. Names outside the token contract, and values that reference a variable outside it, are ignored and listed in ignoredTokens. Replaces the stored overrides. Pass null on update to clear them.'),
|
|
26005
|
+
designVersion: number2().int().min(1).max(2).optional().describe("Design system version. 2 is the swarm design system and the default for new pages. 1 is the original look that older pages keep. Omit on update to keep the stored value.")
|
|
26006
|
+
};
|
|
25895
26007
|
var createPageRoute = route({
|
|
25896
26008
|
method: "post",
|
|
25897
26009
|
path: "/api/pages",
|
|
@@ -25907,7 +26019,8 @@ var createPageRoute = route({
|
|
|
25907
26019
|
authMode: PageAuthModeSchema.default("authed"),
|
|
25908
26020
|
password: string2().min(1).optional(),
|
|
25909
26021
|
body: string2(),
|
|
25910
|
-
needsCredentials: array2(string2()).optional()
|
|
26022
|
+
needsCredentials: array2(string2()).optional(),
|
|
26023
|
+
...pageDesignBodyFields
|
|
25911
26024
|
}),
|
|
25912
26025
|
responses: {
|
|
25913
26026
|
201: {
|
|
@@ -25917,10 +26030,12 @@ var createPageRoute = route({
|
|
|
25917
26030
|
key: AssetKeySchema,
|
|
25918
26031
|
version: literal2(1),
|
|
25919
26032
|
api_url: string2(),
|
|
25920
|
-
app_url: string2()
|
|
26033
|
+
app_url: string2(),
|
|
26034
|
+
ignoredTokens: array2(string2()).optional().describe("Theme tokens the importer ignored. A bare name is outside the token contract. Other entries give the reason, for example --font-sans (references --font-geist-sans) or --ring (in .card). Absent when none were ignored."),
|
|
26035
|
+
designVersion: number2().int().min(1).describe("The design version of the new page: 2 unless the body set designVersion: 1.")
|
|
25921
26036
|
})
|
|
25922
26037
|
},
|
|
25923
|
-
400: { description: "Invalid body" },
|
|
26038
|
+
400: { description: "Invalid body, unknown theme, or invalid themeTokens" },
|
|
25924
26039
|
409: { description: "Slug already exists for this agent" }
|
|
25925
26040
|
}
|
|
25926
26041
|
});
|
|
@@ -25979,13 +26094,21 @@ var updatePageRoute = route({
|
|
|
25979
26094
|
authMode: PageAuthModeSchema.optional(),
|
|
25980
26095
|
password: string2().min(1).nullable().optional(),
|
|
25981
26096
|
body: string2().optional(),
|
|
25982
|
-
needsCredentials: array2(string2()).nullable().optional()
|
|
26097
|
+
needsCredentials: array2(string2()).nullable().optional(),
|
|
26098
|
+
...pageDesignBodyFields
|
|
25983
26099
|
}),
|
|
25984
26100
|
responses: {
|
|
25985
26101
|
200: {
|
|
25986
26102
|
description: "Page updated",
|
|
25987
|
-
schema: object2({
|
|
26103
|
+
schema: object2({
|
|
26104
|
+
id: string2(),
|
|
26105
|
+
key: AssetKeySchema,
|
|
26106
|
+
version: number2().int().min(1),
|
|
26107
|
+
ignoredTokens: array2(string2()).optional().describe("Theme tokens the importer ignored. A bare name is outside the token contract. Other entries give the reason, for example --font-sans (references --font-geist-sans) or --ring (in .card). Absent when none were ignored."),
|
|
26108
|
+
designVersion: number2().int().min(1).describe("The design version the page has after the update. An omitted designVersion keeps the stored one, so an older page stays on 1.")
|
|
26109
|
+
})
|
|
25988
26110
|
},
|
|
26111
|
+
400: { description: "Unknown theme or invalid themeTokens" },
|
|
25989
26112
|
404: { description: "Page not found" },
|
|
25990
26113
|
413: { description: "Payload too large" }
|
|
25991
26114
|
}
|
|
@@ -26196,12 +26319,6 @@ function formatFeedbackComments(comments) {
|
|
|
26196
26319
|
|
|
26197
26320
|
`);
|
|
26198
26321
|
}
|
|
26199
|
-
function isDevRequest(req) {
|
|
26200
|
-
if (getNodeEnv() === "production")
|
|
26201
|
-
return false;
|
|
26202
|
-
const origin = req.headers.origin ?? "";
|
|
26203
|
-
return origin === "" || origin.startsWith("http://localhost") || origin.startsWith("http://127.0.0.1");
|
|
26204
|
-
}
|
|
26205
26322
|
async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
26206
26323
|
if (createPageRoute.match(req.method, pathSegments)) {
|
|
26207
26324
|
if (enforceContentLengthCap(req, res, MAX_PAGE_BODY_BYTES) === BODY_TOO_LARGE)
|
|
@@ -26213,6 +26330,11 @@ async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
26213
26330
|
jsonError(res, "X-Agent-ID header required", 400);
|
|
26214
26331
|
return true;
|
|
26215
26332
|
}
|
|
26333
|
+
const themeFields = readThemeFields(parsed.body);
|
|
26334
|
+
if ("error" in themeFields) {
|
|
26335
|
+
jsonError(res, themeFields.error, 400);
|
|
26336
|
+
return true;
|
|
26337
|
+
}
|
|
26216
26338
|
const slug = parsed.body.slug ?? slugify2(parsed.body.title);
|
|
26217
26339
|
let passwordHash;
|
|
26218
26340
|
if (parsed.body.password) {
|
|
@@ -26230,14 +26352,19 @@ async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
26230
26352
|
authMode: parsed.body.authMode,
|
|
26231
26353
|
passwordHash,
|
|
26232
26354
|
body: parsed.body.body,
|
|
26233
|
-
needsCredentials: parsed.body.needsCredentials
|
|
26355
|
+
needsCredentials: parsed.body.needsCredentials,
|
|
26356
|
+
theme: themeFields.theme,
|
|
26357
|
+
themeTokens: themeFields.themeTokens,
|
|
26358
|
+
designVersion: parsed.body.designVersion
|
|
26234
26359
|
});
|
|
26235
26360
|
createPageRoute.respond(res, 201, {
|
|
26236
26361
|
id: page.id,
|
|
26237
26362
|
key: page.key,
|
|
26238
26363
|
version: 1,
|
|
26239
26364
|
api_url: `${getApiBaseUrl()}/p/${page.id}`,
|
|
26240
|
-
app_url: `${getAppBaseUrl()}/pages/${page.slug}
|
|
26365
|
+
app_url: `${getAppBaseUrl()}/pages/${page.slug}`,
|
|
26366
|
+
...themeFields.ignored.length > 0 ? { ignoredTokens: themeFields.ignored } : {},
|
|
26367
|
+
designVersion: page.designVersion
|
|
26241
26368
|
});
|
|
26242
26369
|
} catch (err) {
|
|
26243
26370
|
if (err instanceof AssetKeyAuthorizationError) {
|
|
@@ -26401,6 +26528,11 @@ async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
26401
26528
|
jsonError(res, "Page belongs to another agent", 403);
|
|
26402
26529
|
return true;
|
|
26403
26530
|
}
|
|
26531
|
+
const themeFields = readThemeFields(parsed.body);
|
|
26532
|
+
if ("error" in themeFields) {
|
|
26533
|
+
jsonError(res, themeFields.error, 400);
|
|
26534
|
+
return true;
|
|
26535
|
+
}
|
|
26404
26536
|
let passwordHashUpdate;
|
|
26405
26537
|
if (parsed.body.password === null) {
|
|
26406
26538
|
passwordHashUpdate = null;
|
|
@@ -26430,7 +26562,10 @@ async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
26430
26562
|
authMode: parsed.body.authMode,
|
|
26431
26563
|
passwordHash: passwordHashUpdate,
|
|
26432
26564
|
body: parsed.body.body,
|
|
26433
|
-
needsCredentials: parsed.body.needsCredentials ?? undefined
|
|
26565
|
+
needsCredentials: parsed.body.needsCredentials ?? undefined,
|
|
26566
|
+
theme: themeFields.theme,
|
|
26567
|
+
themeTokens: themeFields.themeTokens,
|
|
26568
|
+
designVersion: parsed.body.designVersion
|
|
26434
26569
|
});
|
|
26435
26570
|
if (!updated) {
|
|
26436
26571
|
res.writeHead(404);
|
|
@@ -26440,7 +26575,9 @@ async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
26440
26575
|
updatePageRoute.respond(res, 200, {
|
|
26441
26576
|
id: updated.id,
|
|
26442
26577
|
key: updated.key,
|
|
26443
|
-
version: await getPageEditCounter(updated.id)
|
|
26578
|
+
version: await getPageEditCounter(updated.id),
|
|
26579
|
+
...themeFields.ignored.length > 0 ? { ignoredTokens: themeFields.ignored } : {},
|
|
26580
|
+
designVersion: updated.designVersion
|
|
26444
26581
|
});
|
|
26445
26582
|
return true;
|
|
26446
26583
|
}
|
|
@@ -26549,7 +26686,7 @@ ${defuseFeedbackTags(note)}
|
|
|
26549
26686
|
const user = authUser(auth);
|
|
26550
26687
|
const identity = user ? { uid: user.id, name: user.name } : isOperatorAuth(auth) ? { name: `guest-${randomUUID4().slice(0, 8)}`, op: true } : undefined;
|
|
26551
26688
|
const cookies = await pageSessionSetCookies(req, page.id, {
|
|
26552
|
-
dev:
|
|
26689
|
+
dev: isLocalDevPageRequest(req),
|
|
26553
26690
|
...identity
|
|
26554
26691
|
});
|
|
26555
26692
|
applyLaunchCors(req, res);
|
|
@@ -26897,11 +27034,23 @@ var SWARM_UI_JS = `
|
|
|
26897
27034
|
closeCursorRoomIfUnused(record);
|
|
26898
27035
|
}
|
|
26899
27036
|
|
|
27037
|
+
// Colors and fonts read the page theme tokens (designVersion 2). Each
|
|
27038
|
+
// fallback is the original literal, so a designVersion 1 page, which has no
|
|
27039
|
+
// tokens, renders exactly as before.
|
|
26900
27040
|
var SEV_COLOR = {
|
|
26901
|
-
error: '#ef4444',
|
|
26902
|
-
warn: '#f59e0b',
|
|
26903
|
-
info: '#3b82f6',
|
|
27041
|
+
error: 'var(--color-status-error-strong, #ef4444)',
|
|
27042
|
+
warn: 'var(--color-status-warning-strong, #f59e0b)',
|
|
27043
|
+
info: 'var(--color-status-info-strong, #3b82f6)',
|
|
26904
27044
|
};
|
|
27045
|
+
var MUTED = 'var(--color-muted-foreground, #7c8aa6)';
|
|
27046
|
+
var MONO = "var(--font-mono, 'Space Mono', ui-monospace, monospace)";
|
|
27047
|
+
|
|
27048
|
+
// A color at a lower alpha. Mixing with transparent keeps the color and
|
|
27049
|
+
// scales its alpha, so tint('#ef4444', '13.33%') equals #ef444422 and
|
|
27050
|
+
// tint('rgb(34,197,94)', '10%') equals rgba(34,197,94,0.10).
|
|
27051
|
+
function tint(color, percent) {
|
|
27052
|
+
return 'color-mix(in srgb, ' + color + ' ' + percent + ', transparent)';
|
|
27053
|
+
}
|
|
26905
27054
|
|
|
26906
27055
|
function esc(s) {
|
|
26907
27056
|
return String(s == null ? '' : s)
|
|
@@ -26936,7 +27085,7 @@ var SWARM_UI_JS = `
|
|
|
26936
27085
|
'<span class="swarm-diff-annot no-print" '
|
|
26937
27086
|
+ 'style="display:inline-block;margin-left:8px;padding:1px 6px;'
|
|
26938
27087
|
+ 'border-radius:4px;font-size:11px;font-weight:600;'
|
|
26939
|
-
+ 'background:' + color + '
|
|
27088
|
+
+ 'background:' + tint(color, '13.33%') + ';color:' + color + ';border:1px solid ' + tint(color, '33.33%') + ';">'
|
|
26940
27089
|
+ esc((ann && ann.severity ? ann.severity.toUpperCase() : 'INFO')) + ' · ' + esc(ann && ann.text || '')
|
|
26941
27090
|
+ '</span>'
|
|
26942
27091
|
);
|
|
@@ -26968,12 +27117,12 @@ var SWARM_UI_JS = `
|
|
|
26968
27117
|
var text = line.text == null ? '' : line.text;
|
|
26969
27118
|
var bg, oldCell, newCell, sign;
|
|
26970
27119
|
if (type === 'add') {
|
|
26971
|
-
bg = '
|
|
27120
|
+
bg = tint('var(--color-status-success, rgb(34,197,94))', '10%');
|
|
26972
27121
|
oldCell = '';
|
|
26973
27122
|
newCell = String(newN++);
|
|
26974
27123
|
sign = '+';
|
|
26975
27124
|
} else if (type === 'del') {
|
|
26976
|
-
bg = '
|
|
27125
|
+
bg = tint('var(--color-status-error, rgb(239,68,68))', '10%');
|
|
26977
27126
|
oldCell = String(oldN++);
|
|
26978
27127
|
newCell = '';
|
|
26979
27128
|
sign = '-';
|
|
@@ -26985,15 +27134,17 @@ var SWARM_UI_JS = `
|
|
|
26985
27134
|
}
|
|
26986
27135
|
|
|
26987
27136
|
var annHtml = '';
|
|
26988
|
-
|
|
27137
|
+
// Annotations name new-side lines. A deleted row has no new-side
|
|
27138
|
+
// number, so only a deleted row matches on its old-side number.
|
|
27139
|
+
var anns = annByLine[Number(type === 'del' ? oldCell : newCell)] || [];
|
|
26989
27140
|
for (var k = 0; k < anns.length; k++) annHtml += renderAnnotation(anns[k]);
|
|
26990
27141
|
|
|
26991
27142
|
rowsHtml += (
|
|
26992
27143
|
'<tr style="background:' + bg + ';">'
|
|
26993
|
-
+ '<td class="swarm-diff-gutter" style="user-select:none;text-align:right;padding:0 8px;color
|
|
26994
|
-
+ '<td class="swarm-diff-gutter" style="user-select:none;text-align:right;padding:0 8px;color
|
|
26995
|
-
+ '<td class="swarm-diff-sign" style="user-select:none;text-align:center;padding:0 4px;color
|
|
26996
|
-
+ '<td class="swarm-diff-code" style="padding:0 8px;white-space:pre-wrap;word-break:break-word;font-family
|
|
27144
|
+
+ '<td class="swarm-diff-gutter" style="user-select:none;text-align:right;padding:0 8px;color:' + MUTED + ';font-size:12px;width:48px;">' + esc(oldCell) + '</td>'
|
|
27145
|
+
+ '<td class="swarm-diff-gutter" style="user-select:none;text-align:right;padding:0 8px;color:' + MUTED + ';font-size:12px;width:48px;">' + esc(newCell) + '</td>'
|
|
27146
|
+
+ '<td class="swarm-diff-sign" style="user-select:none;text-align:center;padding:0 4px;color:' + MUTED + ';font-size:12px;width:18px;">' + esc(sign) + '</td>'
|
|
27147
|
+
+ '<td class="swarm-diff-code" style="padding:0 8px;white-space:pre-wrap;word-break:break-word;font-family:' + MONO + ';font-size:12px;">' + esc(text) + annHtml + '</td>'
|
|
26997
27148
|
+ '</tr>'
|
|
26998
27149
|
);
|
|
26999
27150
|
}
|
|
@@ -27005,8 +27156,8 @@ var SWARM_UI_JS = `
|
|
|
27005
27156
|
);
|
|
27006
27157
|
|
|
27007
27158
|
return (
|
|
27008
|
-
'<a id="' + esc(anchorId) + '" class="swarm-diff-anchor" data-hunk="' + esc(anchorSlug) + '"></a>'
|
|
27009
|
-
+ '<div class="swarm-diff-hunk-header" style="padding:6px 12px;background:
|
|
27159
|
+
'<a id="' + esc(anchorId) + '" class="swarm-diff-anchor" data-hunk="' + esc(anchorSlug) + '" data-new-start="' + esc(newStart) + '"></a>'
|
|
27160
|
+
+ '<div class="swarm-diff-hunk-header" style="padding:6px 12px;background:' + tint('var(--color-muted-foreground, rgb(124,138,166))', '10%') + ';color:' + MUTED + ';font-family:' + MONO + ';font-size:11px;border-top:1px solid var(--swarm-border,#22304a);">'
|
|
27010
27161
|
+ esc(header)
|
|
27011
27162
|
+ '</div>'
|
|
27012
27163
|
+ '<table class="swarm-diff-table" style="width:100%;border-collapse:collapse;table-layout:fixed;">'
|
|
@@ -27023,7 +27174,7 @@ var SWARM_UI_JS = `
|
|
|
27023
27174
|
|
|
27024
27175
|
var shaLine = '';
|
|
27025
27176
|
if (baseSha || headSha) {
|
|
27026
|
-
shaLine = '<span class="swarm-diff-sha" style="font-family
|
|
27177
|
+
shaLine = '<span class="swarm-diff-sha" style="font-family:' + MONO + ';font-size:11px;color:' + MUTED + ';">'
|
|
27027
27178
|
+ esc(baseSha) + ' → ' + esc(headSha)
|
|
27028
27179
|
+ '</span>';
|
|
27029
27180
|
}
|
|
@@ -27035,8 +27186,8 @@ var SWARM_UI_JS = `
|
|
|
27035
27186
|
|
|
27036
27187
|
rootEl.innerHTML = (
|
|
27037
27188
|
'<div class="swarm-diff-root" style="border:1px solid var(--swarm-border,#22304a);border-radius:8px;background:var(--swarm-card,#121826);overflow:hidden;margin:12px 0;break-inside:avoid;">'
|
|
27038
|
-
+ '<div class="swarm-diff-header" style="display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:rgba(59,130,246,0.10);border-bottom:1px solid var(--swarm-border,#22304a);">'
|
|
27039
|
-
+ '<span class="swarm-diff-file" style="font-family
|
|
27189
|
+
+ '<div class="swarm-diff-header" style="display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:var(--color-surface, rgba(59,130,246,0.10));border-bottom:1px solid var(--swarm-border,#22304a);">'
|
|
27190
|
+
+ '<span class="swarm-diff-file" style="font-family:' + MONO + ';font-size:13px;font-weight:700;color:var(--swarm-text,#e6eaf2);">' + esc(file || '(untitled)') + '</span>'
|
|
27040
27191
|
+ shaLine
|
|
27041
27192
|
+ '</div>'
|
|
27042
27193
|
+ hunksHtml
|
|
@@ -27100,21 +27251,34 @@ var SWARM_UI_JS = `
|
|
|
27100
27251
|
var renderJumps = function() {
|
|
27101
27252
|
var anchors = document.querySelectorAll('.swarm-diff-anchor[data-hunk]');
|
|
27102
27253
|
if (!anchors.length) {
|
|
27103
|
-
self.innerHTML = '<span class="no-print" style="color
|
|
27254
|
+
self.innerHTML = '<span class="no-print" style="color:' + MUTED + ';font-size:12px;">No hunks yet.</span>';
|
|
27104
27255
|
return;
|
|
27105
27256
|
}
|
|
27106
|
-
var
|
|
27257
|
+
var labels = [];
|
|
27258
|
+
var fileCounts = new Map();
|
|
27107
27259
|
for (var i = 0; i < anchors.length; i++) {
|
|
27108
27260
|
var a = anchors[i];
|
|
27109
27261
|
var slug = a.getAttribute('data-hunk') || ('hunk-' + i);
|
|
27110
27262
|
// Hunk title = nearest preceding diff's file attribute if available.
|
|
27111
27263
|
var diff = a.closest && a.closest('swarm-diff');
|
|
27112
27264
|
var file = (diff && diff.getAttribute('file')) || slug;
|
|
27113
|
-
|
|
27265
|
+
labels.push(file);
|
|
27266
|
+
fileCounts.set(file, (fileCounts.get(file) || 0) + 1);
|
|
27267
|
+
}
|
|
27268
|
+
var items = '';
|
|
27269
|
+
for (var n = 0; n < anchors.length; n++) {
|
|
27270
|
+
// A file with more than one hunk gets each hunk's new-side start
|
|
27271
|
+
// line (src/x.ts:58), so its links differ.
|
|
27272
|
+
var label = labels[n];
|
|
27273
|
+
var newStart = anchors[n].getAttribute('data-new-start');
|
|
27274
|
+
if (fileCounts.get(label) > 1 && newStart) label += ':' + newStart;
|
|
27275
|
+
// target=_self: the page head sets <base target="_blank">, which would
|
|
27276
|
+
// open these in-page anchors in a new tab.
|
|
27277
|
+
items += '<li style="margin:0;padding:2px 0;"><a href="#' + esc(anchors[n].id) + '" target="_self" style="color:var(--color-primary, #3b82f6);text-decoration:none;font-family:' + MONO + ';font-size:12px;">' + esc(label) + '</a></li>';
|
|
27114
27278
|
}
|
|
27115
27279
|
self.innerHTML = (
|
|
27116
|
-
'<nav class="swarm-diff-jumps no-print" style="padding:8px 12px;border:1px dashed var(--swarm-border,#22304a);border-radius:8px;background:
|
|
27117
|
-
+ '<div style="font-size:10px;text-transform:uppercase;letter-spacing:0.08em;color
|
|
27280
|
+
'<nav class="swarm-diff-jumps no-print" style="padding:8px 12px;border:1px dashed var(--swarm-border,#22304a);border-radius:8px;background:' + tint('var(--color-muted-foreground, rgb(124,138,166))', '5%') + ';">'
|
|
27281
|
+
+ '<div style="font-size:10px;text-transform:uppercase;letter-spacing:0.08em;color:' + MUTED + ';margin-bottom:4px;">Jump to</div>'
|
|
27118
27282
|
+ '<ul style="list-style:none;padding:0;margin:0;">' + items + '</ul>'
|
|
27119
27283
|
+ '</nav>'
|
|
27120
27284
|
);
|
|
@@ -27380,6 +27544,9 @@ var SWARM_UI_JS = `
|
|
|
27380
27544
|
})();
|
|
27381
27545
|
`;
|
|
27382
27546
|
|
|
27547
|
+
// src/http/pages-public.ts
|
|
27548
|
+
init_color_literals();
|
|
27549
|
+
|
|
27383
27550
|
// src/pages/feedback-overlay.ts
|
|
27384
27551
|
var PAGE_FEEDBACK_PARAM = "__swarm-feedback";
|
|
27385
27552
|
function isPageFeedbackRequested(queryParams) {
|
|
@@ -27928,58 +28095,82 @@ function feedbackKeyGuardScript() {
|
|
|
27928
28095
|
return `<script>${FEEDBACK_KEY_GUARD_JS}</script>`;
|
|
27929
28096
|
}
|
|
27930
28097
|
|
|
27931
|
-
// src/
|
|
27932
|
-
|
|
27933
|
-
|
|
27934
|
-
|
|
27935
|
-
|
|
27936
|
-
|
|
27937
|
-
|
|
27938
|
-
|
|
27939
|
-
|
|
27940
|
-
|
|
27941
|
-
|
|
27942
|
-
|
|
27943
|
-
|
|
27944
|
-
|
|
27945
|
-
|
|
27946
|
-
|
|
27947
|
-
|
|
27948
|
-
|
|
27949
|
-
|
|
27950
|
-
|
|
27951
|
-
|
|
27952
|
-
|
|
27953
|
-
|
|
27954
|
-
|
|
27955
|
-
|
|
27956
|
-
|
|
27957
|
-
|
|
27958
|
-
|
|
27959
|
-
|
|
27960
|
-
|
|
27961
|
-
|
|
27962
|
-
|
|
27963
|
-
|
|
27964
|
-
|
|
27965
|
-
|
|
27966
|
-
}
|
|
27967
|
-
|
|
27968
|
-
|
|
27969
|
-
|
|
27970
|
-
|
|
27971
|
-
|
|
27972
|
-
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27976
|
-
|
|
27977
|
-
|
|
27978
|
-
|
|
27979
|
-
}
|
|
27980
|
-
|
|
27981
|
-
|
|
27982
|
-
|
|
28098
|
+
// src/themes/page-theme.ts
|
|
28099
|
+
init_presets();
|
|
28100
|
+
init_tokens2();
|
|
28101
|
+
var SWARM_ALIASES = [
|
|
28102
|
+
["--swarm-bg", "--color-background"],
|
|
28103
|
+
["--swarm-card", "--color-card"],
|
|
28104
|
+
["--swarm-border", "--color-border"],
|
|
28105
|
+
["--swarm-text", "--color-foreground"],
|
|
28106
|
+
["--swarm-muted", "--color-muted-foreground"],
|
|
28107
|
+
["--swarm-primary", "--color-primary"]
|
|
28108
|
+
];
|
|
28109
|
+
function contractValues(vars) {
|
|
28110
|
+
const values = {};
|
|
28111
|
+
if (!vars)
|
|
28112
|
+
return values;
|
|
28113
|
+
for (const token of PAGE_THEME_TOKENS) {
|
|
28114
|
+
const value = vars[token];
|
|
28115
|
+
if (value !== undefined)
|
|
28116
|
+
values[token] = value;
|
|
28117
|
+
}
|
|
28118
|
+
return values;
|
|
28119
|
+
}
|
|
28120
|
+
function resolvePageTheme({
|
|
28121
|
+
pageTheme,
|
|
28122
|
+
viewerTheme,
|
|
28123
|
+
overrides
|
|
28124
|
+
}) {
|
|
28125
|
+
const preset = getThemePreset(pageTheme) ?? getThemePreset(viewerTheme) ?? getThemePreset(DEFAULT_THEME_ID);
|
|
28126
|
+
const lightOverrides = contractValues(overrides?.light);
|
|
28127
|
+
const darkOverrides = contractValues(overrides?.dark);
|
|
28128
|
+
const light = {
|
|
28129
|
+
...HIVE_PAGE_TOKENS.light,
|
|
28130
|
+
...contractValues(preset?.vars.light),
|
|
28131
|
+
...lightOverrides
|
|
28132
|
+
};
|
|
28133
|
+
const dark = { ...HIVE_PAGE_TOKENS.dark, ...contractValues(preset?.vars.dark), ...darkOverrides };
|
|
28134
|
+
for (const token of PAGE_THEME_SHARED_TOKENS) {
|
|
28135
|
+
const value = lightOverrides[token];
|
|
28136
|
+
if (value !== undefined && darkOverrides[token] === undefined)
|
|
28137
|
+
dark[token] = value;
|
|
28138
|
+
}
|
|
28139
|
+
return { presetId: preset?.id ?? DEFAULT_THEME_ID, light, dark };
|
|
28140
|
+
}
|
|
28141
|
+
function declarationLines(values, indent) {
|
|
28142
|
+
return PAGE_THEME_TOKENS.map((token) => `${indent}${token}: ${values[token]};`).join(`
|
|
28143
|
+
`);
|
|
28144
|
+
}
|
|
28145
|
+
function renderPageThemeCss(theme) {
|
|
28146
|
+
const aliases = SWARM_ALIASES.map(([alias, token]) => ` ${alias}: var(${token});`).join(`
|
|
28147
|
+
`);
|
|
28148
|
+
return [
|
|
28149
|
+
`:root {
|
|
28150
|
+
color-scheme: light;
|
|
28151
|
+
${declarationLines(theme.light, " ")}
|
|
28152
|
+
${aliases}
|
|
28153
|
+
}`,
|
|
28154
|
+
`:root.dark {
|
|
28155
|
+
color-scheme: dark;
|
|
28156
|
+
${declarationLines(theme.dark, " ")}
|
|
28157
|
+
}`,
|
|
28158
|
+
`@media print {
|
|
28159
|
+
:root.dark {
|
|
28160
|
+
color-scheme: light;
|
|
28161
|
+
${declarationLines(theme.light, " ")}
|
|
28162
|
+
}
|
|
28163
|
+
}`
|
|
28164
|
+
].join(`
|
|
28165
|
+
|
|
28166
|
+
`);
|
|
28167
|
+
}
|
|
28168
|
+
|
|
28169
|
+
// src/pages/page-head.ts
|
|
28170
|
+
init_tokens2();
|
|
28171
|
+
var PAGE_THEME_PARAM = "__swarm-theme";
|
|
28172
|
+
var PAGE_MODE_PARAM = "__swarm-mode";
|
|
28173
|
+
var PAGE_HEAD_V1 = `<base target="_blank">
|
|
27983
28174
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
27984
28175
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
27985
28176
|
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
|
|
@@ -28035,14 +28226,689 @@ var PAGE_HEAD_DEFAULTS = `<base target="_blank">
|
|
|
28035
28226
|
.swarm-card, swarm-diff { break-inside: avoid; }
|
|
28036
28227
|
}
|
|
28037
28228
|
</style>`;
|
|
28038
|
-
|
|
28039
|
-
|
|
28040
|
-
|
|
28041
|
-
|
|
28042
|
-
|
|
28043
|
-
|
|
28229
|
+
var TAILWIND_BROWSER_SRC = "https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.3.3/dist/index.global.js";
|
|
28230
|
+
var TAILWIND_BROWSER_INTEGRITY = "sha384-2ql948lIdLcGEE0/qxNiudyTjgauA3RDJERu5xW75kFCvSl5a9odyQYCb6tEjnmB";
|
|
28231
|
+
var IN_PAGE_LINK_SCRIPT = `<script>document.addEventListener("click", function (event) {
|
|
28232
|
+
var link = event.target && event.target.closest && event.target.closest('a[href^="#"]:not([target])');
|
|
28233
|
+
if (link) link.setAttribute("target", "_self");
|
|
28234
|
+
}, true);</script>`;
|
|
28235
|
+
var FONT_LINKS = `<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
28236
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
28237
|
+
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">`;
|
|
28238
|
+
var TAILWIND_SOURCE = [
|
|
28239
|
+
'@import "tailwindcss/theme" layer(theme);',
|
|
28240
|
+
'@import "tailwindcss/utilities" layer(utilities);',
|
|
28241
|
+
"@custom-variant dark (&:where(.dark, .dark *));",
|
|
28242
|
+
"@theme inline reference {",
|
|
28243
|
+
...PAGE_THEME_TOKENS.map((token) => ` ${token}: var(${token});`),
|
|
28244
|
+
"}"
|
|
28245
|
+
].join(`
|
|
28246
|
+
`);
|
|
28247
|
+
var TAILWIND_SOURCE_SCRIPT = `<script>(function () {
|
|
28248
|
+
var style = document.createElement("style");
|
|
28249
|
+
style.type = "text/tailwindcss";
|
|
28250
|
+
style.textContent = ${JSON.stringify(TAILWIND_SOURCE).replace(/</g, "\\u003c")};
|
|
28251
|
+
document.head.appendChild(style);
|
|
28252
|
+
})();</script>`;
|
|
28253
|
+
var CONTROL_LOOK = `min-width: 0;
|
|
28254
|
+
padding: 7px 12px;
|
|
28255
|
+
font-size: 14px;
|
|
28256
|
+
line-height: 20px;
|
|
28257
|
+
color: var(--color-foreground);
|
|
28258
|
+
background-color: var(--color-card);
|
|
28259
|
+
border: 1px solid var(--color-input);
|
|
28260
|
+
border-radius: var(--radius-md);
|
|
28261
|
+
transition: border-color 150ms, box-shadow 150ms;`;
|
|
28262
|
+
var BUTTON_LOOK = `display: inline-flex;
|
|
28263
|
+
align-items: center;
|
|
28264
|
+
justify-content: center;
|
|
28265
|
+
gap: 8px;
|
|
28266
|
+
padding: 7px 14px;
|
|
28267
|
+
font-size: 14px;
|
|
28268
|
+
font-weight: 500;
|
|
28269
|
+
line-height: 20px;
|
|
28270
|
+
color: var(--color-foreground);
|
|
28271
|
+
background-color: var(--color-card);
|
|
28272
|
+
border: 1px solid var(--color-input);
|
|
28273
|
+
border-radius: var(--radius-md);
|
|
28274
|
+
text-decoration: none;
|
|
28275
|
+
white-space: nowrap;
|
|
28276
|
+
cursor: pointer;
|
|
28277
|
+
transition: color 150ms, background-color 150ms, border-color 150ms, box-shadow 150ms;`;
|
|
28278
|
+
var FOCUS_RING = `outline: none;
|
|
28279
|
+
border-color: var(--color-ring);
|
|
28280
|
+
box-shadow: 0 0 0 2px color-mix(in oklab, var(--color-ring) 60%, transparent);`;
|
|
28281
|
+
var TEXT_CONTROLS = `:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="hidden"]), select, textarea)`;
|
|
28282
|
+
var BUTTON_CONTROLS = `:where(button, input[type="button"], input[type="submit"], input[type="reset"])`;
|
|
28283
|
+
var EDGE_SHADOW = "color-mix(in oklab, var(--color-foreground) 14%, transparent)";
|
|
28284
|
+
var TONES = [
|
|
28285
|
+
["neutral", "--color-status-neutral", "--color-status-neutral-strong"],
|
|
28286
|
+
["primary", "--color-primary", "--color-primary"],
|
|
28287
|
+
...["success", "warning", "error", "info", "pending", "paused", "active"].map((tone) => [tone, `--color-status-${tone}`, `--color-status-${tone}-strong`])
|
|
28288
|
+
];
|
|
28289
|
+
var TONE_RULES = TONES.map(([tone, soft, strong]) => ` :is(.swarm-badge, .swarm-callout, .swarm-metric)[data-tone="${tone}"] {
|
|
28290
|
+
--swarm-tone: var(${soft});
|
|
28291
|
+
--swarm-tone-strong: var(${strong});
|
|
28292
|
+
}`).join(`
|
|
28293
|
+
`);
|
|
28294
|
+
var PAGE_DESIGN_CSS = `@layer base {
|
|
28295
|
+
*, ::before, ::after, ::backdrop, ::file-selector-button {
|
|
28296
|
+
box-sizing: border-box;
|
|
28297
|
+
border: 0 solid var(--color-border);
|
|
28044
28298
|
}
|
|
28045
|
-
|
|
28299
|
+
html {
|
|
28300
|
+
color: var(--color-foreground);
|
|
28301
|
+
-webkit-text-size-adjust: 100%;
|
|
28302
|
+
text-size-adjust: 100%;
|
|
28303
|
+
tab-size: 4;
|
|
28304
|
+
}
|
|
28305
|
+
body {
|
|
28306
|
+
margin: 0;
|
|
28307
|
+
padding: 24px;
|
|
28308
|
+
background-color: var(--color-background);
|
|
28309
|
+
color: var(--color-foreground);
|
|
28310
|
+
font-family: var(--font-sans), ui-sans-serif, system-ui, sans-serif;
|
|
28311
|
+
font-size: 15px;
|
|
28312
|
+
line-height: 1.55;
|
|
28313
|
+
-webkit-font-smoothing: antialiased;
|
|
28314
|
+
-moz-osx-font-smoothing: grayscale;
|
|
28315
|
+
}
|
|
28316
|
+
@media (max-width: 640px) {
|
|
28317
|
+
body { padding: 16px; }
|
|
28318
|
+
}
|
|
28319
|
+
:focus-visible {
|
|
28320
|
+
outline: 2px solid var(--color-ring);
|
|
28321
|
+
outline-offset: 2px;
|
|
28322
|
+
}
|
|
28323
|
+
h1, h2, h3, h4, h5, h6 {
|
|
28324
|
+
margin: 0;
|
|
28325
|
+
font-weight: 600;
|
|
28326
|
+
text-wrap: balance;
|
|
28327
|
+
}
|
|
28328
|
+
h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; }
|
|
28329
|
+
h2 { margin: 40px 0 12px; font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; }
|
|
28330
|
+
h3 { margin: 28px 0 8px; font-size: 16px; line-height: 1.4; letter-spacing: -0.01em; }
|
|
28331
|
+
h4 { margin: 24px 0 6px; font-size: 15px; line-height: 1.45; }
|
|
28332
|
+
h5, h6 { margin: 20px 0 6px; font-size: 13px; line-height: 1.45; }
|
|
28333
|
+
p { margin: 0 0 12px; text-wrap: pretty; }
|
|
28334
|
+
ul, ol { margin: 0 0 12px; padding-left: 1.5em; }
|
|
28335
|
+
li { margin: 4px 0; }
|
|
28336
|
+
li > ul, li > ol { margin: 4px 0 0; }
|
|
28337
|
+
li::marker { color: var(--color-muted-foreground); }
|
|
28338
|
+
dl, figure, blockquote, pre, table, details, fieldset, form { margin: 0 0 16px; }
|
|
28339
|
+
dt { font-weight: 500; }
|
|
28340
|
+
dd { margin: 0 0 8px; }
|
|
28341
|
+
:where(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
|
|
28342
|
+
:where(p, ul, ol, dl, dd, figure, blockquote, pre, table, details, fieldset, form):last-child { margin-bottom: 0; }
|
|
28343
|
+
a {
|
|
28344
|
+
color: var(--color-primary);
|
|
28345
|
+
text-decoration-line: underline;
|
|
28346
|
+
text-decoration-thickness: 1px;
|
|
28347
|
+
text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
|
|
28348
|
+
text-underline-offset: 3px;
|
|
28349
|
+
}
|
|
28350
|
+
a:hover { text-decoration-color: currentColor; }
|
|
28351
|
+
hr {
|
|
28352
|
+
height: 0;
|
|
28353
|
+
margin: 32px 0;
|
|
28354
|
+
color: inherit;
|
|
28355
|
+
border-top: 1px solid var(--color-border-subtle);
|
|
28356
|
+
}
|
|
28357
|
+
b, strong { font-weight: 600; }
|
|
28358
|
+
mark {
|
|
28359
|
+
padding: 0 2px;
|
|
28360
|
+
color: inherit;
|
|
28361
|
+
background-color: color-mix(in oklab, var(--color-status-pending) 35%, transparent);
|
|
28362
|
+
border-radius: 2px;
|
|
28363
|
+
}
|
|
28364
|
+
code, kbd, samp, pre {
|
|
28365
|
+
font-family: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
28366
|
+
font-size: 0.85em;
|
|
28367
|
+
}
|
|
28368
|
+
code {
|
|
28369
|
+
padding: 0.1em 0.35em;
|
|
28370
|
+
background-color: var(--color-muted);
|
|
28371
|
+
border-radius: var(--radius-sm);
|
|
28372
|
+
-webkit-box-decoration-break: clone;
|
|
28373
|
+
box-decoration-break: clone;
|
|
28374
|
+
}
|
|
28375
|
+
kbd {
|
|
28376
|
+
padding: 0.05em 0.4em;
|
|
28377
|
+
background-color: var(--color-card);
|
|
28378
|
+
border: 1px solid var(--color-border);
|
|
28379
|
+
border-bottom-width: 2px;
|
|
28380
|
+
border-radius: var(--radius-sm);
|
|
28381
|
+
}
|
|
28382
|
+
pre {
|
|
28383
|
+
padding: 12px 14px;
|
|
28384
|
+
overflow: auto;
|
|
28385
|
+
line-height: 1.6;
|
|
28386
|
+
background-color: var(--color-surface);
|
|
28387
|
+
border: 1px solid var(--color-border);
|
|
28388
|
+
border-radius: var(--radius-lg);
|
|
28389
|
+
}
|
|
28390
|
+
pre code {
|
|
28391
|
+
padding: 0;
|
|
28392
|
+
font-size: inherit;
|
|
28393
|
+
background-color: transparent;
|
|
28394
|
+
border-radius: 0;
|
|
28395
|
+
}
|
|
28396
|
+
blockquote {
|
|
28397
|
+
padding: 2px 0 2px 16px;
|
|
28398
|
+
color: var(--color-muted-foreground);
|
|
28399
|
+
border-left: 2px solid var(--color-border);
|
|
28400
|
+
}
|
|
28401
|
+
summary {
|
|
28402
|
+
cursor: pointer;
|
|
28403
|
+
font-weight: 500;
|
|
28404
|
+
}
|
|
28405
|
+
summary::marker { color: var(--color-muted-foreground); }
|
|
28406
|
+
details[open] > summary { margin-bottom: 8px; }
|
|
28407
|
+
img, video {
|
|
28408
|
+
display: block;
|
|
28409
|
+
max-width: 100%;
|
|
28410
|
+
height: auto;
|
|
28411
|
+
}
|
|
28412
|
+
figcaption {
|
|
28413
|
+
margin-top: 8px;
|
|
28414
|
+
font-size: 13px;
|
|
28415
|
+
color: var(--color-muted-foreground);
|
|
28416
|
+
}
|
|
28417
|
+
table {
|
|
28418
|
+
width: 100%;
|
|
28419
|
+
border-collapse: collapse;
|
|
28420
|
+
font-size: 14px;
|
|
28421
|
+
font-variant-numeric: tabular-nums;
|
|
28422
|
+
}
|
|
28423
|
+
caption {
|
|
28424
|
+
padding-bottom: 8px;
|
|
28425
|
+
font-size: 13px;
|
|
28426
|
+
text-align: left;
|
|
28427
|
+
color: var(--color-muted-foreground);
|
|
28428
|
+
}
|
|
28429
|
+
th, td {
|
|
28430
|
+
padding: 8px 12px;
|
|
28431
|
+
text-align: left;
|
|
28432
|
+
vertical-align: middle;
|
|
28433
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
28434
|
+
}
|
|
28435
|
+
th {
|
|
28436
|
+
font-size: 11px;
|
|
28437
|
+
font-weight: 500;
|
|
28438
|
+
line-height: 1.45;
|
|
28439
|
+
letter-spacing: 0.05em;
|
|
28440
|
+
text-transform: uppercase;
|
|
28441
|
+
vertical-align: bottom;
|
|
28442
|
+
color: var(--color-muted-foreground);
|
|
28443
|
+
border-bottom-color: var(--color-border);
|
|
28444
|
+
}
|
|
28445
|
+
th[scope="row"] {
|
|
28446
|
+
font-size: inherit;
|
|
28447
|
+
letter-spacing: normal;
|
|
28448
|
+
text-transform: none;
|
|
28449
|
+
vertical-align: middle;
|
|
28450
|
+
color: inherit;
|
|
28451
|
+
border-bottom-color: var(--color-border-subtle);
|
|
28452
|
+
}
|
|
28453
|
+
tfoot :is(td, th) {
|
|
28454
|
+
font-weight: 600;
|
|
28455
|
+
border-top: 1px solid var(--color-border);
|
|
28456
|
+
}
|
|
28457
|
+
tbody:has(+ tfoot) > tr:last-child > :is(td, th) { border-bottom-color: var(--color-border); }
|
|
28458
|
+
:where(button, input, optgroup, select, textarea), ::file-selector-button {
|
|
28459
|
+
font: inherit;
|
|
28460
|
+
font-feature-settings: inherit;
|
|
28461
|
+
font-variation-settings: inherit;
|
|
28462
|
+
letter-spacing: inherit;
|
|
28463
|
+
color: inherit;
|
|
28464
|
+
}
|
|
28465
|
+
${TEXT_CONTROLS} {
|
|
28466
|
+
${CONTROL_LOOK}
|
|
28467
|
+
}
|
|
28468
|
+
${TEXT_CONTROLS}:focus-visible {
|
|
28469
|
+
${FOCUS_RING}
|
|
28470
|
+
}
|
|
28471
|
+
:where(input, select, textarea)::placeholder {
|
|
28472
|
+
color: var(--color-muted-foreground);
|
|
28473
|
+
opacity: 1;
|
|
28474
|
+
}
|
|
28475
|
+
:where(input, select, textarea, button):disabled {
|
|
28476
|
+
cursor: not-allowed;
|
|
28477
|
+
opacity: 0.5;
|
|
28478
|
+
}
|
|
28479
|
+
:where(input, select, textarea)[aria-invalid="true"] { border-color: var(--color-destructive); }
|
|
28480
|
+
textarea {
|
|
28481
|
+
min-height: 80px;
|
|
28482
|
+
line-height: 1.5;
|
|
28483
|
+
resize: vertical;
|
|
28484
|
+
}
|
|
28485
|
+
select:not([multiple], [size]) {
|
|
28486
|
+
appearance: none;
|
|
28487
|
+
padding-right: 32px;
|
|
28488
|
+
background-image:
|
|
28489
|
+
linear-gradient(45deg, transparent 50%, var(--color-muted-foreground) 50%),
|
|
28490
|
+
linear-gradient(135deg, var(--color-muted-foreground) 50%, transparent 50%);
|
|
28491
|
+
background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
|
|
28492
|
+
background-size: 5px 5px;
|
|
28493
|
+
background-repeat: no-repeat;
|
|
28494
|
+
}
|
|
28495
|
+
${BUTTON_CONTROLS} {
|
|
28496
|
+
${BUTTON_LOOK}
|
|
28497
|
+
}
|
|
28498
|
+
${BUTTON_CONTROLS}:hover:not(:disabled) {
|
|
28499
|
+
color: var(--color-accent-foreground);
|
|
28500
|
+
background-color: var(--color-accent);
|
|
28501
|
+
}
|
|
28502
|
+
${BUTTON_CONTROLS}:focus-visible {
|
|
28503
|
+
${FOCUS_RING}
|
|
28504
|
+
}
|
|
28505
|
+
::file-selector-button {
|
|
28506
|
+
margin-right: 12px;
|
|
28507
|
+
padding: 4px 10px;
|
|
28508
|
+
font-size: 13px;
|
|
28509
|
+
font-weight: 500;
|
|
28510
|
+
color: var(--color-foreground);
|
|
28511
|
+
background-color: var(--color-card);
|
|
28512
|
+
border: 1px solid var(--color-input);
|
|
28513
|
+
border-radius: var(--radius-sm);
|
|
28514
|
+
cursor: pointer;
|
|
28515
|
+
}
|
|
28516
|
+
input[type="checkbox"], input[type="radio"], input[type="range"], progress {
|
|
28517
|
+
accent-color: var(--color-primary);
|
|
28518
|
+
}
|
|
28519
|
+
fieldset {
|
|
28520
|
+
min-width: 0;
|
|
28521
|
+
padding: 12px 16px 16px;
|
|
28522
|
+
border: 1px solid var(--color-border);
|
|
28523
|
+
border-radius: var(--radius-lg);
|
|
28524
|
+
}
|
|
28525
|
+
legend {
|
|
28526
|
+
padding: 0 6px;
|
|
28527
|
+
font-size: 13px;
|
|
28528
|
+
font-weight: 500;
|
|
28529
|
+
color: var(--color-muted-foreground);
|
|
28530
|
+
}
|
|
28531
|
+
label:has(input, select, textarea), label[for] { cursor: pointer; }
|
|
28532
|
+
::selection {
|
|
28533
|
+
color: var(--color-primary-foreground);
|
|
28534
|
+
background-color: var(--color-primary);
|
|
28535
|
+
}
|
|
28536
|
+
}
|
|
28537
|
+
|
|
28538
|
+
@layer components {
|
|
28539
|
+
.swarm-page {
|
|
28540
|
+
max-width: 1120px;
|
|
28541
|
+
margin-inline: auto;
|
|
28542
|
+
padding-block: 8px 24px;
|
|
28543
|
+
}
|
|
28544
|
+
.swarm-eyebrow {
|
|
28545
|
+
margin: 0 0 8px;
|
|
28546
|
+
font-size: 11px;
|
|
28547
|
+
font-weight: 500;
|
|
28548
|
+
line-height: 1.45;
|
|
28549
|
+
letter-spacing: 0.08em;
|
|
28550
|
+
text-transform: uppercase;
|
|
28551
|
+
color: var(--color-muted-foreground);
|
|
28552
|
+
}
|
|
28553
|
+
.swarm-lede {
|
|
28554
|
+
max-width: 68ch;
|
|
28555
|
+
margin: 0 0 16px;
|
|
28556
|
+
font-size: 17px;
|
|
28557
|
+
line-height: 1.55;
|
|
28558
|
+
color: var(--color-muted-foreground);
|
|
28559
|
+
text-wrap: pretty;
|
|
28560
|
+
}
|
|
28561
|
+
.swarm-section { margin-block: 40px; }
|
|
28562
|
+
.swarm-section:last-child { margin-bottom: 0; }
|
|
28563
|
+
.swarm-section > :first-child { margin-top: 0; }
|
|
28564
|
+
|
|
28565
|
+
.swarm-metrics {
|
|
28566
|
+
display: grid;
|
|
28567
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
|
|
28568
|
+
gap: 12px;
|
|
28569
|
+
margin: 24px 0;
|
|
28570
|
+
}
|
|
28571
|
+
.swarm-metric {
|
|
28572
|
+
display: flex;
|
|
28573
|
+
flex-direction: column;
|
|
28574
|
+
gap: 4px;
|
|
28575
|
+
min-width: 0;
|
|
28576
|
+
padding: 14px 16px;
|
|
28577
|
+
color: var(--color-card-foreground);
|
|
28578
|
+
background-color: var(--color-card);
|
|
28579
|
+
border: 1px solid var(--color-border);
|
|
28580
|
+
border-radius: var(--radius-xl);
|
|
28581
|
+
}
|
|
28582
|
+
.swarm-metric-value {
|
|
28583
|
+
font-size: 26px;
|
|
28584
|
+
font-weight: 600;
|
|
28585
|
+
line-height: 1.15;
|
|
28586
|
+
letter-spacing: -0.02em;
|
|
28587
|
+
font-variant-numeric: tabular-nums;
|
|
28588
|
+
overflow-wrap: anywhere;
|
|
28589
|
+
}
|
|
28590
|
+
.swarm-metric[data-tone] .swarm-metric-value { color: var(--swarm-tone-strong); }
|
|
28591
|
+
.swarm-metric-label {
|
|
28592
|
+
font-size: 12px;
|
|
28593
|
+
line-height: 1.45;
|
|
28594
|
+
color: var(--color-muted-foreground);
|
|
28595
|
+
}
|
|
28596
|
+
|
|
28597
|
+
.swarm-panel, .swarm-card {
|
|
28598
|
+
padding: 20px;
|
|
28599
|
+
color: var(--color-card-foreground);
|
|
28600
|
+
background-color: var(--color-card);
|
|
28601
|
+
border: 1px solid var(--color-border);
|
|
28602
|
+
border-radius: var(--radius-xl);
|
|
28603
|
+
}
|
|
28604
|
+
:is(.swarm-panel, .swarm-card) > :first-child { margin-top: 0; }
|
|
28605
|
+
:is(.swarm-panel, .swarm-card) > :last-child { margin-bottom: 0; }
|
|
28606
|
+
|
|
28607
|
+
.swarm-badge {
|
|
28608
|
+
--swarm-tone: var(--color-status-neutral);
|
|
28609
|
+
--swarm-tone-strong: var(--color-status-neutral-strong);
|
|
28610
|
+
display: inline-flex;
|
|
28611
|
+
align-items: center;
|
|
28612
|
+
gap: 6px;
|
|
28613
|
+
height: 22px;
|
|
28614
|
+
padding: 0 8px;
|
|
28615
|
+
font-size: 12px;
|
|
28616
|
+
font-weight: 500;
|
|
28617
|
+
line-height: 1;
|
|
28618
|
+
white-space: nowrap;
|
|
28619
|
+
vertical-align: middle;
|
|
28620
|
+
color: var(--swarm-tone-strong);
|
|
28621
|
+
background-color: color-mix(in oklab, var(--swarm-tone) 16%, transparent);
|
|
28622
|
+
border: 1px solid color-mix(in oklab, var(--swarm-tone) 28%, transparent);
|
|
28623
|
+
border-radius: 999px;
|
|
28624
|
+
}
|
|
28625
|
+
.swarm-badge[data-dot]::before {
|
|
28626
|
+
content: "";
|
|
28627
|
+
flex: none;
|
|
28628
|
+
width: 6px;
|
|
28629
|
+
height: 6px;
|
|
28630
|
+
background: var(--swarm-dot, currentColor);
|
|
28631
|
+
border-radius: 999px;
|
|
28632
|
+
}
|
|
28633
|
+
|
|
28634
|
+
.swarm-table-wrap {
|
|
28635
|
+
max-height: min(70vh, 720px);
|
|
28636
|
+
margin: 0 0 16px;
|
|
28637
|
+
overflow: auto;
|
|
28638
|
+
background:
|
|
28639
|
+
linear-gradient(to right, var(--color-card) 30%, transparent) left / 40px 100% no-repeat local,
|
|
28640
|
+
linear-gradient(to left, var(--color-card) 30%, transparent) right / 40px 100% no-repeat local,
|
|
28641
|
+
linear-gradient(to right, ${EDGE_SHADOW}, transparent) left / 14px 100% no-repeat scroll,
|
|
28642
|
+
linear-gradient(to left, ${EDGE_SHADOW}, transparent) right / 14px 100% no-repeat scroll,
|
|
28643
|
+
var(--color-card);
|
|
28644
|
+
border: 1px solid var(--color-border);
|
|
28645
|
+
border-radius: var(--radius-xl);
|
|
28646
|
+
}
|
|
28647
|
+
.swarm-table-wrap:last-child { margin-bottom: 0; }
|
|
28648
|
+
.swarm-table-wrap > table { margin: 0; }
|
|
28649
|
+
.swarm-table {
|
|
28650
|
+
width: 100%;
|
|
28651
|
+
border-collapse: separate;
|
|
28652
|
+
border-spacing: 0;
|
|
28653
|
+
font-size: 13px;
|
|
28654
|
+
line-height: 1.45;
|
|
28655
|
+
font-variant-numeric: tabular-nums;
|
|
28656
|
+
}
|
|
28657
|
+
.swarm-table :is(th, td) { padding: 8px 12px; }
|
|
28658
|
+
.swarm-table thead th {
|
|
28659
|
+
position: sticky;
|
|
28660
|
+
top: 0;
|
|
28661
|
+
z-index: 1;
|
|
28662
|
+
padding-block: 10px 8px;
|
|
28663
|
+
white-space: nowrap;
|
|
28664
|
+
background-color: var(--color-card);
|
|
28665
|
+
}
|
|
28666
|
+
.swarm-table tbody tr:hover > :is(td, th) { background-color: color-mix(in oklab, var(--color-accent) 70%, transparent); }
|
|
28667
|
+
.swarm-table-wrap > .swarm-table > :last-child > tr:last-child > :is(td, th) { border-bottom: 0; }
|
|
28668
|
+
:is(td, th).num {
|
|
28669
|
+
text-align: right;
|
|
28670
|
+
white-space: nowrap;
|
|
28671
|
+
font-variant-numeric: tabular-nums;
|
|
28672
|
+
}
|
|
28673
|
+
:is(td, th).nowrap { white-space: nowrap; }
|
|
28674
|
+
.swarm-diff-root :is(table, th, td) { margin: 0; border: 0; }
|
|
28675
|
+
|
|
28676
|
+
.swarm-button {
|
|
28677
|
+
${BUTTON_LOOK}
|
|
28678
|
+
}
|
|
28679
|
+
.swarm-button:hover {
|
|
28680
|
+
color: var(--color-accent-foreground);
|
|
28681
|
+
background-color: var(--color-accent);
|
|
28682
|
+
}
|
|
28683
|
+
.swarm-button[data-variant="primary"] {
|
|
28684
|
+
color: var(--color-primary-foreground);
|
|
28685
|
+
background-color: var(--color-primary);
|
|
28686
|
+
border-color: transparent;
|
|
28687
|
+
}
|
|
28688
|
+
.swarm-button[data-variant="primary"]:hover {
|
|
28689
|
+
color: var(--color-primary-foreground);
|
|
28690
|
+
background-color: color-mix(in oklab, var(--color-primary) 90%, transparent);
|
|
28691
|
+
}
|
|
28692
|
+
.swarm-button[data-variant="ghost"] {
|
|
28693
|
+
background-color: transparent;
|
|
28694
|
+
border-color: transparent;
|
|
28695
|
+
}
|
|
28696
|
+
.swarm-button[data-variant="ghost"]:hover { background-color: var(--color-accent); }
|
|
28697
|
+
.swarm-button:focus-visible {
|
|
28698
|
+
${FOCUS_RING}
|
|
28699
|
+
}
|
|
28700
|
+
.swarm-button:is(:disabled, [aria-disabled="true"]) {
|
|
28701
|
+
opacity: 0.5;
|
|
28702
|
+
pointer-events: none;
|
|
28703
|
+
}
|
|
28704
|
+
|
|
28705
|
+
.swarm-input {
|
|
28706
|
+
${CONTROL_LOOK}
|
|
28707
|
+
}
|
|
28708
|
+
.swarm-input:focus-visible {
|
|
28709
|
+
${FOCUS_RING}
|
|
28710
|
+
}
|
|
28711
|
+
select.swarm-input:not([multiple], [size]) { padding-right: 32px; }
|
|
28712
|
+
|
|
28713
|
+
.swarm-toolbar {
|
|
28714
|
+
display: flex;
|
|
28715
|
+
flex-wrap: wrap;
|
|
28716
|
+
align-items: center;
|
|
28717
|
+
gap: 8px;
|
|
28718
|
+
margin: 0 0 12px;
|
|
28719
|
+
}
|
|
28720
|
+
.swarm-toolbar > :is(input[type="search"], input[type="text"], input:not([type])) { flex: 1 1 260px; }
|
|
28721
|
+
|
|
28722
|
+
.swarm-segmented {
|
|
28723
|
+
display: inline-flex;
|
|
28724
|
+
align-items: center;
|
|
28725
|
+
gap: 2px;
|
|
28726
|
+
height: 36px;
|
|
28727
|
+
padding: 2px;
|
|
28728
|
+
vertical-align: middle;
|
|
28729
|
+
background-color: color-mix(in oklab, var(--color-muted) 40%, transparent);
|
|
28730
|
+
border: 1px solid var(--color-border);
|
|
28731
|
+
border-radius: var(--radius-md);
|
|
28732
|
+
}
|
|
28733
|
+
.swarm-segmented > :is(button, a) {
|
|
28734
|
+
display: inline-flex;
|
|
28735
|
+
align-items: center;
|
|
28736
|
+
justify-content: center;
|
|
28737
|
+
gap: 6px;
|
|
28738
|
+
height: 100%;
|
|
28739
|
+
padding: 0 12px;
|
|
28740
|
+
font-size: 12px;
|
|
28741
|
+
font-weight: 500;
|
|
28742
|
+
line-height: 1;
|
|
28743
|
+
white-space: nowrap;
|
|
28744
|
+
text-decoration: none;
|
|
28745
|
+
color: var(--color-muted-foreground);
|
|
28746
|
+
background-color: transparent;
|
|
28747
|
+
border: 0;
|
|
28748
|
+
border-radius: calc(var(--radius-md) - 3px);
|
|
28749
|
+
box-shadow: none;
|
|
28750
|
+
cursor: pointer;
|
|
28751
|
+
transition: color 150ms, background-color 150ms;
|
|
28752
|
+
}
|
|
28753
|
+
.swarm-segmented > :is(button, a):hover {
|
|
28754
|
+
color: var(--color-foreground);
|
|
28755
|
+
background-color: transparent;
|
|
28756
|
+
}
|
|
28757
|
+
.swarm-segmented > :is([aria-pressed="true"], [data-active]:not([data-active="false"])) {
|
|
28758
|
+
color: var(--color-primary-foreground);
|
|
28759
|
+
background-color: var(--color-primary);
|
|
28760
|
+
}
|
|
28761
|
+
.swarm-segmented > :is(button, a):focus-visible {
|
|
28762
|
+
outline: none;
|
|
28763
|
+
box-shadow: 0 0 0 2px color-mix(in oklab, var(--color-ring) 60%, transparent);
|
|
28764
|
+
}
|
|
28765
|
+
|
|
28766
|
+
.swarm-callout {
|
|
28767
|
+
--swarm-tone: var(--color-status-info);
|
|
28768
|
+
--swarm-tone-strong: var(--color-status-info-strong);
|
|
28769
|
+
margin: 0 0 12px;
|
|
28770
|
+
padding: 12px 16px;
|
|
28771
|
+
color: var(--color-foreground);
|
|
28772
|
+
background-color: color-mix(in oklab, var(--swarm-tone) 12%, transparent);
|
|
28773
|
+
border: 1px solid color-mix(in oklab, var(--swarm-tone) 40%, transparent);
|
|
28774
|
+
border-radius: var(--radius-lg);
|
|
28775
|
+
}
|
|
28776
|
+
.swarm-callout:last-child { margin-bottom: 0; }
|
|
28777
|
+
.swarm-callout > :first-child { margin-top: 0; }
|
|
28778
|
+
.swarm-callout > :last-child { margin-bottom: 0; }
|
|
28779
|
+
|
|
28780
|
+
.swarm-kv {
|
|
28781
|
+
display: grid;
|
|
28782
|
+
grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
|
|
28783
|
+
gap: 8px 20px;
|
|
28784
|
+
margin: 0 0 16px;
|
|
28785
|
+
font-size: 14px;
|
|
28786
|
+
}
|
|
28787
|
+
.swarm-kv:last-child { margin-bottom: 0; }
|
|
28788
|
+
.swarm-kv > dt {
|
|
28789
|
+
font-weight: 400;
|
|
28790
|
+
color: var(--color-muted-foreground);
|
|
28791
|
+
}
|
|
28792
|
+
.swarm-kv > dd {
|
|
28793
|
+
min-width: 0;
|
|
28794
|
+
margin: 0;
|
|
28795
|
+
overflow-wrap: anywhere;
|
|
28796
|
+
}
|
|
28797
|
+
|
|
28798
|
+
${TONE_RULES}
|
|
28799
|
+
}
|
|
28800
|
+
|
|
28801
|
+
@media print {
|
|
28802
|
+
html, body { background: white !important; color: black !important; }
|
|
28803
|
+
a:not(.swarm-button) { color: black !important; text-decoration: underline; }
|
|
28804
|
+
.no-print { display: none !important; }
|
|
28805
|
+
.swarm-panel, .swarm-card, swarm-diff, .swarm-metric { break-inside: avoid; }
|
|
28806
|
+
.swarm-table-wrap { max-height: none; overflow: visible; }
|
|
28807
|
+
.swarm-table { font-size: 12px; }
|
|
28808
|
+
.swarm-table :is(th, td):not(.num) { white-space: normal; }
|
|
28809
|
+
.swarm-table thead th { position: static; }
|
|
28810
|
+
tfoot { display: table-row-group; }
|
|
28811
|
+
}`;
|
|
28812
|
+
function buildPageHeadV2({
|
|
28813
|
+
theme,
|
|
28814
|
+
mode
|
|
28815
|
+
}) {
|
|
28816
|
+
return [
|
|
28817
|
+
'<base target="_blank">',
|
|
28818
|
+
IN_PAGE_LINK_SCRIPT,
|
|
28819
|
+
"<style>@layer properties, theme, base, components, utilities;</style>",
|
|
28820
|
+
FONT_LINKS,
|
|
28821
|
+
`<style id="swarm-theme">
|
|
28822
|
+
${renderPageThemeCss(theme)}
|
|
28823
|
+
</style>`,
|
|
28824
|
+
`<style id="swarm-design">
|
|
28825
|
+
${PAGE_DESIGN_CSS}
|
|
28826
|
+
</style>`,
|
|
28827
|
+
TAILWIND_SOURCE_SCRIPT,
|
|
28828
|
+
`<script src="${TAILWIND_BROWSER_SRC}" integrity="${TAILWIND_BROWSER_INTEGRITY}" crossorigin="anonymous"></script>`,
|
|
28829
|
+
...mode === "dark" ? ['<script>document.documentElement.classList.add("dark")</script>'] : []
|
|
28830
|
+
].join(`
|
|
28831
|
+
`);
|
|
28832
|
+
}
|
|
28833
|
+
|
|
28834
|
+
// src/http/pages-public.ts
|
|
28835
|
+
init_types4();
|
|
28836
|
+
init_constants3();
|
|
28837
|
+
init_page_session();
|
|
28838
|
+
init_secret_scrubber();
|
|
28839
|
+
init_route_def();
|
|
28840
|
+
var PublicPageJsonSchema = PageSchema.pick({
|
|
28841
|
+
id: true,
|
|
28842
|
+
title: true,
|
|
28843
|
+
description: true,
|
|
28844
|
+
contentType: true,
|
|
28845
|
+
authMode: true,
|
|
28846
|
+
body: true
|
|
28847
|
+
}).extend({
|
|
28848
|
+
version: literal2(1)
|
|
28849
|
+
});
|
|
28850
|
+
var publicPageRoute = route({
|
|
28851
|
+
method: "get",
|
|
28852
|
+
path: "/p/{id}",
|
|
28853
|
+
pattern: ["p", null],
|
|
28854
|
+
summary: "Render a page (HTML/SVG inline; JSON redirects to SPA)",
|
|
28855
|
+
tags: ["Pages"],
|
|
28856
|
+
params: object2({ id: string2() }),
|
|
28857
|
+
responses: {
|
|
28858
|
+
200: {
|
|
28859
|
+
description: "Rendered HTML page or raw SVG image",
|
|
28860
|
+
unstructured: "Serves raw image/svg+xml bytes, the page's agent-authored HTML body (SDK-injected) or, for ?print=1 on a JSON-content page, a standalone printable HTML document — not a JSON shape"
|
|
28861
|
+
},
|
|
28862
|
+
302: { description: "Redirect to SPA for JSON content" },
|
|
28863
|
+
401: { description: "Page requires an authenticated session" },
|
|
28864
|
+
403: { description: "Cookie does not match this page id" },
|
|
28865
|
+
404: { description: "Page not found" }
|
|
28866
|
+
},
|
|
28867
|
+
auth: { apiKey: false }
|
|
28868
|
+
});
|
|
28869
|
+
var publicPageJsonRoute = route({
|
|
28870
|
+
method: "get",
|
|
28871
|
+
path: "/p/{id}.json",
|
|
28872
|
+
pattern: ["p", null],
|
|
28873
|
+
summary: "Page metadata + body as JSON (used by SPA renderer)",
|
|
28874
|
+
tags: ["Pages"],
|
|
28875
|
+
params: object2({ id: string2() }),
|
|
28876
|
+
responses: {
|
|
28877
|
+
200: { description: "Page JSON", schema: PublicPageJsonSchema },
|
|
28878
|
+
401: { description: "Page requires an authenticated session" },
|
|
28879
|
+
403: { description: "Cookie does not match this page id" },
|
|
28880
|
+
404: { description: "Page not found" }
|
|
28881
|
+
},
|
|
28882
|
+
auth: { apiKey: false }
|
|
28883
|
+
});
|
|
28884
|
+
function pageHead(page, queryParams, wantsPrint) {
|
|
28885
|
+
if (page.designVersion === 1)
|
|
28886
|
+
return PAGE_HEAD_V1;
|
|
28887
|
+
const theme = resolvePageTheme({
|
|
28888
|
+
pageTheme: page.theme,
|
|
28889
|
+
viewerTheme: queryParams.get(PAGE_THEME_PARAM),
|
|
28890
|
+
overrides: page.themeTokens
|
|
28891
|
+
});
|
|
28892
|
+
const dark = !wantsPrint && queryParams.get(PAGE_MODE_PARAM) === "dark" && countColorLiterals(page.body) < COLOR_LITERAL_THRESHOLD;
|
|
28893
|
+
return buildPageHeadV2({ theme, mode: dark ? "dark" : "light" });
|
|
28894
|
+
}
|
|
28895
|
+
var LEADING_DOCTYPE_RE = /^\s*<!doctype\b[^>]*>/i;
|
|
28896
|
+
var LEADING_HTML_TAG_RE = /^\s*<!doctype\b[^>]*>\s*<html\b[^>]*>/i;
|
|
28897
|
+
function injectBrowserSdk(html, { head, headFirst, standardsMode }) {
|
|
28898
|
+
const injection = `${headFirst}${head}<script>${BROWSER_SDK_JS}</script><script>${SWARM_UI_JS}</script>`;
|
|
28899
|
+
const doc = standardsMode && !LEADING_DOCTYPE_RE.test(html) ? `<!doctype html>${html}` : html;
|
|
28900
|
+
const leading = standardsMode ? LEADING_HTML_TAG_RE.exec(doc) ?? LEADING_DOCTYPE_RE.exec(doc) : null;
|
|
28901
|
+
const idx = headTagEnd(doc) ?? (leading ? leading.index + leading[0].length : null);
|
|
28902
|
+
if (idx === null)
|
|
28903
|
+
return injection + doc;
|
|
28904
|
+
return doc.slice(0, idx) + injection + doc.slice(idx);
|
|
28905
|
+
}
|
|
28906
|
+
function headTagEnd(doc) {
|
|
28907
|
+
const start = doc.search(/<head\b/i);
|
|
28908
|
+
if (start === -1)
|
|
28909
|
+
return null;
|
|
28910
|
+
const close = doc.indexOf(">", start);
|
|
28911
|
+
return close === -1 ? null : close + 1;
|
|
28046
28912
|
}
|
|
28047
28913
|
var PRINT_AUTOTRIGGER_SCRIPT = `<script>
|
|
28048
28914
|
(function () {
|
|
@@ -28152,14 +29018,7 @@ function getPageFrameAncestors() {
|
|
|
28152
29018
|
}
|
|
28153
29019
|
function buildCsp(page) {
|
|
28154
29020
|
const configured = getConfiguredAppUrls();
|
|
28155
|
-
const devFallbacks =
|
|
28156
|
-
"http://localhost:5274",
|
|
28157
|
-
"http://localhost:5175",
|
|
28158
|
-
"http://127.0.0.1:5274",
|
|
28159
|
-
"http://127.0.0.1:5175",
|
|
28160
|
-
"https://*.localhost",
|
|
28161
|
-
"http://*.localhost"
|
|
28162
|
-
];
|
|
29021
|
+
const devFallbacks = getLocalDevAppOrigins();
|
|
28163
29022
|
const embedders = page.authMode === "public" ? getPageFrameAncestors() : [];
|
|
28164
29023
|
const ancestors = Array.from(new Set([...configured, ...devFallbacks, ...embedders]));
|
|
28165
29024
|
return [
|
|
@@ -28214,19 +29073,6 @@ function extractPasswordCandidate(req, queryParams) {
|
|
|
28214
29073
|
return null;
|
|
28215
29074
|
return decoded.slice(colonIdx + 1);
|
|
28216
29075
|
}
|
|
28217
|
-
function isLocalhostRequest(req) {
|
|
28218
|
-
if (getNodeEnv() === "production")
|
|
28219
|
-
return false;
|
|
28220
|
-
const origin = req.headers.origin ?? "";
|
|
28221
|
-
if (origin === "") {
|
|
28222
|
-
const rawHost = req.headers.host;
|
|
28223
|
-
const host = Array.isArray(rawHost) ? rawHost[0] : rawHost;
|
|
28224
|
-
if (!host)
|
|
28225
|
-
return true;
|
|
28226
|
-
return host.startsWith("localhost") || host.startsWith("127.0.0.1");
|
|
28227
|
-
}
|
|
28228
|
-
return origin.startsWith("http://localhost") || origin.startsWith("http://127.0.0.1");
|
|
28229
|
-
}
|
|
28230
29076
|
async function handlePagesPublic(req, res, pathSegments, queryParams) {
|
|
28231
29077
|
if (pathSegments.length !== 2 || pathSegments[0] !== "p")
|
|
28232
29078
|
return false;
|
|
@@ -28267,7 +29113,7 @@ async function handlePagesPublic(req, res, pathSegments, queryParams) {
|
|
|
28267
29113
|
}
|
|
28268
29114
|
if (matched) {
|
|
28269
29115
|
inlineSetCookie = await pageSessionSetCookies(req, page.id, {
|
|
28270
|
-
dev:
|
|
29116
|
+
dev: isLocalDevPageRequest(req)
|
|
28271
29117
|
});
|
|
28272
29118
|
} else {
|
|
28273
29119
|
res.writeHead(401, {
|
|
@@ -28347,7 +29193,11 @@ async function handlePagesPublic(req, res, pathSegments, queryParams) {
|
|
|
28347
29193
|
return true;
|
|
28348
29194
|
}
|
|
28349
29195
|
const feedback = isPageFeedbackRequested(queryParams);
|
|
28350
|
-
const html = injectBrowserSdk(page.body,
|
|
29196
|
+
const html = injectBrowserSdk(page.body, {
|
|
29197
|
+
head: pageHead(page, queryParams, wantsPrint),
|
|
29198
|
+
headFirst: feedback ? feedbackKeyGuardScript() : "",
|
|
29199
|
+
standardsMode: page.designVersion !== 1
|
|
29200
|
+
}) + (wantsPrint ? PRINT_AUTOTRIGGER_SCRIPT : "") + (feedback ? feedbackOverlayScripts(page.id) : "");
|
|
28351
29201
|
const headers = {
|
|
28352
29202
|
"Content-Type": "text/html; charset=utf-8",
|
|
28353
29203
|
"Cache-Control": "no-store",
|
|
@@ -31619,7 +32469,7 @@ init_vendored_openapi();
|
|
|
31619
32469
|
init_app_validation();
|
|
31620
32470
|
init_ensure_token();
|
|
31621
32471
|
init_mcp_wrapper();
|
|
31622
|
-
|
|
32472
|
+
init_presets2();
|
|
31623
32473
|
init_wrapper();
|
|
31624
32474
|
init_credential_broker();
|
|
31625
32475
|
init_telemetry();
|
|
@@ -43045,9 +43895,10 @@ var httpServer = createHttpServer(async (req, res) => {
|
|
|
43045
43895
|
});
|
|
43046
43896
|
});
|
|
43047
43897
|
var detachRealtime = attachRealtimeTransport(httpServer);
|
|
43048
|
-
var { attachControllerTransport } = await import("./controllers-connect-
|
|
43898
|
+
var { attachControllerTransport } = await import("./controllers-connect-c6nm70kg.js");
|
|
43049
43899
|
var detachControllers = attachControllerTransport(httpServer);
|
|
43050
43900
|
var stopWorkerNudges = startWorkerNudgeListener();
|
|
43901
|
+
var taskAutoTitles = startTaskAutoTitleListener();
|
|
43051
43902
|
var stopRoomDeletion = realtimeBus.subscribe("room:namespace-deleted", (namespace) => {
|
|
43052
43903
|
Promise.resolve(removeNamespaceRooms(String(namespace))).catch((error) => console.error("[rooms] Deletion failed:", scrubSecrets(String(error))));
|
|
43053
43904
|
});
|
|
@@ -43055,6 +43906,7 @@ globalState.__closeRealtime = () => {
|
|
|
43055
43906
|
detachRealtime();
|
|
43056
43907
|
detachControllers();
|
|
43057
43908
|
stopWorkerNudges();
|
|
43909
|
+
taskAutoTitles.stop();
|
|
43058
43910
|
stopRoomDeletion();
|
|
43059
43911
|
};
|
|
43060
43912
|
globalState.__httpServer = httpServer;
|
|
@@ -43074,7 +43926,7 @@ async function shutdown() {
|
|
|
43074
43926
|
sessionsProcessed: getServerSessionsProcessed()
|
|
43075
43927
|
});
|
|
43076
43928
|
if (hasCapability("scheduling")) {
|
|
43077
|
-
const { stopScheduler } = await import("./index-
|
|
43929
|
+
const { stopScheduler } = await import("./index-xrz7te8h.js");
|
|
43078
43930
|
stopScheduler();
|
|
43079
43931
|
}
|
|
43080
43932
|
stopHeartbeat2();
|
|
@@ -43086,7 +43938,7 @@ async function shutdown() {
|
|
|
43086
43938
|
await stopSlackApp2();
|
|
43087
43939
|
await stopChatSdk();
|
|
43088
43940
|
if (!isEnvFlagEnabled("OAUTH_KEEPALIVE_DISABLE", false)) {
|
|
43089
|
-
const { stopOAuthKeepalive } = await import("./keepalive-
|
|
43941
|
+
const { stopOAuthKeepalive } = await import("./keepalive-x060nt9p.js");
|
|
43090
43942
|
await stopOAuthKeepalive();
|
|
43091
43943
|
}
|
|
43092
43944
|
stopOAuthPendingGc();
|
|
@@ -43168,21 +44020,21 @@ try {
|
|
|
43168
44020
|
console.warn("[startup] CAPABILITIES upgrade seed failed (non-fatal):", err);
|
|
43169
44021
|
}
|
|
43170
44022
|
try {
|
|
43171
|
-
const { ensurePricingSeeded } = await import("./boot-seeds-
|
|
44023
|
+
const { ensurePricingSeeded } = await import("./boot-seeds-5cm6ambd.js");
|
|
43172
44024
|
ensurePricingSeeded();
|
|
43173
|
-
const { startPricingRefreshLoop } = await import("./pricing-refresh-
|
|
44025
|
+
const { startPricingRefreshLoop } = await import("./pricing-refresh-3pmre11v.js");
|
|
43174
44026
|
startPricingRefreshLoop();
|
|
43175
44027
|
} catch (err) {
|
|
43176
44028
|
console.error("[startup] Failed to seed pricing rows:", err);
|
|
43177
44029
|
}
|
|
43178
44030
|
try {
|
|
43179
|
-
const { ensureModelProfilesSeeded } = await import("./boot-seeds-
|
|
44031
|
+
const { ensureModelProfilesSeeded } = await import("./boot-seeds-5cm6ambd.js");
|
|
43180
44032
|
await ensureModelProfilesSeeded();
|
|
43181
44033
|
} catch (err) {
|
|
43182
44034
|
console.error("[startup] Failed to seed model profiles:", err);
|
|
43183
44035
|
}
|
|
43184
44036
|
try {
|
|
43185
|
-
const { ensureRbacSeeded } = await import("./boot-seeds-
|
|
44037
|
+
const { ensureRbacSeeded } = await import("./boot-seeds-5cm6ambd.js");
|
|
43186
44038
|
ensureRbacSeeded();
|
|
43187
44039
|
} catch (err) {
|
|
43188
44040
|
console.error("[startup] Failed to sync RBAC seed rows:", err);
|
|
@@ -43190,7 +44042,7 @@ try {
|
|
|
43190
44042
|
throw err;
|
|
43191
44043
|
}
|
|
43192
44044
|
try {
|
|
43193
|
-
const { runAllSeeders } = await import("./index-
|
|
44045
|
+
const { runAllSeeders } = await import("./index-nh3wyqdt.js");
|
|
43194
44046
|
await runAllSeeders({ scriptEmbeddingMode: "skip" });
|
|
43195
44047
|
} catch (err) {
|
|
43196
44048
|
console.error("[startup] Failed to seed built-in entities:", err);
|
|
@@ -43253,26 +44105,26 @@ httpServer.listen(port, async () => {
|
|
|
43253
44105
|
await initWorkflows2();
|
|
43254
44106
|
await startScriptRunSupervisor(getMcpBaseUrl());
|
|
43255
44107
|
if (hasCapability("scheduling")) {
|
|
43256
|
-
const { startScheduler } = await import("./index-
|
|
43257
|
-
const { getExecutorRegistry } = await import("./index-
|
|
44108
|
+
const { startScheduler } = await import("./index-xrz7te8h.js");
|
|
44109
|
+
const { getExecutorRegistry } = await import("./index-a8phxqnk.js");
|
|
43258
44110
|
const intervalMs = Number(process.env.SCHEDULER_INTERVAL_MS) || 1e4;
|
|
43259
44111
|
startScheduler(getExecutorRegistry(), intervalMs, {
|
|
43260
44112
|
runId: globalState.__runId
|
|
43261
44113
|
});
|
|
43262
44114
|
}
|
|
43263
44115
|
if (!isEnvFlagEnabled("HEARTBEAT_DISABLE", false)) {
|
|
43264
|
-
const { startHeartbeat } = await import("./index-
|
|
44116
|
+
const { startHeartbeat } = await import("./index-k6h00t4c.js");
|
|
43265
44117
|
const heartbeatMs = Number(process.env.HEARTBEAT_INTERVAL_MS) || 90000;
|
|
43266
44118
|
startHeartbeat(heartbeatMs);
|
|
43267
44119
|
}
|
|
43268
44120
|
startPoolRouting();
|
|
43269
44121
|
startRuntimeSupervisor();
|
|
43270
44122
|
if (!isEnvFlagEnabled("OAUTH_KEEPALIVE_DISABLE", false)) {
|
|
43271
|
-
const { startOAuthKeepalive } = await import("./keepalive-
|
|
44123
|
+
const { startOAuthKeepalive } = await import("./keepalive-x060nt9p.js");
|
|
43272
44124
|
startOAuthKeepalive();
|
|
43273
44125
|
}
|
|
43274
44126
|
if (!isEnvFlagEnabled("OAUTH_REFRESH_SWEEP_DISABLE", false)) {
|
|
43275
|
-
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-
|
|
44127
|
+
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-fckc4ar5.js");
|
|
43276
44128
|
startOAuthRefreshSweep();
|
|
43277
44129
|
}
|
|
43278
44130
|
startOAuthPendingGc();
|
|
@@ -43281,16 +44133,16 @@ httpServer.listen(port, async () => {
|
|
|
43281
44133
|
await startDbRetention();
|
|
43282
44134
|
startHumanFreeDrain();
|
|
43283
44135
|
startTaskSearchBackfill();
|
|
43284
|
-
import("./embedding-space-
|
|
44136
|
+
import("./embedding-space-0jepb239.js").then(({ runEmbeddingMaintenance, setDeploymentEnvReader }) => {
|
|
43285
44137
|
setDeploymentEnvReader(getDeploymentEnvValue);
|
|
43286
44138
|
return runEmbeddingMaintenance({ backfill: true });
|
|
43287
44139
|
}).catch((err) => {
|
|
43288
44140
|
console.error("[embedding-space] startup maintenance failed (non-fatal):", err);
|
|
43289
44141
|
});
|
|
43290
|
-
import("./boot-scrub-sweep-
|
|
44142
|
+
import("./boot-scrub-sweep-yjpdj7s1.js").then(({ runBootScrubSweep }) => runBootScrubSweep()).catch((err) => {
|
|
43291
44143
|
console.error("[boot-scrub-sweep] startup scrub failed (non-fatal):", err);
|
|
43292
44144
|
});
|
|
43293
|
-
import("./session-source-backfill-
|
|
44145
|
+
import("./session-source-backfill-08xvv0sm.js").then(({ runSessionSourceBackfill }) => runSessionSourceBackfill()).catch((err) => {
|
|
43294
44146
|
console.error("[session-source-backfill] startup run failed (non-fatal):", err);
|
|
43295
44147
|
});
|
|
43296
44148
|
}).on("error", (err) => {
|