fnloom 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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/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/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 +4 -4
- 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-CDszUbHz.js} +2 -2
- package/packages/web/dist/assets/AdminLayout-CFIz4GsQ.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-BvoVTk6h.js} +2 -2
- package/packages/web/dist/assets/{AutoPairPicker-C61gihmh.js → AutoPairPicker-CLjD-muP.js} +2 -2
- package/packages/web/dist/assets/{BrowserFrame-Sq9EmQRT.js → BrowserFrame-BcN-A76X.js} +2 -2
- package/packages/web/dist/assets/ChatPage-DhTpAyM2.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-K9jrTmFO.js} +2 -2
- package/packages/web/dist/assets/ConfigWithCustom-BvrvSVIp.js +3 -0
- package/packages/web/dist/assets/{ConfirmDialog-Dd3E4sJt.js → ConfirmDialog-BDvLleYf.js} +2 -2
- package/packages/web/dist/assets/{ConnectPage-CX9acyQH.js → ConnectPage-Dg6IPNNh.js} +2 -2
- package/packages/web/dist/assets/ContextItemPage-qisBQetR.js +2 -0
- package/packages/web/dist/assets/ContextPage-DXa6Yqk-.js +3 -0
- package/packages/web/dist/assets/{ContextRow-DrtPumZ5.js → ContextRow-DDYnYRaL.js} +2 -2
- package/packages/web/dist/assets/{DataPage-DDSsxHro.js → DataPage-DOE_pKAY.js} +2 -2
- package/packages/web/dist/assets/DataTypePage-BnP_JELT.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-B9MJbF10.js} +3 -3
- package/packages/web/dist/assets/{ExplorePage-B7ND0W0l.js → ExplorePage-cRDQZRea.js} +2 -2
- package/packages/web/dist/assets/{FnPill-Cp3KuLmP.js → FnPill-CbLZCXYM.js} +2 -2
- package/packages/web/dist/assets/{FnView-C0XZdnsS.js → FnView-CG_wBKTP.js} +2 -2
- package/packages/web/dist/assets/{FnsView-GTH3p7a0.js → FnsView-BybyK12w.js} +2 -2
- package/packages/web/dist/assets/{GinExprView-DGxns6lH.js → GinExprView-BYCKSD_n.js} +2 -2
- package/packages/web/dist/assets/{GinForm-BDBUzuDP.js → GinForm-CXjYVf2_.js} +2 -2
- package/packages/web/dist/assets/{GinTypeView-CUsymbVf.js → GinTypeView-Bmbmx9e_.js} +2 -2
- package/packages/web/dist/assets/{GinValueView-jsKIfiEA.js → GinValueView-CWUzS7ti.js} +2 -2
- package/packages/web/dist/assets/{GraphPage-BCcPPsHu.js → GraphPage-D6OhckfJ.js} +2 -2
- package/packages/web/dist/assets/GraphPanel-BTitgA-K.js +2 -0
- package/packages/web/dist/assets/{HubPicker-EoOErgmk.js → HubPicker-DVly8dLD.js} +2 -2
- package/packages/web/dist/assets/{InboxApprovals-Dkq7DFp_.js → InboxApprovals-BF84edZU.js} +2 -2
- package/packages/web/dist/assets/{InboxPage-CHhslePq.js → InboxPage-DohZ9EDP.js} +2 -2
- package/packages/web/dist/assets/InjectedList-e6qr1kdU.js +2 -0
- package/packages/web/dist/assets/{InstallDialog-D-VwfZYF.js → InstallDialog-JJCKYs2s.js} +2 -2
- package/packages/web/dist/assets/InstanceTypes-BqUzx87o.js +2 -0
- package/packages/web/dist/assets/InstanceView-C73pev7A.js +2 -0
- package/packages/web/dist/assets/{ItemHistory-NQAP69ma.js → ItemHistory-dbGgOZsw.js} +2 -2
- package/packages/web/dist/assets/LimitsView-Ddp5WakY.js +2 -0
- package/packages/web/dist/assets/{ListSearch-BunVrDO0.js → ListSearch-CYNNAuMB.js} +2 -2
- package/packages/web/dist/assets/{LlmCallDetails-BoVNDTVs.js → LlmCallDetails-C9H5Hc2J.js} +2 -2
- package/packages/web/dist/assets/{LlmCallsView-BGpV92RC.js → LlmCallsView-CBqyZ8Cj.js} +2 -2
- package/packages/web/dist/assets/{LoadState-h-K9bTYc.js → LoadState-B2YhZlyC.js} +2 -2
- package/packages/web/dist/assets/McpDialog-DhlLklIq.js +2 -0
- package/packages/web/dist/assets/{McpView-GPXdCMne.js → McpView-D_ZmNO56.js} +2 -2
- package/packages/web/dist/assets/{McpsView-DJIR2JX5.js → McpsView-9_gwBuzw.js} +2 -2
- package/packages/web/dist/assets/{MemoryDialog-BTeIHQyA.js → MemoryDialog-pTHIxKEX.js} +2 -2
- package/packages/web/dist/assets/{ModelCallsView-DMcnwF2S.js → ModelCallsView-FHv2XWRX.js} +2 -2
- package/packages/web/dist/assets/{ModelPicker-CgkMFxSO.js → ModelPicker-EqOuvVnE.js} +2 -2
- package/packages/web/dist/assets/ModelsView-D9UaL4PX.js +2 -0
- package/packages/web/dist/assets/{NotFoundPage-Tk92K7HN.js → NotFoundPage-BsuJysan.js} +2 -2
- package/packages/web/dist/assets/{PairPage-D0BK8CCw.js → PairPage-B_ZXsbL4.js} +2 -2
- package/packages/web/dist/assets/{PanelHost-C-gKrxAk.js → PanelHost-Dx-vNNl5.js} +2 -2
- package/packages/web/dist/assets/PeopleView-D6dmEgMs.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-Bn4rm-ao.js} +2 -2
- package/packages/web/dist/assets/{RefusalList-DVO0bmeB.js → RefusalList-aosRD1ie.js} +2 -2
- package/packages/web/dist/assets/RendererHost-Ym_SMkhp.css +1 -0
- package/packages/web/dist/assets/RendererHost-rjnpSgyQ.js +2 -0
- package/packages/web/dist/assets/{ResourceViewer-Do0chYxU.js → ResourceViewer-C4tRColf.js} +2 -2
- package/packages/web/dist/assets/ResourcesPage-7mCLBORZ.js +2 -0
- package/packages/web/dist/assets/ResultGrid-CL2WSYQH.css +1 -0
- package/packages/web/dist/assets/ResultGrid-GIMoQUAr.js +2 -0
- package/packages/web/dist/assets/{ReviewSummaryStrip-DO3p64Qj.js → ReviewSummaryStrip-Bvjn3Iq8.js} +2 -2
- package/packages/web/dist/assets/ReviewView-DIqsUedT.js +3 -0
- package/packages/web/dist/assets/{RuleRow-DX9v4iGP.js → RuleRow-zRg-e8Vj.js} +2 -2
- package/packages/web/dist/assets/RunCard-C7wOGaw8.js +2 -0
- package/packages/web/dist/assets/RunCard-CSDiz-Nt.css +1 -0
- package/packages/web/dist/assets/{RunDetails-DjR206q6.js → RunDetails-W4GbE6AE.js} +2 -2
- package/packages/web/dist/assets/{RunDot-lHRICdM5.js → RunDot-C46uzzNM.js} +2 -2
- package/packages/web/dist/assets/{RunPage-CbAQ_WPR.js → RunPage-DPLtZpeB.js} +2 -2
- package/packages/web/dist/assets/{RunProgress-C3-B4tQf.js → RunProgress-Cr_6TBaF.js} +2 -2
- package/packages/web/dist/assets/{RunsView-DMkPmkqX.js → RunsView-tU350TPK.js} +2 -2
- package/packages/web/dist/assets/SettingsPage-B8QmmMN3.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-DTwdqlnB.js} +2 -2
- package/packages/web/dist/assets/{StatusBadge-CXne0sRZ.js → StatusBadge-D7wKMAcD.js} +2 -2
- package/packages/web/dist/assets/{StorePlacementStep-B6SwTmdM.js → StorePlacementStep-C04nRU-u.js} +2 -2
- package/packages/web/dist/assets/{SystemConfig-vQDL_eUl.js → SystemConfig-CE3keXWq.js} +2 -2
- package/packages/web/dist/assets/SystemPageHost-CEhz4li8.js +2 -0
- package/packages/web/dist/assets/SystemPageHost-DX7LrFoN.css +1 -0
- package/packages/web/dist/assets/SystemView-CBFzEGfm.js +2 -0
- package/packages/web/dist/assets/SystemsView-0G8JntMV.js +2 -0
- package/packages/web/dist/assets/TableView-BK0uwLHl.js +3 -0
- package/packages/web/dist/assets/TableView-B_4MViVb.css +1 -0
- package/packages/web/dist/assets/{TableViewer-Boxx86f5.js → TableViewer-nbMInGJJ.js} +3 -3
- package/packages/web/dist/assets/{ThemePicker-CIg_oRQX.js → ThemePicker-fZpVSYqG.js} +2 -2
- package/packages/web/dist/assets/{TurnTree-Ecm0yA5g.js → TurnTree-Co-iBqhT.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-CDjUxKY0.js} +6 -6
- package/packages/web/dist/assets/{ValueVisual-C-MWpp7c.js → ValueVisual-EJnCKgSy.js} +2 -2
- package/packages/web/dist/assets/{fn-modal-B98MR7JN.js → fn-modal-DtE65mFt.js} +2 -2
- package/packages/web/dist/assets/{fn-notices-CfTa1E8y.js → fn-notices-CCZ-DFbi.js} +2 -2
- package/packages/web/dist/assets/{formats-JwoKfXIq.js → formats-CyHV2siv.js} +2 -2
- package/packages/web/dist/assets/index-BY7M8QUk.css +1 -0
- package/packages/web/dist/assets/index-OZS2EluT.js +4 -0
- package/packages/web/dist/assets/{labels-BFbk11BE.js → labels-CT7_K0Pt.js} +2 -2
- package/packages/web/dist/assets/{layout-D1gf481r.js → layout-B6fBDg80.js} +2 -2
- package/packages/web/dist/assets/loaded-LaPjk6mK.js +2 -0
- package/packages/web/dist/assets/{metrics-CBPX3W5Y.js → metrics-9n8bKI7u.js} +2 -2
- package/packages/web/dist/assets/problems--AW4igVY.js +2 -0
- package/packages/web/dist/assets/{push-payload-BeU1ADYt.js → push-payload-B3EcrsVz.js} +64 -64
- package/packages/web/dist/assets/record-edits-B-FWAbxR.js +2 -0
- package/packages/web/dist/assets/{review-fP-l9D6H.js → review-uLESCEz1.js} +3 -3
- package/packages/web/dist/assets/routes-B7Zmt8wh.js +4 -0
- package/packages/web/dist/assets/{runs-CveC2kKo.js → runs-CUb2PTFg.js} +2 -2
- package/packages/web/dist/assets/{shared-LbaIHjbV.js → shared-Bxhw_9et.js} +2 -2
- package/packages/web/dist/assets/{sources-VPrtgLIi.js → sources-YgkjgFLe.js} +2 -2
- package/packages/web/dist/assets/src-DY1fSFJS.js +43 -0
- package/packages/web/dist/assets/state-ChQDWWj-.js +2 -0
- package/packages/web/dist/assets/{systems-BqE3WTSF.js → systems-CjwjRySu.js} +2 -2
- package/packages/web/dist/assets/table-host-B_D9dmCz.js +2 -0
- package/packages/web/dist/assets/tables-CaxIuHdw.js +2 -0
- package/packages/web/dist/assets/{ui-BzgWquIU.js → ui-DWjytmDS.js} +5 -5
- package/packages/web/dist/assets/{url-DKGcECT1.js → url-DbGOI14W.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/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/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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The api system's contract (`shared/`), after product's api kind (build 9 design §5). Like `code`, it is one instance
|
|
3
3
|
* that authors fns: an api fn is code that calls an external service. The services are its records (`api/Service`,
|
|
4
|
-
*
|
|
5
|
-
* and admins edit on the API services page
|
|
4
|
+
* `ApiService` in `services.ts`: the base URL, how it signs in, its OpenAPI document), which the authoring agent picks or
|
|
5
|
+
* adds and admins edit on the API services page (this system's own admin page, `/admin/s/api/services`, drawn by its
|
|
6
|
+
* client). An api fn is a gin program whose result is an `api/HttpRequest`, plus an
|
|
6
7
|
* optional program that maps the response to the fn's result; it is kept in the hub as an `api/request` fn named for
|
|
7
8
|
* its service (`<service>.<name>`) and runs on the one instance.
|
|
8
9
|
*
|
|
@@ -17,13 +18,17 @@
|
|
|
17
18
|
* fn. **services** lists the services; **operations** pages a service's OpenAPI document; **test_request** sends a GET
|
|
18
19
|
* (or HEAD) to try one.
|
|
19
20
|
*/
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { authoredFn } from '@harness/sdk
|
|
21
|
+
import { ConnectDecl } from '@harness/core';
|
|
22
|
+
import { API_KIND, API_SERVICE_RECORDS, API_SERVICE_TYPE, API_SYSTEM, ApiFnSpec, ApiService, HttpExchange } from './services.ts';
|
|
23
|
+
import { agents, authoredFn, context, fn, g, ginAs, hub, kind, system, type, wireType } from '@harness/sdk';
|
|
23
24
|
import { z } from 'zod';
|
|
24
25
|
import { HttpBody, HttpHeader, HttpParam, HttpPart, HttpRequest, HttpResponse } from './http.ts';
|
|
25
26
|
|
|
26
27
|
export * from './http.ts';
|
|
28
|
+
export * from './services.ts';
|
|
29
|
+
|
|
30
|
+
/** The admin page's segment: the services at its root, one service under it (`services/<service>/<tab>`). */
|
|
31
|
+
export const API_SERVICES_PAGE = 'services';
|
|
27
32
|
|
|
28
33
|
/** An api fn's payload, as gin (`ApiFnSpec`'s type). */
|
|
29
34
|
export const ApiPayload = ginAs(ApiFnSpec);
|
|
@@ -80,6 +85,11 @@ const declared = system(API_SYSTEM, {
|
|
|
80
85
|
// the authoring agent is a model; api fns are hub fns it searches, reads and saves; services are records it reads and
|
|
81
86
|
// adds; requests go to each service's base URL, known only from its record
|
|
82
87
|
grants: { hub: ['ai', 'fns', 'search', 'connections', 'data'], calls: [hub.fns.fns_get.name, hub.fns.fns_save.name], network: ['*'] },
|
|
88
|
+
// the services' admin page (client/ draws it): in the admin area, for admins, in its nav while the system is live
|
|
89
|
+
pages: [{
|
|
90
|
+
segment: API_SERVICES_PAGE, title: 'API services', description: 'The web APIs api fns call: each a base URL and how it signs in, and the fns sent to it.',
|
|
91
|
+
icon: 'globe', nav: 'main', access: 'admin', area: 'admin', component: 'ServicesPage',
|
|
92
|
+
}],
|
|
83
93
|
})
|
|
84
94
|
.with({
|
|
85
95
|
types: {
|
|
@@ -1,43 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* The api system's shapes, moved here from core (only this system and its pages read them), after product's api kind
|
|
3
|
+
* (`design/api-kind.md`). An api fn is a gin program whose result is an `api/HttpRequest`, which the api system
|
|
4
|
+
* performs against its service, plus an optional second program that maps the response to the fn's result. It is
|
|
5
|
+
* authored by an authoring agent (`api/make_api`) with the SDK's staged helper and the gin program runtime
|
|
6
|
+
* (`@harness/sdk/program`), and tested with the SDK test kit.
|
|
7
7
|
*
|
|
8
8
|
* The `api` system runs one instance, which authors api fns the way `code` authors code fns. Each api fn is sent to one
|
|
9
9
|
* service: an `ApiService` record of that instance (the base URL, how it signs in, its OpenAPI document), which the
|
|
10
10
|
* authoring agent picks or creates. People connect per service (`ConnectDecl.scope: 'key'`); the instance signs every
|
|
11
11
|
* request with the run's connection. A program never sees a credential.
|
|
12
12
|
*/
|
|
13
|
+
import { ActorId, ConnectKey, GinExprDef, GinTypeDef, Json, type RecordStorage } from '@harness/core';
|
|
14
|
+
import { HeaderValues, RecordAuth } from '@harness/sdk';
|
|
13
15
|
import { z } from 'zod';
|
|
14
|
-
import { GinExprDef, GinTypeDef } from './gin.ts';
|
|
15
|
-
import { ConnectKey } from './connections.ts';
|
|
16
|
-
import type { RecordStorage } from './data.ts';
|
|
17
|
-
import { ActorId, Json } from './primitives.ts';
|
|
18
|
-
import { HeaderValues, RecordAuth, TypedAuth, TYPED_AUTH_SECRETS } from './remote-auth.ts';
|
|
19
|
-
import type { ConfigPath } from './config-secrets.ts';
|
|
20
16
|
|
|
21
|
-
/** The bundled system of code fns. */
|
|
22
|
-
export const CODE_SYSTEM = 'code';
|
|
23
|
-
/** The kind of a code fn. */
|
|
24
|
-
export const CODE_KIND = 'code/program';
|
|
25
17
|
/** The bundled system of api fns: one instance, whose services are its records (`ApiService`). */
|
|
26
18
|
export const API_SYSTEM = 'api';
|
|
27
19
|
/** The kind of an api fn. */
|
|
28
20
|
export const API_KIND = 'api/request';
|
|
29
21
|
|
|
30
|
-
/** The payload of a code fn: its signature and its program. The kind describes the fn's args and result from these. */
|
|
31
|
-
export const CodeFnSpec = z.object({
|
|
32
|
-
/** The fn's args, an `obj` type: the program reads them as `args.<name>`. */
|
|
33
|
-
args: GinTypeDef,
|
|
34
|
-
/** What the program gives. */
|
|
35
|
-
returns: GinTypeDef,
|
|
36
|
-
/** The program; `args` and `fns` are in its scope. */
|
|
37
|
-
program: GinExprDef,
|
|
38
|
-
});
|
|
39
|
-
export type CodeFnSpec = z.infer<typeof CodeFnSpec>;
|
|
40
|
-
|
|
41
22
|
/** The payload of an api fn. */
|
|
42
23
|
export const ApiFnSpec = z.object({
|
|
43
24
|
/** The service (an `ApiService` by name) it is sent to; people connect per service. */
|
|
@@ -109,31 +90,6 @@ export const ApiService = z.object({
|
|
|
109
90
|
});
|
|
110
91
|
export type ApiService = z.infer<typeof ApiService>;
|
|
111
92
|
|
|
112
|
-
/**
|
|
113
|
-
* Before the one-instance api: one service as its own `api` instance's config, a shared token sealed in it. Read once,
|
|
114
|
-
* by the hub's migration that turns each such instance into an `ApiService` record of the one instance.
|
|
115
|
-
*/
|
|
116
|
-
export const ApiServiceConfig = z.object({
|
|
117
|
-
label: z.string().min(1),
|
|
118
|
-
description: z.string().optional(),
|
|
119
|
-
/** Every request's URL is relative to this; a program can't leave it. */
|
|
120
|
-
baseUrl: z.url(),
|
|
121
|
-
/** How it signs in: no OAuth, since an API service names no endpoints to sign in through. */
|
|
122
|
-
auth: TypedAuth.default({ kind: 'none' }),
|
|
123
|
-
/** Headers sent on every request (not secrets; `auth` carries those). */
|
|
124
|
-
headers: HeaderValues.optional(),
|
|
125
|
-
/** An OpenAPI document's URL; the authoring agent reads its operations through `api/operations`. */
|
|
126
|
-
openapi: z.url().optional(),
|
|
127
|
-
/** How long one request may take, in milliseconds. */
|
|
128
|
-
timeout: z.number().int().min(1000).default(60_000),
|
|
129
|
-
/** The largest response body kept, in bytes; a larger one becomes a resource. */
|
|
130
|
-
maxBody: z.number().int().min(1024).default(2 * 1024 * 1024),
|
|
131
|
-
});
|
|
132
|
-
export type ApiServiceConfig = z.infer<typeof ApiServiceConfig>;
|
|
133
|
-
|
|
134
|
-
/** The secret config paths of a pre-migration api service instance (`ApiServiceConfig`). */
|
|
135
|
-
export const API_CONFIG_SECRETS = [...TYPED_AUTH_SECRETS] as const satisfies readonly ConfigPath[];
|
|
136
|
-
|
|
137
93
|
/**
|
|
138
94
|
* What `api_test` (the authoring agent's check) and a run's trace show of one request: the materialized request with
|
|
139
95
|
* credentials masked, and the response when it was sent (only GETs are sent while authoring).
|
package/systems/api/system.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": 1,
|
|
3
3
|
"name": "api",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "Web API requests kept as fns, like code: one instance authors api fns that call external services, each service a record with its base URL and sign-in; people connect per service.",
|
|
6
6
|
"protocol": 1,
|
|
7
7
|
"server": { "entry": "server/main.ts", "external": {} },
|
|
8
|
+
"client": { "entry": "client/index.ts" },
|
|
8
9
|
"instances": "one"
|
|
9
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": { "rootDir": ".", "outDir": "../../.types/system-api", "tsBuildInfoFile": "../../.types/system-api.tsbuildinfo", "types": ["node"] },
|
|
4
|
-
"include": ["shared", "server"],
|
|
3
|
+
"compilerOptions": { "rootDir": ".", "outDir": "../../.types/system-api", "tsBuildInfoFile": "../../.types/system-api.tsbuildinfo", "jsx": "preserve", "types": ["vite/client", "node"] },
|
|
4
|
+
"include": ["shared", "server", "client/**/*.ts", "client/**/*.vue"],
|
|
5
5
|
"references": [{ "path": "../../packages/core" }, { "path": "../../packages/sdk" }]
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@aeye/gin": "^0.
|
|
4
|
-
"@aeye/schema": "^0.
|
|
3
|
+
"@aeye/gin": "^0.11.1",
|
|
4
|
+
"@aeye/schema": "^0.11.1",
|
|
5
5
|
"@ayepi/env": "^0.6.0",
|
|
6
6
|
"@harness/core": "*",
|
|
7
7
|
"@harness/sdk": "*",
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
},
|
|
10
10
|
"name": "@harness/system-code",
|
|
11
11
|
"private": true,
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.4.0",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"description": "Development only: system.json holds this system's name, version and entries. Build 9 skeleton (codeapi lane).",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./shared/index.ts",
|
|
18
|
+
"./program": "./shared/program.ts",
|
|
18
19
|
"./server": "./server/index.ts"
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { ExprDef } from '@aeye/gin';
|
|
14
14
|
import { a, type Bound } from '@aeye/schema';
|
|
15
|
-
import {
|
|
15
|
+
import { HarnessGrammar, type Json, QualifiedName, splitName } from '@harness/core';
|
|
16
|
+
import { CODE_KIND, CodeFnSpec } from '../shared/program.ts';
|
|
16
17
|
import { encodeValue, type Infer, type StoredFn } from '@harness/sdk';
|
|
17
18
|
import { checkProgram, previewText, ProgramAuthoring, ProgramError, programTools, runProgram, testTool, type ProgramCheck, type ProgramHost, type ProgramSession } from '@harness/sdk/program';
|
|
18
19
|
import { authoringAgent, type AuthoredFn, type ShowArgs } from '@harness/sdk/server';
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* and `make_code` (the authoring agent in `authoring.ts`). Nothing is stored here: code fns, who may use them and their
|
|
4
4
|
* versions are the hub's.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { fnOfModelNameByRule, KindDescription, QualifiedName, splitName, type Json } from '@harness/core';
|
|
7
|
+
import { CODE_KIND, CodeFnSpec } from '../shared/program.ts';
|
|
7
8
|
import { CallFailed, hub, sampleArgs, type FnCtx, type KindCheckCtx, type SystemImpl, type TypesOf } from '@harness/sdk';
|
|
8
9
|
import {
|
|
9
10
|
ProgramError, calleesMode, checkProgram, hubProgramHost, kindCheckLookups, kindRunLookups, runProgram, storedProgramScope, type ProgramCheck, type ProgramLookups,
|
|
@@ -8,14 +8,14 @@ import { codeEnv } from './env.ts';
|
|
|
8
8
|
import { createCodeImpl } from './impl.ts';
|
|
9
9
|
|
|
10
10
|
const settings = codeEnv.parse();
|
|
11
|
-
placeFolders(settings.
|
|
11
|
+
placeFolders(settings.FNLOOM_SYSTEM_STATE, settings);
|
|
12
12
|
const { host, log } = loggedHost(code.name);
|
|
13
13
|
|
|
14
|
-
log.info('code.serving', { hub: settings.
|
|
14
|
+
log.info('code.serving', { hub: settings.FNLOOM_HUB });
|
|
15
15
|
const running = await serve(code, createCodeImpl({ settings }), {
|
|
16
|
-
hub: settings.
|
|
17
|
-
state: settings.
|
|
18
|
-
...(settings.
|
|
16
|
+
hub: settings.FNLOOM_HUB,
|
|
17
|
+
state: settings.FNLOOM_SYSTEM_STATE,
|
|
18
|
+
...(settings.FNLOOM_PAIRING_TOKEN === undefined ? {} : { pairingToken: settings.FNLOOM_PAIRING_TOKEN }),
|
|
19
19
|
}, host);
|
|
20
20
|
running.onStatus((status) => { log.info('code.status', { status }); });
|
|
21
21
|
await running.ready();
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
* the signature, writes the program against gin's typed schema, has it checked (and run with sample args when it
|
|
10
10
|
* calls no fn), and saves it with `hub/fns_save`. The chat gets the saved fn, never the working context.
|
|
11
11
|
*/
|
|
12
|
-
import { CODE_KIND, CODE_SYSTEM, CodeFnSpec } from '
|
|
13
|
-
import { agents, context, fn, g, ginAs, hub, kind, system } from '@harness/sdk';
|
|
14
|
-
import { authoredFn } from '@harness/sdk/server';
|
|
12
|
+
import { CODE_KIND, CODE_SYSTEM, CodeFnSpec } from './program.ts';
|
|
13
|
+
import { agents, authoredFn, context, fn, g, ginAs, hub, kind, system } from '@harness/sdk';
|
|
15
14
|
|
|
16
15
|
/** A code fn's payload, as gin (`CodeFnSpec`'s type). */
|
|
17
16
|
export const CodePayload = ginAs(CodeFnSpec);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The code system's shapes, moved here from core (only this system reads them): a code fn is one gin program over its
|
|
3
|
+
* args that may call other fns (`fns.<system>.<name>(…)`), authored by `code/make_code` with the SDK's staged helper
|
|
4
|
+
* and the gin program runtime (`@harness/sdk/program`), and tested with the SDK test kit.
|
|
5
|
+
*/
|
|
6
|
+
import { GinExprDef, GinTypeDef } from '@harness/core';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
|
|
9
|
+
/** The bundled system of code fns. */
|
|
10
|
+
export const CODE_SYSTEM = 'code';
|
|
11
|
+
/** The kind of a code fn. */
|
|
12
|
+
export const CODE_KIND = 'code/program';
|
|
13
|
+
|
|
14
|
+
/** The payload of a code fn: its signature and its program. The kind describes the fn's args and result from these. */
|
|
15
|
+
export const CodeFnSpec = z.object({
|
|
16
|
+
/** The fn's args, an `obj` type: the program reads them as `args.<name>`. */
|
|
17
|
+
args: GinTypeDef,
|
|
18
|
+
/** What the program gives. */
|
|
19
|
+
returns: GinTypeDef,
|
|
20
|
+
/** The program; `args` and `fns` are in its scope. */
|
|
21
|
+
program: GinExprDef,
|
|
22
|
+
});
|
|
23
|
+
export type CodeFnSpec = z.infer<typeof CodeFnSpec>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"name": "@harness/system-embedder",
|
|
10
10
|
"private": true,
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.4.0",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"description": "The embedder system: product's EmbeddingGemma service (768 dimensions) as a harness embedder.",
|
|
@@ -6,7 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
export const embedderEnv = env({
|
|
7
7
|
...systemFields(),
|
|
8
8
|
/** The EmbeddingGemma service, used when the system's config names none. */
|
|
9
|
-
|
|
9
|
+
FNLOOM_EMBEDDER_URL: z.string().default('http://127.0.0.1:8760'),
|
|
10
10
|
/** Most texts per request (the service's own `max_batch` also caps it). */
|
|
11
11
|
EMBEDDER_BATCH: z.number().int().min(1).default(64),
|
|
12
12
|
/** Tries after a busy (429) or loading (503) answer before giving up. */
|
|
@@ -18,15 +18,15 @@ const server = createEmbedderImpl({
|
|
|
18
18
|
limits: limitsFrom(settings),
|
|
19
19
|
log,
|
|
20
20
|
}),
|
|
21
|
-
defaultUrl: settings.
|
|
21
|
+
defaultUrl: settings.FNLOOM_EMBEDDER_URL,
|
|
22
22
|
queryCache: settings.EMBEDDER_QUERY_CACHE,
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
log.info('embedder.serving', { hub: settings.
|
|
25
|
+
log.info('embedder.serving', { hub: settings.FNLOOM_HUB, url: settings.FNLOOM_EMBEDDER_URL });
|
|
26
26
|
const running = await serve(embedderSystem, server.impl, {
|
|
27
|
-
hub: settings.
|
|
28
|
-
state: settings.
|
|
29
|
-
...(settings.
|
|
27
|
+
hub: settings.FNLOOM_HUB,
|
|
28
|
+
state: settings.FNLOOM_SYSTEM_STATE,
|
|
29
|
+
...(settings.FNLOOM_PAIRING_TOKEN === undefined ? {} : { pairingToken: settings.FNLOOM_PAIRING_TOKEN }),
|
|
30
30
|
}, host);
|
|
31
31
|
running.onStatus((status) => { log.info('embedder.status', { status }); });
|
|
32
32
|
|
|
@@ -35,7 +35,7 @@ export const embedderSystem = system('embedder', {
|
|
|
35
35
|
grants: { hub: [] },
|
|
36
36
|
}).with({
|
|
37
37
|
config: g.obj({
|
|
38
|
-
// the service's base URL; when absent, the system's
|
|
38
|
+
// the service's base URL; when absent, the system's FNLOOM_EMBEDDER_URL (default http://127.0.0.1:8760)
|
|
39
39
|
url: g.field(g.optional(g.text({ pattern: '^https?://' })), { docs: 'The EmbeddingGemma service, `http://127.0.0.1:8760`. Leave empty for the system\'s default.' }),
|
|
40
40
|
}),
|
|
41
41
|
providers: {
|
|
@@ -57,7 +57,7 @@ export function fakeComponents(): SharedComponents {
|
|
|
57
57
|
return {
|
|
58
58
|
Frame: standIn('Frame'), Input: standIn('Input'), Markdown: standIn('Markdown'), Icon: standIn('Icon'), Empty: standIn('Empty'), LoadState,
|
|
59
59
|
Reasoning: standIn('Reasoning'), Typing: standIn('Typing'), ResourceViewer: standIn('ResourceViewer'), ValueEditor: standIn('ValueEditor'),
|
|
60
|
-
Button: standIn('Button'), Select: standIn('Select'), Textarea: standIn('Textarea'), Dialog: standIn('Dialog'), Banner: standIn('Banner'), Badge: standIn('Badge'),
|
|
60
|
+
Button: standIn('Button'), Select: standIn('Select'), Textarea: standIn('Textarea'), Dialog: standIn('Dialog'), Popover: standIn('Popover'), Form: standIn('Form'), Banner: standIn('Banner'), Badge: standIn('Badge'),
|
|
61
61
|
Skeleton: standIn('Skeleton'), FnPill: standIn('FnPill'), Approval: standIn('Approval'), Conversation: standIn('Conversation'), Composer: standIn('Composer'),
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -253,7 +253,7 @@ const LoadState: FunctionalComponent<LoadStateProps> = (props, { slots }) =>
|
|
|
253
253
|
export const STAND_INS: SharedComponents = {
|
|
254
254
|
Frame: standIn('Frame'), Input: standIn('Input', 'input'), Markdown: standIn('Markdown'), Icon: standIn('Icon', 'span'), Empty: standIn('Empty'), LoadState,
|
|
255
255
|
Reasoning: standIn('Reasoning'), Typing: standIn('Typing'), ResourceViewer: standIn('ResourceViewer'), ValueEditor: standIn('ValueEditor'),
|
|
256
|
-
Button, Select: standIn('Select'), Textarea, Dialog: standIn('Dialog'), Banner: standIn('Banner'), Badge: standIn('Badge', 'span'), Skeleton: standIn('Skeleton'),
|
|
256
|
+
Button, Select: standIn('Select'), Textarea, Dialog: standIn('Dialog'), Popover: standIn('Popover'), Form: standIn('Form'), Banner: standIn('Banner'), Badge: standIn('Badge', 'span'), Skeleton: standIn('Skeleton'),
|
|
257
257
|
FnPill: standIn('FnPill'), Approval: standIn('Approval'), Conversation: standIn('Conversation'), Composer: standIn('Composer'),
|
|
258
258
|
};
|
|
259
259
|
|
|
@@ -11,7 +11,7 @@ import { onBeforeUnmount, onMounted, shallowRef, type Ref } from 'vue';
|
|
|
11
11
|
/** The light theme's colours, for a page with no tokens (a test). */
|
|
12
12
|
export const LIGHT_PALETTE: VisualPalette = {
|
|
13
13
|
series: ['#4b5fd0', '#d06a2c', '#1d8a62', '#c2408e', '#2283a8', '#9a8414', '#7a46b5', '#c8414a'],
|
|
14
|
-
text: '#1d1f24', muted: '#5b5f69', grid: '#e2e3e7', surface: '#ffffff', dark: false,
|
|
14
|
+
text: '#1d1f24', muted: '#5b5f69', grid: '#e2e3e7', surface: '#ffffff', up: '#25875a', down: '#c8414a', font: 'system-ui, sans-serif', dark: false,
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
/** One OKLCH colour as sRGB hex (the CSS Color 4 conversion, clamped into gamut), keeping any alpha. */
|
|
@@ -72,7 +72,8 @@ export function readPalette(doc: Document = document): VisualPalette {
|
|
|
72
72
|
return {
|
|
73
73
|
series: LIGHT_PALETTE.series.map((fallback, i) => read(`--chart-${String(i + 1)}`, fallback)),
|
|
74
74
|
text: read('--text', LIGHT_PALETTE.text), muted: read('--text-dim', LIGHT_PALETTE.muted), grid: read('--border', LIGHT_PALETTE.grid),
|
|
75
|
-
surface: read('--surface', LIGHT_PALETTE.surface),
|
|
75
|
+
surface: read('--surface', LIGHT_PALETTE.surface), up: read('--ok', LIGHT_PALETTE.up), down: read('--danger', LIGHT_PALETTE.down),
|
|
76
|
+
font: view.getComputedStyle(doc.body).fontFamily || LIGHT_PALETTE.font, dark: isDark(doc),
|
|
76
77
|
};
|
|
77
78
|
} finally {
|
|
78
79
|
probe.remove();
|
|
@@ -7,7 +7,7 @@ summary: "Vue renderers, inputs and resource views, typed by the contract."
|
|
|
7
7
|
question: "How do I write a system's Vue renderers, inputs and views?"
|
|
8
8
|
when: "When writing a system's client/ components: renderers, inputs, resource views and pages."
|
|
9
9
|
askedBy: "system"
|
|
10
|
-
lastModified: "2026-11-
|
|
10
|
+
lastModified: "2026-11-29"
|
|
11
11
|
parent: "fs/authoring.topics.client"
|
|
12
12
|
next: "fs/authoring.widgets"
|
|
13
13
|
fns: ["fs/read", "fs/write", "fs/edit", "fs/bash"]
|
|
@@ -129,8 +129,10 @@ starts a new run of one of the system's fns in the renderer's session, as a pers
|
|
|
129
129
|
|
|
130
130
|
**Results.** A result renderer draws only what a finished run gave, under the chat's own run line (its status, cost and
|
|
131
131
|
args stay the chat's); a fn renderer, which draws the whole run as it goes, wins over it. It may draw with the app's
|
|
132
|
-
result view, `inject(RESULT_VIEW)` (`ResultViewProps`: a result table or a
|
|
133
|
-
and row actions; `keepLook` lets Settings keep the look picked there
|
|
132
|
+
result view, `inject(RESULT_VIEW)` (`ResultViewProps`: a result table or a shown result, core's `ShownResult`, with its
|
|
133
|
+
visuals, pager, drill and row actions; `keepLook` lets Settings keep the look picked there; its `controls` slot,
|
|
134
|
+
`ResultControls`, is where the renderer draws its own controls and runs the result again with other args, as the
|
|
135
|
+
widgets system's chips do; `client({ resultItems })` adds an item to plain result tables' menus), and with the app's controls,
|
|
134
136
|
`inject(APP_COMPONENTS)` (the same `SharedComponents` a page has as `host.components`). In a chat, `inject(CHAT_HOST)` asks the agent
|
|
135
137
|
(`ask(text, send)`), waits for a run the renderer started to end (`settled(run)` gives a `RunOutcome`) and moves the app
|
|
136
138
|
(`navigate(path)`). The widgets system draws a `make_widget` proposal's card with Save this way, and a saved widget's
|
|
@@ -171,16 +173,32 @@ Each must be listed in the contract's `contributes` with a declared shape (`visu
|
|
|
171
173
|
the shape alone judges and ranks a fit, the same in the hub, the widget agent and the browser. `veto(table, facts)` may
|
|
172
174
|
only take a fit away, with a reason; keep it cheap and pure. The chat's runtime lists the visuals a result may use
|
|
173
175
|
(`visuals(registry, table, facts)`, in load order), leaving out a vetoed one and one whose veto throws; the result view
|
|
174
|
-
ranks them with the built-in
|
|
176
|
+
ranks them with the built-in table and value cards (every chart, the widgets system's included, comes this way). How to
|
|
177
|
+
draw one with ECharts is in [Visuals and widgets](context:fs/authoring.widgets).
|
|
175
178
|
|
|
176
179
|
**Pages.** A system can add whole pages to the app, each at `/s/<system>/<segment>`. Declare each in the contract's
|
|
177
180
|
`pages` (`segment`, `title`, `description?`, `icon?`, `nav`: `main` puts it in the sidebar, `hidden` leaves it for links
|
|
178
|
-
such as one item's page; `access`: `everyone` or `admin`; and `component`), and give
|
|
181
|
+
such as one item's page; `access`: `everyone` or `admin`; `area`: `app`, the default, or `admin`; and `component`), and give
|
|
182
|
+
the component in
|
|
179
183
|
`client(contract, { pages: { NotesPage } })`. `client()` throws when a declared page has no component, or a component
|
|
180
184
|
no page names. The hub lists a page while its system is installed and live with its renderers on (an admin reviews and
|
|
181
185
|
can switch off each page like any component), so the page and its sidebar entry appear and disappear with the system;
|
|
182
186
|
an old link to a page whose system is gone keeps its URL and says the system isn't installed.
|
|
183
187
|
|
|
188
|
+
**Admin pages.** A page with `area: 'admin'` is drawn inside the admin area, at `/admin/s/<system>/<segment>`, for admins
|
|
189
|
+
only (whatever `access` says), and a `main` one joins the admin nav's Systems group while the system is live. The mcp
|
|
190
|
+
system's MCP servers page (`/admin/s/mcp/servers`) and the api system's API services page (`/admin/s/api/services`) are
|
|
191
|
+
drawn this way: one page each, the list at its root and one item under it (`servers/<instance>/<tab>`). Beside the
|
|
192
|
+
host, the app provides `AppParts` (`inject(APP_PARTS)`): the admin pages' own parts (`Tabs`, `Segmented`, `Switch`,
|
|
193
|
+
`ChipInput`, `IconButton`, `Card`, `FnList`, `Facts`, `Confirm`), `href(place)` / `go(place)` to the app's own places
|
|
194
|
+
(`AppPlace`: a fn's page, an instance, a connections page, the resource browser under a root, a context item) and
|
|
195
|
+
`bytes(count)`. `@harness/sdk/client-ui` holds what such pages share, bundled into each client build: `useParts()` (the
|
|
196
|
+
host's components and the admin parts together), `useAppParts()`, `usePageHost()`, `plainClick`, the state helpers
|
|
197
|
+
(`Loaded`, `Task`, `problemText`, `checkPaths`, `draftFields`), and for a remote service's forms the sign-in draft and
|
|
198
|
+
kept secrets (`authDraft`, `authCandidate`, `checkConfig`, `withoutKept`) with `RemoteAuthFields`, `PairRowsEditor`,
|
|
199
|
+
`InstanceNameField`, `AddServiceDialog` and `ServiceRows`. Its tests use `@harness/sdk/client-ui/testing` (`fakeHub`,
|
|
200
|
+
`fakeHost`: mount with `global: { provide: made.provide }`).
|
|
201
|
+
|
|
184
202
|
_From `scripts/docs/example/shared/index.ts`:_
|
|
185
203
|
|
|
186
204
|
```ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
# Generated by scripts/docs/authoring.ts from the authoring guide (npm run docs:authoring); do not edit.
|
|
3
3
|
key: "authoring.client.reference.client"
|
|
4
|
-
title: "The client: renderers, inputs, resource views and pages: reference: client …
|
|
4
|
+
title: "The client: renderers, inputs, resource views and pages: reference: client … VisualSource"
|
|
5
5
|
description: "The client: renderers, inputs, resource views and pages: reference, the part on client, ClientRenderers, ClientModule, Renderer, FnView, FnViewOf, AttachmentView, AttachmentViewOf, InputView, InputViewOf, MentionView, ResourceView, SystemClient, WithSystem, Delivery, ResourceViewerEntry, BareViewer, ResourceViewerMode, RESOURCE_VIEWER_MODES, RESOURCE_VIEWER, ResourceViewerProps, INPUT_ANSWERS,…"
|
|
6
6
|
summary: "The client: renderers, inputs, resource views and pages: reference: client, ClientRenderers, ClientModule, Renderer, FnView, FnViewOf, AttachmentView,…"
|
|
7
|
-
question: "What are the exact signatures and options of client, ClientRenderers, ClientModule, Renderer, FnView, FnViewOf and
|
|
8
|
-
when: "When code uses client, ClientRenderers, ClientModule, Renderer, FnView, FnViewOf and
|
|
7
|
+
question: "What are the exact signatures and options of client, ClientRenderers, ClientModule, Renderer, FnView, FnViewOf and 34 more?"
|
|
8
|
+
when: "When code uses client, ClientRenderers, ClientModule, Renderer, FnView, FnViewOf and 34 more and needs an exact signature, field or option."
|
|
9
9
|
askedBy: "system"
|
|
10
|
-
lastModified: "2026-11-
|
|
10
|
+
lastModified: "2026-11-29"
|
|
11
11
|
parent: "fs/authoring.client.reference"
|
|
12
|
-
next: "fs/authoring.client.reference.
|
|
12
|
+
next: "fs/authoring.client.reference.visuals"
|
|
13
13
|
suggest: "none"
|
|
14
14
|
tags: ["authoring", "reference"]
|
|
15
15
|
niche: "developer"
|
|
@@ -62,6 +62,8 @@ interface ClientRenderers<C extends ContractShape> {
|
|
|
62
62
|
* the contract's `contributes`, which is how the hub and the web app know to load this bundle for that registry.
|
|
63
63
|
*/
|
|
64
64
|
visuals?: Readonly<Record<QualifiedName, Readonly<Record<string, VisualEntry<C>>>>>;
|
|
65
|
+
/** Items this system adds to plain result tables' 3-dot menus, by name (`ResultItemEntry`: the widgets system's "Make a widget"). */
|
|
66
|
+
resultItems?: Readonly<Record<string, ResultItemEntry>>;
|
|
65
67
|
/**
|
|
66
68
|
* Config components by name. The one the contract's `configComponent` names is drawn for the system's config; it must
|
|
67
69
|
* be here, and every component here must be the one named.
|
|
@@ -629,14 +631,3 @@ interface VisualSource {
|
|
|
629
631
|
```
|
|
630
632
|
|
|
631
633
|
Refers to: [`QualifiedName`](context:fs/authoring.core-types.primitives-ts#core-qualifiedname), [`ResultFacts`](context:fs/authoring.core-types.visuals-ts#core-resultfacts), [`ResultTable`](context:fs/authoring.core-types.registries-ts#core-resulttable).
|
|
632
|
-
|
|
633
|
-
#### `VISUALS`
|
|
634
|
-
|
|
635
|
-
const · `import { VISUALS } from '@harness/sdk'`
|
|
636
|
-
|
|
637
|
-
Every loaded system's visuals for a registry (the chat provides its client runtime's), so a result view can offer
|
|
638
|
-
visuals other systems contribute. Without it, a view falls back on its own system's visuals.
|
|
639
|
-
|
|
640
|
-
```ts
|
|
641
|
-
const VISUALS: InjectionKey<VisualSource>;
|
|
642
|
-
```
|