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
|
@@ -7,19 +7,513 @@ summary: "Signatures and options for visuals and widgets."
|
|
|
7
7
|
question: "What are the exact signatures and options in the API of visuals and widgets?"
|
|
8
8
|
when: "When writing code for visuals and widgets and an exact signature, field or option is needed."
|
|
9
9
|
askedBy: "system"
|
|
10
|
-
lastModified: "2026-11-
|
|
10
|
+
lastModified: "2026-11-29"
|
|
11
11
|
parent: "fs/authoring.widgets"
|
|
12
12
|
suggest: "none"
|
|
13
13
|
tags: ["authoring", "reference"]
|
|
14
14
|
niche: "developer"
|
|
15
|
-
choices:
|
|
16
|
-
- to: "fs/authoring.widgets.reference.hub-visuals"
|
|
17
|
-
when: "Pick this for HUB_VISUALS, BUILT_IN_CONTRIBUTIONS, visual, VisualInput, channel, ChannelOptions, resultFacts, ginTypeFacts, rankedVisuals, VisualContribution, RankedVisual, VisualView, VisualEntry,…"
|
|
18
|
-
- to: "fs/authoring.widgets.reference.sourcecompatible"
|
|
19
|
-
when: "Pick this for sourceCompatible, SourceCompatibleOptions, widgetProposalSchema, WidgetProposalSchemaInput, WidgetProposalSchema, WidgetDraftInput, WidgetDraft."
|
|
20
15
|
---
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
### Reference: visuals and widgets
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
#### `HUB_VISUALS`
|
|
20
|
+
|
|
21
|
+
const · `import { HUB_VISUALS } from '@harness/sdk'`
|
|
22
|
+
|
|
23
|
+
The hub's visual registry: every visual any system draws a `ResultTable` with.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
const HUB_VISUALS: "hub/visuals";
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### `BUILT_IN_CONTRIBUTIONS`
|
|
30
|
+
|
|
31
|
+
const · `import { BUILT_IN_CONTRIBUTIONS } from '@harness/sdk'`
|
|
32
|
+
|
|
33
|
+
The visuals every result has (`BUILT_IN_VISUALS`: the table and the value cards) as the hub contributes them to
|
|
34
|
+
`HUB_VISUALS`, in registry order. The web app draws them. Every chart is a system's: the bundled widgets system
|
|
35
|
+
contributes the chart families (and bundles ECharts); other systems add theirs after.
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const BUILT_IN_CONTRIBUTIONS: readonly ContributionDecl[];
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Refers to: [`ContributionDecl`](context:fs/authoring.core-types.registries-ts#core-contributiondecl).
|
|
42
|
+
|
|
43
|
+
#### `visual`
|
|
44
|
+
|
|
45
|
+
function · `import { visual } from '@harness/sdk'`
|
|
46
|
+
|
|
47
|
+
A visual this system adds to the hub's visual registry, for `system(name, { contributes: [visual(...)] })`. Its
|
|
48
|
+
component (and an optional veto) go in `client({ visuals: { [HUB_VISUALS]: { <name>: { component } } } })`.
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
visual({ name: 'waffle', label: 'Waffle', shape: { channels: [channel('itemName', 'Square', ['text'], { role: 'group' }), channel('value', 'Size', ['integer'], { role: 'measure' })], rows: { min: 1, max: 10 }, whole: true } })
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
function visual(input: VisualInput): ContributionDecl;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Refers to: [`ContributionDecl`](context:fs/authoring.core-types.registries-ts#core-contributiondecl).
|
|
59
|
+
|
|
60
|
+
#### `VisualInput`
|
|
61
|
+
|
|
62
|
+
interface · `import { VisualInput } from '@harness/sdk'`
|
|
63
|
+
|
|
64
|
+
What `visual()` takes: the visual's name, its switcher label and icon, and the data it draws.
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
interface VisualInput {
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly label: string;
|
|
70
|
+
readonly description?: string;
|
|
71
|
+
readonly icon?: string;
|
|
72
|
+
readonly shape: VisualShapeInput;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Refers to: [`VisualShapeInput`](context:fs/authoring.core-types.registries-ts#core-visualshapeinput).
|
|
77
|
+
|
|
78
|
+
#### `channel`
|
|
79
|
+
|
|
80
|
+
function · `import { channel } from '@harness/sdk'`
|
|
81
|
+
|
|
82
|
+
One input of a visual: `channel('y', 'Value', ['integer', 'number'], { role: 'measure' })`; required and single unless said.
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
function channel(name: string, label: string, accepts: readonly ColumnKind[], options?: ChannelOptions): VisualChannel;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Refers to: [`ColumnKind`](context:fs/authoring.core-types.registries-ts#core-columnkind), [`VisualChannel`](context:fs/authoring.core-types.registries-ts#core-visualchannel).
|
|
89
|
+
|
|
90
|
+
#### `ChannelOptions`
|
|
91
|
+
|
|
92
|
+
interface · `import { ChannelOptions } from '@harness/sdk'`
|
|
93
|
+
|
|
94
|
+
What `channel()` takes besides the name, label and kinds: all optional (required and single by default).
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
interface ChannelOptions {
|
|
98
|
+
readonly required?: boolean;
|
|
99
|
+
readonly many?: boolean;
|
|
100
|
+
/** The fewest columns a `many` channel needs. */
|
|
101
|
+
readonly min?: number;
|
|
102
|
+
/** The role its columns must have: a category wants a `group` key, a value a `measure`. */
|
|
103
|
+
readonly role?: 'group' | 'measure';
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
#### `resultFacts`
|
|
108
|
+
|
|
109
|
+
function · `import { resultFacts } from '@harness/sdk'`
|
|
110
|
+
|
|
111
|
+
A table's column facts with its columns' gin facts: what the widgets system attaches and the web recomputes.
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
function resultFacts(table: Pick<ResultTable, "columns" | "rows" | "offset" | "truncated">): ResultFacts;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Refers to: [`ResultFacts`](context:fs/authoring.core-types.visuals-ts#core-resultfacts), [`ResultTable`](context:fs/authoring.core-types.registries-ts#core-resulttable).
|
|
118
|
+
|
|
119
|
+
#### `ginTypeFacts`
|
|
120
|
+
|
|
121
|
+
function · `import { ginTypeFacts } from '@harness/sdk'`
|
|
122
|
+
|
|
123
|
+
What a column's gin type says that core can't read (core runs no gin): an enum's members and a number's declared
|
|
124
|
+
range. Pass it to `columnFacts` as `typeFacts`, or use `resultFacts`.
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
function ginTypeFacts(column: ResultColumn): Pick<ColumnFacts, "members" | "bound">;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Refers to: [`ColumnFacts`](context:fs/authoring.core-types.visuals-ts#core-columnfacts), [`ResultColumn`](context:fs/authoring.core-types.registries-ts#core-resultcolumn).
|
|
131
|
+
|
|
132
|
+
#### `rankedVisuals`
|
|
133
|
+
|
|
134
|
+
function · `import { rankedVisuals } from '@harness/sdk'`
|
|
135
|
+
|
|
136
|
+
Every `HUB_VISUALS` contribution among `entries` that can draw a result, best first (core's `rankVisuals`: coverage,
|
|
137
|
+
then priority, then the entries' order). Contributions to other registries and ones without a shape are left out.
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
function rankedVisuals<E extends VisualContribution>(entries: readonly E[], facts: ResultFacts, table?: Pick<ResultTable, "rows" | "columns">): RankedVisual<E>[];
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Refers to: [`ResultFacts`](context:fs/authoring.core-types.visuals-ts#core-resultfacts), [`ResultTable`](context:fs/authoring.core-types.registries-ts#core-resulttable).
|
|
144
|
+
|
|
145
|
+
#### `VisualContribution`
|
|
146
|
+
|
|
147
|
+
interface · `import { VisualContribution } from '@harness/sdk'`
|
|
148
|
+
|
|
149
|
+
A visual a registry offers, as `rankedVisuals` reads it (`ContributionDecl`, `ContributionView`).
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
interface VisualContribution {
|
|
153
|
+
readonly registry: string;
|
|
154
|
+
readonly name: string;
|
|
155
|
+
readonly label: string;
|
|
156
|
+
/** What it draws, in a line (an authoring agent reads it beside the label). */
|
|
157
|
+
readonly description?: string | undefined;
|
|
158
|
+
readonly shape?: VisualShape | undefined;
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Refers to: [`VisualShape`](context:fs/authoring.core-types.registries-ts#core-visualshape).
|
|
163
|
+
|
|
164
|
+
#### `RankedVisual`
|
|
165
|
+
|
|
166
|
+
interface · `import { RankedVisual } from '@harness/sdk'`
|
|
167
|
+
|
|
168
|
+
A contribution that can draw a result, with its rank.
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
interface RankedVisual<E extends VisualContribution> {
|
|
172
|
+
readonly entry: E;
|
|
173
|
+
readonly rank: VisualRank;
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Refers to: [`VisualRank`](context:fs/authoring.core-types.visuals-ts#core-visualrank).
|
|
178
|
+
|
|
179
|
+
#### `VisualView`
|
|
180
|
+
|
|
181
|
+
interface · `import { VisualView } from '@harness/sdk'`
|
|
182
|
+
|
|
183
|
+
The props of a visual (an entry of a registry such as the hub's `hub/visuals`): the rows to draw, their column facts
|
|
184
|
+
(`resultFacts`), the columns bound to each channel (`bind`, complete: the widget's or the default binding), the style
|
|
185
|
+
picked in the style picker, and the theme's colours; the result's `title` (a chart's accessible name) and, where
|
|
186
|
+
the page offers one, the `opener` of a row's actions (with no drill and no opener, a mark opens nothing, so it
|
|
187
|
+
shouldn't point).
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
interface VisualView {
|
|
191
|
+
table: ResultTable;
|
|
192
|
+
facts: ResultFacts;
|
|
193
|
+
bind: VisualBinding;
|
|
194
|
+
style: string;
|
|
195
|
+
palette: VisualPalette;
|
|
196
|
+
title?: string | undefined;
|
|
197
|
+
opener?: VisualRowOpener | undefined;
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Refers to: [`ResultFacts`](context:fs/authoring.core-types.visuals-ts#core-resultfacts), [`ResultTable`](context:fs/authoring.core-types.registries-ts#core-resulttable), [`VisualBinding`](context:fs/authoring.core-types.visuals-ts#core-visualbinding).
|
|
202
|
+
|
|
203
|
+
#### `VisualEntry`
|
|
204
|
+
|
|
205
|
+
interface · `import { VisualEntry } from '@harness/sdk'`
|
|
206
|
+
|
|
207
|
+
One visual a system adds to a registry: the component that draws it, and an optional `veto`. Whether a result fits
|
|
208
|
+
and how it ranks come from the contribution's declared shape (`visual({ shape })`, core's `rankVisuals`), the same in
|
|
209
|
+
the hub, the widget agent and the browser; `veto` can only take a fit away (a reason in words), never score one. Keep
|
|
210
|
+
it cheap and pure: it runs for every result the person sees.
|
|
211
|
+
|
|
212
|
+
```ts
|
|
213
|
+
interface VisualEntry<C extends ContractShape> {
|
|
214
|
+
veto?(table: ResultTable, facts: ResultFacts): string | undefined;
|
|
215
|
+
component: Renderer<VisualView & WithSystem<C>>;
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Refers to: [`ResultFacts`](context:fs/authoring.core-types.visuals-ts#core-resultfacts), [`ResultTable`](context:fs/authoring.core-types.registries-ts#core-resulttable).
|
|
220
|
+
|
|
221
|
+
#### `VisualPalette`
|
|
222
|
+
|
|
223
|
+
interface · `import { VisualPalette } from '@harness/sdk'`
|
|
224
|
+
|
|
225
|
+
The colours a visual draws with, resolved for the current theme from the web app's tokens: the categorical series
|
|
226
|
+
colours (`--chart-1` … `--chart-8`, the first the accent), the text and muted text, the grid lines, the surface
|
|
227
|
+
behind the chart, a rise and a fall (`up` and `down`: the theme's ok and danger colours, for candles and changes)
|
|
228
|
+
and the app's font. Build an ECharts theme from it; it changes when the theme does.
|
|
229
|
+
|
|
230
|
+
```ts
|
|
231
|
+
interface VisualPalette {
|
|
232
|
+
readonly series: readonly string[];
|
|
233
|
+
readonly text: string;
|
|
234
|
+
readonly muted: string;
|
|
235
|
+
readonly grid: string;
|
|
236
|
+
readonly surface: string;
|
|
237
|
+
readonly up: string;
|
|
238
|
+
readonly down: string;
|
|
239
|
+
readonly font: string;
|
|
240
|
+
readonly dark: boolean;
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### `VisualRange`
|
|
245
|
+
|
|
246
|
+
interface · `import { VisualRange } from '@harness/sdk'`
|
|
247
|
+
|
|
248
|
+
A range a visual shows, as its range args take it: a calendar's month, a zoomed time axis (ISO dates or instants).
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
interface VisualRange {
|
|
252
|
+
readonly from: string;
|
|
253
|
+
readonly to: string;
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### `VisualRowOpener`
|
|
258
|
+
|
|
259
|
+
interface · `import { VisualRowOpener } from '@harness/sdk'`
|
|
260
|
+
|
|
261
|
+
A button on each row that opens what it offers (a widget's row actions, a record), as the page around a visual has it.
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
interface VisualRowOpener {
|
|
265
|
+
/** The button's label ("Actions", "Open"). */
|
|
266
|
+
readonly label: string;
|
|
267
|
+
/** Whether a row offers anything. */
|
|
268
|
+
has(row: readonly Json[]): boolean;
|
|
269
|
+
open(row: readonly Json[]): void;
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Refers to: [`Json`](context:fs/authoring.core-types.primitives-ts#core-json).
|
|
274
|
+
|
|
275
|
+
#### `VisualImageKind`
|
|
276
|
+
|
|
277
|
+
type · `import { VisualImageKind } from '@harness/sdk'`
|
|
278
|
+
|
|
279
|
+
The kinds of image a visual can export.
|
|
280
|
+
|
|
281
|
+
```ts
|
|
282
|
+
type VisualImageKind = 'png' | 'svg';
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
#### `VisualImageExport`
|
|
286
|
+
|
|
287
|
+
type · `import { VisualImageExport } from '@harness/sdk'`
|
|
288
|
+
|
|
289
|
+
An image of what a visual draws, as a data URL.
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
type VisualImageExport = (kind: VisualImageKind) => string;
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
#### `VisualImageSlot`
|
|
296
|
+
|
|
297
|
+
interface · `import { VisualImageSlot } from '@harness/sdk'`
|
|
298
|
+
|
|
299
|
+
Where the result view lets the visual it draws offer Export image (`inject(VISUAL_IMAGE)`; set while mounted, cleared on unmount).
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
interface VisualImageSlot {
|
|
303
|
+
set(exporter: VisualImageExport | undefined): void;
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
#### `VISUAL_IMAGE`
|
|
308
|
+
|
|
309
|
+
const · `import { VISUAL_IMAGE } from '@harness/sdk'`
|
|
310
|
+
|
|
311
|
+
The result view's image export slot, for a visual that draws an image (a chart).
|
|
312
|
+
|
|
313
|
+
```ts
|
|
314
|
+
const VISUAL_IMAGE: InjectionKey<VisualImageSlot>;
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
#### `VISUAL_DRILLABLE`
|
|
318
|
+
|
|
319
|
+
const · `import { VISUAL_DRILLABLE } from '@harness/sdk'`
|
|
320
|
+
|
|
321
|
+
Whether a click on a row's mark drills into it (a widget with a drill): the widget view provides it; absent outside one.
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
const VISUAL_DRILLABLE: InjectionKey<Readonly<Ref<boolean>>>;
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
#### `VISUAL_EMITS`
|
|
328
|
+
|
|
329
|
+
const · `import { VISUAL_EMITS } from '@harness/sdk'`
|
|
330
|
+
|
|
331
|
+
What a visual emits, with the checks Vue runs on each (`defineEmits(VISUAL_EMITS)`, or `emits: VISUAL_EMITS`):
|
|
332
|
+
`drill` with the index of the clicked row (a bar, slice or point: the widget runs its drill, else opens the row's
|
|
333
|
+
action menu), and `range` when the person zooms a time axis or turns a calendar's month (the widget sets its range
|
|
334
|
+
args and runs again).
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
const VISUAL_EMITS: { drill: (rowIndex: number) => boolean; range: (range: VisualRange) => boolean; };
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
#### `VisualEmits`
|
|
341
|
+
|
|
342
|
+
type · `import { VisualEmits } from '@harness/sdk'`
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
type VisualEmits = typeof VISUAL_EMITS;
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
#### `visualTheme`
|
|
349
|
+
|
|
350
|
+
function · `import { visualTheme } from '@harness/sdk'`
|
|
351
|
+
|
|
352
|
+
The ECharts theme for a palette: series in the palette's order, text and axes in its colours, no background of its own.
|
|
353
|
+
|
|
354
|
+
```ts
|
|
355
|
+
function visualTheme(palette: VisualPalette): VisualTheme;
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
#### `VisualTheme`
|
|
359
|
+
|
|
360
|
+
interface · `import { VisualTheme } from '@harness/sdk'`
|
|
361
|
+
|
|
362
|
+
An ECharts theme object (`init(el, visualTheme(palette))`), so a system's chart looks like the built-in ones.
|
|
363
|
+
|
|
364
|
+
```ts
|
|
365
|
+
interface VisualTheme {
|
|
366
|
+
readonly color: readonly string[];
|
|
367
|
+
readonly backgroundColor: string;
|
|
368
|
+
readonly textStyle: { readonly color: string };
|
|
369
|
+
readonly legend: { readonly textStyle: { readonly color: string } };
|
|
370
|
+
readonly tooltip: { readonly backgroundColor: string; readonly borderColor: string; readonly textStyle: { readonly color: string } };
|
|
371
|
+
readonly categoryAxis: VisualAxisTheme;
|
|
372
|
+
readonly valueAxis: VisualAxisTheme;
|
|
373
|
+
readonly timeAxis: VisualAxisTheme;
|
|
374
|
+
readonly logAxis: VisualAxisTheme;
|
|
375
|
+
}
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
#### `argsOf`
|
|
379
|
+
|
|
380
|
+
function · `import { argsOf } from '@harness/sdk'`
|
|
381
|
+
|
|
382
|
+
The args of a fn's args type, in order. A type that is not an object has none.
|
|
383
|
+
|
|
384
|
+
```ts
|
|
385
|
+
function argsOf(args: GinTypeDef): ArgInfo[];
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
Refers to: [`GinTypeDef`](context:fs/authoring.core-types.gin-ts#core-gintypedef).
|
|
389
|
+
|
|
390
|
+
#### `ArgInfo`
|
|
391
|
+
|
|
392
|
+
interface · `import { ArgInfo } from '@harness/sdk'`
|
|
393
|
+
|
|
394
|
+
One argument of a fn's args type: its type (without an optional wrapper) and whether it must be given.
|
|
395
|
+
|
|
396
|
+
```ts
|
|
397
|
+
interface ArgInfo {
|
|
398
|
+
readonly name: string;
|
|
399
|
+
readonly type: GinTypeDef;
|
|
400
|
+
/** Neither optional nor defaulted. */
|
|
401
|
+
readonly required: boolean;
|
|
402
|
+
/** It declares a default, so leaving it out still gives it a value. */
|
|
403
|
+
readonly defaulted: boolean;
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Refers to: [`GinTypeDef`](context:fs/authoring.core-types.gin-ts#core-gintypedef).
|
|
408
|
+
|
|
409
|
+
#### `WINDOW_ARGS`
|
|
410
|
+
|
|
411
|
+
const · `import { WINDOW_ARGS } from '@harness/sdk'`
|
|
412
|
+
|
|
413
|
+
The args a buffered pager drives, when a source has both (`limit` and `offset`, as the database's query fns name them).
|
|
414
|
+
|
|
415
|
+
```ts
|
|
416
|
+
const WINDOW_ARGS: PagingArgs;
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Refers to: [`PagingArgs`](context:fs/authoring.core-types.tables-ts#core-pagingargs).
|
|
420
|
+
|
|
421
|
+
#### `pagingOf`
|
|
422
|
+
|
|
423
|
+
function · `import { pagingOf } from '@harness/sdk'`
|
|
424
|
+
|
|
425
|
+
The source's paging args (`WINDOW_ARGS`, both whole-number args), or `undefined` when it doesn't page.
|
|
426
|
+
|
|
427
|
+
```ts
|
|
428
|
+
function pagingOf(args: GinTypeDef): PagingArgs | undefined;
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
Refers to: [`GinTypeDef`](context:fs/authoring.core-types.gin-ts#core-gintypedef), [`PagingArgs`](context:fs/authoring.core-types.tables-ts#core-pagingargs).
|
|
432
|
+
|
|
433
|
+
#### `rangeOf`
|
|
434
|
+
|
|
435
|
+
function · `import { rangeOf } from '@harness/sdk'`
|
|
436
|
+
|
|
437
|
+
The source's range args, which a range-claiming visual (time, calendar, timeline, finance) drives: the first pair of
|
|
438
|
+
date or timestamp args named `from`/`to`, `start`/`end`, `after`/`before` or `since`/`until`, alone or after a
|
|
439
|
+
shared prefix (`due_from`/`due_to`). `undefined` when there is none.
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
function rangeOf(args: GinTypeDef): RangeArgs | undefined;
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Refers to: [`GinTypeDef`](context:fs/authoring.core-types.gin-ts#core-gintypedef), [`RangeArgs`](context:fs/authoring.core-types.tables-ts#core-rangeargs).
|
|
446
|
+
|
|
447
|
+
#### `rowActionOptions`
|
|
448
|
+
|
|
449
|
+
function · `import { rowActionOptions } from '@harness/sdk'`
|
|
450
|
+
|
|
451
|
+
The actions a row offers: every row fn when the widget lists none, else the listed ones in their order, each
|
|
452
|
+
labelled (`actionLabel` unless relabelled), confirming when `confirmOf` says so, with its bound args, a form for the
|
|
453
|
+
args left (the form comes first; the confirm follows for anything above a read), and what follows: the widget's
|
|
454
|
+
`then`, else derived (`deriveThen`: rows returned open, a write refreshes, else a status line). A method's value
|
|
455
|
+
(`self`) is bound by the row's ref, so it never shows in the form. A listed action whose fn isn't among `rowFns`
|
|
456
|
+
is left out.
|
|
457
|
+
|
|
458
|
+
```ts
|
|
459
|
+
function rowActionOptions(rowFns: readonly RowFn[], actions: readonly RowAction[] | undefined): RowActionOption[];
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Refers to: [`RowAction`](context:fs/authoring.core-types.tables-ts#core-rowaction), [`RowActionOption`](context:fs/authoring.core-types.tables-ts#core-rowactionoption).
|
|
463
|
+
|
|
464
|
+
#### `RowFn`
|
|
465
|
+
|
|
466
|
+
interface · `import { RowFn } from '@harness/sdk'`
|
|
467
|
+
|
|
468
|
+
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.
|
|
469
|
+
|
|
470
|
+
```ts
|
|
471
|
+
interface RowFn {
|
|
472
|
+
readonly fn: QualifiedName;
|
|
473
|
+
readonly mode: FnMode;
|
|
474
|
+
readonly args: GinTypeDef;
|
|
475
|
+
/** Its declared return is a table (`returnsTable`), so its rows open as a new level. */
|
|
476
|
+
readonly returnsTable: boolean;
|
|
477
|
+
}
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
Refers to: [`FnMode`](context:fs/authoring.core-types.contextdecl#core-fnmode), [`GinTypeDef`](context:fs/authoring.core-types.gin-ts#core-gintypedef), [`QualifiedName`](context:fs/authoring.core-types.primitives-ts#core-qualifiedname).
|
|
481
|
+
|
|
482
|
+
#### `boundArgs`
|
|
483
|
+
|
|
484
|
+
function · `import { boundArgs } from '@harness/sdk'`
|
|
485
|
+
|
|
486
|
+
The args a click takes from a row (an action's or the drill's `bind`: arg → column), by column name. A column the
|
|
487
|
+
table lacks, or a row past its end, throws: the widget's check already refused such a binding.
|
|
488
|
+
|
|
489
|
+
```ts
|
|
490
|
+
function boundArgs(bind: Readonly<Record<string, string>>, table: Pick<ResultTable, "columns" | "rows">, rowIndex: number): Record<string, Json>;
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Refers to: [`Json`](context:fs/authoring.core-types.primitives-ts#core-json), [`ResultTable`](context:fs/authoring.core-types.registries-ts#core-resulttable).
|
|
494
|
+
|
|
495
|
+
#### `returnsTable`
|
|
496
|
+
|
|
497
|
+
function · `import { returnsTable } from '@harness/sdk'`
|
|
498
|
+
|
|
499
|
+
Whether a fn's declared return is a table: every value of it is a `ResultTable` (gin `compatible`), so the chat routes
|
|
500
|
+
it to the result view (`RESULT_TABLE_ROUTING`) and a widget may draw from it. A return that names a type `scope`
|
|
501
|
+
doesn't know is not a table.
|
|
502
|
+
|
|
503
|
+
```ts
|
|
504
|
+
function returnsTable(returns: GinTypeDef, scope?: TypeScope): boolean;
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
Refers to: [`GinTypeDef`](context:fs/authoring.core-types.gin-ts#core-gintypedef).
|
|
508
|
+
|
|
509
|
+
#### `ginTypeOf`
|
|
510
|
+
|
|
511
|
+
function · `import { ginTypeOf } from '@harness/sdk'`
|
|
512
|
+
|
|
513
|
+
A gin type from its definition, in `scope` (the hub's or loaded types) or `g`. Throws a gin error when it doesn't parse.
|
|
514
|
+
|
|
515
|
+
```ts
|
|
516
|
+
function ginTypeOf(def: GinTypeDef, scope?: TypeScope): GinType;
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
Refers to: [`GinTypeDef`](context:fs/authoring.core-types.gin-ts#core-gintypedef).
|
package/systems/fs/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@aeye/resources": "^0.
|
|
4
|
-
"@aeye/schema": "^0.
|
|
3
|
+
"@aeye/resources": "^0.11.2",
|
|
4
|
+
"@aeye/schema": "^0.11.2",
|
|
5
5
|
"@ayepi/env": "^0.6.0",
|
|
6
6
|
"@harness/build": "*",
|
|
7
7
|
"@harness/core": "*",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"name": "@harness/system-fs",
|
|
20
20
|
"private": true,
|
|
21
|
-
"version": "0.
|
|
21
|
+
"version": "0.4.1",
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"type": "module",
|
|
24
24
|
"description": "The fs system: files and a shell over chosen folders, served as resources. Can restart itself.",
|
|
@@ -591,17 +591,17 @@ export class Hosting {
|
|
|
591
591
|
await Promise.all([dirs.state, dirs.data, dirs.cache].map((dir) => mkdir(dir, { recursive: true })));
|
|
592
592
|
// it runs in its bundle folder (where serve() reads its version); it writes only to its own folders
|
|
593
593
|
const env: Record<string, string> = {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
594
|
+
FNLOOM_HUB: this.#deps.hubUrl,
|
|
595
|
+
FNLOOM_INSTANCE: record.instance,
|
|
596
|
+
FNLOOM_SYSTEM_NAME: record.system,
|
|
597
|
+
FNLOOM_SYSTEM_STATE: dirs.state,
|
|
598
|
+
FNLOOM_SYSTEM_DATA: dirs.data,
|
|
599
|
+
FNLOOM_SYSTEM_CACHE: dirs.cache,
|
|
600
|
+
FNLOOM_SUPERVISED: '1',
|
|
601
601
|
// the runner reads the SDK's status lines (JSON, at info) to know it connected
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
...(token === undefined ? {} : {
|
|
602
|
+
FNLOOM_LOG_JSON: 'true',
|
|
603
|
+
FNLOOM_LOG_LEVEL: 'info',
|
|
604
|
+
...(token === undefined ? {} : { FNLOOM_PAIRING_TOKEN: token }),
|
|
605
605
|
};
|
|
606
606
|
// its declared paths, relative to its data folder or absolute
|
|
607
607
|
const files = grantedPaths(record.grants?.files, dirs.data);
|
|
@@ -37,7 +37,7 @@ import { CommentStore, commentMigrations } from './files-page/comments.ts';
|
|
|
37
37
|
import { GitView } from './files-page/git-view.ts';
|
|
38
38
|
|
|
39
39
|
const settings = fsEnv.parse();
|
|
40
|
-
const { dataDir, cacheDir } = placeFolders(settings.
|
|
40
|
+
const { dataDir, cacheDir } = placeFolders(settings.FNLOOM_SYSTEM_STATE, settings);
|
|
41
41
|
const { host, log } = loggedHost(fs.name);
|
|
42
42
|
const processLimits = { outputMax: settings.FS_OUTPUT_MAX, progressEvery: settings.FS_PROGRESS_EVERY };
|
|
43
43
|
const exec = new NodeExec(processLimits);
|
|
@@ -74,15 +74,15 @@ const hosting = new Hosting({
|
|
|
74
74
|
log: (key, fields) => { log.info(key, fields); },
|
|
75
75
|
gate: (allow, refused) => new AllowlistProxy({ allow, onRefused: refused }),
|
|
76
76
|
// the hub link goes direct, never through a hosted system's proxy
|
|
77
|
-
direct: [endpointOf(settings.
|
|
77
|
+
direct: [endpointOf(settings.FNLOOM_HUB)],
|
|
78
78
|
refused: (refusal) => {
|
|
79
79
|
running.reportRefusal(refusal).catch((error: unknown) => { log.warn('fs.hosted.refusal-unsent', { system: refusal.instance.system, rule: refusal.rule, error: error instanceof Error ? error.message : String(error) }); });
|
|
80
80
|
},
|
|
81
81
|
}),
|
|
82
82
|
// a folder's own tests run in a sandboxed child before its install card is shown
|
|
83
83
|
tests: new ProcessSystemTests({ nodeArgs: loader.nodeArgs, baseEnv: process.env, timeout: settings.FS_TESTS_TIMEOUT }),
|
|
84
|
-
hubUrl: settings.
|
|
85
|
-
host: { system: SystemName.parse(fs.name), instance: settings.
|
|
84
|
+
hubUrl: settings.FNLOOM_HUB,
|
|
85
|
+
host: { system: SystemName.parse(fs.name), instance: settings.FNLOOM_INSTANCE },
|
|
86
86
|
dataDir,
|
|
87
87
|
probe: platformProbe(exec, process.platform, settings.FS_HOSTED_STALE_TIMEOUT),
|
|
88
88
|
onStale: (key, outcome) => { if ('failed' in outcome) { log.warn('fs.hosted.stale-failed', { key, error: outcome.failed }); } else if (outcome.killed) { log.info('fs.hosted.stale-killed', { key, pid: outcome.pid }); } },
|
|
@@ -139,16 +139,16 @@ const started = performance.now();
|
|
|
139
139
|
const clientFolder = await rendererFolder({ main: import.meta.url, outDir: join(cacheDir, 'client') });
|
|
140
140
|
log.info('fs.client.ready', { folder: clientFolder, took: Math.round(performance.now() - started) });
|
|
141
141
|
|
|
142
|
-
log.info('fs.serving', { hub: settings.
|
|
142
|
+
log.info('fs.serving', { hub: settings.FNLOOM_HUB, shell: shell.type === 'posix' ? shell.path : 'system' });
|
|
143
143
|
// its own folder (the one with system.json and context/: systems/fs from source, dist/ when packed), wherever it was
|
|
144
144
|
// started from, so every instance sends the same context folder
|
|
145
145
|
const running: RunningSystem<'fs'> = await serve(fs, server.impl, {
|
|
146
146
|
package: dirname(dirname(fileURLToPath(import.meta.url))),
|
|
147
|
-
hub: settings.
|
|
148
|
-
state: settings.
|
|
147
|
+
hub: settings.FNLOOM_HUB,
|
|
148
|
+
state: settings.FNLOOM_SYSTEM_STATE,
|
|
149
149
|
client: clientFolder,
|
|
150
150
|
store: { migrations: [...fsMigrations, ...commentMigrations] },
|
|
151
|
-
...(settings.
|
|
151
|
+
...(settings.FNLOOM_PAIRING_TOKEN === undefined ? {} : { pairingToken: settings.FNLOOM_PAIRING_TOKEN }),
|
|
152
152
|
}, host);
|
|
153
153
|
running.onStatus((status) => { log.info('fs.status', { status }); });
|
|
154
154
|
|