@lobu/runtime-server 23.0.0 → 24.1.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 +70 -6
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +1 -1
- package/dist/connectors/linkedin-inbox-adapter.js +4 -7
- package/dist/connectors/linkedin.ts +53 -34
- package/dist/connectors/reddit.ts +92 -20
- package/dist/connectors/slack.ts +1 -0
- package/dist/connectors/whatsapp-web-adapter.js +41 -11
- package/dist/connectors/whatsapp-web-helpers.ts +1 -1
- package/dist/connectors/whatsapp_web.ts +2 -2
- package/dist/connectors/x-dm-adapter.js +65 -30
- package/dist/connectors/x-identity.ts +5 -3
- package/dist/db/migrations/20261019120000_retire_identities_of_deleted_entities.sql +21 -0
- package/dist/db/migrations/20261020120000_entities_live_metadata_domain.sql +66 -0
- package/dist/db/migrations/20261020130000_agents_starters.sql +14 -0
- package/dist/db/migrations/20261020140000_view_attachments_by_page.sql +71 -0
- package/dist/db/migrations/20261021010000_views_compile_config_hash.sql +16 -0
- package/dist/dependencies.bun.lock +64 -61
- package/dist/guest.bundle.js +362 -300
- package/dist/owletto/dist/assets/_-BorucF19.js +3 -0
- package/dist/owletto/dist/assets/_-CkGyNi0G.js +2 -0
- package/dist/owletto/dist/assets/_agentId-BrhcaxUk.js +2 -0
- package/dist/owletto/dist/assets/_agentId-DgRrCE2B.js +2 -0
- package/dist/owletto/dist/assets/_automationId-DSrZIYcs.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-DWxv1uoi.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-BTP5ijdT.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-98Y3RuRO.js +2 -0
- package/dist/owletto/dist/assets/{_deploymentId-BuUzGtVL.js → _deploymentId-B1UWPY0i.js} +2 -2
- package/dist/owletto/dist/assets/_eventId-BAnr8g8z.js +2 -0
- package/dist/owletto/dist/assets/_name-BUfFO_A0.js +2 -0
- package/dist/owletto/dist/assets/_owner-C79BwQ0I.js +3 -0
- package/dist/owletto/dist/assets/_shape-Ep6JpyFX.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-B24alBfT.js +2 -0
- package/dist/owletto/dist/assets/_slug-DbPdDc-5.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-DDUxjjFD.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-hdpq3RoX.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-w17IFTtf.js → accept-invitation-UXU5Fx2G.js} +2 -2
- package/dist/owletto/dist/assets/activity-route-view-D7ORHntE.js +2 -0
- package/dist/owletto/dist/assets/{agent-card-controls-mnTN2AZt.js → agent-card-controls-CplnPhbv.js} +2 -2
- package/dist/owletto/dist/assets/{agent-client-setup-list-Bg3hBfUV.js → agent-client-setup-list-BlXB4SE5.js} +2 -2
- package/dist/owletto/dist/assets/agent-connect-pages-BmknviTI.js +2 -0
- package/dist/owletto/dist/assets/agent-editor-form-DsSoeQeF.js +2 -0
- package/dist/owletto/dist/assets/{agent-guardrails-route-BOrCXcAl.js → agent-guardrails-route-TdvvIc_J.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-Dqcvky-k.js → agent-loading-shells-B7v6Cffw.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-BOo_4r_4.js → agent-permissions-matrix-BkZu1LYE.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-CCdvtlmH.js → agent-skill-context-DFucg4c4.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skills-route-BUxIswuq.js → agent-skills-route-B3vvvZZe.js} +2 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-CZJvnjNC.js +2 -0
- package/dist/owletto/dist/assets/agent-thread-D38STyeu.js +6 -0
- package/dist/owletto/dist/assets/agents-DAOln24A.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-DJ67GZ93.js +2 -0
- package/dist/owletto/dist/assets/app._appId-Cp78oEZ9.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-DSwbRpbx.js +2 -0
- package/dist/owletto/dist/assets/automations-DAOln24A.js +2 -0
- package/dist/owletto/dist/assets/callback-CBexCo3F.js +2 -0
- package/dist/owletto/dist/assets/{card-Djgp00r_.js → card-jzhQrMDP.js} +2 -2
- package/dist/owletto/dist/assets/{claim-BYUZnyMp.js → claim-B-wq745Q.js} +2 -2
- package/dist/owletto/dist/assets/client-rows-BYbsXGy9.js +2 -0
- package/dist/owletto/dist/assets/{clients-D3Zbjxin.js → clients-BhNl1tVq.js} +2 -2
- package/dist/owletto/dist/assets/{code-editor-DHeyRGZI.js → code-editor-CEqoCky-.js} +2 -2
- package/dist/owletto/dist/assets/connect-wx-qqLir.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-kk0_4Svo.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-QR8o-7M5.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-BqprYeOX.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-DhRoSzBr.js +2 -0
- package/dist/owletto/dist/assets/{connection-C3XXFEqh.js → connection-CNm2ukrI.js} +2 -2
- package/dist/owletto/dist/assets/{connection-feed-detail-CIJJLDP8.js → connection-feed-detail-WcGCA6qY.js} +2 -2
- package/dist/owletto/dist/assets/connections-browser-CrtnAs0Q.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-8-d8hl10.js → connector-provenance-D-ECOlMJ.js} +2 -2
- package/dist/owletto/dist/assets/connector-scope-lists-CRFEpSvk.js +2 -0
- package/dist/owletto/dist/assets/connectors-CH4KBZyT.js +2 -0
- package/dist/owletto/dist/assets/{consent-CdSvVCgx.js → consent-C9ZpHb7V.js} +2 -2
- package/dist/owletto/dist/assets/{conversations-table-BdXoZAfc.js → conversations-table-D_HOe1jN.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-CYvgWCuv.js → core.esm-BupT3V0i.js} +2 -2
- package/dist/owletto/dist/assets/create-C4lptGWj.js +2 -0
- package/dist/owletto/dist/assets/create-CCjZxIkK.js +2 -0
- package/dist/owletto/dist/assets/create-DkgUQAbB.js +2 -0
- package/dist/owletto/dist/assets/{create-automation-form-CtSSeYj3.js → create-automation-form-Bpy92SM5.js} +3 -3
- package/dist/owletto/dist/assets/create._connectorKey-D6Kc-YQ3.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-n4qGUraE.js → cronstrue-CWImw-kf.js} +2 -2
- package/dist/owletto/dist/assets/{deployments-RvUdVkj3.js → deployments-C5hvipQh.js} +2 -2
- package/dist/owletto/dist/assets/deployments-CPpFAd_w.js +2 -0
- package/dist/owletto/dist/assets/{deployments-body-BMp7UsMo.js → deployments-body-DGII20dQ.js} +2 -2
- package/dist/owletto/dist/assets/{device-CPU6CjkJ.js → device-D-7WBe9E.js} +2 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-2U0UMu3_.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-Bn37UpWH.js +2 -0
- package/dist/owletto/dist/assets/entity-avatar-mdh7Kq5D.js +2 -0
- package/dist/owletto/dist/assets/entity-options-Clz_WXK-.js +2 -0
- package/dist/owletto/dist/assets/entity-page-D3e4iPle.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-DebN1vCM.js +2 -0
- package/dist/owletto/dist/assets/event-detail-DV_zfWnC.js +2 -0
- package/dist/owletto/dist/assets/events-feed-DO3IiJO2.js +2 -0
- package/dist/owletto/dist/assets/filter-editors-Bwhqj7lY.js +2 -0
- package/dist/owletto/dist/assets/{full-page-spinner-DqpH99np.js → full-page-spinner-BVbcpW3R.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-BiJollCA.js +2 -0
- package/dist/owletto/dist/assets/identity-HCFWtdaI.js +2 -0
- package/dist/owletto/dist/assets/index-8wxsyxqt.js +2 -0
- package/dist/owletto/dist/assets/index-9YuSRymd.js +7950 -0
- package/dist/owletto/dist/assets/index-B3c-0eZG.js +2 -0
- package/dist/owletto/dist/assets/index-B64PGxQm.js +2 -0
- package/dist/owletto/dist/assets/index-BSH07yVD.css +1 -0
- package/dist/owletto/dist/assets/{index-Hio-HRfo.js → index-BTlx9K_t.js} +2 -2
- package/dist/owletto/dist/assets/index-BX0EA_oB.js +2 -0
- package/dist/owletto/dist/assets/index-CdJJaQDX.js +2 -0
- package/dist/owletto/dist/assets/index-CfT_W8Vo.js +2 -0
- package/dist/owletto/dist/assets/index-CxF2XXzl.js +2 -0
- package/dist/owletto/dist/assets/index-D3WHeGql.js +2 -0
- package/dist/owletto/dist/assets/{index-ICgKp3YK.js → index-D7gHOpfg.js} +2 -2
- package/dist/owletto/dist/assets/{index-B9uPN6FC.js → index-DB1iWI_a.js} +2 -2
- package/dist/owletto/dist/assets/index-DMNzF8Lf.js +2 -0
- package/dist/owletto/dist/assets/index-DyB3IzOA.js +2 -0
- package/dist/owletto/dist/assets/{index-BQVliQW1.js → index-fgAJydgX.js} +2 -2
- package/dist/owletto/dist/assets/{json-diff-DBoag_OS.js → json-diff-DIN5Jhfx.js} +3 -3
- package/dist/owletto/dist/assets/{list-skeleton-C_GuoxAH.js → list-skeleton-CepswBka.js} +2 -2
- package/dist/owletto/dist/assets/login-DxGYyE4n.js +2 -0
- package/dist/owletto/dist/assets/{logout-CLGgeZB7.js → logout-Bkzc7J44.js} +2 -2
- package/dist/owletto/dist/assets/member-scope-gate-DD4YBFn-.js +2 -0
- package/dist/owletto/dist/assets/memory-browse-page-D_UlBa27.js +103 -0
- package/dist/owletto/dist/assets/{model-selector-dAbDgJvx.js → model-selector-CDrAjH31.js} +2 -2
- package/dist/owletto/dist/assets/models-BAVeysNq.js +2 -0
- package/dist/owletto/dist/assets/new-C2av0diq.js +2 -0
- package/dist/owletto/dist/assets/{new-BkdULx2r.js → new-ktz9Cs_P.js} +2 -2
- package/dist/owletto/dist/assets/new-snm1ctHn.js +2 -0
- package/dist/owletto/dist/assets/{oauth-workspace-access-BxsjwgdH.js → oauth-workspace-access-lZNZ9gul.js} +2 -2
- package/dist/owletto/dist/assets/{organization-gxGeDjIV.js → organization-Cb0W823y.js} +2 -2
- package/dist/owletto/dist/assets/peek-pane-content-BNR9ImQY.js +2 -0
- package/dist/owletto/dist/assets/{permissions-aPHaKLec.js → permissions-Dv39zWKt.js} +2 -2
- package/dist/owletto/dist/assets/proposal-review-shell-CFhOqCLf.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-DqX8AXfw.js +2 -0
- package/dist/owletto/dist/assets/{recent-D-65Pgu-.js → recent-QhnLDU1_.js} +2 -2
- package/dist/owletto/dist/assets/record-activity-ZJntBfN_.js +2 -0
- package/dist/owletto/dist/assets/record-field-peek-Brh1IQGy.js +2 -0
- package/dist/owletto/dist/assets/record-session-Pbr5czGw.js +2 -0
- package/dist/owletto/dist/assets/{reset-password-uX_V6bip.js → reset-password-CzZw6RcC.js} +2 -2
- package/dist/owletto/dist/assets/runs-panel-C0_DNTcq.js +2 -0
- package/dist/owletto/dist/assets/runs-table-B1APZv7d.js +2 -0
- package/dist/owletto/dist/assets/schema-value-normalization-CKdPjdPC.js +97 -0
- package/dist/owletto/dist/assets/settings-CgZ5Z7wD.js +2 -0
- package/dist/owletto/dist/assets/settings-VDNiffKU.js +2 -0
- package/dist/owletto/dist/assets/skills-DgDGscm5.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-CPyzlfD1.js → source-record-panels-BdfOVPWn.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-By8RZyKW.js → use-mention-search-Dcunv4L0.js} +2 -2
- package/dist/owletto/dist/assets/view-param-filters-B0quibBi.js +2 -0
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +4226 -3348
- package/npm-shrinkwrap.json +280 -264
- package/package.json +6 -5
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/agent-policy.js +0 -3
- package/vendor/core/dist/agent-tooling.d.ts +1 -1
- package/vendor/core/dist/agent-tooling.js +3 -1
- package/vendor/core/dist/contracts/agent-settings.d.ts +6 -2
- package/vendor/core/dist/contracts/agent-settings.js +12 -1
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +53 -234
- package/vendor/core/dist/contracts/tools/manage-views.js +50 -76
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +5 -8
- package/vendor/core/dist/contracts/tools/view-attach.js +14 -31
- package/vendor/core/dist/contracts/tools/view-definition.d.ts +21 -0
- package/vendor/core/dist/contracts/tools/view-definition.js +165 -0
- package/vendor/core/dist/contracts/tools/view-runtime.d.ts +74 -0
- package/vendor/core/dist/contracts/tools/view-runtime.js +86 -0
- package/vendor/core/dist/contracts/worker/protocol.d.ts +39 -2
- package/vendor/core/dist/contracts/worker/protocol.js +24 -1
- package/vendor/core/dist/index.d.ts +1 -1
- package/vendor/core/dist/index.js +2 -1
- package/vendor/core/dist/suggestions.d.ts +15 -2
- package/vendor/core/dist/suggestions.js +48 -3
- package/vendor/core/dist/types.d.ts +26 -0
- package/vendor/core/dist/types.js +5 -0
- package/vendor/core/package.json +16 -5
- package/vendor/postgres/cf/src/connection.js +18 -0
- package/vendor/postgres/cjs/src/connection.js +18 -0
- package/vendor/postgres/src/connection.js +18 -0
- package/vendor/views/dist/api.d.ts +71 -17
- package/vendor/views/dist/api.js +200 -35
- package/vendor/views/dist/bridge.d.ts +3 -0
- package/vendor/views/dist/bridge.js +9 -1
- package/vendor/views/dist/components.d.ts +170 -0
- package/vendor/views/dist/components.js +361 -0
- package/vendor/views/dist/index.d.ts +1 -1
- package/vendor/views/package.json +11 -1
- package/dist/owletto/dist/assets/_-3J-IrxWk.js +0 -2
- package/dist/owletto/dist/assets/_-DYUE3ix4.js +0 -3
- package/dist/owletto/dist/assets/_agentId-Bn2IAjIy.js +0 -2
- package/dist/owletto/dist/assets/_agentId-Cam7Z0N7.js +0 -2
- package/dist/owletto/dist/assets/_automationId-CXEiKVZJ.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-CS85l61t.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-clVDIyW0.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-Ci2k-BuN.js +0 -2
- package/dist/owletto/dist/assets/_eventId-B0662F8h.js +0 -2
- package/dist/owletto/dist/assets/_name-CwWePlOl.js +0 -2
- package/dist/owletto/dist/assets/_owner-dTWkrKsK.js +0 -3
- package/dist/owletto/dist/assets/_shape-BtS3y4M9.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-Dc9m-nlR.js +0 -2
- package/dist/owletto/dist/assets/_slug-DQHutM41.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-B30ik8ma.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-CUHypQnF.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-CMqYiiKM.js +0 -2
- package/dist/owletto/dist/assets/agent-connect-pages-B_vrqLVc.js +0 -2
- package/dist/owletto/dist/assets/agent-editor-form-hTs7eO_U.js +0 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-D92imvSt.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-BJOijbT0.js +0 -6
- package/dist/owletto/dist/assets/agents-9XjpDj_S.js +0 -2
- package/dist/owletto/dist/assets/agents-workbench-Bt5QCYQ7.js +0 -2
- package/dist/owletto/dist/assets/app._appId-CKv7_squ.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-vUwVumXf.js +0 -2
- package/dist/owletto/dist/assets/automations-9XjpDj_S.js +0 -2
- package/dist/owletto/dist/assets/callback-BRgcL8gz.js +0 -2
- package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +0 -2
- package/dist/owletto/dist/assets/connect-CfsFsy9P.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-DkiC8xos.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-CIXrGOsT.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.activity-Ckdz6I0y.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.index-CNxafNeo.js +0 -2
- package/dist/owletto/dist/assets/connections-browser-CKZjzRz6.js +0 -2
- package/dist/owletto/dist/assets/connector-scope-lists-CadPVsI3.js +0 -2
- package/dist/owletto/dist/assets/connectors-lvLJ30lo.js +0 -2
- package/dist/owletto/dist/assets/create-0xW9eXxG.js +0 -2
- package/dist/owletto/dist/assets/create-B0qhrrX4.js +0 -2
- package/dist/owletto/dist/assets/create-CAfF-yI1.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-i6xxkWKV.js +0 -2
- package/dist/owletto/dist/assets/deployments-4Itm35Xc.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-CrjG7gPo.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-Cs3ZmXWo.js +0 -2
- package/dist/owletto/dist/assets/entity-options-uXjgT7y9.js +0 -2
- package/dist/owletto/dist/assets/entity-page-Dc0LGr5U.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-CwZxa0BR.js +0 -2
- package/dist/owletto/dist/assets/event-detail-ve2d6Gbb.js +0 -2
- package/dist/owletto/dist/assets/events-feed-BtvhZF1f.js +0 -2
- package/dist/owletto/dist/assets/filter-editors-Cj-v6NtH.js +0 -2
- package/dist/owletto/dist/assets/guardrails-HFo2Ut8B.js +0 -2
- package/dist/owletto/dist/assets/identity-BigVSBCl.js +0 -2
- package/dist/owletto/dist/assets/index-BLEcy9-T.css +0 -1
- package/dist/owletto/dist/assets/index-BfedB4Rc.js +0 -2
- package/dist/owletto/dist/assets/index-CUw3aKBI.js +0 -2
- package/dist/owletto/dist/assets/index-CXhxUkv3.js +0 -2
- package/dist/owletto/dist/assets/index-Cr5hwh-C.js +0 -7950
- package/dist/owletto/dist/assets/index-CzkTV4ZQ.js +0 -2
- package/dist/owletto/dist/assets/index-DKSx8JN_.js +0 -2
- package/dist/owletto/dist/assets/index-DVk7Ug0d.js +0 -2
- package/dist/owletto/dist/assets/index-DmZuKGf8.js +0 -2
- package/dist/owletto/dist/assets/index-cPcroOH0.js +0 -2
- package/dist/owletto/dist/assets/index-n7sTbNv4.js +0 -2
- package/dist/owletto/dist/assets/index-xiFpcWKv.js +0 -2
- package/dist/owletto/dist/assets/login-Ci6ixHuL.js +0 -2
- package/dist/owletto/dist/assets/member-scope-gate-B44INDPY.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-DyQiRvzl.js +0 -103
- package/dist/owletto/dist/assets/models-DpVP7ZwX.js +0 -2
- package/dist/owletto/dist/assets/new-BUb7AnEW.js +0 -2
- package/dist/owletto/dist/assets/new-CHOr-EcI.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-CHoQHe2H.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-UcZr87_Q.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-DcnlADmj.js +0 -2
- package/dist/owletto/dist/assets/record-activity-CBXH6v1d.js +0 -2
- package/dist/owletto/dist/assets/renderer-mEDnVW0O.js +0 -97
- package/dist/owletto/dist/assets/runs-C0rCgGwX.js +0 -2
- package/dist/owletto/dist/assets/runs-panel-Du1JMjg5.js +0 -2
- package/dist/owletto/dist/assets/runs-table-syPJ6r6T.js +0 -2
- package/dist/owletto/dist/assets/settings-9NkNA1G1.js +0 -2
- package/dist/owletto/dist/assets/settings-E-10sLQX.js +0 -2
- package/dist/owletto/dist/assets/skills-D2Ri9b4f.js +0 -2
- package/dist/owletto/dist/assets/status-dot-B-EWMgq6.js +0 -2
- package/dist/owletto/dist/assets/tabs-DqIIkCX-.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-CqLZQrnO.js +0 -2
- /package/vendor/postgres/{.bun-tag-f39dafdb2305d504 → .bun-tag-2f292c6554a8475e} +0 -0
|
@@ -442,6 +442,14 @@ export declare const AgentTurnPollPayloadSchema: import("@sinclair/typebox").TOb
|
|
|
442
442
|
* stays off unless the caller explicitly requests an effort level.
|
|
443
443
|
*/
|
|
444
444
|
reasoning: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
445
|
+
/**
|
|
446
|
+
* pi-ai's `Model.thinkingLevelMap`: the provider's name for each
|
|
447
|
+
* thinking level, `null` where the model does not serve that level.
|
|
448
|
+
* gpt-5-mini maps `off` to `null` because it cannot turn reasoning off;
|
|
449
|
+
* without the map pi-ai sends `effort: "none"` and OpenAI rejects it.
|
|
450
|
+
* Absent → pi-ai's own defaults.
|
|
451
|
+
*/
|
|
452
|
+
thinking_level_map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>>;
|
|
445
453
|
/**
|
|
446
454
|
* The modalities this model accepts, in pi-ai's own `Model.input`
|
|
447
455
|
* vocabulary and resolved from pi-ai's model registry — NOT guessed
|
|
@@ -489,7 +497,7 @@ export declare const AgentTurnPollPayloadSchema: import("@sinclair/typebox").TOb
|
|
|
489
497
|
}>>;
|
|
490
498
|
/**
|
|
491
499
|
* The gateway tools available for this turn, by NAME only —
|
|
492
|
-
* `ask_user`, `send_message
|
|
500
|
+
* `ask_user`, `send_message` and the rest of
|
|
493
501
|
* `@lobu/plugin-conversations`. The guest runs that package's own
|
|
494
502
|
* implementation, so the route, the request body and the schema live
|
|
495
503
|
* there and never on this wire; sending a name the package does not
|
|
@@ -521,6 +529,12 @@ export declare const AgentTurnPollPayloadSchema: import("@sinclair/typebox").TOb
|
|
|
521
529
|
conversation_id: import("@sinclair/typebox").TString;
|
|
522
530
|
platform: import("@sinclair/typebox").TString;
|
|
523
531
|
}>>;
|
|
532
|
+
/**
|
|
533
|
+
* Ask the turn's own model for follow-up chips after it answers and
|
|
534
|
+
* return them with the completion. Set by the gateway only for a
|
|
535
|
+
* human-facing turn; absent → no chips.
|
|
536
|
+
*/
|
|
537
|
+
follow_ups: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<true>>;
|
|
524
538
|
}>>;
|
|
525
539
|
/**
|
|
526
540
|
* Long-term memory for this turn: `@lobu/plugin-memory`'s recall hook
|
|
@@ -850,6 +864,14 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
850
864
|
* stays off unless the caller explicitly requests an effort level.
|
|
851
865
|
*/
|
|
852
866
|
reasoning: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
867
|
+
/**
|
|
868
|
+
* pi-ai's `Model.thinkingLevelMap`: the provider's name for each
|
|
869
|
+
* thinking level, `null` where the model does not serve that level.
|
|
870
|
+
* gpt-5-mini maps `off` to `null` because it cannot turn reasoning off;
|
|
871
|
+
* without the map pi-ai sends `effort: "none"` and OpenAI rejects it.
|
|
872
|
+
* Absent → pi-ai's own defaults.
|
|
873
|
+
*/
|
|
874
|
+
thinking_level_map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>>;
|
|
853
875
|
/**
|
|
854
876
|
* The modalities this model accepts, in pi-ai's own `Model.input`
|
|
855
877
|
* vocabulary and resolved from pi-ai's model registry — NOT guessed
|
|
@@ -897,7 +919,7 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
897
919
|
}>>;
|
|
898
920
|
/**
|
|
899
921
|
* The gateway tools available for this turn, by NAME only —
|
|
900
|
-
* `ask_user`, `send_message
|
|
922
|
+
* `ask_user`, `send_message` and the rest of
|
|
901
923
|
* `@lobu/plugin-conversations`. The guest runs that package's own
|
|
902
924
|
* implementation, so the route, the request body and the schema live
|
|
903
925
|
* there and never on this wire; sending a name the package does not
|
|
@@ -929,6 +951,12 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
929
951
|
conversation_id: import("@sinclair/typebox").TString;
|
|
930
952
|
platform: import("@sinclair/typebox").TString;
|
|
931
953
|
}>>;
|
|
954
|
+
/**
|
|
955
|
+
* Ask the turn's own model for follow-up chips after it answers and
|
|
956
|
+
* return them with the completion. Set by the gateway only for a
|
|
957
|
+
* human-facing turn; absent → no chips.
|
|
958
|
+
*/
|
|
959
|
+
follow_ups: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<true>>;
|
|
932
960
|
}>>;
|
|
933
961
|
/**
|
|
934
962
|
* Long-term memory for this turn: `@lobu/plugin-memory`'s recall hook
|
|
@@ -1287,6 +1315,15 @@ export declare const CompleteAgentTurnRequestSchema: import("@sinclair/typebox")
|
|
|
1287
1315
|
* (`chat-response-bridge`) already acts on it.
|
|
1288
1316
|
*/
|
|
1289
1317
|
replied_in_band: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1318
|
+
/**
|
|
1319
|
+
* Follow-up chips for the owner's answer, proposed by the same model after it
|
|
1320
|
+
* answered (`tools.follow_ups`). The worker is untrusted, so the completion
|
|
1321
|
+
* route re-sanitizes them; the gateway delivers them with the reply.
|
|
1322
|
+
*/
|
|
1323
|
+
suggestions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
1324
|
+
title: import("@sinclair/typebox").TString;
|
|
1325
|
+
message: import("@sinclair/typebox").TString;
|
|
1326
|
+
}>>>;
|
|
1290
1327
|
/**
|
|
1291
1328
|
* Tool traces that finished too late to ride a heartbeat, oldest first.
|
|
1292
1329
|
*
|
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.HeartbeatResponseSchema = exports.DispatchChromeActionResponseSchema = exports.DispatchChromeActionRequestSchema = exports.ExecuteConnectorOperationRequestSchema = exports.HeartbeatRequestSchema = exports.AGENT_TURN_BRIDGE_BYTES = exports.TURN_DELTA_MAX_CHARS = exports.PollAuthSignalResponseSchema = exports.PollAuthSignalRequestSchema = exports.EmitAuthArtifactRequestSchema = exports.CompleteAgentTurnResponseSchema = exports.CompleteAgentTurnRequestSchema = exports.AGENT_TURN_INPUT_MAX = exports.TURN_TOOL_EVENT_QUEUE_MAX = exports.TurnToolEventSchema = exports.TURN_TOOL_OUTPUT_MAX_CHARS = exports.CompleteAutomationResponseSchema = exports.CompleteAutomationRequestSchema = exports.CompleteAuthRequestSchema = exports.CompleteEmbeddingsRequestSchema = exports.EmbeddingEntrySchema = exports.EmbedEventSchema = exports.CompleteActionRequestSchema = exports.CompleteRequestSchema = exports.StreamBatchSchema = exports.ContentItemSchema = exports.ActivatePageResponseSchema = exports.ActivatePageRequestSchema = exports.PollResponseSchema = exports.FeedSourceAckSchema = exports.AgentTurnPollPayloadSchema = exports.AutomationPollPayloadSchema = exports.AutomationPollContextSchema = exports.AutomationPollEventSchema = exports.AutomationPollMetaSchema = exports.AutomationExecutionConfigSchema = exports.PollRequestSchema = exports.WORKER_POLL_MAX_WAIT_SECONDS = exports.FeedNotificationSchema = exports.EXECUTION_BACKENDS = exports.OAuthCredentialsSchema = exports.WorkerExitDiagnosticsSchema = exports.WorkerExitReasonSchema = exports.RunTypeSchema = exports.ConnectorHttpRequestSchema = exports.SourceAttributionSchema = exports.CONNECTOR_HTTP_MAX_BYTES = exports.CONNECTOR_HTTP_AUTH_CAPABILITY = void 0;
|
|
30
30
|
exports.defaultBackendCapacity = defaultBackendCapacity;
|
|
31
31
|
const typebox_1 = require("@sinclair/typebox");
|
|
32
|
+
const suggestions_1 = require("../../suggestions");
|
|
32
33
|
const manage_operations_1 = require("../tools/manage-operations");
|
|
33
34
|
exports.CONNECTOR_HTTP_AUTH_CAPABILITY = "http_auth";
|
|
34
35
|
exports.CONNECTOR_HTTP_MAX_BYTES = 4 * 1024 * 1024;
|
|
@@ -471,6 +472,14 @@ exports.AgentTurnPollPayloadSchema = typebox_1.Type.Object({
|
|
|
471
472
|
* stays off unless the caller explicitly requests an effort level.
|
|
472
473
|
*/
|
|
473
474
|
reasoning: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
475
|
+
/**
|
|
476
|
+
* pi-ai's `Model.thinkingLevelMap`: the provider's name for each
|
|
477
|
+
* thinking level, `null` where the model does not serve that level.
|
|
478
|
+
* gpt-5-mini maps `off` to `null` because it cannot turn reasoning off;
|
|
479
|
+
* without the map pi-ai sends `effort: "none"` and OpenAI rejects it.
|
|
480
|
+
* Absent → pi-ai's own defaults.
|
|
481
|
+
*/
|
|
482
|
+
thinking_level_map: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()]))),
|
|
474
483
|
/**
|
|
475
484
|
* The modalities this model accepts, in pi-ai's own `Model.input`
|
|
476
485
|
* vocabulary and resolved from pi-ai's model registry — NOT guessed
|
|
@@ -526,7 +535,7 @@ exports.AgentTurnPollPayloadSchema = typebox_1.Type.Object({
|
|
|
526
535
|
remote_runtime: typebox_1.Type.Optional(typebox_1.Type.Object({ provider_id: typebox_1.Type.String({ minLength: 1 }) })),
|
|
527
536
|
/**
|
|
528
537
|
* The gateway tools available for this turn, by NAME only —
|
|
529
|
-
* `ask_user`, `send_message
|
|
538
|
+
* `ask_user`, `send_message` and the rest of
|
|
530
539
|
* `@lobu/plugin-conversations`. The guest runs that package's own
|
|
531
540
|
* implementation, so the route, the request body and the schema live
|
|
532
541
|
* there and never on this wire; sending a name the package does not
|
|
@@ -558,6 +567,12 @@ exports.AgentTurnPollPayloadSchema = typebox_1.Type.Object({
|
|
|
558
567
|
conversation_id: typebox_1.Type.String({ minLength: 1 }),
|
|
559
568
|
platform: typebox_1.Type.String({ minLength: 1 }),
|
|
560
569
|
})),
|
|
570
|
+
/**
|
|
571
|
+
* Ask the turn's own model for follow-up chips after it answers and
|
|
572
|
+
* return them with the completion. Set by the gateway only for a
|
|
573
|
+
* human-facing turn; absent → no chips.
|
|
574
|
+
*/
|
|
575
|
+
follow_ups: typebox_1.Type.Optional(typebox_1.Type.Literal(true)),
|
|
561
576
|
})),
|
|
562
577
|
/**
|
|
563
578
|
* Long-term memory for this turn: `@lobu/plugin-memory`'s recall hook
|
|
@@ -969,6 +984,14 @@ exports.CompleteAgentTurnRequestSchema = typebox_1.Type.Object({
|
|
|
969
984
|
* (`chat-response-bridge`) already acts on it.
|
|
970
985
|
*/
|
|
971
986
|
replied_in_band: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
987
|
+
/**
|
|
988
|
+
* Follow-up chips for the owner's answer, proposed by the same model after it
|
|
989
|
+
* answered (`tools.follow_ups`). The worker is untrusted, so the completion
|
|
990
|
+
* route re-sanitizes them; the gateway delivers them with the reply.
|
|
991
|
+
*/
|
|
992
|
+
suggestions: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({ title: typebox_1.Type.String(), message: typebox_1.Type.String() }), {
|
|
993
|
+
maxItems: suggestions_1.SUGGESTION_LIMITS.maxPrompts,
|
|
994
|
+
})),
|
|
972
995
|
/**
|
|
973
996
|
* Tool traces that finished too late to ride a heartbeat, oldest first.
|
|
974
997
|
*
|
|
@@ -32,7 +32,7 @@ export * from "./secret-refs";
|
|
|
32
32
|
export * from "./reserved";
|
|
33
33
|
export { extractTraceId, generateTraceId } from "./trace";
|
|
34
34
|
export type { AgentErrorContext, AgentInlineGuardrail, AgentOptions, AuthProfile, ConversationMessage, DeclaredCredential, HistoryMessage, InstructionContext, InstructionProvider, LogLevel, McpOAuthConfig, NetworkConfig, NixConfig, RegistryEntry, SessionContext, SkillConfig, SkillsConfig, SuggestedPrompt, ThinkingLevel, ThreadResponsePayload, } from "./types";
|
|
35
|
-
export { hasCredentialSource } from "./types";
|
|
35
|
+
export { hasCredentialSource, isRefreshSuspended } from "./types";
|
|
36
36
|
export { SUGGESTION_LIMITS, sanitizeSuggestionPrompts } from "./types";
|
|
37
37
|
export type { BaseMessage } from "./types/message";
|
|
38
38
|
export * from "./utils/encryption";
|
|
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.withLobuFileParameters = exports.slugify = exports.titleFromSessionJsonl = exports.parseSessionEntries = exports.entryToMessage = exports.sanitizeSuggestionPrompts = exports.SUGGESTION_LIMITS = exports.hasCredentialSource = exports.generateTraceId = exports.extractTraceId = exports.SDK_COMPAT_PROTOCOLS = exports.resolveSdkCompat = exports.isSdkCompat = exports.withSpan = exports.withChildSpan = exports.shutdownTracing = exports.SpanStatusCode = exports.SpanKind = exports.runInSpanContext = exports.initTracing = exports.getTracer = exports.getTraceparent = exports.getCurrentSpan = exports.flushTracing = exports.createSpan = exports.createRootSpan = exports.createChildSpan = exports.renderSkillMemorySection = exports.renderFallbackSystemContext = exports.BaseInstructionProvider = exports.CommandRegistry = exports.inferGrantKind = void 0;
|
|
19
|
+
exports.withLobuFileParameters = exports.slugify = exports.titleFromSessionJsonl = exports.parseSessionEntries = exports.entryToMessage = exports.sanitizeSuggestionPrompts = exports.SUGGESTION_LIMITS = exports.isRefreshSuspended = exports.hasCredentialSource = exports.generateTraceId = exports.extractTraceId = exports.SDK_COMPAT_PROTOCOLS = exports.resolveSdkCompat = exports.isSdkCompat = exports.withSpan = exports.withChildSpan = exports.shutdownTracing = exports.SpanStatusCode = exports.SpanKind = exports.runInSpanContext = exports.initTracing = exports.getTracer = exports.getTraceparent = exports.getCurrentSpan = exports.flushTracing = exports.createSpan = exports.createRootSpan = exports.createChildSpan = exports.renderSkillMemorySection = exports.renderFallbackSystemContext = exports.BaseInstructionProvider = exports.CommandRegistry = exports.inferGrantKind = void 0;
|
|
20
20
|
__exportStar(require("./agent-policy"), exports);
|
|
21
21
|
__exportStar(require("./tool-trace-summary"), exports);
|
|
22
22
|
__exportStar(require("./shell-safety"), exports);
|
|
@@ -84,6 +84,7 @@ Object.defineProperty(exports, "extractTraceId", { enumerable: true, get: functi
|
|
|
84
84
|
Object.defineProperty(exports, "generateTraceId", { enumerable: true, get: function () { return trace_1.generateTraceId; } });
|
|
85
85
|
var types_1 = require("./types");
|
|
86
86
|
Object.defineProperty(exports, "hasCredentialSource", { enumerable: true, get: function () { return types_1.hasCredentialSource; } });
|
|
87
|
+
Object.defineProperty(exports, "isRefreshSuspended", { enumerable: true, get: function () { return types_1.isRefreshSuspended; } });
|
|
87
88
|
var types_2 = require("./types");
|
|
88
89
|
Object.defineProperty(exports, "SUGGESTION_LIMITS", { enumerable: true, get: function () { return types_2.SUGGESTION_LIMITS; } });
|
|
89
90
|
Object.defineProperty(exports, "sanitizeSuggestionPrompts", { enumerable: true, get: function () { return types_2.sanitizeSuggestionPrompts; } });
|
|
@@ -31,9 +31,22 @@ export declare const SUGGESTION_LIMITS: {
|
|
|
31
31
|
* Normalize an untrusted `prompts` value into at most {@link SUGGESTION_LIMITS}
|
|
32
32
|
* valid `{title,message}` entries. Trims BEFORE capping length (so leading
|
|
33
33
|
* whitespace can't yield an empty displayed title), drops malformed/empty
|
|
34
|
-
* entries, and returns `[]` for any non-array input. Shared by the
|
|
35
|
-
* and
|
|
34
|
+
* entries, and returns `[]` for any non-array input. Shared by the worker
|
|
35
|
+
* and completion route so the worker (untrusted) and the server enforce one
|
|
36
36
|
* identical contract.
|
|
37
37
|
*/
|
|
38
38
|
export declare function sanitizeSuggestionPrompts(value: unknown): SuggestedPrompt[];
|
|
39
|
+
/**
|
|
40
|
+
* The follow-up question asked after a human-facing turn's reply, on the same
|
|
41
|
+
* session and model that wrote it. Asked as a side request — never appended to
|
|
42
|
+
* the conversation — so the model can use the user's language and preferences
|
|
43
|
+
* retained in its current context. Reusing the prefix enables prompt caching.
|
|
44
|
+
*/
|
|
45
|
+
export declare const FOLLOW_UP_SUGGESTIONS_PROMPT: string;
|
|
46
|
+
/**
|
|
47
|
+
* The chips in a reply to {@link FOLLOW_UP_SUGGESTIONS_PROMPT}, sanitized.
|
|
48
|
+
* Tolerates a markdown fence or prose around the object by parsing from the
|
|
49
|
+
* first `{` to the last `}`; anything unparseable is no suggestions.
|
|
50
|
+
*/
|
|
51
|
+
export declare function parseFollowUpSuggestions(reply: string): SuggestedPrompt[];
|
|
39
52
|
//# sourceMappingURL=suggestions.d.ts.map
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* `@lobu/core` import here.
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SUGGESTION_LIMITS = void 0;
|
|
12
|
+
exports.FOLLOW_UP_SUGGESTIONS_PROMPT = exports.SUGGESTION_LIMITS = void 0;
|
|
13
13
|
exports.sanitizeSuggestionPrompts = sanitizeSuggestionPrompts;
|
|
14
|
+
exports.parseFollowUpSuggestions = parseFollowUpSuggestions;
|
|
14
15
|
/** Limits enforced wherever suggestions enter or leave durable storage.
|
|
15
16
|
* `maxTitleChars` counts UTF-16 code units, matching how Slack measures its
|
|
16
17
|
* 75-char button-text cap (the tightest limit a title reaches on a surface this
|
|
@@ -28,8 +29,8 @@ exports.SUGGESTION_LIMITS = {
|
|
|
28
29
|
* Normalize an untrusted `prompts` value into at most {@link SUGGESTION_LIMITS}
|
|
29
30
|
* valid `{title,message}` entries. Trims BEFORE capping length (so leading
|
|
30
31
|
* whitespace can't yield an empty displayed title), drops malformed/empty
|
|
31
|
-
* entries, and returns `[]` for any non-array input. Shared by the
|
|
32
|
-
* and
|
|
32
|
+
* entries, and returns `[]` for any non-array input. Shared by the worker
|
|
33
|
+
* and completion route so the worker (untrusted) and the server enforce one
|
|
33
34
|
* identical contract.
|
|
34
35
|
*/
|
|
35
36
|
function sanitizeSuggestionPrompts(value) {
|
|
@@ -59,6 +60,50 @@ function sanitizeSuggestionPrompts(value) {
|
|
|
59
60
|
}
|
|
60
61
|
return out;
|
|
61
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The follow-up question asked after a human-facing turn's reply, on the same
|
|
65
|
+
* session and model that wrote it. Asked as a side request — never appended to
|
|
66
|
+
* the conversation — so the model can use the user's language and preferences
|
|
67
|
+
* retained in its current context. Reusing the prefix enables prompt caching.
|
|
68
|
+
*/
|
|
69
|
+
exports.FOLLOW_UP_SUGGESTIONS_PROMPT = [
|
|
70
|
+
"Before the user replies: decide whether your last reply needs follow-up action chips the user can tap.",
|
|
71
|
+
'Default to {"prompts":[]} when your reply leaves nothing open.',
|
|
72
|
+
'If your reply offers concrete next steps ("If you want, I can …", "Want me to …?"), turn up to three distinct offers into chips.',
|
|
73
|
+
"Otherwise offer a chip only for a concrete next step your reply leaves open that would help the user proceed.",
|
|
74
|
+
"Return no suggestions for routine answers, acknowledgements, corrections, a finished request with nothing left open, a question the user must answer in their own words, or a reply that closes the topic, and none at all if the user asked for no suggestions.",
|
|
75
|
+
"Do not invent extra work or add a generic offer to explore further.",
|
|
76
|
+
"When useful next steps remain, return 1-3 distinct actions. A single useful action is enough; never pad the list.",
|
|
77
|
+
"",
|
|
78
|
+
'Each item is {"title","message"}:',
|
|
79
|
+
'- "title": a short tappable label, at most 20 characters.',
|
|
80
|
+
'- "message": the full message sent verbatim AS THE USER if tapped.',
|
|
81
|
+
"",
|
|
82
|
+
"Write both in the language the user writes in. Write `message` in the user's voice, as a request to you:",
|
|
83
|
+
' good: "Show me the diff" bad: "I can show you the diff"',
|
|
84
|
+
'Do not call any tool. Reply with STRICT JSON {"prompts":[{"title":"...","message":"..."}]} and nothing else.',
|
|
85
|
+
].join("\n");
|
|
86
|
+
/**
|
|
87
|
+
* The chips in a reply to {@link FOLLOW_UP_SUGGESTIONS_PROMPT}, sanitized.
|
|
88
|
+
* Tolerates a markdown fence or prose around the object by parsing from the
|
|
89
|
+
* first `{` to the last `}`; anything unparseable is no suggestions.
|
|
90
|
+
*/
|
|
91
|
+
function parseFollowUpSuggestions(reply) {
|
|
92
|
+
const start = reply.indexOf("{");
|
|
93
|
+
const end = reply.lastIndexOf("}");
|
|
94
|
+
if (start < 0 || end <= start)
|
|
95
|
+
return [];
|
|
96
|
+
let parsed;
|
|
97
|
+
try {
|
|
98
|
+
parsed = JSON.parse(reply.slice(start, end + 1));
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
if (!parsed || typeof parsed !== "object")
|
|
104
|
+
return [];
|
|
105
|
+
return sanitizeSuggestionPrompts(parsed.prompts);
|
|
106
|
+
}
|
|
62
107
|
/**
|
|
63
108
|
* Truncate to at most `maxUnits` UTF-16 code units without splitting a
|
|
64
109
|
* surrogate pair. Counting code POINTS would undercount against platform caps
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SecretRef } from "./secret-refs";
|
|
2
|
+
import type { SuggestedPrompt } from "./suggestions";
|
|
2
3
|
/**
|
|
3
4
|
* Unified authentication profile for any model provider.
|
|
4
5
|
* Persisted per-(userId, agentId) by the gateway's UserAuthProfileStore;
|
|
@@ -30,9 +31,23 @@ export interface AuthProfile {
|
|
|
30
31
|
/** Durable secret reference for the refresh token. */
|
|
31
32
|
refreshTokenRef?: SecretRef;
|
|
32
33
|
accountId?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Refresh suspension set by the token-refresh job when the provider
|
|
36
|
+
* reports the grant itself is dead (`invalid_grant`). Suspended profiles
|
|
37
|
+
* are excluded from token refresh and credential selection until the user
|
|
38
|
+
* reconnects, which writes fresh metadata without this field.
|
|
39
|
+
*/
|
|
40
|
+
refreshSuspended?: {
|
|
41
|
+
/** Provider OAuth error code that killed the grant. */
|
|
42
|
+
code: string;
|
|
43
|
+
/** Epoch ms when the suspension was recorded. */
|
|
44
|
+
at: number;
|
|
45
|
+
};
|
|
33
46
|
};
|
|
34
47
|
createdAt: number;
|
|
35
48
|
}
|
|
49
|
+
/** True when the token-refresh job suspended this profile's grant as dead. */
|
|
50
|
+
export declare function isRefreshSuspended(profile: AuthProfile): boolean;
|
|
36
51
|
/** True if the profile has any credential source (resolved or ref). */
|
|
37
52
|
export declare function hasCredentialSource(profile: AuthProfile): boolean;
|
|
38
53
|
/**
|
|
@@ -234,6 +249,17 @@ export interface ThreadResponsePayload {
|
|
|
234
249
|
* duplicate of the reply and must always surface.
|
|
235
250
|
*/
|
|
236
251
|
repliedInBand?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Follow-up chips for this reply, proposed by the model that wrote it. Set
|
|
254
|
+
* only on the COMPLETION row; delivered with the reply once output
|
|
255
|
+
* guardrails pass.
|
|
256
|
+
*/
|
|
257
|
+
suggestions?: SuggestedPrompt[];
|
|
258
|
+
/**
|
|
259
|
+
* The agent_turn `runs.id` that produced this terminal row. Orders a late
|
|
260
|
+
* terminal against newer turns of the same conversation.
|
|
261
|
+
*/
|
|
262
|
+
turnRunId?: number;
|
|
237
263
|
/**
|
|
238
264
|
* Raw error message. When provider context is available, the gateway labels
|
|
239
265
|
* the source and unwraps the common JSON message envelope without rewording
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SUGGESTION_LIMITS = exports.sanitizeSuggestionPrompts = void 0;
|
|
4
|
+
exports.isRefreshSuspended = isRefreshSuspended;
|
|
4
5
|
exports.hasCredentialSource = hasCredentialSource;
|
|
6
|
+
/** True when the token-refresh job suspended this profile's grant as dead. */
|
|
7
|
+
function isRefreshSuspended(profile) {
|
|
8
|
+
return Boolean(profile.metadata?.refreshSuspended);
|
|
9
|
+
}
|
|
5
10
|
/** True if the profile has any credential source (resolved or ref). */
|
|
6
11
|
function hasCredentialSource(profile) {
|
|
7
12
|
return Boolean(profile.credential || profile.credentialRef);
|
package/vendor/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobu/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Core types and utilities for Lobu agent platform",
|
|
6
6
|
"repository": {
|
|
@@ -221,6 +221,16 @@
|
|
|
221
221
|
"import": "./dist/contracts/tools/view-attach.js",
|
|
222
222
|
"require": "./dist/contracts/tools/view-attach.js"
|
|
223
223
|
},
|
|
224
|
+
"./contracts/tools/view-definition": {
|
|
225
|
+
"types": "./dist/contracts/tools/view-definition.d.ts",
|
|
226
|
+
"import": "./dist/contracts/tools/view-definition.js",
|
|
227
|
+
"require": "./dist/contracts/tools/view-definition.js"
|
|
228
|
+
},
|
|
229
|
+
"./contracts/tools/view-runtime": {
|
|
230
|
+
"types": "./dist/contracts/tools/view-runtime.d.ts",
|
|
231
|
+
"import": "./dist/contracts/tools/view-runtime.js",
|
|
232
|
+
"require": "./dist/contracts/tools/view-runtime.js"
|
|
233
|
+
},
|
|
224
234
|
"./contracts/tools/view-path": {
|
|
225
235
|
"types": "./dist/contracts/tools/view-path.d.ts",
|
|
226
236
|
"import": "./dist/contracts/tools/view-path.js",
|
|
@@ -233,14 +243,15 @@
|
|
|
233
243
|
}
|
|
234
244
|
},
|
|
235
245
|
"dependencies": {
|
|
236
|
-
"@sinclair/typebox": "^0.34.41",
|
|
237
|
-
"ajv": "^8.17.1",
|
|
238
|
-
"ajv-formats": "^3.0.1",
|
|
239
246
|
"@opentelemetry/api": "^1.9.0",
|
|
240
|
-
"@opentelemetry/sdk-trace-node": "^2.11.0",
|
|
241
247
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.222.0",
|
|
242
248
|
"@opentelemetry/resources": "^2.11.0",
|
|
249
|
+
"@opentelemetry/sdk-trace-node": "^2.11.0",
|
|
243
250
|
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
251
|
+
"@sinclair/typebox": "^0.34.41",
|
|
252
|
+
"acorn": "^8.16.0",
|
|
253
|
+
"ajv": "^8.17.1",
|
|
254
|
+
"ajv-formats": "^3.0.1",
|
|
244
255
|
"winston": "^3.17.0"
|
|
245
256
|
}
|
|
246
257
|
}
|
|
@@ -159,6 +159,14 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
|
|
|
159
159
|
if (terminated)
|
|
160
160
|
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))
|
|
161
161
|
|
|
162
|
+
if (!socket) {
|
|
163
|
+
// A stale reservation can execute after closed() clears the socket.
|
|
164
|
+
// Do not signal backpressure: this connection cannot emit a drain event
|
|
165
|
+
// to resume queries queued behind the rejected write.
|
|
166
|
+
queryError(q, Errors.connection('CONNECTION_CLOSED', options))
|
|
167
|
+
return true
|
|
168
|
+
}
|
|
169
|
+
|
|
162
170
|
if (stream)
|
|
163
171
|
return queryError(q, Errors.generic('COPY_IN_PROGRESS', 'You cannot execute queries during copy'))
|
|
164
172
|
|
|
@@ -254,6 +262,16 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
|
|
|
254
262
|
}
|
|
255
263
|
|
|
256
264
|
function nextWrite(fn) {
|
|
265
|
+
if (!socket) {
|
|
266
|
+
// Cursor and COPY writes can still arrive after closed() clears the
|
|
267
|
+
// socket. A throw from this timer would be an uncaughtException, so
|
|
268
|
+
// reject the pending queries instead. Report no backpressure: a closed
|
|
269
|
+
// socket never emits the drain event that would resume them.
|
|
270
|
+
nextWriteTimer !== null && clearImmediate(nextWriteTimer)
|
|
271
|
+
chunk = nextWriteTimer = null
|
|
272
|
+
error(Errors.connection('CONNECTION_CLOSED', options))
|
|
273
|
+
return true
|
|
274
|
+
}
|
|
257
275
|
const x = socket.write(chunk, fn)
|
|
258
276
|
nextWriteTimer !== null && clearImmediate(nextWriteTimer)
|
|
259
277
|
chunk = nextWriteTimer = null
|
|
@@ -157,6 +157,14 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
|
|
|
157
157
|
if (terminated)
|
|
158
158
|
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))
|
|
159
159
|
|
|
160
|
+
if (!socket) {
|
|
161
|
+
// A stale reservation can execute after closed() clears the socket.
|
|
162
|
+
// Do not signal backpressure: this connection cannot emit a drain event
|
|
163
|
+
// to resume queries queued behind the rejected write.
|
|
164
|
+
queryError(q, Errors.connection('CONNECTION_CLOSED', options))
|
|
165
|
+
return true
|
|
166
|
+
}
|
|
167
|
+
|
|
160
168
|
if (stream)
|
|
161
169
|
return queryError(q, Errors.generic('COPY_IN_PROGRESS', 'You cannot execute queries during copy'))
|
|
162
170
|
|
|
@@ -252,6 +260,16 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
|
|
|
252
260
|
}
|
|
253
261
|
|
|
254
262
|
function nextWrite(fn) {
|
|
263
|
+
if (!socket) {
|
|
264
|
+
// Cursor and COPY writes can still arrive after closed() clears the
|
|
265
|
+
// socket. A throw from this timer would be an uncaughtException, so
|
|
266
|
+
// reject the pending queries instead. Report no backpressure: a closed
|
|
267
|
+
// socket never emits the drain event that would resume them.
|
|
268
|
+
nextWriteTimer !== null && clearImmediate(nextWriteTimer)
|
|
269
|
+
chunk = nextWriteTimer = null
|
|
270
|
+
error(Errors.connection('CONNECTION_CLOSED', options))
|
|
271
|
+
return true
|
|
272
|
+
}
|
|
255
273
|
const x = socket.write(chunk, fn)
|
|
256
274
|
nextWriteTimer !== null && clearImmediate(nextWriteTimer)
|
|
257
275
|
chunk = nextWriteTimer = null
|
|
@@ -157,6 +157,14 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
|
|
|
157
157
|
if (terminated)
|
|
158
158
|
return queryError(q, Errors.connection('CONNECTION_DESTROYED', options))
|
|
159
159
|
|
|
160
|
+
if (!socket) {
|
|
161
|
+
// A stale reservation can execute after closed() clears the socket.
|
|
162
|
+
// Do not signal backpressure: this connection cannot emit a drain event
|
|
163
|
+
// to resume queries queued behind the rejected write.
|
|
164
|
+
queryError(q, Errors.connection('CONNECTION_CLOSED', options))
|
|
165
|
+
return true
|
|
166
|
+
}
|
|
167
|
+
|
|
160
168
|
if (stream)
|
|
161
169
|
return queryError(q, Errors.generic('COPY_IN_PROGRESS', 'You cannot execute queries during copy'))
|
|
162
170
|
|
|
@@ -252,6 +260,16 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
|
|
|
252
260
|
}
|
|
253
261
|
|
|
254
262
|
function nextWrite(fn) {
|
|
263
|
+
if (!socket) {
|
|
264
|
+
// Cursor and COPY writes can still arrive after closed() clears the
|
|
265
|
+
// socket. A throw from this timer would be an uncaughtException, so
|
|
266
|
+
// reject the pending queries instead. Report no backpressure: a closed
|
|
267
|
+
// socket never emits the drain event that would resume them.
|
|
268
|
+
nextWriteTimer !== null && clearImmediate(nextWriteTimer)
|
|
269
|
+
chunk = nextWriteTimer = null
|
|
270
|
+
error(Errors.connection('CONNECTION_CLOSED', options))
|
|
271
|
+
return true
|
|
272
|
+
}
|
|
255
273
|
const x = socket.write(chunk, fn)
|
|
256
274
|
nextWriteTimer !== null && clearImmediate(nextWriteTimer)
|
|
257
275
|
chunk = nextWriteTimer = null
|
|
@@ -20,14 +20,17 @@
|
|
|
20
20
|
* that capability keep params local to the frame.
|
|
21
21
|
*
|
|
22
22
|
* Read budget: reads run on a user-facing path, when the host is ready and
|
|
23
|
-
* the query changes
|
|
23
|
+
* the query changes, `refetch()` is called, or a live query receives a host
|
|
24
|
+
* data-change notification.
|
|
24
25
|
* `query_sql` runs in a read-only, org-scoped transaction with a 5 second
|
|
25
26
|
* statement timeout and returns at most 500 rows; `useQuery` reports a hit as
|
|
26
27
|
* `errorCode: "UPSTREAM_TIMEOUT"` or `truncated: true`, so render those
|
|
27
|
-
* states instead of an empty or partial table.
|
|
28
|
-
*
|
|
29
|
-
* `
|
|
30
|
-
*
|
|
28
|
+
* states instead of an empty or partial table. Each cell is bounded too
|
|
29
|
+
* (strings to a 4,000-code-point head plus a suffix, JSON values to 16 KiB);
|
|
30
|
+
* `truncatedColumns` names the columns where a returned cell was cut.
|
|
31
|
+
* Never aggregate history in a view: no `GROUP BY`, `DISTINCT ON`, per-row
|
|
32
|
+
* regexp, or leading-wildcard `LIKE` over `events` (or any other table that
|
|
33
|
+
* grows with history). History grows; the answer a view shows does not.
|
|
31
34
|
*
|
|
32
35
|
* For "latest state" views, compute state at write time. One event-based
|
|
33
36
|
* pattern is an Automation bound to the entity declaring a keyed event output
|
|
@@ -68,7 +71,7 @@ export type Params = Record<string, ParamValue>;
|
|
|
68
71
|
* ```tsx
|
|
69
72
|
* export const view = defineView({
|
|
70
73
|
* key: "deal-won",
|
|
71
|
-
* attach: [{
|
|
74
|
+
* attach: [{ event: "deal.won", type: "deal" }],
|
|
72
75
|
* });
|
|
73
76
|
*
|
|
74
77
|
* export default function DealWon() {
|
|
@@ -106,20 +109,38 @@ export interface ParamDef {
|
|
|
106
109
|
};
|
|
107
110
|
}
|
|
108
111
|
/**
|
|
109
|
-
* Where a view appears:
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
112
|
+
* Where a view appears: one page per entry.
|
|
113
|
+
*
|
|
114
|
+
* - `{ record: "deal" }` — a card on every deal's page, above its activity;
|
|
115
|
+
* `{ record: "deal", id: 7 }` pins it to one record. The card renders
|
|
116
|
+
* `inline`; "See all" (`requestDisplayMode("fullscreen")`) or the card's
|
|
117
|
+
* Open shows the same view fullscreen in the peek.
|
|
118
|
+
* - `{ collection: "deal", when? }` — a tab on the deal list page. `when`
|
|
119
|
+
* equalities must all be present in scope.collection.filters; they control
|
|
120
|
+
* discoverability, never authorization.
|
|
121
|
+
* - `{ workspace: true }` — a tab on the Data hub.
|
|
122
|
+
* - `{ event: "deal.won", type? }` — one event's page, optionally only when
|
|
123
|
+
* the event links an entity of `type`.
|
|
117
124
|
*/
|
|
118
125
|
export type Attachment = ViewAttachment;
|
|
126
|
+
/** How the host is showing the view: a card in a page (`inline`) or the
|
|
127
|
+
* view's own surface (`fullscreen`: the peek, a full page, a tab). */
|
|
128
|
+
export type DisplayMode = "inline" | "fullscreen";
|
|
129
|
+
/** The space the host gives the frame. Width is fixed or capped; an inline
|
|
130
|
+
* card's `maxHeight` is the height budget past which the host clips. */
|
|
131
|
+
export interface Container {
|
|
132
|
+
width?: number;
|
|
133
|
+
maxWidth?: number;
|
|
134
|
+
height?: number;
|
|
135
|
+
maxHeight?: number;
|
|
136
|
+
}
|
|
119
137
|
export interface ViewDefinition {
|
|
120
138
|
/** View key: the single namespace of keys (no `custom:` prefix). Required —
|
|
121
139
|
* it is the identity `invoke_view_action` and the shell route key on. */
|
|
122
140
|
key: string;
|
|
141
|
+
/** Display name; defaults to the key when the view is saved. */
|
|
142
|
+
name?: string;
|
|
143
|
+
description?: string;
|
|
123
144
|
/** Where the view appears. The attach line lives in the module; there are
|
|
124
145
|
* no attach/detach verbs. */
|
|
125
146
|
attach: Attachment[];
|
|
@@ -138,7 +159,25 @@ export declare function useHost(): {
|
|
|
138
159
|
connected: boolean;
|
|
139
160
|
ready: boolean;
|
|
140
161
|
theme: "light" | "dark";
|
|
162
|
+
/**
|
|
163
|
+
* Ask the host to open `url`. A relative URL (`"deal/acme-renewal"`, a
|
|
164
|
+
* record's `<type>/<slug>`) resolves against the workspace root, so the same
|
|
165
|
+
* link works on every page and in every host; a full URL opens outside the
|
|
166
|
+
* app. The frame is sandboxed, so this is the only way a view navigates;
|
|
167
|
+
* rejects when the host declines.
|
|
168
|
+
*/
|
|
169
|
+
openLink: (url: string) => Promise<void>;
|
|
170
|
+
/** `inline` as a card on a page, `fullscreen` as the view's own surface.
|
|
171
|
+
* Render a summary inline and the full view fullscreen. */
|
|
172
|
+
displayMode: DisplayMode;
|
|
173
|
+
container: Container;
|
|
174
|
+
/** Ask the host for another mode ("See all" → `"fullscreen"`). Resolves with
|
|
175
|
+
* the mode the host set, which stays the current one when it declines. */
|
|
176
|
+
requestDisplayMode: (mode: DisplayMode) => Promise<DisplayMode>;
|
|
141
177
|
};
|
|
178
|
+
/** The workspace root relative links resolve against: the shell's
|
|
179
|
+
* `lobu-workspace` meta, absent outside a server-rendered shell. */
|
|
180
|
+
export declare function resolveViewHref(href: string): string;
|
|
142
181
|
/**
|
|
143
182
|
* Tagged template: scalar values are rendered as escaped SQL literals,
|
|
144
183
|
* never spliced raw. Numbers must be finite, booleans map to true/false,
|
|
@@ -170,9 +209,10 @@ export declare function tool(name: string, args?: Record<string, unknown>): Tool
|
|
|
170
209
|
* reports a thrown script as `success: false` — both would otherwise render as
|
|
171
210
|
* "no rows". The server's typed code rides along as `errorCode`, and a capped
|
|
172
211
|
* result (`query_sql`'s `has_more`, `query_sdk`'s `return_truncated`) is
|
|
173
|
-
* flagged `truncated` instead of passing as the whole answer
|
|
212
|
+
* flagged `truncated` instead of passing as the whole answer, and a
|
|
213
|
+
* `query_sql` cell bounded by its size limits is named in `truncatedColumns`.
|
|
174
214
|
*/
|
|
175
|
-
export declare function queryResult<T>(kind: "sql" | "sdk" | "tool", result: ToolResult): Pick<QueryState<T>, "data" | "error" | "errorCode" | "truncated">;
|
|
215
|
+
export declare function queryResult<T>(kind: "sql" | "sdk" | "tool", result: ToolResult): Pick<QueryState<T>, "data" | "error" | "errorCode" | "truncated" | "truncatedColumns">;
|
|
176
216
|
export interface QueryState<T> {
|
|
177
217
|
data: T | null;
|
|
178
218
|
error: string | null;
|
|
@@ -184,16 +224,30 @@ export interface QueryState<T> {
|
|
|
184
224
|
* rows (fewer past its response-size ceiling) and `query_sdk` drops an
|
|
185
225
|
* oversized return value. `data` is then not the whole result. */
|
|
186
226
|
truncated: boolean;
|
|
227
|
+
/** `query_sql` columns where a returned cell was bounded: a string cut to
|
|
228
|
+
* its first 4,000 Unicode code points plus "… [truncated]", or a JSON value
|
|
229
|
+
* over 16 KiB replaced by `{ _truncated: true, bytes }` (attachments become
|
|
230
|
+
* null with attachments_truncated). Show those cells as too large, or select
|
|
231
|
+
* smaller elements or fields, e.g. `jsonb_array_elements(metadata->'items')`.
|
|
232
|
+
* Paginate as needed; each returned cell is still subject to these limits. */
|
|
233
|
+
truncatedColumns: string[];
|
|
187
234
|
loading: boolean;
|
|
188
235
|
refetch: () => void;
|
|
189
236
|
}
|
|
237
|
+
export interface QueryOptions {
|
|
238
|
+
/** Re-read in the background whenever workspace data changes (default
|
|
239
|
+
* true). Pass false for a read that reaches a remote source, such as a
|
|
240
|
+
* `feeds.readMany` search: it then runs once per query and again only on
|
|
241
|
+
* `refetch()`. */
|
|
242
|
+
live?: boolean;
|
|
243
|
+
}
|
|
190
244
|
/**
|
|
191
245
|
* Run a read through the host. `sql\`…\`` → `query_sql`; a string →
|
|
192
246
|
* `query_sdk` script; `tool(name, args)` → that tool; `null` skips. The first
|
|
193
247
|
* fetch waits for the host's first `tool-input`: reads before it run against
|
|
194
248
|
* defaults and double-fetch when the real scope lands.
|
|
195
249
|
*/
|
|
196
|
-
export declare function useQuery<T = unknown>(query: SqlQuery | ToolQuery | string | null): QueryState<T>;
|
|
250
|
+
export declare function useQuery<T = unknown>(query: SqlQuery | ToolQuery | string | null, options?: QueryOptions): QueryState<T>;
|
|
197
251
|
export interface ActionResult {
|
|
198
252
|
ok: boolean;
|
|
199
253
|
error: string | null;
|