@selvajs/selva 4.20.1-beta.5 → 4.21.0-beta.11
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/build/adapter-node.js +1 -1
- package/build/client/_app/immutable/assets/0.DJ150bSr.css +2 -0
- package/build/client/_app/immutable/assets/0.DJ150bSr.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DJ150bSr.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{D-uUm_OB.js → B3BHv1lE.js} +73 -68
- package/build/client/_app/immutable/chunks/B3BHv1lE.js.br +0 -0
- package/build/client/_app/immutable/chunks/B3BHv1lE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CzfnuBzq.js → BAhtiTKe.js} +1 -1
- package/build/client/_app/immutable/chunks/BAhtiTKe.js.br +0 -0
- package/build/client/_app/immutable/chunks/BAhtiTKe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BDYCH-_Q.js → BEPlNI5E.js} +1 -1
- package/build/client/_app/immutable/chunks/BEPlNI5E.js.br +0 -0
- package/build/client/_app/immutable/chunks/BEPlNI5E.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BSN2qO1R.js +1 -0
- package/build/client/_app/immutable/chunks/BSN2qO1R.js.br +0 -0
- package/build/client/_app/immutable/chunks/BSN2qO1R.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CcWwBvi8.js → CBf5ToEX.js} +1 -1
- package/build/client/_app/immutable/chunks/CBf5ToEX.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBf5ToEX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CSy_25b1.js +55 -0
- package/build/client/_app/immutable/chunks/CSy_25b1.js.br +0 -0
- package/build/client/_app/immutable/chunks/CSy_25b1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C6Y_BUwr.js → CmlXAF26.js} +1 -1
- package/build/client/_app/immutable/chunks/CmlXAF26.js.br +0 -0
- package/build/client/_app/immutable/chunks/CmlXAF26.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cv7GBWJh.js +2 -0
- package/build/client/_app/immutable/chunks/Cv7GBWJh.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cv7GBWJh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{zJ-SFdYZ.js → DIOXhUNn.js} +1 -1
- package/build/client/_app/immutable/chunks/DIOXhUNn.js.br +0 -0
- package/build/client/_app/immutable/chunks/DIOXhUNn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQbsDiDJ.js +1 -0
- package/build/client/_app/immutable/chunks/DQbsDiDJ.js.br +1 -0
- package/build/client/_app/immutable/chunks/DQbsDiDJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DW5EJMC7.js +1 -0
- package/build/client/_app/immutable/chunks/DW5EJMC7.js.br +0 -0
- package/build/client/_app/immutable/chunks/DW5EJMC7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DzxE3j6C.js → Dqy8nTaG.js} +1 -1
- package/build/client/_app/immutable/chunks/Dqy8nTaG.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dqy8nTaG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{qi43d-TM.js → cUJB_11K.js} +1 -1
- package/build/client/_app/immutable/chunks/cUJB_11K.js.br +0 -0
- package/build/client/_app/immutable/chunks/cUJB_11K.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.B3im90t6.js +2 -0
- package/build/client/_app/immutable/entry/app.B3im90t6.js.br +0 -0
- package/build/client/_app/immutable/entry/app.B3im90t6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.D3kiiIk_.js → 1.DWd6YbcT.js} +1 -1
- package/build/client/_app/immutable/nodes/1.DWd6YbcT.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.DWd6YbcT.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.NPUXRN3p.js +5 -0
- package/build/client/_app/immutable/nodes/11.NPUXRN3p.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.NPUXRN3p.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.C0vWxAsK.js +36 -0
- package/build/client/_app/immutable/nodes/15.C0vWxAsK.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.C0vWxAsK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{16.D7-QOesS.js → 16.BE4OfH4C.js} +1 -1
- package/build/client/_app/immutable/nodes/16.BE4OfH4C.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.BE4OfH4C.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.CUNbzjI_.js → 2.bCPP2ncY.js} +1 -1
- package/build/client/_app/immutable/nodes/2.bCPP2ncY.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.bCPP2ncY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{20.9OIre0ah.js → 20.DI5Eri_M.js} +1 -1
- package/build/client/_app/immutable/nodes/20.DI5Eri_M.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.DI5Eri_M.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.BI8SjY_r.js +1 -0
- package/build/client/_app/immutable/nodes/21.BI8SjY_r.js.br +1 -0
- package/build/client/_app/immutable/nodes/21.BI8SjY_r.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js +3 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/25.BRm8FzmQ.js +42 -0
- package/build/client/_app/immutable/nodes/25.BRm8FzmQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/25.BRm8FzmQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/26.7nAJpm5P.js +5 -0
- package/build/client/_app/immutable/nodes/26.7nAJpm5P.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.7nAJpm5P.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.3Z4QUsQQ.js → 3.Ctd9OGCk.js} +1 -1
- package/build/client/_app/immutable/nodes/3.Ctd9OGCk.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Ctd9OGCk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{30.BBuL_XNB.js → 30.B6pd-F-z.js} +1 -1
- package/build/client/_app/immutable/nodes/30.B6pd-F-z.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.B6pd-F-z.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{35.De6sleaH.js → 35.BPmyLjFW.js} +1 -1
- package/build/client/_app/immutable/nodes/35.BPmyLjFW.js.br +0 -0
- package/build/client/_app/immutable/nodes/35.BPmyLjFW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.DmA9lTA-.js → 5.BUX4zZQj.js} +1 -1
- package/build/client/_app/immutable/nodes/5.BUX4zZQj.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BUX4zZQj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.D6WLqCgl.js → 6.BpjtFwPi.js} +1 -1
- package/build/client/_app/immutable/nodes/6.BpjtFwPi.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BpjtFwPi.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.CNuRjkv2.js → 7.hBM6C-wN.js} +1 -1
- package/build/client/_app/immutable/nodes/7.hBM6C-wN.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.hBM6C-wN.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/runtime-meta.json +1 -1
- package/build/server/.vite/manifest.json +201 -144
- package/build/server/_app/immutable/assets/_layout.DJ150bSr.css +2 -0
- package/build/server/chunks/AppHeader.js +1 -1
- package/build/server/chunks/Callout.js +1 -1
- package/build/server/chunks/DefinitionCard.js +4 -1
- package/build/server/chunks/DefinitionCard.js.map +1 -1
- package/build/server/chunks/ErrorScreen.js +1 -1
- package/build/server/chunks/FilterableDropdown.js +1 -1
- package/build/server/chunks/SettingsMenu.js +1 -1
- package/build/server/chunks/SideNav.js +1 -1
- package/build/server/chunks/access.js +15 -3
- package/build/server/chunks/access.js.map +1 -1
- package/build/server/chunks/access2.server.js +1 -1
- package/build/server/chunks/activity.js +1 -1
- package/build/server/chunks/alert-dialog.js +1 -1
- package/build/server/chunks/api-errors.js +18 -3
- package/build/server/chunks/api-errors.js.map +1 -1
- package/build/server/chunks/api.js +11 -33
- package/build/server/chunks/api.js.map +1 -1
- package/build/server/chunks/arrow-left.js +1 -1
- package/build/server/chunks/arrow-right.js +1 -1
- package/build/server/chunks/auth-bootstrap.server.js +63 -39
- package/build/server/chunks/auth-bootstrap.server.js.map +1 -1
- package/build/server/chunks/badge.js +1 -1
- package/build/server/chunks/bodies.js +37 -0
- package/build/server/chunks/bodies.js.map +1 -0
- package/build/server/chunks/boot.server.js +1 -1
- package/build/server/chunks/bootHealth.server.js +23 -23
- package/build/server/chunks/bootHealth.server.js.map +1 -1
- package/build/server/chunks/building-complex.js +1 -1
- package/build/server/chunks/button.js +1 -1
- package/build/server/chunks/card-content.js +1 -1
- package/build/server/chunks/card-description.js +1 -1
- package/build/server/chunks/card-header.js +1 -1
- package/build/server/chunks/card-title.js +1 -1
- package/build/server/chunks/chevron-down.js +1 -1
- package/build/server/chunks/chevron-left.js +1 -1
- package/build/server/chunks/chevron-right.js +1 -1
- package/build/server/chunks/chevron-up.js +1 -1
- package/build/server/chunks/circle.js +1 -1
- package/build/server/chunks/computeRateLimit.server.js +2 -2
- package/build/server/chunks/copy.js +1 -1
- package/build/server/chunks/delete-with-blobs.js +1 -1
- package/build/server/chunks/dialog.js +1 -1
- package/build/server/chunks/diff.js +275 -0
- package/build/server/chunks/diff.js.map +1 -0
- package/build/server/chunks/engine.server.js +50 -3
- package/build/server/chunks/engine.server.js.map +1 -1
- package/build/server/chunks/external-link.js +1 -1
- package/build/server/chunks/folder-kanban.js +1 -1
- package/build/server/chunks/folder-open.js +1 -1
- package/build/server/chunks/folders.js +1 -1
- package/build/server/chunks/gauge.js +1 -1
- package/build/server/chunks/grasshopper.js +15 -3
- package/build/server/chunks/grasshopper.js.map +1 -1
- package/build/server/chunks/handlers.js +308 -133
- package/build/server/chunks/handlers.js.map +1 -1
- package/build/server/chunks/http.js +24 -24
- package/build/server/chunks/http.js.map +1 -1
- package/build/server/chunks/http2.js +1 -1
- package/build/server/chunks/input-group.js +1 -1
- package/build/server/chunks/input.js +1 -1
- package/build/server/chunks/instance.js +3 -3
- package/build/server/chunks/instanceAdmins.server.js +31 -16
- package/build/server/chunks/instanceAdmins.server.js.map +1 -1
- package/build/server/chunks/internal.js +1 -1
- package/build/server/chunks/inventory.js +395 -0
- package/build/server/chunks/inventory.js.map +1 -0
- package/build/server/chunks/keepalive-vtcjhAV3.js +24 -0
- package/build/server/chunks/keepalive-vtcjhAV3.js.map +1 -0
- package/build/server/chunks/key-round.js +1 -1
- package/build/server/chunks/label.js +1 -1
- package/build/server/chunks/link-2.js +1 -1
- package/build/server/chunks/liveSolve.server.js +1 -1
- package/build/server/chunks/localeContext.svelte.js +14 -0
- package/build/server/chunks/localeContext.svelte.js.map +1 -1
- package/build/server/chunks/mail.js +1 -1
- package/build/server/chunks/minus.js +1 -1
- package/build/server/chunks/oauth.js +70 -24
- package/build/server/chunks/oauth.js.map +1 -1
- package/build/server/chunks/{outcome-DNrffAXp.js → outcome-D28FgvFK.js} +9 -6
- package/build/server/chunks/outcome-D28FgvFK.js.map +1 -0
- package/build/server/chunks/package.js +2 -1
- package/build/server/chunks/package.js.map +1 -1
- package/build/server/chunks/permissions.server.js +1 -1
- package/build/server/chunks/plus.js +1 -1
- package/build/server/chunks/popper-layer-force-mount.js +1 -1
- package/build/server/chunks/presets.server.js +1 -1
- package/build/server/chunks/providers.server.js +310 -98
- package/build/server/chunks/providers.server.js.map +1 -1
- package/build/server/chunks/refresh-cw.js +1 -1
- package/build/server/chunks/registry.js +69 -5
- package/build/server/chunks/registry.js.map +1 -1
- package/build/server/chunks/resolve-server.js +2 -2
- package/build/server/chunks/rotate-ccw.js +1 -1
- package/build/server/chunks/schema-extraction.js +117 -9
- package/build/server/chunks/schema-extraction.js.map +1 -1
- package/build/server/chunks/schema.js +1 -1
- package/build/server/chunks/schema.js.map +1 -1
- package/build/server/chunks/scroll-text.js +1 -1
- package/build/server/chunks/search.js +1 -1
- package/build/server/chunks/search2.js +1 -1
- package/build/server/chunks/select.js +1 -1
- package/build/server/chunks/separator.js +19 -7
- package/build/server/chunks/separator.js.map +1 -1
- package/build/server/chunks/server-config-write.js +6 -6
- package/build/server/chunks/server-config-write.js.map +1 -1
- package/build/server/chunks/server2.js +2 -2
- package/build/server/chunks/server2.js.map +1 -1
- package/build/server/chunks/server4.js +1 -1
- package/build/server/chunks/serverStats.server.js +1 -1
- package/build/server/chunks/settings.js +1 -1
- package/build/server/chunks/severity.js +1 -1
- package/build/server/chunks/shield-check.js +1 -1
- package/build/server/chunks/shield.js +1 -1
- package/build/server/chunks/signInMaxAge.server.js +1 -1
- package/build/server/chunks/solve.server.js +8 -8
- package/build/server/chunks/solve.server.js.map +1 -1
- package/build/server/chunks/star.js +1 -1
- package/build/server/chunks/sveltekit.js +4 -5
- package/build/server/chunks/sveltekit.js.map +1 -1
- package/build/server/chunks/tabs-trigger.js +1 -1
- package/build/server/chunks/textarea.js +1 -1
- package/build/server/chunks/toggle-group-item.js +1 -1
- package/build/server/chunks/trash.js +1 -1
- package/build/server/chunks/traversal.js +23 -0
- package/build/server/chunks/traversal.js.map +1 -0
- package/build/server/chunks/types2.js.map +1 -1
- package/build/server/chunks/update-outcome.js +11 -0
- package/build/server/chunks/update-outcome.js.map +1 -1
- package/build/server/chunks/updateCheck.server.js +24 -12
- package/build/server/chunks/updateCheck.server.js.map +1 -1
- package/build/server/chunks/user-plus.js +1 -1
- package/build/server/chunks/users.js +1 -1
- package/build/server/chunks/utils.js +156 -70
- package/build/server/chunks/utils.js.map +1 -1
- package/build/server/chunks/x.js +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/compute/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/admin/compute/actions/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/admin/compute/status/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/admin/orgs/_id_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/orgs/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_id_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_id_/grants/_grantId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_id_/grants/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/projects/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/system/health/_server.ts.js +10 -3
- package/build/server/entries/endpoints/api/admin/system/health/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/system/update/_server.ts.js +59 -15
- package/build/server/entries/endpoints/api/admin/system/update/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/users/_id_/_server.ts.js +42 -16
- package/build/server/entries/endpoints/api/admin/users/_id_/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/users/_id_/disable/_server.ts.js +24 -13
- package/build/server/entries/endpoints/api/admin/users/_id_/disable/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/users/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/files/_...path_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/compute/_server.ts.js +15 -6
- package/build/server/entries/endpoints/api/v1/compute/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/v1/compute/schema/_server.ts.js +3 -3
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/image/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/publish/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/schema/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/share-links/_linkId_/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/share-links/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/solve/_server.ts.js +5 -4
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/solve/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/changes/_server.ts.js +9 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/changes/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/inventory/_server.ts.js +12 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/inventory/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/schema/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/scripts/_scriptId_/_server.ts.js +12 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/scripts/_scriptId_/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/check/_server.ts.js +12 -0
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/check/_server.ts.js.map +1 -0
- package/build/server/entries/endpoints/api/v1/definitions/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/me/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/me/starred/_guid_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/me/token/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/assets/_kind_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/members/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/members/_userId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/tokens/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/orgs/_orgId_/tokens/_tokenId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/members/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/members/_userId_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/projects/_id_/reclaim/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/solve/_solveId_/cancel/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/solve-events/_server.ts.js +1 -1
- package/build/server/entries/endpoints/auth/email/callback/_server.ts.js +2 -2
- package/build/server/entries/endpoints/auth/email/callback/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/auth/supabase/callback/_server.ts.js +2 -2
- package/build/server/entries/endpoints/auth/supabase/callback/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/docs/api/openapi.yaml/_server.ts.js +1 -1
- package/build/server/entries/endpoints/mcp/_server.ts.js +43 -13
- package/build/server/entries/endpoints/mcp/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/oauth/register/_server.ts.js +1 -1
- package/build/server/entries/endpoints/oauth/token/_server.ts.js +1 -1
- package/build/server/entries/hooks.server.js +25 -6
- package/build/server/entries/hooks.server.js.map +1 -1
- package/build/server/entries/pages/admin/_page.svelte.js +1 -1
- package/build/server/entries/pages/admin/compute/_page.server.ts.js +2 -3
- package/build/server/entries/pages/admin/compute/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/admin/compute/_page.svelte.js +7 -3
- package/build/server/entries/pages/admin/compute/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/admin/projects/_id_/_page.svelte.js +1 -1
- package/build/server/entries/pages/admin/system/_page.server.ts.js +8 -3
- package/build/server/entries/pages/admin/system/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/admin/system/_page.svelte.js +23 -4
- package/build/server/entries/pages/admin/system/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/admin/users/_page.svelte.js +1 -1
- package/build/server/entries/pages/library/_guid_/_page.server.ts.js +198 -99
- package/build/server/entries/pages/library/_guid_/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/library/_guid_/_page.svelte.js +722 -80
- package/build/server/entries/pages/library/_guid_/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/library/_page.svelte.js +1 -1
- package/build/server/entries/pages/oauth/authorize/_page.server.ts.js +3 -2
- package/build/server/entries/pages/oauth/authorize/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/oauth/authorize/_page.svelte.js +8 -1
- package/build/server/entries/pages/oauth/authorize/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/projects/_page.server.ts.js +1 -1
- package/build/server/entries/pages/projects/_page.svelte.js +792 -35
- package/build/server/entries/pages/projects/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/setup/_page.server.ts.js +62 -8
- package/build/server/entries/pages/setup/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/setup/_page.svelte.js +52 -33
- package/build/server/entries/pages/setup/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/team/_layout.svelte.js +1 -1
- package/build/server/entries/pages/team/compute/_page.server.ts.js +1 -1
- package/build/server/entries/pages/team/members/_page.svelte.js +1 -1
- package/build/server/entries/pages/team/settings/_page.svelte.js +1 -1
- package/build/server/entries/pages/team/tokens/_page.server.ts.js +1 -1
- package/build/server/manifest-full.js +29 -1
- package/build/server/manifest.js +29 -1
- package/build/server/nodes/0.js +2 -2
- package/build/server/nodes/1.js +1 -1
- package/build/server/nodes/11.js +1 -1
- package/build/server/nodes/15.js +1 -1
- package/build/server/nodes/16.js +1 -1
- package/build/server/nodes/2.js +1 -1
- package/build/server/nodes/20.js +1 -1
- package/build/server/nodes/21.js +1 -1
- package/build/server/nodes/24.js +1 -1
- package/build/server/nodes/25.js +1 -1
- package/build/server/nodes/26.js +1 -1
- package/build/server/nodes/3.js +1 -1
- package/build/server/nodes/30.js +1 -1
- package/build/server/nodes/35.js +1 -1
- package/build/server/nodes/5.js +1 -1
- package/build/server/nodes/6.js +1 -1
- package/build/server/nodes/7.js +1 -1
- package/build/server/server.js +29 -1
- package/package.json +15 -12
- package/templates/.env.example +15 -7
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css +0 -2
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css.br +0 -0
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BDYCH-_Q.js.br +0 -0
- package/build/client/_app/immutable/chunks/BDYCH-_Q.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bga9Qxze.js +0 -55
- package/build/client/_app/immutable/chunks/Bga9Qxze.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bga9Qxze.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C6Y_BUwr.js.br +0 -0
- package/build/client/_app/immutable/chunks/C6Y_BUwr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CBWE8gpj.js +0 -1
- package/build/client/_app/immutable/chunks/CBWE8gpj.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBWE8gpj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CcWwBvi8.js.br +0 -0
- package/build/client/_app/immutable/chunks/CcWwBvi8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CzfnuBzq.js.br +0 -0
- package/build/client/_app/immutable/chunks/CzfnuBzq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D-uUm_OB.js.br +0 -0
- package/build/client/_app/immutable/chunks/D-uUm_OB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D84F7w9g.js +0 -1
- package/build/client/_app/immutable/chunks/D84F7w9g.js.br +0 -1
- package/build/client/_app/immutable/chunks/D84F7w9g.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQsP4nZb.js +0 -1
- package/build/client/_app/immutable/chunks/DQsP4nZb.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQsP4nZb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DzeQucGI.js +0 -2
- package/build/client/_app/immutable/chunks/DzeQucGI.js.br +0 -0
- package/build/client/_app/immutable/chunks/DzeQucGI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DzxE3j6C.js.br +0 -0
- package/build/client/_app/immutable/chunks/DzxE3j6C.js.gz +0 -0
- package/build/client/_app/immutable/chunks/qi43d-TM.js.br +0 -0
- package/build/client/_app/immutable/chunks/qi43d-TM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/zJ-SFdYZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/zJ-SFdYZ.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.BpT6WkO1.js +0 -2
- package/build/client/_app/immutable/entry/app.BpT6WkO1.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BpT6WkO1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.D3kiiIk_.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.D3kiiIk_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.DS0azG6Y.js +0 -5
- package/build/client/_app/immutable/nodes/11.DS0azG6Y.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.DS0azG6Y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js +0 -32
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.D7-QOesS.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.D7-QOesS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CUNbzjI_.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CUNbzjI_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.9OIre0ah.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.9OIre0ah.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.BkNlRItr.js +0 -1
- package/build/client/_app/immutable/nodes/21.BkNlRItr.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.BkNlRItr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js +0 -3
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/25.DW1_vMxq.js +0 -17
- package/build/client/_app/immutable/nodes/25.DW1_vMxq.js.br +0 -0
- package/build/client/_app/immutable/nodes/25.DW1_vMxq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/26.CqaMEm_t.js +0 -6
- package/build/client/_app/immutable/nodes/26.CqaMEm_t.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.CqaMEm_t.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.3Z4QUsQQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.3Z4QUsQQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/30.BBuL_XNB.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.BBuL_XNB.js.gz +0 -0
- package/build/client/_app/immutable/nodes/35.De6sleaH.js.br +0 -0
- package/build/client/_app/immutable/nodes/35.De6sleaH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.DmA9lTA-.js.br +0 -1
- package/build/client/_app/immutable/nodes/5.DmA9lTA-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.D6WLqCgl.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.D6WLqCgl.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CNuRjkv2.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CNuRjkv2.js.gz +0 -0
- package/build/server/_app/immutable/assets/_layout.2jDm0bqh.css +0 -2
- package/build/server/chunks/abort-Bfrdupaj.js +0 -40
- package/build/server/chunks/abort-Bfrdupaj.js.map +0 -1
- package/build/server/chunks/computeLimits.js +0 -33
- package/build/server/chunks/computeLimits.js.map +0 -1
- package/build/server/chunks/outcome-DNrffAXp.js.map +0 -1
- package/build/server/chunks/types4.js +0 -10
- package/build/server/chunks/types4.js.map +0 -1
- package/build/server/chunks/utils2.js +0 -174
- package/build/server/chunks/utils2.js.map +0 -1
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js → 0.Bu9WQ0W_.js} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js.br → 0.Bu9WQ0W_.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js.gz → 0.Bu9WQ0W_.js.gz} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../schemas/src/generated/schema.ts"],"sourcesContent":["/* eslint-disable */\n/**\n * This file was automatically generated from packages/schemas/ui-schema.json.\n * DO NOT MODIFY IT BY HAND. Instead, modify the source JSON Schema file\n * and run `pnpm generate` at the repo root to regenerate it.\n */\n\nexport type ParamType =\n\t| 'number'\n\t| 'integer'\n\t| 'boolean'\n\t| 'text'\n\t| 'valueList'\n\t| 'dynamicValueList'\n\t| 'file'\n\t| 'color'\n\t| 'generic'\n\t| 'geometry'\n\t| 'point'\n\t| 'line'\n\t| 'plane';\nexport type InputNumberLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'number';\n\tconfig?: NumberWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputTextLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'text';\n\tconfig?: TextWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputDropdownLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'dropdown';\n\tconfig: DropdownWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputDynamicValueListLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'dynamicValueList';\n\tconfig?: DynamicValueListWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputCheckboxLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'checkbox';\n\tconfig?: CheckboxWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputFileLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'file';\n\tconfig?: FileInputWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputColorLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'color';\n\tconfig?: ColorWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputTextLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'text';\n\t[k: string]: unknown | undefined;\n};\nexport type OutputNumberLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'number';\n\t[k: string]: unknown | undefined;\n};\nexport type OutputFileLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'file';\n\tconfig?: FileWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputChartLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'chart';\n\tconfig?: ChartWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputImageLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'image';\n\tconfig?: ImageWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputDynamicValueListLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'dynamicValueList';\n\tconfig: DynamicValueListOutputConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type LayoutItem =\n\t| InputNumberLayoutItem\n\t| InputTextLayoutItem\n\t| InputDropdownLayoutItem\n\t| InputDynamicValueListLayoutItem\n\t| InputCheckboxLayoutItem\n\t| InputFileLayoutItem\n\t| InputColorLayoutItem\n\t| OutputTextLayoutItem\n\t| OutputNumberLayoutItem\n\t| OutputFileLayoutItem\n\t| OutputChartLayoutItem\n\t| OutputImageLayoutItem\n\t| OutputDynamicValueListLayoutItem\n\t| LineBreakLayoutItem;\nexport type LayoutConfig = TabbedLayoutConfig | FlatLayoutConfig;\nexport type InputStructure = 'item' | 'list' | 'tree';\n\n/**\n * Schema definitions for Selva UI configuration\n */\nexport interface SelvaUISchema {\n\t[k: string]: unknown | undefined;\n}\nexport interface VisibilityRule {\n\t/**\n\t * Parameter ID to watch for changes\n\t */\n\tparamId: string;\n\t/**\n\t * Comparison operator. 'contains', 'containsAny', 'isEmpty', 'isNotEmpty' apply to array-valued params (e.g., checklist value lists).\n\t */\n\toperator:\n\t\t| 'equals'\n\t\t| 'notEquals'\n\t\t| 'greaterThan'\n\t\t| 'lessThan'\n\t\t| 'greaterThanOrEqual'\n\t\t| 'lessThanOrEqual'\n\t\t| 'in'\n\t\t| 'notIn'\n\t\t| 'between'\n\t\t| 'matches'\n\t\t| 'contains'\n\t\t| 'containsAny'\n\t\t| 'isEmpty'\n\t\t| 'isNotEmpty';\n\t/**\n\t * Value to compare against (used for equals, notEquals, greaterThan, lessThan, greaterThanOrEqual, lessThanOrEqual)\n\t */\n\tvalue?: {\n\t\t[k: string]: unknown | undefined;\n\t};\n\t/**\n\t * Array of values (used for 'in', 'notIn' operators, or [min, max] for 'between')\n\t */\n\tvalues?: unknown[];\n}\nexport interface VisibilityCondition {\n\t/**\n\t * Evaluation mode: 'all' = AND (all rules must pass), 'any' = OR (at least one rule must pass)\n\t */\n\tmode?: 'all' | 'any';\n\t/**\n\t * List of rules to evaluate\n\t *\n\t * @minItems 1\n\t */\n\trules: [VisibilityRule, ...VisibilityRule[]];\n\t/**\n\t * Action to apply when condition is met: 'show' makes visible and enabled, 'hide' removes from view, 'disable' makes visible but greyed out and non-interactive\n\t */\n\taction?: 'show' | 'hide' | 'disable';\n\t/**\n\t * Default value to set for the parameter when condition is met. The value should be compatible with the parameter type (number, string, boolean, etc.)\n\t */\n\tdefaultValue?: {\n\t\t[k: string]: unknown | undefined;\n\t};\n}\nexport interface GroupVisibilityCondition {\n\t/**\n\t * Evaluation mode: 'all' = AND (all rules must pass), 'any' = OR (at least one rule must pass)\n\t */\n\tmode?: 'all' | 'any';\n\t/**\n\t * List of rules to evaluate\n\t *\n\t * @minItems 1\n\t */\n\trules: [VisibilityRule, ...VisibilityRule[]];\n\t/**\n\t * Action to apply when condition is met: 'show' makes group visible, 'hide' removes group from view\n\t */\n\taction?: 'show' | 'hide';\n}\nexport interface NumberWidgetConfig {\n\tminimum?: number;\n\tmaximum?: number;\n\tstepSize?: number;\n\tplaceholder?: string;\n\trenderAsSlider?: boolean;\n\t/**\n\t * Never show the min/max hint. Without it, a number box shows the hint beside its label while focused; sliders never show it.\n\t */\n\thideRange?: boolean;\n}\nexport interface TextWidgetConfig {\n\tplaceholder?: string;\n\trequired?: boolean;\n\t/**\n\t * Maximum character length for text input\n\t */\n\tmaxLength?: number;\n\t/**\n\t * Regex pattern for validation (e.g., email, phone)\n\t */\n\tpattern?: string;\n\t/**\n\t * Custom error message shown when pattern validation fails\n\t */\n\tcustomErrorMessage?: string;\n}\nexport interface OptionMedia {\n\t/**\n\t * Asset holding the option's icon (an OptionAsset with d).\n\t */\n\ticon?: string;\n\t/**\n\t * Asset holding the option's thumbnail (an OptionAsset with img).\n\t */\n\timage?: string;\n\t/**\n\t * Iconify name the icon was picked as (e.g. 'lucide:house'), so the builder can reopen the picker on it. Never rendered.\n\t */\n\ticonName?: string;\n}\nexport interface OptionAsset {\n\t/**\n\t * SVG path data on a 24x24 grid, drawn as a stroke (width 2, round caps and joins, no fill). Rendered as a path's d attribute, never as markup.\n\t */\n\td?: string;\n\t/**\n\t * Thumbnail as a base64 data URI. Only WebP, JPEG and PNG are accepted.\n\t */\n\timg?: string;\n\t/**\n\t * Thumbnail width in pixels\n\t */\n\tw?: number;\n\t/**\n\t * Thumbnail height in pixels\n\t */\n\th?: number;\n}\nexport interface DropdownWidgetConfig {\n\t/**\n\t * Key-value pairs for dropdown options\n\t */\n\toptions: {\n\t\t[k: string]: string | undefined;\n\t};\n\trequired?: boolean;\n\t/**\n\t * How to render the value list. 'dropdown' = single-select dropdown (value: string). 'checklist' = multi-select checkboxes (value: string[]); requires list access on the connected parameter. 'segmented' = single-select button row, shown as a dropdown when there are too many options to fit. 'tiles' = single-select grid of thumbnails.\n\t */\n\tdisplayAs?: 'dropdown' | 'checklist' | 'segmented' | 'tiles';\n\t/**\n\t * Icon and thumbnail per option, keyed by option name. Grasshopper owns options; this map is the author's and survives a re-sync.\n\t */\n\toptionMedia?: {\n\t\t[k: string]: OptionMedia | undefined;\n\t};\n}\nexport interface DynamicValueListWidgetConfig {\n\t/**\n\t * Author-provided seed list (name -> value). Shown until computed options replace it. Empty/absent means the input is empty until the first solve produces options.\n\t */\n\tdefaultOptions?: {\n\t\t[k: string]: string | undefined;\n\t};\n\t/**\n\t * What to render when there are no options yet (no defaultOptions and no computed options): 'hide' removes the field from view, 'show-empty' shows a disabled 'no options yet' control.\n\t */\n\temptyBehavior?: 'hide' | 'show-empty';\n\t/**\n\t * How to render the value list. 'dropdown' = single-select (value: string). 'checklist' = multi-select (value: string[]). 'segmented' = single-select button row, shown as a dropdown when there are too many options to fit. 'tiles' = single-select grid of thumbnails.\n\t */\n\tdisplayAs?: 'dropdown' | 'checklist' | 'segmented' | 'tiles';\n\t/**\n\t * Icon and thumbnail per option, keyed by option name. Names without an entry show text only.\n\t */\n\toptionMedia?: {\n\t\t[k: string]: OptionMedia | undefined;\n\t};\n}\nexport interface DynamicValueListOutputConfig {\n\t/**\n\t * The backend parameter's GUID (paramId) of the DynamicValueList input that this output's computed options populate.\n\t */\n\ttargetInputId: string;\n}\nexport interface CheckboxWidgetConfig {\n\t/**\n\t * 'checkbox' = a toggle whose value is sent with every solve. 'button' = a trigger: a press solves once with true, then the input goes back to false. A button holds no value in the form, so presets and value updates skip it.\n\t */\n\tdisplayAs?: 'checkbox' | 'button';\n}\nexport interface FileWidgetConfig {\n\tbuttonLabel?: string;\n\t/**\n\t * File format hint (e.g., '3dm') for setting download extension\n\t */\n\tfileFormat?: string;\n}\nexport interface FileInputWidgetConfig {\n\t/**\n\t * List of accepted file extensions (e.g., ['.3dm', '.step'])\n\t */\n\tacceptedFormats?: string[];\n\t/**\n\t * Which mode is active by default when both are allowed\n\t */\n\tdefaultInputMode?: 'upload' | 'url';\n\t/**\n\t * Which input modes the end user can choose from. If omitted, both are allowed.\n\t */\n\tallowedInputModes?: ('upload' | 'url')[];\n}\nexport interface ColorWidgetConfig {}\nexport interface LayoutItemBase {\n\t/**\n\t * Unique identifier for this layout item in the UI tree (not the parameter ID)\n\t */\n\tid: string;\n\t/**\n\t * References the backend parameter's GUID (Data Source)\n\t */\n\tparamId: string;\n\tdisplayName?: string;\n\tdescription?: string;\n\torder?: number;\n\tspan?: number;\n\t/**\n\t * Base visibility (static). If false, item is always hidden regardless of conditions.\n\t */\n\tvisible?: boolean;\n\tvisibilityCondition?: VisibilityCondition;\n\tsource?: InputSource;\n\t[k: string]: unknown | undefined;\n}\nexport interface InputSource {\n\t/**\n\t * Which data provider supplies the value. 'user' = the person types it into the form. 'client' = a browser app (e.g. a measurement/producer tool) fills it in before the form runs, not the person. 'server' = reserved for a server-side lookup that no host performs yet: the input solves with its default, a solve that posts a value for it is refused, and it is never shown in the form.\n\t */\n\tkind: 'user' | 'client' | 'server';\n\t/**\n\t * The address the host resolves to fill this input — opaque to Selva, interpreted by the host per 'kind'. For 'client' it names WHICH producer app supplies the value (e.g. 'line-app', 'file-upload') so the host pre-routes to it; for 'server' it names WHAT a resolver would fetch (e.g. 'capture.geometry'). Keys need not be unique: the same producer/fetch may fill several inputs. Ignored for kind='user'.\n\t */\n\tkey?: string;\n\t/**\n\t * How a client-sourced input appears in the form (only meaningful when kind='client'). Omitted = 'hidden': the value is prefilled silently and the input does not appear. 'slot' = Selva reserves the input's grid cell and lets the host render its own element there; Selva draws nothing itself and never interprets that element.\n\t */\n\tclient?: {\n\t\t/**\n\t\t * 'hidden' = no UI; the producer app prefills the value and the input does not appear. 'slot' = the host renders a custom element (e.g. an 'Edit JSON' button) in this input's place, referencing the producer named by 'key'.\n\t\t */\n\t\tpresentation?: 'hidden' | 'slot';\n\t};\n}\nexport interface ChartWidgetConfig {}\nexport interface ImageWidgetConfig {\n\t/**\n\t * Show a download button on the image viewer\n\t */\n\tallowDownload?: boolean;\n\t/**\n\t * Show a fullscreen toggle button on the image viewer\n\t */\n\tallowFullscreen?: boolean;\n\t/**\n\t * Optional background color shown behind the image (hex string, e.g. '#ffffff')\n\t */\n\tbackgroundColor?: string;\n}\nexport interface LineBreakLayoutItem {\n\t/**\n\t * Unique identifier for this layout item in the UI tree\n\t */\n\tid: string;\n\ttype: 'linebreak';\n}\nexport interface GroupConfig {\n\tid: string;\n\tlabel: string;\n\tdescription?: string;\n\torder?: number;\n\tcollapsed?: boolean;\n\tcolumns?: number;\n\titems: LayoutItem[];\n\tvisibilityCondition?: GroupVisibilityCondition;\n}\nexport interface TabConfig {\n\tid: string;\n\tlabel: string;\n\ticon?: string;\n\torder?: number;\n\tgroups: GroupConfig[];\n\t/**\n\t * Horizontal region where this tab should be positioned in multi-column layouts\n\t */\n\tposition?: 'left' | 'center' | 'right';\n\t/**\n\t * Base visibility (static). If false, the tab is always hidden. A tab whose groups are all hidden is hidden too.\n\t */\n\tvisible?: boolean;\n}\nexport interface TabbedLayoutConfig {\n\ttype: 'tabbed';\n\tgap?: number;\n\ttabs: TabConfig[];\n}\nexport interface FlatLayoutConfig {\n\ttype: 'flat';\n\tgap?: number;\n\tgroups: GroupConfig[];\n}\nexport interface SchemaInput {\n\t/**\n\t * Backend-specific parameter identifier (e.g. a Grasshopper InstanceGuid)\n\t */\n\tid: string;\n\tnickname: string;\n\tparamType: ParamType;\n\tdescription?: string;\n\tdefault?: unknown;\n\t/**\n\t * Data access mode: 'item' = single value, 'list' = flat list, 'tree' = branching data tree. Defaults to 'item'.\n\t */\n\tinputStructure?: 'item' | 'list' | 'tree';\n}\nexport interface SchemaOutput {\n\t/**\n\t * Backend-specific parameter identifier (e.g. a Grasshopper InstanceGuid)\n\t */\n\tid: string;\n\tnickname: string;\n\tdescription?: string;\n\t/**\n\t * Output display type\n\t */\n\ttype: 'text' | 'number' | 'file' | 'chart' | 'dynamicValueList';\n\t/**\n\t * For 'dynamicValueList' outputs: the instance GUID (paramId) of the DynamicValueList input that this output's computed options populate.\n\t */\n\ttargetInputId?: string;\n}\nexport interface ViewerOptions {\n\t/**\n\t * If true, the plugin streams display meshes to its local web preview, which then shows the 3D viewer. Selva ignores it.\n\t */\n\tenableLocal?: boolean;\n\t/**\n\t * If true, Selva draws the display meshes in the Rhino.Compute response and shows the 3D viewer. The plugin's local preview ignores it.\n\t */\n\tenableRemote?: boolean;\n\t/**\n\t * Background color for the 3D viewer as hex string (e.g., '#ffffff')\n\t */\n\tbackgroundColor?: string;\n\t/**\n\t * The viewer look a definition opens in. A viewer can still switch look from its display menu.\n\t */\n\tlook?:\n\t\t'technical' | 'studio' | 'showcase' | 'arctic' | 'xray' | 'lineart' | 'wireframe' | 'night';\n}\nexport interface LocalOptions {\n\t/**\n\t * If true, geometry picked in the Rhino viewport follows the Rhino objects it came from: editing or moving one re-solves with its new shape, deleting one drops it. If false, a pick is a snapshot.\n\t */\n\ttrackPickedObjects?: boolean;\n}\nexport interface UISchema {\n\tid: string;\n\tname: string;\n\tdescription?: string;\n\t/**\n\t * Grasshopper document file name (e.g., 'myfile.gh')\n\t */\n\tprojectFileName?: string;\n\t/**\n\t * Grasshopper document unique identifier (GUID)\n\t */\n\tdocumentId?: string;\n\t/**\n\t * Version of Selva plugin that created/last modified this schema\n\t */\n\tpluginVersion?: string;\n\t/**\n\t * Tags for the Selva library (e.g., ['architecture', 'facade']). Selva copies them into the definition when it is uploaded; after that the definition's own tags win. At most MAX_TAGS, none containing a comma.\n\t */\n\ttags?: string[];\n\t/**\n\t * Category for the Selva library (e.g., 'architecture', 'structural'). Selva copies it into the definition when it is uploaded; after that the definition's own category wins. At most MAX_CATEGORY_LENGTH characters.\n\t */\n\tcategory?: string;\n\t/**\n\t * User or organization who created the schema\n\t */\n\tauthor?: string;\n\t/**\n\t * Organization/company name\n\t */\n\torganization?: string;\n\t/**\n\t * Semantic version of the schema format (MAJOR.MINOR.PATCH)\n\t */\n\tschemaVersion: string;\n\t/**\n\t * Minimum plugin version required to load this schema\n\t */\n\tminPluginVersion?: string;\n\tcreated?: string;\n\t/**\n\t * Last modification timestamp\n\t */\n\tlastModified?: string;\n\tviewerOptions?: ViewerOptions1;\n\tlocalOptions?: LocalOptions;\n\t/**\n\t * If true, changes trigger immediate solving. If false, user must press Calculate button.\n\t */\n\tinstanceSolve?: boolean;\n\tinputs: SchemaInput[];\n\t/**\n\t * All output components (print, bake, file download)\n\t */\n\toutputs: SchemaOutput[];\n\tlayout: LayoutConfig;\n\t/**\n\t * Icons and thumbnails referenced by optionMedia, keyed by a hash of their content so a shared one is stored once.\n\t */\n\tassets?: {\n\t\t[k: string]: OptionAsset | undefined;\n\t};\n}\n/**\n * Configuration for the 3D viewer\n */\nexport interface ViewerOptions1 {\n\t/**\n\t * If true, the plugin streams display meshes to its local web preview, which then shows the 3D viewer. Selva ignores it.\n\t */\n\tenableLocal?: boolean;\n\t/**\n\t * If true, Selva draws the display meshes in the Rhino.Compute response and shows the 3D viewer. The plugin's local preview ignores it.\n\t */\n\tenableRemote?: boolean;\n\t/**\n\t * Background color for the 3D viewer as hex string (e.g., '#ffffff')\n\t */\n\tbackgroundColor?: string;\n\t/**\n\t * The viewer look a definition opens in. A viewer can still switch look from its display menu.\n\t */\n\tlook?:\n\t\t'technical' | 'studio' | 'showcase' | 'arctic' | 'xray' | 'lineart' | 'wireframe' | 'night';\n}\n\n// ============================================================================\n// CONSTANTS (from schema)\n// ============================================================================\n\nexport const ACCEPTED_FILE_FORMATS = [\n\t'.3dm',\n\t'.stp',\n\t'.step',\n\t'.fbx',\n\t'.obj',\n\t'.dxf',\n\t'.stl'\n] as const;\nexport const MAX_TAGS = 5 as const;\nexport const MAX_CATEGORY_LENGTH = 40 as const;\n\n/** Current UISchema format version (from ui-schema.json's schemaVersion default). */\nexport const UI_SCHEMA_VERSION = '2.19.0';\n\n// ============================================================================\n// TYPE ALIASES AND GUARDS (derived from the LayoutItem union)\n// ============================================================================\n\nexport type InputLayoutItem =\n\t| InputNumberLayoutItem\n\t| InputTextLayoutItem\n\t| InputDropdownLayoutItem\n\t| InputDynamicValueListLayoutItem\n\t| InputCheckboxLayoutItem\n\t| InputFileLayoutItem\n\t| InputColorLayoutItem;\nexport type OutputLayoutItem =\n\t| OutputTextLayoutItem\n\t| OutputNumberLayoutItem\n\t| OutputFileLayoutItem\n\t| OutputChartLayoutItem\n\t| OutputImageLayoutItem\n\t| OutputDynamicValueListLayoutItem;\nexport type SupportedTypes = string | number | boolean | string[];\n\nexport function isInputLayoutItem(item: LayoutItem): item is InputLayoutItem {\n\treturn item.type === 'input';\n}\n\nexport function isOutputLayoutItem(item: LayoutItem): item is OutputLayoutItem {\n\treturn item.type === 'output';\n}\n\nexport function isLineBreakLayoutItem(item: LayoutItem): item is LineBreakLayoutItem {\n\treturn item.type === 'linebreak';\n}\n\nexport function isNumberWidget(item: LayoutItem): item is InputNumberLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'number';\n}\n\nexport function isTextWidget(item: LayoutItem): item is InputTextLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'text';\n}\n\nexport function isDropdownWidget(item: LayoutItem): item is InputDropdownLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'dropdown';\n}\n\nexport function isDynamicValueListWidget(\n\titem: LayoutItem\n): item is InputDynamicValueListLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'dynamicValueList';\n}\n\nexport function isCheckboxWidget(item: LayoutItem): item is InputCheckboxLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'checkbox';\n}\n\nexport function isFileWidget(item: LayoutItem): item is InputFileLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'file';\n}\n\nexport function isColorWidget(item: LayoutItem): item is InputColorLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'color';\n}\n\nexport function isTextOutputWidget(item: LayoutItem): item is OutputTextLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'text';\n}\n\nexport function isNumberOutputWidget(item: LayoutItem): item is OutputNumberLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'number';\n}\n\nexport function isFileOutputWidget(item: LayoutItem): item is OutputFileLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'file';\n}\n\nexport function isChartOutputWidget(item: LayoutItem): item is OutputChartLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'chart';\n}\n\nexport function isImageOutputWidget(item: LayoutItem): item is OutputImageLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'image';\n}\n\nexport function isDynamicValueListOutputWidget(\n\titem: LayoutItem\n): item is OutputDynamicValueListLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'dynamicValueList';\n}\n"],"mappings":";;AAukBA,IAAa,oBAAoB;AAmCjC,SAAgB,eAAe,MAAiD;CAC/E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,aAAa,MAA+C;CAC3E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,iBAAiB,MAAmD;CACnF,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,yBACf,MAC0C;CAC1C,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,iBAAiB,MAAmD;CACnF,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,aAAa,MAA+C;CAC3E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,cAAc,MAAgD;CAC7E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD"}
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../schemas/src/generated/schema.ts"],"sourcesContent":["/* eslint-disable */\n/**\n * This file was automatically generated from packages/schemas/ui-schema.json.\n * DO NOT MODIFY IT BY HAND. Instead, modify the source JSON Schema file\n * and run `pnpm generate` at the repo root to regenerate it.\n */\n\nexport type ParamType =\n\t| 'number'\n\t| 'integer'\n\t| 'boolean'\n\t| 'text'\n\t| 'valueList'\n\t| 'dynamicValueList'\n\t| 'file'\n\t| 'color'\n\t| 'generic'\n\t| 'geometry'\n\t| 'point'\n\t| 'line'\n\t| 'plane';\nexport type InputNumberLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'number';\n\tconfig?: NumberWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputTextLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'text';\n\tconfig?: TextWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputDropdownLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'dropdown';\n\tconfig: DropdownWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputDynamicValueListLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'dynamicValueList';\n\tconfig?: DynamicValueListWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputCheckboxLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'checkbox';\n\tconfig?: CheckboxWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputFileLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'file';\n\tconfig?: FileInputWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type InputColorLayoutItem = LayoutItemBase & {\n\ttype: 'input';\n\twidgetType: 'color';\n\tconfig?: ColorWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputTextLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'text';\n\t[k: string]: unknown | undefined;\n};\nexport type OutputNumberLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'number';\n\t[k: string]: unknown | undefined;\n};\nexport type OutputFileLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'file';\n\tconfig?: FileWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputChartLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'chart';\n\tconfig?: ChartWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputImageLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'image';\n\tconfig?: ImageWidgetConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type OutputDynamicValueListLayoutItem = LayoutItemBase & {\n\ttype: 'output';\n\twidgetType: 'dynamicValueList';\n\tconfig: DynamicValueListOutputConfig;\n\t[k: string]: unknown | undefined;\n};\nexport type LayoutItem =\n\t| InputNumberLayoutItem\n\t| InputTextLayoutItem\n\t| InputDropdownLayoutItem\n\t| InputDynamicValueListLayoutItem\n\t| InputCheckboxLayoutItem\n\t| InputFileLayoutItem\n\t| InputColorLayoutItem\n\t| OutputTextLayoutItem\n\t| OutputNumberLayoutItem\n\t| OutputFileLayoutItem\n\t| OutputChartLayoutItem\n\t| OutputImageLayoutItem\n\t| OutputDynamicValueListLayoutItem\n\t| LineBreakLayoutItem;\nexport type LayoutConfig = TabbedLayoutConfig | FlatLayoutConfig;\nexport type InputStructure = 'item' | 'list' | 'tree';\n\n/**\n * Schema definitions for Selva UI configuration\n */\nexport interface SelvaUISchema {\n\t[k: string]: unknown | undefined;\n}\nexport interface VisibilityRule {\n\t/**\n\t * Parameter ID to watch for changes\n\t */\n\tparamId: string;\n\t/**\n\t * Comparison operator. 'contains', 'containsAny', 'isEmpty', 'isNotEmpty' apply to array-valued params (e.g., checklist value lists).\n\t */\n\toperator:\n\t\t| 'equals'\n\t\t| 'notEquals'\n\t\t| 'greaterThan'\n\t\t| 'lessThan'\n\t\t| 'greaterThanOrEqual'\n\t\t| 'lessThanOrEqual'\n\t\t| 'in'\n\t\t| 'notIn'\n\t\t| 'between'\n\t\t| 'matches'\n\t\t| 'contains'\n\t\t| 'containsAny'\n\t\t| 'isEmpty'\n\t\t| 'isNotEmpty';\n\t/**\n\t * Value to compare against (used for equals, notEquals, greaterThan, lessThan, greaterThanOrEqual, lessThanOrEqual)\n\t */\n\tvalue?: {\n\t\t[k: string]: unknown | undefined;\n\t};\n\t/**\n\t * Array of values (used for 'in', 'notIn' operators, or [min, max] for 'between')\n\t */\n\tvalues?: unknown[];\n}\nexport interface VisibilityCondition {\n\t/**\n\t * Evaluation mode: 'all' = AND (all rules must pass), 'any' = OR (at least one rule must pass)\n\t */\n\tmode?: 'all' | 'any';\n\t/**\n\t * List of rules to evaluate\n\t *\n\t * @minItems 1\n\t */\n\trules: [VisibilityRule, ...VisibilityRule[]];\n\t/**\n\t * Action to apply when condition is met: 'show' makes visible and enabled, 'hide' removes from view, 'disable' makes visible but greyed out and non-interactive\n\t */\n\taction?: 'show' | 'hide' | 'disable';\n\t/**\n\t * Default value to set for the parameter when condition is met. The value should be compatible with the parameter type (number, string, boolean, etc.)\n\t */\n\tdefaultValue?: {\n\t\t[k: string]: unknown | undefined;\n\t};\n}\nexport interface GroupVisibilityCondition {\n\t/**\n\t * Evaluation mode: 'all' = AND (all rules must pass), 'any' = OR (at least one rule must pass)\n\t */\n\tmode?: 'all' | 'any';\n\t/**\n\t * List of rules to evaluate\n\t *\n\t * @minItems 1\n\t */\n\trules: [VisibilityRule, ...VisibilityRule[]];\n\t/**\n\t * Action to apply when condition is met: 'show' makes group visible, 'hide' removes group from view\n\t */\n\taction?: 'show' | 'hide';\n}\nexport interface NumberWidgetConfig {\n\tminimum?: number;\n\tmaximum?: number;\n\tstepSize?: number;\n\tplaceholder?: string;\n\trenderAsSlider?: boolean;\n\t/**\n\t * Never show the min/max hint. Without it, a number box shows the hint beside its label while focused; sliders never show it.\n\t */\n\thideRange?: boolean;\n}\nexport interface TextWidgetConfig {\n\tplaceholder?: string;\n\trequired?: boolean;\n\t/**\n\t * Maximum character length for text input\n\t */\n\tmaxLength?: number;\n\t/**\n\t * Regex pattern for validation (e.g., email, phone)\n\t */\n\tpattern?: string;\n\t/**\n\t * Custom error message shown when pattern validation fails\n\t */\n\tcustomErrorMessage?: string;\n}\nexport interface OptionMedia {\n\t/**\n\t * Asset holding the option's icon (an OptionAsset with d).\n\t */\n\ticon?: string;\n\t/**\n\t * Asset holding the option's thumbnail (an OptionAsset with img).\n\t */\n\timage?: string;\n\t/**\n\t * Iconify name the icon was picked as (e.g. 'lucide:house'), so the builder can reopen the picker on it. Never rendered.\n\t */\n\ticonName?: string;\n}\nexport interface OptionAsset {\n\t/**\n\t * SVG path data on a 24x24 grid, drawn as a stroke (width 2, round caps and joins, no fill). Rendered as a path's d attribute, never as markup.\n\t */\n\td?: string;\n\t/**\n\t * Thumbnail as a base64 data URI. Only WebP, JPEG and PNG are accepted.\n\t */\n\timg?: string;\n\t/**\n\t * Thumbnail width in pixels\n\t */\n\tw?: number;\n\t/**\n\t * Thumbnail height in pixels\n\t */\n\th?: number;\n}\nexport interface DropdownWidgetConfig {\n\t/**\n\t * Key-value pairs for dropdown options\n\t */\n\toptions: {\n\t\t[k: string]: string | undefined;\n\t};\n\trequired?: boolean;\n\t/**\n\t * How to render the value list. 'dropdown' = single-select dropdown (value: string). 'checklist' = multi-select checkboxes (value: string[]); requires list access on the connected parameter. 'segmented' = single-select button row, shown as a dropdown when there are too many options to fit. 'tiles' = single-select grid of thumbnails.\n\t */\n\tdisplayAs?: 'dropdown' | 'checklist' | 'segmented' | 'tiles';\n\t/**\n\t * Icon and thumbnail per option, keyed by option name. Grasshopper owns options; this map is the author's and survives a re-sync.\n\t */\n\toptionMedia?: {\n\t\t[k: string]: OptionMedia | undefined;\n\t};\n}\nexport interface DynamicValueListWidgetConfig {\n\t/**\n\t * Author-provided seed list (name -> value). Shown until computed options replace it. Empty/absent means the input is empty until the first solve produces options.\n\t */\n\tdefaultOptions?: {\n\t\t[k: string]: string | undefined;\n\t};\n\t/**\n\t * What to render when there are no options yet (no defaultOptions and no computed options): 'hide' removes the field from view, 'show-empty' shows a disabled 'no options yet' control.\n\t */\n\temptyBehavior?: 'hide' | 'show-empty';\n\t/**\n\t * How to render the value list. 'dropdown' = single-select (value: string). 'checklist' = multi-select (value: string[]). 'segmented' = single-select button row, shown as a dropdown when there are too many options to fit. 'tiles' = single-select grid of thumbnails.\n\t */\n\tdisplayAs?: 'dropdown' | 'checklist' | 'segmented' | 'tiles';\n\t/**\n\t * Icon and thumbnail per option, keyed by option name. Names without an entry show text only.\n\t */\n\toptionMedia?: {\n\t\t[k: string]: OptionMedia | undefined;\n\t};\n}\nexport interface DynamicValueListOutputConfig {\n\t/**\n\t * The backend parameter's GUID (paramId) of the DynamicValueList input that this output's computed options populate.\n\t */\n\ttargetInputId: string;\n}\nexport interface CheckboxWidgetConfig {\n\t/**\n\t * 'checkbox' = a toggle whose value is sent with every solve. 'button' = a trigger: a press solves once with true, then the input goes back to false. A button holds no value in the form, so presets and value updates skip it.\n\t */\n\tdisplayAs?: 'checkbox' | 'button';\n}\nexport interface FileWidgetConfig {\n\tbuttonLabel?: string;\n\t/**\n\t * File format hint (e.g., '3dm') for setting download extension\n\t */\n\tfileFormat?: string;\n}\nexport interface FileInputWidgetConfig {\n\t/**\n\t * List of accepted file extensions (e.g., ['.3dm', '.step'])\n\t */\n\tacceptedFormats?: string[];\n\t/**\n\t * Which mode is active by default when both are allowed\n\t */\n\tdefaultInputMode?: 'upload' | 'url';\n\t/**\n\t * Which input modes the end user can choose from. If omitted, both are allowed.\n\t */\n\tallowedInputModes?: ('upload' | 'url')[];\n}\nexport interface ColorWidgetConfig {}\nexport interface LayoutItemBase {\n\t/**\n\t * Unique identifier for this layout item in the UI tree (not the parameter ID)\n\t */\n\tid: string;\n\t/**\n\t * References the backend parameter's GUID (Data Source)\n\t */\n\tparamId: string;\n\tdisplayName?: string;\n\tdescription?: string;\n\torder?: number;\n\tspan?: number;\n\t/**\n\t * Base visibility (static). If false, item is always hidden regardless of conditions.\n\t */\n\tvisible?: boolean;\n\tvisibilityCondition?: VisibilityCondition;\n\tsource?: InputSource;\n\t[k: string]: unknown | undefined;\n}\nexport interface InputSource {\n\t/**\n\t * Which data provider supplies the value. 'user' = the person types it into the form. 'client' = a browser app (e.g. a measurement/producer tool) fills it in before the form runs, not the person. 'server' = reserved for a server-side lookup that no host performs yet: the input solves with its default, a solve that posts a value for it is refused, and it is never shown in the form.\n\t */\n\tkind: 'user' | 'client' | 'server';\n\t/**\n\t * The address the host resolves to fill this input — opaque to Selva, interpreted by the host per 'kind'. For 'client' it names WHICH producer app supplies the value (e.g. 'line-app', 'file-upload') so the host pre-routes to it; for 'server' it names WHAT a resolver would fetch (e.g. 'capture.geometry'). Keys need not be unique: the same producer/fetch may fill several inputs. Ignored for kind='user'.\n\t */\n\tkey?: string;\n\t/**\n\t * How a client-sourced input appears in the form (only meaningful when kind='client'). Omitted = 'hidden': the value is prefilled silently and the input does not appear. 'slot' = Selva reserves the input's grid cell and lets the host render its own element there; Selva draws nothing itself and never interprets that element.\n\t */\n\tclient?: {\n\t\t/**\n\t\t * 'hidden' = no UI; the producer app prefills the value and the input does not appear. 'slot' = the host renders a custom element (e.g. an 'Edit JSON' button) in this input's place, referencing the producer named by 'key'.\n\t\t */\n\t\tpresentation?: 'hidden' | 'slot';\n\t};\n}\nexport interface ChartWidgetConfig {}\nexport interface ImageWidgetConfig {\n\t/**\n\t * Show a download button on the image viewer\n\t */\n\tallowDownload?: boolean;\n\t/**\n\t * Show a fullscreen toggle button on the image viewer\n\t */\n\tallowFullscreen?: boolean;\n\t/**\n\t * Optional background color shown behind the image (hex string, e.g. '#ffffff')\n\t */\n\tbackgroundColor?: string;\n}\nexport interface LineBreakLayoutItem {\n\t/**\n\t * Unique identifier for this layout item in the UI tree\n\t */\n\tid: string;\n\ttype: 'linebreak';\n}\nexport interface GroupConfig {\n\tid: string;\n\tlabel: string;\n\tdescription?: string;\n\torder?: number;\n\tcollapsed?: boolean;\n\tcolumns?: number;\n\titems: LayoutItem[];\n\tvisibilityCondition?: GroupVisibilityCondition;\n}\nexport interface TabConfig {\n\tid: string;\n\tlabel: string;\n\ticon?: string;\n\torder?: number;\n\tgroups: GroupConfig[];\n\t/**\n\t * Horizontal region where this tab should be positioned in multi-column layouts\n\t */\n\tposition?: 'left' | 'center' | 'right';\n\t/**\n\t * Base visibility (static). If false, the tab is always hidden. A tab whose groups are all hidden is hidden too.\n\t */\n\tvisible?: boolean;\n}\nexport interface TabbedLayoutConfig {\n\ttype: 'tabbed';\n\tgap?: number;\n\ttabs: TabConfig[];\n}\nexport interface FlatLayoutConfig {\n\ttype: 'flat';\n\tgap?: number;\n\tgroups: GroupConfig[];\n}\nexport interface SchemaInput {\n\t/**\n\t * Backend-specific parameter identifier (e.g. a Grasshopper InstanceGuid)\n\t */\n\tid: string;\n\tnickname: string;\n\tparamType: ParamType;\n\tdescription?: string;\n\tdefault?: unknown;\n\t/**\n\t * Data access mode: 'item' = single value, 'list' = flat list, 'tree' = branching data tree. Defaults to 'item'.\n\t */\n\tinputStructure?: 'item' | 'list' | 'tree';\n}\nexport interface SchemaOutput {\n\t/**\n\t * Backend-specific parameter identifier (e.g. a Grasshopper InstanceGuid)\n\t */\n\tid: string;\n\tnickname: string;\n\tdescription?: string;\n\t/**\n\t * Output display type\n\t */\n\ttype: 'text' | 'number' | 'file' | 'chart' | 'dynamicValueList';\n\t/**\n\t * For 'dynamicValueList' outputs: the instance GUID (paramId) of the DynamicValueList input that this output's computed options populate.\n\t */\n\ttargetInputId?: string;\n}\nexport interface ViewerOptions {\n\t/**\n\t * If true, the plugin streams display meshes to its local web preview, which then shows the 3D viewer. Selva ignores it.\n\t */\n\tenableLocal?: boolean;\n\t/**\n\t * If true, Selva draws the display meshes in the Rhino.Compute response and shows the 3D viewer. The plugin's local preview ignores it.\n\t */\n\tenableRemote?: boolean;\n\t/**\n\t * Background color for the 3D viewer as hex string (e.g., '#ffffff')\n\t */\n\tbackgroundColor?: string;\n\t/**\n\t * The viewer look a definition opens in. A viewer can still switch look from its display menu.\n\t */\n\tlook?:\n\t\t'technical' | 'studio' | 'showcase' | 'arctic' | 'xray' | 'lineart' | 'wireframe' | 'night';\n}\nexport interface LocalOptions {\n\t/**\n\t * If true, geometry picked in the Rhino viewport follows the Rhino objects it came from: editing or moving one re-solves with its new shape, deleting one drops it. If false, a pick is a snapshot.\n\t */\n\ttrackPickedObjects?: boolean;\n}\nexport interface UISchema {\n\tid: string;\n\tname: string;\n\tdescription?: string;\n\t/**\n\t * Grasshopper document file name (e.g., 'myfile.gh')\n\t */\n\tprojectFileName?: string;\n\t/**\n\t * Grasshopper document unique identifier (GUID)\n\t */\n\tdocumentId?: string;\n\t/**\n\t * Version of Selva plugin that created/last modified this schema\n\t */\n\tpluginVersion?: string;\n\t/**\n\t * Tags for the Selva library (e.g., ['architecture', 'facade']). Selva copies them into the definition when it is uploaded; after that the definition's own tags win. At most MAX_TAGS, none containing a comma.\n\t */\n\ttags?: string[];\n\t/**\n\t * Category for the Selva library (e.g., 'architecture', 'structural'). Selva copies it into the definition when it is uploaded; after that the definition's own category wins. At most MAX_CATEGORY_LENGTH characters.\n\t */\n\tcategory?: string;\n\t/**\n\t * User or organization who created the schema\n\t */\n\tauthor?: string;\n\t/**\n\t * Organization/company name\n\t */\n\torganization?: string;\n\t/**\n\t * Semantic version of the schema format (MAJOR.MINOR.PATCH)\n\t */\n\tschemaVersion: string;\n\t/**\n\t * Minimum plugin version required to load this schema\n\t */\n\tminPluginVersion?: string;\n\tcreated?: string;\n\t/**\n\t * Last modification timestamp\n\t */\n\tlastModified?: string;\n\tviewerOptions?: ViewerOptions1;\n\tlocalOptions?: LocalOptions;\n\t/**\n\t * If true, changes trigger immediate solving. If false, user must press Calculate button.\n\t */\n\tinstanceSolve?: boolean;\n\t/**\n\t * If true, edits solve as previews: file components that only feed a Download output are skipped, and a click on Download runs one full solve. If false or absent, every solve makes every file.\n\t */\n\tpreviewSolves?: boolean;\n\tinputs: SchemaInput[];\n\t/**\n\t * All output components (print, bake, file download)\n\t */\n\toutputs: SchemaOutput[];\n\tlayout: LayoutConfig;\n\t/**\n\t * Icons and thumbnails referenced by optionMedia, keyed by a hash of their content so a shared one is stored once.\n\t */\n\tassets?: {\n\t\t[k: string]: OptionAsset | undefined;\n\t};\n}\n/**\n * Configuration for the 3D viewer\n */\nexport interface ViewerOptions1 {\n\t/**\n\t * If true, the plugin streams display meshes to its local web preview, which then shows the 3D viewer. Selva ignores it.\n\t */\n\tenableLocal?: boolean;\n\t/**\n\t * If true, Selva draws the display meshes in the Rhino.Compute response and shows the 3D viewer. The plugin's local preview ignores it.\n\t */\n\tenableRemote?: boolean;\n\t/**\n\t * Background color for the 3D viewer as hex string (e.g., '#ffffff')\n\t */\n\tbackgroundColor?: string;\n\t/**\n\t * The viewer look a definition opens in. A viewer can still switch look from its display menu.\n\t */\n\tlook?:\n\t\t'technical' | 'studio' | 'showcase' | 'arctic' | 'xray' | 'lineart' | 'wireframe' | 'night';\n}\n\n// ============================================================================\n// CONSTANTS (from schema)\n// ============================================================================\n\nexport const ACCEPTED_FILE_FORMATS = [\n\t'.3dm',\n\t'.stp',\n\t'.step',\n\t'.fbx',\n\t'.obj',\n\t'.dxf',\n\t'.stl'\n] as const;\nexport const MAX_TAGS = 5 as const;\nexport const MAX_CATEGORY_LENGTH = 40 as const;\n\n/** Current UISchema format version (from ui-schema.json's schemaVersion default). */\nexport const UI_SCHEMA_VERSION = '2.20.0';\n\n// ============================================================================\n// TYPE ALIASES AND GUARDS (derived from the LayoutItem union)\n// ============================================================================\n\nexport type InputLayoutItem =\n\t| InputNumberLayoutItem\n\t| InputTextLayoutItem\n\t| InputDropdownLayoutItem\n\t| InputDynamicValueListLayoutItem\n\t| InputCheckboxLayoutItem\n\t| InputFileLayoutItem\n\t| InputColorLayoutItem;\nexport type OutputLayoutItem =\n\t| OutputTextLayoutItem\n\t| OutputNumberLayoutItem\n\t| OutputFileLayoutItem\n\t| OutputChartLayoutItem\n\t| OutputImageLayoutItem\n\t| OutputDynamicValueListLayoutItem;\nexport type SupportedTypes = string | number | boolean | string[];\n\nexport function isInputLayoutItem(item: LayoutItem): item is InputLayoutItem {\n\treturn item.type === 'input';\n}\n\nexport function isOutputLayoutItem(item: LayoutItem): item is OutputLayoutItem {\n\treturn item.type === 'output';\n}\n\nexport function isLineBreakLayoutItem(item: LayoutItem): item is LineBreakLayoutItem {\n\treturn item.type === 'linebreak';\n}\n\nexport function isNumberWidget(item: LayoutItem): item is InputNumberLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'number';\n}\n\nexport function isTextWidget(item: LayoutItem): item is InputTextLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'text';\n}\n\nexport function isDropdownWidget(item: LayoutItem): item is InputDropdownLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'dropdown';\n}\n\nexport function isDynamicValueListWidget(\n\titem: LayoutItem\n): item is InputDynamicValueListLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'dynamicValueList';\n}\n\nexport function isCheckboxWidget(item: LayoutItem): item is InputCheckboxLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'checkbox';\n}\n\nexport function isFileWidget(item: LayoutItem): item is InputFileLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'file';\n}\n\nexport function isColorWidget(item: LayoutItem): item is InputColorLayoutItem {\n\treturn item.type === 'input' && item.widgetType === 'color';\n}\n\nexport function isTextOutputWidget(item: LayoutItem): item is OutputTextLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'text';\n}\n\nexport function isNumberOutputWidget(item: LayoutItem): item is OutputNumberLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'number';\n}\n\nexport function isFileOutputWidget(item: LayoutItem): item is OutputFileLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'file';\n}\n\nexport function isChartOutputWidget(item: LayoutItem): item is OutputChartLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'chart';\n}\n\nexport function isImageOutputWidget(item: LayoutItem): item is OutputImageLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'image';\n}\n\nexport function isDynamicValueListOutputWidget(\n\titem: LayoutItem\n): item is OutputDynamicValueListLayoutItem {\n\treturn item.type === 'output' && item.widgetType === 'dynamicValueList';\n}\n"],"mappings":";;AA2kBA,IAAa,oBAAoB;AAmCjC,SAAgB,eAAe,MAAiD;CAC/E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,aAAa,MAA+C;CAC3E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,iBAAiB,MAAmD;CACnF,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,yBACf,MAC0C;CAC1C,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,iBAAiB,MAAmD;CACnF,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,aAAa,MAA+C;CAC3E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD;AAEA,SAAgB,cAAc,MAAgD;CAC7E,OAAO,KAAK,SAAS,WAAW,KAAK,eAAe;AACrD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/scroll-text.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "scroll-text",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/search.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "search",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Lt as escape_html, i as bind_props, kt as clsx, r as attributes, t as attr_class } from "./server3.js";
|
|
2
|
-
import { t as cn } from "./
|
|
2
|
+
import { t as cn } from "./utils.js";
|
|
3
3
|
import { t as Search$1 } from "./search.js";
|
|
4
4
|
import { t as X } from "./x.js";
|
|
5
5
|
// ../ui/src/lib/components/primitives/search/search.svelte
|
|
@@ -3,7 +3,7 @@ import { r as on } from "./events.js";
|
|
|
3
3
|
import { n as SvelteMap } from "./index-server.js";
|
|
4
4
|
import "./index-server2.js";
|
|
5
5
|
import { a as boolToTrueOrUndef, c as getDataOpenClosed, f as mergeProps, i as boolToStrTrueOrUndef, l as getDataTransitionAttrs, m as executeCallbacks, n as boolToEmptyStrOrUndef, o as createBitsAttrs, r as boolToStr, t as createId, u as attachRef, y as boxWith } from "./create-id.js";
|
|
6
|
-
import { t as cn } from "./
|
|
6
|
+
import { t as cn } from "./utils.js";
|
|
7
7
|
import { a as Floating_layer, i as getFloatingContentCSSVars, n as Popper_layer, o as Check, r as Floating_layer_anchor, t as Popper_layer_force_mount } from "./popper-layer-force-mount.js";
|
|
8
8
|
import { t as Chevron_down } from "./chevron-down.js";
|
|
9
9
|
import { t as Chevron_up } from "./chevron-up.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as derived, d as spread_props, i as bind_props, kt as clsx, l as props_id, r as attributes } from "./server3.js";
|
|
2
2
|
import { f as mergeProps, i as boolToStrTrueOrUndef, o as createBitsAttrs, t as createId, u as attachRef, y as boxWith } from "./create-id.js";
|
|
3
|
-
import { n as Icon, t as cn } from "./
|
|
3
|
+
import { n as Icon, t as cn } from "./utils.js";
|
|
4
4
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/ellipsis.svelte
|
|
5
|
-
var __iconData$
|
|
5
|
+
var __iconData$4 = {
|
|
6
6
|
"name": "ellipsis",
|
|
7
7
|
"size": 24,
|
|
8
8
|
"node": [
|
|
@@ -24,13 +24,13 @@ var __iconData$3 = {
|
|
|
24
24
|
],
|
|
25
25
|
"aliases": ["more-horizontal"]
|
|
26
26
|
};
|
|
27
|
-
__iconData$
|
|
27
|
+
__iconData$4.node;
|
|
28
28
|
function Ellipsis($$renderer, $$props) {
|
|
29
29
|
let { $$slots, $$events, ...props } = $$props;
|
|
30
|
-
Icon($$renderer, spread_props([props, { icon: __iconData$
|
|
30
|
+
Icon($$renderer, spread_props([props, { icon: __iconData$4 }]));
|
|
31
31
|
}
|
|
32
32
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/file-up.svelte
|
|
33
|
-
var __iconData$
|
|
33
|
+
var __iconData$3 = {
|
|
34
34
|
"name": "file-up",
|
|
35
35
|
"size": 24,
|
|
36
36
|
"node": [
|
|
@@ -40,8 +40,20 @@ var __iconData$2 = {
|
|
|
40
40
|
["path", { "d": "m15 15-3-3-3 3" }]
|
|
41
41
|
]
|
|
42
42
|
};
|
|
43
|
-
__iconData$
|
|
43
|
+
__iconData$3.node;
|
|
44
44
|
function File_up($$renderer, $$props) {
|
|
45
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
46
|
+
Icon($$renderer, spread_props([props, { icon: __iconData$3 }]));
|
|
47
|
+
}
|
|
48
|
+
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/loader-circle.svelte
|
|
49
|
+
var __iconData$2 = {
|
|
50
|
+
"name": "loader-circle",
|
|
51
|
+
"size": 24,
|
|
52
|
+
"node": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]],
|
|
53
|
+
"aliases": ["loader-2"]
|
|
54
|
+
};
|
|
55
|
+
__iconData$2.node;
|
|
56
|
+
function Loader_circle($$renderer, $$props) {
|
|
45
57
|
let { $$slots, $$events, ...props } = $$props;
|
|
46
58
|
Icon($$renderer, spread_props([props, { icon: __iconData$2 }]));
|
|
47
59
|
}
|
|
@@ -181,6 +193,6 @@ function Separator($$renderer, $$props) {
|
|
|
181
193
|
bind_props($$props, { ref });
|
|
182
194
|
});
|
|
183
195
|
}
|
|
184
|
-
export {
|
|
196
|
+
export { Loader_circle as a, Play as i, Dialog_footer as n, File_up as o, Upload as r, Ellipsis as s, Separator as t };
|
|
185
197
|
|
|
186
198
|
//# sourceMappingURL=separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.js","names":["__iconData","__iconNode","$.spread_props","__iconData","__iconNode","$.spread_props","__iconData","__iconNode","$.spread_props","$.spread_props","$.derived","Separator","$.props_id","$.derived","$.attributes","$.attributes","$.clsx","SeparatorPrimitive.Root","$.spread_props"],"sources":["../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/ellipsis.svelte","../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/file-up.svelte","../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/play.svelte","../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/upload.svelte","../../../../../node_modules/.pnpm/bits-ui@2.20.2_@internationalized+date@3.12.4_@sveltejs+kit@3.1.1_@opentelemetry+api@1._ee0cc2dca752cac163e62e76ab57f1b7/node_modules/bits-ui/dist/bits/separator/separator.svelte.js","../../../../../node_modules/.pnpm/bits-ui@2.20.2_@internationalized+date@3.12.4_@sveltejs+kit@3.1.1_@opentelemetry+api@1._ee0cc2dca752cac163e62e76ab57f1b7/node_modules/bits-ui/dist/bits/separator/components/separator.svelte","../../../../ui/src/lib/components/primitives/dialog/dialog-footer.svelte","../../../../ui/src/lib/components/primitives/separator/separator.svelte"],"sourcesContent":["<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"ellipsis\", \"size\": 24, \"node\": [[\"circle\", { \"cx\": \"12\", \"cy\": \"12\", \"r\": \"1\" }], [\"circle\", { \"cx\": \"19\", \"cy\": \"12\", \"r\": \"1\" }], [\"circle\", { \"cx\": \"5\", \"cy\": \"12\", \"r\": \"1\" }]], \"aliases\": [\"more-horizontal\"] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/ellipsis\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"file-up\", \"size\": 24, \"node\": [[\"path\", { \"d\": \"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" }], [\"path\", { \"d\": \"M14 2v5a1 1 0 0 0 1 1h5\" }], [\"path\", { \"d\": \"M12 12v6\" }], [\"path\", { \"d\": \"m15 15-3-3-3 3\" }]] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/file-up\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"play\", \"size\": 24, \"node\": [[\"path\", { \"d\": \"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" }]] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/play\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"upload\", \"size\": 24, \"node\": [[\"path\", { \"d\": \"M12 3v12\" }], [\"path\", { \"d\": \"m17 8-5-5-5 5\" }], [\"path\", { \"d\": \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" }]] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/upload\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","import { attachRef } from \"svelte-toolbelt\";\nimport { createBitsAttrs, boolToStrTrueOrUndef } from \"../../internal/attrs.js\";\nconst separatorAttrs = createBitsAttrs({\n component: \"separator\",\n parts: [\"root\"],\n});\nexport class SeparatorRootState {\n static create(opts) {\n return new SeparatorRootState(opts);\n }\n opts;\n attachment;\n constructor(opts) {\n this.opts = opts;\n this.attachment = attachRef(opts.ref);\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n role: this.opts.decorative.current ? \"none\" : \"separator\",\n \"aria-orientation\": this.opts.orientation.current,\n \"aria-hidden\": boolToStrTrueOrUndef(this.opts.decorative.current),\n \"data-orientation\": this.opts.orientation.current,\n [separatorAttrs.root]: \"\",\n ...this.attachment,\n }));\n}\n","<script lang=\"ts\">\n\timport { boxWith, mergeProps } from \"svelte-toolbelt\";\n\timport { SeparatorRootState } from \"../separator.svelte.js\";\n\timport type { SeparatorRootProps } from \"../types.js\";\n\timport { createId } from \"../../../internal/create-id.js\";\n\n\tconst uid = $props.id();\n\n\tlet {\n\t\tid = createId(uid),\n\t\tref = $bindable(null),\n\t\tchild,\n\t\tchildren,\n\t\tdecorative = false,\n\t\torientation = \"horizontal\",\n\t\t...restProps\n\t}: SeparatorRootProps = $props();\n\n\tconst rootState = SeparatorRootState.create({\n\t\tref: boxWith(\n\t\t\t() => ref,\n\t\t\t(v) => (ref = v)\n\t\t),\n\t\tid: boxWith(() => id),\n\t\tdecorative: boxWith(() => decorative),\n\t\torientation: boxWith(() => orientation),\n\t});\n\n\tconst mergedProps = $derived(mergeProps(restProps, rootState.props));\n</script>\n\n{#if child}\n\t{@render child({ props: mergedProps })}\n{:else}\n\t<div {...mergedProps}>\n\t\t{@render children?.()}\n\t</div>\n{/if}\n","<script lang=\"ts\">\n\timport { cn, type WithElementRef } from '#lib/utils.js';\n\timport type { HTMLAttributes } from 'svelte/elements';\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tchildren,\n\t\t...restProps\n\t}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();\n</script>\n\n<div\n\tbind:this={ref}\n\tdata-slot=\"dialog-footer\"\n\tclass={cn('gap-2 sm:flex-row sm:justify-end flex flex-col-reverse', className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>\n","<script lang=\"ts\">\n\timport { Separator as SeparatorPrimitive } from 'bits-ui';\n\timport { cn } from '#lib/utils.js';\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\t'data-slot': dataSlot = 'separator',\n\t\t...restProps\n\t}: SeparatorPrimitive.RootProps = $props();\n</script>\n\n<SeparatorPrimitive.Root\n\tbind:ref\n\tdata-slot={dataSlot}\n\tclass={cn(\n\t\t'shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:min-h-full data-[orientation=vertical]:w-px',\n\t\tclassName\n\t)}\n\t{...restProps}\n/>\n"],"ignoreList":[0,1,2,3,4,5],"mappings":";;;;AAQyB,IAAaA,eAAU;CAAK,QAAQ;CAAY,QAAQ;CAAI,QAAM;EAAI,CAAA,UAAQ;GAAI,MAAM;GAAM,MAAM;GAAM,KAAK;EAAG,CAAA;EAAM,CAAA,UAAQ;GAAI,MAAM;GAAM,MAAM;GAAM,KAAK;EAAG,CAAA;EAAM,CAA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AEK,WAAQ,UAAA;;;CARV,CAAA;;;;CCVR,WAAA,WAAA,eAAA;EAIC,IAAI,EACH,MAAgB,MAChB,OAAO,WACP,aAAa,WAAW,a,mBACrB,GAAA,c;;;;;;;;MAMO,aAAA;MACJ,OAAA,GACN,sKACA,SAAA;;KAEG;;;;;;;;;;;;;;;;;;;;;;;;CATG,CAAA"}
|
|
1
|
+
{"version":3,"file":"separator.js","names":["__iconData","__iconNode","$.spread_props","__iconData","__iconNode","$.spread_props","__iconData","__iconNode","$.spread_props","__iconData","__iconNode","$.spread_props","$.spread_props","$.derived","Separator","$.props_id","$.derived","$.attributes","$.attributes","$.clsx","SeparatorPrimitive.Root","$.spread_props"],"sources":["../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/ellipsis.svelte","../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/file-up.svelte","../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/loader-circle.svelte","../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/play.svelte","../../../../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/upload.svelte","../../../../../node_modules/.pnpm/bits-ui@2.20.2_@internationalized+date@3.12.4_@sveltejs+kit@3.1.1_@opentelemetry+api@1._ee0cc2dca752cac163e62e76ab57f1b7/node_modules/bits-ui/dist/bits/separator/separator.svelte.js","../../../../../node_modules/.pnpm/bits-ui@2.20.2_@internationalized+date@3.12.4_@sveltejs+kit@3.1.1_@opentelemetry+api@1._ee0cc2dca752cac163e62e76ab57f1b7/node_modules/bits-ui/dist/bits/separator/components/separator.svelte","../../../../ui/src/lib/components/primitives/dialog/dialog-footer.svelte","../../../../ui/src/lib/components/primitives/separator/separator.svelte"],"sourcesContent":["<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"ellipsis\", \"size\": 24, \"node\": [[\"circle\", { \"cx\": \"12\", \"cy\": \"12\", \"r\": \"1\" }], [\"circle\", { \"cx\": \"19\", \"cy\": \"12\", \"r\": \"1\" }], [\"circle\", { \"cx\": \"5\", \"cy\": \"12\", \"r\": \"1\" }]], \"aliases\": [\"more-horizontal\"] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/ellipsis\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"file-up\", \"size\": 24, \"node\": [[\"path\", { \"d\": \"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\" }], [\"path\", { \"d\": \"M14 2v5a1 1 0 0 0 1 1h5\" }], [\"path\", { \"d\": \"M12 12v6\" }], [\"path\", { \"d\": \"m15 15-3-3-3 3\" }]] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/file-up\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"loader-circle\", \"size\": 24, \"node\": [[\"path\", { \"d\": \"M21 12a9 9 0 1 1-6.219-8.56\" }]], \"aliases\": [\"loader-2\"] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/loader-circle\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"play\", \"size\": 24, \"node\": [[\"path\", { \"d\": \"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" }]] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/play\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","<!--\n@lucide/svelte v1.66.0 - ISC\n\nThis source code is licensed under the ISC license.\nSee the LICENSE file in the root directory of this source tree.\n-->\n\n\n<script module lang=\"ts\">export const __iconData = { \"name\": \"upload\", \"size\": 24, \"node\": [[\"path\", { \"d\": \"M12 3v12\" }], [\"path\", { \"d\": \"m17 8-5-5-5 5\" }], [\"path\", { \"d\": \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\" }]] };\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode = __iconData.node;\n</script>\n\n<script lang=\"ts\">import Icon from '../Icon.svelte';\nlet props = $props();\n</script>\n\n<!--\n@component\n\nLucide SVG icon component, renders SVG Element with children.\n\n@preview  - https://lucide.dev/icons/upload\n@see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n-->\n\n<Icon {...props} icon={__iconData} />\n","import { attachRef } from \"svelte-toolbelt\";\nimport { createBitsAttrs, boolToStrTrueOrUndef } from \"../../internal/attrs.js\";\nconst separatorAttrs = createBitsAttrs({\n component: \"separator\",\n parts: [\"root\"],\n});\nexport class SeparatorRootState {\n static create(opts) {\n return new SeparatorRootState(opts);\n }\n opts;\n attachment;\n constructor(opts) {\n this.opts = opts;\n this.attachment = attachRef(opts.ref);\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n role: this.opts.decorative.current ? \"none\" : \"separator\",\n \"aria-orientation\": this.opts.orientation.current,\n \"aria-hidden\": boolToStrTrueOrUndef(this.opts.decorative.current),\n \"data-orientation\": this.opts.orientation.current,\n [separatorAttrs.root]: \"\",\n ...this.attachment,\n }));\n}\n","<script lang=\"ts\">\n\timport { boxWith, mergeProps } from \"svelte-toolbelt\";\n\timport { SeparatorRootState } from \"../separator.svelte.js\";\n\timport type { SeparatorRootProps } from \"../types.js\";\n\timport { createId } from \"../../../internal/create-id.js\";\n\n\tconst uid = $props.id();\n\n\tlet {\n\t\tid = createId(uid),\n\t\tref = $bindable(null),\n\t\tchild,\n\t\tchildren,\n\t\tdecorative = false,\n\t\torientation = \"horizontal\",\n\t\t...restProps\n\t}: SeparatorRootProps = $props();\n\n\tconst rootState = SeparatorRootState.create({\n\t\tref: boxWith(\n\t\t\t() => ref,\n\t\t\t(v) => (ref = v)\n\t\t),\n\t\tid: boxWith(() => id),\n\t\tdecorative: boxWith(() => decorative),\n\t\torientation: boxWith(() => orientation),\n\t});\n\n\tconst mergedProps = $derived(mergeProps(restProps, rootState.props));\n</script>\n\n{#if child}\n\t{@render child({ props: mergedProps })}\n{:else}\n\t<div {...mergedProps}>\n\t\t{@render children?.()}\n\t</div>\n{/if}\n","<script lang=\"ts\">\n\timport { cn, type WithElementRef } from '#lib/utils.js';\n\timport type { HTMLAttributes } from 'svelte/elements';\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tchildren,\n\t\t...restProps\n\t}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();\n</script>\n\n<div\n\tbind:this={ref}\n\tdata-slot=\"dialog-footer\"\n\tclass={cn('gap-2 sm:flex-row sm:justify-end flex flex-col-reverse', className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>\n","<script lang=\"ts\">\n\timport { Separator as SeparatorPrimitive } from 'bits-ui';\n\timport { cn } from '#lib/utils.js';\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\t'data-slot': dataSlot = 'separator',\n\t\t...restProps\n\t}: SeparatorPrimitive.RootProps = $props();\n</script>\n\n<SeparatorPrimitive.Root\n\tbind:ref\n\tdata-slot={dataSlot}\n\tclass={cn(\n\t\t'shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:min-h-full data-[orientation=vertical]:w-px',\n\t\tclassName\n\t)}\n\t{...restProps}\n/>\n"],"ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;AAQyB,IAAaA,eAAU;CAAK,QAAQ;CAAY,QAAQ;CAAI,QAAM;EAAI,CAAA,UAAQ;GAAI,MAAM;GAAM,MAAM;GAAM,KAAK;EAAG,CAAA;EAAM,CAAA,UAAQ;GAAI,MAAM;GAAM,MAAM;GAAM,KAAK;EAAG,CAAA;EAAM,CAAA,UAAQ;GAAI,MAAM;GAAK,MAAM;GAAM,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AAA;;;GAE1B,WAAA,KAAA,iBAAAC,WAAA,EAAA,GAAA,YAAW,EAAA,CAAA,EAAA,EAAA;GACV,WAAQ,UAAA;;;;;CANX,CAAA;;;;CC7BR,WAAA,WAAA,eAAA;EAIC,IAAI,EACH,MAAgB,MAChB,OAAO,WACP,U,mBACG,GAAA,c;;;GAOG,OAAAE,KAAA,GAAG,0DAA0D,SAAS,CAAA;GACzE,GAAA;;EAEK,WAAQ,UAAA;;;CARV,CAAA;;;;CCVR,WAAA,WAAA,eAAA;EAIC,IAAI,EACH,MAAgB,MAChB,OAAO,WACP,aAAa,WAAW,a,mBACrB,GAAA,c;;;;;;;;MAMO,aAAA;MACJ,OAAA,GACN,sKACA,SAAA;;KAEG;;;;;;;;;;;;;;;;;;;;;;;;CATG,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as isEncryptedSecret } from "./providers.server.js";
|
|
2
2
|
import { A as apiError, it as trimTrailing, k as ApiErrorCode } from "./access.js";
|
|
3
3
|
import { r as GuidSchema } from "./schemas.js";
|
|
4
4
|
import { n as isLinkLocalUrl } from "./safe-url.js";
|
|
@@ -91,14 +91,14 @@ function validateIncomingServers(servers) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* A key
|
|
95
|
-
* the field omitted would write `undefined` over
|
|
96
|
-
*
|
|
97
|
-
*
|
|
94
|
+
* A key the store could not open reads as `hasApiKey` with no `apiKey`. Saving with
|
|
95
|
+
* the field omitted would write `undefined` over it, destroying the key the logs
|
|
96
|
+
* tell the operator how to recover. Replacing or clearing it is a decision, so
|
|
97
|
+
* those pass.
|
|
98
98
|
*/
|
|
99
99
|
function assertStoredKeysReadable(incoming, stored) {
|
|
100
100
|
const unreadable = new Set(stored.filter((s) => s.hasApiKey && !s.apiKey).map((s) => s.id));
|
|
101
|
-
for (const s of incoming) if (unreadable.has(s.id) && (s.apiKey === void 0 || s.apiKey === "")) apiError(409, ApiErrorCode.CONFLICT, `The stored key for server ${s.id} cannot be
|
|
101
|
+
for (const s of incoming) if (unreadable.has(s.id) && (s.apiKey === void 0 || s.apiKey === "")) apiError(409, ApiErrorCode.CONFLICT, `The stored key for server ${s.id} cannot be read. Re-enter the key, or see the server log for how to recover it.`);
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* An omitted key is kept, so without this check anyone who may save the config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-config-write.js","names":[],"sources":["../../../../server/src/compute/evict-changed-servers.ts","../../../../server/src/compute/server-config-write.ts"],"sourcesContent":["/**\n * A warm compute client caches on server `id`, so a rotated `serverUrl`/`apiKey`\n * keeps the same cache key with stale connection details — it never ages out on\n * its own. The config-write path has to evict explicitly.\n *\n * The eviction sink is a parameter rather than an import: which cache holds the\n * warm clients is the host's decision, and importing one would drag a whole\n * solve engine into every consumer that only wants the diff.\n */\n\n/** The connection-identifying fields — a change in either makes the warm client stale. */\nexport interface ServerConnection {\n\tid: string;\n\tserverUrl: string;\n\tapiKey?: string;\n}\n\n/**\n * Drop the warm client for every server that was removed or whose connection\n * details changed. `prev` and `next` are the scoped server sets before and\n * after the write; unchanged servers are left alone.\n */\nexport function evictChangedServers(\n\tprev: readonly ServerConnection[],\n\tnext: readonly ServerConnection[],\n\tevict: (id: string) => void\n): void {\n\tconst nextById = new Map(next.map((s) => [s.id, s]));\n\n\t// Removed: no longer in `next`.\n\tfor (const before of prev) {\n\t\tif (!nextById.has(before.id)) evict(before.id);\n\t}\n\n\t// Rotated: same id, different URL or key.\n\tconst prevById = new Map(prev.map((s) => [s.id, s]));\n\tfor (const after of next) {\n\t\tconst before = prevById.get(after.id);\n\t\tif (before && (before.serverUrl !== after.serverUrl || before.apiKey !== after.apiKey)) {\n\t\t\tevict(after.id);\n\t\t}\n\t}\n}\n","/**\n * Shared write-path rules for compute server config.\n *\n * Two routes accept a server set: `/api/admin/compute` (platform scope,\n * `manage_compute`) and `/api/v1/orgs/{orgId}/compute` (org scope,\n * `manage_org_compute`). They differ in who may call them, what extra fields\n * they carry (`sharedWith` vs `ownerOrgId`), and how they validate the default\n * selection — but the field validation and the apiKey merge below must behave\n * identically in both, so they live here rather than in either handler.\n *\n * The apiKey merge is why this file exists: if the two copies disagree, a\n * stored credential silently gets cleared or leaked, and nothing fails at\n * build time.\n */\n\nimport { GuidSchema, trimTrailing } from '@selvajs/platform';\nimport { isEncryptedSecret } from '@selvajs/platform/computeServer';\nimport { isLinkLocalUrl } from './safe-url.js';\nimport { apiError, ApiErrorCode } from '../api/errors.js';\n\n/**\n * A stored `serverUrl` is fetched server-side on every status probe, every\n * purge/shutdown action, and every solve, so an unfiltered one is an SSRF\n * primitive handed to whoever holds `manage_compute`. Two rules:\n *\n * - Scheme allowlist: `http`/`https`. `file:`, `gopher:` and friends are never\n * a Rhino.Compute endpoint.\n * - Link-local (`169.254.0.0/16`) is refused. That range carries the cloud\n * metadata service at `169.254.169.254`, which hands out the host's own IAM\n * credentials to anything running on the box.\n *\n * **Loopback and RFC1918 are deliberately allowed.** Running compute on\n * `localhost:6500` or a LAN box is the ordinary self-hosted layout, not an\n * attack — most deployments reach their compute server over exactly those\n * addresses. Blocking them by default would break those instances on upgrade\n * and push every operator toward an opt-out flag, and a guard that everyone\n * disables protects nobody. So the check is narrowed to the range where no\n * legitimate compute server ever lives.\n *\n * What this does not stop: a privileged admin pointing the app at an internal\n * host to probe it. That is a real but much weaker concern than credential\n * theft, it needs `manage_compute` already, and it is inseparable from the\n * legitimate case. Revisit if `manage_org_compute` is ever delegated widely on\n * a multi-tenant instance.\n *\n * `isLinkLocalUrl` is reused rather than hand-rolled because a string compare\n * against `169.254.169.254` misses the encodings that reach the same address:\n * `http://2852039166/`, `http://0xa9fea9fe/`, `http://0251.0376.0251.0376/`.\n */\nfunction assertUsableServerUrl(serverUrl: string): void {\n\tlet parsed: URL;\n\ttry {\n\t\tparsed = new URL(serverUrl);\n\t} catch {\n\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `Invalid serverUrl: ${serverUrl}`);\n\t}\n\tif (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `serverUrl must use http or https: ${serverUrl}`);\n\t}\n\tif (isLinkLocalUrl(serverUrl)) {\n\t\tapiError(\n\t\t\t400,\n\t\t\tApiErrorCode.VALIDATION_FAILED,\n\t\t\t`serverUrl points at the link-local range, which carries the cloud metadata service: ${serverUrl}`\n\t\t);\n\t}\n}\n\n/** The fields every incoming server carries, whatever its scope. */\nexport interface IncomingServerBase {\n\tid: string;\n\tlabel: string;\n\tserverUrl: string;\n\t/**\n\t * `undefined` → preserve the stored key; `null` → clear it;\n\t * non-empty string → replace it. See {@link resolveApiKey}.\n\t */\n\tapiKey?: string | null;\n}\n\n/**\n * Validates the scope-independent fields of every submitted server. Throws the\n * first failure as a 400; scope-specific fields (`sharedWith`, `ownerOrgId`)\n * are the caller's business.\n */\nexport function validateIncomingServers(servers: readonly IncomingServerBase[]): void {\n\tconst seen = new Set<string>();\n\tfor (const s of servers) {\n\t\tif (!s.id || typeof s.id !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'Each server needs an id');\n\t\tif (!GuidSchema.safeParse(s.id).success)\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `Server id must be a UUID: ${s.id}`);\n\t\tif (seen.has(s.id))\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `Server id appears more than once: ${s.id}`);\n\t\tseen.add(s.id);\n\t\tif (!s.label || typeof s.label !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'Each server needs a label');\n\t\tif (!s.serverUrl || typeof s.serverUrl !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'Each server needs a serverUrl');\n\t\tassertUsableServerUrl(s.serverUrl);\n\t\tif (s.apiKey !== undefined && s.apiKey !== null && typeof s.apiKey !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'apiKey must be a string, null, or omitted');\n\t\t// Clients never receive stored keys, so an envelope here is someone else's\n\t\t// ciphertext being replayed against a URL they control.\n\t\tif (s.apiKey && isEncryptedSecret(s.apiKey))\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'apiKey must be a plaintext key');\n\t}\n}\n\n/**\n * A key that failed to decrypt reads as `hasApiKey` with no `apiKey`. Saving with\n * the field omitted would write `undefined` over the ciphertext, destroying the\n * key the logs tell the operator to recover by restoring `SELVA_AT_REST_KEY`.\n * Replacing or clearing it is a decision, so those pass.\n */\nexport function assertStoredKeysReadable(\n\tincoming: readonly Pick<IncomingServerBase, 'id' | 'apiKey'>[],\n\tstored: readonly { id: string; apiKey?: string; hasApiKey?: boolean }[]\n): void {\n\tconst unreadable = new Set(stored.filter((s) => s.hasApiKey && !s.apiKey).map((s) => s.id));\n\tfor (const s of incoming) {\n\t\tif (unreadable.has(s.id) && (s.apiKey === undefined || s.apiKey === '')) {\n\t\t\tapiError(\n\t\t\t\t409,\n\t\t\t\tApiErrorCode.CONFLICT,\n\t\t\t\t`The stored key for server ${s.id} cannot be decrypted. Restore the original SELVA_AT_REST_KEY, or re-enter the key.`\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * An omitted key is kept, so without this check anyone who may save the config\n * could point a server at their own host and have the next solve send them the\n * stored key, which they never saw. Moving a server needs the key re-entered or\n * cleared.\n */\nexport function assertKeyNotRetargeted(\n\tincoming: readonly Pick<IncomingServerBase, 'id' | 'serverUrl' | 'apiKey'>[],\n\tstored: readonly { id: string; serverUrl: string; apiKey?: string; hasApiKey?: boolean }[]\n): void {\n\tconst byId = new Map(stored.map((s) => [s.id, s]));\n\tfor (const s of incoming) {\n\t\tconst prev = byId.get(s.id);\n\t\tif (!prev || !(prev.hasApiKey || prev.apiKey)) continue;\n\t\tif (s.apiKey === null || (typeof s.apiKey === 'string' && s.apiKey !== '')) continue;\n\t\tif (sameServerUrl(prev.serverUrl, s.serverUrl)) continue;\n\t\tapiError(\n\t\t\t409,\n\t\t\tApiErrorCode.CONFLICT,\n\t\t\t`Server ${s.id} has a new URL. Re-enter its API key, or clear it, to save.`\n\t\t);\n\t}\n}\n\nfunction sameServerUrl(a: string, b: string): boolean {\n\tconst normalize = (u: string) => {\n\t\ttry {\n\t\t\treturn trimTrailing(new URL(u.trim()).href, '/');\n\t\t} catch {\n\t\t\treturn trimTrailing(u.trim(), '/');\n\t\t}\n\t};\n\treturn normalize(a) === normalize(b);\n}\n\n/**\n * The UI never receives stored keys — it sends back `hasApiKey` and omits the\n * field for servers the operator didn't touch. So \"omitted\" cannot mean \"clear\":\n * it has to preserve, or every save through the settings form would wipe the\n * keys of every server the operator left alone. Clearing is explicit (`null`);\n * an empty string is treated as \"not provided\" since that's what an untouched\n * password input submits.\n */\nexport function resolveApiKey(\n\tsubmitted: string | null | undefined,\n\tstoredKey: string | undefined\n): string | undefined {\n\tif (submitted === null) return undefined;\n\treturn submitted ? submitted : storedKey;\n}\n\n/**\n * Builds the id → stored-key lookup the merge reads. The caller passes only the\n * servers in its own scope, so one scope's write can never resolve a key from\n * another's rows.\n */\nexport function storedKeysById(\n\tscopedServers: readonly { id: string; apiKey?: string }[]\n): Map<string, string | undefined> {\n\treturn new Map(scopedServers.map((s) => [s.id, s.apiKey]));\n}\n\n/**\n * The whole apiKey merge for one scope's write: refuses an unreadable or\n * retargeted key with 409, then returns the key to store for each submitted id.\n * `scopedStored` must be read with `includeApiKeys` and hold only the caller's\n * scope.\n */\nexport function mergeApiKeys(\n\tincoming: readonly Pick<IncomingServerBase, 'id' | 'serverUrl' | 'apiKey'>[],\n\tscopedStored: readonly { id: string; serverUrl: string; apiKey?: string; hasApiKey?: boolean }[]\n): Map<string, string | undefined> {\n\tassertStoredKeysReadable(incoming, scopedStored);\n\tassertKeyNotRetargeted(incoming, scopedStored);\n\tconst stored = storedKeysById(scopedStored);\n\treturn new Map(incoming.map((s) => [s.id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ACD;AACD;AAEA,SAAS,cAAc,GAAW,GAAoB;CACrD,MAAM,aAAa,MAAc;EAChC,IAAI;GACH,OAAO,aAAa,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG;EAChD,QAAQ;GACP,OAAO,aAAa,EAAE,KAAK,GAAG,GAAG;EAClC;CACD;CACA,OAAO,UAAU,CAAC,MAAM,UAAU,CAAC;AACpC;;;;;;;;;AAUA,SAAgB,cACf,WACA,WACqB;CACrB,IAAI,cAAc,MAAM,OAAO,KAAA;CAC/B,OAAO,YAAY,YAAY;AAChC;;;;;;AAOA,SAAgB,eACf,eACkC;CAClC,OAAO,IAAI,IAAI,cAAc,KAAK,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC1D;;;;;;;AAQA,SAAgB,aACf,UACA,cACkC;CAClC,yBAAyB,UAAU,YAAY;CAC/C,uBAAuB,UAAU,YAAY;CAC7C,MAAM,SAAS,eAAe,YAAY;CAC1C,OAAO,IAAI,IAAI,SAAS,KAAK,MAAM,CAAC,EAAE,IAAI,cAAc,EAAE,QAAQ,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AACtF"}
|
|
1
|
+
{"version":3,"file":"server-config-write.js","names":[],"sources":["../../../../server/src/compute/evict-changed-servers.ts","../../../../server/src/compute/server-config-write.ts"],"sourcesContent":["/**\n * A warm compute client caches on server `id`, so a rotated `serverUrl`/`apiKey`\n * keeps the same cache key with stale connection details — it never ages out on\n * its own. The config-write path has to evict explicitly.\n *\n * The eviction sink is a parameter rather than an import: which cache holds the\n * warm clients is the host's decision, and importing one would drag a whole\n * solve engine into every consumer that only wants the diff.\n */\n\n/** The connection-identifying fields — a change in either makes the warm client stale. */\nexport interface ServerConnection {\n\tid: string;\n\tserverUrl: string;\n\tapiKey?: string;\n}\n\n/**\n * Drop the warm client for every server that was removed or whose connection\n * details changed. `prev` and `next` are the scoped server sets before and\n * after the write; unchanged servers are left alone.\n */\nexport function evictChangedServers(\n\tprev: readonly ServerConnection[],\n\tnext: readonly ServerConnection[],\n\tevict: (id: string) => void\n): void {\n\tconst nextById = new Map(next.map((s) => [s.id, s]));\n\n\t// Removed: no longer in `next`.\n\tfor (const before of prev) {\n\t\tif (!nextById.has(before.id)) evict(before.id);\n\t}\n\n\t// Rotated: same id, different URL or key.\n\tconst prevById = new Map(prev.map((s) => [s.id, s]));\n\tfor (const after of next) {\n\t\tconst before = prevById.get(after.id);\n\t\tif (before && (before.serverUrl !== after.serverUrl || before.apiKey !== after.apiKey)) {\n\t\t\tevict(after.id);\n\t\t}\n\t}\n}\n","/**\n * Shared write-path rules for compute server config.\n *\n * Two routes accept a server set: `/api/admin/compute` (platform scope,\n * `manage_compute`) and `/api/v1/orgs/{orgId}/compute` (org scope,\n * `manage_org_compute`). They differ in who may call them, what extra fields\n * they carry (`sharedWith` vs `ownerOrgId`), and how they validate the default\n * selection — but the field validation and the apiKey merge below must behave\n * identically in both, so they live here rather than in either handler.\n *\n * The apiKey merge is why this file exists: if the two copies disagree, a\n * stored credential silently gets cleared or leaked, and nothing fails at\n * build time.\n */\n\nimport { GuidSchema, trimTrailing } from '@selvajs/platform';\nimport { isEncryptedSecret } from '@selvajs/platform/computeServer';\nimport { isLinkLocalUrl } from './safe-url.js';\nimport { apiError, ApiErrorCode } from '../api/errors.js';\n\n/**\n * A stored `serverUrl` is fetched server-side on every status probe, every\n * purge/shutdown action, and every solve, so an unfiltered one is an SSRF\n * primitive handed to whoever holds `manage_compute`. Two rules:\n *\n * - Scheme allowlist: `http`/`https`. `file:`, `gopher:` and friends are never\n * a Rhino.Compute endpoint.\n * - Link-local (`169.254.0.0/16`) is refused. That range carries the cloud\n * metadata service at `169.254.169.254`, which hands out the host's own IAM\n * credentials to anything running on the box.\n *\n * **Loopback and RFC1918 are deliberately allowed.** Running compute on\n * `localhost:6500` or a LAN box is the ordinary self-hosted layout, not an\n * attack — most deployments reach their compute server over exactly those\n * addresses. Blocking them by default would break those instances on upgrade\n * and push every operator toward an opt-out flag, and a guard that everyone\n * disables protects nobody. So the check is narrowed to the range where no\n * legitimate compute server ever lives.\n *\n * What this does not stop: a privileged admin pointing the app at an internal\n * host to probe it. That is a real but much weaker concern than credential\n * theft, it needs `manage_compute` already, and it is inseparable from the\n * legitimate case. Revisit if `manage_org_compute` is ever delegated widely on\n * a multi-tenant instance.\n *\n * `isLinkLocalUrl` is reused rather than hand-rolled because a string compare\n * against `169.254.169.254` misses the encodings that reach the same address:\n * `http://2852039166/`, `http://0xa9fea9fe/`, `http://0251.0376.0251.0376/`.\n */\nfunction assertUsableServerUrl(serverUrl: string): void {\n\tlet parsed: URL;\n\ttry {\n\t\tparsed = new URL(serverUrl);\n\t} catch {\n\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `Invalid serverUrl: ${serverUrl}`);\n\t}\n\tif (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `serverUrl must use http or https: ${serverUrl}`);\n\t}\n\tif (isLinkLocalUrl(serverUrl)) {\n\t\tapiError(\n\t\t\t400,\n\t\t\tApiErrorCode.VALIDATION_FAILED,\n\t\t\t`serverUrl points at the link-local range, which carries the cloud metadata service: ${serverUrl}`\n\t\t);\n\t}\n}\n\n/** The fields every incoming server carries, whatever its scope. */\nexport interface IncomingServerBase {\n\tid: string;\n\tlabel: string;\n\tserverUrl: string;\n\t/**\n\t * `undefined` → preserve the stored key; `null` → clear it;\n\t * non-empty string → replace it. See {@link resolveApiKey}.\n\t */\n\tapiKey?: string | null;\n}\n\n/**\n * Validates the scope-independent fields of every submitted server. Throws the\n * first failure as a 400; scope-specific fields (`sharedWith`, `ownerOrgId`)\n * are the caller's business.\n */\nexport function validateIncomingServers(servers: readonly IncomingServerBase[]): void {\n\tconst seen = new Set<string>();\n\tfor (const s of servers) {\n\t\tif (!s.id || typeof s.id !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'Each server needs an id');\n\t\tif (!GuidSchema.safeParse(s.id).success)\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `Server id must be a UUID: ${s.id}`);\n\t\tif (seen.has(s.id))\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, `Server id appears more than once: ${s.id}`);\n\t\tseen.add(s.id);\n\t\tif (!s.label || typeof s.label !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'Each server needs a label');\n\t\tif (!s.serverUrl || typeof s.serverUrl !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'Each server needs a serverUrl');\n\t\tassertUsableServerUrl(s.serverUrl);\n\t\tif (s.apiKey !== undefined && s.apiKey !== null && typeof s.apiKey !== 'string')\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'apiKey must be a string, null, or omitted');\n\t\t// Clients never receive stored keys, so an envelope here is someone else's\n\t\t// ciphertext being replayed against a URL they control.\n\t\tif (s.apiKey && isEncryptedSecret(s.apiKey))\n\t\t\tapiError(400, ApiErrorCode.VALIDATION_FAILED, 'apiKey must be a plaintext key');\n\t}\n}\n\n/**\n * A key the store could not open reads as `hasApiKey` with no `apiKey`. Saving with\n * the field omitted would write `undefined` over it, destroying the key the logs\n * tell the operator how to recover. Replacing or clearing it is a decision, so\n * those pass.\n */\nexport function assertStoredKeysReadable(\n\tincoming: readonly Pick<IncomingServerBase, 'id' | 'apiKey'>[],\n\tstored: readonly { id: string; apiKey?: string; hasApiKey?: boolean }[]\n): void {\n\tconst unreadable = new Set(stored.filter((s) => s.hasApiKey && !s.apiKey).map((s) => s.id));\n\tfor (const s of incoming) {\n\t\tif (unreadable.has(s.id) && (s.apiKey === undefined || s.apiKey === '')) {\n\t\t\tapiError(\n\t\t\t\t409,\n\t\t\t\tApiErrorCode.CONFLICT,\n\t\t\t\t`The stored key for server ${s.id} cannot be read. Re-enter the key, or see the server log for how to recover it.`\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * An omitted key is kept, so without this check anyone who may save the config\n * could point a server at their own host and have the next solve send them the\n * stored key, which they never saw. Moving a server needs the key re-entered or\n * cleared.\n */\nexport function assertKeyNotRetargeted(\n\tincoming: readonly Pick<IncomingServerBase, 'id' | 'serverUrl' | 'apiKey'>[],\n\tstored: readonly { id: string; serverUrl: string; apiKey?: string; hasApiKey?: boolean }[]\n): void {\n\tconst byId = new Map(stored.map((s) => [s.id, s]));\n\tfor (const s of incoming) {\n\t\tconst prev = byId.get(s.id);\n\t\tif (!prev || !(prev.hasApiKey || prev.apiKey)) continue;\n\t\tif (s.apiKey === null || (typeof s.apiKey === 'string' && s.apiKey !== '')) continue;\n\t\tif (sameServerUrl(prev.serverUrl, s.serverUrl)) continue;\n\t\tapiError(\n\t\t\t409,\n\t\t\tApiErrorCode.CONFLICT,\n\t\t\t`Server ${s.id} has a new URL. Re-enter its API key, or clear it, to save.`\n\t\t);\n\t}\n}\n\nfunction sameServerUrl(a: string, b: string): boolean {\n\tconst normalize = (u: string) => {\n\t\ttry {\n\t\t\treturn trimTrailing(new URL(u.trim()).href, '/');\n\t\t} catch {\n\t\t\treturn trimTrailing(u.trim(), '/');\n\t\t}\n\t};\n\treturn normalize(a) === normalize(b);\n}\n\n/**\n * The UI never receives stored keys — it sends back `hasApiKey` and omits the\n * field for servers the operator didn't touch. So \"omitted\" cannot mean \"clear\":\n * it has to preserve, or every save through the settings form would wipe the\n * keys of every server the operator left alone. Clearing is explicit (`null`);\n * an empty string is treated as \"not provided\" since that's what an untouched\n * password input submits.\n */\nexport function resolveApiKey(\n\tsubmitted: string | null | undefined,\n\tstoredKey: string | undefined\n): string | undefined {\n\tif (submitted === null) return undefined;\n\treturn submitted ? submitted : storedKey;\n}\n\n/**\n * Builds the id → stored-key lookup the merge reads. The caller passes only the\n * servers in its own scope, so one scope's write can never resolve a key from\n * another's rows.\n */\nexport function storedKeysById(\n\tscopedServers: readonly { id: string; apiKey?: string }[]\n): Map<string, string | undefined> {\n\treturn new Map(scopedServers.map((s) => [s.id, s.apiKey]));\n}\n\n/**\n * The whole apiKey merge for one scope's write: refuses an unreadable or\n * retargeted key with 409, then returns the key to store for each submitted id.\n * `scopedStored` must be read with `includeApiKeys` and hold only the caller's\n * scope.\n */\nexport function mergeApiKeys(\n\tincoming: readonly Pick<IncomingServerBase, 'id' | 'serverUrl' | 'apiKey'>[],\n\tscopedStored: readonly { id: string; serverUrl: string; apiKey?: string; hasApiKey?: boolean }[]\n): Map<string, string | undefined> {\n\tassertStoredKeysReadable(incoming, scopedStored);\n\tassertKeyNotRetargeted(incoming, scopedStored);\n\tconst stored = storedKeysById(scopedStored);\n\treturn new Map(incoming.map((s) => [s.id, resolveApiKey(s.apiKey, stored.get(s.id))]));\n}\n"],"mappings":";;;;;;;;;;AAsBA,SAAgB,oBACf,MACA,MACA,OACO;CACP,MAAM,WAAW,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;CAGnD,KAAK,MAAM,UAAU,MACpB,IAAI,CAAC,SAAS,IAAI,OAAO,EAAE,GAAG,MAAM,OAAO,EAAE;CAI9C,MAAM,WAAW,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;CACnD,KAAK,MAAM,SAAS,MAAM;EACzB,MAAM,SAAS,SAAS,IAAI,MAAM,EAAE;EACpC,IAAI,WAAW,OAAO,cAAc,MAAM,aAAa,OAAO,WAAW,MAAM,SAC9E,MAAM,MAAM,EAAE;CAEhB;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACOA,SAAS,sBAAsB,WAAyB;CACvD,IAAI;CACJ,IAAI;EACH,SAAS,IAAI,IAAI,SAAS;CAC3B,QAAQ;EACP,SAAS,KAAK,aAAa,mBAAmB,sBAAsB,WAAW;CAChF;CACA,IAAI,OAAO,aAAa,WAAW,OAAO,aAAa,UACtD,SAAS,KAAK,aAAa,mBAAmB,qCAAqC,WAAW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MS } from "./oauth.js";
|
|
2
1
|
import { t as hmacKeys } from "./keys.server.js";
|
|
3
2
|
import { t as createComputeRateLimiter } from "./rate-limit.js";
|
|
4
3
|
import { t as assertSafeRemoteDefinitionUrl } from "./safe-url.js";
|
|
5
4
|
import { n as readBodyWithCap } from "./remote-definition.js";
|
|
6
5
|
import "./compute.js";
|
|
6
|
+
import { a as createOAuthServer, t as CODE_TTL_MS } from "./oauth.js";
|
|
7
7
|
import "./tokens.js";
|
|
8
8
|
import { json } from "@sveltejs/kit";
|
|
9
9
|
// src/lib/server/oauth/server.ts
|
|
@@ -101,6 +101,6 @@ var DISCOVERY_HEADERS = {
|
|
|
101
101
|
"Access-Control-Allow-Origin": "*",
|
|
102
102
|
"Cache-Control": "public, max-age=3600"
|
|
103
103
|
};
|
|
104
|
-
export {
|
|
104
|
+
export { oauthUnavailable as a, oauthServer as i, expectRedemption as n, oauthRateLimited as r, DISCOVERY_HEADERS as t };
|
|
105
105
|
|
|
106
106
|
//# sourceMappingURL=server2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server2.js","names":[],"sources":["../../../src/lib/server/oauth/server.ts"],"sourcesContent":["/**\n * This instance's OAuth authorization server for MCP clients. The protocol lives\n * in `@selvajs/server/oauth`; this file supplies the secret, the SSRF-guarded\n * metadata fetch and the per-IP limit the endpoints share.\n */\n\nimport { json, type RequestEvent } from '@sveltejs/kit';\nimport { hmacKeys } from '#lib/server/keys.server.js';\nimport {\n\tassertSafeRemoteDefinitionUrl,\n\tcreateComputeRateLimiter,\n\treadBodyWithCap\n} from '@selvajs/server/compute';\nimport { CODE_TTL_MS, createOAuthServer, type OAuthServer } from '@selvajs/server/oauth';\nimport { MIN_TOKEN_SECRET_LENGTH } from '@selvajs/server/tokens';\n\nconst METADATA_TIMEOUT_MS = 5_000;\nconst METADATA_MAX_BYTES = 64 * 1024;\n\n// One slot, as for `/mcp`: the origin comes from the request, so a map would grow\n// with whatever hosts a caller sends. Re-keyed on the secret, like the token codecs.\nlet cached: { origin: string; secret: string; server: OAuthServer } | null = null;\n// Outlives `cached`, so rebuilding the server for another origin can't forget a redeemed code.\nconst redeemedCodes = new Map<string, number>();\n\n// The key is minted at consent, before its code is redeemed. A client that never\n// exchanges the code would leave a live key nobody holds, so it is revoked once\n// the code can no longer be redeemed. Lost on restart: best effort.\nconst ABANDON_AFTER_MS = CODE_TTL_MS + 60_000;\nconst unredeemed = new Map<string, ReturnType<typeof setTimeout>>();\n\n/** Revoke `tokenId` with `revoke` unless its code is redeemed in time. */\nexport function expectRedemption(tokenId: string, revoke: () => Promise<void>): void {\n\tconst timer = setTimeout(() => {\n\t\tunredeemed.delete(tokenId);\n\t\trevoke().catch(() => {});\n\t}, ABANDON_AFTER_MS);\n\ttimer.unref?.();\n\tunredeemed.set(tokenId, timer);\n}\n\nfunction onRedeemed(tokenId: string): void {\n\tclearTimeout(unredeemed.get(tokenId));\n\tunredeemed.delete(tokenId);\n}\n\n/** Whether `oauthServer` would build one, without building it. */\
|
|
1
|
+
{"version":3,"file":"server2.js","names":[],"sources":["../../../src/lib/server/oauth/server.ts"],"sourcesContent":["/**\n * This instance's OAuth authorization server for MCP clients. The protocol lives\n * in `@selvajs/server/oauth`; this file supplies the secret, the SSRF-guarded\n * metadata fetch and the per-IP limit the endpoints share.\n */\n\nimport { json, type RequestEvent } from '@sveltejs/kit';\nimport { hmacKeys } from '#lib/server/keys.server.js';\nimport {\n\tassertSafeRemoteDefinitionUrl,\n\tcreateComputeRateLimiter,\n\treadBodyWithCap\n} from '@selvajs/server/compute';\nimport { CODE_TTL_MS, createOAuthServer, type OAuthServer } from '@selvajs/server/oauth';\nimport { MIN_TOKEN_SECRET_LENGTH } from '@selvajs/server/tokens';\n\nconst METADATA_TIMEOUT_MS = 5_000;\nconst METADATA_MAX_BYTES = 64 * 1024;\n\n// One slot, as for `/mcp`: the origin comes from the request, so a map would grow\n// with whatever hosts a caller sends. Re-keyed on the secret, like the token codecs.\nlet cached: { origin: string; secret: string; server: OAuthServer } | null = null;\n// Outlives `cached`, so rebuilding the server for another origin can't forget a redeemed code.\nconst redeemedCodes = new Map<string, number>();\n\n// The key is minted at consent, before its code is redeemed. A client that never\n// exchanges the code would leave a live key nobody holds, so it is revoked once\n// the code can no longer be redeemed. Lost on restart: best effort.\nconst ABANDON_AFTER_MS = CODE_TTL_MS + 60_000;\nconst unredeemed = new Map<string, ReturnType<typeof setTimeout>>();\n\n/** Revoke `tokenId` with `revoke` unless its code is redeemed in time. */\nexport function expectRedemption(tokenId: string, revoke: () => Promise<void>): void {\n\tconst timer = setTimeout(() => {\n\t\tunredeemed.delete(tokenId);\n\t\trevoke().catch(() => {});\n\t}, ABANDON_AFTER_MS);\n\ttimer.unref?.();\n\tunredeemed.set(tokenId, timer);\n}\n\nfunction onRedeemed(tokenId: string): void {\n\tclearTimeout(unredeemed.get(tokenId));\n\tunredeemed.delete(tokenId);\n}\n\n/** Whether `oauthServer` would build one, without building it. */\nfunction oauthConfigured(): boolean {\n\tconst secret = hmacKeys().current;\n\treturn Boolean(secret && secret.length >= MIN_TOKEN_SECRET_LENGTH);\n}\n\n/** Undefined without a usable SELVA_HMAC_KEY: the endpoints then answer 503. */\nexport function oauthServer(origin: string): OAuthServer | undefined {\n\tif (!oauthConfigured()) return undefined;\n\tconst { current, previous } = hmacKeys();\n\tconst secret = current!;\n\tconst cacheKey = `${secret}\\n${previous ?? ''}`;\n\tif (cached?.origin !== origin || cached.secret !== cacheKey) {\n\t\tcached = {\n\t\t\torigin,\n\t\t\tsecret: cacheKey,\n\t\t\tserver: createOAuthServer({\n\t\t\t\torigin,\n\t\t\t\tsecret,\n\t\t\t\t...(previous ? { previousSecret: previous } : {}),\n\t\t\t\tfetchClientMetadata,\n\t\t\t\tredeemedCodes,\n\t\t\t\tonRedeemed\n\t\t\t})\n\t\t};\n\t}\n\treturn cached.server;\n}\n\n/** The URL is an unknown client's, so it goes through the same guard as remote definitions. */\nasync function fetchClientMetadata(url: string): Promise<unknown> {\n\tawait assertSafeRemoteDefinitionUrl(url);\n\tconst controller = new AbortController();\n\tconst timer = setTimeout(() => controller.abort(), METADATA_TIMEOUT_MS);\n\ttry {\n\t\tconst res = await fetch(url, {\n\t\t\theaders: { Accept: 'application/json' },\n\t\t\tredirect: 'error',\n\t\t\tsignal: controller.signal\n\t\t});\n\t\tif (!res.ok) throw new Error(`HTTP ${res.status}`);\n\t\t// Counted while streaming: a body with no or a lying Content-Length must not buffer whole.\n\t\tconst bytes = await readBodyWithCap(res, METADATA_MAX_BYTES, controller);\n\t\treturn JSON.parse(new TextDecoder().decode(bytes));\n\t} finally {\n\t\tclearTimeout(timer);\n\t}\n}\n\n// Registration and token exchange take no credential, so the IP is the only key.\nconst limiter = createComputeRateLimiter({ windowMs: 60_000, maxPerWindow: 30 });\n\n/** A 429 response when the caller's IP is over the limit, else undefined. */\nexport function oauthRateLimited(event: RequestEvent): Response | undefined {\n\tconst verdict = limiter.check(`oauth:${event.getClientAddress()}`);\n\tif (verdict.allowed) return undefined;\n\treturn json(\n\t\t{ error: 'slow_down', error_description: 'Too many requests. Try again shortly.' },\n\t\t{ status: 429, headers: { 'Retry-After': String(verdict.retryAfter ?? 60) } }\n\t);\n}\n\nexport function oauthUnavailable(): Response {\n\treturn json(\n\t\t{ error: 'temporarily_unavailable', error_description: 'OAuth is not configured here.' },\n\t\t{ status: 503 }\n\t);\n}\n\n/** Discovery documents are read by browser-based clients too. */\nexport const DISCOVERY_HEADERS = {\n\t'Access-Control-Allow-Origin': '*',\n\t'Cache-Control': 'public, max-age=3600'\n};\n"],"mappings":";;;;;;;;;;;;;;AAgBA,IAAM,sBAAsB;AAC5B,IAAM,qBAAqB;AAI3B,IAAI,SAAyE;AAE7E,IAAM,gCAAgB,IAAI,IAAoB;AAK9C,IAAM,mBAAmB,cAAc;AACvC,IAAM,6BAAa,IAAI,IAA2C;;AAGlE,SAAgB,iBAAiB,SAAiB,QAAmC;CACpF,MAAM,QAAQ,iBAAiB;EAC9B,WAAW,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AAE,UAAU;CAAQ,cAAc;AAAG,CAAC;;AAG/E,SAAgB,iBAAiB,OAA2C;CAC3E,MAAM,UAAU,QAAQ,MAAM,SAAS,MAAM,iBAAiB,GAAG;CACjE,IAAI,QAAQ,SAAS,OAAO,KAAA;CAC5B,OAAO,KACN;EAAE,OAAO;EAAa,mBAAmB;CAAwC,GACjF;EAAE,QAAQ;EAAK,SAAS,EAAE,eAAe,OAAO,QAAQ,cAAc,EAAE,EAAE;CAAE,CAC7E;AACD;AAEA,SAAgB,mBAA6B;CAC5C,OAAO,KACN;EAAE,OAAO;EAA2B,mBAAmB;CAAgC,GACvF,EAAE,QAAQ,IAAI,CACf;AACD;;AAGA,IAAa,oBAAoB;CAChC,+BAA+B;CAC/B,iBAAiB;AAClB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/server.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "server",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as ErrorCodes, t as ComputeServerStats, u as ComputeError } from "./grasshopper.js";
|
|
2
2
|
// src/lib/server/compute/serverStats.server.ts
|
|
3
3
|
/**
|
|
4
4
|
* `ComputeServerStats` for a stored server. An unusable stored URL or key is the operator's to fix,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/settings.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "settings",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/circle-alert.svelte
|
|
4
4
|
var __iconData$4 = {
|
|
5
5
|
"name": "circle-alert",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/shield-check.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "shield-check",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as spread_props } from "./server3.js";
|
|
2
|
-
import { n as Icon } from "./
|
|
2
|
+
import { n as Icon } from "./utils.js";
|
|
3
3
|
// ../../node_modules/.pnpm/@lucide+svelte@1.66.0_svelte@5.57.3_@typescript-eslint+types@8.72.1_/node_modules/@lucide/svelte/dist/icons/shield.svelte
|
|
4
4
|
var __iconData = {
|
|
5
5
|
"name": "shield",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as getAuthProvider } from "./providers.server.js";
|
|
2
2
|
import { n as env } from "./previous-key.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as signInIsStale, s as resolveSignInMaxAgeMs } from "./http.js";
|
|
4
4
|
import { a as destroySession, s as getSessionToken } from "./admin-auth.server.js";
|
|
5
5
|
import { redirect } from "@sveltejs/kit";
|
|
6
6
|
// src/lib/server/signInMaxAge.server.ts
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as postedServerSourcedIds, N as MAX_SOLVE_DEADLINE_MS, R as solveInputsFromSchema, T as providers, b as getSolveMetricSink, w as lazyLogger, x as getStorageProvider } from "./providers.server.js";
|
|
2
2
|
import { E as scoped, M as isApiError, N as toErrorBody, O as ApiError, d as requireCanEditDefinition, h as requireCanSolve, k as ApiErrorCode } from "./access.js";
|
|
3
3
|
import { t as hmacKeys } from "./keys.server.js";
|
|
4
|
-
import {
|
|
4
|
+
import { A as rateLimitedResponse, D as chargeApiRateLimit, M as withRateLimitHeaders, N as assertScope } from "./api.js";
|
|
5
5
|
import { t as createRemoteDefinitionFetcher } from "./remote-definition.js";
|
|
6
|
-
import {
|
|
6
|
+
import { f as ComputeServerUnconfiguredError, o as fetchSchemaFromCompute } from "./schema-extraction.js";
|
|
7
7
|
import "./compute.js";
|
|
8
8
|
import { n as renderThrown } from "./definitions.js";
|
|
9
|
-
import {
|
|
9
|
+
import { d as ErrorCodes, u as ComputeError } from "./grasshopper.js";
|
|
10
10
|
import { t as apiError } from "./api-errors.js";
|
|
11
11
|
import "./access2.server.js";
|
|
12
|
-
import {
|
|
13
|
-
import { n as COMPUTE_DEBUG_VERBOSE, o as engine, t as COMPUTE_DEBUG } from "./engine.server.js";
|
|
12
|
+
import { S as REMOTE_DEFINITION_MAX_BYTES, b as REMOTE_DEFINITION_CACHE_TTL_MS, n as COMPUTE_DEBUG_VERBOSE, s as engine, t as COMPUTE_DEBUG, x as REMOTE_DEFINITION_FETCH_TIMEOUT_MS } from "./engine.server.js";
|
|
14
13
|
import { t as serverResolver } from "./serverResolver.server.js";
|
|
15
14
|
import { n as checkComputeRateLimit, t as apiRateLimiter } from "./computeRateLimit.server.js";
|
|
16
15
|
import { n as liveOwnerKey, r as solveEndedKind, t as bindLiveSolve } from "./liveSolve.server.js";
|
|
@@ -106,7 +105,7 @@ function admittedSolveInputs(schema, inputs, values) {
|
|
|
106
105
|
* that mapping through `mapSolveError`.
|
|
107
106
|
*/
|
|
108
107
|
async function runSolve(params) {
|
|
109
|
-
const { access, definitionUrl, inputs, values, channel, versionId: explicitVersionId, request, locals, loadStart, prepMarks, concealAccessFailure = false, streamId = null, tokenCharged = false } = params;
|
|
108
|
+
const { access, definitionUrl, inputs, values, channel, versionId: explicitVersionId, request, locals, loadStart, prepMarks, concealAccessFailure = false, streamId = null, solveMode = "full", tokenCharged = false } = params;
|
|
110
109
|
const storage = getStorageProvider();
|
|
111
110
|
const sharedAccess = access.kind === "share" ? access : null;
|
|
112
111
|
const solveCtx = access.ctx;
|
|
@@ -282,7 +281,8 @@ async function runSolve(params) {
|
|
|
282
281
|
defLoadMs,
|
|
283
282
|
prepMarks,
|
|
284
283
|
selvaEvents: live.selvaEvents,
|
|
285
|
-
sessionId: solveSessionId(access, guid)
|
|
284
|
+
sessionId: solveSessionId(access, guid),
|
|
285
|
+
solveMode
|
|
286
286
|
});
|
|
287
287
|
} finally {
|
|
288
288
|
live.end(outcome ? solveEndedKind(outcome) : "error");
|