@lobu/runtime-server 24.7.0 → 24.9.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/connectors.json +282 -322
- 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/imessage.ts +953 -0
- package/dist/connectors/linkedin.ts +20 -377
- package/dist/connectors/market_quotes.ts +388 -91
- package/dist/connectors/postgres.ts +21 -14
- 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/dependencies.bun.lock +135 -103
- package/dist/embeddings-server.mjs +14 -2
- package/dist/owletto/dist/assets/_-B2C9B2RM.js +2 -0
- package/dist/owletto/dist/assets/_-CjyiGzwB.js +3 -0
- package/dist/owletto/dist/assets/_agentId-DKHXGvS2.js +2 -0
- package/dist/owletto/dist/assets/_agentId-bna2tPsW.js +2 -0
- package/dist/owletto/dist/assets/_automationId-CowRFD4E.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-dE6im18z.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-DqwSv8Zs.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-zcs-S3dY.js +2 -0
- package/dist/owletto/dist/assets/_eventId-BVOVizs4.js +2 -0
- package/dist/owletto/dist/assets/_owner-DsvIC94q.js +3 -0
- package/dist/owletto/dist/assets/_shape-CWjpzcvv.js +2 -0
- package/dist/owletto/dist/assets/_slug-DuCxYsJk.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-BqVeHB6Z.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-DzyOCG5U.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-CX7Egv-p.js → accept-invitation-k1u3zBcn.js} +2 -2
- package/dist/owletto/dist/assets/activity-route-view-jTBMW7a9.js +2 -0
- package/dist/owletto/dist/assets/agent-connect-pages-D3mVM_q4.js +4 -0
- package/dist/owletto/dist/assets/agent-editor-form-Bnc_q5WD.js +2 -0
- package/dist/owletto/dist/assets/{agent-loading-shells-DHvKiEUB.js → agent-loading-shells-xteN-pyK.js} +2 -2
- package/dist/owletto/dist/assets/agent-permissions-matrix-C_ayr0pd.js +2 -0
- package/dist/owletto/dist/assets/{agent-skill-context-DF5q0Dfr.js → agent-skill-context-r0O0BVOu.js} +2 -2
- package/dist/owletto/dist/assets/{agent-subpage-shell-Pi5cECga.js → agent-subpage-shell-C2KpYdu3.js} +2 -2
- package/dist/owletto/dist/assets/{agent-thread-B1ZepGZc.js → agent-thread-Bv_chdPy.js} +4 -4
- package/dist/owletto/dist/assets/agent-thread-storage-Bx2-WBHQ.js +2 -0
- package/dist/owletto/dist/assets/app._appId-BUcNaSMS.js +2 -0
- package/dist/owletto/dist/assets/assist-composer-B1LykXpD.js +2 -0
- package/dist/owletto/dist/assets/automation-run-now-CjkJIkaZ.js +2 -0
- package/dist/owletto/dist/assets/{callback-Ckrxv0eo.js → callback-kSLa4n5s.js} +2 -2
- package/dist/owletto/dist/assets/{card-DT9mSjSp.js → card-C01y1O-W.js} +2 -2
- package/dist/owletto/dist/assets/{claim-Bzby28tT.js → claim-Dnux9Lqf.js} +2 -2
- package/dist/owletto/dist/assets/{client-activity-scopes-DoIErdUy.js → client-activity-scopes-BBIq16tG.js} +2 -2
- package/dist/owletto/dist/assets/{client-rows-BbVQy5Ti.js → client-rows-DGh1O-Fu.js} +2 -2
- package/dist/owletto/dist/assets/clients-BCvjAJDT.js +2 -0
- package/dist/owletto/dist/assets/code-editor-BdRMYojw.js +26 -0
- package/dist/owletto/dist/assets/connect-DZeFSGIH.js +2 -0
- package/dist/owletto/dist/assets/connect-menu-D4w-JhJW.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-IZEMQJ64.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-BsDzltNz.js +2 -0
- package/dist/owletto/dist/assets/{connection-BOaMa324.js → connection-C7glVpPE.js} +2 -2
- package/dist/owletto/dist/assets/connection-feed-detail-CJju0qiw.js +2 -0
- package/dist/owletto/dist/assets/connector-page-shell-BeuyjiB2.js +2 -0
- package/dist/owletto/dist/assets/connector-provenance-B2C2cjBg.js +2 -0
- package/dist/owletto/dist/assets/{connectors-D5F5rHxX.js → connectors-DSQ5AWPf.js} +2 -2
- package/dist/owletto/dist/assets/consent-B6Aw_89N.js +2 -0
- package/dist/owletto/dist/assets/copy-button-BhXeXLIm.js +2 -0
- package/dist/owletto/dist/assets/{core.esm-BIE97rfo.js → core.esm-CJUp2aNZ.js} +3 -3
- package/dist/owletto/dist/assets/create-CWcza8NT.js +2 -0
- package/dist/owletto/dist/assets/{create-BPxsKwk7.js → create-DUlRsFNn.js} +2 -2
- package/dist/owletto/dist/assets/{create-automation-form-B12yTrmj.js → create-automation-form-D141prEG.js} +3 -3
- package/dist/owletto/dist/assets/create-bGOYifof.js +2 -0
- package/dist/owletto/dist/assets/create._connectorKey-Ds4tpwHP.js +2 -0
- package/dist/owletto/dist/assets/{custom-guardrail-edits-B9plaLBN.js → custom-guardrail-edits-DuQ28xv3.js} +2 -2
- package/dist/owletto/dist/assets/definition-comparison-BUDNuAN_.js +2 -0
- package/dist/owletto/dist/assets/{detail-page-skeleton-I5_7FkKx.js → detail-page-skeleton-BRHaq5Sj.js} +2 -2
- package/dist/owletto/dist/assets/{device-CadaiNF4.js → device-D3fzoIrM.js} +2 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-BIM-ziCH.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-BnPqTgK1.js +2 -0
- package/dist/owletto/dist/assets/dynamic-schema-form-OkIZImgp.js +2 -0
- package/dist/owletto/dist/assets/entity-options-CpeX7iiX.js +2 -0
- package/dist/owletto/dist/assets/entity-page-Cjc8oXA2.js +2 -0
- package/dist/owletto/dist/assets/entity-pages-18xSANrS.js +2 -0
- package/dist/owletto/dist/assets/entity-schema-graph-uwZ-P0t8.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-MgZ7_0oh.js +2 -0
- package/dist/owletto/dist/assets/event-detail-D6AH6a2C.js +2 -0
- package/dist/owletto/dist/assets/event-kind-options-fHAIXu24.js +2 -0
- package/dist/owletto/dist/assets/events-feed-BI7wNRUY.js +2 -0
- package/dist/owletto/dist/assets/filter-editors-DDTwyYt0.js +3 -0
- package/dist/owletto/dist/assets/{full-page-spinner-CCU4PkRv.js → full-page-spinner-DWo519BU.js} +2 -2
- package/dist/owletto/dist/assets/index-9tTjJo_J.css +1 -0
- package/dist/owletto/dist/assets/{index-pmr1WUoG.js → index-BW7IFKXC.js} +2 -2
- package/dist/owletto/dist/assets/index-BYcFrinP.js +2 -0
- package/dist/owletto/dist/assets/index-BhJsTy-C.js +2 -0
- package/dist/owletto/dist/assets/index-CEcsgXDj.js +2 -0
- package/dist/owletto/dist/assets/index-CPscKk2u.js +2 -0
- package/dist/owletto/dist/assets/{index-B72KYdN1.js → index-Cd8jMsz8.js} +2 -2
- package/dist/owletto/dist/assets/index-CdDNNAx2.js +7906 -0
- package/dist/owletto/dist/assets/index-CfJ2-EpK.js +2 -0
- package/dist/owletto/dist/assets/index-D1UCJQl1.js +2 -0
- package/dist/owletto/dist/assets/index-D5DM4g2w.js +2 -0
- package/dist/owletto/dist/assets/index-DmqnKGqW.js +2 -0
- package/dist/owletto/dist/assets/index-DznAbTOF.js +2 -0
- package/dist/owletto/dist/assets/json-diff-C-WQqyIf.js +4 -0
- package/dist/owletto/dist/assets/{list-skeleton-BAqT0vxo.js → list-skeleton-0B1bTrAK.js} +2 -2
- package/dist/owletto/dist/assets/{login-D5bIjMtf.js → login-CH7P2AyR.js} +2 -2
- package/dist/owletto/dist/assets/{logout-JYZvxz8v.js → logout-D474YsYQ.js} +2 -2
- package/dist/owletto/dist/assets/member-scope-gate-CH_0jHiM.js +2 -0
- package/dist/owletto/dist/assets/memory-browse-page-Ba4aYavw.js +74 -0
- package/dist/owletto/dist/assets/model-selector-XYmk7Iru.js +2 -0
- package/dist/owletto/dist/assets/needs-you-list-Bd4iiiqm.js +2 -0
- package/dist/owletto/dist/assets/new-BOsrRqp8.js +2 -0
- package/dist/owletto/dist/assets/new-CJ6TF3Vc.js +2 -0
- package/dist/owletto/dist/assets/{new-B-Jd-vBl.js → new-DGPOjak2.js} +2 -2
- package/dist/owletto/dist/assets/new-Q0XqiZq2.js +2 -0
- package/dist/owletto/dist/assets/organization-hD_Z6TSd.js +2 -0
- package/dist/owletto/dist/assets/peek-pane-content-Cc8YX1oy.js +2 -0
- package/dist/owletto/dist/assets/{pending-seed-CoFPQ835.js → pending-seed-D7-ld7as.js} +2 -2
- package/dist/owletto/dist/assets/proposal-review-shell-BWRJidwb.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-CRyAZATw.js +2 -0
- package/dist/owletto/dist/assets/record-activity-9ux6SfCd.js +2 -0
- package/dist/owletto/dist/assets/{record-session-Bpx4_LGk.js → record-session-ClKBr1_C.js} +2 -2
- package/dist/owletto/dist/assets/{renderer-CgaQKMoG.js → renderer-DZ0w2k2r.js} +2 -2
- package/dist/owletto/dist/assets/{reset-password-C-4Jnuqk.js → reset-password-D2RfrEVZ.js} +2 -2
- package/dist/owletto/dist/assets/run-initiator-B8IRlRd-.js +2 -0
- package/dist/owletto/dist/assets/runs-CuC7WMtd.js +2 -0
- package/dist/owletto/dist/assets/runs-list-8gUPWjP4.js +2 -0
- package/dist/owletto/dist/assets/{schema-value-BUgC0Ro8.js → schema-value-k19Ata7u.js} +3 -3
- package/dist/owletto/dist/assets/scoped-feed-bar-L7h-Ca4u.js +2 -0
- package/dist/owletto/dist/assets/{settings-DYYvrrZ4.js → settings-BZqntV3E.js} +2 -2
- package/dist/owletto/dist/assets/source-record-panels-C4UItfdk.js +2 -0
- package/dist/owletto/dist/assets/{status-variants-DT61YfsU.js → status-variants-BR_iGWN5.js} +2 -2
- package/dist/owletto/dist/assets/subDays-hOwerOLo.js +2 -0
- package/dist/owletto/dist/assets/{table-B6yimlsZ.js → table-C3DMoL4K.js} +2 -2
- package/dist/owletto/dist/assets/use-automations-CdtiVLCv.js +2 -0
- package/dist/owletto/dist/assets/use-login-redirect-CYlVkAhE.js +2 -0
- package/dist/owletto/dist/assets/use-mention-search-CtbixPEE.js +91 -0
- package/dist/owletto/dist/assets/view-param-filters-BdN8OU35.js +2 -0
- package/dist/owletto/dist/assets/{views-access-required-BVtMfgLh.js → views-access-required-CvIIxdS_.js} +2 -2
- package/dist/owletto/dist/index.html +19 -12
- package/dist/server-main.bundle.mjs +4518 -2567
- package/npm-shrinkwrap.json +644 -551
- package/package.json +4 -2
- package/vendor/connector-sdk/dist/connector-types.d.ts +23 -2
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/classify-error.d.ts +3 -4
- package/vendor/core/dist/classify-error.js +8 -8
- package/vendor/core/dist/connector-query-errors.d.ts +6 -0
- package/vendor/core/dist/connector-query-errors.js +4 -0
- 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 +39 -0
- package/vendor/core/dist/contracts/tools/manage-automations.js +11 -1
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +1 -1
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +2 -0
- package/vendor/core/dist/contracts/tools/manage-entity.js +7 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +2 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.js +3 -0
- 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/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 +30 -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/error-report.js +1 -0
- package/vendor/core/dist/errors.d.ts +17 -24
- package/vendor/core/dist/errors.js +17 -24
- package/vendor/core/dist/types.d.ts +0 -6
- package/vendor/core/package.json +11 -1
- 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/package.json +1 -1
- package/dist/connectors/linkedin-takeout.ts +0 -577
- package/dist/connectors/takeout-utils.ts +0 -240
- package/dist/owletto/dist/assets/_-CZgmjLR9.js +0 -2
- package/dist/owletto/dist/assets/_-Cm5OgtYD.js +0 -3
- package/dist/owletto/dist/assets/_-DtqBFgK5.js +0 -2
- package/dist/owletto/dist/assets/_agentId-Cci6NFc1.js +0 -2
- package/dist/owletto/dist/assets/_agentId-GhWTlPO2.js +0 -2
- package/dist/owletto/dist/assets/_automationId-KUlxSTK2.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-Zpy7Hvml.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-CYDRp9UX.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-NNqDdije.js +0 -2
- package/dist/owletto/dist/assets/_eventId-0BSX6VHj.js +0 -2
- package/dist/owletto/dist/assets/_owner-C-CD22NB.js +0 -3
- package/dist/owletto/dist/assets/_shape-CvXp4omb.js +0 -2
- package/dist/owletto/dist/assets/_slug-DgK7zpKA.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-cH54P0zY.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-m0B5j7L9.js +0 -2
- package/dist/owletto/dist/assets/activity-link-rXNpmppV.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-B0m7_g9q.js +0 -2
- package/dist/owletto/dist/assets/agent-client-setup-list-BmD3-_Ox.js +0 -4
- package/dist/owletto/dist/assets/agent-connect-pages-BtOTCsTU.js +0 -2
- package/dist/owletto/dist/assets/agent-editor-form-CirqCpcM.js +0 -2
- package/dist/owletto/dist/assets/agent-list-row-SyACVYX7.js +0 -2
- package/dist/owletto/dist/assets/agent-permissions-matrix-Dsc26dyW.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +0 -2
- package/dist/owletto/dist/assets/agents-D1FHZ0jR.js +0 -2
- package/dist/owletto/dist/assets/app._appId-01I0CJal.js +0 -2
- package/dist/owletto/dist/assets/assist-composer-BD9msDk3.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-BFv1TglZ.js +0 -2
- package/dist/owletto/dist/assets/automation-row-CmTpAD4r.js +0 -2
- package/dist/owletto/dist/assets/automation-source-list-D8ZSavQU.js +0 -2
- package/dist/owletto/dist/assets/automations-D1FHZ0jR.js +0 -2
- package/dist/owletto/dist/assets/change-summary-CGrKEJ04.js +0 -2
- package/dist/owletto/dist/assets/clients-6aJvabvS.js +0 -2
- package/dist/owletto/dist/assets/connect-BmDziBzI.js +0 -2
- package/dist/owletto/dist/assets/connect-menu-Bs8mxsga.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-t5aKu3aa.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-DswMAw8l.js +0 -2
- package/dist/owletto/dist/assets/connection-feed-detail-BLCjhP-H.js +0 -2
- package/dist/owletto/dist/assets/connector-boxes-BAP_f77M.js +0 -2
- package/dist/owletto/dist/assets/connector-page-shell-ClOmVPJr.js +0 -2
- package/dist/owletto/dist/assets/connector-provenance-wmYu5jwO.js +0 -2
- package/dist/owletto/dist/assets/consent-RqHNkmm8.js +0 -2
- package/dist/owletto/dist/assets/copy-button-D6zpsZLi.js +0 -2
- package/dist/owletto/dist/assets/create-GT8_yF0R.js +0 -2
- package/dist/owletto/dist/assets/create-Yx2qBMBy.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-CzXqSkuI.js +0 -2
- package/dist/owletto/dist/assets/definition-comparison-C3k6Wa9B.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-U7Bx05P6.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-DTZqj1HS.js +0 -2
- package/dist/owletto/dist/assets/dynamic-schema-form-DyT_9iVE.js +0 -2
- package/dist/owletto/dist/assets/entity-options-CGTjLlcS.js +0 -2
- package/dist/owletto/dist/assets/entity-page-DHHMmA8V.js +0 -2
- package/dist/owletto/dist/assets/entity-pages-eYbG2FDT.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-CjFqxSdL.js +0 -2
- package/dist/owletto/dist/assets/event-card-BtTUuf2q.js +0 -2
- package/dist/owletto/dist/assets/event-detail-8xHiplt_.js +0 -2
- package/dist/owletto/dist/assets/events-feed-zFnTSE27.js +0 -2
- package/dist/owletto/dist/assets/filter-editors-Dd5R2Etd.js +0 -2
- package/dist/owletto/dist/assets/home-stream-IVsNEkwp.js +0 -2
- package/dist/owletto/dist/assets/index-2oaMOFKe.js +0 -2
- package/dist/owletto/dist/assets/index-B-Ab8srM.js +0 -7899
- package/dist/owletto/dist/assets/index-B4RZgvvI.js +0 -2
- package/dist/owletto/dist/assets/index-BBZM53p8.js +0 -2
- package/dist/owletto/dist/assets/index-BOb0a5f9.js +0 -2
- package/dist/owletto/dist/assets/index-BYFDMIQC.js +0 -2
- package/dist/owletto/dist/assets/index-BwnFQcMe.js +0 -2
- package/dist/owletto/dist/assets/index-CvYsWYlF.js +0 -2
- package/dist/owletto/dist/assets/index-DIXIvtnM.js +0 -2
- package/dist/owletto/dist/assets/index-DLwokXHW.js +0 -2
- package/dist/owletto/dist/assets/index-_nlPHus1.js +0 -2
- package/dist/owletto/dist/assets/index-cwOgj4-i.js +0 -2
- package/dist/owletto/dist/assets/index-pp4qmhkA.js +0 -2
- package/dist/owletto/dist/assets/index-tTbno-PX.css +0 -1
- package/dist/owletto/dist/assets/json-diff-B-1Swv_y.js +0 -28
- package/dist/owletto/dist/assets/member-scope-gate-Lj9m4RL2.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-rAKfVdQ_.js +0 -74
- package/dist/owletto/dist/assets/model-selector-onvGA9Ww.js +0 -2
- package/dist/owletto/dist/assets/new-BmehH1uR.js +0 -2
- package/dist/owletto/dist/assets/new-KDi15LWZ.js +0 -2
- package/dist/owletto/dist/assets/organization-B9bh20Xo.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-Bqus80Mq.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-CnACXCUg.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-Dlh-eWz0.js +0 -2
- package/dist/owletto/dist/assets/record-activity-6CfR95Ul.js +0 -2
- package/dist/owletto/dist/assets/run-initiator-BvruBM5H.js +0 -2
- package/dist/owletto/dist/assets/runs-BMzp7j7j.js +0 -2
- package/dist/owletto/dist/assets/runs-list-DVhrTr3v.js +0 -2
- package/dist/owletto/dist/assets/schema-type-editor-panel-Bdeumkux.js +0 -2
- package/dist/owletto/dist/assets/source-record-panels-CBV9tsR3.js +0 -2
- package/dist/owletto/dist/assets/use-automations-II_YJWtN.js +0 -2
- package/dist/owletto/dist/assets/use-login-redirect-BqtEilid.js +0 -2
- package/dist/owletto/dist/assets/use-mention-search-Bxlpd6Dp.js +0 -96
- package/dist/owletto/dist/assets/view-param-filters-DYlqBocg.js +0 -2
|
@@ -47,6 +47,18 @@ function readViewDefinition(js) {
|
|
|
47
47
|
throw new Error(`${at}: ${message}`);
|
|
48
48
|
}
|
|
49
49
|
const def = raw;
|
|
50
|
+
for (const [name, action] of Object.entries(def.actions ?? {})) {
|
|
51
|
+
if (action.emits === undefined && action.updates === undefined) {
|
|
52
|
+
throw new Error(`defineView.actions.${name}: declare emits, updates, or both`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const resources = [...new Set(def.resources ?? [])];
|
|
56
|
+
for (const entry of resources) {
|
|
57
|
+
const problem = imageOriginProblem(entry);
|
|
58
|
+
if (problem) {
|
|
59
|
+
throw new Error(`defineView.resources: ${JSON.stringify(entry)} ${problem}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
50
62
|
return {
|
|
51
63
|
key: def.key,
|
|
52
64
|
name: def.name?.trim() ? def.name : def.key,
|
|
@@ -54,8 +66,48 @@ function readViewDefinition(js) {
|
|
|
54
66
|
attach: def.attach,
|
|
55
67
|
params: def.params ?? {},
|
|
56
68
|
actions: def.actions ?? {},
|
|
69
|
+
resources,
|
|
57
70
|
};
|
|
58
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Why `entry` is not a declarable image origin, or null when it is: exactly
|
|
74
|
+
* `https://<host>[:port]` as the URL parser prints the origin (so no path,
|
|
75
|
+
* query, fragment, userinfo, uppercase or default port), with a public
|
|
76
|
+
* multi-label hostname. Localhost, IP literals and single-label hosts would
|
|
77
|
+
* point a viewer's browser at their own machine or network.
|
|
78
|
+
*/
|
|
79
|
+
function imageOriginProblem(entry) {
|
|
80
|
+
let url;
|
|
81
|
+
try {
|
|
82
|
+
url = new URL(entry);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return "is not a URL; write an origin like https://tiles.example.com";
|
|
86
|
+
}
|
|
87
|
+
if (url.protocol !== "https:")
|
|
88
|
+
return "must use https";
|
|
89
|
+
if (url.hostname.includes("*"))
|
|
90
|
+
return "cannot use a wildcard; list each origin";
|
|
91
|
+
if (url.origin !== entry) {
|
|
92
|
+
return `must be a bare origin with no path, query, fragment or credentials; write ${url.origin}`;
|
|
93
|
+
}
|
|
94
|
+
const host = url.hostname;
|
|
95
|
+
// The URL parser brackets every IPv6 literal and rewrites any host whose
|
|
96
|
+
// last label is numeric into IPv4, so these two checks cover IP literals.
|
|
97
|
+
const labels = host.split(".");
|
|
98
|
+
const last = labels[labels.length - 1] ?? "";
|
|
99
|
+
const numeric = last !== "" && [...last].every((c) => c >= "0" && c <= "9");
|
|
100
|
+
if (host.startsWith("[") || numeric) {
|
|
101
|
+
return "must name a host, not an IP address";
|
|
102
|
+
}
|
|
103
|
+
if (host === "localhost" || host.endsWith(".localhost")) {
|
|
104
|
+
return "must be a public host, not localhost";
|
|
105
|
+
}
|
|
106
|
+
if (labels.length < 2 || labels.some((label) => label === "")) {
|
|
107
|
+
return "must be a fully qualified public hostname";
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
59
111
|
function defineViewLocalName(body) {
|
|
60
112
|
for (const statement of body) {
|
|
61
113
|
if (statement.type !== "ImportDeclaration")
|
|
@@ -1,7 +1,75 @@
|
|
|
1
|
+
import type { CollectionSelection } from "./collection-selection";
|
|
1
2
|
/** Browser bridge routing hints, never authority. */
|
|
2
3
|
export declare const VIEW_WORKSPACE_META_KEY = "lobu/view-workspace";
|
|
3
4
|
export declare const VIEW_OPEN_RECORD_METHOD = "lobu/open-record";
|
|
4
5
|
/** A mixed read/write tool is admitted only for these fixed read actions.
|
|
5
6
|
* The server still applies the visiting user's authorization and org scope. */
|
|
6
7
|
export declare function isViewRead(tool: string, args: Record<string, unknown> | undefined): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Embedded views: a view places another, independently registered view in a
|
|
10
|
+
* slot. The guest only reports where its slots are; the web host mounts each
|
|
11
|
+
* child as its own sandboxed frame over the slot, with the visitor's session,
|
|
12
|
+
* its own view key and its own actions — the parent never hosts the child's
|
|
13
|
+
* code, so it cannot speak for it. A host that does not implement the methods
|
|
14
|
+
* answers -32601 and the guest says so in the slot.
|
|
15
|
+
*/
|
|
16
|
+
/** guest → host request: the slots on screen now. Answered per slot. */
|
|
17
|
+
export declare const VIEW_EMBEDS_SYNC_METHOD = "lobu/embeds/sync";
|
|
18
|
+
/** guest → host request: keyboard focus moves into a slot's child, `{ id,
|
|
19
|
+
* direction? }`; `direction` says which way the visitor was tabbing. */
|
|
20
|
+
export declare const VIEW_EMBEDS_FOCUS_METHOD = "lobu/embeds/focus";
|
|
21
|
+
/** host → guest: a child's height, so the slot reserves its space. */
|
|
22
|
+
export declare const VIEW_EMBED_SIZE_NOTIFICATION = "lobu/notifications/embed-size";
|
|
23
|
+
/** host → guest: keyboard focus left a child; continue after or before it. */
|
|
24
|
+
export declare const VIEW_EMBED_FOCUS_NOTIFICATION = "lobu/notifications/embed-focus";
|
|
25
|
+
/** host → child guest: keyboard focus entered this embedded view, `{ direction
|
|
26
|
+
* }`; it lands on the first control going forward, the last going backward,
|
|
27
|
+
* so entering a child is one Tab, never a stop on its empty document. */
|
|
28
|
+
export declare const VIEW_FOCUS_ENTER_NOTIFICATION = "lobu/notifications/focus-enter";
|
|
29
|
+
export type ViewFocusDirection = "forward" | "backward";
|
|
30
|
+
/** Child frames one view may show at once. */
|
|
31
|
+
export declare const VIEW_EMBED_MAX_COUNT = 8;
|
|
32
|
+
/** Nesting below the page's own view: a child may embed, a grandchild may not. */
|
|
33
|
+
export declare const VIEW_EMBED_MAX_DEPTH = 2;
|
|
34
|
+
/** Params one slot may pass to its child. */
|
|
35
|
+
export declare const VIEW_EMBED_MAX_PARAMS = 20;
|
|
36
|
+
export type ViewEmbedParams = Record<string, string | number | boolean>;
|
|
37
|
+
/** The child's subject, combined by the same rule as `open_view`'s scope
|
|
38
|
+
* (`viewScopeShapeError`); `entity` may also be a source key, which then
|
|
39
|
+
* needs `type`. The collection selection is the host-owned list filter —
|
|
40
|
+
* never one of the child's own params. */
|
|
41
|
+
export interface ViewEmbedScope {
|
|
42
|
+
type?: string;
|
|
43
|
+
entity?: number | string;
|
|
44
|
+
event?: number;
|
|
45
|
+
collection?: CollectionSelection;
|
|
46
|
+
}
|
|
47
|
+
export interface ViewEmbedBox {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
}
|
|
53
|
+
/** One slot as the guest reports it; `rect` is in the guest's viewport.
|
|
54
|
+
* `rect.clip` is the part of it the guest actually shows — inside every
|
|
55
|
+
* scrolling or clipping ancestor, and outside any dialog or menu laid over
|
|
56
|
+
* it — so the host never lets the child cover the parent's own controls.
|
|
57
|
+
* Absent means all of it; an empty box means none. */
|
|
58
|
+
export interface ViewEmbedSlot {
|
|
59
|
+
id: string;
|
|
60
|
+
view: string;
|
|
61
|
+
scope: ViewEmbedScope;
|
|
62
|
+
params: ViewEmbedParams;
|
|
63
|
+
rect: ViewEmbedBox & {
|
|
64
|
+
clip?: ViewEmbedBox;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export type ViewEmbedStatus = {
|
|
68
|
+
id: string;
|
|
69
|
+
status: "mounted";
|
|
70
|
+
} | {
|
|
71
|
+
id: string;
|
|
72
|
+
status: "refused";
|
|
73
|
+
reason: "cycle" | "depth" | "limit" | "invalid";
|
|
74
|
+
};
|
|
7
75
|
//# sourceMappingURL=view-host.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VIEW_OPEN_RECORD_METHOD = exports.VIEW_WORKSPACE_META_KEY = void 0;
|
|
3
|
+
exports.VIEW_EMBED_MAX_PARAMS = exports.VIEW_EMBED_MAX_DEPTH = exports.VIEW_EMBED_MAX_COUNT = exports.VIEW_FOCUS_ENTER_NOTIFICATION = exports.VIEW_EMBED_FOCUS_NOTIFICATION = exports.VIEW_EMBED_SIZE_NOTIFICATION = exports.VIEW_EMBEDS_FOCUS_METHOD = exports.VIEW_EMBEDS_SYNC_METHOD = exports.VIEW_OPEN_RECORD_METHOD = exports.VIEW_WORKSPACE_META_KEY = void 0;
|
|
4
4
|
exports.isViewRead = isViewRead;
|
|
5
5
|
/** Browser bridge routing hints, never authority. */
|
|
6
6
|
exports.VIEW_WORKSPACE_META_KEY = "lobu/view-workspace";
|
|
@@ -8,6 +8,8 @@ exports.VIEW_OPEN_RECORD_METHOD = "lobu/open-record";
|
|
|
8
8
|
/** A mixed read/write tool is admitted only for these fixed read actions.
|
|
9
9
|
* The server still applies the visiting user's authorization and org scope. */
|
|
10
10
|
function isViewRead(tool, args) {
|
|
11
|
+
if (tool === "read_knowledge")
|
|
12
|
+
return true;
|
|
11
13
|
if (tool === "manage_entity") {
|
|
12
14
|
return (args?.action === "list" ||
|
|
13
15
|
args?.action === "get" ||
|
|
@@ -25,4 +27,31 @@ function isViewRead(tool, args) {
|
|
|
25
27
|
args?.schema_type === "entity_type" &&
|
|
26
28
|
(args.action === "list" || args.action === "get"));
|
|
27
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Embedded views: a view places another, independently registered view in a
|
|
32
|
+
* slot. The guest only reports where its slots are; the web host mounts each
|
|
33
|
+
* child as its own sandboxed frame over the slot, with the visitor's session,
|
|
34
|
+
* its own view key and its own actions — the parent never hosts the child's
|
|
35
|
+
* code, so it cannot speak for it. A host that does not implement the methods
|
|
36
|
+
* answers -32601 and the guest says so in the slot.
|
|
37
|
+
*/
|
|
38
|
+
/** guest → host request: the slots on screen now. Answered per slot. */
|
|
39
|
+
exports.VIEW_EMBEDS_SYNC_METHOD = "lobu/embeds/sync";
|
|
40
|
+
/** guest → host request: keyboard focus moves into a slot's child, `{ id,
|
|
41
|
+
* direction? }`; `direction` says which way the visitor was tabbing. */
|
|
42
|
+
exports.VIEW_EMBEDS_FOCUS_METHOD = "lobu/embeds/focus";
|
|
43
|
+
/** host → guest: a child's height, so the slot reserves its space. */
|
|
44
|
+
exports.VIEW_EMBED_SIZE_NOTIFICATION = "lobu/notifications/embed-size";
|
|
45
|
+
/** host → guest: keyboard focus left a child; continue after or before it. */
|
|
46
|
+
exports.VIEW_EMBED_FOCUS_NOTIFICATION = "lobu/notifications/embed-focus";
|
|
47
|
+
/** host → child guest: keyboard focus entered this embedded view, `{ direction
|
|
48
|
+
* }`; it lands on the first control going forward, the last going backward,
|
|
49
|
+
* so entering a child is one Tab, never a stop on its empty document. */
|
|
50
|
+
exports.VIEW_FOCUS_ENTER_NOTIFICATION = "lobu/notifications/focus-enter";
|
|
51
|
+
/** Child frames one view may show at once. */
|
|
52
|
+
exports.VIEW_EMBED_MAX_COUNT = 8;
|
|
53
|
+
/** Nesting below the page's own view: a child may embed, a grandchild may not. */
|
|
54
|
+
exports.VIEW_EMBED_MAX_DEPTH = 2;
|
|
55
|
+
/** Params one slot may pass to its child. */
|
|
56
|
+
exports.VIEW_EMBED_MAX_PARAMS = 20;
|
|
28
57
|
//# sourceMappingURL=view-host.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
|
+
export declare const ViewKeySchema: import("@sinclair/typebox").TString;
|
|
3
|
+
export declare const ViewScopeSchema: import("@sinclair/typebox").TObject<{
|
|
4
|
+
collection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
5
|
+
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6
|
+
filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
7
|
+
field: import("@sinclair/typebox").TString;
|
|
8
|
+
op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"eq">, import("@sinclair/typebox").TLiteral<"neq">]>;
|
|
9
|
+
value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>;
|
|
10
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
11
|
+
field: import("@sinclair/typebox").TString;
|
|
12
|
+
op: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"lt">, import("@sinclair/typebox").TLiteral<"lte">, import("@sinclair/typebox").TLiteral<"gt">, import("@sinclair/typebox").TLiteral<"gte">]>;
|
|
13
|
+
value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
|
|
14
|
+
}>]>>>;
|
|
15
|
+
segment: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
16
|
+
}>>;
|
|
17
|
+
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
18
|
+
entity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
19
|
+
event: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
20
|
+
}>;
|
|
21
|
+
export type ViewScopeInput = Static<typeof ViewScopeSchema>;
|
|
22
|
+
/** Which scope fields combine. `open_view`, a navigation entry and an
|
|
23
|
+
* embedded view all apply this one rule, so a scope one accepts the others
|
|
24
|
+
* accept too. Null when the combination is valid. */
|
|
25
|
+
export declare function viewScopeShapeError(scope: {
|
|
26
|
+
type?: unknown;
|
|
27
|
+
entity?: unknown;
|
|
28
|
+
event?: unknown;
|
|
29
|
+
collection?: unknown;
|
|
30
|
+
}): string | null;
|
|
31
|
+
//# sourceMappingURL=view-scope.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewScopeSchema = exports.ViewKeySchema = void 0;
|
|
4
|
+
exports.viewScopeShapeError = viewScopeShapeError;
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
const collection_selection_1 = require("./collection-selection");
|
|
7
|
+
// A view key names the module: lowercase, dashes, 1-64 chars. The folder is
|
|
8
|
+
// only a convention — the key is the identity (no `custom:<name>` prefix).
|
|
9
|
+
exports.ViewKeySchema = typebox_1.Type.String({
|
|
10
|
+
pattern: "^[a-z0-9][a-z0-9-]{0,63}$",
|
|
11
|
+
minLength: 1,
|
|
12
|
+
maxLength: 64,
|
|
13
|
+
description: "View key, e.g. 'pipeline'.",
|
|
14
|
+
});
|
|
15
|
+
// What a view opens for: `open_view`'s scope, and a navigation entry's. The
|
|
16
|
+
// page it lands on follows from the view's attachments; scope is never
|
|
17
|
+
// inferred from where a link sits.
|
|
18
|
+
exports.ViewScopeSchema = typebox_1.Type.Object({
|
|
19
|
+
collection: typebox_1.Type.Optional(collection_selection_1.CollectionSelectionSchema),
|
|
20
|
+
type: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
21
|
+
minLength: 1,
|
|
22
|
+
description: "Entity-type slug the view opens for.",
|
|
23
|
+
})),
|
|
24
|
+
entity: typebox_1.Type.Optional(typebox_1.Type.Integer({ description: "Entity id the view opens for." })),
|
|
25
|
+
event: typebox_1.Type.Optional(typebox_1.Type.Integer({
|
|
26
|
+
description: "Event id the view opens for. It names the event's supersede lineage, so the view shows the current version, and it opens at /events/<id>/-/views/<key>.",
|
|
27
|
+
})),
|
|
28
|
+
}, {
|
|
29
|
+
description: "Required unless the view is attached to the workspace. Pass scope.type, scope.entity, or scope.event to select its subject.",
|
|
30
|
+
});
|
|
31
|
+
/** Which scope fields combine. `open_view`, a navigation entry and an
|
|
32
|
+
* embedded view all apply this one rule, so a scope one accepts the others
|
|
33
|
+
* accept too. Null when the combination is valid. */
|
|
34
|
+
function viewScopeShapeError(scope) {
|
|
35
|
+
if (scope.collection !== undefined &&
|
|
36
|
+
(!scope.type || scope.entity !== undefined || scope.event !== undefined)) {
|
|
37
|
+
return "Collection selection requires scope.type without entity or event";
|
|
38
|
+
}
|
|
39
|
+
if (scope.event !== undefined &&
|
|
40
|
+
(scope.type !== undefined || scope.entity !== undefined)) {
|
|
41
|
+
return "scope.event names the view's subject on its own; drop scope.type and scope.entity";
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=view-scope.js.map
|
|
@@ -140,22 +140,17 @@ export declare const AGENT_ERRORS: Record<AgentErrorCode, AgentErrorSpec>;
|
|
|
140
140
|
* Provider says: the key is VALID, the account just cannot spend — a balance,
|
|
141
141
|
* credit, or billing-limit wall rather than a windowed rate limit.
|
|
142
142
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* an
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* first drift silently disabled BOTH the day-park and the provider-health
|
|
151
|
-
* writeback for OpenAI balance exhaustion (observed in prod 2026-08-05). This
|
|
152
|
-
* union closes both — which deliberately promotes reset-less "insufficient
|
|
153
|
-
* quota" wording (OpenAI/Azure billing) into the day-park; the retry-horizon
|
|
154
|
-
* guard in `balanceExhaustedNotBefore` keeps windowed 429s out of it.
|
|
143
|
+
* `classifyErrorMessage` maps this wording to `PROVIDER_QUOTA_EXHAUSTED`, and
|
|
144
|
+
* the device daemon stops an OpenCode run that is retrying it, since no retry
|
|
145
|
+
* clears an empty balance. It lives in core because separate copies of this
|
|
146
|
+
* list drifted in both directions: one learned OpenAI's "no credits remaining"
|
|
147
|
+
* while the classifier did not, and the classifier matched "insufficient
|
|
148
|
+
* quota" while the other did not, which left OpenAI balance exhaustion
|
|
149
|
+
* unclassified in prod (2026-08-05). This union closes both.
|
|
155
150
|
*
|
|
156
151
|
* Keep this to balance/billing wording only. Windowed limits ("too many
|
|
157
|
-
* requests", a bare 429) classify as quota too, but
|
|
158
|
-
*
|
|
152
|
+
* requests", a bare 429) classify as quota too, but they self-heal, often
|
|
153
|
+
* within the minute, so they belong in {@link PROVIDER_WINDOWED_QUOTA}.
|
|
159
154
|
*/
|
|
160
155
|
export declare const PROVIDER_BALANCE_EXHAUSTED: RegExp;
|
|
161
156
|
/**
|
|
@@ -165,17 +160,15 @@ export declare const PROVIDER_BALANCE_EXHAUSTED: RegExp;
|
|
|
165
160
|
*
|
|
166
161
|
* Hoisted here for exactly the reason {@link PROVIDER_BALANCE_EXHAUSTED} was.
|
|
167
162
|
* This alternation was maintained as three independent literals — the turn
|
|
168
|
-
* classifier (`classify-error.ts`),
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* PROVIDER_* alert.
|
|
163
|
+
* classifier (`classify-error.ts`), a since-removed device schedule check and
|
|
164
|
+
* the server's own `INFRA_PATTERNS` — and drifted the same way the balance
|
|
165
|
+
* list did: the device check learned ChatGPT's `usage limit` and the other two
|
|
166
|
+
* did not, so over the 30 days to 2026-09-15, 47 runs the provider had refused
|
|
167
|
+
* were recorded as the agent's fault, rendered to the user with no remediation
|
|
168
|
+
* CTA, and dodged the PROVIDER_* alert.
|
|
175
169
|
*
|
|
176
|
-
* Keep windowed wording ONLY. These
|
|
177
|
-
* the
|
|
178
|
-
* horizon from the provider's own named reset.
|
|
170
|
+
* Keep windowed wording ONLY. These classify as quota, but they often clear
|
|
171
|
+
* within the minute, so nothing may treat them as a balance wall.
|
|
179
172
|
*/
|
|
180
173
|
export declare const PROVIDER_WINDOWED_QUOTA: RegExp;
|
|
181
174
|
/** Parse an `AgentErrorCode` from an unknown value (payload/DB boundary). */
|
|
@@ -211,22 +211,17 @@ exports.AGENT_ERRORS = {
|
|
|
211
211
|
* Provider says: the key is VALID, the account just cannot spend — a balance,
|
|
212
212
|
* credit, or billing-limit wall rather than a windowed rate limit.
|
|
213
213
|
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* an
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* first drift silently disabled BOTH the day-park and the provider-health
|
|
222
|
-
* writeback for OpenAI balance exhaustion (observed in prod 2026-08-05). This
|
|
223
|
-
* union closes both — which deliberately promotes reset-less "insufficient
|
|
224
|
-
* quota" wording (OpenAI/Azure billing) into the day-park; the retry-horizon
|
|
225
|
-
* guard in `balanceExhaustedNotBefore` keeps windowed 429s out of it.
|
|
214
|
+
* `classifyErrorMessage` maps this wording to `PROVIDER_QUOTA_EXHAUSTED`, and
|
|
215
|
+
* the device daemon stops an OpenCode run that is retrying it, since no retry
|
|
216
|
+
* clears an empty balance. It lives in core because separate copies of this
|
|
217
|
+
* list drifted in both directions: one learned OpenAI's "no credits remaining"
|
|
218
|
+
* while the classifier did not, and the classifier matched "insufficient
|
|
219
|
+
* quota" while the other did not, which left OpenAI balance exhaustion
|
|
220
|
+
* unclassified in prod (2026-08-05). This union closes both.
|
|
226
221
|
*
|
|
227
222
|
* Keep this to balance/billing wording only. Windowed limits ("too many
|
|
228
|
-
* requests", a bare 429) classify as quota too, but
|
|
229
|
-
*
|
|
223
|
+
* requests", a bare 429) classify as quota too, but they self-heal, often
|
|
224
|
+
* within the minute, so they belong in {@link PROVIDER_WINDOWED_QUOTA}.
|
|
230
225
|
*/
|
|
231
226
|
exports.PROVIDER_BALANCE_EXHAUSTED = /credit balance is too low|insufficient (?:credits?|balance|funds|quota)\b|no resource package|billing_hard_limit_reached|payment required|exceeded your current quota|out of credits?\b|no credits remaining/i;
|
|
232
227
|
/**
|
|
@@ -236,17 +231,15 @@ exports.PROVIDER_BALANCE_EXHAUSTED = /credit balance is too low|insufficient (?:
|
|
|
236
231
|
*
|
|
237
232
|
* Hoisted here for exactly the reason {@link PROVIDER_BALANCE_EXHAUSTED} was.
|
|
238
233
|
* This alternation was maintained as three independent literals — the turn
|
|
239
|
-
* classifier (`classify-error.ts`),
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* PROVIDER_* alert.
|
|
234
|
+
* classifier (`classify-error.ts`), a since-removed device schedule check and
|
|
235
|
+
* the server's own `INFRA_PATTERNS` — and drifted the same way the balance
|
|
236
|
+
* list did: the device check learned ChatGPT's `usage limit` and the other two
|
|
237
|
+
* did not, so over the 30 days to 2026-09-15, 47 runs the provider had refused
|
|
238
|
+
* were recorded as the agent's fault, rendered to the user with no remediation
|
|
239
|
+
* CTA, and dodged the PROVIDER_* alert.
|
|
246
240
|
*
|
|
247
|
-
* Keep windowed wording ONLY. These
|
|
248
|
-
* the
|
|
249
|
-
* horizon from the provider's own named reset.
|
|
241
|
+
* Keep windowed wording ONLY. These classify as quota, but they often clear
|
|
242
|
+
* within the minute, so nothing may treat them as a balance wall.
|
|
250
243
|
*/
|
|
251
244
|
exports.PROVIDER_WINDOWED_QUOTA = /limit exhausted|usage limit|rate[-\s]?limit|quota (?:exceeded|exhausted)|too many requests|\b429\b|resource_exhausted/i;
|
|
252
245
|
/** Parse an `AgentErrorCode` from an unknown value (payload/DB boundary). */
|
|
@@ -266,12 +266,6 @@ export interface ThreadResponsePayload {
|
|
|
266
266
|
* the provider's sentence; `errorCode` selects the CTA link.
|
|
267
267
|
*/
|
|
268
268
|
error?: string;
|
|
269
|
-
/**
|
|
270
|
-
* Original terminal error used only for durable run bookkeeping when an
|
|
271
|
-
* output guardrail replaces the user-visible error text. Gateway-owned;
|
|
272
|
-
* renderers must never expose this field to clients.
|
|
273
|
-
*/
|
|
274
|
-
bookkeepingError?: string;
|
|
275
269
|
errorCode?: string;
|
|
276
270
|
/** Non-secret provider/model targeting for the error CTA. */
|
|
277
271
|
errorContext?: AgentErrorContext;
|
package/vendor/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobu/core",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.9.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Core types and utilities for Lobu agent platform",
|
|
6
6
|
"repository": {
|
|
@@ -241,6 +241,16 @@
|
|
|
241
241
|
"import": "./dist/contracts/tools/pagination.js",
|
|
242
242
|
"require": "./dist/contracts/tools/pagination.js"
|
|
243
243
|
},
|
|
244
|
+
"./contracts/tools/navigation": {
|
|
245
|
+
"types": "./dist/contracts/tools/navigation.d.ts",
|
|
246
|
+
"import": "./dist/contracts/tools/navigation.js",
|
|
247
|
+
"require": "./dist/contracts/tools/navigation.js"
|
|
248
|
+
},
|
|
249
|
+
"./contracts/tools/view-scope": {
|
|
250
|
+
"types": "./dist/contracts/tools/view-scope.d.ts",
|
|
251
|
+
"import": "./dist/contracts/tools/view-scope.js",
|
|
252
|
+
"require": "./dist/contracts/tools/view-scope.js"
|
|
253
|
+
},
|
|
244
254
|
"./contracts/tools/view-host": {
|
|
245
255
|
"types": "./dist/contracts/tools/view-host.d.ts",
|
|
246
256
|
"import": "./dist/contracts/tools/view-host.js",
|
|
@@ -145,9 +145,33 @@ export interface ViewDefinition {
|
|
|
145
145
|
* no attach/detach verbs. */
|
|
146
146
|
attach: Attachment[];
|
|
147
147
|
params?: Record<string, ParamDef>;
|
|
148
|
-
actions?: Record<string,
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
actions?: Record<string, ActionDef>;
|
|
149
|
+
/** External origins the view may load images from, such as a map tile
|
|
150
|
+
* server: bare https origins with a public hostname and no path
|
|
151
|
+
* (`"https://tile.openstreetmap.org"`), at most 8. Images only is a
|
|
152
|
+
* save-time check (the validator renders the empty, error and loading
|
|
153
|
+
* states), not a runtime limit: MCP hosts receive these as
|
|
154
|
+
* `resourceDomains`, which also allows scripts, styles, fonts and media
|
|
155
|
+
* from them, and the Lobu web app applies no runtime CSP to views. Declare
|
|
156
|
+
* only image or tile CDN origins you trust. */
|
|
157
|
+
resources?: string[];
|
|
158
|
+
}
|
|
159
|
+
/** A declared action: the event kind it emits, the entity fields it may
|
|
160
|
+
* update, or both (committed in one transaction). */
|
|
161
|
+
export interface ActionDef {
|
|
162
|
+
emits?: string;
|
|
163
|
+
/** Submit `{ entity_id, set: { field: value } }` as the action value. The
|
|
164
|
+
* view must attach to `entityType`. Stamped (x-lobu-stamps) fields are
|
|
165
|
+
* server-owned and refused. */
|
|
166
|
+
updates?: {
|
|
167
|
+
entityType: string;
|
|
168
|
+
fields: string[];
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
export interface ActionOptions {
|
|
172
|
+
/** For an `updates` action: metadata field -> the value this view read.
|
|
173
|
+
* The server checks it under the row lock and refuses a stale write (409). */
|
|
174
|
+
expected?: Record<string, unknown>;
|
|
151
175
|
}
|
|
152
176
|
export declare function defineView(def: ViewDefinition): ViewDefinition;
|
|
153
177
|
export declare function useParams(): readonly [
|
|
@@ -264,8 +288,9 @@ export interface ActionResult {
|
|
|
264
288
|
/** Mint one id for a deliberate submission, retained by its retry closure. */
|
|
265
289
|
export declare function mintInteractionId(): string;
|
|
266
290
|
/** Submit a declared action. Failed acknowledgements expose an explicit retry
|
|
267
|
-
* that keeps the original value, event subject and
|
|
268
|
-
|
|
291
|
+
* that keeps the original value, expected values, event subject and
|
|
292
|
+
* interaction id. */
|
|
293
|
+
export declare function useAction(name: string): (value?: Record<string, unknown>, options?: ActionOptions) => Promise<ActionResult>;
|
|
269
294
|
export declare function defaultsFor(def: ViewDefinition): Params;
|
|
270
295
|
export declare function coerceParams(def: ViewDefinition, raw: unknown): Params;
|
|
271
296
|
export declare function coerceScope(raw: unknown): Scope;
|
package/vendor/views/dist/api.js
CHANGED
|
@@ -2,6 +2,7 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Component, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from "react";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
import { ViewBridge, ViewBridgeError, } from "./bridge.js";
|
|
5
|
+
import { EmbedProvider, EmbedRegistry } from "./embed.js";
|
|
5
6
|
export function defineView(def) {
|
|
6
7
|
if (!def || typeof def.key !== "string" || def.key.length === 0) {
|
|
7
8
|
throw new Error("defineView({ key, attach, ... }) requires a non-empty key");
|
|
@@ -302,13 +303,14 @@ export function mintInteractionId() {
|
|
|
302
303
|
return `${Date.now()}-${Math.floor(Math.random() * 1e9)}`;
|
|
303
304
|
}
|
|
304
305
|
/** Submit a declared action. Failed acknowledgements expose an explicit retry
|
|
305
|
-
* that keeps the original value, event subject and
|
|
306
|
+
* that keeps the original value, expected values, event subject and
|
|
307
|
+
* interaction id. */
|
|
306
308
|
export function useAction(name) {
|
|
307
309
|
const rt = useRuntime();
|
|
308
310
|
if (!rt.def.actions?.[name]) {
|
|
309
311
|
throw new Error(`Action "${name}" is not declared on view "${rt.def.key}"`);
|
|
310
312
|
}
|
|
311
|
-
return useCallback(async (value = {}) => {
|
|
313
|
+
return useCallback(async (value = {}, options = {}) => {
|
|
312
314
|
if (!rt.ready) {
|
|
313
315
|
return {
|
|
314
316
|
ok: false,
|
|
@@ -325,6 +327,9 @@ export function useAction(name) {
|
|
|
325
327
|
view: rt.def.key,
|
|
326
328
|
action: name,
|
|
327
329
|
value,
|
|
330
|
+
...(options.expected === undefined
|
|
331
|
+
? {}
|
|
332
|
+
: { expected: options.expected }),
|
|
328
333
|
...(rt.scope.event === undefined
|
|
329
334
|
? {}
|
|
330
335
|
: { scope: { event: rt.scope.event } }),
|
|
@@ -446,9 +451,10 @@ function applyTheme(theme) {
|
|
|
446
451
|
/**
|
|
447
452
|
* The MCP Apps standard style variables (`McpUiStyleVariableKey`, protocol
|
|
448
453
|
* `2026-01-26`). A host sends any subset in `hostContext.styles.variables`;
|
|
449
|
-
* the shell's tokens (`--
|
|
450
|
-
* radii) derive from them, so a view takes
|
|
451
|
-
* spec's own axes rather than imported: the
|
|
454
|
+
* the shell's shadcn tokens (`--foreground`, `--muted-foreground`, `--muted`,
|
|
455
|
+
* `--accent`, `--border`, the font and radii) derive from them, so a view takes
|
|
456
|
+
* the host's look. Built from the spec's own axes rather than imported: the
|
|
457
|
+
* guest carries no ext-apps code.
|
|
452
458
|
*/
|
|
453
459
|
const SEMANTIC = ["primary", "secondary", "tertiary", "inverse", "ghost"];
|
|
454
460
|
const STATUS = ["info", "danger", "success", "warning"];
|
|
@@ -512,7 +518,7 @@ class RenderBoundary extends Component {
|
|
|
512
518
|
render() {
|
|
513
519
|
if (!this.state.error)
|
|
514
520
|
return this.props.children;
|
|
515
|
-
return (_jsxs("div", { role: "alert", "data-lobu-render-error": "true", style: { padding: 12, color: "var(--
|
|
521
|
+
return (_jsxs("div", { role: "alert", "data-lobu-render-error": "true", style: { padding: 12, color: "var(--foreground)" }, children: ["This view failed to render: ", this.state.error.message] }));
|
|
516
522
|
}
|
|
517
523
|
}
|
|
518
524
|
/**
|
|
@@ -535,6 +541,10 @@ export function Provider({ def, bridge, children, }) {
|
|
|
535
541
|
bridgeRef.current = bridge;
|
|
536
542
|
if (bridgeRef.current === null)
|
|
537
543
|
bridgeRef.current = new ViewBridge();
|
|
544
|
+
const embedsRef = useRef(null);
|
|
545
|
+
if (embedsRef.current === null)
|
|
546
|
+
embedsRef.current = new EmbedRegistry(() => bridgeRef.current);
|
|
547
|
+
const embeds = embedsRef.current;
|
|
538
548
|
useEffect(() => {
|
|
539
549
|
const b = bridgeRef.current;
|
|
540
550
|
// Unreachable in practice (the body above always installs a bridge
|
|
@@ -565,10 +575,12 @@ export function Provider({ def, bridge, children, }) {
|
|
|
565
575
|
};
|
|
566
576
|
const offCtx = b.onHostContext(adoptContext);
|
|
567
577
|
const offData = b.onDataChanged(() => setDataVersion((v) => v + 1));
|
|
578
|
+
const offEmbeds = embeds.attach(b);
|
|
568
579
|
b.connect()
|
|
569
580
|
.then((ctx) => {
|
|
570
581
|
adoptContext(ctx);
|
|
571
582
|
setConnected(true);
|
|
583
|
+
embeds.setConnected(true);
|
|
572
584
|
setReady(b.hasToolInput());
|
|
573
585
|
document.documentElement.setAttribute("data-ready", "true");
|
|
574
586
|
})
|
|
@@ -578,8 +590,10 @@ export function Provider({ def, bridge, children, }) {
|
|
|
578
590
|
offResult();
|
|
579
591
|
offCtx();
|
|
580
592
|
offData();
|
|
593
|
+
offEmbeds();
|
|
594
|
+
embeds.setConnected(false);
|
|
581
595
|
};
|
|
582
|
-
}, [def]);
|
|
596
|
+
}, [def, embeds]);
|
|
583
597
|
// Report the document height so the host can fit the frame. This lives in
|
|
584
598
|
// the provider, not `mountView`: the server bootstrap renders the provider
|
|
585
599
|
// directly, and a frame that never hears a size stays at its minimum height.
|
|
@@ -700,7 +714,7 @@ export function Provider({ def, bridge, children, }) {
|
|
|
700
714
|
]);
|
|
701
715
|
// A host-resolved replacement is a new form, including in MCP hosts that
|
|
702
716
|
// keep the iframe mounted while delivering the opening result.
|
|
703
|
-
return (_jsx(Ctx.Provider, { value: value, children: _jsx(RenderBoundary, { resetKey: `${ready}:${JSON.stringify(scope)}:${JSON.stringify(params)}:${dataVersion}`, children: children }) }, scope.event ?? "unbound"));
|
|
717
|
+
return (_jsx(Ctx.Provider, { value: value, children: _jsx(EmbedProvider, { registry: embeds, children: _jsx(RenderBoundary, { resetKey: `${ready}:${JSON.stringify(scope)}:${JSON.stringify(params)}:${dataVersion}`, children: children }) }) }, scope.event ?? "unbound"));
|
|
704
718
|
}
|
|
705
719
|
/** Entry point the compiled bundle calls once. Mounts the component into
|
|
706
720
|
* `#root` and connects to the host. */
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* like the SDK's transport.
|
|
15
15
|
*/
|
|
16
16
|
import type { EntityGetInput } from "@lobu/core/contracts/tools/manage-entity";
|
|
17
|
+
import { type ViewEmbedSlot, type ViewEmbedStatus, type ViewFocusDirection } from "@lobu/core/contracts/tools/view-host";
|
|
17
18
|
export declare class ViewBridgeError extends Error {
|
|
18
19
|
readonly code: number;
|
|
19
20
|
constructor(message: string, code: number);
|
|
@@ -74,6 +75,9 @@ export declare class ViewBridge {
|
|
|
74
75
|
private toolCancelledListeners;
|
|
75
76
|
private hostContextListeners;
|
|
76
77
|
private dataChangedListeners;
|
|
78
|
+
private embedSizeListeners;
|
|
79
|
+
private embedFocusListeners;
|
|
80
|
+
private focusEnterListeners;
|
|
77
81
|
/** Set by the first `tool-input` and never cleared: queries must not fire
|
|
78
82
|
* before it (the host seeds scope + params there; anything read earlier
|
|
79
83
|
* runs against defaults and double-fetches). */
|
|
@@ -103,6 +107,19 @@ export declare class ViewBridge {
|
|
|
103
107
|
/** The host saw workspace data change (Lobu hosts only; other hosts never
|
|
104
108
|
* send it, and reads then refresh on their own triggers). */
|
|
105
109
|
onDataChanged(listener: () => void): () => void;
|
|
110
|
+
/** A child view's height in a slot (Lobu web host only). */
|
|
111
|
+
onEmbedSize(listener: (id: string, height: number) => void): () => void;
|
|
112
|
+
/** Keyboard focus left a slot's child (Lobu web host only). */
|
|
113
|
+
onEmbedFocus(listener: (id: string, direction: ViewFocusDirection) => void): () => void;
|
|
114
|
+
/** Keyboard focus entered this view as a slot's child (Lobu web host only). */
|
|
115
|
+
onFocusEnter(listener: (direction: ViewFocusDirection) => void): () => void;
|
|
116
|
+
/** Report every slot on screen. Rejects with code -32601 on a host that
|
|
117
|
+
* does not mount embedded views. */
|
|
118
|
+
syncEmbeds(embeds: ViewEmbedSlot[]): Promise<{
|
|
119
|
+
embeds?: ViewEmbedStatus[];
|
|
120
|
+
}>;
|
|
121
|
+
/** Move keyboard focus into a slot's child. */
|
|
122
|
+
focusEmbed(id: string, direction: ViewFocusDirection): Promise<unknown>;
|
|
106
123
|
/**
|
|
107
124
|
* Run the `ui/initialize` handshake, then announce readiness. Resolves with
|
|
108
125
|
* the host context. Rejects when the host answers with an error or stays
|