@lobu/runtime-server 22.0.0 → 24.0.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 +1448 -212
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +15 -2
- package/dist/connectors/google_gmail.ts +1 -0
- package/dist/connectors/jira-helpers.ts +313 -0
- package/dist/connectors/jira.ts +29 -221
- package/dist/connectors/linkedin-browser-script.ts +13 -0
- package/dist/connectors/linkedin-draft-page.js +104 -0
- package/dist/connectors/linkedin-drafts.ts +73 -0
- package/dist/connectors/linkedin-identity.ts +32 -0
- package/dist/connectors/linkedin-inbox-adapter.js +1182 -0
- package/dist/connectors/linkedin-inbox.ts +156 -0
- package/dist/connectors/linkedin-like.ts +114 -0
- package/dist/connectors/linkedin-takeout.ts +577 -0
- package/dist/connectors/linkedin.ts +4017 -0
- package/dist/connectors/reddit.ts +92 -20
- package/dist/connectors/slack.ts +1 -0
- package/dist/connectors/takeout-utils.ts +240 -0
- package/dist/connectors/tiktok-inbox-page.js +9 -9
- package/dist/connectors/tiktok-web-page.js +21 -15
- package/dist/connectors/tiktok_web.ts +63 -30
- package/dist/connectors/whatsapp-web-adapter.js +104 -574
- package/dist/connectors/whatsapp-web-helpers.ts +30 -444
- package/dist/connectors/whatsapp-web-identity.ts +20 -6
- package/dist/connectors/whatsapp_web.ts +46 -646
- package/dist/connectors/x-dm-adapter.js +556 -0
- package/dist/connectors/x-identity.ts +33 -2
- package/dist/connectors/x.ts +266 -120
- package/dist/db/migrations/20261017120000_drop_feeds_kind_virtual.sql +26 -0
- package/dist/db/migrations/20261017130000_drop_retired_dead_code_columns.sql +46 -0
- 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/dependencies.bun.lock +78 -75
- package/dist/guest.bundle.js +650 -448
- package/dist/owletto/dist/assets/_-CC8cTmRg.js +3 -0
- package/dist/owletto/dist/assets/_-ksFp4zVf.js +2 -0
- package/dist/owletto/dist/assets/_agentId-DWUFSrVp.js +2 -0
- package/dist/owletto/dist/assets/_agentId-MENLoohA.js +2 -0
- package/dist/owletto/dist/assets/_automationId-BnHqdXOC.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-CefXIqy2.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-C1QPGf9E.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-DinuPCUp.js +2 -0
- package/dist/owletto/dist/assets/{_deploymentId-BQfYN1U2.js → _deploymentId-BeyzVjRm.js} +2 -2
- package/dist/owletto/dist/assets/_eventId-3L_qeL_l.js +2 -0
- package/dist/owletto/dist/assets/_name-Dgedji78.js +2 -0
- package/dist/owletto/dist/assets/_owner-DbrKma4e.js +3 -0
- package/dist/owletto/dist/assets/_shape-DtVfRFz_.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-CqLHzm7L.js +2 -0
- package/dist/owletto/dist/assets/_slug-ndDr_CUg.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-3CH5w8mr.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-DHQY9A8u.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-D3OgJG4i.js → accept-invitation-CRKbM2Xy.js} +2 -2
- package/dist/owletto/dist/assets/activity-route-view-CFLNukhD.js +2 -0
- package/dist/owletto/dist/assets/{agent-card-controls-DzRs4Ix9.js → agent-card-controls-Be1Okb2C.js} +2 -2
- package/dist/owletto/dist/assets/{agent-client-setup-list-B2SvH7xD.js → agent-client-setup-list-BA8dU_C6.js} +2 -2
- package/dist/owletto/dist/assets/agent-connect-pages-CAV-yXus.js +2 -0
- package/dist/owletto/dist/assets/agent-editor-form-Bi6WvYX-.js +2 -0
- package/dist/owletto/dist/assets/{agent-guardrails-route-BaV1VpDh.js → agent-guardrails-route-DMOjG1D4.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-CtZJM2Gc.js → agent-loading-shells-De_2d8Lr.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-Ds48KFK9.js → agent-permissions-matrix-gZWl6mAe.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-DPk5r08w.js → agent-skill-context-JLaTamGR.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skills-route-DYpB5H1J.js → agent-skills-route-DcK41PWj.js} +2 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-BBJoyTuC.js +2 -0
- package/dist/owletto/dist/assets/agent-thread-Buz3naVF.js +6 -0
- package/dist/owletto/dist/assets/agents-C-ReckCa.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-CqaKGggb.js +2 -0
- package/dist/owletto/dist/assets/app._appId-Cl1fTuIt.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-BMLL4lxO.js +2 -0
- package/dist/owletto/dist/assets/automations-C-ReckCa.js +2 -0
- package/dist/owletto/dist/assets/callback-DTKKsfkz.js +2 -0
- package/dist/owletto/dist/assets/{card-DIF8SF9b.js → card-yU0TmNRH.js} +2 -2
- package/dist/owletto/dist/assets/{claim-DELEa-gH.js → claim-DJfTvlT2.js} +2 -2
- package/dist/owletto/dist/assets/client-rows--FrZfJol.js +2 -0
- package/dist/owletto/dist/assets/{clients-CpG676mg.js → clients-L4K1UT8c.js} +2 -2
- package/dist/owletto/dist/assets/{code-editor-V27Z4o3P.js → code-editor-U54Gwjit.js} +2 -2
- package/dist/owletto/dist/assets/connect-4zqtnDHb.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-Dj0SqgbE.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-sgtocSvf.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-DTpSW1Xy.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-h9X5H1x8.js +2 -0
- package/dist/owletto/dist/assets/{connection-DySpRE9x.js → connection-ByvKkyFm.js} +2 -2
- package/dist/owletto/dist/assets/{connection-feed-detail-C_D68j6d.js → connection-feed-detail-DWM9lTao.js} +2 -2
- package/dist/owletto/dist/assets/connections-browser-CEwYrYqt.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-CNXtzYg5.js → connector-provenance-BocTm__v.js} +2 -2
- package/dist/owletto/dist/assets/connector-scope-lists-OYDOydtz.js +2 -0
- package/dist/owletto/dist/assets/connectors-CyZpcE5f.js +2 -0
- package/dist/owletto/dist/assets/{consent-BVzxrAO9.js → consent-DdfINrVp.js} +2 -2
- package/dist/owletto/dist/assets/{conversations-table-DfZGICl7.js → conversations-table-BSznfdYt.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-DiTpULFl.js → core.esm-Dr7tcIB-.js} +2 -2
- package/dist/owletto/dist/assets/create-CBGwASon.js +2 -0
- package/dist/owletto/dist/assets/create-Cf5hp6Z8.js +2 -0
- package/dist/owletto/dist/assets/create-CwThQtd3.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-9T5WnoUs.js +3 -0
- package/dist/owletto/dist/assets/create._connectorKey-sNHQHNpg.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-DPXl0qA2.js → cronstrue-BWFEyy_P.js} +2 -2
- package/dist/owletto/dist/assets/deployments-DHh9dyzv.js +2 -0
- package/dist/owletto/dist/assets/{deployments-body-D6TAWs_6.js → deployments-body-2xKS8gRo.js} +2 -2
- package/dist/owletto/dist/assets/{deployments-DCQdFdwG.js → deployments-wG_8QzOF.js} +2 -2
- package/dist/owletto/dist/assets/{device-CntqYW65.js → device-6z-xgsoW.js} +2 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-Cwq88RMU.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-BDerBfD9.js +2 -0
- package/dist/owletto/dist/assets/entity-avatar-Cc1CuI-0.js +2 -0
- package/dist/owletto/dist/assets/entity-options-DHdMC1Lx.js +2 -0
- package/dist/owletto/dist/assets/entity-page--OkXmlNP.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-89RoK_-P.js +2 -0
- package/dist/owletto/dist/assets/event-detail-D4YZRtrA.js +2 -0
- package/dist/owletto/dist/assets/events-feed-DsrkV2ix.js +2 -0
- package/dist/owletto/dist/assets/filter-editors-B1_QUpg_.js +2 -0
- package/dist/owletto/dist/assets/{full-page-spinner-KpV2FS2u.js → full-page-spinner-Cqih-8IW.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-B8Rs1be3.js +2 -0
- package/dist/owletto/dist/assets/identity-B0nH4yiC.js +2 -0
- package/dist/owletto/dist/assets/index-4TSkcsth.js +2 -0
- package/dist/owletto/dist/assets/index-BSH07yVD.css +1 -0
- package/dist/owletto/dist/assets/index-BgkhXElB.js +2 -0
- package/dist/owletto/dist/assets/index-CoW4Bz3w.js +2 -0
- package/dist/owletto/dist/assets/index-Codw-Qqi.js +2 -0
- package/dist/owletto/dist/assets/{index-BNh2cidi.js → index-DAOyXG1X.js} +2 -2
- package/dist/owletto/dist/assets/{index-BEvyBdOU.js → index-DKPwCasf.js} +2 -2
- package/dist/owletto/dist/assets/index-DMyXd3bJ.js +2 -0
- package/dist/owletto/dist/assets/index-DYCqXaMf.js +7950 -0
- package/dist/owletto/dist/assets/index-DYYZLcJ0.js +2 -0
- package/dist/owletto/dist/assets/index-DYzWV5_z.js +2 -0
- package/dist/owletto/dist/assets/index-Da6CrGEu.js +2 -0
- package/dist/owletto/dist/assets/{index-DCdkwg9H.js → index-DfyDUpuI.js} +2 -2
- package/dist/owletto/dist/assets/index-DneshLbf.js +2 -0
- package/dist/owletto/dist/assets/index-TgRS2v_F.js +2 -0
- package/dist/owletto/dist/assets/{index-BJXkc60S.js → index-ZNlrDc_f.js} +2 -2
- package/dist/owletto/dist/assets/{json-diff-D_Ym3Uku.js → json-diff-DFvYINBT.js} +3 -3
- package/dist/owletto/dist/assets/{list-skeleton-Bl0OS39L.js → list-skeleton-DFsEqLU1.js} +2 -2
- package/dist/owletto/dist/assets/login-DO0j-AYr.js +2 -0
- package/dist/owletto/dist/assets/{logout-DUccApuZ.js → logout-BmNwoAf7.js} +2 -2
- package/dist/owletto/dist/assets/member-scope-gate-B2LrMWBU.js +2 -0
- package/dist/owletto/dist/assets/memory-browse-page-Cjpl8EbB.js +103 -0
- package/dist/owletto/dist/assets/{model-selector-CB1BDvlW.js → model-selector-TQcA93xm.js} +2 -2
- package/dist/owletto/dist/assets/models-D7aED5Sa.js +2 -0
- package/dist/owletto/dist/assets/new-BMrFy5Qa.js +2 -0
- package/dist/owletto/dist/assets/{new-B5UsLiy6.js → new-ByBhteWA.js} +2 -2
- package/dist/owletto/dist/assets/new-DWp3deoW.js +2 -0
- package/dist/owletto/dist/assets/{oauth-workspace-access-PGyTnW2K.js → oauth-workspace-access-D_5uESuz.js} +2 -2
- package/dist/owletto/dist/assets/{organization-BH8PYlVu.js → organization-DTFoYP4V.js} +2 -2
- package/dist/owletto/dist/assets/peek-pane-content-DF5iGC3c.js +2 -0
- package/dist/owletto/dist/assets/{permissions-CwN_YP3u.js → permissions-C_auqxfP.js} +2 -2
- package/dist/owletto/dist/assets/proposal-review-shell-DsNiavG_.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-B2NUI89V.js +2 -0
- package/dist/owletto/dist/assets/{recent-DqdZE_TI.js → recent-3d99S2IE.js} +2 -2
- package/dist/owletto/dist/assets/record-activity-C9KfBkXb.js +2 -0
- package/dist/owletto/dist/assets/record-field-peek-BBZcRuGT.js +2 -0
- package/dist/owletto/dist/assets/record-session-BizRugWs.js +2 -0
- package/dist/owletto/dist/assets/{reset-password-DAvBYkiI.js → reset-password-DqfcSn8M.js} +2 -2
- package/dist/owletto/dist/assets/runs-panel-T1ZxTVz6.js +2 -0
- package/dist/owletto/dist/assets/runs-table-D_8QlCCN.js +2 -0
- package/dist/owletto/dist/assets/schema-value-normalization-CylKX3PK.js +97 -0
- package/dist/owletto/dist/assets/settings-B_ClYztB.js +2 -0
- package/dist/owletto/dist/assets/settings-DgX1-xo7.js +2 -0
- package/dist/owletto/dist/assets/skills-Drw5tcZw.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-CRIPMWfN.js → source-record-panels-Cg249m1S.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-DqEykWl_.js → use-mention-search-BYbFvHbJ.js} +2 -2
- package/dist/owletto/dist/assets/view-param-filters-DMSqkN2J.js +2 -0
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +14031 -12680
- package/npm-shrinkwrap.json +329 -313
- package/package.json +6 -5
- package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
- package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
- package/vendor/connector-sdk/dist/browser-source-read.d.ts +52 -0
- package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
- package/vendor/connector-sdk/dist/connector-types.d.ts +10 -0
- package/vendor/connector-sdk/dist/index.d.ts +3 -0
- package/vendor/connector-sdk/dist/index.js +2 -0
- package/vendor/connector-sdk/package.json +9 -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/capabilities.d.ts +1 -1
- package/vendor/core/dist/capabilities.js +0 -1
- package/vendor/core/dist/connector-query-errors.d.ts +32 -0
- package/vendor/core/dist/connector-query-errors.js +41 -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-conversations.js +2 -2
- package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +14 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
- 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/worker/protocol.d.ts +47 -133
- package/vendor/core/dist/contracts/worker/protocol.js +33 -62
- package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
- package/vendor/core/dist/device-pin-tombstones.js +57 -0
- package/vendor/core/dist/index.d.ts +3 -2
- package/vendor/core/dist/index.js +3 -1
- package/vendor/core/dist/logger.js +10 -25
- 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/dist/utils/diagnostic-scrubber.js +258 -21
- package/vendor/core/dist/worker/wire.d.ts +0 -10
- package/vendor/core/package.json +16 -10
- 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/_-CEPl6gU4.js +0 -3
- package/dist/owletto/dist/assets/_-C_zNZben.js +0 -2
- package/dist/owletto/dist/assets/_agentId-CBC_SadO.js +0 -2
- package/dist/owletto/dist/assets/_agentId-QQW91cHX.js +0 -2
- package/dist/owletto/dist/assets/_automationId-YTTNksw6.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-fK0h7RAp.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-C7TPS598.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-CEhxlTIo.js +0 -2
- package/dist/owletto/dist/assets/_eventId-Cl8GSdjg.js +0 -2
- package/dist/owletto/dist/assets/_name-t3oBJ6Zf.js +0 -2
- package/dist/owletto/dist/assets/_owner-cUtGHqSw.js +0 -3
- package/dist/owletto/dist/assets/_shape-bo2lMVCu.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-Dwm4Q4wI.js +0 -2
- package/dist/owletto/dist/assets/_slug-CU1PuHB9.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-Bh6E_NxA.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-D4jKl-Zf.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-DQglkhXU.js +0 -2
- package/dist/owletto/dist/assets/agent-connect-pages-B6uKvT_X.js +0 -2
- package/dist/owletto/dist/assets/agent-editor-form-oUnIYHd7.js +0 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-B3K_jPYR.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-C8UaUTWc.js +0 -6
- package/dist/owletto/dist/assets/agents-F4mGI2oF.js +0 -2
- package/dist/owletto/dist/assets/agents-workbench-CMyk4PI7.js +0 -2
- package/dist/owletto/dist/assets/app._appId-DH1Qutz6.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-CEDNboId.js +0 -2
- package/dist/owletto/dist/assets/automations-F4mGI2oF.js +0 -2
- package/dist/owletto/dist/assets/callback-CU-hb8JB.js +0 -2
- package/dist/owletto/dist/assets/client-rows-EJSKR6z1.js +0 -2
- package/dist/owletto/dist/assets/connect-B2YL6qIK.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-B6LDmDRV.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-D_HaKoI1.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.activity-DQWcUqKM.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.index-BC3R303A.js +0 -2
- package/dist/owletto/dist/assets/connections-browser-Cnv2iBbZ.js +0 -2
- package/dist/owletto/dist/assets/connector-scope-lists-BKDetNDc.js +0 -2
- package/dist/owletto/dist/assets/connectors-BJnk1z_2.js +0 -2
- package/dist/owletto/dist/assets/create-CUqO6Kfk.js +0 -2
- package/dist/owletto/dist/assets/create-JRFM8mMf.js +0 -2
- package/dist/owletto/dist/assets/create-automation-form-_4vUkrls.js +0 -3
- package/dist/owletto/dist/assets/create-iHcxV0xd.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-CCYLEicg.js +0 -2
- package/dist/owletto/dist/assets/deployments-ihkhK1zV.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-Bz4JHHMK.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-D4plO3GM.js +0 -2
- package/dist/owletto/dist/assets/entity-options-UJs64GdQ.js +0 -2
- package/dist/owletto/dist/assets/entity-page-Djz6T50J.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-OznRag6A.js +0 -2
- package/dist/owletto/dist/assets/event-detail-04qOUGIP.js +0 -2
- package/dist/owletto/dist/assets/events-feed-fucGZSJR.js +0 -2
- package/dist/owletto/dist/assets/filter-editors-DCQgGLyR.js +0 -2
- package/dist/owletto/dist/assets/guardrails-molekzAF.js +0 -2
- package/dist/owletto/dist/assets/identity-BJcaG66g.js +0 -2
- package/dist/owletto/dist/assets/index-B04ON9Jv.js +0 -2
- package/dist/owletto/dist/assets/index-BLEcy9-T.css +0 -1
- package/dist/owletto/dist/assets/index-BOsK-K-2.js +0 -2
- package/dist/owletto/dist/assets/index-BOzuAbvi.js +0 -2
- package/dist/owletto/dist/assets/index-Bk1x7A67.js +0 -2
- package/dist/owletto/dist/assets/index-CFnx5huL.js +0 -2
- package/dist/owletto/dist/assets/index-D3s8rhG9.js +0 -2
- package/dist/owletto/dist/assets/index-Dbd1jusf.js +0 -2
- package/dist/owletto/dist/assets/index-DqZuqC08.js +0 -2
- package/dist/owletto/dist/assets/index-Dr-Xg_xO.js +0 -2
- package/dist/owletto/dist/assets/index-KPOvMVa-.js +0 -2
- package/dist/owletto/dist/assets/index-_oPeVpL_.js +0 -7950
- package/dist/owletto/dist/assets/login-QHdxqX-4.js +0 -2
- package/dist/owletto/dist/assets/member-scope-gate-CFbrq1by.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-IrIXuZTF.js +0 -103
- package/dist/owletto/dist/assets/models-DnMb3n-Z.js +0 -2
- package/dist/owletto/dist/assets/new-BWo8_Pms.js +0 -2
- package/dist/owletto/dist/assets/new-DpmDXmFI.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-B2AFNTzP.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-DKKGu4Ww.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-7KYnww6e.js +0 -2
- package/dist/owletto/dist/assets/record-activity-CvgZyCmw.js +0 -2
- package/dist/owletto/dist/assets/renderer-BL6VcwQH.js +0 -97
- package/dist/owletto/dist/assets/runs-BWtc5rmc.js +0 -2
- package/dist/owletto/dist/assets/runs-panel-BO3h5RkS.js +0 -2
- package/dist/owletto/dist/assets/runs-table-DxIiqrSk.js +0 -2
- package/dist/owletto/dist/assets/settings-4Ev-0iNL.js +0 -2
- package/dist/owletto/dist/assets/settings-Crxlwps-.js +0 -2
- package/dist/owletto/dist/assets/skills-D0X430X8.js +0 -2
- package/dist/owletto/dist/assets/status-dot-C5KDvvm9.js +0 -2
- package/dist/owletto/dist/assets/tabs-B4Er9hJj.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-Cylutoy1.js +0 -2
- package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
- package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
- /package/vendor/postgres/{.bun-tag-f39dafdb2305d504 → .bun-tag-2f292c6554a8475e} +0 -0
|
@@ -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);
|
|
@@ -30,6 +30,7 @@ var command_registry_1 = require("./command-registry");
|
|
|
30
30
|
Object.defineProperty(exports, "CommandRegistry", { enumerable: true, get: function () { return command_registry_1.CommandRegistry; } });
|
|
31
31
|
__exportStar(require("./connector-query-errors"), exports);
|
|
32
32
|
__exportStar(require("./constants"), exports);
|
|
33
|
+
__exportStar(require("./device-pin-tombstones"), exports);
|
|
33
34
|
// Interaction-envelope wire literals (tool_approval resourceKind / attribution).
|
|
34
35
|
// Deep import `@lobu/core/contracts/interaction-envelope` also works under
|
|
35
36
|
// bundler/NodeNext resolution; plugin packages with classic `moduleResolution:
|
|
@@ -83,6 +84,7 @@ Object.defineProperty(exports, "extractTraceId", { enumerable: true, get: functi
|
|
|
83
84
|
Object.defineProperty(exports, "generateTraceId", { enumerable: true, get: function () { return trace_1.generateTraceId; } });
|
|
84
85
|
var types_1 = require("./types");
|
|
85
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; } });
|
|
86
88
|
var types_2 = require("./types");
|
|
87
89
|
Object.defineProperty(exports, "SUGGESTION_LIMITS", { enumerable: true, get: function () { return types_2.SUGGESTION_LIMITS; } });
|
|
88
90
|
Object.defineProperty(exports, "sanitizeSuggestionPrompts", { enumerable: true, get: function () { return types_2.sanitizeSuggestionPrompts; } });
|
|
@@ -11,30 +11,9 @@ const USE_WINSTON_LOGGER = process.env.USE_WINSTON_LOGGER === "true";
|
|
|
11
11
|
const USE_JSON_FORMAT = process.env.LOG_FORMAT === "json";
|
|
12
12
|
const winston_1 = __importDefault(require("winston"));
|
|
13
13
|
const diagnostic_scrubber_1 = require("./utils/diagnostic-scrubber");
|
|
14
|
-
const SENSITIVE_LOG_KEY_PATTERN = /(?:credential|secret|token|password|api(?:_|-)?key|authorization)/i;
|
|
15
|
-
function createRedactingReplacer() {
|
|
16
|
-
const seen = new WeakSet();
|
|
17
|
-
return (key, value) => {
|
|
18
|
-
if (SENSITIVE_LOG_KEY_PATTERN.test(key))
|
|
19
|
-
return "[REDACTED]";
|
|
20
|
-
if (value instanceof Error) {
|
|
21
|
-
return {
|
|
22
|
-
name: value.name,
|
|
23
|
-
message: value.message,
|
|
24
|
-
stack: value.stack,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
if (typeof value === "object" && value !== null) {
|
|
28
|
-
if (seen.has(value))
|
|
29
|
-
return "[Circular Reference]";
|
|
30
|
-
seen.add(value);
|
|
31
|
-
}
|
|
32
|
-
return value;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
14
|
function safeStringify(value, space) {
|
|
36
15
|
try {
|
|
37
|
-
return JSON.stringify((0, diagnostic_scrubber_1.scrubDiagnosticValue)(value),
|
|
16
|
+
return JSON.stringify((0, diagnostic_scrubber_1.scrubDiagnosticValue)(value), null, space);
|
|
38
17
|
}
|
|
39
18
|
catch {
|
|
40
19
|
return "[unserializable]";
|
|
@@ -63,7 +42,9 @@ function createConsoleLogger(serviceName) {
|
|
|
63
42
|
// Keep the metadata object as a trailing arg so it still renders.
|
|
64
43
|
// Slicing it away accepted the signature and then dropped the payload,
|
|
65
44
|
// emptying every structured diagnostic that uses this call shape.
|
|
66
|
-
|
|
45
|
+
// The message itself is a string, so it takes the same boundary
|
|
46
|
+
// scrubbing as any other string message.
|
|
47
|
+
msgStr = (0, diagnostic_scrubber_1.scrubDiagnosticValue)(args[0]);
|
|
67
48
|
args = [message, ...args.slice(1)];
|
|
68
49
|
}
|
|
69
50
|
else {
|
|
@@ -72,7 +53,11 @@ function createConsoleLogger(serviceName) {
|
|
|
72
53
|
}
|
|
73
54
|
}
|
|
74
55
|
else {
|
|
75
|
-
|
|
56
|
+
// Everything else funnels through String() here: plain strings,
|
|
57
|
+
// Errors, and top-level arrays (their join is just message text).
|
|
58
|
+
// Scrub the converted text — the removed final scrub used to cover
|
|
59
|
+
// all of these, and that coverage now lives here.
|
|
60
|
+
msgStr = (0, diagnostic_scrubber_1.scrubDiagnosticValue)(String(message));
|
|
76
61
|
}
|
|
77
62
|
if (USE_JSON_FORMAT) {
|
|
78
63
|
return safeStringify({
|
|
@@ -90,7 +75,7 @@ function createConsoleLogger(serviceName) {
|
|
|
90
75
|
if (args.length > 0) {
|
|
91
76
|
msgStr += ` ${safeStringify(args.length === 1 ? args[0] : args)}`;
|
|
92
77
|
}
|
|
93
|
-
return `[${timestamp.replace("T", " ").slice(0, 19)}] [${lvl}] [${serviceName}] ${
|
|
78
|
+
return `[${timestamp.replace("T", " ").slice(0, 19)}] [${lvl}] [${serviceName}] ${msgStr}`;
|
|
94
79
|
};
|
|
95
80
|
return {
|
|
96
81
|
error: (message, ...args) => {
|
|
@@ -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);
|
|
@@ -22,9 +22,185 @@ const SECRET_KEY_SEGMENTS = new Set(["signature", "sig"]);
|
|
|
22
22
|
* Whole (squashed) key names the shared denylist does not classify. Carried
|
|
23
23
|
* over from the bespoke sanitizer this module replaced: `verifier` and `state`
|
|
24
24
|
* are far too broad as segments (`freshness_state`, `run_state`), so these two
|
|
25
|
-
* are matched only as complete names.
|
|
25
|
+
* are matched only as complete names. `authorizationheader` is the same story:
|
|
26
|
+
* HTTP client options carry it camel-cased (`authorizationHeader`), which the
|
|
27
|
+
* shared suffix denylist never sees, while `authorization` alone as a segment
|
|
28
|
+
* would sweep up `authorization_mode` and `authorization_policy`.
|
|
29
|
+
* `authorizationcode` is the OAuth code in any casing or separator style.
|
|
26
30
|
*/
|
|
27
|
-
const SECRET_KEY_EXACT = new Set([
|
|
31
|
+
const SECRET_KEY_EXACT = new Set([
|
|
32
|
+
"codeverifier",
|
|
33
|
+
"sessionstate",
|
|
34
|
+
"authorizationheader",
|
|
35
|
+
"authorizationcode",
|
|
36
|
+
]);
|
|
37
|
+
/**
|
|
38
|
+
* Concatenated credential names the separator-based rules never see:
|
|
39
|
+
* `PGPASSWORD`, `clientsecret`, `customapikey`, `myauthtoken` (the shared
|
|
40
|
+
* denylist has no `auth_?token` form), `idtoken`, and any other bare
|
|
41
|
+
* `*token` compound (`csrftoken`, `githubtoken`). Matched as a bare ending
|
|
42
|
+
* (case-insensitive, separator-free) so `tokenizer` and `keyboard` stay
|
|
43
|
+
* readable. Bare `token_count`-style usage keys stay readable because the
|
|
44
|
+
* benign-usage exemption runs before every classification below.
|
|
45
|
+
*/
|
|
46
|
+
const BARE_CREDENTIAL_SUFFIXES = [
|
|
47
|
+
"password",
|
|
48
|
+
"passwd",
|
|
49
|
+
"secret",
|
|
50
|
+
"apikey",
|
|
51
|
+
"token",
|
|
52
|
+
"authtoken",
|
|
53
|
+
"idtoken",
|
|
54
|
+
];
|
|
55
|
+
function hasBareCredentialSuffix(key, allowEqual = false) {
|
|
56
|
+
const flat = key.replace(/[^a-z0-9]/gi, "").toLowerCase();
|
|
57
|
+
return BARE_CREDENTIAL_SUFFIXES.some((suffix) => flat.endsWith(suffix) && (allowEqual || flat.length > suffix.length));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Split-form credential names the whole/suffix rules miss. Case boundaries
|
|
61
|
+
* are split before lowercasing (mirroring `normalizeKey` in secret-redaction,
|
|
62
|
+
* including its acronym run), so camelCase compounds pin correctly.
|
|
63
|
+
* Separator-less all-lowercase compounds fall through to the bare-suffix
|
|
64
|
+
* rule above.
|
|
65
|
+
*/
|
|
66
|
+
function splitKeySegments(key) {
|
|
67
|
+
return key
|
|
68
|
+
.replace(/([A-Z])(?=[A-Z][a-z])/g, "$1_")
|
|
69
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1_$2")
|
|
70
|
+
.replace(/[^a-z0-9]+/gi, "_")
|
|
71
|
+
.toLowerCase()
|
|
72
|
+
.split("_")
|
|
73
|
+
.filter((segment) => segment.length > 0);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* An `authorization` segment anywhere near the front names a header or an
|
|
77
|
+
* auth credential (`x-authorization`, `requestAuthorizationValue`,
|
|
78
|
+
* `proxy_authorization_value`, `authorizationJson`): trailing (after an
|
|
79
|
+
* optional `header`/`headers`) it is a header and collapses; followed by
|
|
80
|
+
* anything but pure config qualifiers it is a credential container;
|
|
81
|
+
* followed only by config qualifiers (`authorization_mode`,
|
|
82
|
+
* `authorization_policy`) it stays readable.
|
|
83
|
+
*
|
|
84
|
+
* A leading credential run names a credential CONTAINER
|
|
85
|
+
* (`credentials_json`, `credentialsByName`, `password_confirmation`,
|
|
86
|
+
* `secret_value`, `oauthCredentialsJson`, `token_value`,
|
|
87
|
+
* `accessTokenValue`, `api_key_value`, `authtoken`, `csrftoken`,
|
|
88
|
+
* `githubtoken`, `clientsecretvalue`). The head must classify under the
|
|
89
|
+
* shared suffix rules, read as a suffix term, or end with a bare credential
|
|
90
|
+
* term the shared rules miss — a whole-name exact match never seeds one
|
|
91
|
+
* (`cookie`, `authorization`, `auth`, `bearer`), so `cookie-policy` stays
|
|
92
|
+
* readable. A two-segment usage metric (`token_count`, `token_total`,
|
|
93
|
+
* `max_tokens`, `totalTokens`) is exempt everywhere: usage metadata stays
|
|
94
|
+
* readable per the logger contract. Only the leading run (bounded below)
|
|
95
|
+
* is scanned, so pathological keys stay linear. Container semantics live in
|
|
96
|
+
* the walk: a scalar beneath one IS the serialized credential and collapses,
|
|
97
|
+
* while a structured value beneath one recurses with every descendant
|
|
98
|
+
* treated as credential-adjacent (a map's leaves cannot be trusted by key
|
|
99
|
+
* name alone — `credentialsByName.github` proves it).
|
|
100
|
+
*/
|
|
101
|
+
/** Qualifiers that mark a key as usage metadata, never a credential. */
|
|
102
|
+
const BENIGN_COUNT_QUALIFIERS = new Set([
|
|
103
|
+
"count",
|
|
104
|
+
"counts",
|
|
105
|
+
"total",
|
|
106
|
+
"totals",
|
|
107
|
+
"used",
|
|
108
|
+
"usage",
|
|
109
|
+
"remaining",
|
|
110
|
+
"limit",
|
|
111
|
+
"limits",
|
|
112
|
+
"max",
|
|
113
|
+
"quota",
|
|
114
|
+
"quotas",
|
|
115
|
+
]);
|
|
116
|
+
/** Config qualifiers that keep an `authorization` key readable. */
|
|
117
|
+
const AUTH_CONFIG_QUALIFIERS = new Set(["mode", "modes", "policy", "policies"]);
|
|
118
|
+
/**
|
|
119
|
+
* Whether a key segment run reads as a credential SUFFIX term rather than
|
|
120
|
+
* merely a whole name: `x_token` still classifies, so `token` seeds
|
|
121
|
+
* compounds, while `x_cookie`, `x_auth` and `x_bearer` have no credential
|
|
122
|
+
* reading, so those whole names never seed one.
|
|
123
|
+
*/
|
|
124
|
+
function isSuffixTerm(head) {
|
|
125
|
+
return (0, secret_redaction_1.isSecretKey)(`x_${head}`) || (0, secret_redaction_1.isSecretKey)(squashKey(`x_${head}`));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Whether a head classifies solely as a whole name (the shared exact set:
|
|
129
|
+
* `cookie`, `authorization`, `auth`, `bearer`) rather than as a suffix term
|
|
130
|
+
* or bare compound. Whole-name heads never seed a compound.
|
|
131
|
+
*/
|
|
132
|
+
function isWholeNameOnly(head) {
|
|
133
|
+
const whole = (0, secret_redaction_1.isSecretKey)(head) || (0, secret_redaction_1.isSecretKey)(squashKey(head));
|
|
134
|
+
if (!whole)
|
|
135
|
+
return false;
|
|
136
|
+
return !isSuffixTerm(head) && !hasBareCredentialSuffix(head, true);
|
|
137
|
+
}
|
|
138
|
+
/** Two-segment usage metrics (`token_count`, `max_tokens`, `totalTokens`). */
|
|
139
|
+
function isBenignUsageKey(key) {
|
|
140
|
+
const segments = splitKeySegments(key);
|
|
141
|
+
if (segments.length !== 2)
|
|
142
|
+
return false;
|
|
143
|
+
const [first, second] = segments;
|
|
144
|
+
const isTokenWord = (segment) => segment === "token" || segment === "tokens";
|
|
145
|
+
return ((isTokenWord(first) && BENIGN_COUNT_QUALIFIERS.has(second)) ||
|
|
146
|
+
(BENIGN_COUNT_QUALIFIERS.has(first) && isTokenWord(second)));
|
|
147
|
+
}
|
|
148
|
+
/** Longest credential-name prefix worth testing; real compounds are short. */
|
|
149
|
+
const MAX_CREDENTIAL_PREFIX_PARTS = 8;
|
|
150
|
+
function classifyAuthorization(key) {
|
|
151
|
+
const segments = splitKeySegments(key);
|
|
152
|
+
const limit = Math.min(segments.length, MAX_CREDENTIAL_PREFIX_PARTS);
|
|
153
|
+
for (let index = 0; index < limit; index++) {
|
|
154
|
+
if (segments[index] !== "authorization")
|
|
155
|
+
continue;
|
|
156
|
+
const tail = segments
|
|
157
|
+
.slice(index + 1)
|
|
158
|
+
.filter((segment) => segment !== "header" && segment !== "headers");
|
|
159
|
+
if (tail.length === 0)
|
|
160
|
+
return "strong";
|
|
161
|
+
if (tail.every((segment) => AUTH_CONFIG_QUALIFIERS.has(segment)))
|
|
162
|
+
continue;
|
|
163
|
+
return "container";
|
|
164
|
+
}
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
function hasCredentialSegment(key) {
|
|
168
|
+
if (isBenignUsageKey(key))
|
|
169
|
+
return false;
|
|
170
|
+
if (classifyAuthorization(key) === "container")
|
|
171
|
+
return true;
|
|
172
|
+
const segments = splitKeySegments(key);
|
|
173
|
+
// Bounded lookahead: real credential compounds are short
|
|
174
|
+
// (`access_token`, `oauth_credentials`); scanning an unbounded prefix run
|
|
175
|
+
// turns a pathological key into quadratic work.
|
|
176
|
+
const end = Math.min(segments.length, MAX_CREDENTIAL_PREFIX_PARTS);
|
|
177
|
+
for (let length = 1; length <= end; length++) {
|
|
178
|
+
const head = segments.slice(0, length).join("_");
|
|
179
|
+
if (isWholeNameOnly(head))
|
|
180
|
+
continue;
|
|
181
|
+
const qualifies = (0, secret_redaction_1.isSecretKey)(head) ||
|
|
182
|
+
(0, secret_redaction_1.isSecretKey)(squashKey(head)) ||
|
|
183
|
+
hasBareCredentialSuffix(head, true);
|
|
184
|
+
if (!qualifies)
|
|
185
|
+
continue;
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
// Separator-free compounds with the credential term in the middle
|
|
189
|
+
// (`clientsecretvalue`): the shared rules and split segment tests never
|
|
190
|
+
// see them. `token` and bare `key` stay out here — `tokenizer`,
|
|
191
|
+
// `keyboard` and usage counters stay readable.
|
|
192
|
+
const flat = squashKey(key);
|
|
193
|
+
return SUBSTRING_CREDENTIALS.some((term) => flat.includes(term));
|
|
194
|
+
}
|
|
195
|
+
/** Credential terms matched as substrings of separator-free compounds. */
|
|
196
|
+
const SUBSTRING_CREDENTIALS = [
|
|
197
|
+
"secret",
|
|
198
|
+
"password",
|
|
199
|
+
"passwd",
|
|
200
|
+
"credential",
|
|
201
|
+
"credentials",
|
|
202
|
+
"apikey",
|
|
203
|
+
];
|
|
28
204
|
/** Bound recursive work on diagnostic values. */
|
|
29
205
|
const MAX_DEPTH = 8;
|
|
30
206
|
const MAX_ENTRIES = 1000;
|
|
@@ -38,15 +214,35 @@ function squashKey(key) {
|
|
|
38
214
|
* test the squashed form too.
|
|
39
215
|
*/
|
|
40
216
|
function isSecretObjectKey(key) {
|
|
217
|
+
if (isBenignUsageKey(key))
|
|
218
|
+
return false;
|
|
219
|
+
return isStrongSecretKey(key) || hasCredentialSegment(key);
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The collapsing half of key classification: a key whose NAME alone proves
|
|
223
|
+
* the value is a credential, so the whole value is replaced without
|
|
224
|
+
* inspection. Credential CONTAINERS (`hasCredentialSegment`) are deliberately
|
|
225
|
+
* excluded — their collapse rule depends on the value type (see the walk),
|
|
226
|
+
* and collapsing a map parent would destroy surviving key names the Loki
|
|
227
|
+
* connector pre-redacted.
|
|
228
|
+
*/
|
|
229
|
+
function isStrongSecretKey(key) {
|
|
230
|
+
if (isBenignUsageKey(key))
|
|
231
|
+
return false;
|
|
41
232
|
if ((0, secret_redaction_1.isSecretKey)(key))
|
|
42
233
|
return true;
|
|
43
234
|
if ((0, secret_redaction_1.isSecretKey)(squashKey(key)))
|
|
44
235
|
return true;
|
|
45
236
|
if (SECRET_KEY_EXACT.has(squashKey(key)))
|
|
46
237
|
return true;
|
|
238
|
+
if (classifyAuthorization(key) === "strong")
|
|
239
|
+
return true;
|
|
240
|
+
if (hasBareCredentialSuffix(key))
|
|
241
|
+
return true;
|
|
47
242
|
// Matched per separated segment, not against the squashed whole:
|
|
48
243
|
// `X-Hub-Signature-256` squashes to `xhubsignature256`, which no exact set
|
|
49
244
|
// can ever hold, so every real signature header would slip through.
|
|
245
|
+
// Segment-matched signature headers collapse like any other proven key.
|
|
50
246
|
return key
|
|
51
247
|
.replace(/[^a-z0-9]+/gi, "_")
|
|
52
248
|
.toLowerCase()
|
|
@@ -74,6 +270,22 @@ function isSecretQueryParam(name) {
|
|
|
74
270
|
const key = decodeKey(name);
|
|
75
271
|
return isSecretObjectKey(key) || SECRET_QUERY_PARAMS.has(squashKey(key));
|
|
76
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
* Object keys are data too: attribution and cache maps keyed by URL or raw
|
|
275
|
+
* `name=value` diagnostics carry credentials in the KEY text, where
|
|
276
|
+
* value-side redaction never reaches. Redact the secret portion while keeping
|
|
277
|
+
* the key identifiable. Clean keys (the common case) return untouched; two
|
|
278
|
+
* distinct keys that scrub identically collapse, last wins.
|
|
279
|
+
*/
|
|
280
|
+
function scrubKey(key) {
|
|
281
|
+
if (!key.includes("?") &&
|
|
282
|
+
!key.includes(";") &&
|
|
283
|
+
!key.includes("=") &&
|
|
284
|
+
!key.includes("://")) {
|
|
285
|
+
return key;
|
|
286
|
+
}
|
|
287
|
+
return scrubString(key);
|
|
288
|
+
}
|
|
77
289
|
function scrubString(value) {
|
|
78
290
|
// `postgres://user:pa55@host/db` carries its credential in the userinfo, not
|
|
79
291
|
// in a query pair or a secret-named key, so neither pass below would see it.
|
|
@@ -107,14 +319,14 @@ function scrubString(value) {
|
|
|
107
319
|
*/
|
|
108
320
|
function scrubDiagnosticValue(value) {
|
|
109
321
|
const seen = new WeakSet();
|
|
110
|
-
function scrub(current, depth = 0) {
|
|
322
|
+
function scrub(current, depth = 0, underCredentialContainer = false) {
|
|
111
323
|
if (typeof current === "string")
|
|
112
|
-
return scrubString(current);
|
|
324
|
+
return underCredentialContainer ? "[REDACTED]" : scrubString(current);
|
|
113
325
|
// A copied toJSON hook could reintroduce secrets after this walk finishes.
|
|
114
326
|
if (typeof current === "function")
|
|
115
327
|
return "[Function]";
|
|
116
328
|
if (current === null || typeof current !== "object")
|
|
117
|
-
return current;
|
|
329
|
+
return underCredentialContainer ? "[REDACTED]" : current;
|
|
118
330
|
if (seen.has(current))
|
|
119
331
|
return "[CIRCULAR]";
|
|
120
332
|
// Bound deeply nested values before cloning them on the logging hot path.
|
|
@@ -125,44 +337,66 @@ function scrubDiagnosticValue(value) {
|
|
|
125
337
|
// [CIRCULAR] would corrupt the event; only an ancestor is a real cycle.
|
|
126
338
|
seen.add(current);
|
|
127
339
|
try {
|
|
128
|
-
return walk(current, depth);
|
|
340
|
+
return walk(current, depth, underCredentialContainer);
|
|
129
341
|
}
|
|
130
342
|
finally {
|
|
131
343
|
seen.delete(current);
|
|
132
344
|
}
|
|
133
345
|
}
|
|
134
|
-
function walk(current, depth) {
|
|
346
|
+
function walk(current, depth, underCredentialContainer) {
|
|
135
347
|
// An Error carries name/message/stack on its prototype, so Object.keys
|
|
136
348
|
// returns nothing and a plain walk would flatten it to `{}` — discarding
|
|
137
349
|
// the only part of the event worth reading.
|
|
138
350
|
if (current instanceof Error) {
|
|
351
|
+
// message/stack are scrubbed as text; under a credential container
|
|
352
|
+
// they ARE the credential and collapse instead. The name always gets
|
|
353
|
+
// text scrubbing but stays readable: a custom (even non-enumerable)
|
|
354
|
+
// name can carry `password=...`, which key-based redaction never sees,
|
|
355
|
+
// while the error class itself is triage payload.
|
|
139
356
|
const serialized = {
|
|
140
|
-
name: current.name,
|
|
141
|
-
message:
|
|
357
|
+
name: scrubString(String(current.name ?? "")),
|
|
358
|
+
message: underCredentialContainer
|
|
359
|
+
? "[REDACTED]"
|
|
360
|
+
: scrubString(current.message),
|
|
142
361
|
};
|
|
143
362
|
if (current.stack)
|
|
144
|
-
serialized.stack =
|
|
363
|
+
serialized.stack = underCredentialContainer
|
|
364
|
+
? "[REDACTED]"
|
|
365
|
+
: scrubString(current.stack);
|
|
145
366
|
if (current.cause !== undefined)
|
|
146
|
-
serialized.cause = scrub(current.cause, depth + 1);
|
|
367
|
+
serialized.cause = scrub(current.cause, depth + 1, underCredentialContainer);
|
|
147
368
|
// AggregateError.errors is non-enumerable, just like cause and stack.
|
|
148
369
|
// Reuse the same walk so nested failures keep their codes without
|
|
149
370
|
// bypassing credential redaction, depth limits, or cycle detection.
|
|
150
371
|
if ("errors" in current && Array.isArray(current.errors))
|
|
151
|
-
serialized.errors = scrub(current.errors, depth + 1);
|
|
372
|
+
serialized.errors = scrub(current.errors, depth + 1, underCredentialContainer);
|
|
152
373
|
for (const key of Object.keys(current)) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
374
|
+
const outKey = scrubKey(key);
|
|
375
|
+
if (isStrongSecretKey(key)) {
|
|
376
|
+
serialized[outKey] = "[REDACTED]";
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
// Container adjacency propagates: scalars beneath one collapse,
|
|
380
|
+
// structured values recurse with the flag set. Usage-metric keys
|
|
381
|
+
// never start adjacency themselves (an inherited flag still applies).
|
|
382
|
+
const childContainer = underCredentialContainer ||
|
|
383
|
+
(!isBenignUsageKey(key) && hasCredentialSegment(key));
|
|
384
|
+
const value = current[key];
|
|
385
|
+
serialized[outKey] = scrub(value, depth + 1, childContainer);
|
|
156
386
|
}
|
|
157
387
|
return serialized;
|
|
158
388
|
}
|
|
159
389
|
// Built-ins whose state is not enumerable: walking them as plain objects
|
|
160
390
|
// yields `{}` (Date, Map, Set, RegExp) or one key per byte (Buffer). A
|
|
161
391
|
// readable summary costs less payload and tells triage strictly more.
|
|
392
|
+
// A RegExp source can itself embed a credential (`/password=.../`),
|
|
393
|
+
// so it takes the same string scrubbing as any other message text.
|
|
162
394
|
if (current instanceof Date)
|
|
163
395
|
return current.toISOString();
|
|
164
396
|
if (current instanceof RegExp)
|
|
165
|
-
return
|
|
397
|
+
return underCredentialContainer
|
|
398
|
+
? "[REDACTED]"
|
|
399
|
+
: scrubString(String(current));
|
|
166
400
|
if (ArrayBuffer.isView(current)) {
|
|
167
401
|
return `[${current.constructor.name} ${current.byteLength} bytes]`;
|
|
168
402
|
}
|
|
@@ -173,20 +407,23 @@ function scrubDiagnosticValue(value) {
|
|
|
173
407
|
if (Array.isArray(current)) {
|
|
174
408
|
return current
|
|
175
409
|
.slice(0, MAX_ENTRIES)
|
|
176
|
-
.map((item) => scrub(item, depth + 1));
|
|
410
|
+
.map((item) => scrub(item, depth + 1, underCredentialContainer));
|
|
177
411
|
}
|
|
178
412
|
const result = {};
|
|
179
413
|
try {
|
|
180
414
|
for (const key of Object.keys(current).slice(0, MAX_ENTRIES)) {
|
|
181
|
-
|
|
182
|
-
|
|
415
|
+
const outKey = scrubKey(key);
|
|
416
|
+
if (isStrongSecretKey(key)) {
|
|
417
|
+
result[outKey] = "[REDACTED]";
|
|
183
418
|
continue;
|
|
184
419
|
}
|
|
420
|
+
const childContainer = underCredentialContainer ||
|
|
421
|
+
(!isBenignUsageKey(key) && hasCredentialSegment(key));
|
|
185
422
|
try {
|
|
186
|
-
result[
|
|
423
|
+
result[outKey] = scrub(current[key], depth + 1, childContainer);
|
|
187
424
|
}
|
|
188
425
|
catch {
|
|
189
|
-
result[
|
|
426
|
+
result[outKey] = "[UNREADABLE]";
|
|
190
427
|
}
|
|
191
428
|
}
|
|
192
429
|
}
|
|
@@ -20,14 +20,6 @@ import type { AgentInlineGuardrail, AgentOptions, NetworkConfig, NixConfig } fro
|
|
|
20
20
|
* - `exec`: direct command execution in the sandbox.
|
|
21
21
|
*/
|
|
22
22
|
export type JobType = "message" | "exec";
|
|
23
|
-
/** Where a chat turn executes. Absence means Lobu's managed agent runtime. */
|
|
24
|
-
export interface DeviceExecutionTarget {
|
|
25
|
-
kind: "device";
|
|
26
|
-
/** Surrogate `device_workers.id`, never the caller-supplied worker handle. */
|
|
27
|
-
deviceWorkerId: string;
|
|
28
|
-
/** Local CLI kind the device advertised (Claude Code, Codex, OpenCode, …). */
|
|
29
|
-
agentKind: string;
|
|
30
|
-
}
|
|
31
23
|
/**
|
|
32
24
|
* Universal message payload for every gateway → worker hop.
|
|
33
25
|
* Used by: platform inbound → runs queue → MessageConsumer → worker.
|
|
@@ -58,8 +50,6 @@ export interface MessagePayload {
|
|
|
58
50
|
/** Platform name (`slack`, `telegram`, ...). */
|
|
59
51
|
platform: string;
|
|
60
52
|
messageText: string;
|
|
61
|
-
/** Optional device placement for this turn; conversation ownership stays `agentId`. */
|
|
62
|
-
executionTarget?: DeviceExecutionTarget;
|
|
63
53
|
/**
|
|
64
54
|
* Ephemeral context prepended to the user prompt for this turn only.
|
|
65
55
|
* Not stored in the transcript snapshot — use for automation preprompts, etc.
|