fnloom 0.1.0 → 0.3.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 +133 -23
- package/package.json +13 -17
- package/packages/build/package.json +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +2 -1
- package/packages/cli/src/command.ts +2 -0
- package/packages/cli/src/commands/available.ts +63 -22
- package/packages/cli/src/commands/install.ts +182 -28
- package/packages/cli/src/commands/manage.ts +7 -5
- package/packages/cli/src/commands/store.ts +172 -0
- package/packages/cli/src/hub.ts +26 -7
- package/packages/cli/src/index.ts +3 -2
- package/packages/cli/src/io.ts +1 -0
- package/packages/cli/src/local.ts +6 -0
- package/packages/cli/src/premade.ts +80 -0
- package/packages/cli/src/testing.ts +2 -1
- package/packages/core/package.json +4 -4
- package/packages/core/src/context-files.ts +3 -1
- package/packages/core/src/context-graph.ts +4 -0
- package/packages/core/src/context-plan.ts +451 -0
- package/packages/core/src/context-questions.ts +305 -0
- package/packages/core/src/fn-facts.ts +32 -4
- package/packages/core/src/identity.ts +1 -1
- package/packages/core/src/index.ts +4 -1
- package/packages/core/src/link.ts +70 -0
- package/packages/core/src/manifest.ts +20 -1
- package/packages/core/src/model-calls.ts +11 -2
- package/packages/core/src/package.ts +10 -0
- package/packages/core/src/query.ts +3 -2
- package/packages/core/src/records/content.ts +10 -2
- package/packages/core/src/records/runs.ts +12 -0
- package/packages/core/src/records/systems.ts +87 -5
- package/packages/core/src/run.ts +5 -0
- package/packages/core/src/stores.ts +473 -0
- package/packages/core/src/suggestions.ts +3 -0
- package/packages/core/src/system-pages.ts +14 -1
- package/packages/core/src/web.ts +114 -9
- package/packages/hub/package.json +13 -12
- package/packages/hub/src/access/hits.ts +1 -1
- package/packages/hub/src/api/admin-ops.ts +36 -4
- package/packages/hub/src/api/auth.ts +8 -4
- package/packages/hub/src/api/person-ops.ts +6 -0
- package/packages/hub/src/api/store-ops.ts +54 -0
- package/packages/hub/src/api/testing/rig.ts +2 -2
- package/packages/hub/src/api/tls.ts +2 -2
- 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/index.ts +4 -0
- package/packages/hub/src/api/web/pages.ts +14 -1
- 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 +6 -1
- package/packages/hub/src/boot/hub-fns.ts +3 -3
- package/packages/hub/src/boot/hub-groups.ts +2 -2
- package/packages/hub/src/boot/identity.ts +1 -1
- package/packages/hub/src/boot/index.ts +9 -0
- package/packages/hub/src/boot/modules.ts +12 -3
- 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/start.ts +2 -1
- package/packages/hub/src/catalog/catalog.ts +44 -14
- package/packages/hub/src/catalog/index.ts +6 -2
- package/packages/hub/src/chat/testing.ts +2 -2
- package/packages/hub/src/contextor/brought.ts +5 -3
- package/packages/hub/src/contextor/testing.ts +4 -4
- package/packages/hub/src/execution/create.ts +2 -0
- package/packages/hub/src/execution/env.ts +2 -0
- package/packages/hub/src/execution/errors.ts +12 -0
- package/packages/hub/src/execution/executors.ts +14 -2
- package/packages/hub/src/execution/index.ts +8 -0
- package/packages/hub/src/execution/link-handlers.ts +16 -4
- package/packages/hub/src/execution/runs.ts +212 -11
- package/packages/hub/src/execution/testing.ts +2 -1
- package/packages/hub/src/fns/search.ts +23 -4
- package/packages/hub/src/graph/graph.ts +2 -2
- package/packages/hub/src/index/index.ts +9 -2
- package/packages/hub/src/index/indexer.ts +67 -16
- package/packages/hub/src/index/search.ts +1 -0
- package/packages/hub/src/index/suggester.ts +2 -2
- package/packages/hub/src/link/build.ts +47 -10
- 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 +10 -0
- 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 +11 -4
- package/packages/hub/src/link/packages.ts +17 -4
- package/packages/hub/src/link/pairing.ts +2 -2
- package/packages/hub/src/link/process.ts +15 -4
- package/packages/hub/src/link/rig.ts +6 -2
- 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/models/roles.ts +74 -7
- package/packages/hub/src/query/columns.ts +4 -1
- package/packages/hub/src/query/contexts.ts +10 -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 +58 -20
- package/packages/hub/src/resources/create.ts +16 -4
- package/packages/hub/src/resources/env.ts +4 -0
- package/packages/hub/src/resources/fns.ts +6 -2
- package/packages/hub/src/resources/index.ts +8 -2
- package/packages/hub/src/resources/testing.ts +18 -2
- 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/hybrid.ts +33 -6
- 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 +2 -1
- 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/sdk/AUTHORING.md +1813 -218
- package/packages/sdk/package.json +12 -8
- package/packages/sdk/src/build.ts +3 -0
- package/packages/sdk/src/client.ts +22 -0
- package/packages/sdk/src/ctx.ts +51 -17
- package/packages/sdk/src/declare.ts +36 -12
- package/packages/sdk/src/hub.ts +222 -10
- package/packages/sdk/src/impl.ts +3 -3
- package/packages/sdk/src/index.ts +6 -3
- package/packages/sdk/src/manifest.ts +5 -0
- package/packages/sdk/src/providers.ts +2 -2
- package/packages/sdk/src/server/asks.ts +12 -1
- package/packages/sdk/src/server/env.ts +13 -1
- package/packages/sdk/src/server/host.ts +81 -10
- package/packages/sdk/src/server/index.ts +21 -2
- package/packages/sdk/src/server/package.ts +11 -2
- package/packages/sdk/src/server/run.ts +6 -1
- package/packages/sdk/src/server/runtime.ts +78 -22
- 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/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/hub.ts +18 -5
- package/packages/web/dist/assets/{ActorSettingsView-BuMYRDqv.js → ActorSettingsView-v2k7v454.js} +2 -2
- package/packages/web/dist/assets/{AdminLayout-sLjVTrmV.js → AdminLayout-B6Jrc_4W.js} +2 -2
- package/packages/web/dist/assets/{ApiServiceForm-BrMTU-7u.js → ApiServiceForm-CuuQgOJc.js} +2 -2
- package/packages/web/dist/assets/{ApiServiceView-BMF2zD6Q.js → ApiServiceView-7bTHSO_Z.js} +2 -2
- package/packages/web/dist/assets/{ApiServicesView-bjLAWO_j.js → ApiServicesView-BXi24n49.js} +2 -2
- package/packages/web/dist/assets/{AppPage-DSzDKCFz.js → AppPage-CFmKZS8G.js} +2 -2
- package/packages/web/dist/assets/{AutoPairPicker-nV38ALjl.js → AutoPairPicker-C61gihmh.js} +2 -2
- package/packages/web/dist/assets/{BrowserFrame-Bic7U7jN.js → BrowserFrame-Sq9EmQRT.js} +2 -2
- package/packages/web/dist/assets/{ChartVisual-DWw7WsfN.js → ChartVisual-C4mgw4wh.js} +4 -4
- package/packages/web/dist/assets/ChatPage-CAhHE03Z.js +4 -0
- package/packages/web/dist/assets/{CodeViewer-xHS3Xah9.js → CodeViewer-tUNXZB77.js} +2 -2
- package/packages/web/dist/assets/{ConfigWithCustom-DreTUdf0.js → ConfigWithCustom-D_-rY66L.js} +3 -3
- package/packages/web/dist/assets/{ConfirmDialog-DjQUzNqk.js → ConfirmDialog-Dd3E4sJt.js} +2 -2
- package/packages/web/dist/assets/{ConnectPage-CfRDrXvJ.js → ConnectPage-CX9acyQH.js} +2 -2
- package/packages/web/dist/assets/ContextItemPage-Cv4G0k_o.css +1 -0
- package/packages/web/dist/assets/ContextItemPage-rUI3-T_L.js +2 -0
- package/packages/web/dist/assets/ContextPage-C8u0UnYl.css +1 -0
- package/packages/web/dist/assets/ContextPage-CtefzyKg.js +3 -0
- package/packages/web/dist/assets/ContextRow-Chx99Xac.css +1 -0
- package/packages/web/dist/assets/ContextRow-DrtPumZ5.js +2 -0
- package/packages/web/dist/assets/{DataPage-wSIoGcb5.js → DataPage-DDSsxHro.js} +2 -2
- package/packages/web/dist/assets/DataTypePage-BW9fWaz8.js +2 -0
- package/packages/web/dist/assets/{DesignPage-DidMUX8m.js → DesignPage-6e0XbOFC.js} +2 -2
- package/packages/web/dist/assets/{ExplorePage-MUyVydVB.js → ExplorePage-B7ND0W0l.js} +2 -2
- package/packages/web/dist/assets/{FnList-CjQRwYaT.js → FnList-Bx6H-kux.js} +2 -2
- package/packages/web/dist/assets/{FnPill-BshAvm2I.js → FnPill-Cp3KuLmP.js} +2 -2
- package/packages/web/dist/assets/FnView-C0XZdnsS.js +2 -0
- package/packages/web/dist/assets/{FnsView-CeqIoaBT.js → FnsView-GTH3p7a0.js} +2 -2
- package/packages/web/dist/assets/{GinExprView-DYVUwZrd.js → GinExprView-DGxns6lH.js} +2 -2
- package/packages/web/dist/assets/{GinForm-D3mwMRTQ.js → GinForm-BDBUzuDP.js} +2 -2
- package/packages/web/dist/assets/{GinTypeView-C0YifSmE.js → GinTypeView-CUsymbVf.js} +2 -2
- package/packages/web/dist/assets/{GinValueView-HfEPq9le.js → GinValueView-jsKIfiEA.js} +2 -2
- package/packages/web/dist/assets/{GraphPage-ySnuA4Hp.js → GraphPage-BCcPPsHu.js} +2 -2
- package/packages/web/dist/assets/{GraphPanel-Cy5-KGo1.js → GraphPanel-9tztGHmu.js} +2 -2
- package/packages/web/dist/assets/{HubPicker-C_vA752L.js → HubPicker-EoOErgmk.js} +2 -2
- package/packages/web/dist/assets/{InboxApprovals-DcPCCmZ5.js → InboxApprovals-Dkq7DFp_.js} +2 -2
- package/packages/web/dist/assets/{InboxPage-C2DT2nuF.js → InboxPage-CHhslePq.js} +2 -2
- package/packages/web/dist/assets/{InjectedList-CJsEFEbz.js → InjectedList-CSWqRiON.js} +2 -2
- package/packages/web/dist/assets/InstallDialog-D-VwfZYF.js +2 -0
- package/packages/web/dist/assets/{InstallDialog-yWLZK_zN.css → InstallDialog-K-j0sdHm.css} +1 -1
- package/packages/web/dist/assets/InstanceTypes-CwVSAULg.css +1 -0
- package/packages/web/dist/assets/InstanceTypes-D3rAEiE7.js +2 -0
- package/packages/web/dist/assets/InstanceView-DoH8C-1j.js +2 -0
- package/packages/web/dist/assets/InstanceView-_9uE70tS.css +1 -0
- package/packages/web/dist/assets/{ItemHistory-CUGa8b6s.js → ItemHistory-NQAP69ma.js} +2 -2
- package/packages/web/dist/assets/LimitsView-DY2C9nYS.js +2 -0
- package/packages/web/dist/assets/ListSearch-BunVrDO0.js +2 -0
- package/packages/web/dist/assets/{LlmCallDetails-2yQftCqd.js → LlmCallDetails-BoVNDTVs.js} +2 -2
- package/packages/web/dist/assets/{LlmCallsView-DOHX3r0K.js → LlmCallsView-BGpV92RC.js} +2 -2
- package/packages/web/dist/assets/{LoadState-DeXfLvYv.js → LoadState-h-K9bTYc.js} +2 -2
- package/packages/web/dist/assets/{McpDialog-CA_0WKWF.js → McpDialog-DhOCk6_E.js} +2 -2
- package/packages/web/dist/assets/{McpServerForm-CAG8Wp2N.js → McpServerForm-Cor3fI7s.js} +2 -2
- package/packages/web/dist/assets/McpServerView-ewXRPEmZ.js +2 -0
- package/packages/web/dist/assets/McpServersView-Dd0xmfws.js +2 -0
- package/packages/web/dist/assets/{McpView-CC2oNOMa.js → McpView-GPXdCMne.js} +2 -2
- package/packages/web/dist/assets/{McpsView-CwJvyyxV.js → McpsView-DJIR2JX5.js} +2 -2
- package/packages/web/dist/assets/{MemoryDialog-Dbvh5uLq.js → MemoryDialog-BTeIHQyA.js} +2 -2
- package/packages/web/dist/assets/{ModelCallsView-RvnW3EBP.js → ModelCallsView-DMcnwF2S.js} +2 -2
- package/packages/web/dist/assets/{ModelPicker-DcjwQFHC.js → ModelPicker-CgkMFxSO.js} +2 -2
- package/packages/web/dist/assets/ModelsView-cMHygeiK.js +2 -0
- package/packages/web/dist/assets/{NotFoundPage-CeSwzTV-.js → NotFoundPage-Tk92K7HN.js} +2 -2
- package/packages/web/dist/assets/PairPage-D0BK8CCw.js +2 -0
- package/packages/web/dist/assets/PairPage-D_aPS1Ot.css +1 -0
- package/packages/web/dist/assets/{PanelHost-BkrFAnPa.js → PanelHost-C-gKrxAk.js} +2 -2
- package/packages/web/dist/assets/{PeopleView-D1QGPYp7.js → PeopleView-DRfeNWK5.js} +2 -2
- package/packages/web/dist/assets/PoliciesView-BRi-QAuo.js +2 -0
- package/packages/web/dist/assets/{RefusalList-DQoyUoPG.js → RefusalList-DVO0bmeB.js} +2 -2
- package/packages/web/dist/assets/{RemoteAuthFields-nxGWfmhf.js → RemoteAuthFields-CgiufuqQ.js} +2 -2
- package/packages/web/dist/assets/{ResourceViewer-Po24y4pj.js → ResourceViewer-Do0chYxU.js} +2 -2
- package/packages/web/dist/assets/ResourcesPage-BBx2u2mw.js +2 -0
- package/packages/web/dist/assets/{ResultGrid-uoq4yUYj.js → ResultGrid-Bj-0I5HY.js} +2 -2
- package/packages/web/dist/assets/{ReviewSummaryStrip-k3HevESg.js → ReviewSummaryStrip-DO3p64Qj.js} +2 -2
- package/packages/web/dist/assets/ReviewView-DZF9E1hb.js +3 -0
- package/packages/web/dist/assets/{RuleRow-CoXDA-SH.js → RuleRow-DX9v4iGP.js} +2 -2
- package/packages/web/dist/assets/{RunCard-CBSGdwdQ.js → RunCard-BnrtK2Yp.js} +2 -2
- package/packages/web/dist/assets/{RunDetails-CGhQQ6OI.js → RunDetails-DjR206q6.js} +2 -2
- package/packages/web/dist/assets/{RunDot-Ch_45985.js → RunDot-lHRICdM5.js} +2 -2
- package/packages/web/dist/assets/{RunPage-C_t20pB7.js → RunPage-CbAQ_WPR.js} +2 -2
- package/packages/web/dist/assets/{RunProgress-VrZUHUEC.js → RunProgress-C3-B4tQf.js} +2 -2
- package/packages/web/dist/assets/RunsView-DMkPmkqX.js +2 -0
- package/packages/web/dist/assets/ServiceRows-4WythFpF.js +2 -0
- package/packages/web/dist/assets/{ServiceRows-6BU4-MeL.css → ServiceRows-HPQ0pN6b.css} +1 -1
- package/packages/web/dist/assets/SettingsPage-BN4oSzoL.js +3 -0
- package/packages/web/dist/assets/{SignInPage-DrXZ1sG2.js → SignInPage-ByqGEZfj.js} +2 -2
- package/packages/web/dist/assets/{StatusBadge-Dpb9uG5e.js → StatusBadge-CXne0sRZ.js} +2 -2
- package/packages/web/dist/assets/StorePlacementStep-B6SwTmdM.js +2 -0
- package/packages/web/dist/assets/StorePlacementStep-D_G4e3ue.css +1 -0
- package/packages/web/dist/assets/{SystemConfig-72qKRkUk.js → SystemConfig-vQDL_eUl.js} +2 -2
- package/packages/web/dist/assets/{SystemPageHost-DLNg2FYK.js → SystemPageHost-DrMrEPyh.js} +2 -2
- package/packages/web/dist/assets/SystemView-Be6TBM4j.js +2 -0
- package/packages/web/dist/assets/{SystemView-C8ScHUe2.css → SystemView-_9q6eDfV.css} +1 -1
- package/packages/web/dist/assets/{SystemsView-B6HEL9VS.css → SystemsView-CWKnupLW.css} +1 -1
- package/packages/web/dist/assets/SystemsView-DZtT3laz.js +2 -0
- package/packages/web/dist/assets/{TableViewer-BQ7bYLOP.js → TableViewer-Boxx86f5.js} +3 -3
- package/packages/web/dist/assets/{ThemePicker-C2nJ21Vd.js → ThemePicker-CIg_oRQX.js} +2 -2
- package/packages/web/dist/assets/{TurnTree-CORdfTHj.js → TurnTree-Ecm0yA5g.js} +2 -2
- package/packages/web/dist/assets/UserMessage-BlnqZDVU.js +9 -0
- package/packages/web/dist/assets/{ValueVisual-aXEUaQ5Y.js → ValueVisual-C-MWpp7c.js} +2 -2
- package/packages/web/dist/assets/WidgetView-DX4ejNb6.js +3 -0
- package/packages/web/dist/assets/actor-names-OdvpVZeb.js +4 -0
- package/packages/web/dist/assets/{fn-modal-DqcxUhOQ.js → fn-modal-B98MR7JN.js} +2 -2
- package/packages/web/dist/assets/{fn-notices-BYaH6IoA.js → fn-notices-CfTa1E8y.js} +2 -2
- package/packages/web/dist/assets/{formats-DI__ADVG.js → formats-JwoKfXIq.js} +2 -2
- package/packages/web/dist/assets/index-6ScWTFy2.js +4 -0
- package/packages/web/dist/assets/{index-CSisx5mi.css → index-CEslGcrX.css} +1 -1
- package/packages/web/dist/assets/{labels-BhJpmLWA.js → labels-BFbk11BE.js} +2 -2
- package/packages/web/dist/assets/{layout-DQKldU13.js → layout-D1gf481r.js} +2 -2
- package/packages/web/dist/assets/{metrics-Cio5ykX6.js → metrics-CBPX3W5Y.js} +2 -2
- package/packages/web/dist/assets/{problems-BZY0Dwif.js → problems-t1E_ovSz.js} +2 -2
- package/packages/web/dist/assets/{push-payload-D5efGCzd.js → push-payload-BeU1ADYt.js} +64 -64
- package/packages/web/dist/assets/{record-edits-CveFEsal.js → record-edits-Bfsi4lU3.js} +2 -2
- package/packages/web/dist/assets/{remote-config-BkaarDf3.js → remote-config-BNQhSDzB.js} +2 -2
- package/packages/web/dist/assets/{review-CGUGvRV9.js → review-fP-l9D6H.js} +3 -3
- package/packages/web/dist/assets/routes-DV4IJpwe.js +4 -0
- package/packages/web/dist/assets/runs-CveC2kKo.js +2 -0
- package/packages/web/dist/assets/{shared-DTpYDMc_.js → shared-LbaIHjbV.js} +2 -2
- package/packages/web/dist/assets/{size-BwnshyOe.js → size-Bh__w5aI.js} +2 -2
- package/packages/web/dist/assets/{sources-Bm-TrxhL.js → sources-VPrtgLIi.js} +2 -2
- package/packages/web/dist/assets/src-CT3TeFaM.js +43 -0
- package/packages/web/dist/assets/state-xfQqaQPX.js +2 -0
- package/packages/web/dist/assets/{systems-DIp94AET.js → systems-BqE3WTSF.js} +2 -2
- package/packages/web/dist/assets/ui-BzgWquIU.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-DKGcECT1.js} +2 -2
- package/packages/web/dist/assets/{widget-host-BCf6Tlt5.js → widget-host-B87MTaTn.js} +2 -2
- package/packages/web/dist/assets/{widgets-CrbkovMT.js → widgets-BBCuSS6E.js} +2 -2
- package/packages/web/dist/index.html +44 -44
- package/packages/web/dist/sw.js +1 -1
- package/packages/web/package.json +2 -2
- package/premade/claude.zip +0 -0
- package/premade/database.zip +0 -0
- package/premade/web.zip +0 -0
- package/scripts/dev-env.ts +4 -4
- package/scripts/run-stack.ts +3 -2
- package/scripts/stack.ts +115 -43
- package/scripts/start.ts +36 -17
- package/systems/api/package.json +3 -3
- package/systems/code/package.json +3 -3
- package/systems/embedder/package.json +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 +97 -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 +9 -1
- package/systems/fs/context/authoring/parts/client.reference/client.md +4 -0
- package/systems/fs/context/authoring/parts/client.reference/resultview.md +56 -53
- package/systems/fs/context/authoring/parts/client.reference/{fnpillprops.md → textareaprops.md} +58 -4
- package/systems/fs/context/authoring/parts/client.reference.md +8 -4
- package/systems/fs/context/authoring/parts/context/questions.md +49 -0
- package/systems/fs/context/authoring/parts/context.md +23 -1
- package/systems/fs/context/authoring/parts/context.reference.md +27 -3
- package/systems/fs/context/authoring/parts/contract.md +10 -0
- 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 +5 -1
- 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 +4 -0
- package/systems/fs/context/authoring/parts/core-types/context-files-ts.md +8 -0
- package/systems/fs/context/authoring/parts/core-types/context-graph-ts.md +5 -1
- package/systems/fs/context/authoring/parts/core-types/context-questions-ts.md +26 -0
- package/systems/fs/context/authoring/parts/core-types/contextdecl.md +9 -1
- 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 +18 -5
- 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 +15 -2
- package/systems/fs/context/authoring/parts/core-types/manifestpatch.md +9 -1
- 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 +4 -0
- 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 +4 -0
- package/systems/fs/context/authoring/parts/core-types/registries-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/remote-auth-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types/resources-ts.md +5 -1
- package/systems/fs/context/authoring/parts/core-types/run-ts.md +7 -0
- 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 +4 -0
- package/systems/fs/context/authoring/parts/core-types/system-providers-ts.md +4 -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 -0
- package/systems/fs/context/authoring/parts/core-types/widgets-ts.md +4 -0
- package/systems/fs/context/authoring/parts/core-types.md +12 -2
- 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 +4 -0
- 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 +5 -1
- 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 +4 -0
- 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} +51 -56
- 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 +9 -0
- package/systems/fs/context/authoring/parts/internals/manifestof.md +4 -0
- package/systems/fs/context/authoring/parts/internals/permissionargs.md +4 -0
- 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 +5 -1
- package/systems/fs/context/authoring/parts/kinds-agents.reference/authoringsession.md +4 -0
- package/systems/fs/context/authoring/parts/kinds-agents.reference/kind.md +7 -3
- 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 +5 -1
- package/systems/fs/context/authoring/parts/outcomes.reference.md +4 -0
- 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 +10 -3
- 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 +5 -1
- package/systems/fs/context/authoring/parts/remote.reference.md +4 -0
- 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 +5 -1
- package/systems/fs/context/authoring/parts/server.reference.md +41 -20
- 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} +55 -48
- package/systems/fs/context/authoring/parts/testing.reference/fakehub.md +26 -45
- package/systems/fs/context/authoring/parts/testing.reference/{toolcall.md → kindprops.md} +111 -4
- package/systems/fs/context/authoring/parts/testing.reference/openmemorystore.md +105 -0
- package/systems/fs/context/authoring/parts/testing.reference.md +16 -9
- package/systems/fs/context/authoring/parts/widgets.md +5 -1
- package/systems/fs/context/authoring/parts/widgets.reference/hub-visuals.md +4 -0
- package/systems/fs/context/authoring/parts/widgets.reference/sourcecompatible.md +4 -0
- package/systems/fs/context/authoring/parts/widgets.reference.md +4 -0
- 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/impl.ts +66 -7
- package/systems/fs/server/main.ts +20 -4
- 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/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 +137 -10
- 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/input/package.json +3 -3
- package/systems/mcp/package.json +3 -3
- package/systems/mcp/server/oauth.ts +1 -1
- package/systems/ollama/package.json +3 -3
- 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 +3 -1
- 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/package.json +1 -1
- package/systems/widgets/package.json +3 -3
- package/packages/web/dist/assets/ChatPage-7Yebk7rl.js +0 -4
- 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/FnView-B8MGAOoB.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/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/PoliciesView-BU1fudNF.js +0 -2
- package/packages/web/dist/assets/ResourcesPage-YluNBqIv.js +0 -2
- package/packages/web/dist/assets/ReviewView-79Z5rU1v.js +0 -3
- package/packages/web/dist/assets/RunsView-Dz9Xsvu5.js +0 -2
- package/packages/web/dist/assets/ServiceRows-DNzDiutg.js +0 -2
- package/packages/web/dist/assets/SettingsPage-CykfuYj1.js +0 -3
- 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/UserMessage-qyc8dG5D.js +0 -9
- package/packages/web/dist/assets/WidgetView-BZyDyYRI.js +0 -3
- package/packages/web/dist/assets/index-Bv42jNvr.js +0 -4
- 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/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/systems/claude/client/FleetPage.vue +0 -132
- package/systems/claude/client/NewSessionForm.vue +0 -62
- package/systems/claude/client/SessionList.vue +0 -64
- package/systems/claude/client/SessionPage.vue +0 -199
- package/systems/claude/client/TaskList.vue +0 -61
- package/systems/claude/client/fakes.ts +0 -186
- package/systems/claude/client/host.ts +0 -23
- package/systems/claude/client/index.ts +0 -15
- package/systems/claude/client/logic.ts +0 -270
- package/systems/claude/client/state.ts +0 -344
- package/systems/claude/package.json +0 -23
- package/systems/claude/server/agent-sdk.ts +0 -379
- package/systems/claude/server/driver.ts +0 -153
- package/systems/claude/server/env.ts +0 -64
- package/systems/claude/server/fake-driver.ts +0 -112
- package/systems/claude/server/fleet.ts +0 -376
- package/systems/claude/server/impl.ts +0 -568
- package/systems/claude/server/index.ts +0 -8
- package/systems/claude/server/main.ts +0 -38
- package/systems/claude/server/preview.ts +0 -76
- package/systems/claude/server/questions.ts +0 -117
- package/systems/claude/server/transcript.ts +0 -83
- package/systems/claude/shared/index.ts +0 -262
- package/systems/claude/shared/session.ts +0 -284
- package/systems/claude/shared/shapes.ts +0 -106
- package/systems/claude/system.json +0 -18
- package/systems/claude/tsconfig.json +0 -6
- package/systems/database/package.json +0 -25
- package/systems/database/server/author.ts +0 -41
- package/systems/database/server/authoring.ts +0 -322
- package/systems/database/server/catalog.ts +0 -117
- package/systems/database/server/compile.ts +0 -332
- package/systems/database/server/dialects.ts +0 -17
- package/systems/database/server/drivers/database.ts +0 -71
- package/systems/database/server/drivers/index.ts +0 -23
- package/systems/database/server/drivers/postgres.ts +0 -157
- package/systems/database/server/drivers/sqlite.ts +0 -151
- package/systems/database/server/drivers/sqlserver.ts +0 -176
- package/systems/database/server/env.ts +0 -35
- package/systems/database/server/fixture.ts +0 -169
- package/systems/database/server/impl.ts +0 -793
- package/systems/database/server/index.ts +0 -7
- package/systems/database/server/instance.ts +0 -398
- package/systems/database/server/main.ts +0 -47
- package/systems/database/server/pick.ts +0 -97
- package/systems/database/server/queries.ts +0 -390
- package/systems/database/server/results.ts +0 -39
- package/systems/database/server/schema.ts +0 -59
- package/systems/database/server/table-fns.ts +0 -237
- package/systems/database/server/types.ts +0 -253
- package/systems/database/shared/index.ts +0 -544
- package/systems/database/shared/shapes.ts +0 -413
- package/systems/database/system.json +0 -14
- package/systems/database/tsconfig.json +0 -6
- 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/web/client/ReadView.vue +0 -110
- package/systems/web/client/SearchView.vue +0 -215
- package/systems/web/client/StatusChip.vue +0 -38
- package/systems/web/client/fakes.ts +0 -48
- package/systems/web/client/index.ts +0 -15
- package/systems/web/client/view.ts +0 -131
- package/systems/web/package.json +0 -22
- package/systems/web/server/chrome.ts +0 -121
- package/systems/web/server/crawl.ts +0 -333
- package/systems/web/server/env.ts +0 -63
- package/systems/web/server/guard.ts +0 -60
- package/systems/web/server/http.ts +0 -89
- package/systems/web/server/impl.ts +0 -203
- package/systems/web/server/index.ts +0 -71
- package/systems/web/server/loader.ts +0 -104
- package/systems/web/server/main.ts +0 -70
- package/systems/web/server/mentions.ts +0 -111
- package/systems/web/server/problem.ts +0 -72
- package/systems/web/server/renderer.ts +0 -243
- package/systems/web/server/robots.ts +0 -75
- package/systems/web/server/searches.ts +0 -29
- package/systems/web/server/tavily.ts +0 -144
- package/systems/web/server/testing.ts +0 -165
- package/systems/web/server/uploads.ts +0 -33
- package/systems/web/shared/index.ts +0 -343
- package/systems/web/shared/urls.ts +0 -60
- package/systems/web/system.json +0 -15
- package/systems/web/tsconfig.json +0 -6
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The database system's shapes, zod first: its config, the query kind's payload, and everything its fns hand the
|
|
3
|
-
* model. The contract (`index.ts`) carries each as gin (`ginAs`), and the server parses with these, so each shape has
|
|
4
|
-
* one source.
|
|
5
|
-
*/
|
|
6
|
-
import { FnNameValue, GinObjTypeDef, Json, ResultTable, ShareRule } from '@harness/core';
|
|
7
|
-
import { ResultBlock, ResultFn } from '@harness/sdk';
|
|
8
|
-
import { a } from '@aeye/schema';
|
|
9
|
-
import { z } from 'zod';
|
|
10
|
-
|
|
11
|
-
// ─── Config ──────────────────────────────────────────────────────────────────
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* A connection with exactly the fields its kind needs: a new SQLite file in the instance's data folder, an existing
|
|
15
|
-
* SQLite file, Postgres or SQL Server. The config form shows one kind at a time, labelled by its `kind` description,
|
|
16
|
-
* with only that kind's fields; each secret (`url`, `password`) still has one path.
|
|
17
|
-
*/
|
|
18
|
-
export const Connection = z.discriminatedUnion('kind', [
|
|
19
|
-
z.object({
|
|
20
|
-
kind: z.literal('sqlite-new').describe('New SQLite file'),
|
|
21
|
-
path: z.string().min(1).regex(/^[^/\\:]+$/, 'A new SQLite file is a plain file name inside the data folder.').describe("A file name inside the instance's data folder (`shop.db`)."),
|
|
22
|
-
}),
|
|
23
|
-
z.object({
|
|
24
|
-
kind: z.literal('sqlite-file').describe('Existing SQLite file'),
|
|
25
|
-
path: z.string().min(1).describe("The SQLite file's full path."),
|
|
26
|
-
}),
|
|
27
|
-
z.object({
|
|
28
|
-
kind: z.literal('postgres').describe('Postgres'),
|
|
29
|
-
url: z.string().min(1).describe('The connection URL (`postgres://user:password@host:5432/db`). Kept as a secret.'),
|
|
30
|
-
}),
|
|
31
|
-
z.object({
|
|
32
|
-
kind: z.literal('sqlserver').describe('SQL Server'),
|
|
33
|
-
host: z.string().min(1).describe('The host name.'),
|
|
34
|
-
port: z.number().int().min(1).max(65535).optional().describe('The port (1433 when empty).'),
|
|
35
|
-
database: z.string().min(1).describe('The database name.'),
|
|
36
|
-
user: z.string().min(1).describe('The user name.'),
|
|
37
|
-
password: z.string().min(1).describe('The password. Kept as a secret.'),
|
|
38
|
-
encrypt: z.boolean().optional().describe('Encrypt the connection (on when empty).'),
|
|
39
|
-
}),
|
|
40
|
-
]);
|
|
41
|
-
export type Connection = z.infer<typeof Connection>;
|
|
42
|
-
|
|
43
|
-
/** The kinds of connection. */
|
|
44
|
-
export type ConnectionKind = Connection['kind'];
|
|
45
|
-
|
|
46
|
-
/** The dialects the system speaks, by connection kind. */
|
|
47
|
-
export const DIALECT_NAMES = ['sqlite', 'postgres', 'sqlserver'] as const;
|
|
48
|
-
export const DialectName = z.enum(DIALECT_NAMES);
|
|
49
|
-
export type DialectName = z.infer<typeof DialectName>;
|
|
50
|
-
|
|
51
|
-
/** The dialect a connection speaks. */
|
|
52
|
-
export function dialectOf(kind: ConnectionKind): DialectName {
|
|
53
|
-
return kind === 'sqlite-new' || kind === 'sqlite-file' ? 'sqlite' : kind;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/** One instance's config: one database. */
|
|
57
|
-
export const DatabaseConfig = z.object({
|
|
58
|
-
label: z.string().min(1).describe('What this database is, as people and the model read it ("Shop orders").'),
|
|
59
|
-
connection: Connection,
|
|
60
|
-
data: z.enum(['read-only', 'read-write']).describe('`read-write` lets queries insert, update and delete rows, each only after the person approves it.'),
|
|
61
|
-
schema: z.enum(['none', 'allowed']).describe('`allowed` lets the chat create and change tables from types, each only after approval.'),
|
|
62
|
-
enrich: z.object({
|
|
63
|
-
on: z.boolean().describe('Have a model refine each table\'s type (choices, formats, ranges, descriptions) when its schema changes.'),
|
|
64
|
-
model: z.string().min(1).optional().describe('The model for it (`openrouter/...`); the hub\'s default when empty.'),
|
|
65
|
-
}),
|
|
66
|
-
audience: ShareRule.describe('Who may use this database\'s query fns.'),
|
|
67
|
-
});
|
|
68
|
-
export type DatabaseConfig = z.infer<typeof DatabaseConfig>;
|
|
69
|
-
|
|
70
|
-
/** The config's secret fields. */
|
|
71
|
-
export const CONFIG_SECRETS = ['connection.url', 'connection.password'] as const;
|
|
72
|
-
|
|
73
|
-
// ─── The query kind ──────────────────────────────────────────────────────────
|
|
74
|
-
|
|
75
|
-
/** How a generated fn's query is built (`@aeye/query`'s `TableFnOp`, which `toTableFnOp` turns it back into): JSON, so it is stored and rebuilt. */
|
|
76
|
-
export const TableFnOpSchema = z.object({
|
|
77
|
-
kind: z.enum([
|
|
78
|
-
'create', 'update', 'updateWhere', 'remove', 'removeWhere', 'selectOne', 'selectPage',
|
|
79
|
-
'countBy', 'stats', 'buckets', 'exists', 'findOrCreate', 'childrenOf', 'countPerParent', 'derived',
|
|
80
|
-
]),
|
|
81
|
-
table: z.string().min(1),
|
|
82
|
-
column: z.string().min(1).optional(),
|
|
83
|
-
child: z.string().min(1).optional(),
|
|
84
|
-
bucket: z.enum(['day', 'week', 'month']).optional(),
|
|
85
|
-
derived: z.array(z.string().min(1)).optional(),
|
|
86
|
-
});
|
|
87
|
-
export type TableFnOpValue = z.infer<typeof TableFnOpSchema>;
|
|
88
|
-
|
|
89
|
-
/** What a generated query fn was made from: its op, and the hash of its table's schema then. */
|
|
90
|
-
export const GeneratedFrom = z.object({
|
|
91
|
-
op: TableFnOpSchema,
|
|
92
|
-
hash: z.string().min(1).describe('The table schema hash (`tableSchemaHash`) it was generated for.'),
|
|
93
|
-
});
|
|
94
|
-
export type GeneratedFrom = z.infer<typeof GeneratedFrom>;
|
|
95
|
-
|
|
96
|
-
/** A saved query: an `@aeye/query` query over this database's table types, and how callers may page and sort it. */
|
|
97
|
-
export const QueryPayload = z.object({
|
|
98
|
-
/** The database instance it runs on. */
|
|
99
|
-
instance: z.string().min(1),
|
|
100
|
-
/** What it answers, in words: what the model matches later requests against. */
|
|
101
|
-
description: z.string().min(1),
|
|
102
|
-
/** The query, as `@aeye/query` JSON (`{ kind: 'select', … }`). */
|
|
103
|
-
query: Json,
|
|
104
|
-
/** Output columns a caller may sort by (`sort` arg); empty for none. */
|
|
105
|
-
sorters: z.array(z.string().min(1)),
|
|
106
|
-
/** Whether it returns a list of rows that pages with `limit` / `offset`. */
|
|
107
|
-
list: z.boolean(),
|
|
108
|
-
/** Params a caller may leave out, bound as NULL (no filter, no change); every other param is required. */
|
|
109
|
-
optional: z.array(z.string().min(1)).optional(),
|
|
110
|
-
/** Set when `table_fns_generate` made it: what it was generated from, so it is rebuilt when the table changes. */
|
|
111
|
-
generated: GeneratedFrom.optional(),
|
|
112
|
-
});
|
|
113
|
-
export type QueryPayload = z.infer<typeof QueryPayload>;
|
|
114
|
-
|
|
115
|
-
/** A sort a caller asks for. */
|
|
116
|
-
export const SortArg = z.array(z.object({ column: z.string().min(1), dir: z.enum(['asc', 'desc']) }));
|
|
117
|
-
export type SortArg = z.infer<typeof SortArg>;
|
|
118
|
-
|
|
119
|
-
// ─── What the model reads ────────────────────────────────────────────────────
|
|
120
|
-
|
|
121
|
-
/** What a write did once approved. */
|
|
122
|
-
export const WriteResult = z.object({
|
|
123
|
-
shown: z.string(),
|
|
124
|
-
affected: z.number().int().min(0).describe('Rows inserted, changed or deleted.'),
|
|
125
|
-
returned: ResultBlock.optional().describe('Rows the write returned (`returning`), when it asked for any.'),
|
|
126
|
-
});
|
|
127
|
-
export type WriteResult = z.infer<typeof WriteResult>;
|
|
128
|
-
|
|
129
|
-
/** The database a fn ran on. */
|
|
130
|
-
export const DatabaseInfo = z.object({ instance: z.string(), label: z.string(), dialect: DialectName });
|
|
131
|
-
export type DatabaseInfo = z.infer<typeof DatabaseInfo>;
|
|
132
|
-
|
|
133
|
-
/** How a query was come by. */
|
|
134
|
-
export const QueryHow = z.enum(['reused', 'created', 'edited']);
|
|
135
|
-
export type QueryHow = z.infer<typeof QueryHow>;
|
|
136
|
-
|
|
137
|
-
/** Where a write or schema change stands with its approval. */
|
|
138
|
-
export const ApprovalState = z.object({
|
|
139
|
-
run: z.string().describe('The run waiting for approval.'),
|
|
140
|
-
state: z.enum(['waiting', 'approved', 'declined']),
|
|
141
|
-
says: z.string().describe('What happens now, in words.'),
|
|
142
|
-
});
|
|
143
|
-
export type ApprovalState = z.infer<typeof ApprovalState>;
|
|
144
|
-
|
|
145
|
-
/** A query's param values, by param name (`{ "status": "paid" }`). */
|
|
146
|
-
export const ParamValues = z.record(z.string(), Json);
|
|
147
|
-
export type ParamValues = z.infer<typeof ParamValues>;
|
|
148
|
-
|
|
149
|
-
/** What `run_query` gives: the database, the fn, the query as it ran, and its result or where its approval is. */
|
|
150
|
-
export const QueryRun = z.object({
|
|
151
|
-
database: DatabaseInfo,
|
|
152
|
-
fn: ResultFn,
|
|
153
|
-
query: z.object({
|
|
154
|
-
sql: z.string().describe('The SQL it runs, readable.'),
|
|
155
|
-
structured: Json.describe('The `@aeye/query` JSON, to change it with edit_query.'),
|
|
156
|
-
params: ParamValues.describe('The values it ran with.'),
|
|
157
|
-
writes: z.boolean(),
|
|
158
|
-
}),
|
|
159
|
-
result: ResultBlock.optional(),
|
|
160
|
-
approval: ApprovalState.optional(),
|
|
161
|
-
});
|
|
162
|
-
export type QueryRun = z.infer<typeof QueryRun>;
|
|
163
|
-
|
|
164
|
-
// ─── The query agent's tools ─────────────────────────────────────────────────
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* A query the agent wrote, before it is checked and saved, as the model writes it (the authoring agent's draft extends
|
|
168
|
-
* it with `query` typed by the loaded tables and this request's `args`).
|
|
169
|
-
*/
|
|
170
|
-
export const QueryDraft = a.object({
|
|
171
|
-
name: a.string().pattern(/^[a-z][a-z0-9_]{0,47}$/).describe('A snake_case name (`overdue_invoices`); it is saved as a fn of the database (`database/main.overdue_invoices`).'),
|
|
172
|
-
title: a.string().min(1).describe('A short title (`Overdue invoices`).'),
|
|
173
|
-
description: a.string().min(1).describe('One sentence: what it returns (or changes) and what its params are for. Later requests are matched against it.'),
|
|
174
|
-
query: a.json().describe('The query as `@aeye/query` JSON (`{ "kind": "select", … }`).'),
|
|
175
|
-
sorters: a.array(a.string().min(1)).optional().describe('Output columns a caller may sort by.'),
|
|
176
|
-
});
|
|
177
|
-
export type QueryDraft = a.infer<typeof QueryDraft>;
|
|
178
|
-
|
|
179
|
-
/** What the draft check says about a draft: whether it runs here, its SQL and signature, or what to fix. */
|
|
180
|
-
export const QueryCheck = z.object({
|
|
181
|
-
ok: z.boolean(),
|
|
182
|
-
problems: z.array(z.string()).describe('Each problem, with what to change; empty when `ok`.'),
|
|
183
|
-
sql: z.string().optional().describe('The SQL it would run.'),
|
|
184
|
-
signature: z.string().optional().describe('The fn it would be, as one line: its args and what it returns.'),
|
|
185
|
-
writes: z.boolean().optional(),
|
|
186
|
-
});
|
|
187
|
-
export type QueryCheck = z.infer<typeof QueryCheck>;
|
|
188
|
-
|
|
189
|
-
/** What `tables` gives: one database's tables, columns and relations, and the query language, as the agent writes against. */
|
|
190
|
-
export const TablesInfo = z.object({
|
|
191
|
-
database: DatabaseInfo,
|
|
192
|
-
writes: z.boolean().describe('Whether rows can be written: added, changed and removed, each after approval. False means rows can only be read, whatever `schemaChanges` says.'),
|
|
193
|
-
schemaChanges: z.boolean().describe('Whether tables can be made and changed (create_table, alter_table), each after approval. A table can be made where rows can\'t be written.'),
|
|
194
|
-
schema: z.string().describe('The table types, their columns (with choices, formats and ranges where known), relations, and how to write queries.'),
|
|
195
|
-
});
|
|
196
|
-
export type TablesInfo = z.infer<typeof TablesInfo>;
|
|
197
|
-
|
|
198
|
-
/** A query the authoring agent kept in the hub. */
|
|
199
|
-
export const SavedQueryRef = z.object({
|
|
200
|
-
/** The saved fn (`database/main.overdue_invoices`); a fn name, so the model reads it as its tools spell it. */
|
|
201
|
-
fn: FnNameValue,
|
|
202
|
-
signature: z.string(),
|
|
203
|
-
version: z.number().int().min(1).describe('1 for a new query; more when an edit replaced an earlier version (kept in its history).'),
|
|
204
|
-
created: z.boolean(),
|
|
205
|
-
});
|
|
206
|
-
export type SavedQueryRef = z.infer<typeof SavedQueryRef>;
|
|
207
|
-
|
|
208
|
-
/** One database as `databases` lists it. */
|
|
209
|
-
export const DatabaseSummary = z.object({
|
|
210
|
-
instance: z.string(),
|
|
211
|
-
label: z.string(),
|
|
212
|
-
tables: z.array(z.string()).describe('Its tables, each with what it holds when known.'),
|
|
213
|
-
writes: z.boolean().optional().describe('Whether rows can be written (added, changed, removed), each after approval.'),
|
|
214
|
-
schemaChanges: z.boolean().optional().describe('Whether tables can be made and changed, each after approval; one can be allowed without the other.'),
|
|
215
|
-
});
|
|
216
|
-
export type DatabaseSummary = z.infer<typeof DatabaseSummary>;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* The query fn an authoring fn answered with (`get_query`, `edit_query`): the SDK's authored-fn answer (its version,
|
|
220
|
-
* what it does, how to call it again) with its name and signature as a result names them, and how it was come by.
|
|
221
|
-
*/
|
|
222
|
-
export const QueryAnswerFn = ResultFn.extend({
|
|
223
|
-
version: z.number().int().min(1).describe('1 for a new query; more after edits (the old versions are kept).'),
|
|
224
|
-
about: z.string().describe('What it returns or changes, in one sentence.'),
|
|
225
|
-
call: z.string().describe('How to call it again directly, with the args of this request.'),
|
|
226
|
-
how: QueryHow,
|
|
227
|
-
why: z.string().min(1).describe('Why this query: the saved one that fit, or what was written or changed.'),
|
|
228
|
-
});
|
|
229
|
-
export type QueryAnswerFn = z.infer<typeof QueryAnswerFn>;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* What `get_query` and `edit_query` answer with: the saved query's run (the database, the query as it ran, and its
|
|
233
|
-
* result or where its approval is) and its fn with how and why. Never the authoring agent's working context.
|
|
234
|
-
*/
|
|
235
|
-
export const QueryAnswer = QueryRun.extend({ fn: QueryAnswerFn });
|
|
236
|
-
export type QueryAnswer = z.infer<typeof QueryAnswer>;
|
|
237
|
-
|
|
238
|
-
/** `get_query`'s answer when the request could be for more than one database and doesn't say which. */
|
|
239
|
-
export const AskWhichDatabase = z.object({
|
|
240
|
-
ask: z.string().min(1).describe('The question for the person: which database they mean, by label.'),
|
|
241
|
-
databases: z.array(z.string().min(1)).min(2).describe('The database instances it could be.'),
|
|
242
|
-
});
|
|
243
|
-
export type AskWhichDatabase = z.infer<typeof AskWhichDatabase>;
|
|
244
|
-
|
|
245
|
-
/** `get_query`'s question back when the database is unclear: which one, and what the caller does now. */
|
|
246
|
-
export const AskDatabase = AskWhichDatabase.extend({
|
|
247
|
-
next: z.string().describe('What to do now: ask the person with input/ask_choice and call get_query again with their pick (or, with nobody watching, say which databases could answer).'),
|
|
248
|
-
});
|
|
249
|
-
export type AskDatabase = z.infer<typeof AskDatabase>;
|
|
250
|
-
|
|
251
|
-
/** What `get_query` answers: the query it ran, or which database to use. */
|
|
252
|
-
export const QueryAgentAnswer = z.union([QueryAnswer, AskDatabase]);
|
|
253
|
-
export type QueryAgentAnswer = z.infer<typeof QueryAgentAnswer>;
|
|
254
|
-
|
|
255
|
-
/** A table made or changed from a type (`create_table`, `alter_table`, `apply_type_changes`). */
|
|
256
|
-
export const SchemaChanged = z.object({
|
|
257
|
-
database: DatabaseInfo,
|
|
258
|
-
shown: z.string(),
|
|
259
|
-
steps: z.array(z.object({ sql: z.string(), irreversible: z.boolean() })),
|
|
260
|
-
types: z.array(z.string()).describe('The table types now in the hub.'),
|
|
261
|
-
});
|
|
262
|
-
export type SchemaChanged = z.infer<typeof SchemaChanged>;
|
|
263
|
-
|
|
264
|
-
/** `create_table` / `alter_table` args: a table's name and its row type. */
|
|
265
|
-
export const TableArgs = z.object({
|
|
266
|
-
table: z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).describe('The table\'s name (`invoices`).'),
|
|
267
|
-
type: GinObjTypeDef.describe('The row type: a gin `obj` type whose props are the columns. An `id` column (or `key`) is the primary key; an `optional` column may be empty.'),
|
|
268
|
-
database: z.string().min(1).optional().describe('The database instance; the only one when empty.'),
|
|
269
|
-
});
|
|
270
|
-
export type TableArgs = z.infer<typeof TableArgs>;
|
|
271
|
-
|
|
272
|
-
/** `change_schema` args: `create_table` / `alter_table`'s, with what to do and on which instance. */
|
|
273
|
-
export const SchemaArgs = TableArgs.extend({ action: z.enum(['create', 'alter']), database: z.string().min(1) });
|
|
274
|
-
export type SchemaArgs = z.infer<typeof SchemaArgs>;
|
|
275
|
-
|
|
276
|
-
/** `apply_type_changes` args: the rescan whose changes an admin approves. */
|
|
277
|
-
export const ApplyArgs = z.object({ scan: z.string().min(1).describe('The rescan these changes came from.') });
|
|
278
|
-
export type ApplyArgs = z.infer<typeof ApplyArgs>;
|
|
279
|
-
|
|
280
|
-
/** `pick_database` args: the request, and the database it names, if any. */
|
|
281
|
-
export const PickArgs = z.object({
|
|
282
|
-
detailedDescription: z.string().min(1).describe('The request, as get_query was given it.'),
|
|
283
|
-
database: z.string().min(1).optional().describe('The database instance the request names, if any.'),
|
|
284
|
-
});
|
|
285
|
-
export type PickArgs = z.infer<typeof PickArgs>;
|
|
286
|
-
|
|
287
|
-
/** How a database was picked: named in the request, the only one, by the decision model, or by its tables' match. */
|
|
288
|
-
export const PickedBy = z.enum(['asked', 'only', 'decision', 'score']);
|
|
289
|
-
export type PickedBy = z.infer<typeof PickedBy>;
|
|
290
|
-
|
|
291
|
-
/** The database a request is for, and why. */
|
|
292
|
-
export const PickedDatabase = z.object({
|
|
293
|
-
database: z.string().min(1).describe('The database instance to use.'),
|
|
294
|
-
label: z.string(),
|
|
295
|
-
by: PickedBy,
|
|
296
|
-
why: z.string().describe('Why this database, in one sentence.'),
|
|
297
|
-
});
|
|
298
|
-
export type PickedDatabase = z.infer<typeof PickedDatabase>;
|
|
299
|
-
|
|
300
|
-
/** What `pick_database` answers: the database, or the question for the person when it stays unclear. */
|
|
301
|
-
export const DatabasePick = z.union([PickedDatabase, AskWhichDatabase]);
|
|
302
|
-
export type DatabasePick = z.infer<typeof DatabasePick>;
|
|
303
|
-
|
|
304
|
-
// ─── Generated table fns ─────────────────────────────────────────────────────
|
|
305
|
-
|
|
306
|
-
/** What a `table` arg tells the model: the table's plain name, with what else it takes. */
|
|
307
|
-
export const TABLE_ARG_DOCS = 'The table\'s name as database/databases and database/tables list it (`projects`), with `database` when there are several databases. Its type, as a result gave it, is taken too.';
|
|
308
|
-
|
|
309
|
-
/** `table_fns_available` args. */
|
|
310
|
-
export const TableFnsArgs = z.object({
|
|
311
|
-
table: z.string().min(1).describe(TABLE_ARG_DOCS),
|
|
312
|
-
database: z.string().min(1).optional().describe('The database instance (`main`), as database/databases lists it; the only one when empty.'),
|
|
313
|
-
});
|
|
314
|
-
export type TableFnsArgs = z.infer<typeof TableFnsArgs>;
|
|
315
|
-
|
|
316
|
-
/** How a listed fn stands in the hub: not made yet, made for this schema, or made for an older one (regenerate it). */
|
|
317
|
-
export const TableFnState = z.enum(['new', 'current', 'stale']);
|
|
318
|
-
export type TableFnState = z.infer<typeof TableFnState>;
|
|
319
|
-
|
|
320
|
-
/** One fn a table could have. */
|
|
321
|
-
export const TableFnEntry = z.object({
|
|
322
|
-
name: z.string().describe('Its name within the table (`selectPage`, `projectCount`): what `table_fns_generate` takes.'),
|
|
323
|
-
/** The fn it is, or would be once generated (`database/main.projects_selectPage`); a fn name, so the model reads it as its tools spell it. */
|
|
324
|
-
fn: FnNameValue,
|
|
325
|
-
about: z.string(),
|
|
326
|
-
signature: z.string(),
|
|
327
|
-
mode: z.enum(['read', 'write', 'delete']).describe('Whether it reads, writes (after approval) or deletes rows. Fns that write rows are listed only where rows can be written.'),
|
|
328
|
-
state: TableFnState,
|
|
329
|
-
version: z.number().int().min(1).optional().describe('The saved version, when it exists.'),
|
|
330
|
-
});
|
|
331
|
-
export type TableFnEntry = z.infer<typeof TableFnEntry>;
|
|
332
|
-
|
|
333
|
-
/** A table's fns from one place: `crud`, `columns`, `table`, or the relation they come from. */
|
|
334
|
-
export const TableFnGroup = z.object({ group: z.string(), fns: z.array(TableFnEntry) });
|
|
335
|
-
export type TableFnGroup = z.infer<typeof TableFnGroup>;
|
|
336
|
-
|
|
337
|
-
/** What `table_fns_available` lists: the table's fns by group, the most useful first, and how many more there are. */
|
|
338
|
-
export const TableFnsList = z.object({
|
|
339
|
-
database: DatabaseInfo,
|
|
340
|
-
table: z.string(),
|
|
341
|
-
type: z.string().describe('The table\'s type in the hub, for hub/fns_search\'s `types` filter; give `table` args the table\'s name instead.'),
|
|
342
|
-
hash: z.string().describe('The schema hash of the table now.'),
|
|
343
|
-
groups: z.array(TableFnGroup),
|
|
344
|
-
more: z.number().int().min(0).describe('Fns left out past the cap.'),
|
|
345
|
-
});
|
|
346
|
-
export type TableFnsList = z.infer<typeof TableFnsList>;
|
|
347
|
-
|
|
348
|
-
/** `table_fns_generate` args. */
|
|
349
|
-
export const TableFnsGenerateArgs = TableFnsArgs.extend({
|
|
350
|
-
names: z.array(z.string().min(1)).min(1).max(50).describe('The fns to make or bring up to date, by their names in `table_fns_available`.'),
|
|
351
|
-
derived: z.array(z.string().min(1)).optional().describe('Derived fields `selectPage` also shows, sorts and filters on (`projectCount`).'),
|
|
352
|
-
});
|
|
353
|
-
export type TableFnsGenerateArgs = z.infer<typeof TableFnsGenerateArgs>;
|
|
354
|
-
|
|
355
|
-
/** One fn `table_fns_generate` made: its name, signature and version, and what happened to it. */
|
|
356
|
-
export const GeneratedTableFn = z.object({
|
|
357
|
-
fn: FnNameValue,
|
|
358
|
-
signature: z.string(),
|
|
359
|
-
version: z.number().int().min(1),
|
|
360
|
-
status: z.enum(['created', 'updated', 'unchanged']),
|
|
361
|
-
});
|
|
362
|
-
export type GeneratedTableFn = z.infer<typeof GeneratedTableFn>;
|
|
363
|
-
|
|
364
|
-
/** What `table_fns_generate` gives. */
|
|
365
|
-
export const TableFnsGenerated = z.object({ database: DatabaseInfo, table: z.string(), fns: z.array(GeneratedTableFn) });
|
|
366
|
-
export type TableFnsGenerated = z.infer<typeof TableFnsGenerated>;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* `drill_down`'s args: a saved grouped read, the args it ran with, and the group clicked (each group key column's
|
|
370
|
-
* value), with the page of the rows behind it. A result table of a query that can be drilled into says so
|
|
371
|
-
* (`ResultTable.drill`), with these args but the group and the page.
|
|
372
|
-
*/
|
|
373
|
-
export const DrillArgs = z.object({
|
|
374
|
-
fn: z.string().min(1).describe('The saved query fn whose result was clicked (`database/main.orders_by_status`).'),
|
|
375
|
-
args: z.record(z.string(), Json).optional().describe('The args it ran with: its params (no paging or sort).'),
|
|
376
|
-
group: z.record(z.string(), Json).describe('The clicked group: the value of each group key column, by column name.'),
|
|
377
|
-
limit: z.number().int().min(1).optional().describe('How many rows (the page size when empty).'),
|
|
378
|
-
offset: z.number().int().min(0).optional().describe('How many rows to skip, for the next page.'),
|
|
379
|
-
});
|
|
380
|
-
export type DrillArgs = z.infer<typeof DrillArgs>;
|
|
381
|
-
|
|
382
|
-
/** What one instance is asked to read for a tool another instance answered (`read_at_instance`, declared read). */
|
|
383
|
-
export const ReadInstanceOp = z.discriminatedUnion('op', [
|
|
384
|
-
z.object({ op: z.literal('tables') }),
|
|
385
|
-
z.object({ op: z.literal('table-fns'), table: z.string().min(1) }),
|
|
386
|
-
z.object({ op: z.literal('drill'), drill: DrillArgs }),
|
|
387
|
-
]);
|
|
388
|
-
export type ReadInstanceOp = z.infer<typeof ReadInstanceOp>;
|
|
389
|
-
|
|
390
|
-
/** What one instance is asked to do for a tool another instance answered (`at_instance`): the reads and the writes. */
|
|
391
|
-
export const InstanceOp = z.discriminatedUnion('op', [
|
|
392
|
-
...ReadInstanceOp.options,
|
|
393
|
-
z.object({ op: z.literal('run'), fn: z.string().min(1), args: ParamValues.optional() }),
|
|
394
|
-
z.object({ op: z.literal('table-fns-generate'), table: z.string().min(1), names: z.array(z.string().min(1)).min(1), derived: z.array(z.string().min(1)).optional() }),
|
|
395
|
-
]);
|
|
396
|
-
export type InstanceOp = z.infer<typeof InstanceOp>;
|
|
397
|
-
|
|
398
|
-
/** What an instance answers an `InstanceOp` with, by the same `op`. */
|
|
399
|
-
export const InstanceAnswer = z.discriminatedUnion('op', [
|
|
400
|
-
z.object({ op: z.literal('tables'), tables: TablesInfo }),
|
|
401
|
-
z.object({ op: z.literal('run'), run: QueryRun }),
|
|
402
|
-
z.object({ op: z.literal('table-fns'), list: TableFnsList }),
|
|
403
|
-
z.object({ op: z.literal('table-fns-generate'), generated: TableFnsGenerated }),
|
|
404
|
-
z.object({ op: z.literal('drill'), table: ResultTable }),
|
|
405
|
-
]);
|
|
406
|
-
export type InstanceAnswer = z.infer<typeof InstanceAnswer>;
|
|
407
|
-
|
|
408
|
-
/** `author_query`'s args: the request, and the saved query to change (`edit_query`). */
|
|
409
|
-
export const AuthorArgs = z.object({
|
|
410
|
-
request: z.string().min(1).describe('What the query should do, as the caller described it.'),
|
|
411
|
-
edit: z.string().min(1).optional().describe('The saved query fn to change (`database/main.orders_by_status`); absent to find or write one.'),
|
|
412
|
-
});
|
|
413
|
-
export type AuthorArgs = z.infer<typeof AuthorArgs>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format": 1,
|
|
3
|
-
"name": "database",
|
|
4
|
-
"version": "0.1.0",
|
|
5
|
-
"description": "Query and change SQL databases (SQLite, Postgres, SQL Server): every table is a type, and every query asked for is kept as a fn for next time.",
|
|
6
|
-
"protocol": 1,
|
|
7
|
-
"server": {
|
|
8
|
-
"entry": "server/main.ts",
|
|
9
|
-
"external": {
|
|
10
|
-
"better-sqlite3": "^12.4.1"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"instances": "many"
|
|
14
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": { "rootDir": ".", "outDir": "../../.types/system-database", "tsBuildInfoFile": "../../.types/system-database.tsbuildinfo", "types": ["node"] },
|
|
4
|
-
"include": ["shared", "server"],
|
|
5
|
-
"references": [{ "path": "../../packages/core" }, { "path": "../../packages/sdk" }]
|
|
6
|
-
}
|
package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-371-533.md
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by scripts/docs/authoring.ts from the authoring guide (npm run docs:authoring); do not edit.
|
|
3
|
-
key: "authoring.examples.systems-fs-shared-index-ts-lines-371-533"
|
|
4
|
-
title: "Worked examples: systems/fs/shared/index.ts, lines 371-533"
|
|
5
|
-
description: "Worked examples, the part on systems/fs/shared/index.ts, lines 371-533."
|
|
6
|
-
summary: "Worked examples: systems/fs/shared/index.ts, lines 371-533."
|
|
7
|
-
parent: "fs/authoring.examples"
|
|
8
|
-
fns: ["fs/read", "fs/write", "fs/edit", "fs/bash"]
|
|
9
|
-
tags: ["authoring"]
|
|
10
|
-
niche: "developer"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
### The fs system's contract
|
|
14
|
-
|
|
15
|
-
#### `systems/fs/shared/index.ts`, lines 371-533
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
system_status: fn({
|
|
19
|
-
group: 'systems',
|
|
20
|
-
description: 'The systems this machine hosts: each one\'s state, version, process, restarts in the last hour and the end of its output.',
|
|
21
|
-
instructions: 'Call it after install_system, restart_system or a crash to see whether a hosted system is up, and read `output` to find why it stopped. Give `system` for one; empty lists all.',
|
|
22
|
-
examples: [
|
|
23
|
-
{
|
|
24
|
-
args: { system: 'random' },
|
|
25
|
-
result: [{ system: 'random', instance: 'main', version: '0.1.0', state: 'connected', pid: 4120, restartsLastHour: 0, folder: 'C:/work/harness/systems/random', bundleHash: '9f2c…', output: 'random.serving …' }],
|
|
26
|
-
},
|
|
27
|
-
{ args: {}, note: 'Every hosted system.' },
|
|
28
|
-
],
|
|
29
|
-
args: StatusArgs,
|
|
30
|
-
returns: g.list(HostedStatus),
|
|
31
|
-
effects: { mode: 'read', free: true },
|
|
32
|
-
display: 'message',
|
|
33
|
-
tags: ['read', 'systems'],
|
|
34
|
-
}),
|
|
35
|
-
restart_system: fn({
|
|
36
|
-
group: 'systems',
|
|
37
|
-
description: 'Restart a system this machine hosts, with the code an admin approved.',
|
|
38
|
-
instructions: 'Use it when a hosted system is stuck, crashed or was disabled after too many crashes. It runs the approved bundle again; it never picks up changed code (call install_system for that). Say why in `reason`.',
|
|
39
|
-
examples: [{ args: { system: 'random', reason: 'It stopped answering after the hub restarted.' }, result: { state: 'connected' } }],
|
|
40
|
-
args: RestartArgs,
|
|
41
|
-
returns: g.obj({ state: HostedState }),
|
|
42
|
-
effects: { mode: 'write', free: true },
|
|
43
|
-
operations: { cancel: false, background: false },
|
|
44
|
-
tags: ['systems'],
|
|
45
|
-
}),
|
|
46
|
-
stop_system: fn({
|
|
47
|
-
group: 'systems',
|
|
48
|
-
description: 'Stop a system this machine hosts; with `remove`, also delete its hosted folders.',
|
|
49
|
-
instructions: 'It stays stopped (also after fs restarts) until install_system or restart_system starts it again. `remove` deletes its bundle, state and data for good, so the person is asked first; use it only when they want the system gone.',
|
|
50
|
-
examples: [
|
|
51
|
-
{ args: { system: 'random' }, result: { stopped: true, removed: false } },
|
|
52
|
-
{ args: { system: 'random', remove: true }, result: { stopped: true, removed: true }, note: 'Gone for good, after the person said yes.' },
|
|
53
|
-
],
|
|
54
|
-
args: StopArgs,
|
|
55
|
-
returns: StopResult,
|
|
56
|
-
effects: { mode: 'delete', free: true },
|
|
57
|
-
operations: { cancel: false, background: false },
|
|
58
|
-
handlers: {
|
|
59
|
-
confirm: handler({
|
|
60
|
-
description: 'Delete this hosted system\'s folders, its data included?',
|
|
61
|
-
args: g.obj({ system: g.text(), folders: g.list(g.text()) }),
|
|
62
|
-
returns: g.bool(),
|
|
63
|
-
required: false,
|
|
64
|
-
}),
|
|
65
|
-
},
|
|
66
|
-
tags: ['systems'],
|
|
67
|
-
}),
|
|
68
|
-
},
|
|
69
|
-
hooks: {
|
|
70
|
-
git: hook({
|
|
71
|
-
description: 'Adds the current branch and the changed files.',
|
|
72
|
-
// what `<fs_git>` means to the model: injected with fs's items into the agents that get the block
|
|
73
|
-
explains: '`<fs_git>` is the git state of each folder the files system serves that is a git repository: its branch, and the files changed since the last commit. The person didn\'t type it. Mention it only when it matters to the request.',
|
|
74
|
-
order: 50,
|
|
75
|
-
timeout: 500,
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
|
-
})
|
|
79
|
-
// mentions, context and the agent use the types and fns declared above
|
|
80
|
-
.with(({ fns, types }) => ({
|
|
81
|
-
mentions: {
|
|
82
|
-
// chips and cards show as Entry: its label, icon and color, and its reveal method on the card
|
|
83
|
-
files: mention({ title: 'Files', description: 'Files and folders under the roots.', target: FileTarget, of: types.Entry }),
|
|
84
|
-
},
|
|
85
|
-
context: {
|
|
86
|
-
guide: context({
|
|
87
|
-
description: 'How to work with the person\'s files: find, read, then change; keeping notes and lists as files; running commands.',
|
|
88
|
-
content: [
|
|
89
|
-
'The fs system works only inside the folders an admin chose (its roots). Paths are relative to the first root (`notes/todo.md`), or start with a root\'s name when there are several; `/` is outside the roots and is refused. Start with fs/list on `.` to see the first root.',
|
|
90
|
-
'',
|
|
91
|
-
'To find something: fs/glob finds files by name (`*.md`, `notes/**`), fs/grep finds lines inside files by a regular expression (case-sensitive; write `[Rr]eport` for either case, never `(?i)`), fs/list shows one folder. Don\'t guess a path: look first. When the request is about when files are from ("this year\'s", "the newest"), list the folder: fs/list gives every file with its modified time, which a search by meaning doesn\'t.',
|
|
92
|
-
'To read: fs/read, a window at a time for long files (`offset`, `limit`). Say only what you read. fs/read reads text only: read a pdf or other document with hub/resource_read, and look at a picture (or a pdf page with no text) with hub/resource_send, each by the file\'s `file://` uri (as fs/list gives its path).',
|
|
93
|
-
'To change: fs/edit replaces exact text (copy `find` from what fs/read gave, spaces included); fs/write writes a whole new file; fs/remove deletes one file. Each may ask the person first, and each can be undone with the turn.',
|
|
94
|
-
'To keep a document for the person (a list, a summary, notes from this chat): write a markdown file, for example fs/write with {"path":"notes/ideas.md","text":"# Ideas\\n\\n- First idea\\n- Second idea\\n"}, then tell them the path. Check the result (`created`) before saying it is saved.',
|
|
95
|
-
'To run a program, a build, tests or git: fs/bash runs a bash command (not PowerShell); set the folder once with fs/cd. Check `exitCode`: anything but 0 means the command failed. A command your shell setting does not mark safe asks the person first, and what it changes can\'t be undone.',
|
|
96
|
-
'',
|
|
97
|
-
'A file the person attached to a chat message is a hub resource, not an fs file: read it with hub/resource_read or look at it with hub/resource_send, not fs/read.',
|
|
98
|
-
].join('\n'),
|
|
99
|
-
// the guide brings the fns it is about, so finding it finds them
|
|
100
|
-
fns: [fns.read, fns.list, fns.glob, fns.grep, fns.edit, fns.write, fns.bash, fns.cd, fns.remove],
|
|
101
|
-
}),
|
|
102
|
-
// what every chat agent is told about files, in its system prompt (plan injected-context, section 5)
|
|
103
|
-
basics: context({
|
|
104
|
-
title: 'Files',
|
|
105
|
-
description: 'Where the files system works (its roots), how paths are written, what can be undone, and that an attached file is not one of its files.',
|
|
106
|
-
summary: 'The files system works only in folders an admin chose: paths are relative to the first root, never `/`. Load fs/guide first.',
|
|
107
|
-
content: [
|
|
108
|
-
'The **files system** (`fs`) works only inside a few folders of the person\'s machine an admin chose (its roots). Paths are relative to the first root (`notes/todo.md`) or start with a root\'s name; `/` is outside the roots and is refused. Look before you guess a path: fs/list on `.` shows the first root, fs/glob finds files by name, and fs/read reads one.',
|
|
109
|
-
'fs/write, fs/edit and fs/remove may ask the person first, and what they change can be undone with the turn; what fs/bash changes can\'t. To keep a document for the person (a note, a list, a summary), write a markdown file and tell them its path.',
|
|
110
|
-
'A file the person attached to a message is not an fs file: it is kept by the hub, not under the roots. Load fs/guide before the first change.',
|
|
111
|
-
].join('\n'),
|
|
112
|
-
fns: [fns.list, fns.read],
|
|
113
|
-
inject: { into: [agents.startingWith(hub.fns.chat)] },
|
|
114
|
-
}),
|
|
115
|
-
tree: context({
|
|
116
|
-
description: 'The folder tree of a root, as it is now.',
|
|
117
|
-
command: { name: 'tree', args: { root: arg('Which root (default: all)', { required: false }) } },
|
|
118
|
-
}),
|
|
119
|
-
// the start of writing a system: it loads the guide's index (`context/authoring/`, a graph of the SDK guide) with
|
|
120
|
-
// it, and says where the template is on this machine, with the fns to write and install a system
|
|
121
|
-
'system-authoring': context({
|
|
122
|
-
description: 'How to write and install a harness system: the index of its guide, where the template system is, and how to copy it.',
|
|
123
|
-
command: { name: 'new-system' },
|
|
124
|
-
imports: [{ ref: 'context', name: 'fs/authoring' }],
|
|
125
|
-
fns: [fns.read, fns.write, fns.edit, fns.bash, fns.install_system, fns.system_status],
|
|
126
|
-
}),
|
|
127
|
-
},
|
|
128
|
-
}))
|
|
129
|
-
.with(({ fns, context: ctx }) => ({
|
|
130
|
-
fns: {
|
|
131
|
-
explore: agent({
|
|
132
|
-
description: 'Answers questions about the code by reading it.',
|
|
133
|
-
group: 'files',
|
|
134
|
-
effects: { mode: 'read' },
|
|
135
|
-
usage: 'Use it for a question that needs several files read (how a feature works, where something is decided) so your own context stays small. Ask one clear question; the answer quotes paths and lines.',
|
|
136
|
-
args: g.obj({ question: g.text() }),
|
|
137
|
-
returns: g.text(),
|
|
138
|
-
instructions: [
|
|
139
|
-
'Answer this question about the code by reading it: {{args.question}}',
|
|
140
|
-
'',
|
|
141
|
-
'Work in this order:',
|
|
142
|
-
'1. Find where to look: grep for the names in the question (a function, a type, a message), glob for files by name, or hub/search_resources by meaning.',
|
|
143
|
-
'2. Read the files that matter, a window at a time for long ones (offset and limit), and follow the calls and imports the answer depends on.',
|
|
144
|
-
'3. Stop once you can answer; do not read everything.',
|
|
145
|
-
'',
|
|
146
|
-
'Answer in a few short paragraphs or a list. Quote each path with its line (`src/hub/link.ts:120`) for every claim, and say plainly what you could not find.',
|
|
147
|
-
'Example: asked "where is the session timeout set?", grep for `timeout`, read the config file it points to, and answer',
|
|
148
|
-
'"The timeout is HARNESS_SESSION_TIMEOUT in packages/hub/src/env.ts:42 (default 30 minutes); packages/hub/src/auth/sessions.ts:88 reads it."',
|
|
149
|
-
].join('\n'),
|
|
150
|
-
examples: [
|
|
151
|
-
{ args: { question: 'How does the hub decide which instance runs a call?' } },
|
|
152
|
-
{ args: { question: 'Where are uploaded files stored, and how big may one be?' } },
|
|
153
|
-
],
|
|
154
|
-
tools: [fns.read, fns.glob, fns.grep, hub.fns.search_resources],
|
|
155
|
-
context: [ctx.guide],
|
|
156
|
-
}),
|
|
157
|
-
},
|
|
158
|
-
}));
|
|
159
|
-
|
|
160
|
-
/** The fs contract's type. */
|
|
161
|
-
export type FsContract = typeof fs;
|
|
162
|
-
|
|
163
|
-
/** A file or folder, as fns return it. */
|
|
164
|
-
export type EntryValue = ValueOf<typeof Entry>;
|
|
165
|
-
/** What a command printed and how it ended. */
|
|
166
|
-
export type CommandOutput = Infer<typeof CommandResult>;
|
|
167
|
-
/** The diff attachment's data. */
|
|
168
|
-
export type DiffValue = Infer<typeof DiffData>;
|
|
169
|
-
/** The shell setting's value. */
|
|
170
|
-
export type ShellPolicyValue = Infer<typeof ShellPolicy>;
|
|
171
|
-
/** How many undo copies fs keeps. */
|
|
172
|
-
export type SnapshotLimitsValue = Infer<typeof SnapshotLimits>;
|
|
173
|
-
/** The undo copies kept when the config names no limits: 20 per file, 500 MB in all. */
|
|
174
|
-
export const SNAPSHOT_DEFAULTS: SnapshotLimitsValue = { perFile: 20, totalMb: 500 };
|
|
175
|
-
/** The files mention's target. */
|
|
176
|
-
export type FileTargetValue = Infer<typeof FileTarget>;
|
|
177
|
-
/** What undo needs to put a file back. */
|
|
178
|
-
export type PreviousValue = Infer<typeof Previous>;
|
|
179
|
-
/** What `bash` returns. */
|
|
180
|
-
export type BashOutput = Infer<typeof BashResult>;
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Fns for this: fn:fs/read, fn:fs/write, fn:fs/edit, fn:fs/bash.
|