fnloom 0.3.0 → 0.4.1
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/README.md +27 -20
- package/package.json +14 -11
- package/packages/build/package.json +2 -2
- package/packages/build/src/tests.ts +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +2 -2
- package/packages/cli/src/command.ts +2 -2
- package/packages/cli/src/commands/install.ts +1 -1
- package/packages/cli/src/commands/mcp.ts +6 -6
- package/packages/cli/src/commands/store.ts +3 -3
- package/packages/cli/src/hub.ts +25 -25
- package/packages/cli/src/index.ts +1 -1
- package/packages/cli/src/io.ts +2 -2
- package/packages/cli/src/local.ts +7 -7
- package/packages/cli/src/premade.ts +1 -1
- package/packages/core/package.json +4 -4
- package/packages/core/src/auto-pair.ts +1 -1
- package/packages/core/src/connections.ts +1 -14
- package/packages/core/src/context-graph.ts +1 -1
- package/packages/core/src/data.ts +1 -1
- package/packages/core/src/gin-a.ts +13 -2
- package/packages/core/src/https.ts +2 -2
- package/packages/core/src/identity.ts +1 -1
- package/packages/core/src/image-embeddings.ts +1 -1
- package/packages/core/src/index.ts +5 -7
- package/packages/core/src/link.ts +1 -1
- package/packages/core/src/manifest.ts +2 -2
- package/packages/core/src/mention-search.ts +1 -1
- package/packages/core/src/model-calls.ts +1 -1
- package/packages/core/src/package.ts +1 -1
- package/packages/core/src/ports.ts +2 -2
- package/packages/core/src/query.ts +1 -1
- package/packages/core/src/records/chat.ts +1 -1
- package/packages/core/src/records/runs.ts +1 -1
- package/packages/core/src/records/spend.ts +4 -0
- package/packages/core/src/registries.ts +9 -3
- package/packages/core/src/sso.ts +2 -2
- package/packages/core/src/stores.ts +1 -1
- package/packages/core/src/suggestions.ts +2 -2
- package/packages/core/src/system-pages.ts +32 -6
- package/packages/core/src/tables.ts +233 -0
- package/packages/core/src/visuals.ts +47 -139
- package/packages/core/src/web.ts +2 -2
- package/packages/core/src/widgets-v1.ts +78 -1
- package/packages/hub/package.json +13 -11
- package/packages/hub/src/api/admin-ops.ts +5 -5
- package/packages/hub/src/api/auth.ts +2 -2
- package/packages/hub/src/api/https.ts +6 -6
- package/packages/hub/src/api/identities.ts +1 -1
- package/packages/hub/src/api/reads.ts +1 -1
- package/packages/hub/src/api/secrets.ts +1 -1
- package/packages/hub/src/api/serve.ts +2 -2
- package/packages/hub/src/api/sso-route.ts +2 -2
- package/packages/hub/src/api/sso.ts +6 -6
- package/packages/hub/src/api/store-ops.ts +9 -2
- package/packages/hub/src/api/testing/rig.ts +1 -1
- package/packages/hub/src/api/tls.ts +2 -2
- package/packages/hub/src/api/web/auth.ts +1 -1
- package/packages/hub/src/api/web/find.ts +1 -1
- package/packages/hub/src/api/web/pages.ts +4 -3
- package/packages/hub/src/api/web/pickers.ts +4 -4
- package/packages/hub/src/boot/env.ts +82 -78
- package/packages/hub/src/boot/hub-fns.ts +1 -1
- package/packages/hub/src/boot/identity.ts +2 -2
- package/packages/hub/src/boot/index.ts +1 -1
- package/packages/hub/src/boot/info.ts +1 -1
- package/packages/hub/src/boot/keys.ts +6 -6
- package/packages/hub/src/boot/log.ts +4 -4
- package/packages/hub/src/boot/modules.ts +4 -4
- package/packages/hub/src/boot/services.ts +9 -9
- package/packages/hub/src/boot/start.ts +23 -23
- package/packages/hub/src/catalog/catalog.ts +3 -2
- package/packages/hub/src/chat/cache.ts +1 -1
- package/packages/hub/src/chat/chat.ts +1 -1
- package/packages/hub/src/chat/compare.ts +2 -2
- package/packages/hub/src/chat/deliveries.ts +1 -1
- package/packages/hub/src/chat/deps.ts +3 -3
- package/packages/hub/src/chat/enrich.ts +7 -7
- package/packages/hub/src/chat/env.ts +20 -20
- package/packages/hub/src/chat/mention-requests.ts +1 -1
- package/packages/hub/src/chat/mention-search.ts +1 -1
- package/packages/hub/src/chat/mentions.ts +3 -3
- package/packages/hub/src/chat/notifications.ts +2 -2
- package/packages/hub/src/chat/presence.ts +2 -2
- package/packages/hub/src/chat/sessions.ts +2 -2
- package/packages/hub/src/chat/suggestions.ts +8 -8
- package/packages/hub/src/chat/testing.ts +1 -1
- package/packages/hub/src/chat/turns.ts +6 -6
- package/packages/hub/src/chat/undo.ts +1 -1
- package/packages/hub/src/connections/create.ts +1 -1
- package/packages/hub/src/connections/env.ts +2 -2
- package/packages/hub/src/connections/service.ts +5 -9
- package/packages/hub/src/contextor/contextors.ts +9 -9
- package/packages/hub/src/contextor/crawl.ts +1 -1
- package/packages/hub/src/contextor/create.ts +5 -5
- package/packages/hub/src/contextor/dynamic.ts +5 -5
- package/packages/hub/src/contextor/env.ts +46 -46
- package/packages/hub/src/contextor/injected.ts +1 -1
- package/packages/hub/src/contextor/limits.ts +9 -9
- package/packages/hub/src/contextor/planner.ts +11 -11
- package/packages/hub/src/contextor/testing.ts +1 -1
- package/packages/hub/src/data/env.ts +3 -3
- package/packages/hub/src/data/service.ts +5 -5
- package/packages/hub/src/execution/agent.ts +8 -8
- package/packages/hub/src/execution/ai.ts +7 -7
- package/packages/hub/src/execution/create.ts +11 -6
- package/packages/hub/src/execution/env.ts +16 -16
- package/packages/hub/src/execution/executors.ts +2 -2
- package/packages/hub/src/execution/gateway.ts +1 -1
- package/packages/hub/src/execution/index.ts +1 -1
- package/packages/hub/src/execution/ledger.ts +2 -2
- package/packages/hub/src/execution/limits.ts +2 -2
- package/packages/hub/src/execution/models.ts +2 -2
- package/packages/hub/src/execution/ports.ts +1 -1
- package/packages/hub/src/execution/providers.ts +55 -11
- package/packages/hub/src/execution/queues.ts +6 -6
- package/packages/hub/src/execution/runs.ts +10 -10
- package/packages/hub/src/execution/stream-guard.ts +2 -2
- package/packages/hub/src/execution/testing.ts +5 -5
- package/packages/hub/src/execution/wire.ts +3 -3
- package/packages/hub/src/fns/auto.ts +2 -2
- package/packages/hub/src/fns/client-logs.ts +2 -2
- package/packages/hub/src/fns/create.ts +2 -2
- package/packages/hub/src/fns/decided.ts +2 -2
- package/packages/hub/src/fns/env.ts +14 -14
- package/packages/hub/src/fns/examples.ts +3 -3
- package/packages/hub/src/fns/facts.ts +5 -5
- package/packages/hub/src/fns/search.ts +5 -5
- package/packages/hub/src/graph/graph.ts +1 -1
- package/packages/hub/src/index/context-sections.ts +1 -1
- package/packages/hub/src/index/embedders.ts +3 -3
- package/packages/hub/src/index/env.ts +12 -12
- package/packages/hub/src/index/index.ts +1 -1
- package/packages/hub/src/index/indexer.ts +4 -4
- package/packages/hub/src/index/search.ts +1 -1
- package/packages/hub/src/index/testing.ts +2 -2
- package/packages/hub/src/link/build.ts +32 -32
- package/packages/hub/src/link/env.ts +14 -14
- package/packages/hub/src/link/grants.ts +10 -10
- package/packages/hub/src/link/lifecycle.ts +4 -4
- package/packages/hub/src/link/migrate-api.ts +55 -15
- package/packages/hub/src/link/pairing.ts +1 -1
- package/packages/hub/src/link/process.ts +1 -1
- package/packages/hub/src/link/rig.ts +12 -12
- package/packages/hub/src/link/supervisor.ts +1 -1
- package/packages/hub/src/mcp/calls.ts +6 -6
- package/packages/hub/src/mcp/create.ts +5 -5
- package/packages/hub/src/mcp/env.ts +6 -6
- package/packages/hub/src/mcp/fns.ts +2 -2
- package/packages/hub/src/mcp/index.ts +2 -2
- package/packages/hub/src/mcp/sources.ts +3 -3
- package/packages/hub/src/mcp/tokens.ts +1 -1
- package/packages/hub/src/models/create.ts +1 -1
- package/packages/hub/src/models/decide.ts +2 -2
- package/packages/hub/src/models/index.ts +1 -1
- package/packages/hub/src/models/roles.ts +12 -12
- package/packages/hub/src/query/env.ts +5 -5
- package/packages/hub/src/query/sources.ts +3 -3
- package/packages/hub/src/questions/plans.ts +1 -1
- package/packages/hub/src/questions/worker.ts +2 -2
- package/packages/hub/src/resources/context.ts +3 -3
- package/packages/hub/src/resources/converters.ts +2 -2
- package/packages/hub/src/resources/create.ts +6 -6
- package/packages/hub/src/resources/env.ts +15 -15
- package/packages/hub/src/resources/fetch.ts +5 -5
- package/packages/hub/src/resources/forms.ts +5 -5
- package/packages/hub/src/resources/index.ts +1 -1
- package/packages/hub/src/resources/library.ts +2 -2
- package/packages/hub/src/resources/raw.ts +1 -1
- package/packages/hub/src/resources/reader.ts +2 -2
- package/packages/hub/src/resources/sqlite-files.ts +1 -1
- package/packages/hub/src/resources/storage.ts +5 -5
- package/packages/hub/src/resources/testing.ts +6 -6
- package/packages/hub/src/store/env.ts +4 -4
- package/packages/hub/src/store/hybrid.ts +4 -4
- package/packages/hub/src/store/sqlite.ts +3 -3
- package/packages/hub/src/stores/drivers.ts +2 -2
- package/packages/hub/src/stores/host.ts +3 -3
- package/packages/hub/src/stores/moves.ts +2 -2
- package/packages/hub/src/stores/service.ts +2 -2
- package/packages/hub/src/tables/env.ts +3 -3
- package/packages/hub/src/tables/index.ts +5 -5
- package/packages/hub/src/tables/service.ts +7 -7
- package/packages/sdk/AUTHORING.md +1206 -881
- package/packages/sdk/package.json +11 -8
- package/packages/sdk/src/agent.ts +1 -1
- package/packages/sdk/src/app-parts.ts +95 -0
- package/packages/sdk/src/authored.ts +26 -0
- package/packages/sdk/src/authoring.ts +13 -30
- package/packages/sdk/src/client-runtime.ts +24 -1
- package/packages/sdk/src/client-ui/AddServiceDialog.vue +43 -0
- package/packages/sdk/src/client-ui/InstanceNameField.vue +29 -0
- package/packages/sdk/src/client-ui/PairRowsEditor.vue +74 -0
- package/packages/sdk/src/client-ui/RemoteAuthFields.vue +95 -0
- package/packages/sdk/src/client-ui/ServiceRows.vue +57 -0
- package/packages/sdk/src/client-ui/draft.ts +10 -0
- package/packages/sdk/src/client-ui/host.ts +37 -0
- package/packages/sdk/src/client-ui/index.ts +19 -0
- package/packages/sdk/src/client-ui/loaded.ts +69 -0
- package/packages/sdk/src/client-ui/problems.ts +98 -0
- package/packages/sdk/src/client-ui/remote-config.ts +199 -0
- package/packages/sdk/src/client-ui/service-rows.ts +25 -0
- package/packages/sdk/src/client-ui/state.ts +14 -0
- package/packages/sdk/src/client-ui/testing.ts +147 -0
- package/packages/sdk/src/client-ui/vue-shim.d.ts +13 -0
- package/packages/sdk/src/client.ts +82 -11
- package/packages/sdk/src/hub.ts +4 -4
- package/packages/sdk/src/index.ts +13 -9
- package/packages/sdk/src/page-parts.ts +4 -0
- package/packages/sdk/src/program/env.ts +7 -7
- package/packages/sdk/src/program/runtime.ts +5 -5
- package/packages/sdk/src/program/tools.ts +3 -3
- package/packages/sdk/src/remote-auth.ts +128 -7
- package/packages/sdk/src/server/context-files.ts +1 -1
- package/packages/sdk/src/server/env.ts +36 -36
- package/packages/sdk/src/server/fake-hub-widgets.ts +7 -6
- package/packages/sdk/src/server/host.ts +28 -28
- package/packages/sdk/src/server/index.ts +2 -2
- package/packages/sdk/src/server/live.ts +4 -4
- package/packages/sdk/src/server/llm-wire.ts +54 -5
- package/packages/sdk/src/server/pairing.ts +1 -1
- package/packages/sdk/src/server/results.ts +4 -4
- package/packages/sdk/src/server/socket-guard.ts +1 -1
- package/packages/sdk/src/server/start-gate.ts +2 -2
- package/packages/sdk/src/server/store/engines.ts +2 -2
- package/packages/sdk/src/server/store/keeper.ts +2 -2
- package/packages/sdk/src/server/supervise.ts +4 -4
- package/packages/sdk/src/testing/env.ts +6 -6
- package/packages/sdk/src/testing/hub.ts +3 -1
- package/packages/sdk/src/testing/models.ts +3 -3
- package/packages/sdk/src/testing/openrouter.ts +3 -2
- package/packages/sdk/src/testing/preview.ts +7 -7
- package/packages/sdk/src/widgets.ts +21 -136
- package/packages/sdk/tsconfig.json +2 -2
- package/packages/web/dist/assets/{ActorSettingsView-v2k7v454.js → ActorSettingsView-CiWhrnP4.js} +2 -2
- package/packages/web/dist/assets/AdminLayout-CjVNzmYD.js +2 -0
- package/packages/web/dist/assets/{AdminLayout-1hbRPV3d.css → AdminLayout-ggcdQGlQ.css} +1 -1
- package/packages/web/dist/assets/{AppPage-CFmKZS8G.js → AppPage-D_kkUatv.js} +2 -2
- package/packages/web/dist/assets/{AutoPairPicker-C61gihmh.js → AutoPairPicker-BdCHi7dL.js} +2 -2
- package/packages/web/dist/assets/{BrowserFrame-Sq9EmQRT.js → BrowserFrame-CVQvfCB8.js} +2 -2
- package/packages/web/dist/assets/ChatPage-CPZJ8ya6.js +4 -0
- package/packages/web/dist/assets/{ChatPage-CbsRmktV.css → ChatPage-DjPv238m.css} +1 -1
- package/packages/web/dist/assets/{CodeViewer-tUNXZB77.js → CodeViewer-DzWZyAp4.js} +2 -2
- package/packages/web/dist/assets/ConfigWithCustom-C49loznj.js +3 -0
- package/packages/web/dist/assets/{ConfirmDialog-Dd3E4sJt.js → ConfirmDialog-BtugUGEY.js} +2 -2
- package/packages/web/dist/assets/{ConnectPage-CX9acyQH.js → ConnectPage-D8k2nSdX.js} +2 -2
- package/packages/web/dist/assets/ContextItemPage-DC4FGi8V.js +2 -0
- package/packages/web/dist/assets/ContextPage-MlEkKMq0.js +3 -0
- package/packages/web/dist/assets/{ContextRow-DrtPumZ5.js → ContextRow-BN26Di1B.js} +2 -2
- package/packages/web/dist/assets/{DataPage-DDSsxHro.js → DataPage-CvOYkEkS.js} +2 -2
- package/packages/web/dist/assets/DataTypePage-CDEL6BHp.js +2 -0
- package/packages/web/dist/assets/{DataTypePage-Cr238Hx_.css → DataTypePage-CWrWvUPs.css} +1 -1
- package/packages/web/dist/assets/{DesignPage-6e0XbOFC.js → DesignPage-D-MsKLuP.js} +3 -3
- package/packages/web/dist/assets/{ExplorePage-B7ND0W0l.js → ExplorePage-CNQpEe_8.js} +2 -2
- package/packages/web/dist/assets/{FnPill-Cp3KuLmP.js → FnPill-Dm5mmffj.js} +2 -2
- package/packages/web/dist/assets/{FnView-C0XZdnsS.js → FnView-oiIU5vka.js} +2 -2
- package/packages/web/dist/assets/{FnsView-GTH3p7a0.js → FnsView-DgIfza4W.js} +2 -2
- package/packages/web/dist/assets/{GinExprView-DGxns6lH.js → GinExprView-C19g0UgI.js} +2 -2
- package/packages/web/dist/assets/{GinForm-BDBUzuDP.js → GinForm-p7UsKQ3s.js} +2 -2
- package/packages/web/dist/assets/{GinTypeView-CUsymbVf.js → GinTypeView-DvdHc0V4.js} +2 -2
- package/packages/web/dist/assets/{GinValueView-jsKIfiEA.js → GinValueView-D6c7E4C_.js} +2 -2
- package/packages/web/dist/assets/{GraphPage-BCcPPsHu.js → GraphPage-BTamx4d-.js} +2 -2
- package/packages/web/dist/assets/GraphPanel-DKpbijQD.js +2 -0
- package/packages/web/dist/assets/{HubPicker-EoOErgmk.js → HubPicker-DfXIcUz1.js} +2 -2
- package/packages/web/dist/assets/{InboxApprovals-Dkq7DFp_.js → InboxApprovals-B9qwPCHR.js} +2 -2
- package/packages/web/dist/assets/{InboxPage-CHhslePq.js → InboxPage-j2lF00uW.js} +2 -2
- package/packages/web/dist/assets/InjectedList-BTGvy8GB.js +2 -0
- package/packages/web/dist/assets/{InstallDialog-D-VwfZYF.js → InstallDialog-BRJXLSMJ.js} +2 -2
- package/packages/web/dist/assets/InstanceTypes-DYdolFFW.js +2 -0
- package/packages/web/dist/assets/InstanceView-C5dJLBPe.js +2 -0
- package/packages/web/dist/assets/{ItemHistory-NQAP69ma.js → ItemHistory-vsyIMjIX.js} +2 -2
- package/packages/web/dist/assets/LimitsView-BtbQzkX1.js +2 -0
- package/packages/web/dist/assets/{ListSearch-BunVrDO0.js → ListSearch-BdVW9FHD.js} +2 -2
- package/packages/web/dist/assets/{LlmCallDetails-BoVNDTVs.js → LlmCallDetails-Cd7qtybU.js} +2 -2
- package/packages/web/dist/assets/{LlmCallsView-BGpV92RC.js → LlmCallsView-CrZB_I1H.js} +2 -2
- package/packages/web/dist/assets/{LoadState-h-K9bTYc.js → LoadState-8UknKQ6e.js} +2 -2
- package/packages/web/dist/assets/McpDialog-r-qJDHOO.js +2 -0
- package/packages/web/dist/assets/{McpView-GPXdCMne.js → McpView-FeDQWGxu.js} +2 -2
- package/packages/web/dist/assets/{McpsView-DJIR2JX5.js → McpsView-Czd2yUdE.js} +2 -2
- package/packages/web/dist/assets/{MemoryDialog-BTeIHQyA.js → MemoryDialog-DDiT6wO1.js} +2 -2
- package/packages/web/dist/assets/{ModelCallsView-DMcnwF2S.js → ModelCallsView-DsdztwCR.js} +2 -2
- package/packages/web/dist/assets/{ModelPicker-CgkMFxSO.js → ModelPicker-Df_3l8nS.js} +2 -2
- package/packages/web/dist/assets/ModelsView-YXwRDgWv.js +2 -0
- package/packages/web/dist/assets/{NotFoundPage-Tk92K7HN.js → NotFoundPage-DDEOlB6B.js} +2 -2
- package/packages/web/dist/assets/{PairPage-D0BK8CCw.js → PairPage-D3uHAkh1.js} +2 -2
- package/packages/web/dist/assets/{PanelHost-C-gKrxAk.js → PanelHost-BzWYqH39.js} +2 -2
- package/packages/web/dist/assets/PeopleView-Cg9RO5SF.js +2 -0
- package/packages/web/dist/assets/{PeopleView-CJ8yArTh.css → PeopleView-DBxdbT1C.css} +1 -1
- package/packages/web/dist/assets/{PoliciesView-BRi-QAuo.js → PoliciesView-BoshL7RQ.js} +2 -2
- package/packages/web/dist/assets/{RefusalList-DVO0bmeB.js → RefusalList-DnLIfmi-.js} +2 -2
- package/packages/web/dist/assets/RendererHost-CmkaVEX0.js +2 -0
- package/packages/web/dist/assets/RendererHost-Ym_SMkhp.css +1 -0
- package/packages/web/dist/assets/{ResourceViewer-Do0chYxU.js → ResourceViewer-CSAY6xIs.js} +2 -2
- package/packages/web/dist/assets/ResourcesPage-DAoa9mDs.js +2 -0
- package/packages/web/dist/assets/ResultGrid-CL2WSYQH.css +1 -0
- package/packages/web/dist/assets/ResultGrid-DSyc0btv.js +2 -0
- package/packages/web/dist/assets/{ReviewSummaryStrip-DO3p64Qj.js → ReviewSummaryStrip-Bzy-KGz_.js} +2 -2
- package/packages/web/dist/assets/ReviewView-Cwq8Az_B.js +3 -0
- package/packages/web/dist/assets/{RuleRow-DX9v4iGP.js → RuleRow-DAvl2m9p.js} +2 -2
- package/packages/web/dist/assets/RunCard-BMyRkKxJ.js +2 -0
- package/packages/web/dist/assets/RunCard-CSDiz-Nt.css +1 -0
- package/packages/web/dist/assets/{RunDetails-DjR206q6.js → RunDetails-Bvyr1HYK.js} +2 -2
- package/packages/web/dist/assets/{RunDot-lHRICdM5.js → RunDot-Lfrt5XR3.js} +2 -2
- package/packages/web/dist/assets/{RunPage-CbAQ_WPR.js → RunPage-C0-wY6Uz.js} +2 -2
- package/packages/web/dist/assets/{RunProgress-C3-B4tQf.js → RunProgress-BbzwzrTK.js} +2 -2
- package/packages/web/dist/assets/{RunsView-DMkPmkqX.js → RunsView-so-UV2Cq.js} +2 -2
- package/packages/web/dist/assets/SettingsPage-B4SQLk09.js +3 -0
- package/packages/web/dist/assets/{SettingsPage-t03BqXw8.css → SettingsPage-BTl3Ie4F.css} +1 -1
- package/packages/web/dist/assets/SignInPage-CXxLf7Rp.css +1 -0
- package/packages/web/dist/assets/{SignInPage-ByqGEZfj.js → SignInPage-Ck-v3eH0.js} +2 -2
- package/packages/web/dist/assets/{StatusBadge-CXne0sRZ.js → StatusBadge-C4NawPsO.js} +2 -2
- package/packages/web/dist/assets/{StorePlacementStep-B6SwTmdM.js → StorePlacementStep-DjLWeQF9.js} +2 -2
- package/packages/web/dist/assets/{SystemConfig-vQDL_eUl.js → SystemConfig-B5C5B3b0.js} +2 -2
- package/packages/web/dist/assets/SystemPageHost-DX7LrFoN.css +1 -0
- package/packages/web/dist/assets/SystemPageHost-DoyQlhKM.js +2 -0
- package/packages/web/dist/assets/SystemView-CTdpay8I.js +2 -0
- package/packages/web/dist/assets/SystemsView-Cnv2moRw.js +2 -0
- package/packages/web/dist/assets/TableView-BK_95qHT.js +3 -0
- package/packages/web/dist/assets/TableView-B_4MViVb.css +1 -0
- package/packages/web/dist/assets/{TableViewer-Boxx86f5.js → TableViewer-CRsIxdku.js} +3 -3
- package/packages/web/dist/assets/{ThemePicker-CIg_oRQX.js → ThemePicker-BlW7qvUd.js} +2 -2
- package/packages/web/dist/assets/{TurnTree-Ecm0yA5g.js → TurnTree-D6OYRutQ.js} +2 -2
- package/packages/web/dist/assets/{UserMessage-BtECa8ka.css → UserMessage-B63G9sxC.css} +1 -1
- package/packages/web/dist/assets/{UserMessage-BlnqZDVU.js → UserMessage-DJH2bXqv.js} +6 -6
- package/packages/web/dist/assets/{ValueVisual-C-MWpp7c.js → ValueVisual-BJUrdkHO.js} +2 -2
- package/packages/web/dist/assets/{fn-modal-B98MR7JN.js → fn-modal-DFtN7Kn-.js} +2 -2
- package/packages/web/dist/assets/{fn-notices-CfTa1E8y.js → fn-notices-C8HXeo7m.js} +2 -2
- package/packages/web/dist/assets/{formats-JwoKfXIq.js → formats-CHSYhY4X.js} +2 -2
- package/packages/web/dist/assets/index-BY7M8QUk.css +1 -0
- package/packages/web/dist/assets/index-Uz-h2M5K.js +4 -0
- package/packages/web/dist/assets/{labels-BFbk11BE.js → labels-DkV96Md_.js} +2 -2
- package/packages/web/dist/assets/{layout-D1gf481r.js → layout-CTAHAwIH.js} +2 -2
- package/packages/web/dist/assets/loaded-BrwmsuZY.js +2 -0
- package/packages/web/dist/assets/{metrics-CBPX3W5Y.js → metrics-BBvD6KSk.js} +2 -2
- package/packages/web/dist/assets/problems-CI9huk1n.js +2 -0
- package/packages/web/dist/assets/{push-payload-BeU1ADYt.js → push-payload-C1ppI5V2.js} +64 -64
- package/packages/web/dist/assets/record-edits-DFJBcNnL.js +2 -0
- package/packages/web/dist/assets/{review-fP-l9D6H.js → review-DlP8FQiO.js} +3 -3
- package/packages/web/dist/assets/routes-oIISbS5Z.js +4 -0
- package/packages/web/dist/assets/{runs-CveC2kKo.js → runs-BWVBevgu.js} +2 -2
- package/packages/web/dist/assets/{shared-LbaIHjbV.js → shared-Bc4GJbiE.js} +2 -2
- package/packages/web/dist/assets/{sources-VPrtgLIi.js → sources-gONU9kk2.js} +2 -2
- package/packages/web/dist/assets/src-ClMFVauH.js +43 -0
- package/packages/web/dist/assets/state-BQlvjJzT.js +2 -0
- package/packages/web/dist/assets/{systems-BqE3WTSF.js → systems-Dt01wDhP.js} +2 -2
- package/packages/web/dist/assets/table-host-BvEY0Zxn.js +2 -0
- package/packages/web/dist/assets/tables-CkqGZ0Yq.js +2 -0
- package/packages/web/dist/assets/{ui-BzgWquIU.js → ui-CjoSgSyZ.js} +5 -5
- package/packages/web/dist/assets/{url-DKGcECT1.js → url-Deh5u3O5.js} +2 -2
- package/packages/web/dist/index.html +49 -47
- package/packages/web/dist/sw.js +1 -1
- package/packages/web/package.json +2 -4
- package/premade/claude.zip +0 -0
- package/premade/database.zip +0 -0
- package/premade/web.zip +0 -0
- package/scripts/dev-env.ts +9 -9
- package/scripts/run-stack.ts +15 -15
- package/scripts/stack.ts +3 -3
- package/scripts/start.ts +18 -18
- package/systems/api/client/ApiServiceForm.vue +55 -0
- package/systems/api/client/ServiceList.vue +90 -0
- package/systems/api/client/ServicePage.vue +142 -0
- package/systems/api/client/ServicesPage.vue +32 -0
- package/systems/api/client/index.ts +15 -0
- package/systems/api/client/logic.ts +140 -0
- package/systems/api/client/state.ts +92 -0
- package/systems/api/package.json +9 -6
- package/systems/api/server/authoring.ts +2 -1
- package/systems/api/server/env.ts +1 -1
- package/systems/api/server/guard.ts +1 -1
- package/systems/api/server/http.ts +3 -2
- package/systems/api/server/impl.ts +3 -2
- package/systems/api/server/main.ts +11 -7
- package/systems/api/server/openapi.ts +1 -1
- package/systems/api/server/program.ts +2 -1
- package/systems/api/server/services.ts +2 -1
- package/systems/api/shared/http.ts +2 -1
- package/systems/api/shared/index.ts +15 -5
- package/{packages/core/src/programs.ts → systems/api/shared/services.ts} +7 -51
- package/systems/api/system.json +2 -1
- package/systems/api/tsconfig.json +2 -2
- package/systems/code/package.json +4 -3
- package/systems/code/server/authoring.ts +2 -1
- package/systems/code/server/impl.ts +2 -1
- package/systems/code/server/main.ts +5 -5
- package/systems/code/shared/index.ts +2 -3
- package/systems/code/shared/program.ts +23 -0
- package/systems/embedder/package.json +1 -1
- package/systems/embedder/server/env.ts +1 -1
- package/systems/embedder/server/main.ts +5 -5
- package/systems/embedder/shared/index.ts +1 -1
- package/systems/fs/client/machines/fakes.ts +1 -1
- package/systems/fs/client/machines/files/CommentComposer.vue +6 -3
- package/systems/fs/client/machines/files/FilePane.vue +2 -2
- package/systems/fs/client/machines/files/fakes.ts +1 -1
- package/systems/fs/client/machines/palette.ts +3 -2
- package/systems/fs/context/authoring/parts/client.md +23 -5
- package/systems/fs/context/authoring/parts/client.reference/client.md +7 -16
- package/systems/fs/context/authoring/parts/client.reference/pageinbox.md +524 -0
- package/systems/fs/context/authoring/parts/client.reference/{resultview.md → visuals.md} +85 -116
- package/systems/fs/context/authoring/parts/client.reference.md +8 -8
- package/systems/fs/context/authoring/parts/context.md +1 -1
- package/systems/fs/context/authoring/parts/contract.md +1 -1
- package/systems/fs/context/authoring/parts/core-types/admin-ts.md +2 -2
- package/systems/fs/context/authoring/parts/core-types/connections-ts.md +12 -1
- package/systems/fs/context/authoring/parts/core-types/context-files-ts.md +2 -2
- package/systems/fs/context/authoring/parts/core-types/context-graph-ts.md +2 -2
- package/systems/fs/context/authoring/parts/core-types/contextdecl.md +2 -2
- package/systems/fs/context/authoring/parts/core-types/lifecycle-ts.md +27 -2
- package/systems/fs/context/authoring/parts/core-types/manifest.md +27 -2
- package/systems/fs/context/authoring/parts/core-types/manifestpatch.md +26 -2
- package/systems/fs/context/authoring/parts/core-types/modes-ts.md +3 -3
- package/systems/fs/context/authoring/parts/core-types/records-systems-ts.md +145 -1
- package/systems/fs/context/authoring/parts/core-types/registries-ts.md +98 -2
- package/systems/fs/context/authoring/parts/core-types/run-ts.md +2 -2
- package/systems/fs/context/authoring/parts/core-types/system-pages-ts.md +4 -2
- package/systems/fs/context/authoring/parts/core-types/system-providers-ts.md +2 -2
- package/systems/fs/context/authoring/parts/core-types/tables-ts.md +91 -0
- package/systems/fs/context/authoring/parts/core-types/web-ts.md +1 -2
- package/systems/fs/context/authoring/parts/core-types.md +5 -8
- package/systems/fs/context/authoring/parts/examples/server-main-ts.md +4 -4
- package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-568-660.md +1 -1
- package/systems/fs/context/authoring/parts/fns.md +1 -1
- package/systems/fs/context/authoring/parts/folder.md +6 -6
- package/systems/fs/context/authoring/parts/hub/hub-ctx-from-resource.md +2 -2
- package/systems/fs/context/authoring/parts/hub/hub-install-package.md +2 -2
- package/systems/fs/context/authoring/parts/hub.reference.md +3 -3
- package/systems/fs/context/authoring/parts/internals/manifestof.md +2 -2
- package/systems/fs/context/authoring/parts/internals/permissionargs.md +4 -4
- package/systems/fs/context/authoring/parts/kinds-agents.md +1 -1
- package/systems/fs/context/authoring/parts/kinds-agents.reference/authoringsession.md +7 -5
- package/systems/fs/context/authoring/parts/kinds-agents.reference/kind.md +4 -4
- package/systems/fs/context/authoring/parts/outcomes.md +2 -2
- package/systems/fs/context/authoring/parts/outcomes.reference.md +2 -2
- package/systems/fs/context/authoring/parts/packaging.md +4 -4
- package/systems/fs/context/authoring/parts/remote.md +5 -5
- package/systems/fs/context/authoring/parts/remote.reference.md +201 -17
- package/systems/fs/context/authoring/parts/server.md +7 -7
- package/systems/fs/context/authoring/parts/server.reference.md +15 -15
- package/systems/fs/context/authoring/parts/testing.reference/equal.md +3 -3
- package/systems/fs/context/authoring/parts/testing.reference/fakehub.md +1 -1
- package/systems/fs/context/authoring/parts/testing.reference/kindprops.md +22 -10
- package/systems/fs/context/authoring/parts/testing.reference/{openmemorystore.md → storeconnection.md} +7 -19
- package/systems/fs/context/authoring/parts/testing.reference.md +5 -5
- package/systems/fs/context/authoring/parts/widgets.md +32 -22
- package/systems/fs/context/authoring/parts/widgets.reference.md +503 -9
- package/systems/fs/package.json +3 -3
- package/systems/fs/server/hosting.ts +10 -10
- package/systems/fs/server/main.ts +8 -8
- package/systems/fs/server/metrics/os.ts +50 -29
- package/systems/fs/server/shell.ts +1 -1
- package/systems/fs/shared/index.ts +1 -1
- package/systems/google-calendar/package.json +1 -1
- package/systems/google-calendar/server/main.ts +4 -4
- package/systems/input/package.json +3 -3
- package/systems/input/server/main.ts +6 -6
- package/systems/mcp/client/McpServerForm.vue +99 -0
- package/systems/mcp/client/ServerList.vue +78 -0
- package/systems/mcp/client/ServerPage.vue +194 -0
- package/systems/mcp/client/ServersPage.vue +32 -0
- package/systems/mcp/client/index.ts +15 -0
- package/systems/mcp/client/logic.ts +224 -0
- package/systems/mcp/client/state.ts +128 -0
- package/systems/mcp/package.json +9 -6
- package/systems/mcp/server/dial.ts +1 -1
- package/systems/mcp/server/impl.ts +2 -1
- package/systems/mcp/server/instance.ts +3 -5
- package/systems/mcp/server/main.ts +10 -6
- package/systems/mcp/server/mirror.ts +2 -3
- package/systems/mcp/server/oauth.ts +2 -1
- package/systems/mcp/server/server-link.ts +2 -1
- package/systems/mcp/shared/index.ts +15 -2
- package/{packages/core/src/mcp-servers.ts → systems/mcp/shared/servers.ts} +6 -5
- package/systems/mcp/system.json +2 -1
- package/systems/mcp/tsconfig.json +2 -2
- package/systems/ollama/package.json +3 -3
- package/systems/ollama/server/main.ts +5 -5
- package/systems/schedule/package.json +3 -3
- package/systems/schedule/server/main.ts +6 -6
- package/systems/template/README.md +2 -2
- package/systems/template/package.json +1 -1
- package/systems/template/server/main.ts +4 -4
- package/systems/widgets/client/ChipRow.vue +22 -0
- package/systems/widgets/client/ProposalCard.vue +6 -5
- package/systems/widgets/client/SavedWidget.vue +11 -8
- package/systems/widgets/client/WidgetChips.vue +137 -0
- package/systems/widgets/client/WidgetView.vue +32 -0
- package/systems/widgets/client/charts/ChartVisual.vue +157 -0
- package/systems/widgets/client/charts/chart-data.ts +230 -0
- package/systems/widgets/client/charts/echarts-setup.ts +69 -0
- package/systems/widgets/client/charts/export.ts +36 -0
- package/systems/widgets/client/charts/families/calendar.ts +105 -0
- package/systems/widgets/client/charts/families/category.ts +186 -0
- package/systems/widgets/client/charts/families/crosstab.ts +113 -0
- package/systems/widgets/client/charts/families/distribution.ts +160 -0
- package/systems/widgets/client/charts/families/finance.ts +96 -0
- package/systems/widgets/client/charts/families/gauge.ts +75 -0
- package/systems/widgets/client/charts/families/hierarchy.ts +166 -0
- package/systems/widgets/client/charts/families/index.ts +21 -0
- package/systems/widgets/client/charts/families/network.ts +140 -0
- package/systems/widgets/client/charts/families/part.ts +61 -0
- package/systems/widgets/client/charts/families/profile.ts +30 -0
- package/systems/widgets/client/charts/families/progress.ts +76 -0
- package/systems/widgets/client/charts/families/range.ts +107 -0
- package/systems/widgets/client/charts/families/time.ts +177 -0
- package/systems/widgets/client/charts/families/timeline.ts +114 -0
- package/systems/widgets/client/charts/families/wide.ts +41 -0
- package/systems/widgets/client/charts/index.ts +37 -0
- package/systems/widgets/client/charts/maths.ts +139 -0
- package/systems/widgets/client/charts/size.ts +39 -0
- package/systems/widgets/client/chips.ts +150 -0
- package/systems/widgets/client/index.ts +18 -5
- package/systems/widgets/client/proposal.ts +2 -1
- package/systems/widgets/package.json +7 -4
- package/systems/widgets/server/authoring.ts +13 -7
- package/systems/widgets/server/env.ts +1 -1
- package/systems/widgets/server/impl.ts +10 -6
- package/systems/widgets/server/main.ts +6 -6
- package/systems/widgets/server/run.ts +16 -9
- package/systems/widgets/server/upgrade.ts +34 -0
- package/systems/widgets/shared/args.ts +137 -0
- package/systems/widgets/shared/charts.ts +243 -0
- package/systems/widgets/shared/index.ts +12 -3
- package/{packages/sdk/src → systems/widgets/shared}/relative-dates.ts +2 -1
- package/systems/widgets/shared/spec.ts +208 -0
- package/{packages/sdk/src → systems/widgets/shared}/widget-check.ts +7 -9
- package/{packages/sdk/src → systems/widgets/shared}/widget-schema.ts +4 -4
- package/packages/core/src/remote-auth.ts +0 -111
- package/packages/core/src/widgets.ts +0 -427
- package/packages/web/dist/assets/AdminLayout-B6Jrc_4W.js +0 -2
- package/packages/web/dist/assets/ApiServiceForm-BxprSaAq.css +0 -1
- package/packages/web/dist/assets/ApiServiceForm-CuuQgOJc.js +0 -2
- package/packages/web/dist/assets/ApiServiceView-7bTHSO_Z.js +0 -2
- package/packages/web/dist/assets/ApiServiceView-BVmdRCjR.css +0 -1
- package/packages/web/dist/assets/ApiServicesView-BTLV6c8n.css +0 -1
- package/packages/web/dist/assets/ApiServicesView-BXi24n49.js +0 -2
- package/packages/web/dist/assets/ChartVisual-BnFG9aFi.css +0 -1
- package/packages/web/dist/assets/ChartVisual-C4mgw4wh.js +0 -11
- package/packages/web/dist/assets/ChatPage-CAhHE03Z.js +0 -4
- package/packages/web/dist/assets/ConfigWithCustom-D_-rY66L.js +0 -3
- package/packages/web/dist/assets/ContextItemPage-rUI3-T_L.js +0 -2
- package/packages/web/dist/assets/ContextPage-CtefzyKg.js +0 -3
- package/packages/web/dist/assets/DataTypePage-BW9fWaz8.js +0 -2
- package/packages/web/dist/assets/FnList-BCnb4kOB.css +0 -1
- package/packages/web/dist/assets/FnList-Bx6H-kux.js +0 -2
- package/packages/web/dist/assets/GraphPanel-9tztGHmu.js +0 -2
- package/packages/web/dist/assets/InjectedList-CSWqRiON.js +0 -2
- package/packages/web/dist/assets/InstanceTypes-D3rAEiE7.js +0 -2
- package/packages/web/dist/assets/InstanceView-DoH8C-1j.js +0 -2
- package/packages/web/dist/assets/LimitsView-DY2C9nYS.js +0 -2
- package/packages/web/dist/assets/McpDialog-DhOCk6_E.js +0 -2
- package/packages/web/dist/assets/McpServerForm-Cor3fI7s.js +0 -2
- package/packages/web/dist/assets/McpServerForm-DsHaf5Um.css +0 -1
- package/packages/web/dist/assets/McpServerView-7I76EznB.css +0 -1
- package/packages/web/dist/assets/McpServerView-ewXRPEmZ.js +0 -2
- package/packages/web/dist/assets/McpServersView-Dd0xmfws.js +0 -2
- package/packages/web/dist/assets/ModelsView-cMHygeiK.js +0 -2
- package/packages/web/dist/assets/PeopleView-DRfeNWK5.js +0 -2
- package/packages/web/dist/assets/RemoteAuthFields-CgiufuqQ.js +0 -2
- package/packages/web/dist/assets/RemoteAuthFields-Dm44vz2t.css +0 -1
- package/packages/web/dist/assets/ResourcesPage-BBx2u2mw.js +0 -2
- package/packages/web/dist/assets/ResultGrid-Bj-0I5HY.js +0 -2
- package/packages/web/dist/assets/ResultGrid-CuUQyTjW.css +0 -1
- package/packages/web/dist/assets/ReviewView-DZF9E1hb.js +0 -3
- package/packages/web/dist/assets/RunCard-BnrtK2Yp.js +0 -2
- package/packages/web/dist/assets/RunCard-CfyRaDLS.css +0 -1
- package/packages/web/dist/assets/ServiceRows-4WythFpF.js +0 -2
- package/packages/web/dist/assets/ServiceRows-HPQ0pN6b.css +0 -1
- package/packages/web/dist/assets/SettingsPage-BN4oSzoL.js +0 -3
- package/packages/web/dist/assets/SignInPage-Djx-M-0U.css +0 -1
- package/packages/web/dist/assets/SystemPageHost-BeZ-6N0-.css +0 -1
- package/packages/web/dist/assets/SystemPageHost-DrMrEPyh.js +0 -2
- package/packages/web/dist/assets/SystemView-Be6TBM4j.js +0 -2
- package/packages/web/dist/assets/SystemsView-DZtT3laz.js +0 -2
- package/packages/web/dist/assets/WidgetView-DQUDeFkB.css +0 -1
- package/packages/web/dist/assets/WidgetView-DX4ejNb6.js +0 -3
- package/packages/web/dist/assets/export-BwFkEtcm.js +0 -15
- package/packages/web/dist/assets/index-6ScWTFy2.js +0 -4
- package/packages/web/dist/assets/index-CEslGcrX.css +0 -1
- package/packages/web/dist/assets/problems-t1E_ovSz.js +0 -2
- package/packages/web/dist/assets/record-edits-Bfsi4lU3.js +0 -2
- package/packages/web/dist/assets/remote-config-BNQhSDzB.js +0 -2
- package/packages/web/dist/assets/routes-DV4IJpwe.js +0 -4
- package/packages/web/dist/assets/size-Bh__w5aI.js +0 -2
- package/packages/web/dist/assets/src-CT3TeFaM.js +0 -43
- package/packages/web/dist/assets/state-xfQqaQPX.js +0 -2
- package/packages/web/dist/assets/widget-host-B87MTaTn.js +0 -2
- package/packages/web/dist/assets/widgets-BBCuSS6E.js +0 -2
- package/systems/fs/context/authoring/parts/client.reference/textareaprops.md +0 -195
- package/systems/fs/context/authoring/parts/core-types/remote-auth-ts.md +0 -64
- package/systems/fs/context/authoring/parts/core-types/widgets-ts.md +0 -303
- package/systems/fs/context/authoring/parts/widgets.reference/hub-visuals.md +0 -627
- package/systems/fs/context/authoring/parts/widgets.reference/sourcecompatible.md +0 -154
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* await kit.stop();
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
import { fillClaims, qualify, type InputProblem, type Json, type DataRecord, type KindDescription, type MentionOption as WireMentionOption, type OutcomeWire, type QualifiedName, type ResultTable, type RunRequest, type SensitivityFlag, type VisualRank } from '@harness/core';
|
|
12
|
+
import { fillClaims, HUB_VISUALS, qualify, SystemName, type InputProblem, type Json, type DataRecord, type KindDescription, type MentionOption as WireMentionOption, type OutcomeWire, type QualifiedName, type ResultTable, type RunRequest, type SensitivityFlag, type VisualRank } from '@harness/core';
|
|
13
13
|
import type { KindDef } from '../declare.ts';
|
|
14
14
|
import type { AnyFnDef, FnDef, TypesOf } from '../fn.ts';
|
|
15
15
|
import { encodeValue, parseValue } from '../gin.ts';
|
|
@@ -279,6 +279,8 @@ export class TestSystem<N extends string, C extends ContractShape> {
|
|
|
279
279
|
export async function testHub<N extends string, C extends ContractShape, Db extends StoreDb = StoreDb>(contract: SystemContract<N, C>, impl: SystemImpl<C, Db>, options: TestHubOptions = {}): Promise<TestSystem<N, C>> {
|
|
280
280
|
const hub = new FakeHub({ ...options.hub, ...(options.config === undefined ? {} : { config: options.config }) });
|
|
281
281
|
for (const record of options.records ?? []) { hub.data.records.set(record.id, record); }
|
|
282
|
+
// the hub lists a connected system's own visuals in hub/visuals after its own (the widgets system's charts)
|
|
283
|
+
hub.widgets.visuals.push(...contract.contributes.filter((entry) => entry.registry === HUB_VISUALS).map((entry) => ({ ...entry, system: SystemName.parse(contract.name) })));
|
|
282
284
|
const model = options.model;
|
|
283
285
|
if (model !== undefined) {
|
|
284
286
|
hub.onLlm = (forward) => model.llm(forward);
|
|
@@ -132,7 +132,7 @@ function isSteps(input: readonly ScriptStep[] | RecordingOptions): input is read
|
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* A run's time for a call that drives a real model through an agent (authoring a fn): four minutes, like a turn on the
|
|
135
|
-
* hub (`
|
|
135
|
+
* hub (`FNLOOM_TURN_TIME`, ten minutes by default), not the test hub's 60-second default, which a real model writing
|
|
136
136
|
* and checking a program can pass without anything being wrong. Pass it as `kit.call`'s extra.
|
|
137
137
|
*/
|
|
138
138
|
export function liveTurn(ms = 240_000): { deadline: number; budget: { cost: number; time: number; limitedBy: 'turn' } } {
|
|
@@ -143,8 +143,8 @@ export function liveTurn(ms = 240_000): { deadline: number; budget: { cost: numb
|
|
|
143
143
|
export type RealModelTest = (model: OpenRouterModelLink, context: TestContext) => Promise<void> | void;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* A real free model (OpenRouter, `OPENROUTER_API_KEY`; the models of `
|
|
147
|
-
* `
|
|
146
|
+
* A real free model (OpenRouter, `OPENROUTER_API_KEY`; the models of `FNLOOM_LIVE_MODEL` and
|
|
147
|
+
* `FNLOOM_LIVE_FALLBACKS`). `realModel.it` declares a test that calls it: marked `real`, skipped without a key.
|
|
148
148
|
*/
|
|
149
149
|
export const realModel = {
|
|
150
150
|
/** The real model link, or undefined without a key. */
|
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { AI } from '@aeye/ai';
|
|
10
10
|
import type { Request } from '@aeye/core';
|
|
11
|
-
import { models
|
|
11
|
+
import { models } from '@aeye/models';
|
|
12
12
|
import { OpenRouterProvider } from '@aeye/openrouter';
|
|
13
13
|
import { mintId, type HubModelInfo, type LlmForward, type LlmForwardChunk, type ModelForward, type ModelForwardResult } from '@harness/core';
|
|
14
14
|
import type { ModelLink } from '../server/llm.ts';
|
|
15
15
|
import { AnswerDecoder, chunkToWire, requestFromWire } from '../server/llm-wire.ts';
|
|
16
16
|
|
|
17
|
+
|
|
17
18
|
/** A forwarded request as an aeye request: the gateway's own rebuild, so a test model gets exactly the schemas the hub sends. */
|
|
18
19
|
function aeyeRequest(forward: LlmForward, maxTokens: number | undefined): Request {
|
|
19
20
|
const request = requestFromWire(forward.request);
|
|
@@ -46,7 +47,7 @@ export class OpenRouterModelLink implements ModelLink {
|
|
|
46
47
|
if (options.models.length === 0) { throw new Error('OpenRouterModelLink needs at least one model.'); }
|
|
47
48
|
this.#options = options;
|
|
48
49
|
const openrouter = new OpenRouterProvider({ apiKey: options.key });
|
|
49
|
-
this.#ai = AI.with().providers({ openrouter }).create({ models
|
|
50
|
+
this.#ai = AI.with().providers({ openrouter }).create({ models });
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
async *llm(forward: LlmForward, signal?: AbortSignal): AsyncGenerator<LlmForwardChunk> {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - `preview({ name, module, states })` draws every state at phone and desktop sizes in light and dark: it bundles the
|
|
8
8
|
* component with Vite (its own styles included), opens each state in headless Chrome with the app's look (the web
|
|
9
9
|
* app's tokens), and saves a screenshot per state, viewport and theme into the preview folder, with `gallery.html`
|
|
10
|
-
* beside them. Shooting is on with `
|
|
10
|
+
* beside them. Shooting is on with `FNLOOM_PREVIEWS` (`harness test --previews`); otherwise the component is only
|
|
11
11
|
* bundled (so a broken import or template still fails), and the preview tests stay fast.
|
|
12
12
|
*/
|
|
13
13
|
import { createRequire } from 'node:module';
|
|
@@ -41,7 +41,7 @@ export interface PreviewOptions {
|
|
|
41
41
|
readonly viewports?: readonly PreviewViewport[];
|
|
42
42
|
/** Default both. */
|
|
43
43
|
readonly themes?: readonly PreviewTheme[];
|
|
44
|
-
/** Force shooting on or off (default `
|
|
44
|
+
/** Force shooting on or off (default `FNLOOM_PREVIEWS`). */
|
|
45
45
|
readonly shoot?: boolean;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -57,15 +57,15 @@ export interface SavedShot extends PreviewShot {
|
|
|
57
57
|
*/
|
|
58
58
|
export async function preview(options: PreviewOptions): Promise<SavedShot[]> {
|
|
59
59
|
const settings = kitEnv.parse();
|
|
60
|
-
const shoot = options.shoot ?? settings.
|
|
60
|
+
const shoot = options.shoot ?? settings.FNLOOM_PREVIEWS;
|
|
61
61
|
const bundle = await bundleComponent(options);
|
|
62
62
|
if (!shoot) { return []; }
|
|
63
|
-
const out = resolve(settings.
|
|
63
|
+
const out = resolve(settings.FNLOOM_PREVIEW_DIR);
|
|
64
64
|
await mkdir(out, { recursive: true });
|
|
65
|
-
const theme = await themeCss(settings.
|
|
65
|
+
const theme = await themeCss(settings.FNLOOM_PREVIEW_THEME);
|
|
66
66
|
const sizes: Record<PreviewViewport, { width: number; height: number }> = {
|
|
67
|
-
phone: viewportSize(settings.
|
|
68
|
-
desktop: viewportSize(settings.
|
|
67
|
+
phone: viewportSize(settings.FNLOOM_PREVIEW_PHONE),
|
|
68
|
+
desktop: viewportSize(settings.FNLOOM_PREVIEW_DESKTOP),
|
|
69
69
|
};
|
|
70
70
|
const { default: puppeteer } = await import('puppeteer');
|
|
71
71
|
const browser = await puppeteer.launch({ headless: true });
|
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Visuals and
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* each row and what a click drills into (`WidgetSpec` in `@harness/core`).
|
|
6
|
-
*
|
|
7
|
-
* These are the pure pieces every side shares, so a fit, a control or an action means the same thing in a system, the
|
|
8
|
-
* widgets system, the hub and the web app:
|
|
2
|
+
* Visuals and result tables for system authors: the pure pieces every side shares, so a fit or a row action means the
|
|
3
|
+
* same thing in a system, the hub and the web app. (Widgets themselves, saved views with chips and presets, are the
|
|
4
|
+
* bundled widgets system's, with their checks and authoring schema: `systems/widgets/shared`.)
|
|
9
5
|
*
|
|
10
6
|
* - **Visuals:** `visual(...)` declares a contribution to `HUB_VISUALS` with its shape, `channel(...)` one of its
|
|
11
7
|
* inputs. `resultFacts` is core's `columnFacts` with the gin facts of each column's type (`ginTypeFacts`);
|
|
12
8
|
* `rankedVisuals` is core's coverage-first `rankVisuals` over registry contributions.
|
|
13
|
-
* - **Args
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* click takes from a row, `returnsTable` whether a fn's declared return is a table.
|
|
17
|
-
*
|
|
18
|
-
* Checks and the authoring schema are in `widget-check.ts` and `widget-schema.ts`; relative dates in `relative-dates.ts`.
|
|
9
|
+
* - **Args:** `argsOf` a fn's args in order; `pagingOf` and `rangeOf` the paging and range args a view can drive.
|
|
10
|
+
* - **Row actions and drill:** `rowActionOptions` the menu a row offers (with the derived `then`), `boundArgs` the args
|
|
11
|
+
* a click takes from a row, `returnsTable` whether a fn's declared return is a table.
|
|
19
12
|
*/
|
|
20
13
|
import {
|
|
21
|
-
BUILT_IN_VISUALS, ContributionDecl, HUB_VISUALS, Json,
|
|
22
|
-
type
|
|
23
|
-
type
|
|
24
|
-
type WidgetShownControl, type WidgetSpec,
|
|
14
|
+
BUILT_IN_VISUALS, BUILT_IN_VISUAL_NAMES, ContributionDecl, HUB_VISUALS, Json, LocalName, ResultTable, actionLabel, columnFacts, confirmOf, deriveThen, rankVisuals,
|
|
15
|
+
type GinTypeDef, type ColumnFacts, type ColumnKind, type FnMode, type PagingArgs, type QualifiedName, type RangeArgs, type ResultColumn, type ResultFacts,
|
|
16
|
+
type RowAction, type RowActionOption, type VisualChannel, type VisualRank, type VisualShape, type VisualShapeInput,
|
|
25
17
|
} from '@harness/core';
|
|
26
18
|
import type { TypeScope } from '@aeye/gin';
|
|
27
19
|
import { z } from 'zod';
|
|
28
20
|
import { g, type GinType } from './gin.ts';
|
|
29
21
|
import { ginAs } from './zod-gin.ts';
|
|
30
|
-
import { relativeDatesFor, resolveArgValue } from './relative-dates.ts';
|
|
31
22
|
|
|
32
|
-
export { HUB_VISUALS
|
|
23
|
+
export { HUB_VISUALS } from '@harness/core';
|
|
33
24
|
|
|
34
25
|
// ─── Visuals ──────────────────────────────────────────────────────────────────
|
|
35
26
|
|
|
@@ -80,10 +71,11 @@ export function visual(input: VisualInput): ContributionDecl {
|
|
|
80
71
|
}
|
|
81
72
|
|
|
82
73
|
/**
|
|
83
|
-
* The
|
|
84
|
-
*
|
|
74
|
+
* The visuals every result has (`BUILT_IN_VISUALS`: the table and the value cards) as the hub contributes them to
|
|
75
|
+
* `HUB_VISUALS`, in registry order. The web app draws them. Every chart is a system's: the bundled widgets system
|
|
76
|
+
* contributes the chart families (and bundles ECharts); other systems add theirs after.
|
|
85
77
|
*/
|
|
86
|
-
export const BUILT_IN_CONTRIBUTIONS: readonly ContributionDecl[] =
|
|
78
|
+
export const BUILT_IN_CONTRIBUTIONS: readonly ContributionDecl[] = BUILT_IN_VISUAL_NAMES.map((name) => {
|
|
87
79
|
const builtIn = BUILT_IN_VISUALS[name];
|
|
88
80
|
return ContributionDecl.parse({ registry: HUB_VISUALS, name, label: builtIn.label, description: builtIn.description, icon: builtIn.icon, shape: builtIn.shape });
|
|
89
81
|
});
|
|
@@ -128,6 +120,8 @@ export interface VisualContribution {
|
|
|
128
120
|
readonly registry: string;
|
|
129
121
|
readonly name: string;
|
|
130
122
|
readonly label: string;
|
|
123
|
+
/** What it draws, in a line (an authoring agent reads it beside the label). */
|
|
124
|
+
readonly description?: string | undefined;
|
|
131
125
|
readonly shape?: VisualShape | undefined;
|
|
132
126
|
}
|
|
133
127
|
|
|
@@ -173,10 +167,10 @@ export function argsOf(args: GinTypeDef): ArgInfo[] {
|
|
|
173
167
|
}
|
|
174
168
|
|
|
175
169
|
/** The args a buffered pager drives, when a source has both (`limit` and `offset`, as the database's query fns name them). */
|
|
176
|
-
export const WINDOW_ARGS:
|
|
170
|
+
export const WINDOW_ARGS: PagingArgs = { offset: 'offset', limit: 'limit' };
|
|
177
171
|
|
|
178
172
|
/** The source's paging args (`WINDOW_ARGS`, both whole-number args), or `undefined` when it doesn't page. */
|
|
179
|
-
export function pagingOf(args: GinTypeDef):
|
|
173
|
+
export function pagingOf(args: GinTypeDef): PagingArgs | undefined {
|
|
180
174
|
const found = new Map(argsOf(args).map((arg) => [arg.name, arg]));
|
|
181
175
|
const numeric = (name: string): boolean => found.get(name)?.type.name === 'num';
|
|
182
176
|
return numeric(WINDOW_ARGS.offset) && numeric(WINDOW_ARGS.limit) ? WINDOW_ARGS : undefined;
|
|
@@ -190,7 +184,7 @@ const RANGE_PAIRS: readonly (readonly [string, string])[] = [['from', 'to'], ['s
|
|
|
190
184
|
* date or timestamp args named `from`/`to`, `start`/`end`, `after`/`before` or `since`/`until`, alone or after a
|
|
191
185
|
* shared prefix (`due_from`/`due_to`). `undefined` when there is none.
|
|
192
186
|
*/
|
|
193
|
-
export function rangeOf(args: GinTypeDef):
|
|
187
|
+
export function rangeOf(args: GinTypeDef): RangeArgs | undefined {
|
|
194
188
|
const dates = argsOf(args).filter((arg) => arg.type.name === 'date' || arg.type.name === 'timestamp').map((arg) => arg.name);
|
|
195
189
|
const names = new Set(dates);
|
|
196
190
|
for (const [from, to] of RANGE_PAIRS) {
|
|
@@ -202,115 +196,6 @@ export function rangeOf(args: GinTypeDef): WidgetRange | undefined {
|
|
|
202
196
|
return undefined;
|
|
203
197
|
}
|
|
204
198
|
|
|
205
|
-
/** The args the widget's pager and range claim drive. */
|
|
206
|
-
function claimedArgs(spec: Pick<WidgetSpec, 'paging' | 'range'>): Set<string> {
|
|
207
|
-
return new Set([spec.paging?.offset, spec.paging?.limit, spec.range?.from, spec.range?.to].filter((arg): arg is string => arg !== undefined));
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Whether an arg's "Any" is sent as `null`: its chip may be cleared and the widget's plan fills it with a default when
|
|
212
|
-
* it is left out, so only `null` says "explicitly unset". `widgetRunArgs` then leaves it out of the source's args.
|
|
213
|
-
*/
|
|
214
|
-
function clearsToNull(plan: ArgPlan | undefined, required: boolean): boolean {
|
|
215
|
-
return !required && plan?.show === 'control' && plan.default !== undefined;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* The widget's args type (the kind's `describe`): its source's args minus the pinned ones, with the paging and range
|
|
220
|
-
* args made optional (the view drives them; a run without them reads the first window of the range the widget opens
|
|
221
|
-
* on, its range chips' defaults, which `checkWidget` requires of a required range arg). An arg whose "Any" is sent as
|
|
222
|
-
* `null` (`clearsToNull`) takes `null` too.
|
|
223
|
-
*/
|
|
224
|
-
export function widgetArgs(source: GinTypeDef, spec: Pick<WidgetSpec, 'args' | 'paging' | 'range'>): GinTypeDef {
|
|
225
|
-
const claimed = claimedArgs(spec);
|
|
226
|
-
const props = Object.fromEntries(Object.entries(source.props ?? {}).flatMap(([name, prop]) => {
|
|
227
|
-
if (spec.args[name]?.show === 'pinned') { return []; }
|
|
228
|
-
const optional = prop.type.name === 'optional';
|
|
229
|
-
if (clearsToNull(spec.args[name], !optional && prop.default === undefined)) {
|
|
230
|
-
const inner = optional ? prop.type.generic?.['T'] ?? prop.type : prop.type;
|
|
231
|
-
return [[name, { ...prop, type: { name: 'optional', generic: { T: { name: 'nullable', generic: { T: inner } } } } }]];
|
|
232
|
-
}
|
|
233
|
-
const asIs = !claimed.has(name) || optional || prop.default !== undefined;
|
|
234
|
-
return [[name, asIs ? prop : { ...prop, type: { name: 'optional', generic: { T: prop.type } } }]];
|
|
235
|
-
}));
|
|
236
|
-
return { ...source, props };
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/** An enum's members as choices (label and value), or `undefined` when the type is not an enum. */
|
|
240
|
-
function enumChoices(type: GinTypeDef): ChoiceOption[] | undefined {
|
|
241
|
-
const values = enumValues(type);
|
|
242
|
-
return values === undefined ? undefined : Object.entries(values).map(([label, value]) => ({ label, value: { literal: value } }));
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* The chip row (`WidgetResult.controls`), in the source's arg order: every arg not pinned, hidden or driven by the
|
|
247
|
-
* pager, with its plan's words and choices (an enum's members when the plan names none; an "Any" row first on an
|
|
248
|
-
* optional arg), and its value: the one the run used (`given`), else the plan's default. Range args are chips too, so
|
|
249
|
-
* a visual that doesn't draw the range still lets the person set it.
|
|
250
|
-
*/
|
|
251
|
-
export function widgetControls(source: GinTypeDef, spec: Pick<WidgetSpec, 'args' | 'paging'>, given: Readonly<Record<string, Json>> = {}): WidgetShownControl[] {
|
|
252
|
-
const paging = new Set([spec.paging?.offset, spec.paging?.limit]);
|
|
253
|
-
return argsOf(source).flatMap((arg): WidgetShownControl[] => {
|
|
254
|
-
const plan: ArgPlan | undefined = spec.args[arg.name];
|
|
255
|
-
if (paging.has(arg.name) || plan?.show === 'pinned' || plan?.show === 'hidden') { return []; }
|
|
256
|
-
const planned = plan?.choices;
|
|
257
|
-
const offered = planned ?? enumChoices(arg.type);
|
|
258
|
-
const choices = offered === undefined || arg.required || offered.some((choice) => choice.value === undefined) ? offered : [{ label: 'Any' }, ...offered];
|
|
259
|
-
// a null given is "Any" (cleared): no value, never the plan's default
|
|
260
|
-
const set = given[arg.name];
|
|
261
|
-
const value = set === null ? undefined : set !== undefined ? { literal: set } : plan?.default;
|
|
262
|
-
return [{
|
|
263
|
-
arg: arg.name,
|
|
264
|
-
label: plan?.label ?? actionLabel(arg.name),
|
|
265
|
-
argType: arg.type,
|
|
266
|
-
optional: !arg.required,
|
|
267
|
-
...(clearsToNull(plan, arg.required) ? { defaulted: true } : {}),
|
|
268
|
-
...(choices === undefined ? {} : { choices }),
|
|
269
|
-
custom: plan?.custom ?? offered === undefined,
|
|
270
|
-
relative: relativeDatesFor(arg.type.name).length > 0,
|
|
271
|
-
...(value === undefined ? {} : { value }),
|
|
272
|
-
}];
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/** When and where a widget runs: the moment and time zone relative dates resolve in, and the pager's window. */
|
|
277
|
-
export interface WidgetRunOptions {
|
|
278
|
-
readonly now: Date;
|
|
279
|
-
/** The person's time zone (an IANA name). */
|
|
280
|
-
readonly zone: string;
|
|
281
|
-
/** The rows a run asks for when the widget pages (its first visual's page size, or the pager's). */
|
|
282
|
-
readonly window: number;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* The source args a widget run uses: pinned values, then the args given (the chips the person set), then each plan's
|
|
287
|
-
* default, relative dates resolved; an arg with none of these, or given as `null` ("Any"), is left out (it takes the
|
|
288
|
-
* source's default). A paged
|
|
289
|
-
* widget asks for `window` rows from the given offset (0 when none).
|
|
290
|
-
*/
|
|
291
|
-
export function widgetRunArgs(source: GinTypeDef, spec: Pick<WidgetSpec, 'args' | 'paging'>, given: Readonly<Record<string, Json>>, options: WidgetRunOptions): Record<string, Json> {
|
|
292
|
-
const out: Record<string, Json> = {};
|
|
293
|
-
for (const arg of argsOf(source)) {
|
|
294
|
-
const plan = spec.args[arg.name];
|
|
295
|
-
const value = given[arg.name];
|
|
296
|
-
if (plan?.show === 'pinned') { out[arg.name] = resolveArgValue(plan.value, options.now, options.zone); continue; }
|
|
297
|
-
if (value === null) { continue; }
|
|
298
|
-
if (value !== undefined) { out[arg.name] = value; continue; }
|
|
299
|
-
if (plan?.show === 'control' && plan.default !== undefined) { out[arg.name] = resolveArgValue(plan.default, options.now, options.zone); }
|
|
300
|
-
}
|
|
301
|
-
if (spec.paging !== undefined) {
|
|
302
|
-
const offset = given[spec.paging.offset];
|
|
303
|
-
out[spec.paging.offset] = typeof offset === 'number' ? offset : 0;
|
|
304
|
-
out[spec.paging.limit] = options.window;
|
|
305
|
-
}
|
|
306
|
-
return out;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/** The pager's state after a run that asked for `window` rows: a full window means more may follow. */
|
|
310
|
-
export function widgetPager(paging: WidgetPaging, table: Pick<ResultTable, 'rows'>, window: number): WidgetPager {
|
|
311
|
-
return { ...paging, window, more: table.rows.length >= window };
|
|
312
|
-
}
|
|
313
|
-
|
|
314
199
|
// ─── Actions and drill ────────────────────────────────────────────────────────
|
|
315
200
|
|
|
316
201
|
/** A fn a row could run: a method of the row's type or any fn a widget binds, with its mode, args and declared return. */
|
|
@@ -330,9 +215,9 @@ export interface RowFn {
|
|
|
330
215
|
* (`self`) is bound by the row's ref, so it never shows in the form. A listed action whose fn isn't among `rowFns`
|
|
331
216
|
* is left out.
|
|
332
217
|
*/
|
|
333
|
-
export function
|
|
218
|
+
export function rowActionOptions(rowFns: readonly RowFn[], actions: readonly RowAction[] | undefined): RowActionOption[] {
|
|
334
219
|
const byFn = new Map(rowFns.map((rowFn) => [rowFn.fn, rowFn]));
|
|
335
|
-
const chosen: Array<{ rowFn: RowFn; action:
|
|
220
|
+
const chosen: Array<{ rowFn: RowFn; action: RowAction | undefined }> = actions === undefined
|
|
336
221
|
? rowFns.map((rowFn) => ({ rowFn, action: undefined }))
|
|
337
222
|
: actions.flatMap((action) => { const rowFn = byFn.get(action.fn); return rowFn === undefined ? [] : [{ rowFn, action }]; });
|
|
338
223
|
return chosen.map(({ rowFn, action }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": { "rootDir": "src", "outDir": "../../.types/sdk", "tsBuildInfoFile": "../../.types/sdk.tsbuildinfo" },
|
|
4
|
-
"include": ["src"],
|
|
3
|
+
"compilerOptions": { "rootDir": "src", "outDir": "../../.types/sdk", "tsBuildInfoFile": "../../.types/sdk.tsbuildinfo", "jsx": "preserve" },
|
|
4
|
+
"include": ["src", "src/**/*.vue"],
|
|
5
5
|
"references": [{ "path": "../core" }]
|
|
6
6
|
}
|
package/packages/web/dist/assets/{ActorSettingsView-v2k7v454.js → ActorSettingsView-CiWhrnP4.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,D as t,E as n,Ft as r,Ht as i,On as a,_ as o,b as s,bt as c,ct as l,g as u,k as d,mt as f,o as p,qt as m,tr as h,v as g,vn as _,xn as v,y}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{
|
|
2
|
-
//# sourceMappingURL=ActorSettingsView-
|
|
1
|
+
import{$ as e,D as t,E as n,Ft as r,Ht as i,On as a,_ as o,b as s,bt as c,ct as l,g as u,k as d,mt as f,o as p,qt as m,tr as h,v as g,vn as _,xn as v,y}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{Sr as b}from"./push-payload-C1ppI5V2.js";import{t as x}from"./AppPage-D_kkUatv.js";import{n as S}from"./stores-BMEvTe-I.js";import{t as C}from"./now-40JhSjx0.js";import{t as w}from"./LoadState-8UknKQ6e.js";import"./runs-BWVBevgu.js";import{C as T,G as E,H as D,I as O,V as k,f as A,q as j,z as M}from"./ui-CjoSgSyZ.js";import{V as N}from"./index-Uz-h2M5K.js";import{t as P}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as F}from"./GinForm-p7UsKQ3s.js";var I=[`data-testid`],L={class:`head`},R={class:`titles`},z={class:`title`},B={class:`name`},V={class:`description`},H={class:`chips`},U={key:0,class:`values`},W={class:`who`},G={class:`what`},K=[`title`],q={key:1,class:`none`},J=P(d({__name:`SettingCard`,props:{entry:{},nameOf:{type:Function},now:{}},emits:[`edit`],setup(e,{emit:r}){let i=r,l={"user-wins":`The person's own value wins`,union:`Values add up`,intersect:`Only what all allow`,"most-restrictive":`The strictest wins`};return(r,u)=>(f(),s(`article`,{class:`setting`,"data-testid":`setting-${e.entry.view.setting}`},[o(`header`,L,[o(`div`,R,[o(`h3`,z,[n(h(e.entry.view.decl.name)+` `,1),o(`code`,B,h(e.entry.view.setting),1)]),o(`p`,V,h(e.entry.view.decl.description),1),o(`p`,H,[t(a(D),null,{default:m(()=>[n(`On `+h(e.entry.view.decl.appliesTo.map(e=>a(N)[e].plural).join(`, `)),1)]),_:1}),t(a(D),null,{default:m(()=>[n(h(l[e.entry.view.decl.merge]),1)]),_:1})])]),t(a(M),{icon:`plus`,size:`sm`,"data-testid":`setting-add`,onClick:u[0]||=e=>i(`edit`,void 0)},{default:m(()=>[...u[1]||=[n(`Set`,-1)]]),_:1})]),e.entry.values.length>0?(f(),s(`ul`,U,[(f(!0),s(p,null,c(e.entry.values,n=>(f(),s(`li`,{key:n.actor,class:`value`},[o(`span`,W,h(e.nameOf(n.actor)),1),o(`code`,G,h(a(b)(n.value,80)),1),o(`time`,{class:`when`,title:a(E)(n.updatedAt)},h(a(j)(n.updatedAt,e.now)),9,K),t(a(O),{icon:`edit`,size:`sm`,label:`Edit for ${e.nameOf(n.actor)}`,onClick:e=>i(`edit`,n.actor)},null,8,[`label`,`onClick`])]))),128))])):(f(),s(`p`,q,`Not set on anyone yet; systems use their own default.`))],8,I))}}),[[`__scopeId`,`data-v-b4db3c06`]]),Y={key:0,class:`body`,"data-testid":`setting-form`},X=P(d({__name:`SettingDialog`,props:e({entry:{},actors:{},actor:{default:void 0},busy:{type:Boolean,default:!1},problem:{default:``}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:e([`save`],[`update:open`]),setup(e,{emit:o}){let c=e,l=r(e,`open`),d=o,p=_(``),v=u(()=>[{value:``,label:`Choose who…`},...c.actors.map(e=>({value:e.id,label:`${e.name} (${e.kind})`}))]),b=u(()=>c.actors.find(e=>e.id===p.value)),x=u(()=>c.entry?.values.find(e=>e.actor===b.value?.id)?.value);i(l,e=>{e&&(p.value=c.actor??``)});function S(e){b.value!==void 0&&d(`save`,b.value.id,e)}return(r,i)=>(f(),g(a(T),{open:l.value,"onUpdate:open":i[2]||=e=>l.value=e,title:e.entry?`Set ${e.entry.view.decl.name}`:`Set`,description:e.entry?.view.decl.description??``,width:`560px`},{default:m(()=>[e.entry?(f(),s(`div`,Y,[t(a(A),{modelValue:p.value,"onUpdate:modelValue":i[0]||=e=>p.value=e,options:v.value,label:`On`},null,8,[`modelValue`,`options`]),b.value?(f(),g(F,{key:b.value.id,type:e.entry.view.decl.type,initial:x.value,"submit-label":`Save`,busy:e.busy,label:`Value`,onSubmit:S,onCancel:i[1]||=e=>l.value=!1},null,8,[`type`,`initial`,`busy`])):y(``,!0),e.problem===``?y(``,!0):(f(),g(a(k),{key:1,tone:`danger`},{default:m(()=>[n(h(e.problem),1)]),_:1}))])):y(``,!0)]),_:1},8,[`open`,`title`,`description`]))}}),[[`__scopeId`,`data-v-058a090f`]]),Z=[`aria-labelledby`],Q=[`id`],$={class:`cards`},ee=P(d({__name:`ActorSettingsView`,setup(e){let{admin:n,session:r,toasts:i}=S(),d=n.settings,y=n.actors,b=C(),T=_(!1),E=v(void 0),D=_(void 0),O=u(()=>y.options(E.value?.view.decl.appliesTo??[]));l(()=>{d.load(d.data.value.value!==void 0),y.load()});function k(e,t){E.value=e,D.value=t,T.value=!0}async function A(e,t){let n=E.value,a=r.user.value?.id;n!==void 0&&a!==void 0&&await d.set(n.view.setting,e,t,a,Date.now())&&(T.value=!1,i.ok(`Saved for ${y.nameOf(e)}`))}return(e,n)=>(f(),g(x,{title:`Actor settings`,description:`Typed controls systems attach to people and groups, such as which rows a group may read.`},{default:m(()=>[t(w,{loading:a(d).data.loading.value,problem:a(d).data.problem.value,ready:a(d).data.value.value!==void 0,empty:a(d).groups.value.length===0,"empty-icon":`users`,"empty-title":`No actor settings`,"empty-body":`Systems that declare settings list them here.`,onRetry:n[0]||=e=>a(d).load()},{default:m(()=>[(f(!0),s(p,null,c(a(d).groups.value,e=>(f(),s(`section`,{key:e.system,class:`group`,"aria-labelledby":`settings-${e.system}`},[o(`h2`,{id:`settings-${e.system}`,class:`system`},h(e.system),9,Q),o(`div`,$,[(f(!0),s(p,null,c(e.settings,e=>(f(),g(J,{key:e.view.setting,entry:e,"name-of":a(y).nameOf,now:a(b),onEdit:t=>k(e,t)},null,8,[`entry`,`name-of`,`now`,`onEdit`]))),128))])],8,Z))),128))]),_:1},8,[`loading`,`problem`,`ready`,`empty`]),t(X,{open:T.value,"onUpdate:open":n[1]||=e=>T.value=e,entry:E.value,actors:O.value,actor:D.value,busy:a(d).save.busy.value,problem:a(d).save.problem.value,onSave:A},null,8,[`open`,`entry`,`actors`,`actor`,`busy`,`problem`])]),_:1}))}}),[[`__scopeId`,`data-v-235f95b7`]]);export{ee as default};
|
|
2
|
+
//# sourceMappingURL=ActorSettingsView-CiWhrnP4.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{D as e,Ht as t,On as n,St as r,Zn as i,_ as a,b as o,bt as s,ct as c,g as l,it as u,k as d,mt as f,o as p,qt as m,tr as h,tt as g,v as _,vn as v,y}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{Ar as b,i as x,o as S,pr as C}from"./routes-oIISbS5Z.js";import{n as w}from"./stores-BMEvTe-I.js";import{W as T,Y as E,c as D}from"./ui-CjoSgSyZ.js";import{t as O}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{qt as k}from"./index-Uz-h2M5K.js";var A={class:`admin-nav`,"aria-label":`Admin`},j=[`data-more`],M=[`data-group`],N=[`aria-label`],P=[`aria-label`],F=O(d({__name:`AdminNav`,props:{groups:{}},setup(l){let u=l,d=v(null),b=D(d),x=e=>e.active&&e.entries.length>1;function S(){g(()=>{d.value?.querySelector(`[aria-current="page"]`)?.scrollIntoView({block:`nearest`,inline:`nearest`})})}return c(S),t(()=>u.groups.flatMap(e=>e.entries).find(e=>e.active)?.id,S),(t,c)=>{let u=r(`RouterLink`);return f(),o(`nav`,A,[a(`ul`,{ref_key:`list`,ref:d,class:`strip edge-fade`,"data-more":n(b)},[(f(!0),o(p,null,s(l.groups,t=>(f(),o(`li`,{key:t.id,class:i({cluster:x(t)}),"data-group":t.id},[x(t)?(f(!0),o(p,{key:0},s(t.entries,(e,r)=>(f(),_(u,{key:e.id,to:e.to,class:i([`link`,{active:e.active}]),"aria-current":e.active?`page`:void 0,"data-testid":`admin-nav-${e.id}`},{default:m(()=>[r===0?(f(),_(n(E),{key:0,name:t.icon,size:16},null,8,[`name`])):y(``,!0),a(`span`,null,h(e.label),1),e.count>0?(f(),o(`span`,{key:1,class:`count`,"aria-label":`${e.count} waiting`},h(n(T)(e.count)),9,N)):y(``,!0)]),_:2},1032,[`to`,`class`,`aria-current`,`data-testid`]))),128)):(f(),_(u,{key:1,to:t.to,class:i([`link`,{active:t.active}]),"aria-current":t.active?`page`:void 0,"data-testid":t.entries.length===1?`admin-nav-${t.entries[0]?.id}`:`admin-nav-group-${t.id}`},{default:m(()=>[e(n(E),{name:t.icon,size:16},null,8,[`name`]),a(`span`,null,h(t.entries.length===1?t.entries[0]?.label:t.label),1),t.count>0?(f(),o(`span`,{key:0,class:`count`,"aria-label":`${t.count} waiting`},h(n(T)(t.count)),9,P)):y(``,!0)]),_:2},1032,[`to`,`class`,`aria-current`,`data-testid`]))],10,M))),128))],8,j)])}}}),[[`__scopeId`,`data-v-cb0cb8da`]]),I={systems:{label:`Systems`,icon:`server`,to:S.systems(),routes:[x.systems,x.system,x.review,x.instance]},fns:{label:`Fns`,icon:`fn`,to:S.fns(),routes:[x.fns,x.fn]},graph:{label:`Graph`,icon:`tree`,to:S.graph(),routes:[x.graph]},models:{label:`Models`,icon:`sparkles`,to:S.models(),routes:[x.models]},limits:{label:`Budgets`,icon:`coins`,to:S.limits(),routes:[x.limits]},people:{label:`People`,icon:`users`,to:S.people(),routes:[x.people]},policies:{label:`Policies`,icon:`shield`,to:S.policies(),routes:[x.policies]},"actor-settings":{label:`Actor settings`,icon:`users`,to:S.actorSettings(),routes:[x.actorSettings]},runs:{label:`Runs`,icon:`play`,to:S.runs(),routes:[x.runs]},"model-calls":{label:`Model calls`,icon:`cpu`,to:S.modelCalls(),routes:[x.modelCalls,x.llmCalls]},mcps:{label:`Hub MCP`,icon:`link`,to:S.mcps(),routes:[x.mcps,x.mcp]}},L=e=>typeof e==`string`&&Object.values(x).includes(e);function R(e,t={}){let n=L(e.name)?e.name:void 0;return C.options.map(e=>{let r=I[e],i=r.routes;return{id:e,label:r.label,icon:r.icon,to:r.to,active:n!==void 0&&i.includes(n),count:t[e]??0}})}function z(e,t){let n=e.name===x.adminSystemPage?e.params:void 0;return t.filter(e=>e.area===`admin`&&e.nav===`main`).map(e=>({id:`${e.system}-${e.segment}`,label:e.title,icon:k(e.icon),to:S.systemPage(e.system,e.segment,[],{},`admin`),active:n?.system===e.system&&n.page===e.segment,count:0}))}var B=[{id:`systems`,label:`Systems`,icon:`server`,sections:[`systems`,`graph`]},{id:`fns`,label:`Fns`,icon:`fn`,sections:[`fns`]},{id:`models`,label:`Models`,icon:`sparkles`,sections:[`models`,`limits`]},{id:`people`,label:`People`,icon:`users`,sections:[`people`]},{id:`rules`,label:`Rules`,icon:`shield`,sections:[`policies`,`actor-settings`]},{id:`activity`,label:`Activity`,icon:`play`,sections:[`runs`,`model-calls`]},{id:`mcps`,label:`Hub MCP`,icon:`link`,sections:[`mcps`]}];function V(e,t={},n=[]){let r=new Map(R(e,t).map(e=>[e.id,e])),i=z(e,n);return B.map(e=>{let t=[...e.sections.flatMap(e=>r.get(e)??[]),...e.id===`systems`?i:[]];return{id:e.id,label:e.label,icon:e.icon,to:I[e.sections[0]].to,active:t.some(e=>e.active),count:t.reduce((e,t)=>e+t.count,0),entries:t}})}var H={class:`admin`,"data-testid":`admin`},U=O(d({__name:`AdminLayout`,setup(t){let{admin:n,pages:i}=w(),a=b(),s=l(()=>V(a,{systems:n.systems.pending.value},i.list.value.value??[]));return c(()=>{n.start()}),u(()=>{n.stop()}),(t,n)=>{let i=r(`RouterView`);return f(),o(`div`,H,[e(F,{groups:s.value},null,8,[`groups`]),e(i)])}}}),[[`__scopeId`,`data-v-34f290c2`]]);export{U as default};
|
|
2
|
+
//# sourceMappingURL=AdminLayout-CjVNzmYD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.admin-nav[data-v-cb0cb8da]{z-index:5;border-bottom:1px solid var(--border);background:var(--bg);min-width:0;position:sticky;top:0}.strip[data-v-cb0cb8da]{align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-5);max-width:var(--content);scrollbar-width:none;scroll-padding-inline:var(--space-5);margin:0 auto;list-style:none;display:flex;overflow-x:auto}.strip[data-v-cb0cb8da]::-webkit-scrollbar{display:none}.cluster[data-v-cb0cb8da]{border-radius:var(--radius-full);background:var(--surface-2);flex:none;gap:2px;padding:0 2px;display:flex}.link[data-v-cb0cb8da]{align-items:center;gap:var(--space-2);height:var(--control-sm);padding:0 var(--space-3);border-radius:var(--radius-full);color:var(--text-dim);font-size:var(--text-sm);font-weight:var(--weight-medium);white-space:nowrap;transition:background-color var(--fast) var(--ease), color var(--fast) var(--ease);text-decoration:none;display:inline-flex}.cluster .link[data-v-cb0cb8da]{height:calc(var(--control-sm) - 4px)}.link[data-v-cb0cb8da]:hover{background:var(--surface-2);color:var(--text);text-decoration:none}.cluster .link[data-v-cb0cb8da]:hover{background:var(--surface)}.link.active[data-v-cb0cb8da]{background:var(--accent-soft);color:var(--text)}.link.active[data-v-cb0cb8da] .ui-icon,.cluster .link[data-v-cb0cb8da] .ui-icon{color:var(--accent)}.link[data-v-cb0cb8da]:focus-visible{box-shadow:var(--ring);outline:none}.count[data-v-cb0cb8da]{border-radius:var(--radius-full);background:var(--accent);min-width:18px;color:var(--on-accent);font-size:11px;font-weight:var(--weight-strong);text-align:center;padding:0 5px;line-height:18px}@media (width<=759.98px){.strip[data-v-cb0cb8da]{padding-inline:var(--space-4)}}.admin[data-v-
|
|
1
|
+
.admin-nav[data-v-cb0cb8da]{z-index:5;border-bottom:1px solid var(--border);background:var(--bg);min-width:0;position:sticky;top:0}.strip[data-v-cb0cb8da]{align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-5);max-width:var(--content);scrollbar-width:none;scroll-padding-inline:var(--space-5);margin:0 auto;list-style:none;display:flex;overflow-x:auto}.strip[data-v-cb0cb8da]::-webkit-scrollbar{display:none}.cluster[data-v-cb0cb8da]{border-radius:var(--radius-full);background:var(--surface-2);flex:none;gap:2px;padding:0 2px;display:flex}.link[data-v-cb0cb8da]{align-items:center;gap:var(--space-2);height:var(--control-sm);padding:0 var(--space-3);border-radius:var(--radius-full);color:var(--text-dim);font-size:var(--text-sm);font-weight:var(--weight-medium);white-space:nowrap;transition:background-color var(--fast) var(--ease), color var(--fast) var(--ease);text-decoration:none;display:inline-flex}.cluster .link[data-v-cb0cb8da]{height:calc(var(--control-sm) - 4px)}.link[data-v-cb0cb8da]:hover{background:var(--surface-2);color:var(--text);text-decoration:none}.cluster .link[data-v-cb0cb8da]:hover{background:var(--surface)}.link.active[data-v-cb0cb8da]{background:var(--accent-soft);color:var(--text)}.link.active[data-v-cb0cb8da] .ui-icon,.cluster .link[data-v-cb0cb8da] .ui-icon{color:var(--accent)}.link[data-v-cb0cb8da]:focus-visible{box-shadow:var(--ring);outline:none}.count[data-v-cb0cb8da]{border-radius:var(--radius-full);background:var(--accent);min-width:18px;color:var(--on-accent);font-size:11px;font-weight:var(--weight-strong);text-align:center;padding:0 5px;line-height:18px}@media (width<=759.98px){.strip[data-v-cb0cb8da]{padding-inline:var(--space-4)}}.admin[data-v-34f290c2]{--admin-nav-height:calc(var(--control-sm) + 2 * var(--space-2) + 1px);--pinned-top:var(--admin-nav-height);grid-template-rows:auto 1fr;min-width:0;min-height:100%;display:grid}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ht as e,Lt as t,On as n,Zn as r,_ as i,b as a,it as o,k as s,mt as c,tr as l,xt as u,y as d}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{t as f}from"./layout-
|
|
2
|
-
//# sourceMappingURL=AppPage-
|
|
1
|
+
import{Ht as e,Lt as t,On as n,Zn as r,_ as i,b as a,it as o,k as s,mt as c,tr as l,xt as u,y as d}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{t as f}from"./layout-CTAHAwIH.js";import{r as p}from"./stores-BMEvTe-I.js";import{j as m}from"./ui-CjoSgSyZ.js";import{t as h}from"./_plugin-vue_export-helper-BDNMzG2s.js";var g={class:`head`},_={class:`titles`},v={key:0,class:`crumb`},y={key:1,class:`description`},b={key:0,class:`actions`},x=h(s({__name:`AppPage`,props:{title:{},description:{default:``},width:{default:`wide`},keepTitle:{type:Boolean,default:!1}},setup(s){let h=s,x=t(),S=m(f),C=p()?.layout;return C!==void 0&&h.keepTitle&&(e(()=>h.title,e=>{C.pageTitle.value=e},{immediate:!0}),o(()=>{C.pageTitle.value===h.title&&(C.pageTitle.value=void 0)})),(e,t)=>(c(),a(`div`,{class:r([`app-page`,[s.width,{compact:n(S)}]])},[i(`header`,g,[i(`div`,_,[x.crumb?(c(),a(`div`,v,[u(e.$slots,`crumb`,{},void 0,!0)])):d(``,!0),i(`h1`,{class:r([`title`,{"sr-only":n(S)}])},l(s.title),3),s.description===``?d(``,!0):(c(),a(`p`,y,l(s.description),1))]),x.actions?(c(),a(`div`,b,[u(e.$slots,`actions`,{},void 0,!0)])):d(``,!0)]),u(e.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-d3da10f9`]]);export{x as t};
|
|
2
|
+
//# sourceMappingURL=AppPage-D_kkUatv.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as e,Ft as t,On as n,b as r,g as i,k as a,mt as o,v as s,y as c}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{l,p as u}from"./ui-
|
|
2
|
-
//# sourceMappingURL=AutoPairPicker-
|
|
1
|
+
import{D as e,Ft as t,On as n,b as r,g as i,k as a,mt as o,v as s,y as c}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{l,p as u}from"./ui-CjoSgSyZ.js";import{K as d}from"./index-Uz-h2M5K.js";import{t as f}from"./_plugin-vue_export-helper-BDNMzG2s.js";var p={class:`auto-pair`,"data-testid":`auto-pair`},m=f(a({__name:`AutoPairPicker`,props:{modelValue:{required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(a){let f=t(a,`modelValue`),m=d.map(e=>({value:e.label,label:e.label})),h=i({get:()=>f.value!==void 0,set:e=>{f.value=e?{expiresIn:d[0].ms}:void 0}}),g=i({get:()=>d.find(e=>e.ms===f.value?.expiresIn)?.label??d[0].label,set:e=>{f.value={expiresIn:d.find(t=>t.label===e)?.ms??d[0].ms}}});return(t,i)=>(o(),r(`div`,p,[e(n(l),{modelValue:h.value,"onUpdate:modelValue":i[0]||=e=>h.value=e,label:`Auto pair`,description:`It can pair again by itself if its key is lost, until the secret ends or you revoke it.`},null,8,[`modelValue`]),h.value?(o(),s(n(u),{key:0,modelValue:g.value,"onUpdate:modelValue":i[1]||=e=>g.value=e,options:n(m),label:`Auto pair lasts`,"data-testid":`auto-pair-lifetime`},null,8,[`modelValue`,`options`])):c(``,!0)]))}}),[[`__scopeId`,`data-v-cde7a72f`]]);export{m as t};
|
|
2
|
+
//# sourceMappingURL=AutoPairPicker-BdCHi7dL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,D as t,E as n,Ft as r,Ht as i,Lt as a,On as o,Zn as s,_ as c,b as l,er as u,g as d,it as f,k as p,mt as m,qt as h,vn as g,xt as _,y as v}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{n as y,t as b}from"./PanelHost-
|
|
2
|
-
//# sourceMappingURL=BrowserFrame-
|
|
1
|
+
import{$ as e,D as t,E as n,Ft as r,Ht as i,Lt as a,On as o,Zn as s,_ as c,b as l,er as u,g as d,it as f,k as p,mt as m,qt as h,vn as g,xt as _,y as v}from"./runtime-core.esm-bundler-wlpNGAAZ.js";import{n as y,t as b}from"./PanelHost-BzWYqH39.js";import{t as x}from"./layout-CTAHAwIH.js";import{j as S,z as C}from"./ui-CjoSgSyZ.js";import{t as w}from"./LoadState-8UknKQ6e.js";import{t as T}from"./_plugin-vue_export-helper-BDNMzG2s.js";var E={class:`list-side`},D=[`aria-label`],O=[`aria-label`],k=T(p({__name:`BrowserFrame`,props:e({loading:{type:Boolean},loaded:{type:Boolean},problem:{},empty:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},emptyTitle:{},emptyBody:{default:``},emptyIcon:{default:`search`},panelTitle:{default:``},panelSubtitle:{default:``},label:{}},{panel:{type:Boolean,required:!0},panelModifiers:{}}),emits:e([`more`,`retry`],[`update:panel`]),setup(e,{emit:p}){let T=e,k=r(e,`panel`),A=p,j=a(),M=S(`(min-width: 1360px)`),N=S(x),P=g(null),F,I=g(null),L=g(0),R;i(I,e=>{R?.disconnect(),e!==null&&typeof ResizeObserver<`u`&&(R=new ResizeObserver(()=>{L.value=e.offsetHeight}),R.observe(e))});let z=d(()=>({"--filters-height":`${L.value}px`}));return i(P,e=>{F?.disconnect(),e!==null&&typeof IntersectionObserver<`u`&&(F=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&T.hasMore&&!T.loadingMore&&A(`more`)},{rootMargin:`240px`}),F.observe(e))}),f(()=>{F?.disconnect(),R?.disconnect()}),(r,i)=>(m(),l(`div`,{class:s([`browser`,{split:o(M)&&k.value}]),style:u(z.value)},[c(`div`,E,[j.filters?(m(),l(`div`,{key:0,ref_key:`filters`,ref:I,class:`filters pinned`,role:`search`,"aria-label":`Filter ${e.label}`},[_(r.$slots,`filters`,{},void 0,!0)],8,D)):v(``,!0),t(w,{loading:e.loading,problem:e.problem,ready:e.loaded,empty:e.empty,"empty-icon":e.emptyIcon,"empty-title":e.emptyTitle,"empty-body":e.emptyBody,lines:8,onRetry:i[1]||=e=>A(`retry`)},{default:h(()=>[c(`ul`,{class:`rows`,"aria-label":e.label},[_(r.$slots,`default`,{},void 0,!0)],8,O),e.hasMore?(m(),l(`div`,{key:0,ref_key:`sentinel`,ref:P,class:`more`},[t(o(C),{variant:`ghost`,loading:e.loadingMore,"data-testid":`more`,onClick:i[0]||=e=>A(`more`)},{default:h(()=>[...i[4]||=[n(`Show more`,-1)]]),_:1},8,[`loading`])],512)):v(``,!0)]),_:3},8,[`loading`,`problem`,`ready`,`empty`,`empty-icon`,`empty-title`,`empty-body`])]),t(b,{open:k.value,"onUpdate:open":i[3]||=e=>k.value=e,inline:o(M),phone:o(N),label:e.panelTitle||e.label},{default:h(()=>[t(y,{title:e.panelTitle||e.label,subtitle:e.panelSubtitle,onClose:i[2]||=e=>k.value=!1},{default:h(()=>[_(r.$slots,`panel`,{},void 0,!0)]),_:3},8,[`title`,`subtitle`])]),_:3},8,[`open`,`inline`,`phone`,`label`])],6))}}),[[`__scopeId`,`data-v-b79d08d9`]]);export{k as t};
|
|
2
|
+
//# sourceMappingURL=BrowserFrame-CVQvfCB8.js.map
|