@lobu/runtime-server 24.8.0 → 24.10.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/dist/catalogs/automations.json +2 -2
- package/dist/catalogs/connectors.json +99 -10
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +6 -2
- package/dist/connectors/github.ts +16 -3
- package/dist/connectors/market_quotes.ts +388 -91
- package/dist/connectors/postgres.ts +60 -38
- package/dist/connectors/whatsapp-web-adapter.js +41 -10
- package/dist/connectors/whatsapp-web-helpers.ts +12 -2
- package/dist/connectors/whatsapp_web.ts +18 -2
- package/dist/connectors/x-dm-adapter.js +55 -21
- package/dist/connectors/x.ts +1 -1
- package/dist/db/migrations/20261109010000_workspace_navigation.sql +14 -0
- package/dist/db/migrations/20261110010000_view_resources.sql +11 -0
- package/dist/db/migrations/20261112210000_instance_identity.sql +18 -0
- package/dist/dependencies.bun.lock +88 -86
- package/dist/embeddings-server.mjs +38 -5
- package/dist/owletto/dist/assets/_-CYvj1y65.js +3 -0
- package/dist/owletto/dist/assets/_-CeLTSYYY.js +2 -0
- package/dist/owletto/dist/assets/_agentId-BB5E-L6T.js +2 -0
- package/dist/owletto/dist/assets/_agentId-DN0EwMAC.js +2 -0
- package/dist/owletto/dist/assets/_automationId-DvUl9CSd.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-CVKfL9AG.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-Cv6FzK1v.js +2 -0
- package/dist/owletto/dist/assets/{_conversationId-OJrZjd0o.js → _conversationId-CPpNySjO.js} +2 -2
- package/dist/owletto/dist/assets/_eventId-DZKicuq6.js +2 -0
- package/dist/owletto/dist/assets/_owner-Dauk3YuD.js +3 -0
- package/dist/owletto/dist/assets/_shape-cKrEID3T.js +2 -0
- package/dist/owletto/dist/assets/_slug-DJx_8fsV.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-CPVzVKEf.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-CW8gexOQ.js +2 -0
- package/dist/owletto/dist/assets/accept-invitation-Dwq1GAnG.js +2 -0
- package/dist/owletto/dist/assets/activity-route-location-C1jcXC7v.js +2 -0
- package/dist/owletto/dist/assets/activity-route-view-D78Wj0RH.js +2 -0
- package/dist/owletto/dist/assets/agent-connect-pages-DoI9UR0a.js +4 -0
- package/dist/owletto/dist/assets/{agent-editor-form-CDAHRNWl.js → agent-editor-form-DlavYg2q.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-BupiSjR-.js → agent-loading-shells-DYqQphN7.js} +2 -2
- package/dist/owletto/dist/assets/agent-permissions-matrix-C1L8IcYR.js +2 -0
- package/dist/owletto/dist/assets/{agent-skill-context-B0ZYVE3n.js → agent-skill-context-D1nMrVod.js} +2 -2
- package/dist/owletto/dist/assets/{agent-subpage-shell-ByU0xhXn.js → agent-subpage-shell-2w7vTeXw.js} +2 -2
- package/dist/owletto/dist/assets/{agent-thread-DiVKn1WX.js → agent-thread-BopD-2k1.js} +2 -2
- package/dist/owletto/dist/assets/{app._appId-BQWElSoP.js → app._appId-BXeFXW1w.js} +2 -2
- package/dist/owletto/dist/assets/{assist-composer-igTXq3DL.js → assist-composer-CL5x8pNt.js} +2 -2
- package/dist/owletto/dist/assets/automation-run-now-MtxUTfzd.js +2 -0
- package/dist/owletto/dist/assets/{callback-Dmaio9CX.js → callback-BgfwP1Eo.js} +2 -2
- package/dist/owletto/dist/assets/{card-rE4Ctuy6.js → card-DtLIFq7D.js} +2 -2
- package/dist/owletto/dist/assets/{claim-BN17CPYh.js → claim-CT3hYVMF.js} +2 -2
- package/dist/owletto/dist/assets/{client-activity-scopes-B7xVaUA-.js → client-activity-scopes-BPbRX-Pe.js} +2 -2
- package/dist/owletto/dist/assets/{client-rows-B3LULJxW.js → client-rows-vrNA6FLs.js} +2 -2
- package/dist/owletto/dist/assets/clients-xnzZeEdZ.js +2 -0
- package/dist/owletto/dist/assets/{code-editor-UppEMWpt.js → code-editor-mrKkAfcE.js} +2 -2
- package/dist/owletto/dist/assets/connect-NUCSay8X.js +2 -0
- package/dist/owletto/dist/assets/{connect-menu-B9u86bb2.js → connect-menu-C6iVtuSo.js} +2 -2
- package/dist/owletto/dist/assets/connect._clientId-Cp-d9Q5b.js +2 -0
- package/dist/owletto/dist/assets/{connected._clientId-CaF-ZWlZ.js → connected._clientId-ROfVgp9h.js} +2 -2
- package/dist/owletto/dist/assets/connection-BMz740Wi.js +2 -0
- package/dist/owletto/dist/assets/{connection-feed-detail-CJYqryAV.js → connection-feed-detail-0VAJiZTP.js} +2 -2
- package/dist/owletto/dist/assets/connector-page-shell-BFv21yuv.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-CW4CXtCz.js → connector-provenance-b59RfBtk.js} +2 -2
- package/dist/owletto/dist/assets/connectors-nYS31lO2.js +2 -0
- package/dist/owletto/dist/assets/consent-cPRF9JQv.js +2 -0
- package/dist/owletto/dist/assets/{copy-button-1ALlvZU1.js → copy-button-C3wMMv63.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-6koO33th.js → core.esm-C9QlSrgK.js} +3 -3
- package/dist/owletto/dist/assets/{create-kUevP9Xx.js → create-ASRN3Obq.js} +2 -2
- package/dist/owletto/dist/assets/create-CBcodaSO.js +2 -0
- package/dist/owletto/dist/assets/create-CGOWfMk4.js +2 -0
- package/dist/owletto/dist/assets/{create-automation-form-BhujNbRr.js → create-automation-form-CLicoPH5.js} +3 -3
- package/dist/owletto/dist/assets/create._connectorKey-s4xkktTC.js +2 -0
- package/dist/owletto/dist/assets/{custom-guardrail-edits-B_aCgvoZ.js → custom-guardrail-edits-BUL7nmuO.js} +2 -2
- package/dist/owletto/dist/assets/{definition-comparison-3zKUSTt8.js → definition-comparison-4UYMI6BK.js} +2 -2
- package/dist/owletto/dist/assets/{detail-page-skeleton-BmxqqIsH.js → detail-page-skeleton-C8v3rJXK.js} +2 -2
- package/dist/owletto/dist/assets/device-BBwsOi7q.js +2 -0
- package/dist/owletto/dist/assets/device-pin-tombstone-Bcpe7nAA.js +2 -0
- package/dist/owletto/dist/assets/{device._deviceId-Dqtmb1Xp.js → device._deviceId-DLT4jh0Z.js} +2 -2
- package/dist/owletto/dist/assets/{dynamic-schema-form-D3KnzCsW.js → dynamic-schema-form-BDT8x0Vg.js} +2 -2
- package/dist/owletto/dist/assets/entity-options-B9hm9V87.js +2 -0
- package/dist/owletto/dist/assets/entity-page-DZjzQ2V4.js +2 -0
- package/dist/owletto/dist/assets/entity-pages-BWBpttz3.js +2 -0
- package/dist/owletto/dist/assets/entity-schema-graph-lMMx3HhR.js +2 -0
- package/dist/owletto/dist/assets/{entity-type-page-CouHZbc9.js → entity-type-page-CkQm0yEu.js} +2 -2
- package/dist/owletto/dist/assets/event-detail-CkzfakTK.js +2 -0
- package/dist/owletto/dist/assets/events-feed-DmRzikZW.js +2 -0
- package/dist/owletto/dist/assets/filter-editors-CQoSj-20.js +3 -0
- package/dist/owletto/dist/assets/{full-page-spinner-B7A6Ycyi.js → full-page-spinner-CYyCnKve.js} +2 -2
- package/dist/owletto/dist/assets/index-BE7eb2kE.js +2 -0
- package/dist/owletto/dist/assets/index-BFR0uiKY.js +2 -0
- package/dist/owletto/dist/assets/{index-DXfYVs5m.js → index-BS5Ty3tf.js} +2 -2
- package/dist/owletto/dist/assets/index-C38OzBpB.js +2 -0
- package/dist/owletto/dist/assets/{index-BztXeLBN.js → index-C3hz9tzx.js} +2 -2
- package/dist/owletto/dist/assets/index-CDyFQ32o.js +2 -0
- package/dist/owletto/dist/assets/{index-B-dZruj6.js → index-CUndAH6o.js} +2 -2
- package/dist/owletto/dist/assets/index-CiKysEhV.js +2 -0
- package/dist/owletto/dist/assets/index-DByaMzsG.js +7906 -0
- package/dist/owletto/dist/assets/index-DfdinB7B.js +2 -0
- package/dist/owletto/dist/assets/index-DgMM4Zt5.css +1 -0
- package/dist/owletto/dist/assets/index-Xk711gVC.js +2 -0
- package/dist/owletto/dist/assets/index-ittfA0k8.js +2 -0
- package/dist/owletto/dist/assets/{json-diff-CJK-gzCt.js → json-diff-mcDgyct_.js} +2 -2
- package/dist/owletto/dist/assets/{list-skeleton-bQAZ0hQp.js → list-skeleton-DsYGUHxi.js} +2 -2
- package/dist/owletto/dist/assets/login-EoLq136v.js +2 -0
- package/dist/owletto/dist/assets/{logout-H0F3IfiO.js → logout-gLgEQOiX.js} +2 -2
- package/dist/owletto/dist/assets/{member-scope-gate-Doic_6qX.js → member-scope-gate-vvkgSAb2.js} +2 -2
- package/dist/owletto/dist/assets/memory-browse-page-DvDtwrEI.js +74 -0
- package/dist/owletto/dist/assets/{model-selector-BrfaDwIg.js → model-selector-D3vSMLO2.js} +2 -2
- package/dist/owletto/dist/assets/needs-you-list-B5Bgd05M.js +2 -0
- package/dist/owletto/dist/assets/new-BPW3V0Y1.js +2 -0
- package/dist/owletto/dist/assets/new-Bk_flKQO.js +2 -0
- package/dist/owletto/dist/assets/new-C5HtQdM_.js +2 -0
- package/dist/owletto/dist/assets/new-dLXsCHBd.js +2 -0
- package/dist/owletto/dist/assets/organization-DBfgBkzq.js +2 -0
- package/dist/owletto/dist/assets/peek-pane-content-c2PG3TEX.js +2 -0
- package/dist/owletto/dist/assets/{pending-seed-DYYOoCvj.js → pending-seed-CBhx2Ql-.js} +2 -2
- package/dist/owletto/dist/assets/{proposal-review-shell-BVwOMoq9.js → proposal-review-shell-B-jYcKfB.js} +2 -2
- package/dist/owletto/dist/assets/public-shell-ready-D8TijlRY.js +2 -0
- package/dist/owletto/dist/assets/record-activity-DnRVOrG2.js +2 -0
- package/dist/owletto/dist/assets/{record-session-KuEDuF3S.js → record-session-CAmGHMyM.js} +2 -2
- package/dist/owletto/dist/assets/{renderer-ucwCQmBk.js → renderer-olRv_HMI.js} +3 -3
- package/dist/owletto/dist/assets/reset-password-B9_xi8Pq.js +2 -0
- package/dist/owletto/dist/assets/{run-initiator-8vdkq-3o.js → run-initiator-DhE5v4z0.js} +2 -2
- package/dist/owletto/dist/assets/runs-C8sZQr4o.js +2 -0
- package/dist/owletto/dist/assets/runs-list-CwtH-wmk.js +2 -0
- package/dist/owletto/dist/assets/{schema-value-CefbtPIY.js → schema-value-zTJGE4eh.js} +3 -3
- package/dist/owletto/dist/assets/scoped-feed-bar-BKyJSa3_.js +2 -0
- package/dist/owletto/dist/assets/{settings-DvzkRYQy.js → settings-z02cvVS3.js} +2 -2
- package/dist/owletto/dist/assets/source-record-panels-CGmKIJdN.js +2 -0
- package/dist/owletto/dist/assets/{status-variants-BxHtpMOj.js → status-variants-DyRCXBzM.js} +2 -2
- package/dist/owletto/dist/assets/subDays-D8nHthaS.js +2 -0
- package/dist/owletto/dist/assets/{table-1O-ik4_O.js → table-C637cQxG.js} +2 -2
- package/dist/owletto/dist/assets/use-automations-CgWNoYio.js +2 -0
- package/dist/owletto/dist/assets/use-login-redirect-tDdhXTpt.js +2 -0
- package/dist/owletto/dist/assets/{use-mention-search-CA-evCDf.js → use-mention-search-D-kIKchD.js} +2 -2
- package/dist/owletto/dist/assets/view-param-filters-CUCj9Df-.js +2 -0
- package/dist/owletto/dist/assets/views-access-required-C35Dyt91.js +2 -0
- package/dist/owletto/dist/index.html +19 -12
- package/dist/server-main.bundle.mjs +6964 -4213
- package/npm-shrinkwrap.json +423 -406
- package/package.json +1 -1
- package/vendor/connector-sdk/dist/connector-types.d.ts +29 -2
- package/vendor/connector-sdk/dist/index.d.ts +1 -0
- package/vendor/connector-sdk/dist/index.js +1 -0
- package/vendor/connector-sdk/dist/ip-reachability.d.ts +1 -1
- package/vendor/connector-sdk/dist/ip-reachability.js +1 -1
- package/vendor/connector-sdk/dist/logger.d.ts +1 -1
- package/vendor/connector-sdk/dist/logger.js +1 -1
- package/vendor/connector-sdk/dist/reaction-client-types.d.ts +3 -1
- package/vendor/connector-sdk/dist/retry.d.ts +1 -1
- package/vendor/connector-sdk/dist/retry.js +1 -1
- package/vendor/connector-sdk/dist/source-withheld-error.d.ts +16 -0
- package/vendor/connector-sdk/dist/source-withheld-error.js +19 -0
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/classify-error.d.ts +4 -5
- package/vendor/core/dist/classify-error.js +10 -10
- package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +17 -1
- package/vendor/core/dist/contracts/tools/collection-presentation.js +27 -3
- package/vendor/core/dist/contracts/tools/manage-automations.d.ts +67 -3
- package/vendor/core/dist/contracts/tools/manage-automations.js +38 -9
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +1 -1
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +8 -0
- package/vendor/core/dist/contracts/tools/manage-entity.js +11 -3
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +249 -7
- package/vendor/core/dist/contracts/tools/manage-views.js +83 -21
- package/vendor/core/dist/contracts/tools/navigation.d.ts +248 -0
- package/vendor/core/dist/contracts/tools/navigation.js +284 -0
- package/vendor/core/dist/contracts/tools/save-memory.d.ts +11 -1
- package/vendor/core/dist/contracts/tools/save-memory.js +25 -3
- package/vendor/core/dist/contracts/tools/search-memory.js +1 -1
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +7 -0
- package/vendor/core/dist/contracts/tools/view-attach.js +15 -0
- package/vendor/core/dist/contracts/tools/view-content-hash.d.ts +4 -1
- package/vendor/core/dist/contracts/tools/view-content-hash.js +4 -2
- package/vendor/core/dist/contracts/tools/view-definition.d.ts +2 -0
- package/vendor/core/dist/contracts/tools/view-definition.js +52 -0
- package/vendor/core/dist/contracts/tools/view-host.d.ts +68 -0
- package/vendor/core/dist/contracts/tools/view-host.js +28 -1
- package/vendor/core/dist/contracts/tools/view-scope.d.ts +31 -0
- package/vendor/core/dist/contracts/tools/view-scope.js +45 -0
- package/vendor/core/dist/credentials.d.ts +12 -0
- package/vendor/core/dist/credentials.js +1 -0
- package/vendor/core/dist/errors.d.ts +17 -24
- package/vendor/core/dist/errors.js +19 -26
- package/vendor/core/dist/types.d.ts +0 -6
- package/vendor/core/dist/worker/auth.d.ts +5 -0
- package/vendor/core/dist/worker/auth.js +15 -4
- package/vendor/core/package.json +11 -1
- package/vendor/postgres/cf/src/connection.js +7 -2
- package/vendor/postgres/cjs/src/connection.js +7 -2
- package/vendor/postgres/src/connection.js +7 -2
- package/vendor/views/dist/api.d.ts +30 -5
- package/vendor/views/dist/api.js +22 -8
- package/vendor/views/dist/bridge.d.ts +17 -0
- package/vendor/views/dist/bridge.js +49 -1
- package/vendor/views/dist/components.d.ts +27 -5
- package/vendor/views/dist/components.js +57 -7
- package/vendor/views/dist/embed.d.ts +98 -0
- package/vendor/views/dist/embed.js +418 -0
- package/vendor/views/dist/index.d.ts +3 -1
- package/vendor/views/dist/index.js +1 -0
- package/vendor/views/dist/native.d.ts +33 -1
- package/vendor/views/dist/native.js +3 -0
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-B0tmXZ86.js +0 -2
- package/dist/owletto/dist/assets/_-DwXULq4r.js +0 -3
- package/dist/owletto/dist/assets/_agentId-B1dNkhnr.js +0 -2
- package/dist/owletto/dist/assets/_agentId-sYjvnBaB.js +0 -2
- package/dist/owletto/dist/assets/_automationId-Bnw_CnT_.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-D7Z8DQ-B.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-DM5MTO8c.js +0 -2
- package/dist/owletto/dist/assets/_eventId-CfB0_2zK.js +0 -2
- package/dist/owletto/dist/assets/_owner-BDvTUY0a.js +0 -3
- package/dist/owletto/dist/assets/_shape-BZidoJMB.js +0 -2
- package/dist/owletto/dist/assets/_slug-R989vOiM.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-BDUSrpe5.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-BnFqh5-t.js +0 -2
- package/dist/owletto/dist/assets/accept-invitation-BC-ZIsrf.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-CN2dOiCD.js +0 -2
- package/dist/owletto/dist/assets/agent-connect-pages-CdDjrHjn.js +0 -4
- package/dist/owletto/dist/assets/agent-permissions-matrix-ju7L2M0l.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-BJwRU6qT.js +0 -2
- package/dist/owletto/dist/assets/clients-CydgUHrc.js +0 -2
- package/dist/owletto/dist/assets/connect-OdHpIVV9.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-EI1tcdSE.js +0 -2
- package/dist/owletto/dist/assets/connection-D8ZAMHBT.js +0 -2
- package/dist/owletto/dist/assets/connector-boxes-BWPXijAk.js +0 -2
- package/dist/owletto/dist/assets/connector-page-shell-C23dWdKz.js +0 -2
- package/dist/owletto/dist/assets/connectors-Bp08_KPq.js +0 -2
- package/dist/owletto/dist/assets/consent-_PpYI1cT.js +0 -2
- package/dist/owletto/dist/assets/create-DULVO0HS.js +0 -2
- package/dist/owletto/dist/assets/create-Drx9tcnG.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-N6fhcIPy.js +0 -2
- package/dist/owletto/dist/assets/device-D2eUt_nr.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-BFPbTM_o.js +0 -2
- package/dist/owletto/dist/assets/entity-options-IUdQ-64R.js +0 -2
- package/dist/owletto/dist/assets/entity-page-B3Im65EI.js +0 -2
- package/dist/owletto/dist/assets/entity-pages-DJNSQrfB.js +0 -2
- package/dist/owletto/dist/assets/event-detail-CvaRN1qB.js +0 -2
- package/dist/owletto/dist/assets/events-feed-DwOkLk6A.js +0 -2
- package/dist/owletto/dist/assets/filter-editors-DQ5V4Cvh.js +0 -2
- package/dist/owletto/dist/assets/home-stream-Bg97PUBJ.js +0 -2
- package/dist/owletto/dist/assets/home-toolbar-CpCcHA6z.js +0 -2
- package/dist/owletto/dist/assets/index-9PGnv4-5.js +0 -2
- package/dist/owletto/dist/assets/index-C2TCKJDP.js +0 -7901
- package/dist/owletto/dist/assets/index-C7QM3aqU.js +0 -2
- package/dist/owletto/dist/assets/index-CWn46a4y.js +0 -2
- package/dist/owletto/dist/assets/index-CxJONizf.js +0 -2
- package/dist/owletto/dist/assets/index-DJhb3li3.js +0 -2
- package/dist/owletto/dist/assets/index-DY-YGnCe.js +0 -2
- package/dist/owletto/dist/assets/index-j3v7ITPb.js +0 -2
- package/dist/owletto/dist/assets/index-oiy6ygaI.js +0 -2
- package/dist/owletto/dist/assets/index-pEgtAY1t.js +0 -2
- package/dist/owletto/dist/assets/index-xAvK3IyQ.css +0 -1
- package/dist/owletto/dist/assets/login-DLqL54Rk.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-CUea2Llz.js +0 -74
- package/dist/owletto/dist/assets/new-5GkxlOuQ.js +0 -2
- package/dist/owletto/dist/assets/new-BiA4DGoN.js +0 -2
- package/dist/owletto/dist/assets/new-M-MX_T5C.js +0 -2
- package/dist/owletto/dist/assets/organization-CLrcmgNK.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-B29OcHwm.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-BbjPgh3k.js +0 -2
- package/dist/owletto/dist/assets/record-activity-BCpNKaUo.js +0 -2
- package/dist/owletto/dist/assets/reset-password-BkiAmXZW.js +0 -2
- package/dist/owletto/dist/assets/runs-B_iywKWb.js +0 -2
- package/dist/owletto/dist/assets/runs-list-CJJFRhTl.js +0 -2
- package/dist/owletto/dist/assets/schema-type-editor-panel-C4e8pq1A.js +0 -2
- package/dist/owletto/dist/assets/scoped-feed-bar-CapleZvS.js +0 -2
- package/dist/owletto/dist/assets/source-record-panels-LJIWGtHb.js +0 -2
- package/dist/owletto/dist/assets/subDays-DwIOMzYC.js +0 -2
- package/dist/owletto/dist/assets/use-automations-lV8PuE8L.js +0 -2
- package/dist/owletto/dist/assets/use-login-redirect-CfCbEeJR.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-Bp84PUMd.js +0 -2
- package/dist/owletto/dist/assets/views-access-required-BerT4Z1d.js +0 -2
- /package/vendor/postgres/{.bun-tag-c81dacd34e959a7a → .bun-tag-652f2580b8090d71} +0 -0
package/package.json
CHANGED
|
@@ -42,6 +42,7 @@ export interface ConnectorDefinition {
|
|
|
42
42
|
queryCapabilities?: {
|
|
43
43
|
exactMatch?: boolean;
|
|
44
44
|
verbatimExactMatch?: boolean;
|
|
45
|
+
exactMatchAny?: boolean;
|
|
45
46
|
selection?: boolean;
|
|
46
47
|
};
|
|
47
48
|
/** Connector-normalized events that can activate Automations. */
|
|
@@ -74,6 +75,8 @@ export interface ConnectorDefinition {
|
|
|
74
75
|
includeOperations?: string[];
|
|
75
76
|
excludeOperations?: string[];
|
|
76
77
|
includeTags?: string[];
|
|
78
|
+
/** HTTP methods to expose (e.g. `['get']` for a read-only surface). */
|
|
79
|
+
includeMethods?: string[];
|
|
77
80
|
serverUrl?: string;
|
|
78
81
|
};
|
|
79
82
|
/**
|
|
@@ -338,6 +341,16 @@ export interface ConnectorAuthEnvField {
|
|
|
338
341
|
example?: string;
|
|
339
342
|
secret?: boolean;
|
|
340
343
|
required?: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Send this field as the HTTP credential for generated `openapiConfig`
|
|
346
|
+
* operations (and MCP upstreams) when the connection authenticates with this
|
|
347
|
+
* env method: `<header>: <scheme> <value>`. Defaults: header `Authorization`,
|
|
348
|
+
* scheme `Bearer`. At most one env field per connector may set it.
|
|
349
|
+
*/
|
|
350
|
+
httpCredential?: {
|
|
351
|
+
header?: string;
|
|
352
|
+
scheme?: string;
|
|
353
|
+
};
|
|
341
354
|
}
|
|
342
355
|
export interface ConnectorAuthEnvKeys {
|
|
343
356
|
type: 'env_keys';
|
|
@@ -1074,6 +1087,12 @@ export interface FeedReadResult {
|
|
|
1074
1087
|
window?: FeedReadWindowCoverage;
|
|
1075
1088
|
}
|
|
1076
1089
|
export type FeedSyncHandler<C = Record<string, unknown>, F = Record<string, unknown>> = (ctx: SyncContext<C, F>) => Promise<SyncResult>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Reads one page from the source. Throw `SourceWithheldError` (or any error
|
|
1092
|
+
* whose own `code` is `'withheld'`) when the source deliberately withholds the
|
|
1093
|
+
* requested record: callers report it as private with the error's message as
|
|
1094
|
+
* the reason, and never retry it. Any other rejection is a read failure.
|
|
1095
|
+
*/
|
|
1077
1096
|
export type FeedReadHandler<F = Record<string, unknown>> = (ctx: FeedReadContext<F>) => Promise<FeedReadResult>;
|
|
1078
1097
|
/** Executable feed definition held only inside a connector runtime. */
|
|
1079
1098
|
export interface RuntimeFeedDefinition<C = Record<string, unknown>, F = Record<string, unknown>> extends Omit<FeedDefinition, 'operations' | 'webhook'> {
|
|
@@ -1118,12 +1137,20 @@ export interface QueryContext<F = Record<string, unknown>> {
|
|
|
1118
1137
|
* connector, which owns its source dialect. Requires queryCapabilities.exactMatch.
|
|
1119
1138
|
* `verbatim: true` preserves the scalar string without trimming and additionally
|
|
1120
1139
|
* requires queryCapabilities.verbatimExactMatch. The default stays trimmed.
|
|
1140
|
+
* Exactly one of `value` / `values` is set. `values` (1-500 strings) keeps a
|
|
1141
|
+
* row whose key equals ANY of them, under the same per-column semantics as
|
|
1142
|
+
* `value`, and additionally requires queryCapabilities.exactMatchAny.
|
|
1121
1143
|
*/
|
|
1122
1144
|
exactMatch?: {
|
|
1123
1145
|
columns: string[];
|
|
1124
|
-
value: string;
|
|
1125
1146
|
verbatim?: boolean;
|
|
1126
|
-
}
|
|
1147
|
+
} & ({
|
|
1148
|
+
value: string;
|
|
1149
|
+
values?: never;
|
|
1150
|
+
} | {
|
|
1151
|
+
values: string[];
|
|
1152
|
+
value?: never;
|
|
1153
|
+
});
|
|
1127
1154
|
/**
|
|
1128
1155
|
* Shared collection predicates, applied before sorting and pagination.
|
|
1129
1156
|
* Search is a literal case-insensitive substring of the projected name.
|
|
@@ -58,6 +58,7 @@ export type { FileDelta, FileSystemSource, Snapshot } from './file-source.js';
|
|
|
58
58
|
export { connect } from './net.js';
|
|
59
59
|
export type { ConnectFn, Socket, SocketAddress, SocketOptions, } from './net.js';
|
|
60
60
|
export { assertFeedReadWindow, validateFeedReadWindow } from './feed-read-window.js';
|
|
61
|
+
export { SourceWithheldError } from './source-withheld-error.js';
|
|
61
62
|
export { isSecretOutputKey, redactOutput } from './redact.js';
|
|
62
63
|
export { scrubDiagnosticValue } from '@lobu/core/diagnostic-scrubber';
|
|
63
64
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -46,6 +46,7 @@ export { extensionNetworkSync } from './extension-network.js';
|
|
|
46
46
|
// =============================================================================
|
|
47
47
|
export { connect } from './net.js';
|
|
48
48
|
export { assertFeedReadWindow, validateFeedReadWindow } from './feed-read-window.js';
|
|
49
|
+
export { SourceWithheldError } from './source-withheld-error.js';
|
|
49
50
|
// The worker's output redaction catalog, shared so a connector that returns
|
|
50
51
|
// third-party text (logs, messages) can scrub it with the same patterns.
|
|
51
52
|
export { isSecretOutputKey, redactOutput } from './redact.js';
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* Keeping the classifier here rather than in each consumer is deliberate:
|
|
22
22
|
* `@lobu/connector-sdk` is the only package every consumer can import (the
|
|
23
23
|
* server package is not reachable from a bundled connector, and `@lobu/core`
|
|
24
|
-
* pulls OpenTelemetry
|
|
24
|
+
* pulls OpenTelemetry and winston, which connectors intentionally
|
|
25
25
|
* avoid).
|
|
26
26
|
*
|
|
27
27
|
* The matcher collapses the spellings an attacker can use to dress up an
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* Keeping the classifier here rather than in each consumer is deliberate:
|
|
22
22
|
* `@lobu/connector-sdk` is the only package every consumer can import (the
|
|
23
23
|
* server package is not reachable from a bundled connector, and `@lobu/core`
|
|
24
|
-
* pulls OpenTelemetry
|
|
24
|
+
* pulls OpenTelemetry and winston, which connectors intentionally
|
|
25
25
|
* avoid).
|
|
26
26
|
*
|
|
27
27
|
* The matcher collapses the spellings an attacker can use to dress up an
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SDK logger.
|
|
3
3
|
*
|
|
4
4
|
* Deliberately self-contained. The package root must stay loadable inside a
|
|
5
|
-
* V8 isolate, and `@lobu/core`'s root entry pulls winston
|
|
5
|
+
* V8 isolate, and `@lobu/core`'s root entry pulls winston and
|
|
6
6
|
* OpenTelemetry into every connector bundle — 6 MB of gateway internals whose
|
|
7
7
|
* first `require('util')` throws where no Node runtime exists (guarded by
|
|
8
8
|
* `packages/server/src/__tests__/integration/sandbox/connector-isolate-lane.test.ts`).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SDK logger.
|
|
3
3
|
*
|
|
4
4
|
* Deliberately self-contained. The package root must stay loadable inside a
|
|
5
|
-
* V8 isolate, and `@lobu/core`'s root entry pulls winston
|
|
5
|
+
* V8 isolate, and `@lobu/core`'s root entry pulls winston and
|
|
6
6
|
* OpenTelemetry into every connector bundle — 6 MB of gateway internals whose
|
|
7
7
|
* first `require('util')` throws where no Node runtime exists (guarded by
|
|
8
8
|
* `packages/server/src/__tests__/integration/sandbox/connector-isolate-lane.test.ts`).
|
|
@@ -17,7 +17,7 @@ import type { ConnectionListInput } from "@lobu/core/contracts/tools/manage-conn
|
|
|
17
17
|
import type { EntityCreateInput, EntityCreateResult, EntityDeleteInput, EntityDeleteResult, EntityDiscoverDuplicatesInput, EntityDiscoverDuplicatesResult, EntityGetInput, EntityGetResult, EntityLinkInput, EntityLinkResult, EntityListInput, EntityListResult, EntityListLinksInput, EntityListLinksResult, EntityUnlinkInput, EntityUnlinkResult, EntityUpdateInput, EntityUpdateResult, EntityUpdateLinkInput, EntityUpdateLinkResult } from "@lobu/core/contracts/tools/manage-entity";
|
|
18
18
|
import type { OperationExecuteInput, OperationListAvailableInput, OperationListRunsInput } from "@lobu/core/contracts/tools/manage-operations";
|
|
19
19
|
import type { PublicGetContentArgs } from "@lobu/core/contracts/tools/read-knowledge";
|
|
20
|
-
import type { SaveContentInput } from "@lobu/core/contracts/tools/save-memory";
|
|
20
|
+
import type { SaveContentInput, UnlinkedEntityName } from "@lobu/core/contracts/tools/save-memory";
|
|
21
21
|
import type { PublicSearchArgs } from "@lobu/core/contracts/tools/search-memory";
|
|
22
22
|
/**
|
|
23
23
|
* A rich card for chat delivery, as a plain serializable object — a `chat`
|
|
@@ -58,6 +58,8 @@ export interface KnowledgeSaveResult {
|
|
|
58
58
|
id: number;
|
|
59
59
|
created: boolean;
|
|
60
60
|
metadata: Record<string, unknown>;
|
|
61
|
+
/** `{ name }` entries from `entity_ids` that did not link. */
|
|
62
|
+
unlinked: UnlinkedEntityName[];
|
|
61
63
|
}
|
|
62
64
|
export interface NotificationsSendInput {
|
|
63
65
|
/** Notification title (≤200 chars). */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 503.
|
|
10
10
|
*
|
|
11
11
|
* The backoff loop lives here rather than being imported from `@lobu/core`:
|
|
12
|
-
* core's root entry drags winston
|
|
12
|
+
* core's root entry drags winston and OpenTelemetry into every
|
|
13
13
|
* connector bundle, and the package root must stay loadable inside a V8
|
|
14
14
|
* isolate. It keeps the semantics of core's `retryWithBackoff` for the one
|
|
15
15
|
* configuration `withHttpRetry` uses: exponential, capped, full jitter.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 503.
|
|
10
10
|
*
|
|
11
11
|
* The backoff loop lives here rather than being imported from `@lobu/core`:
|
|
12
|
-
* core's root entry drags winston
|
|
12
|
+
* core's root entry drags winston and OpenTelemetry into every
|
|
13
13
|
* connector bundle, and the package root must stay loadable inside a V8
|
|
14
14
|
* isolate. It keeps the semantics of core's `retryWithBackoff` for the one
|
|
15
15
|
* configuration `withHttpRetry` uses: exponential, capped, full jitter.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown from a feed `read` when the source deliberately withholds the
|
|
3
|
+
* requested record (for example, a private person's communications). The read
|
|
4
|
+
* is reported as withheld rather than failed: the caller is told the reason,
|
|
5
|
+
* nothing is retried, and pagination continues past it.
|
|
6
|
+
*
|
|
7
|
+
* The platform keys on the error's own `code === 'withheld'`, never on this
|
|
8
|
+
* class, so a connector on an older SDK opts in with
|
|
9
|
+
* `Object.assign(new Error(reason), { code: 'withheld' })`. The message is the
|
|
10
|
+
* human reason shown to the user.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SourceWithheldError extends Error {
|
|
13
|
+
readonly code: "withheld";
|
|
14
|
+
constructor(reason: string);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=source-withheld-error.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown from a feed `read` when the source deliberately withholds the
|
|
3
|
+
* requested record (for example, a private person's communications). The read
|
|
4
|
+
* is reported as withheld rather than failed: the caller is told the reason,
|
|
5
|
+
* nothing is retried, and pagination continues past it.
|
|
6
|
+
*
|
|
7
|
+
* The platform keys on the error's own `code === 'withheld'`, never on this
|
|
8
|
+
* class, so a connector on an older SDK opts in with
|
|
9
|
+
* `Object.assign(new Error(reason), { code: 'withheld' })`. The message is the
|
|
10
|
+
* human reason shown to the user.
|
|
11
|
+
*/
|
|
12
|
+
export class SourceWithheldError extends Error {
|
|
13
|
+
code = 'withheld';
|
|
14
|
+
constructor(reason) {
|
|
15
|
+
super(reason);
|
|
16
|
+
this.name = 'SourceWithheldError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=source-withheld-error.js.map
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
* `AgentErrorCode`. Every other layer consumes this rather than growing its
|
|
6
6
|
* own regex, and three of them act on the result:
|
|
7
7
|
*
|
|
8
|
-
* - `
|
|
9
|
-
* `
|
|
10
|
-
*
|
|
11
|
-
* keeps firing on schedule against an exhausted quota.
|
|
8
|
+
* - `classifyRunOutcome` (server runs/run-outcome.ts) stamps a classified
|
|
9
|
+
* failure `infra_error`; an unclassified provider refusal is blamed on the
|
|
10
|
+
* agent as `agent_error`.
|
|
12
11
|
* - `response-renderer.ts` and `chat-response-bridge.ts` resolve the code to
|
|
13
12
|
* a remediation CTA; with none, the user gets the provider's raw prose.
|
|
14
|
-
* - An unclassified failure also misses the `PROVIDER_*`
|
|
13
|
+
* - An unclassified failure also misses the `PROVIDER_*` error alerting.
|
|
15
14
|
*
|
|
16
15
|
* Adding a failure mode = one pattern here + one entry in `AGENT_ERRORS`.
|
|
17
16
|
*
|
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
* `AgentErrorCode`. Every other layer consumes this rather than growing its
|
|
7
7
|
* own regex, and three of them act on the result:
|
|
8
8
|
*
|
|
9
|
-
* - `
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
* keeps firing on schedule against an exhausted quota.
|
|
9
|
+
* - `classifyRunOutcome` (server runs/run-outcome.ts) stamps a classified
|
|
10
|
+
* failure `infra_error`; an unclassified provider refusal is blamed on the
|
|
11
|
+
* agent as `agent_error`.
|
|
13
12
|
* - `response-renderer.ts` and `chat-response-bridge.ts` resolve the code to
|
|
14
13
|
* a remediation CTA; with none, the user gets the provider's raw prose.
|
|
15
|
-
* - An unclassified failure also misses the `PROVIDER_*`
|
|
14
|
+
* - An unclassified failure also misses the `PROVIDER_*` error alerting.
|
|
16
15
|
*
|
|
17
16
|
* Adding a failure mode = one pattern here + one entry in `AGENT_ERRORS`.
|
|
18
17
|
*
|
|
@@ -86,10 +85,11 @@ function classifyErrorMessage(message) {
|
|
|
86
85
|
// dodged the PROVIDER_* alert.
|
|
87
86
|
//
|
|
88
87
|
// It belongs HERE and not in `PROVIDER_BALANCE_EXHAUSTED` above: a
|
|
89
|
-
// subscription usage limit is WINDOWED — the provider
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
88
|
+
// subscription usage limit is WINDOWED — it clears on the provider's own
|
|
89
|
+
// reset — while that union means the account cannot spend until someone tops
|
|
90
|
+
// it up. The device daemon stops a retrying OpenCode run on balance wording
|
|
91
|
+
// alone, so a windowed limit in that union would cut short a run the CLI's
|
|
92
|
+
// own retry could still finish.
|
|
93
93
|
if (errors_js_1.PROVIDER_WINDOWED_QUOTA.test(message))
|
|
94
94
|
return errors_js_1.AgentErrorCode.PROVIDER_QUOTA_EXHAUSTED;
|
|
95
95
|
// Gemini can end a turn with this provider-side tool-call rejection instead
|
|
@@ -115,7 +115,7 @@ function classifyErrorMessage(message) {
|
|
|
115
115
|
// (code no_credentials) when every credential tier misses. The live red-test
|
|
116
116
|
// (LOBU-BACKEND-W) landed as `unclassified` because the auth-hint regex
|
|
117
117
|
// doesn't cover this shape — and an unclassified event dodges the
|
|
118
|
-
// PROVIDER_*
|
|
118
|
+
// PROVIDER_* alert.
|
|
119
119
|
if (/no\s+(provider\s+)?credentials\s+configured|no_credentials/i.test(message))
|
|
120
120
|
return errors_js_1.AgentErrorCode.PROVIDER_AUTH;
|
|
121
121
|
// The provider accepted the credential but refuses to USE it: Anthropic 403s
|
|
@@ -40,6 +40,11 @@ declare const PresetSchema: import("@sinclair/typebox").TObject<{
|
|
|
40
40
|
toDays: import("@sinclair/typebox").TInteger;
|
|
41
41
|
timeZone: import("@sinclair/typebox").TString;
|
|
42
42
|
}>>;
|
|
43
|
+
/** Adds `{ field, op: "eq", value: <signed-in user's email> }`. Only a
|
|
44
|
+
* filter: read access is still enforced server-side. */
|
|
45
|
+
viewer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
46
|
+
field: import("@sinclair/typebox").TString;
|
|
47
|
+
}>>;
|
|
43
48
|
}>;
|
|
44
49
|
export declare const CollectionPresentationSchema: import("@sinclair/typebox").TObject<{
|
|
45
50
|
presets: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
@@ -71,6 +76,11 @@ export declare const CollectionPresentationSchema: import("@sinclair/typebox").T
|
|
|
71
76
|
toDays: import("@sinclair/typebox").TInteger;
|
|
72
77
|
timeZone: import("@sinclair/typebox").TString;
|
|
73
78
|
}>>;
|
|
79
|
+
/** Adds `{ field, op: "eq", value: <signed-in user's email> }`. Only a
|
|
80
|
+
* filter: read access is still enforced server-side. */
|
|
81
|
+
viewer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
82
|
+
field: import("@sinclair/typebox").TString;
|
|
83
|
+
}>>;
|
|
74
84
|
}>>>;
|
|
75
85
|
table: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
76
86
|
columns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
@@ -88,6 +98,12 @@ export type CollectionPresentation = Static<typeof CollectionPresentationSchema>
|
|
|
88
98
|
export type CollectionPreset = Static<typeof PresetSchema>;
|
|
89
99
|
export type CollectionTable = Static<typeof TableSchema>;
|
|
90
100
|
export declare function parseCollectionPresentation(raw: unknown): CollectionPresentation;
|
|
91
|
-
|
|
101
|
+
/**
|
|
102
|
+
* The preset as a concrete selection. A viewer preset needs the signed-in
|
|
103
|
+
* viewer and throws without one, so it never widens to every row.
|
|
104
|
+
*/
|
|
105
|
+
export declare function resolveCollectionPreset(preset: CollectionPreset, now?: Date, viewer?: {
|
|
106
|
+
email: string;
|
|
107
|
+
}): CollectionSelection;
|
|
92
108
|
export {};
|
|
93
109
|
//# sourceMappingURL=collection-presentation.d.ts.map
|
|
@@ -32,6 +32,9 @@ const PresetSchema = typebox_1.Type.Object({
|
|
|
32
32
|
toDays: typebox_1.Type.Integer({ minimum: -3660, maximum: 3660 }),
|
|
33
33
|
timeZone: typebox_1.Type.String({ minLength: 1, maxLength: 100 }),
|
|
34
34
|
}, { additionalProperties: false })),
|
|
35
|
+
/** Adds `{ field, op: "eq", value: <signed-in user's email> }`. Only a
|
|
36
|
+
* filter: read access is still enforced server-side. */
|
|
37
|
+
viewer: typebox_1.Type.Optional(typebox_1.Type.Object({ field: Field }, { additionalProperties: false })),
|
|
35
38
|
}, { additionalProperties: false });
|
|
36
39
|
exports.CollectionPresentationSchema = typebox_1.Type.Object({
|
|
37
40
|
presets: typebox_1.Type.Optional(typebox_1.Type.Array(PresetSchema, { maxItems: 32 })),
|
|
@@ -41,6 +44,7 @@ exports.CollectionPresentationSchema = typebox_1.Type.Object({
|
|
|
41
44
|
* Both calls run as the viewer; this binding grants no source access. */
|
|
42
45
|
facetQuery: typebox_1.Type.Optional(typebox_1.Type.String({ minLength: 1, maxLength: 64000 })),
|
|
43
46
|
}, { additionalProperties: false });
|
|
47
|
+
const MAX_FILTERS = collection_selection_1.AttributeFiltersSchema.maxItems ?? 32;
|
|
44
48
|
function parseCollectionPresentation(raw) {
|
|
45
49
|
if (!value_1.Value.Check(exports.CollectionPresentationSchema, raw))
|
|
46
50
|
throw new Error("Invalid collection presentation configuration");
|
|
@@ -49,9 +53,13 @@ function parseCollectionPresentation(raw) {
|
|
|
49
53
|
if (keys.has(preset.key))
|
|
50
54
|
throw new Error(`Duplicate collection preset: ${preset.key}`);
|
|
51
55
|
keys.add(preset.key);
|
|
56
|
+
// The resolved selection must still fit the selection contract.
|
|
57
|
+
if ((preset.selection.filters?.length ?? 0) +
|
|
58
|
+
(preset.viewer ? 1 : 0) +
|
|
59
|
+
(preset.relativeDate ? 2 : 0) >
|
|
60
|
+
MAX_FILTERS)
|
|
61
|
+
throw new Error(`Collection preset ${preset.key} resolves to more than ${MAX_FILTERS} filters`);
|
|
52
62
|
if (preset.relativeDate) {
|
|
53
|
-
if ((preset.selection.filters?.length ?? 0) > 30)
|
|
54
|
-
throw new Error("Relative date presets support at most 30 other filters");
|
|
55
63
|
if (preset.relativeDate.fromDays > preset.relativeDate.toDays)
|
|
56
64
|
throw new Error("Relative date range is reversed");
|
|
57
65
|
// Intl validates IANA timezone names, including UTC.
|
|
@@ -62,8 +70,24 @@ function parseCollectionPresentation(raw) {
|
|
|
62
70
|
}
|
|
63
71
|
return raw;
|
|
64
72
|
}
|
|
65
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The preset as a concrete selection. A viewer preset needs the signed-in
|
|
75
|
+
* viewer and throws without one, so it never widens to every row.
|
|
76
|
+
*/
|
|
77
|
+
function resolveCollectionPreset(preset, now = new Date(), viewer) {
|
|
66
78
|
const selection = structuredClone(preset.selection);
|
|
79
|
+
if (preset.viewer) {
|
|
80
|
+
if (!viewer?.email)
|
|
81
|
+
throw new Error(`Collection preset ${preset.key} needs a signed-in viewer`);
|
|
82
|
+
selection.filters = [
|
|
83
|
+
...(selection.filters ?? []),
|
|
84
|
+
{
|
|
85
|
+
field: preset.viewer.field,
|
|
86
|
+
op: "eq",
|
|
87
|
+
value: viewer.email.toLowerCase(),
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
}
|
|
67
91
|
if (!preset.relativeDate)
|
|
68
92
|
return selection;
|
|
69
93
|
const { field, fromDays, toDays, timeZone } = preset.relativeDate;
|
|
@@ -402,11 +402,32 @@ export declare const AutomationClaimNextWindowContextSchema: import("@sinclair/t
|
|
|
402
402
|
feed_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
403
403
|
}>>>;
|
|
404
404
|
extraction_schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
405
|
+
/**
|
|
406
|
+
* The run's pinned Automation version instructions. Present on the first
|
|
407
|
+
* page of a window (no source_cursor / before_* cursor), omitted on
|
|
408
|
+
* continuation pages. Follow these instead of a cached copy of the prompt.
|
|
409
|
+
*/
|
|
410
|
+
instructions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
411
|
+
version_id: import("@sinclair/typebox").TInteger;
|
|
412
|
+
prompt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
413
|
+
skills: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
414
|
+
name: import("@sinclair/typebox").TString;
|
|
415
|
+
content: import("@sinclair/typebox").TString;
|
|
416
|
+
}>>;
|
|
417
|
+
}>>;
|
|
405
418
|
}>;
|
|
406
419
|
export type AutomationClaimNextWindowContext = Static<typeof AutomationClaimNextWindowContextSchema>;
|
|
407
|
-
|
|
420
|
+
/**
|
|
421
|
+
* A claim either leases a window (`claimed`, with context to process and a
|
|
422
|
+
* window_token for completeWindow) or reports that the due window had no new
|
|
423
|
+
* or changed source content and was already booked as a no-op run
|
|
424
|
+
* (`completed`). A completed receipt needs no completeWindow: the schedule
|
|
425
|
+
* has advanced, so refresh activity for the next due window.
|
|
426
|
+
*/
|
|
427
|
+
export declare const AutomationClaimNextWindowResultSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
408
428
|
action: import("@sinclair/typebox").TLiteral<"claim_next_window">;
|
|
409
429
|
automation_id: import("@sinclair/typebox").TString;
|
|
430
|
+
status: import("@sinclair/typebox").TLiteral<"claimed">;
|
|
410
431
|
run_id: import("@sinclair/typebox").TInteger;
|
|
411
432
|
lease_expires_at: import("@sinclair/typebox").TString;
|
|
412
433
|
context: import("@sinclair/typebox").TObject<{
|
|
@@ -433,8 +454,29 @@ export declare const AutomationClaimNextWindowResultSchema: import("@sinclair/ty
|
|
|
433
454
|
feed_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
434
455
|
}>>>;
|
|
435
456
|
extraction_schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
457
|
+
/**
|
|
458
|
+
* The run's pinned Automation version instructions. Present on the first
|
|
459
|
+
* page of a window (no source_cursor / before_* cursor), omitted on
|
|
460
|
+
* continuation pages. Follow these instead of a cached copy of the prompt.
|
|
461
|
+
*/
|
|
462
|
+
instructions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
463
|
+
version_id: import("@sinclair/typebox").TInteger;
|
|
464
|
+
prompt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
465
|
+
skills: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
466
|
+
name: import("@sinclair/typebox").TString;
|
|
467
|
+
content: import("@sinclair/typebox").TString;
|
|
468
|
+
}>>;
|
|
469
|
+
}>>;
|
|
436
470
|
}>;
|
|
437
|
-
}
|
|
471
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
472
|
+
action: import("@sinclair/typebox").TLiteral<"claim_next_window">;
|
|
473
|
+
automation_id: import("@sinclair/typebox").TString;
|
|
474
|
+
status: import("@sinclair/typebox").TLiteral<"completed">;
|
|
475
|
+
run_id: import("@sinclair/typebox").TInteger;
|
|
476
|
+
skipped_unchanged: import("@sinclair/typebox").TLiteral<true>;
|
|
477
|
+
window_start: import("@sinclair/typebox").TString;
|
|
478
|
+
window_end: import("@sinclair/typebox").TString;
|
|
479
|
+
}>]>;
|
|
438
480
|
export type AutomationClaimNextWindowResult = Static<typeof AutomationClaimNextWindowResultSchema>;
|
|
439
481
|
export declare const AutomationTriggerExecutionSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
440
482
|
lane: import("@sinclair/typebox").TLiteral<"managed_agent">;
|
|
@@ -570,9 +612,10 @@ export declare const ManageAutomationsResultSchema: import("@sinclair/typebox").
|
|
|
570
612
|
window_start: import("@sinclair/typebox").TString;
|
|
571
613
|
window_end: import("@sinclair/typebox").TString;
|
|
572
614
|
content_linked: import("@sinclair/typebox").TInteger;
|
|
573
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
615
|
+
}>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
574
616
|
action: import("@sinclair/typebox").TLiteral<"claim_next_window">;
|
|
575
617
|
automation_id: import("@sinclair/typebox").TString;
|
|
618
|
+
status: import("@sinclair/typebox").TLiteral<"claimed">;
|
|
576
619
|
run_id: import("@sinclair/typebox").TInteger;
|
|
577
620
|
lease_expires_at: import("@sinclair/typebox").TString;
|
|
578
621
|
context: import("@sinclair/typebox").TObject<{
|
|
@@ -599,8 +642,29 @@ export declare const ManageAutomationsResultSchema: import("@sinclair/typebox").
|
|
|
599
642
|
feed_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
600
643
|
}>>>;
|
|
601
644
|
extraction_schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
645
|
+
/**
|
|
646
|
+
* The run's pinned Automation version instructions. Present on the first
|
|
647
|
+
* page of a window (no source_cursor / before_* cursor), omitted on
|
|
648
|
+
* continuation pages. Follow these instead of a cached copy of the prompt.
|
|
649
|
+
*/
|
|
650
|
+
instructions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
651
|
+
version_id: import("@sinclair/typebox").TInteger;
|
|
652
|
+
prompt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
653
|
+
skills: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
654
|
+
name: import("@sinclair/typebox").TString;
|
|
655
|
+
content: import("@sinclair/typebox").TString;
|
|
656
|
+
}>>;
|
|
657
|
+
}>>;
|
|
602
658
|
}>;
|
|
603
659
|
}>, import("@sinclair/typebox").TObject<{
|
|
660
|
+
action: import("@sinclair/typebox").TLiteral<"claim_next_window">;
|
|
661
|
+
automation_id: import("@sinclair/typebox").TString;
|
|
662
|
+
status: import("@sinclair/typebox").TLiteral<"completed">;
|
|
663
|
+
run_id: import("@sinclair/typebox").TInteger;
|
|
664
|
+
skipped_unchanged: import("@sinclair/typebox").TLiteral<true>;
|
|
665
|
+
window_start: import("@sinclair/typebox").TString;
|
|
666
|
+
window_end: import("@sinclair/typebox").TString;
|
|
667
|
+
}>]>, import("@sinclair/typebox").TObject<{
|
|
604
668
|
action: import("@sinclair/typebox").TLiteral<"trigger">;
|
|
605
669
|
automation_id: import("@sinclair/typebox").TString;
|
|
606
670
|
run_id: import("@sinclair/typebox").TInteger;
|
|
@@ -122,7 +122,7 @@ exports.AutomationScheduleTriggerSchema = typebox_1.Type.Object({
|
|
|
122
122
|
})),
|
|
123
123
|
skip_if_unchanged: typebox_1.Type.Optional(typebox_1.Type.Boolean({
|
|
124
124
|
default: true,
|
|
125
|
-
description: "Book a due window with no new or changed source content as a no-op run instead of dispatching an agent. Applies to native dispatch and to external claimNextWindow, which
|
|
125
|
+
description: "Book a due window with no new or changed source content as a no-op run instead of dispatching an agent. Applies to native dispatch and to external claimNextWindow, which returns a status 'completed' receipt for a skipped window.",
|
|
126
126
|
})),
|
|
127
127
|
}, { additionalProperties: false });
|
|
128
128
|
exports.AutomationTriggerSchema = typebox_1.Type.Union([
|
|
@@ -355,7 +355,7 @@ exports.ManageAutomationsSchema = typebox_1.Type.Object({
|
|
|
355
355
|
description: "Submit an Automation window result and advance the Automation arrival mark. Required after every claim_next_window, including when the window held nothing actionable: the mark moves only inside this call, so an unfinished claim lets the lease expire, times the run out, and serves the same content again on the next claim.",
|
|
356
356
|
}),
|
|
357
357
|
typebox_1.Type.Literal("claim_next_window", {
|
|
358
|
-
description: "Atomically claim the Automation unclaimed arrival window and return bounded source context plus a fenced window token. The window is [arrival mark, now - settle) over events.created_at, not a calendar period. The caller MUST finish the claim with complete_window, even for an empty or non-actionable window.",
|
|
358
|
+
description: "Atomically claim the Automation unclaimed arrival window and return bounded source context plus a fenced window token. The first page carries context.instructions, the prompt and skills of the run's pinned version; follow them instead of a cached copy. The window is [arrival mark, now - settle) over events.created_at, not a calendar period. The caller MUST finish the claim with complete_window, even for an empty or non-actionable window.",
|
|
359
359
|
}),
|
|
360
360
|
typebox_1.Type.Literal("trigger", {
|
|
361
361
|
description: "Create or reuse an immediate Automation run. The result identifies whether Lobu, a device worker, this caller, or another external caller owns execution. Follow the returned next_action: a pending external run uses knowledge.read then automations.completeWindow, while the owner of an existing external lease resumes it with automations.claimNextWindow.",
|
|
@@ -689,14 +689,43 @@ exports.AutomationClaimNextWindowContextSchema = typebox_1.Type.Object({
|
|
|
689
689
|
feed_id: typebox_1.Type.Optional(typebox_1.Type.Integer()),
|
|
690
690
|
}))),
|
|
691
691
|
extraction_schema: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Unknown())),
|
|
692
|
+
/**
|
|
693
|
+
* The run's pinned Automation version instructions. Present on the first
|
|
694
|
+
* page of a window (no source_cursor / before_* cursor), omitted on
|
|
695
|
+
* continuation pages. Follow these instead of a cached copy of the prompt.
|
|
696
|
+
*/
|
|
697
|
+
instructions: typebox_1.Type.Optional(typebox_1.Type.Object({
|
|
698
|
+
version_id: typebox_1.Type.Integer(),
|
|
699
|
+
prompt: typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()]),
|
|
700
|
+
skills: typebox_1.Type.Array(typebox_1.Type.Object({ name: typebox_1.Type.String(), content: typebox_1.Type.String() })),
|
|
701
|
+
})),
|
|
692
702
|
});
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
703
|
+
/**
|
|
704
|
+
* A claim either leases a window (`claimed`, with context to process and a
|
|
705
|
+
* window_token for completeWindow) or reports that the due window had no new
|
|
706
|
+
* or changed source content and was already booked as a no-op run
|
|
707
|
+
* (`completed`). A completed receipt needs no completeWindow: the schedule
|
|
708
|
+
* has advanced, so refresh activity for the next due window.
|
|
709
|
+
*/
|
|
710
|
+
exports.AutomationClaimNextWindowResultSchema = typebox_1.Type.Union([
|
|
711
|
+
typebox_1.Type.Object({
|
|
712
|
+
action: typebox_1.Type.Literal("claim_next_window"),
|
|
713
|
+
automation_id: typebox_1.Type.String(),
|
|
714
|
+
status: typebox_1.Type.Literal("claimed"),
|
|
715
|
+
run_id: typebox_1.Type.Integer(),
|
|
716
|
+
lease_expires_at: typebox_1.Type.String(),
|
|
717
|
+
context: exports.AutomationClaimNextWindowContextSchema,
|
|
718
|
+
}),
|
|
719
|
+
typebox_1.Type.Object({
|
|
720
|
+
action: typebox_1.Type.Literal("claim_next_window"),
|
|
721
|
+
automation_id: typebox_1.Type.String(),
|
|
722
|
+
status: typebox_1.Type.Literal("completed"),
|
|
723
|
+
run_id: typebox_1.Type.Integer(),
|
|
724
|
+
skipped_unchanged: typebox_1.Type.Literal(true),
|
|
725
|
+
window_start: typebox_1.Type.String(),
|
|
726
|
+
window_end: typebox_1.Type.String(),
|
|
727
|
+
}),
|
|
728
|
+
]);
|
|
700
729
|
exports.AutomationTriggerExecutionSchema = typebox_1.Type.Union([
|
|
701
730
|
typebox_1.Type.Object({
|
|
702
731
|
lane: typebox_1.Type.Literal("managed_agent"),
|
|
@@ -95,7 +95,7 @@ exports.ManageEntitySchemaSchema = typebox_1.Type.Object({
|
|
|
95
95
|
name: typebox_1.Type.Optional(typebox_1.Type.String({ description: "[create/update] Display name", minLength: 1 })),
|
|
96
96
|
description: typebox_1.Type.Optional(typebox_1.Type.String({ description: "[create/update] Description" })),
|
|
97
97
|
metadata_schema: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Unknown(), {
|
|
98
|
-
description: "[create/update] JSON Schema for metadata validation. Source-backed types declare a durable projected key with root x-lobu-record-key naming the key column; this enables string entity_id + entity_type addressing and authored links without storing source rows. A linked type cannot change its backing or key until its edges are unlinked. Entity property annotations: x-facet: true exposes scalar enum values as collection filters; x-sidebar: true also exposes those values as navigation shortcuts. x-enum-labels maps stringified enum values to display labels. x-table-label or title labels the attribute. These annotations do not grant access or define separate segments.",
|
|
98
|
+
description: "[create/update] JSON Schema for metadata validation. Source-backed types declare a durable projected key with root x-lobu-record-key naming the key column; this enables string entity_id + entity_type addressing and authored links without storing source rows. A linked type cannot change its backing or key until its edges are unlinked. Root x-lobu-stamps maps a server-owned timestamp field to the field it tracks (e.g. { stage_at: stage }): the stamp must be a declared property with type string and format date-time, and the tracked field a declared property; every write sets the stamp when the tracked field is set on create or changes value, and caller-supplied stamp values are ignored. Entity property annotations: x-facet: true exposes scalar enum values as collection filters; x-sidebar: true also exposes those values as navigation shortcuts. x-enum-labels maps stringified enum values to display labels. x-table-label or title labels the attribute. These annotations do not grant access or define separate segments.",
|
|
99
99
|
})),
|
|
100
100
|
list_scope: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Literal("accessible"), typebox_1.Type.Literal("organization")], {
|
|
101
101
|
description: "[list] accessible (default) includes the current org plus public schemas; organization returns only the bound org.",
|
|
@@ -365,6 +365,13 @@ declare const RelationshipReadFailureSchema: import("@sinclair/typebox").TObject
|
|
|
365
365
|
code: import("@sinclair/typebox").TString;
|
|
366
366
|
}>;
|
|
367
367
|
export type RelationshipReadFailure = Static<typeof RelationshipReadFailureSchema>;
|
|
368
|
+
/** A feed of a source-backed record's live read that returned no rows. */
|
|
369
|
+
export declare const SourceReadFailureSchema: import("@sinclair/typebox").TObject<{
|
|
370
|
+
feed_id: import("@sinclair/typebox").TInteger;
|
|
371
|
+
error: import("@sinclair/typebox").TString;
|
|
372
|
+
code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"withheld">>;
|
|
373
|
+
}>;
|
|
374
|
+
export type SourceReadFailure = Static<typeof SourceReadFailureSchema>;
|
|
368
375
|
export declare const ManageEntityResultSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
369
376
|
action: import("@sinclair/typebox").TLiteral<"create">;
|
|
370
377
|
entity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
@@ -686,6 +693,7 @@ export declare const ManageEntityResultSchema: import("@sinclair/typebox").TUnio
|
|
|
686
693
|
record_failures: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
687
694
|
feed_id: import("@sinclair/typebox").TInteger;
|
|
688
695
|
error: import("@sinclair/typebox").TString;
|
|
696
|
+
code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"withheld">>;
|
|
689
697
|
}>>;
|
|
690
698
|
next_cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
691
699
|
}>, import("@sinclair/typebox").TObject<{
|