fnloom 0.2.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 +123 -19
- package/package.json +15 -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 +4 -3
- package/packages/cli/src/command.ts +4 -2
- package/packages/cli/src/commands/install.ts +104 -8
- package/packages/cli/src/commands/manage.ts +7 -5
- package/packages/cli/src/commands/mcp.ts +6 -6
- package/packages/cli/src/commands/store.ts +172 -0
- package/packages/cli/src/hub.ts +45 -26
- package/packages/cli/src/index.ts +1 -1
- package/packages/cli/src/io.ts +3 -2
- package/packages/cli/src/local.ts +7 -7
- package/packages/cli/src/premade.ts +1 -1
- package/packages/cli/src/testing.ts +2 -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-files.ts +3 -1
- package/packages/core/src/context-graph.ts +5 -1
- package/packages/core/src/context-plan.ts +451 -0
- package/packages/core/src/context-questions.ts +305 -0
- package/packages/core/src/data.ts +1 -1
- package/packages/core/src/fn-facts.ts +32 -4
- package/packages/core/src/https.ts +2 -2
- package/packages/core/src/identity.ts +2 -2
- package/packages/core/src/image-embeddings.ts +1 -1
- package/packages/core/src/index.ts +9 -8
- package/packages/core/src/link.ts +71 -1
- package/packages/core/src/manifest.ts +22 -3
- package/packages/core/src/mention-search.ts +1 -1
- package/packages/core/src/model-calls.ts +11 -2
- package/packages/core/src/package.ts +11 -1
- package/packages/core/src/ports.ts +2 -2
- package/packages/core/src/query.ts +4 -3
- package/packages/core/src/records/chat.ts +1 -1
- package/packages/core/src/records/content.ts +10 -2
- package/packages/core/src/records/runs.ts +12 -0
- package/packages/core/src/records/spend.ts +4 -0
- package/packages/core/src/records/systems.ts +87 -5
- package/packages/core/src/registries.ts +9 -3
- package/packages/core/src/run.ts +5 -0
- package/packages/core/src/sso.ts +2 -2
- package/packages/core/src/stores.ts +473 -0
- package/packages/core/src/suggestions.ts +5 -2
- package/packages/core/src/system-pages.ts +46 -7
- package/packages/core/src/tables.ts +233 -0
- package/packages/core/src/visuals.ts +47 -139
- package/packages/core/src/web.ts +116 -11
- package/packages/core/src/widgets-v1.ts +78 -1
- package/packages/hub/package.json +15 -12
- package/packages/hub/src/access/hits.ts +1 -1
- package/packages/hub/src/api/admin-ops.ts +41 -9
- package/packages/hub/src/api/auth.ts +10 -6
- package/packages/hub/src/api/https.ts +6 -6
- package/packages/hub/src/api/identities.ts +1 -1
- package/packages/hub/src/api/person-ops.ts +6 -0
- 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 +54 -0
- package/packages/hub/src/api/testing/rig.ts +3 -3
- package/packages/hub/src/api/tls.ts +4 -4
- package/packages/hub/src/api/web/auth.ts +1 -1
- package/packages/hub/src/api/web/build5.ts +2 -1
- package/packages/hub/src/api/web/context-plans.ts +25 -0
- package/packages/hub/src/api/web/context-review.ts +43 -0
- package/packages/hub/src/api/web/find.ts +1 -1
- package/packages/hub/src/api/web/index.ts +4 -0
- package/packages/hub/src/api/web/pages.ts +17 -3
- package/packages/hub/src/api/web/pickers.ts +4 -4
- package/packages/hub/src/api/web/review.ts +16 -0
- package/packages/hub/src/api/web/systems.ts +14 -2
- package/packages/hub/src/boot/admin-fns.ts +8 -0
- package/packages/hub/src/boot/admin-secrets.ts +10 -4
- package/packages/hub/src/boot/env.ts +82 -73
- package/packages/hub/src/boot/hub-fns.ts +4 -4
- package/packages/hub/src/boot/hub-groups.ts +2 -2
- package/packages/hub/src/boot/identity.ts +2 -2
- package/packages/hub/src/boot/index.ts +10 -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 +16 -7
- package/packages/hub/src/boot/person-fns.ts +5 -0
- package/packages/hub/src/boot/plan-fns.ts +39 -0
- package/packages/hub/src/boot/services.ts +9 -9
- package/packages/hub/src/boot/start.ts +25 -24
- package/packages/hub/src/catalog/catalog.ts +44 -14
- package/packages/hub/src/catalog/index.ts +6 -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 +3 -3
- 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/brought.ts +5 -3
- 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 +5 -5
- 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 +13 -6
- package/packages/hub/src/execution/env.ts +16 -14
- package/packages/hub/src/execution/errors.ts +12 -0
- package/packages/hub/src/execution/executors.ts +16 -4
- package/packages/hub/src/execution/gateway.ts +1 -1
- package/packages/hub/src/execution/index.ts +9 -1
- package/packages/hub/src/execution/ledger.ts +2 -2
- package/packages/hub/src/execution/limits.ts +2 -2
- package/packages/hub/src/execution/link-handlers.ts +16 -4
- 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 +216 -15
- package/packages/hub/src/execution/stream-guard.ts +2 -2
- package/packages/hub/src/execution/testing.ts +7 -6
- 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 +28 -9
- package/packages/hub/src/graph/graph.ts +3 -3
- 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 +10 -3
- package/packages/hub/src/index/indexer.ts +71 -20
- package/packages/hub/src/index/search.ts +2 -1
- package/packages/hub/src/index/suggester.ts +2 -2
- package/packages/hub/src/index/testing.ts +2 -2
- package/packages/hub/src/link/build.ts +71 -34
- package/packages/hub/src/link/connections.ts +41 -3
- package/packages/hub/src/link/describer.ts +19 -2
- package/packages/hub/src/link/env.ts +21 -11
- package/packages/hub/src/link/grants.ts +10 -10
- package/packages/hub/src/link/handlers.ts +6 -0
- package/packages/hub/src/link/index.ts +16 -4
- package/packages/hub/src/link/lifecycle.ts +15 -8
- package/packages/hub/src/link/migrate-api.ts +55 -15
- package/packages/hub/src/link/packages.ts +17 -4
- package/packages/hub/src/link/pairing.ts +3 -3
- package/packages/hub/src/link/process.ts +11 -5
- package/packages/hub/src/link/rig.ts +15 -11
- package/packages/hub/src/link/status.ts +14 -0
- package/packages/hub/src/link/supervisor.ts +17 -1
- package/packages/hub/src/link/systems.ts +16 -5
- 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 +78 -11
- package/packages/hub/src/query/columns.ts +4 -1
- package/packages/hub/src/query/contexts.ts +10 -3
- package/packages/hub/src/query/env.ts +5 -5
- package/packages/hub/src/query/sources.ts +3 -3
- package/packages/hub/src/questions/apply.ts +163 -0
- package/packages/hub/src/questions/carry.ts +30 -0
- package/packages/hub/src/questions/duplicates.ts +181 -0
- package/packages/hub/src/questions/index.ts +112 -0
- package/packages/hub/src/questions/metadata.ts +142 -0
- package/packages/hub/src/questions/pending.ts +64 -0
- package/packages/hub/src/questions/plan-match.ts +79 -0
- package/packages/hub/src/questions/plan-prompts.ts +110 -0
- package/packages/hub/src/questions/planner.ts +382 -0
- package/packages/hub/src/questions/plans.ts +353 -0
- package/packages/hub/src/questions/review.ts +253 -0
- package/packages/hub/src/questions/setting.ts +50 -0
- package/packages/hub/src/questions/testing.ts +131 -0
- package/packages/hub/src/questions/worker.ts +182 -0
- package/packages/hub/src/resources/context.ts +61 -23
- package/packages/hub/src/resources/converters.ts +2 -2
- package/packages/hub/src/resources/create.ts +20 -8
- package/packages/hub/src/resources/env.ts +15 -11
- package/packages/hub/src/resources/fetch.ts +5 -5
- package/packages/hub/src/resources/fns.ts +6 -2
- package/packages/hub/src/resources/forms.ts +5 -5
- package/packages/hub/src/resources/index.ts +9 -3
- 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 +22 -6
- package/packages/hub/src/store/codec.ts +23 -5
- package/packages/hub/src/store/context-status.ts +56 -0
- package/packages/hub/src/store/derived.ts +53 -0
- package/packages/hub/src/store/env.ts +4 -4
- package/packages/hub/src/store/hybrid.ts +37 -10
- package/packages/hub/src/store/lists.ts +2 -1
- package/packages/hub/src/store/migrate-fn-names.ts +5 -2
- package/packages/hub/src/store/rows.ts +8 -1
- package/packages/hub/src/store/schema.ts +2 -1
- package/packages/hub/src/store/sqlite.ts +5 -4
- package/packages/hub/src/stores/backups.ts +163 -0
- package/packages/hub/src/stores/drivers.ts +100 -0
- package/packages/hub/src/stores/guard.ts +116 -0
- package/packages/hub/src/stores/host.ts +459 -0
- package/packages/hub/src/stores/moves.ts +380 -0
- package/packages/hub/src/stores/plugin.ts +42 -0
- package/packages/hub/src/stores/service.ts +340 -0
- package/packages/hub/src/stores/testing.ts +149 -0
- 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 +3229 -1309
- package/packages/sdk/package.json +15 -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/build.ts +3 -0
- 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 +104 -11
- package/packages/sdk/src/ctx.ts +51 -17
- package/packages/sdk/src/declare.ts +36 -12
- package/packages/sdk/src/hub.ts +226 -14
- package/packages/sdk/src/impl.ts +3 -3
- package/packages/sdk/src/index.ts +19 -12
- package/packages/sdk/src/manifest.ts +5 -0
- 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/providers.ts +2 -2
- package/packages/sdk/src/remote-auth.ts +128 -7
- package/packages/sdk/src/server/asks.ts +12 -1
- package/packages/sdk/src/server/context-files.ts +1 -1
- package/packages/sdk/src/server/env.ts +47 -35
- package/packages/sdk/src/server/fake-hub-widgets.ts +7 -6
- package/packages/sdk/src/server/host.ts +106 -35
- package/packages/sdk/src/server/index.ts +23 -4
- package/packages/sdk/src/server/live.ts +4 -4
- package/packages/sdk/src/server/llm-wire.ts +4 -4
- package/packages/sdk/src/server/package.ts +11 -2
- package/packages/sdk/src/server/pairing.ts +1 -1
- package/packages/sdk/src/server/results.ts +4 -4
- package/packages/sdk/src/server/run.ts +6 -1
- package/packages/sdk/src/server/runtime.ts +78 -22
- package/packages/sdk/src/server/socket-guard.ts +1 -1
- package/packages/sdk/src/server/start-gate.ts +174 -0
- package/packages/sdk/src/server/store/checksum.ts +162 -0
- package/packages/sdk/src/server/store/engines.ts +400 -0
- package/packages/sdk/src/server/store/extend.ts +25 -0
- package/packages/sdk/src/server/store/keeper.ts +392 -0
- package/packages/sdk/src/server/store/link-driver.ts +142 -0
- package/packages/sdk/src/server/store/measure.ts +45 -0
- package/packages/sdk/src/server/store/migrations.ts +238 -0
- package/packages/sdk/src/server/store/move.ts +488 -0
- package/packages/sdk/src/server/store/portable.ts +288 -0
- package/packages/sdk/src/server/store/stable.ts +146 -0
- package/packages/sdk/src/server/store/tables.ts +28 -0
- package/packages/sdk/src/server/store/vectors.ts +185 -0
- package/packages/sdk/src/server/store/work-checks.ts +288 -0
- package/packages/sdk/src/server/store/work.ts +369 -0
- package/packages/sdk/src/server/supervise.ts +4 -4
- package/packages/sdk/src/server/table.ts +3 -1
- package/packages/sdk/src/server/testing.ts +116 -3
- package/packages/sdk/src/store.ts +91 -0
- package/packages/sdk/src/system.ts +58 -30
- package/packages/sdk/src/testing/env.ts +6 -6
- package/packages/sdk/src/testing/hub.ts +21 -6
- 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-BuMYRDqv.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-DSzDKCFz.js → AppPage-BvoVTk6h.js} +2 -2
- package/packages/web/dist/assets/{AutoPairPicker-nV38ALjl.js → AutoPairPicker-CLjD-muP.js} +2 -2
- package/packages/web/dist/assets/{BrowserFrame-Bic7U7jN.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-xHS3Xah9.js → CodeViewer-K9jrTmFO.js} +2 -2
- package/packages/web/dist/assets/ConfigWithCustom-BvrvSVIp.js +3 -0
- package/packages/web/dist/assets/{ConfirmDialog-DjQUzNqk.js → ConfirmDialog-BDvLleYf.js} +2 -2
- package/packages/web/dist/assets/{ConnectPage-CfRDrXvJ.js → ConnectPage-Dg6IPNNh.js} +2 -2
- package/packages/web/dist/assets/ContextItemPage-Cv4G0k_o.css +1 -0
- package/packages/web/dist/assets/ContextItemPage-qisBQetR.js +2 -0
- package/packages/web/dist/assets/ContextPage-C8u0UnYl.css +1 -0
- package/packages/web/dist/assets/ContextPage-DXa6Yqk-.js +3 -0
- package/packages/web/dist/assets/ContextRow-Chx99Xac.css +1 -0
- package/packages/web/dist/assets/ContextRow-DDYnYRaL.js +2 -0
- package/packages/web/dist/assets/{DataPage-wSIoGcb5.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-DidMUX8m.js → DesignPage-B9MJbF10.js} +3 -3
- package/packages/web/dist/assets/{ExplorePage-MUyVydVB.js → ExplorePage-cRDQZRea.js} +2 -2
- package/packages/web/dist/assets/{FnPill-BshAvm2I.js → FnPill-CbLZCXYM.js} +2 -2
- package/packages/web/dist/assets/{FnView-B8MGAOoB.js → FnView-CG_wBKTP.js} +2 -2
- package/packages/web/dist/assets/{FnsView-CeqIoaBT.js → FnsView-BybyK12w.js} +2 -2
- package/packages/web/dist/assets/{GinExprView-DYVUwZrd.js → GinExprView-BYCKSD_n.js} +2 -2
- package/packages/web/dist/assets/{GinForm-D3mwMRTQ.js → GinForm-CXjYVf2_.js} +2 -2
- package/packages/web/dist/assets/{GinTypeView-C0YifSmE.js → GinTypeView-Bmbmx9e_.js} +2 -2
- package/packages/web/dist/assets/{GinValueView-HfEPq9le.js → GinValueView-CWUzS7ti.js} +2 -2
- package/packages/web/dist/assets/{GraphPage-ySnuA4Hp.js → GraphPage-D6OhckfJ.js} +2 -2
- package/packages/web/dist/assets/GraphPanel-BTitgA-K.js +2 -0
- package/packages/web/dist/assets/{HubPicker-C_vA752L.js → HubPicker-DVly8dLD.js} +2 -2
- package/packages/web/dist/assets/{InboxApprovals-DcPCCmZ5.js → InboxApprovals-BF84edZU.js} +2 -2
- package/packages/web/dist/assets/{InboxPage-C2DT2nuF.js → InboxPage-DohZ9EDP.js} +2 -2
- package/packages/web/dist/assets/InjectedList-e6qr1kdU.js +2 -0
- package/packages/web/dist/assets/InstallDialog-JJCKYs2s.js +2 -0
- package/packages/web/dist/assets/{InstallDialog-yWLZK_zN.css → InstallDialog-K-j0sdHm.css} +1 -1
- package/packages/web/dist/assets/InstanceTypes-BqUzx87o.js +2 -0
- package/packages/web/dist/assets/InstanceTypes-CwVSAULg.css +1 -0
- package/packages/web/dist/assets/InstanceView-C73pev7A.js +2 -0
- package/packages/web/dist/assets/InstanceView-_9uE70tS.css +1 -0
- package/packages/web/dist/assets/{ItemHistory-CUGa8b6s.js → ItemHistory-dbGgOZsw.js} +2 -2
- package/packages/web/dist/assets/LimitsView-Ddp5WakY.js +2 -0
- package/packages/web/dist/assets/ListSearch-CYNNAuMB.js +2 -0
- package/packages/web/dist/assets/{LlmCallDetails-2yQftCqd.js → LlmCallDetails-C9H5Hc2J.js} +2 -2
- package/packages/web/dist/assets/{LlmCallsView-DOHX3r0K.js → LlmCallsView-CBqyZ8Cj.js} +2 -2
- package/packages/web/dist/assets/{LoadState-DeXfLvYv.js → LoadState-B2YhZlyC.js} +2 -2
- package/packages/web/dist/assets/McpDialog-DhlLklIq.js +2 -0
- package/packages/web/dist/assets/{McpView-CC2oNOMa.js → McpView-D_ZmNO56.js} +2 -2
- package/packages/web/dist/assets/{McpsView-CwJvyyxV.js → McpsView-9_gwBuzw.js} +2 -2
- package/packages/web/dist/assets/{MemoryDialog-Dbvh5uLq.js → MemoryDialog-pTHIxKEX.js} +2 -2
- package/packages/web/dist/assets/{ModelCallsView-RvnW3EBP.js → ModelCallsView-FHv2XWRX.js} +2 -2
- package/packages/web/dist/assets/{ModelPicker-DcjwQFHC.js → ModelPicker-EqOuvVnE.js} +2 -2
- package/packages/web/dist/assets/ModelsView-D9UaL4PX.js +2 -0
- package/packages/web/dist/assets/{NotFoundPage-CeSwzTV-.js → NotFoundPage-BsuJysan.js} +2 -2
- package/packages/web/dist/assets/PairPage-B_ZXsbL4.js +2 -0
- package/packages/web/dist/assets/PairPage-D_aPS1Ot.css +1 -0
- package/packages/web/dist/assets/{PanelHost-BkrFAnPa.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-Bn4rm-ao.js +2 -0
- package/packages/web/dist/assets/{RefusalList-DQoyUoPG.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-Po24y4pj.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-k3HevESg.js → ReviewSummaryStrip-Bvjn3Iq8.js} +2 -2
- package/packages/web/dist/assets/ReviewView-DIqsUedT.js +3 -0
- package/packages/web/dist/assets/{RuleRow-CoXDA-SH.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-CGhQQ6OI.js → RunDetails-W4GbE6AE.js} +2 -2
- package/packages/web/dist/assets/{RunDot-Ch_45985.js → RunDot-C46uzzNM.js} +2 -2
- package/packages/web/dist/assets/{RunPage-C_t20pB7.js → RunPage-DPLtZpeB.js} +2 -2
- package/packages/web/dist/assets/{RunProgress-VrZUHUEC.js → RunProgress-Cr_6TBaF.js} +2 -2
- package/packages/web/dist/assets/RunsView-tU350TPK.js +2 -0
- package/packages/web/dist/assets/{SettingsPage-CykfuYj1.js → SettingsPage-B8QmmMN3.js} +2 -2
- 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-DrXZ1sG2.js → SignInPage-DTwdqlnB.js} +2 -2
- package/packages/web/dist/assets/{StatusBadge-Dpb9uG5e.js → StatusBadge-D7wKMAcD.js} +2 -2
- package/packages/web/dist/assets/StorePlacementStep-C04nRU-u.js +2 -0
- package/packages/web/dist/assets/StorePlacementStep-D_G4e3ue.css +1 -0
- package/packages/web/dist/assets/{SystemConfig-72qKRkUk.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/{SystemView-C8ScHUe2.css → SystemView-_9q6eDfV.css} +1 -1
- package/packages/web/dist/assets/SystemsView-0G8JntMV.js +2 -0
- package/packages/web/dist/assets/{SystemsView-B6HEL9VS.css → SystemsView-CWKnupLW.css} +1 -1
- 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-BQ7bYLOP.js → TableViewer-nbMInGJJ.js} +2 -2
- package/packages/web/dist/assets/{ThemePicker-C2nJ21Vd.js → ThemePicker-fZpVSYqG.js} +2 -2
- package/packages/web/dist/assets/{TurnTree-CORdfTHj.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-qyc8dG5D.js → UserMessage-CDjUxKY0.js} +6 -6
- package/packages/web/dist/assets/{ValueVisual-aXEUaQ5Y.js → ValueVisual-EJnCKgSy.js} +2 -2
- package/packages/web/dist/assets/actor-names-OdvpVZeb.js +4 -0
- package/packages/web/dist/assets/{fn-modal-DqcxUhOQ.js → fn-modal-DtE65mFt.js} +2 -2
- package/packages/web/dist/assets/{fn-notices-BYaH6IoA.js → fn-notices-CCZ-DFbi.js} +2 -2
- package/packages/web/dist/assets/{formats-DI__ADVG.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-BhJpmLWA.js → labels-CT7_K0Pt.js} +2 -2
- package/packages/web/dist/assets/{layout-DQKldU13.js → layout-B6fBDg80.js} +2 -2
- package/packages/web/dist/assets/loaded-LaPjk6mK.js +2 -0
- package/packages/web/dist/assets/{metrics-Cio5ykX6.js → metrics-9n8bKI7u.js} +2 -2
- package/packages/web/dist/assets/problems--AW4igVY.js +2 -0
- package/packages/web/dist/assets/{push-payload-D5efGCzd.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-CGUGvRV9.js → review-uLESCEz1.js} +3 -3
- package/packages/web/dist/assets/routes-B7Zmt8wh.js +4 -0
- package/packages/web/dist/assets/runs-CUb2PTFg.js +2 -0
- package/packages/web/dist/assets/{shared-DTpYDMc_.js → shared-Bxhw_9et.js} +2 -2
- package/packages/web/dist/assets/{sources-Bm-TrxhL.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-DIp94AET.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-DWjytmDS.js +17 -0
- package/packages/web/dist/assets/{ui-C7ZH_6oC.css → ui-DycHjPTZ.css} +1 -1
- package/packages/web/dist/assets/{url-BIg5IhGs.js → url-DbGOI14W.js} +2 -2
- package/packages/web/dist/index.html +52 -50
- 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 +17 -16
- package/scripts/stack.ts +76 -19
- package/scripts/start.ts +27 -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/fakes.ts +2 -0
- package/systems/fs/client/index.ts +4 -2
- package/systems/fs/client/machines/CoreHeatmap.vue +94 -0
- package/systems/fs/client/machines/MachineFiles.vue +121 -0
- package/systems/fs/client/machines/MachineMetrics.vue +330 -0
- package/systems/fs/client/machines/MachinesPage.vue +119 -0
- package/systems/fs/client/machines/TimeChart.vue +128 -0
- package/systems/fs/client/machines/fakes.ts +95 -0
- package/systems/fs/client/machines/files/ChangesPane.vue +90 -0
- package/systems/fs/client/machines/files/CodeView.vue +158 -0
- package/systems/fs/client/machines/files/CommentComposer.vue +86 -0
- package/systems/fs/client/machines/files/CommentThread.vue +115 -0
- package/systems/fs/client/machines/files/CommitPane.vue +80 -0
- package/systems/fs/client/machines/files/ComparePane.vue +81 -0
- package/systems/fs/client/machines/files/FileHistory.vue +89 -0
- package/systems/fs/client/machines/files/FilePane.vue +199 -0
- package/systems/fs/client/machines/files/FileTree.vue +26 -0
- package/systems/fs/client/machines/files/FolderPane.vue +154 -0
- package/systems/fs/client/machines/files/HistoryPane.vue +106 -0
- package/systems/fs/client/machines/files/ImageView.vue +160 -0
- package/systems/fs/client/machines/files/PatchView.vue +31 -0
- package/systems/fs/client/machines/files/QuickOpen.vue +67 -0
- package/systems/fs/client/machines/files/SearchPane.vue +87 -0
- package/systems/fs/client/machines/files/TreeNode.vue +72 -0
- package/systems/fs/client/machines/files/api.ts +127 -0
- package/systems/fs/client/machines/files/fake-kinds.ts +16 -0
- package/systems/fs/client/machines/files/fakes.ts +305 -0
- package/systems/fs/client/machines/files/ink.ts +117 -0
- package/systems/fs/client/machines/files/logic.ts +205 -0
- package/systems/fs/client/machines/files/state.ts +187 -0
- package/systems/fs/client/machines/files/viewers/CsvView.vue +29 -0
- package/systems/fs/client/machines/files/viewers/HexView.vue +27 -0
- package/systems/fs/client/machines/files/viewers/HtmlView.vue +17 -0
- package/systems/fs/client/machines/files/viewers/JsonNode.vue +45 -0
- package/systems/fs/client/machines/files/viewers/JsonView.vue +25 -0
- package/systems/fs/client/machines/metrics.ts +245 -0
- package/systems/fs/client/machines/palette.ts +98 -0
- package/systems/fs/client/preview/machines.ts +323 -0
- package/systems/fs/context/authoring/index.md +4 -0
- package/systems/fs/context/authoring/parts/actions.md +5 -1
- package/systems/fs/context/authoring/parts/actions.reference.md +6 -2
- package/systems/fs/context/authoring/parts/calling.md +5 -1
- package/systems/fs/context/authoring/parts/calling.reference.md +4 -0
- package/systems/fs/context/authoring/parts/client.md +31 -5
- package/systems/fs/context/authoring/parts/client.reference/client.md +8 -13
- package/systems/fs/context/authoring/parts/client.reference/pageinbox.md +524 -0
- package/systems/fs/context/authoring/parts/client.reference/{resultview.md → visuals.md} +135 -163
- package/systems/fs/context/authoring/parts/client.reference.md +11 -7
- package/systems/fs/context/authoring/parts/context/questions.md +49 -0
- package/systems/fs/context/authoring/parts/context.md +24 -2
- package/systems/fs/context/authoring/parts/context.reference.md +27 -3
- package/systems/fs/context/authoring/parts/contract.md +11 -1
- package/systems/fs/context/authoring/parts/contract.reference.md +26 -9
- package/systems/fs/context/authoring/parts/core-types/access-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/admin-ts.md +6 -2
- package/systems/fs/context/authoring/parts/core-types/api-index-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/approvals-ts.md +11 -7
- package/systems/fs/context/authoring/parts/core-types/auto-pair-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/checks-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/claims-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/config-secrets-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/connections-ts.md +15 -0
- package/systems/fs/context/authoring/parts/core-types/context-files-ts.md +9 -1
- package/systems/fs/context/authoring/parts/core-types/context-graph-ts.md +6 -2
- package/systems/fs/context/authoring/parts/core-types/context-questions-ts.md +26 -0
- package/systems/fs/context/authoring/parts/core-types/contextdecl.md +10 -2
- package/systems/fs/context/authoring/parts/core-types/data-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/decisions-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/fn-block-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/fn-facts-ts.md +11 -0
- package/systems/fs/context/authoring/parts/core-types/gin-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/grants-ts.md +5 -1
- package/systems/fs/context/authoring/parts/core-types/lifecycle-ts.md +44 -6
- package/systems/fs/context/authoring/parts/core-types/link-ts.md +7 -3
- package/systems/fs/context/authoring/parts/core-types/llm-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/manifest.md +41 -3
- package/systems/fs/context/authoring/parts/core-types/manifestpatch.md +34 -2
- package/systems/fs/context/authoring/parts/core-types/mention-search-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/model-calls-ts.md +5 -1
- package/systems/fs/context/authoring/parts/core-types/model-names-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/modes-ts.md +6 -2
- package/systems/fs/context/authoring/parts/core-types/owner-runs-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/package-ts.md +9 -0
- package/systems/fs/context/authoring/parts/core-types/primitives-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/query-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/records-actors-ts.md +7 -3
- package/systems/fs/context/authoring/parts/core-types/records-chat-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/records-content-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/records-runs-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/records-systems-ts.md +148 -0
- package/systems/fs/context/authoring/parts/core-types/registries-ts.md +101 -1
- package/systems/fs/context/authoring/parts/core-types/resources-ts.md +5 -1
- package/systems/fs/context/authoring/parts/core-types/run-ts.md +8 -1
- package/systems/fs/context/authoring/parts/core-types/sensitivity-ts.md +5 -1
- package/systems/fs/context/authoring/parts/core-types/stores-ts.md +199 -0
- package/systems/fs/context/authoring/parts/core-types/system-events-ts.md +8 -1
- package/systems/fs/context/authoring/parts/core-types/system-pages-ts.md +7 -1
- package/systems/fs/context/authoring/parts/core-types/system-providers-ts.md +5 -1
- package/systems/fs/context/authoring/parts/core-types/tables-ts.md +91 -0
- package/systems/fs/context/authoring/parts/core-types/validation-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/visuals-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/web-ts.md +4 -1
- package/systems/fs/context/authoring/parts/core-types.md +15 -8
- package/systems/fs/context/authoring/parts/ctx/update-result.md +33 -0
- package/systems/fs/context/authoring/parts/ctx.md +11 -1
- package/systems/fs/context/authoring/parts/ctx.reference/{hubai.md → adminnotices.md} +45 -4
- package/systems/fs/context/authoring/parts/ctx.reference/fnctx.md +21 -23
- package/systems/fs/context/authoring/parts/ctx.reference.md +8 -4
- package/systems/fs/context/authoring/parts/data.md +11 -6
- package/systems/fs/context/authoring/parts/data.reference.md +4 -0
- package/systems/fs/context/authoring/parts/examples/client-findview-vue.md +4 -0
- package/systems/fs/context/authoring/parts/examples/client-index-ts.md +4 -0
- package/systems/fs/context/authoring/parts/examples/client-notecard-vue.md +4 -0
- package/systems/fs/context/authoring/parts/examples/client-noteinput-vue.md +4 -0
- package/systems/fs/context/authoring/parts/examples/client-notespage-vue.md +4 -0
- package/systems/fs/context/authoring/parts/examples/client-reviewform-vue.md +4 -0
- package/systems/fs/context/authoring/parts/examples/client-wordcount-vue.md +4 -0
- package/systems/fs/context/authoring/parts/examples/package-json.md +4 -0
- package/systems/fs/context/authoring/parts/examples/server-env-ts.md +4 -0
- package/systems/fs/context/authoring/parts/examples/server-impl-ts.md +4 -0
- package/systems/fs/context/authoring/parts/examples/server-index-ts.md +4 -0
- package/systems/fs/context/authoring/parts/examples/server-main-ts.md +8 -4
- package/systems/fs/context/authoring/parts/examples/server-notes-test-ts.md +4 -0
- package/systems/fs/context/authoring/parts/examples/shared-index-ts.md +10 -0
- package/systems/fs/context/authoring/parts/examples/system-json.md +4 -0
- package/systems/fs/context/authoring/parts/examples/{systems-fs-shared-index-ts-lines-1-189.md → systems-fs-shared-index-ts-lines-1-178.md} +23 -30
- package/systems/fs/context/authoring/parts/examples/{systems-fs-shared-index-ts-lines-190-370.md → systems-fs-shared-index-ts-lines-179-382.md} +33 -6
- package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-383-567.md +210 -0
- package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-568-660.md +117 -0
- package/systems/fs/context/authoring/parts/examples/tsconfig-json.md +5 -1
- package/systems/fs/context/authoring/parts/examples.md +18 -11
- package/systems/fs/context/authoring/parts/fns.md +6 -2
- package/systems/fs/context/authoring/parts/fns.reference/fillclaims.md +5 -1
- package/systems/fs/context/authoring/parts/fns.reference/fn.md +6 -2
- package/systems/fs/context/authoring/parts/fns.reference.md +4 -0
- package/systems/fs/context/authoring/parts/folder.md +10 -6
- package/systems/fs/context/authoring/parts/gin.md +4 -0
- package/systems/fs/context/authoring/parts/gin.reference.md +4 -0
- package/systems/fs/context/authoring/parts/handlers-progress.md +5 -1
- package/systems/fs/context/authoring/parts/handlers-progress.reference.md +4 -0
- package/systems/fs/context/authoring/parts/hooks.md +5 -1
- package/systems/fs/context/authoring/parts/hooks.reference.md +5 -1
- package/systems/fs/context/authoring/parts/hub/context-questions.md +40 -0
- package/systems/fs/context/authoring/parts/hub/{hub-run-background.md → hub-ctx-from-resource.md} +52 -57
- package/systems/fs/context/authoring/parts/hub/hub-fns-load.md +35 -42
- package/systems/fs/context/authoring/parts/hub/hub-install-package.md +327 -0
- package/systems/fs/context/authoring/parts/hub/kinds-of-hub.md +8 -0
- package/systems/fs/context/authoring/parts/hub.md +14 -8
- package/systems/fs/context/authoring/parts/hub.reference.md +11 -2
- package/systems/fs/context/authoring/parts/internals/manifestof.md +6 -2
- package/systems/fs/context/authoring/parts/internals/permissionargs.md +8 -4
- package/systems/fs/context/authoring/parts/internals/usagefromwire.md +47 -2
- package/systems/fs/context/authoring/parts/internals.md +6 -2
- package/systems/fs/context/authoring/parts/kinds-agents.md +6 -2
- package/systems/fs/context/authoring/parts/kinds-agents.reference/authoringsession.md +10 -4
- package/systems/fs/context/authoring/parts/kinds-agents.reference/kind.md +11 -7
- package/systems/fs/context/authoring/parts/kinds-agents.reference.md +4 -0
- package/systems/fs/context/authoring/parts/lifecycle.md +8 -3
- package/systems/fs/context/authoring/parts/lifecycle.reference.md +6 -2
- package/systems/fs/context/authoring/parts/mentions.md +5 -1
- package/systems/fs/context/authoring/parts/mentions.reference.md +6 -2
- package/systems/fs/context/authoring/parts/mistakes.md +7 -2
- package/systems/fs/context/authoring/parts/named-types.md +4 -0
- package/systems/fs/context/authoring/parts/named-types.reference.md +6 -2
- package/systems/fs/context/authoring/parts/outcomes.md +7 -3
- package/systems/fs/context/authoring/parts/outcomes.reference.md +6 -2
- package/systems/fs/context/authoring/parts/owner-runs.md +5 -1
- package/systems/fs/context/authoring/parts/owner-runs.reference.md +36 -11
- package/systems/fs/context/authoring/parts/packaging.md +14 -7
- package/systems/fs/context/authoring/parts/packaging.reference.md +7 -2
- package/systems/fs/context/authoring/parts/providers.md +5 -1
- package/systems/fs/context/authoring/parts/providers.reference.md +5 -1
- package/systems/fs/context/authoring/parts/remote.md +9 -5
- package/systems/fs/context/authoring/parts/remote.reference.md +204 -16
- package/systems/fs/context/authoring/parts/resources.md +5 -1
- package/systems/fs/context/authoring/parts/resources.reference.md +4 -0
- package/systems/fs/context/authoring/parts/server.md +12 -8
- package/systems/fs/context/authoring/parts/server.reference.md +55 -34
- package/systems/fs/context/authoring/parts/settings-attachments.md +5 -1
- package/systems/fs/context/authoring/parts/settings-attachments.reference.md +4 -0
- package/systems/fs/context/authoring/parts/start.md +5 -1
- package/systems/fs/context/authoring/parts/state-forms.md +5 -1
- package/systems/fs/context/authoring/parts/state-forms.reference.md +4 -0
- package/systems/fs/context/authoring/parts/store/ctx-store.md +49 -0
- package/systems/fs/context/authoring/parts/store/declare.md +32 -0
- package/systems/fs/context/authoring/parts/store/engines.md +25 -0
- package/systems/fs/context/authoring/parts/store/migrations.md +53 -0
- package/systems/fs/context/authoring/parts/store/moves.md +38 -0
- package/systems/fs/context/authoring/parts/store/placement.md +25 -0
- package/systems/fs/context/authoring/parts/store/serve.md +30 -0
- package/systems/fs/context/authoring/parts/store/store-tables.md +24 -0
- package/systems/fs/context/authoring/parts/store/vectors.md +32 -0
- package/systems/fs/context/authoring/parts/store/when-to-use.md +27 -0
- package/systems/fs/context/authoring/parts/store/work.md +37 -0
- package/systems/fs/context/authoring/parts/store.md +65 -0
- package/systems/fs/context/authoring/parts/store.reference.md +459 -0
- package/systems/fs/context/authoring/parts/testing.md +14 -1
- package/systems/fs/context/authoring/parts/testing.reference/{memoryjournal.md → equal.md} +57 -50
- package/systems/fs/context/authoring/parts/testing.reference/fakehub.md +27 -46
- package/systems/fs/context/authoring/parts/testing.reference/{toolcall.md → kindprops.md} +128 -9
- package/systems/fs/context/authoring/parts/testing.reference/storeconnection.md +93 -0
- package/systems/fs/context/authoring/parts/testing.reference.md +16 -9
- package/systems/fs/context/authoring/parts/widgets.md +36 -22
- package/systems/fs/context/authoring/parts/widgets.reference.md +506 -8
- package/systems/fs/context/authoring/topics/begin.md +4 -0
- package/systems/fs/context/authoring/topics/client.md +4 -0
- package/systems/fs/context/authoring/topics/declare.md +4 -0
- package/systems/fs/context/authoring/topics/examples.md +4 -0
- package/systems/fs/context/authoring/topics/fns.md +4 -0
- package/systems/fs/context/authoring/topics/server.md +4 -0
- package/systems/fs/context/authoring/topics/types.md +8 -1
- package/systems/fs/context/comments/answer.md +21 -0
- package/systems/fs/context/comments/find.md +23 -0
- package/systems/fs/context/comments/read.md +26 -0
- package/systems/fs/context/comments.md +23 -0
- package/systems/fs/context/files-page.md +30 -0
- package/systems/fs/context/guide/attachments.md +16 -0
- package/systems/fs/context/guide/change.md +23 -0
- package/systems/fs/context/guide/commands.md +19 -0
- package/systems/fs/context/guide/documents.md +21 -0
- package/systems/fs/context/guide/find.md +25 -0
- package/systems/fs/context/guide/paths.md +24 -0
- package/systems/fs/context/guide/read.md +21 -0
- package/systems/fs/context/machine/history.md +25 -0
- package/systems/fs/context/machine/now.md +25 -0
- package/systems/fs/context/machine/processes.md +20 -0
- package/systems/fs/context/machine/recording.md +19 -0
- package/systems/fs/context/machine.md +24 -0
- package/systems/fs/package.json +5 -3
- package/systems/fs/server/files-page/browse.ts +391 -0
- package/systems/fs/server/files-page/comments.ts +439 -0
- package/systems/fs/server/files-page/fns.ts +158 -0
- package/systems/fs/server/files-page/git-view.ts +391 -0
- package/systems/fs/server/files-page/kinds.ts +56 -0
- package/systems/fs/server/hosting.ts +10 -10
- package/systems/fs/server/impl.ts +66 -7
- package/systems/fs/server/main.ts +28 -12
- package/systems/fs/server/metrics/collector.ts +424 -0
- package/systems/fs/server/metrics/index.ts +181 -0
- package/systems/fs/server/metrics/os.ts +144 -0
- package/systems/fs/server/metrics/parsers.ts +268 -0
- package/systems/fs/server/metrics/rrd.ts +363 -0
- package/systems/fs/server/metrics/testing.ts +80 -0
- package/systems/fs/server/shell.ts +1 -1
- package/systems/fs/server/snapshots.ts +216 -33
- package/systems/fs/server/testing.ts +15 -9
- package/systems/fs/shared/files-page.ts +506 -0
- package/systems/fs/shared/index.ts +138 -11
- package/systems/fs/shared/metrics.ts +179 -0
- package/systems/fs/system.json +10 -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 +3 -2
- 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 -4
- package/systems/schedule/server/env.ts +1 -1
- package/systems/schedule/server/fns.ts +5 -4
- package/systems/schedule/server/impl.ts +2 -2
- package/systems/schedule/server/import.ts +189 -0
- package/systems/schedule/server/index.ts +2 -0
- package/systems/schedule/server/main.ts +9 -7
- package/systems/schedule/server/placements.ts +41 -0
- package/systems/schedule/server/store.ts +159 -79
- package/systems/schedule/server/timer.ts +142 -107
- package/systems/schedule/shared/index.ts +2 -1
- package/systems/schedule/system.json +5 -1
- package/systems/schedule/tsconfig.json +1 -1
- 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-sLjVTrmV.js +0 -2
- package/packages/web/dist/assets/ApiServiceForm-BrMTU-7u.js +0 -2
- package/packages/web/dist/assets/ApiServiceForm-BxprSaAq.css +0 -1
- package/packages/web/dist/assets/ApiServiceView-BMF2zD6Q.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-bjLAWO_j.js +0 -2
- package/packages/web/dist/assets/ChartVisual-BnFG9aFi.css +0 -1
- package/packages/web/dist/assets/ChartVisual-DWw7WsfN.js +0 -11
- package/packages/web/dist/assets/ChatPage-7Yebk7rl.js +0 -4
- package/packages/web/dist/assets/ConfigWithCustom-DreTUdf0.js +0 -3
- package/packages/web/dist/assets/ContextItemPage-B6rJG3OT.js +0 -2
- package/packages/web/dist/assets/ContextItemPage-BRsWxOmu.css +0 -1
- package/packages/web/dist/assets/ContextPage-CloIZ_2y.js +0 -2
- package/packages/web/dist/assets/ContextPage-rYKxjiVI.css +0 -1
- package/packages/web/dist/assets/ContextRow-Byz_7HG-.css +0 -1
- package/packages/web/dist/assets/ContextRow-Dvv8CTFk.js +0 -2
- package/packages/web/dist/assets/DataTypePage-Ba_zBV4b.js +0 -4
- package/packages/web/dist/assets/FnList-BCnb4kOB.css +0 -1
- package/packages/web/dist/assets/FnList-CjQRwYaT.js +0 -2
- package/packages/web/dist/assets/GraphPanel-Cy5-KGo1.js +0 -2
- package/packages/web/dist/assets/InjectedList-CJsEFEbz.js +0 -2
- package/packages/web/dist/assets/InstallDialog-C9GDoUI2.js +0 -2
- package/packages/web/dist/assets/InstanceTypes-D8Jcxn70.js +0 -2
- package/packages/web/dist/assets/InstanceTypes-DAowwLB7.css +0 -1
- package/packages/web/dist/assets/InstanceView-CuBD3JPU.css +0 -1
- package/packages/web/dist/assets/InstanceView-p7tMaylE.js +0 -2
- package/packages/web/dist/assets/LimitsView-DsZG6u5P.js +0 -2
- package/packages/web/dist/assets/ListSearch-BK4p7Nxa.js +0 -2
- package/packages/web/dist/assets/McpDialog-CA_0WKWF.js +0 -2
- package/packages/web/dist/assets/McpServerForm-CAG8Wp2N.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-CD8qw6W_.js +0 -2
- package/packages/web/dist/assets/McpServersView-DNycG35u.js +0 -2
- package/packages/web/dist/assets/ModelsView-C_iN19xt.js +0 -2
- package/packages/web/dist/assets/PairPage-Bs2KuRjC.css +0 -1
- package/packages/web/dist/assets/PairPage-TEXPpsqi.js +0 -2
- package/packages/web/dist/assets/PeopleView-D1QGPYp7.js +0 -2
- package/packages/web/dist/assets/PoliciesView-BU1fudNF.js +0 -2
- package/packages/web/dist/assets/RemoteAuthFields-Dm44vz2t.css +0 -1
- package/packages/web/dist/assets/RemoteAuthFields-nxGWfmhf.js +0 -2
- package/packages/web/dist/assets/ResourcesPage-YluNBqIv.js +0 -2
- package/packages/web/dist/assets/ResultGrid-CuUQyTjW.css +0 -1
- package/packages/web/dist/assets/ResultGrid-uoq4yUYj.js +0 -2
- package/packages/web/dist/assets/ReviewView-79Z5rU1v.js +0 -3
- package/packages/web/dist/assets/RunCard-CBSGdwdQ.js +0 -2
- package/packages/web/dist/assets/RunCard-CfyRaDLS.css +0 -1
- package/packages/web/dist/assets/RunsView-Dz9Xsvu5.js +0 -2
- package/packages/web/dist/assets/ServiceRows-6BU4-MeL.css +0 -1
- package/packages/web/dist/assets/ServiceRows-DNzDiutg.js +0 -2
- 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-DLNg2FYK.js +0 -2
- package/packages/web/dist/assets/SystemView-Es5wtkYU.js +0 -2
- package/packages/web/dist/assets/SystemsView-CeuSFhlF.js +0 -2
- package/packages/web/dist/assets/WidgetView-BZyDyYRI.js +0 -3
- package/packages/web/dist/assets/WidgetView-DQUDeFkB.css +0 -1
- package/packages/web/dist/assets/export-BwFkEtcm.js +0 -15
- package/packages/web/dist/assets/index-Bv42jNvr.js +0 -4
- package/packages/web/dist/assets/index-CSisx5mi.css +0 -1
- package/packages/web/dist/assets/problems-BZY0Dwif.js +0 -2
- package/packages/web/dist/assets/record-edits-CveFEsal.js +0 -2
- package/packages/web/dist/assets/remote-config-BkaarDf3.js +0 -2
- package/packages/web/dist/assets/routes-qP_j74V5.js +0 -4
- package/packages/web/dist/assets/runs-k76usGfd.js +0 -2
- package/packages/web/dist/assets/size-BwnshyOe.js +0 -2
- package/packages/web/dist/assets/src-DLK1P7oz.js +0 -43
- package/packages/web/dist/assets/state-CjE-qA2w.js +0 -2
- package/packages/web/dist/assets/ui-W12UYhVu.js +0 -17
- package/packages/web/dist/assets/widget-host-BCf6Tlt5.js +0 -2
- package/packages/web/dist/assets/widgets-CrbkovMT.js +0 -2
- package/systems/fs/context/authoring/parts/client.reference/fnpillprops.md +0 -141
- package/systems/fs/context/authoring/parts/core-types/remote-auth-ts.md +0 -60
- package/systems/fs/context/authoring/parts/core-types/widgets-ts.md +0 -299
- package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-371-533.md +0 -183
- package/systems/fs/context/authoring/parts/hub/hub-auto-pair-revoke.md +0 -189
- package/systems/fs/context/authoring/parts/widgets.reference/hub-visuals.md +0 -623
- package/systems/fs/context/authoring/parts/widgets.reference/sourcecompatible.md +0 -150
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { DeclaredLink } from './context-graph.ts';
|
|
8
8
|
import { GinTypeDef } from './gin.ts';
|
|
9
|
-
import { ADMIN_TAG, ActorKind, Audience, LocalName, Duration, FnKindName, InstanceName, Json, QualifiedName, SessionId, SystemName, TurnId } from './primitives.ts';
|
|
9
|
+
import { ADMIN_TAG, ActorKind, Audience, LocalName, Duration, FnKindName, InstanceName, Json, QualifiedName, SessionId, SystemName, Timestamp, TurnId } from './primitives.ts';
|
|
10
10
|
import { SectionMatch, Link } from './resources.ts';
|
|
11
11
|
import { Display, FnLimits, Operations, ProgressDecl, TimeInfo, UserInfo } from './run.ts';
|
|
12
12
|
import { StatusTemplates } from './status.ts';
|
|
@@ -23,8 +23,10 @@ import { RecordStorage } from './data.ts';
|
|
|
23
23
|
import { ApiGroupDecl } from './api-index.ts';
|
|
24
24
|
import { ChatModeType } from './modes.ts';
|
|
25
25
|
import { ModelRole } from './model-calls.ts';
|
|
26
|
+
import { StoreDecl } from './stores.ts';
|
|
26
27
|
import { ClaimTemplate } from './claims.ts';
|
|
27
28
|
import { InjectDecl } from './inject.ts';
|
|
29
|
+
import { ContextAskedBy } from './context-questions.ts';
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
/** How values of a named type are shown: in mention chips, hover cards and inputs. */
|
|
@@ -236,7 +238,7 @@ export function nicheOf(decl: { readonly niche?: Niche | undefined; readonly tag
|
|
|
236
238
|
* name that must exist), worked out by its system after the args parse and before the policies decide the run.
|
|
237
239
|
* `deps` are the fns the check may call, each one of the fn's own deps whose mode is `read`; the hub refuses any other
|
|
238
240
|
* call it makes, and any call that would wait for approval. A check that can't finish (its system gone, the
|
|
239
|
-
* `
|
|
241
|
+
* `FNLOOM_ARGS_CHECK_TIMEOUT` deadline) leaves the run to go on as if it had none.
|
|
240
242
|
*/
|
|
241
243
|
export const FnArgsCheck = z.object({ deps: z.array(QualifiedName) });
|
|
242
244
|
export type FnArgsCheck = z.infer<typeof FnArgsCheck>;
|
|
@@ -293,7 +295,7 @@ export const FnDecl = z.object({
|
|
|
293
295
|
effects: FnEffects.optional(),
|
|
294
296
|
/**
|
|
295
297
|
* How many of its examples go into the model's prompt with it, the most relevant to the turn first (the
|
|
296
|
-
* hub's `
|
|
298
|
+
* hub's `FNLOOM_FN_PROMPT_EXAMPLES` when absent). The rest are a `hub/fns_examples` call away.
|
|
297
299
|
*/
|
|
298
300
|
promptExamples: z.number().int().min(0).max(20).optional(),
|
|
299
301
|
/** Build 8: the API group it is listed in (`Manifest.groups`, `api-index.ts`); `general` when absent. */
|
|
@@ -370,6 +372,21 @@ export const ContextDecl = z.object({
|
|
|
370
372
|
choices: z.array(ContextChoice).optional(),
|
|
371
373
|
/** Weighted links to other context, fns, types and resources. */
|
|
372
374
|
links: z.array(DeclaredLink).optional(),
|
|
375
|
+
/**
|
|
376
|
+
* The item as one question it answers ("How do I write a system's fns?"), so people and models find it by asking.
|
|
377
|
+
* Its semantic search compares with the question. For hub items the metadata model writes it when it is absent.
|
|
378
|
+
*/
|
|
379
|
+
question: z.string().min(1).max(500).optional(),
|
|
380
|
+
/** When it is the right thing to read, written for a model ("When the person asks to change how a fn retries."). */
|
|
381
|
+
when: z.string().min(1).max(500).optional(),
|
|
382
|
+
/** When its text last changed at its source (ms since the epoch); the hub uses when it first saw this version when absent. */
|
|
383
|
+
lastModified: Timestamp.optional(),
|
|
384
|
+
/**
|
|
385
|
+
* Who would ask its question: `person` (about their own life, work or choices), `system` (how a piece of software or
|
|
386
|
+
* the harness works or should be used: a system's guides are this) or `research` (a fact that could be looked up).
|
|
387
|
+
* The metadata model fills it for hub items when it is absent.
|
|
388
|
+
*/
|
|
389
|
+
askedBy: ContextAskedBy.optional(),
|
|
373
390
|
});
|
|
374
391
|
export type ContextDecl = z.infer<typeof ContextDecl>;
|
|
375
392
|
|
|
@@ -499,6 +516,8 @@ export const Manifest = z.object({
|
|
|
499
516
|
pages: SystemPages.optional(),
|
|
500
517
|
/** Build 8: its API groups, each described once (`FnDecl.group`). */
|
|
501
518
|
groups: z.array(ApiGroupDecl).optional(),
|
|
519
|
+
/** Its own SQL store (`store()` in the contract); where it lives is the admin's choice at install (`stores.ts`). */
|
|
520
|
+
store: StoreDecl.optional(),
|
|
502
521
|
});
|
|
503
522
|
export type Manifest = z.infer<typeof Manifest>;
|
|
504
523
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Resource search for an `@` mention (build 8). When the hub asks a system for mention options (`mentions` on the
|
|
3
3
|
* system link), it mints a `MentionRequestId` tied to the asking person and session, valid for
|
|
4
|
-
* `
|
|
4
|
+
* `FNLOOM_MENTION_REQUEST_TTL`. The system may then search the hub's resources for that request
|
|
5
5
|
* (`mentionResources` on the hub link), and the hub runs the search as that person: a system can only search for the
|
|
6
6
|
* person it was asked about, and only while the request is fresh. This replaces the web system's in-memory recent pages.
|
|
7
7
|
*/
|
|
@@ -150,8 +150,12 @@ export type ModelForwardResult = z.infer<typeof ModelForwardResult>;
|
|
|
150
150
|
* `transcribe`: audio resources and recordings. `dictate`: the composer's voice input. `speak`: reading answers aloud.
|
|
151
151
|
* `describe`: describing images. `ocr`: reading the text in images and scanned pages. `decide`: a decision model
|
|
152
152
|
* (aeye's `ai.decide`) for typed answers: suggestions when set to it, `ctx_crawl`'s links, and systems' `decide`.
|
|
153
|
+
* `metadata`: fills context items' metadata (their question, when they apply, who asked) and splits an item that
|
|
154
|
+
* answers several questions; without a model of its own (a setting, or `FNLOOM_METADATA_MODEL`) it uses the decide
|
|
155
|
+
* role's model when that model can chat, else the chat role's. `plan`: `hub/ctx_plan`'s model, which lists the
|
|
156
|
+
* questions a plan needs answered and the options for each; it has no default.
|
|
153
157
|
*/
|
|
154
|
-
export const MODEL_ROLES = ['chat', 'transcribe', 'dictate', 'speak', 'describe', 'ocr', 'decide'] as const;
|
|
158
|
+
export const MODEL_ROLES = ['chat', 'transcribe', 'dictate', 'speak', 'describe', 'ocr', 'decide', 'metadata', 'plan'] as const;
|
|
155
159
|
export const ModelRole = z.enum(MODEL_ROLES);
|
|
156
160
|
export type ModelRole = z.infer<typeof ModelRole>;
|
|
157
161
|
|
|
@@ -160,7 +164,7 @@ export type ModelRole = z.infer<typeof ModelRole>;
|
|
|
160
164
|
* aeye's `ModelCapability` at compile time; the admin's role editor offers the able models first.
|
|
161
165
|
*/
|
|
162
166
|
export const ROLE_CAPABILITY = {
|
|
163
|
-
chat: 'chat', transcribe: 'hearing', dictate: 'hearing', speak: 'audio', describe: 'vision', ocr: 'vision', decide: 'decision',
|
|
167
|
+
chat: 'chat', transcribe: 'hearing', dictate: 'hearing', speak: 'audio', describe: 'vision', ocr: 'vision', decide: 'decision', metadata: 'chat', plan: 'chat',
|
|
164
168
|
} as const satisfies Record<ModelRole, string>;
|
|
165
169
|
|
|
166
170
|
/** A model for a role, optionally pinned to one configured provider (when several serve the same model). */
|
|
@@ -219,5 +223,10 @@ export const ModelRoleView = z.object({
|
|
|
219
223
|
from: z.enum(['setting', 'env', 'none']),
|
|
220
224
|
/** What the choice resolves to now; absent without a choice, or for dictation in the browser (no model). */
|
|
221
225
|
resolved: RoleResolution.optional(),
|
|
226
|
+
/**
|
|
227
|
+
* When the role has no model of its own and borrows another role's (only `metadata` does: the decide role's model
|
|
228
|
+
* when that model can chat, else the chat role's): the role it borrows from, and why, in words for the roles page.
|
|
229
|
+
*/
|
|
230
|
+
fallback: z.object({ role: ModelRole, reason: z.string() }).optional(),
|
|
222
231
|
});
|
|
223
232
|
export type ModelRoleView = z.infer<typeof ModelRoleView>;
|
|
@@ -11,6 +11,7 @@ import { GinTypeDef } from './gin.ts';
|
|
|
11
11
|
import { ActorId, ApprovalId, InstanceName, InstanceRef, Json, PairingId, QualifiedName, SystemName, Timestamp } from './primitives.ts';
|
|
12
12
|
import { CONTENT_HASH } from './resources.ts';
|
|
13
13
|
import { InstalledSystem, InstanceConfig, InstanceMode, SystemStatus } from './records/systems.ts';
|
|
14
|
+
import { InstanceStore, StoreDecl, StorePlacementInput } from './stores.ts';
|
|
14
15
|
|
|
15
16
|
/** The package format this hub reads. */
|
|
16
17
|
export const PACKAGE_FORMAT = 1;
|
|
@@ -122,6 +123,11 @@ export const InstanceRecord = z.object({
|
|
|
122
123
|
address: z.string().optional(),
|
|
123
124
|
/** Build 9: how people connect to it, for an instance-scoped `connect` system (`instanceConnect` on the hub link). */
|
|
124
125
|
connect: InstanceConnect.optional(),
|
|
126
|
+
/**
|
|
127
|
+
* Where its store lives and the last status it reported, for a system whose contract declares one (`stores.ts`).
|
|
128
|
+
* Absent until the admin chose a placement or the system first reported on its store: it is with the system then.
|
|
129
|
+
*/
|
|
130
|
+
store: InstanceStore.optional(),
|
|
125
131
|
});
|
|
126
132
|
export type InstanceRecord = z.infer<typeof InstanceRecord>;
|
|
127
133
|
|
|
@@ -152,6 +158,8 @@ export const PairingInfo = z.object({
|
|
|
152
158
|
configType: GinTypeDef.optional(),
|
|
153
159
|
/** Its config's secret fields, which the pairing page asks for as passwords and the hub seals. */
|
|
154
160
|
configSecrets: ConfigSecrets.optional(),
|
|
161
|
+
/** Its own SQL store, as its contract declares it: the pairing page asks where it should live. */
|
|
162
|
+
store: StoreDecl.optional(),
|
|
155
163
|
});
|
|
156
164
|
export type PairingInfo = z.infer<typeof PairingInfo>;
|
|
157
165
|
|
|
@@ -181,7 +189,7 @@ export function dataExportFileName(ref: InstanceRef): string {
|
|
|
181
189
|
|
|
182
190
|
/**
|
|
183
191
|
* Build 9: add an instance to a fleet from the browser (`addInstance`, admins): an MCP server, an API service, a
|
|
184
|
-
* Claude machine on the hub's host. The hub installs the system's bundled folder (`
|
|
192
|
+
* Claude machine on the hub's host. The hub installs the system's bundled folder (`FNLOOM_BUNDLED_SYSTEMS`, or the
|
|
185
193
|
* source of an instance it already installed) as a new instance with this config, pairs it and starts it. Only a
|
|
186
194
|
* system whose `system.json` says `instances: "many"` takes one.
|
|
187
195
|
*/
|
|
@@ -191,5 +199,7 @@ export const AddInstance = z.object({
|
|
|
191
199
|
description: z.string().optional(),
|
|
192
200
|
/** Its config, checked against the system's config type (secret fields sealed). */
|
|
193
201
|
config: Json,
|
|
202
|
+
/** Where its store lives, for a system that keeps one (`stores.ts`): with the system unless given. */
|
|
203
|
+
store: StorePlacementInput.optional(),
|
|
194
204
|
});
|
|
195
205
|
export type AddInstance = z.infer<typeof AddInstance>;
|
|
@@ -10,5 +10,5 @@ export const Port = z.number().int().min(1).max(65535);
|
|
|
10
10
|
/** Where each process listens by default: the hub (which also serves the built web app), Vite's dev server, the mock hub. */
|
|
11
11
|
export const DEFAULT_PORTS = { hub: 4300, web: 4310, mockHub: 4320 } as const satisfies Record<string, z.output<typeof Port>>;
|
|
12
12
|
|
|
13
|
-
/** The hub's port as an `@ayepi/env` field. Every slice that reads `
|
|
14
|
-
export const HUB_PORT = {
|
|
13
|
+
/** The hub's port as an `@ayepi/env` field. Every slice that reads `FNLOOM_PORT` spreads this. */
|
|
14
|
+
export const HUB_PORT = { FNLOOM_PORT: Port.default(DEFAULT_PORTS.hub) } as const;
|
|
@@ -9,6 +9,7 @@ import { z } from 'zod';
|
|
|
9
9
|
import { PageRequest, page } from './primitives.ts';
|
|
10
10
|
import { RUN_STATUSES } from './run.ts';
|
|
11
11
|
import { CONTEXT_ORIGIN_TYPES } from './context-graph.ts';
|
|
12
|
+
import { CONTEXT_ASKERS, CONTEXT_STATUSES } from './context-questions.ts';
|
|
12
13
|
import { RESOURCE_SOURCES, FORMAT_FAMILIES } from './resource-forms.ts';
|
|
13
14
|
import { MODALITIES, ModelCallStatus } from './model-calls.ts';
|
|
14
15
|
import { LlmStatus } from './records/runs.ts';
|
|
@@ -161,8 +162,8 @@ export const LIST_FIELDS = {
|
|
|
161
162
|
},
|
|
162
163
|
contexts: {
|
|
163
164
|
fields: {
|
|
164
|
-
name: text('Name'), system: dynamic('System'), origin: choice('Origin', CONTEXT_ORIGIN_TYPES), tags: dynamic('Tag'),
|
|
165
|
-
stale: flag('Stale'), tokens: num('Tokens', 'tokens'), updatedAt: date('Updated'),
|
|
165
|
+
name: text('Name'), system: dynamic('System'), origin: choice('Origin', CONTEXT_ORIGIN_TYPES), tags: dynamic('Tag'), status: choice('Status', CONTEXT_STATUSES),
|
|
166
|
+
askedBy: choice('Asked by', CONTEXT_ASKERS), stale: flag('Stale'), tokens: num('Tokens', 'tokens'), lastModified: date('Last modified'), updatedAt: date('Updated'),
|
|
166
167
|
},
|
|
167
168
|
defaultSort: [{ field: 'updatedAt', dir: 'desc' }],
|
|
168
169
|
},
|
|
@@ -253,7 +254,7 @@ export type QueryFnArgs = z.infer<typeof QueryFnArgs>;
|
|
|
253
254
|
|
|
254
255
|
/**
|
|
255
256
|
* What `hub/query` returns: the rows as JSON (each list's record), the sort applied, the next page's cursor, how many
|
|
256
|
-
* matched, and `partial` when the hub stopped reading at its scan bound (`
|
|
257
|
+
* matched, and `partial` when the hub stopped reading at its scan bound (`FNLOOM_QUERY_SCAN`): more rows may match,
|
|
257
258
|
* `total` is a lower bound, and a narrower filter (a date range, a system) gives the full answer.
|
|
258
259
|
*/
|
|
259
260
|
export const QueryFnResult = page(z.json()).extend({
|
|
@@ -120,7 +120,7 @@ export const INPUT_ANSWER_TAG = 'input-answer';
|
|
|
120
120
|
* suggestions. Undoing the turn takes the fns out of the tools again.
|
|
121
121
|
*
|
|
122
122
|
* `by: 'recall'` is the hub's own memory recall (iteration 4, `chat/enrich.ts`): the person's memories whose meaning is
|
|
123
|
-
* closest to the message, at or over `
|
|
123
|
+
* closest to the message, at or over `FNLOOM_RECALL_THRESHOLD`, brought in as their text (no fns), each once a chat,
|
|
124
124
|
* whatever picks suggestions. A memory is not otherwise in front of the model in a new chat.
|
|
125
125
|
*/
|
|
126
126
|
export const LoadedForYouPart = z.object({
|
|
@@ -45,8 +45,14 @@ export type SectionDiff = z.infer<typeof SectionDiff>;
|
|
|
45
45
|
* indexed text and says which section matched. An `image` is a picture: an image resource (keyed by its URI) or one a
|
|
46
46
|
* context item shows (`<context name>#image:<hash>`, its `parent` the item). Its vector is in the image vector space,
|
|
47
47
|
* and it is indexed only while one is set up (`IndexEntry.image` says where its picture is).
|
|
48
|
+
*
|
|
49
|
+
* A context item has two vectors: its `context` row's is its `embedding` (of its question, or of its content when it
|
|
50
|
+
* has no question; `IndexEntry.embedText`), and its `contextContent` row's is its `contentEmbedding` (always of its
|
|
51
|
+
* content). A `contextContent` row is never in the full-text index (the `context` row's text covers the question, the
|
|
52
|
+
* `when` and the content); it is a part of its item (`parent`), searched by meaning when a search asks for
|
|
53
|
+
* `semanticOver: 'content'`, and found as its item.
|
|
48
54
|
*/
|
|
49
|
-
export const INDEXED_KINDS = ['fn', 'context', 'section', 'message', 'type', 'example', 'record', 'contextSection', 'image'] as const;
|
|
55
|
+
export const INDEXED_KINDS = ['fn', 'context', 'section', 'message', 'type', 'example', 'record', 'contextSection', 'image', 'contextContent'] as const;
|
|
50
56
|
export const IndexedKind = z.enum(INDEXED_KINDS);
|
|
51
57
|
export type IndexedKind = z.infer<typeof IndexedKind>;
|
|
52
58
|
|
|
@@ -56,7 +62,9 @@ export const IndexEntry = z.object({
|
|
|
56
62
|
key: z.string(),
|
|
57
63
|
system: SystemName.optional(),
|
|
58
64
|
text: z.string(),
|
|
59
|
-
/**
|
|
65
|
+
/** What is embedded when it isn't `text` (a context item's question): words find `text`, meaning compares this. */
|
|
66
|
+
embedText: z.string().optional(),
|
|
67
|
+
/** Hash of `text` (and `embedText`), so unchanged items are not embedded again. */
|
|
60
68
|
hash: z.string(),
|
|
61
69
|
/** The `hash` of the text whose vector is stored; absent (or older) while the item waits for an embedder. */
|
|
62
70
|
vectorHash: z.string().optional(),
|
|
@@ -48,6 +48,11 @@ export const Run = z.object({
|
|
|
48
48
|
/** An admin's test call of an installed system or an item waiting for review; the calls it makes are tests too. */
|
|
49
49
|
test: z.boolean().optional(),
|
|
50
50
|
status: RunStatus,
|
|
51
|
+
/**
|
|
52
|
+
* It was made while its system wasn't connected (the hub restarting, the system coming back): it waits queued, and its
|
|
53
|
+
* approval is asked only once the system connects (`FNLOOM_RUN_SYSTEM_WAIT`). False once it went ahead.
|
|
54
|
+
*/
|
|
55
|
+
awaitingSystem: z.boolean().optional(),
|
|
51
56
|
/** What it says it is doing, resolved from its fn's status templates when it last changed phase. */
|
|
52
57
|
text: RunText.optional(),
|
|
53
58
|
outcome: OutcomeWire.optional(),
|
|
@@ -71,6 +76,13 @@ export const Run = z.object({
|
|
|
71
76
|
approvedAt: Timestamp.optional(),
|
|
72
77
|
startedAt: Timestamp.optional(),
|
|
73
78
|
endedAt: Timestamp.optional(),
|
|
79
|
+
/**
|
|
80
|
+
* Its saved result was changed after it finished (`RunService.updateResult`): how many times, when last, and by whom.
|
|
81
|
+
* Only the system that owns the run's fn changes it (the hub for its own fns), with a value its result type accepts.
|
|
82
|
+
*/
|
|
83
|
+
resultRevision: z.number().int().min(1).optional(),
|
|
84
|
+
resultUpdatedAt: Timestamp.optional(),
|
|
85
|
+
resultUpdatedBy: ActorId.optional(),
|
|
74
86
|
});
|
|
75
87
|
export type Run = z.infer<typeof Run>;
|
|
76
88
|
|
|
@@ -18,6 +18,10 @@ export const OLLAMA_BASE_URL = 'http://127.0.0.1:11434';
|
|
|
18
18
|
export function providerVariants<S extends z.ZodType<string>>(secret: S) {
|
|
19
19
|
return z.discriminatedUnion('provider', [
|
|
20
20
|
z.object({ provider: z.literal('openai'), apiKey: secret, baseURL: z.url().optional() }),
|
|
21
|
+
/** Anthropic's Messages API (`@aeye/anthropic`): Claude with an Anthropic API key. */
|
|
22
|
+
z.object({ provider: z.literal('anthropic'), apiKey: secret }),
|
|
23
|
+
/** Google's Gemini API (`@aeye/google`): Gemini with a Google AI Studio API key. */
|
|
24
|
+
z.object({ provider: z.literal('google'), apiKey: secret }),
|
|
21
25
|
z.object({ provider: z.literal('openrouter'), apiKey: secret }),
|
|
22
26
|
/**
|
|
23
27
|
* A local Ollama, no key: chat through its OpenAI-compatible `/v1`, limits and abilities read from `/api/show`.
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ContextDecl, FnDecl, KindDecl, Manifest, TypeDecl } from '../manifest.ts';
|
|
4
4
|
import { ContextOrigin, ContextTokens } from '../context-graph.ts';
|
|
5
|
+
import { ContextAskedBy, ContextFlag, ContextMetadata, ContextSplit, ContextStatus, ContextStatusChange, liveStatus, STATUS_HISTORY_MAX } from '../context-questions.ts';
|
|
5
6
|
import { GinTypeDef } from '../gin.ts';
|
|
6
7
|
import { ActorId, Duration, InstanceName, InstanceRef, Json, PairingId, PairingTokenId, QualifiedName, RunId, SystemName, Timestamp } from '../primitives.ts';
|
|
7
8
|
import { CONTENT_HASH } from '../resources.ts';
|
|
8
9
|
import { FnMetrics, noOutcomes, OutcomeCounts } from '../metrics.ts';
|
|
9
10
|
import { AutoPairChoice } from '../auto-pair.ts';
|
|
10
11
|
import { ConfigSecrets } from '../config-secrets.ts';
|
|
12
|
+
import { StoreDecl } from '../stores.ts';
|
|
11
13
|
import { SystemStage } from '../grants.ts';
|
|
12
14
|
import { Availability } from '../fn-block.ts';
|
|
13
15
|
|
|
@@ -150,6 +152,8 @@ export const PairingRequest = z.object({
|
|
|
150
152
|
configType: GinTypeDef.optional(),
|
|
151
153
|
/** Its config's secret fields (`PairingInfo.configSecrets`), sealed when the admin picks a config at approval. */
|
|
152
154
|
configSecrets: ConfigSecrets.optional(),
|
|
155
|
+
/** Its own SQL store (`PairingInfo.store`), so the pairing page asks where it should live. */
|
|
156
|
+
store: StoreDecl.optional(),
|
|
153
157
|
status: z.enum(['pending', 'approved', 'rejected', 'expired']),
|
|
154
158
|
createdAt: Timestamp,
|
|
155
159
|
expiresAt: Timestamp,
|
|
@@ -280,19 +284,97 @@ export const ContextRecord = z.object({
|
|
|
280
284
|
decl: StoredContextDecl,
|
|
281
285
|
/** Estimated tokens of the full content and of the summary; absent until the contextor sizes it. */
|
|
282
286
|
tokens: ContextTokens.optional(),
|
|
283
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* Whether it is in use (`ContextStatus`, `context-questions.ts`): `active`, `hidden` (switched off by a person;
|
|
289
|
+
* `hub/forget` hides a memory), `not_applicable`, `pending_approval`, `pending_removal` or `pending_plan`. Rows
|
|
290
|
+
* stored before statuses read as `active`; the store migration turns the old `disabled` into `hidden`.
|
|
291
|
+
*/
|
|
292
|
+
status: ContextStatus.default('active'),
|
|
293
|
+
/** Why it has its status, in a sentence a person reads ("You chose Postgres for 'Which database?'"). */
|
|
294
|
+
statusReason: z.string().optional(),
|
|
295
|
+
/** Every change of its status, oldest first, at most `STATUS_HISTORY_MAX`. */
|
|
296
|
+
statusHistory: z.array(ContextStatusChange).optional(),
|
|
297
|
+
/** @deprecated Replaced by `status: 'hidden'`; read only by the store migration (`context-status.ts`), which removes it. */
|
|
284
298
|
disabled: z.boolean().optional(),
|
|
285
|
-
/** Its system's context is switched off (`SystemEnabled.context`); kept apart from `
|
|
299
|
+
/** Its system's context is switched off (`SystemEnabled.context`); kept apart from `status`, so switching the system back on restores each item's own status. */
|
|
286
300
|
systemOff: z.boolean().optional(),
|
|
301
|
+
/**
|
|
302
|
+
* When its text last changed: what its declaration says (`ContextDecl.lastModified`), else for a system's own
|
|
303
|
+
* context when the hub first saw its current version, for a resource's the resource's modified time, otherwise when
|
|
304
|
+
* it was written. Duplicates compare it: the older item is the one flagged.
|
|
305
|
+
*/
|
|
306
|
+
lastModified: Timestamp.optional(),
|
|
307
|
+
/** It may say the same as another item (`of`, the newer one), as the decision model judged; shown in Review. */
|
|
308
|
+
duplicate: ContextFlag.optional(),
|
|
309
|
+
/** Its answer may disagree with another item's answer to the same question; set on both, shown in Review. */
|
|
310
|
+
contradiction: ContextFlag.optional(),
|
|
311
|
+
/** Items a person said are not duplicates of this one, so the check never flags the pair again. */
|
|
312
|
+
notDuplicates: z.array(QualifiedName).optional(),
|
|
313
|
+
/** When the duplicate and contradiction check last ran on it, and the hash of the text it compared (a change checks again). */
|
|
314
|
+
checked: z.object({ contentHash: z.string(), at: Timestamp }).optional(),
|
|
315
|
+
/** Which model filled its metadata, from which content, and which fields. */
|
|
316
|
+
metadata: ContextMetadata.optional(),
|
|
317
|
+
/** Split out of an item that answered several questions (`from`), or split into these (`into`). */
|
|
318
|
+
split: ContextSplit.optional(),
|
|
319
|
+
/** After this its answer should be looked at again (ms since the epoch). */
|
|
320
|
+
validUntil: Timestamp.optional(),
|
|
321
|
+
/** Who asked the question it answers: a person, a system, or research. */
|
|
322
|
+
askedBy: ContextAskedBy.optional(),
|
|
287
323
|
/** References found in the text (`@fs/read`), added to what loading brings along. */
|
|
288
324
|
mentions: z.object({ context: z.array(QualifiedName), fns: z.array(QualifiedName) }),
|
|
289
325
|
/** A source section changed since this was written. */
|
|
290
326
|
stale: z.boolean(),
|
|
291
327
|
updatedAt: Timestamp,
|
|
328
|
+
/**
|
|
329
|
+
* Worked out from the rest of the row by the hub's store on every write, never set by hand, and never read back:
|
|
330
|
+
* whether the background job has metadata to fill, whether it has a duplicate check to run, and whether the item is
|
|
331
|
+
* in Review. They are columns so the job and Review find their items with an indexed query, not by reading every item.
|
|
332
|
+
*/
|
|
333
|
+
wantsMetadata: z.boolean().optional(),
|
|
334
|
+
wantsCheck: z.boolean().optional(),
|
|
335
|
+
inReview: z.boolean().optional(),
|
|
292
336
|
});
|
|
293
337
|
export type ContextRecord = z.infer<typeof ContextRecord>;
|
|
294
338
|
|
|
295
|
-
/**
|
|
296
|
-
|
|
297
|
-
|
|
339
|
+
/**
|
|
340
|
+
* Whether a context item is out of use: switched off with all its system's context (`systemOff`), or a status other
|
|
341
|
+
* than `active` and `pending_removal` (`LIVE_STATUSES`). Off items are never chosen for a model, searched by default or
|
|
342
|
+
* loaded; a `not_applicable` item with an answer can still be read by name or asked for (`modelSeesContext`).
|
|
343
|
+
*/
|
|
344
|
+
export function contextOff(record: Pick<ContextRecord, 'status' | 'systemOff'>): boolean {
|
|
345
|
+
return record.systemOff === true || !liveStatus(record.status);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/** Whether an item has an answer: text a model can read. A `pending_plan` question has none until it is answered. */
|
|
349
|
+
export function contextAnswered(record: Pick<ContextRecord, 'decl' | 'status'>): boolean {
|
|
350
|
+
return record.status !== 'pending_plan' && (record.decl.content ?? '').trim() !== '';
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Whether a model may see an item at all (by name, or when a search asks for not-applicable items): live ones, and a
|
|
355
|
+
* `not_applicable` one that has an answer. Never a hidden, pending-approval or pending-plan item, nor a not-applicable
|
|
356
|
+
* one with no answer.
|
|
357
|
+
*/
|
|
358
|
+
export function modelSeesContext(record: Pick<ContextRecord, 'status' | 'systemOff' | 'decl'>): boolean {
|
|
359
|
+
if (record.systemOff === true) return false;
|
|
360
|
+
return liveStatus(record.status) || (record.status === 'not_applicable' && contextAnswered(record));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/** When an item last changed: its `lastModified`, else when it was last written. */
|
|
364
|
+
export function lastModifiedOf(record: Pick<ContextRecord, 'lastModified' | 'updatedAt'>): number {
|
|
365
|
+
return record.lastModified ?? record.updatedAt;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* The record with its status set and the change kept in its history (`STATUS_HISTORY_MAX` at most). The reason is kept
|
|
370
|
+
* as `statusReason` (cleared when none is given); the same status again changes nothing.
|
|
371
|
+
*/
|
|
372
|
+
export function withStatus(record: ContextRecord, status: ContextStatus, change: { readonly by: ActorId; readonly reason?: string | undefined; readonly at: number }): ContextRecord {
|
|
373
|
+
if (record.status === status && change.reason === record.statusReason) return record;
|
|
374
|
+
const entry: ContextStatusChange = { status, from: record.status, by: change.by, at: change.at, ...(change.reason === undefined ? {} : { reason: change.reason }) };
|
|
375
|
+
const { statusReason: _reason, ...rest } = record;
|
|
376
|
+
return {
|
|
377
|
+
...rest, status, ...(change.reason === undefined ? {} : { statusReason: change.reason }),
|
|
378
|
+
statusHistory: [...(record.statusHistory ?? []), entry].slice(-STATUS_HISTORY_MAX),
|
|
379
|
+
};
|
|
298
380
|
}
|
|
@@ -50,14 +50,15 @@ export type VisualChannel = z.infer<typeof VisualChannel>;
|
|
|
50
50
|
* The closed list of conditions a visual's data must meet beyond its channels (widget pass), judged over the column
|
|
51
51
|
* facts (`columnFacts`), so the hub, an agent and the browser judge a fit alike without running a system's code:
|
|
52
52
|
*
|
|
53
|
-
* - `distinct`: the column bound to `channel` has at most `max` distinct values (a pie's slices)
|
|
53
|
+
* - `distinct`: the column bound to `channel` has at most `max` distinct values (a pie's slices), and at least `min`
|
|
54
|
+
* when given (a radar needs three axes).
|
|
54
55
|
* - `non-negative`: every value bound to `channel` is 0 or more (slices, funnels).
|
|
55
56
|
* - `bounded`: the value bound to `channel` has a known range (its type's min and max, or a bound `max` channel).
|
|
56
57
|
* - `distinct-columns`: the channels bind different columns (a sankey's source and target).
|
|
57
58
|
* - `links`: the values bound to `to` are values bound to `from` (a parent column naming rows: a tree).
|
|
58
59
|
*/
|
|
59
60
|
export const VisualRule = z.discriminatedUnion('rule', [
|
|
60
|
-
z.object({ rule: z.literal('distinct'), channel: LocalName, max: z.number().int().min(1) }),
|
|
61
|
+
z.object({ rule: z.literal('distinct'), channel: LocalName, max: z.number().int().min(1), min: z.number().int().min(1).optional() }),
|
|
61
62
|
z.object({ rule: z.literal('non-negative'), channel: LocalName }),
|
|
62
63
|
z.object({ rule: z.literal('bounded'), channel: LocalName }),
|
|
63
64
|
z.object({ rule: z.literal('distinct-columns'), channels: z.array(LocalName).min(2) }),
|
|
@@ -78,13 +79,18 @@ export type VisualSizeStrategy = z.infer<typeof VisualSizeStrategy>;
|
|
|
78
79
|
/**
|
|
79
80
|
* One style of a visual family, which the style picker offers (bar, stacked, 100%, horizontal): the same bindings,
|
|
80
81
|
* drawn another way. `whole` marks a style that states shares of the whole (100% bars), offered only for a whole
|
|
81
|
-
* result; `needs` names channels this style must have bound (a bubble's size).
|
|
82
|
+
* result; `needs` names channels this style must have bound (a bubble's size). `columns` bounds how many columns a
|
|
83
|
+
* channel binds for this style (a waterfall draws one measure and no series: `{ y: { max: 1 }, series: { max: 0 } }`;
|
|
84
|
+
* bars with a line need two measures: `{ y: { min: 2 } }`), and `rules` are rules judged only for this style (a radar
|
|
85
|
+
* needs three to sixteen categories). Ranking offers only the styles that pass (`styleProblems` in `visuals.ts`).
|
|
82
86
|
*/
|
|
83
87
|
export const VisualStyle = z.object({
|
|
84
88
|
name: LocalName,
|
|
85
89
|
label: z.string().min(1),
|
|
86
90
|
whole: z.literal(true).optional(),
|
|
87
91
|
needs: z.array(LocalName).optional(),
|
|
92
|
+
columns: z.record(LocalName, z.object({ min: z.number().int().min(0).optional(), max: z.number().int().min(0).optional() })).optional(),
|
|
93
|
+
rules: z.array(VisualRule).optional(),
|
|
88
94
|
});
|
|
89
95
|
export type VisualStyle = z.infer<typeof VisualStyle>;
|
|
90
96
|
|
package/packages/core/src/run.ts
CHANGED
|
@@ -261,6 +261,11 @@ export const RunUpdate = z.discriminatedUnion('type', [
|
|
|
261
261
|
z.object({ type: z.literal('cost'), cost: Usd, total: Usd }),
|
|
262
262
|
/** The run went to the background: whoever called it stopped waiting, and its result is posted when it settles. */
|
|
263
263
|
z.object({ type: z.literal('background') }),
|
|
264
|
+
/**
|
|
265
|
+
* The saved result of a finished run changed (`RunService.updateResult`: a plan answered, a choice made on its card):
|
|
266
|
+
* whoever shows it reads the run again. `revision` counts the changes since it finished.
|
|
267
|
+
*/
|
|
268
|
+
z.object({ type: z.literal('result'), revision: z.number().int().min(1) }),
|
|
264
269
|
]);
|
|
265
270
|
export type RunUpdate = z.infer<typeof RunUpdate>;
|
|
266
271
|
|
package/packages/core/src/sso.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - **Generic OIDC only.** A provider is an issuer (or its discovery URL), a client id and, for a confidential client,
|
|
5
5
|
* a secret. The relying party is `@ayepi/auth/oauth`'s `OidcClient`; nothing here knows any one provider.
|
|
6
|
-
* - **Env vars only.** Providers come from `
|
|
6
|
+
* - **Env vars only.** Providers come from `FNLOOM_SSO_PROVIDERS` (`IdentityProviderConfigs`, JSON). The admin page shows
|
|
7
7
|
* them read-only, with a check and a test sign-in.
|
|
8
8
|
* - **First sign-in is the admin's setting** (`SignInPolicy`): invite only, allowed email domains, or anyone.
|
|
9
9
|
* - **Linking** to an existing person is by email only when the provider says `email_verified` is true.
|
|
@@ -42,7 +42,7 @@ export function managesRole(map: SsoClaimMap): boolean {
|
|
|
42
42
|
return map.admin.length > 0 || map.member !== undefined;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/** One OpenID provider, as `
|
|
45
|
+
/** One OpenID provider, as `FNLOOM_SSO_PROVIDERS` declares it. */
|
|
46
46
|
export const IdentityProviderConfig = z.object({
|
|
47
47
|
id: SsoProviderId,
|
|
48
48
|
/** What its button says: "Continue with <label>". */
|