@lobu/runtime-server 24.3.0 → 24.5.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/skills.json +2 -2
- package/dist/component.json +1 -1
- package/dist/connectors/postgres.ts +77 -48
- package/dist/db/migrations/20261101010000_public_source_type_references.sql +157 -0
- package/dist/dependencies.bun.lock +115 -144
- package/dist/owletto/dist/assets/_-CCWuGXtQ.js +2 -0
- package/dist/owletto/dist/assets/_-DOJW1D-I.js +3 -0
- package/dist/owletto/dist/assets/_agentId-CJhQbi6k.js +2 -0
- package/dist/owletto/dist/assets/_agentId-DD4K1i6V.js +2 -0
- package/dist/owletto/dist/assets/_automationId-Cbd7B0mP.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-DFpPep9B.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-n3iSDT74.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-B1yGIGA9.js +2 -0
- package/dist/owletto/dist/assets/_eventId-B1H0-vD7.js +2 -0
- package/dist/owletto/dist/assets/_name-D30_V03t.js +2 -0
- package/dist/owletto/dist/assets/_owner-Be8O41u8.js +3 -0
- package/dist/owletto/dist/assets/_shape-C6YbloRh.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-BMPvvoOI.js +2 -0
- package/dist/owletto/dist/assets/_slug-Bc4YIEA2.js +2 -0
- package/dist/owletto/dist/assets/_view-aoFDwEld.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-DuNHc3cc.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-rJ7A1zNx.js +2 -0
- package/dist/owletto/dist/assets/accept-invitation-pUl-c1KQ.js +2 -0
- package/dist/owletto/dist/assets/activity-route-view-DN0ZEAzr.js +2 -0
- package/dist/owletto/dist/assets/{agent-card-controls-DiU7Un5w.js → agent-card-controls-C5jNWgfq.js} +2 -2
- package/dist/owletto/dist/assets/agent-client-setup-list-DbXtJTsO.js +4 -0
- package/dist/owletto/dist/assets/agent-connect-pages-DcTuiSt9.js +2 -0
- package/dist/owletto/dist/assets/agent-editor-form-CdA5vLr8.js +2 -0
- package/dist/owletto/dist/assets/agent-guardrails-route-BJyfalBY.js +2 -0
- package/dist/owletto/dist/assets/agent-list-row-rF5LH-3k.js +2 -0
- package/dist/owletto/dist/assets/{agent-loading-shells-CamDtzHY.js → agent-loading-shells-ClY_O6lb.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-CgsQ8BK_.js → agent-permissions-matrix-bP1Qihv7.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-lWbXKEm1.js → agent-skill-context-BAaGpvfS.js} +2 -2
- package/dist/owletto/dist/assets/agent-skills-route-Bv5luNdw.js +2 -0
- package/dist/owletto/dist/assets/agent-tab-intro-ednTs4WF.js +2 -0
- package/dist/owletto/dist/assets/agent-thread-WNk2HapT.js +6 -0
- package/dist/owletto/dist/assets/agent-thread-storage-U6htL3ad.js +2 -0
- package/dist/owletto/dist/assets/agents-DY2S2SGE.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-bPTjdVS1.js +2 -0
- package/dist/owletto/dist/assets/app._appId-DrL5H5lB.js +2 -0
- package/dist/owletto/dist/assets/assist-composer-ClfFEVx7.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-dFy1Huas.js +2 -0
- package/dist/owletto/dist/assets/automation-row-DCHM--aD.js +2 -0
- package/dist/owletto/dist/assets/automations-DY2S2SGE.js +2 -0
- package/dist/owletto/dist/assets/{calendar-DDCCSPW6.js → calendar-Ck0yOLYu.js} +2 -2
- package/dist/owletto/dist/assets/{callback-DFciMR8u.js → callback-DRABUOha.js} +2 -2
- package/dist/owletto/dist/assets/{card-BCsbrdGs.js → card-Bdi7VEwo.js} +2 -2
- package/dist/owletto/dist/assets/change-summary-PBoM6Asb.js +2 -0
- package/dist/owletto/dist/assets/{claim-BRua2b_7.js → claim-CUIG1Oc-.js} +2 -2
- package/dist/owletto/dist/assets/client-activity-scopes-CXOWB5co.js +2 -0
- package/dist/owletto/dist/assets/{client-rows-DiJQ5D1z.js → client-rows-36VnmgMK.js} +2 -2
- package/dist/owletto/dist/assets/clients-BJRcMk1A.js +2 -0
- package/dist/owletto/dist/assets/code-editor-DNuRKde1.js +16 -0
- package/dist/owletto/dist/assets/connect-CMcEQWls.js +2 -0
- package/dist/owletto/dist/assets/connect-menu-C-B-1xGR.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-tGipxP5a.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-DSGU78eV.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-CPLbry8R.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-jSnGvzYs.js +2 -0
- package/dist/owletto/dist/assets/connection-feed-detail-BIlkK0Pd.js +2 -0
- package/dist/owletto/dist/assets/connection-q1bdnxCN.js +2 -0
- package/dist/owletto/dist/assets/{connections-browser-BMV8bf54.js → connections-browser-V-3td9DB.js} +2 -2
- package/dist/owletto/dist/assets/{connector-boxes-DqZA-FdG.js → connector-boxes-lFc-WP83.js} +2 -2
- package/dist/owletto/dist/assets/connector-page-shell-Cs1SjrYB.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-BIg8P8WY.js → connector-provenance-aJFeeRIC.js} +2 -2
- package/dist/owletto/dist/assets/{connector-scope-lists-CJYz53YF.js → connector-scope-lists--vNdbOn0.js} +2 -2
- package/dist/owletto/dist/assets/connectors-BsvDMdsQ.js +2 -0
- package/dist/owletto/dist/assets/consent-DJV78pnz.js +2 -0
- package/dist/owletto/dist/assets/copy-button-DjMWgrBf.js +2 -0
- package/dist/owletto/dist/assets/{core.esm-A1UnFbGs.js → core.esm-CQzL3ObT.js} +3 -3
- package/dist/owletto/dist/assets/create-BmKx5vq3.js +2 -0
- package/dist/owletto/dist/assets/create-Rt0RbiD4.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-PEmSLMD6.js +3 -0
- package/dist/owletto/dist/assets/create-jBEuveV1.js +2 -0
- package/dist/owletto/dist/assets/create._connectorKey-DcxhYIYC.js +2 -0
- package/dist/owletto/dist/assets/device-Ba3RsIgb.js +2 -0
- package/dist/owletto/dist/assets/device-pin-tombstone-C79KIAIK.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-CIaoq9co.js +2 -0
- package/dist/owletto/dist/assets/{entity-avatar-CEV4ttUQ.js → entity-avatar-TVKjZxWQ.js} +2 -2
- package/dist/owletto/dist/assets/entity-options-daOOQo7O.js +2 -0
- package/dist/owletto/dist/assets/entity-page-BfJXvbxn.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-BLwH6qa7.js +2 -0
- package/dist/owletto/dist/assets/event-card-DVUB8my6.js +2 -0
- package/dist/owletto/dist/assets/event-detail-DkY95e5b.js +2 -0
- package/dist/owletto/dist/assets/{events-feed-VfU4csn2.js → events-feed-B9CZHI_P.js} +2 -2
- package/dist/owletto/dist/assets/filter-bar-wPaR12SS.js +2 -0
- package/dist/owletto/dist/assets/{full-page-spinner-C1Q_jEzD.js → full-page-spinner-BqmckkOf.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-Csusrok2.js +2 -0
- package/dist/owletto/dist/assets/identity-Dmg3STO8.js +2 -0
- package/dist/owletto/dist/assets/index--ZWegctR.js +2 -0
- package/dist/owletto/dist/assets/{index-DFyBbp7b.js → index-B0kw2lFL.js} +2 -2
- package/dist/owletto/dist/assets/index-BKrdVwW9.js +2 -0
- package/dist/owletto/dist/assets/index-BUBcNNUY.js +2 -0
- package/dist/owletto/dist/assets/index-BUDr4-Yv.js +2 -0
- package/dist/owletto/dist/assets/index-BYPQWVwD.js +2 -0
- package/dist/owletto/dist/assets/index-BfpaPJPj.js +2 -0
- package/dist/owletto/dist/assets/index-BicNFLBW.js +2 -0
- package/dist/owletto/dist/assets/index-Bsdv5aks.js +2 -0
- package/dist/owletto/dist/assets/index-C186T2Rw.js +53 -0
- package/dist/owletto/dist/assets/index-CX0pJ9j9.js +2 -0
- package/dist/owletto/dist/assets/{index-DQxzeM37.js → index-CsrT07TJ.js} +2 -2
- package/dist/owletto/dist/assets/index-DdBTTN3y.js +7899 -0
- package/dist/owletto/dist/assets/index-DdYWarql.css +1 -0
- package/dist/owletto/dist/assets/index-JYEIN8nM.js +2 -0
- package/dist/owletto/dist/assets/index-Vcq4gwWv.js +2 -0
- package/dist/owletto/dist/assets/{index-DNtYqkiA.js → index-ijqrJaRB.js} +2 -2
- package/dist/owletto/dist/assets/{index-yIub2xUM.js → index-ikp_mTsf.js} +2 -2
- package/dist/owletto/dist/assets/json-diff-BaLL4Fsu.js +14 -0
- package/dist/owletto/dist/assets/{list-skeleton-Kzxi2OXB.js → list-skeleton-CXDLkYTg.js} +2 -2
- package/dist/owletto/dist/assets/login-u6LCgDYG.js +2 -0
- package/dist/owletto/dist/assets/{logout-Dt_VDilG.js → logout-JhmuWJEH.js} +2 -2
- package/dist/owletto/dist/assets/manage-gear-D8LMhehh.js +2 -0
- package/dist/owletto/dist/assets/{member-scope-gate-De75CR7W.js → member-scope-gate-4FQ0aanZ.js} +2 -2
- package/dist/owletto/dist/assets/memory-browse-page-CNZJbCJC.js +74 -0
- package/dist/owletto/dist/assets/model-jL871x2J.js +2 -0
- package/dist/owletto/dist/assets/model-selector-CgU8SJMF.js +2 -0
- package/dist/owletto/dist/assets/models-jdemgIZk.js +2 -0
- package/dist/owletto/dist/assets/nav-pill-DrFkuyUQ.js +2 -0
- package/dist/owletto/dist/assets/new-CcJOd5aH.js +2 -0
- package/dist/owletto/dist/assets/{new-BbdwuJPm.js → new-DgE1pVV0.js} +2 -2
- package/dist/owletto/dist/assets/new-OWwrYckd.js +2 -0
- package/dist/owletto/dist/assets/organization-CKM_oFX3.js +2 -0
- package/dist/owletto/dist/assets/peek-pane-content-D68BjguQ.js +2 -0
- package/dist/owletto/dist/assets/pending-seed-sml8Uf6e.js +2 -0
- package/dist/owletto/dist/assets/permissions-BvA9SATv.js +2 -0
- package/dist/owletto/dist/assets/proposal-review-shell-D6KABxah.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-BIVCHQHe.js +2 -0
- package/dist/owletto/dist/assets/record-activity-C9gVBbF0.js +2 -0
- package/dist/owletto/dist/assets/{record-session-D07szzqN.js → record-session-R-uHNuby.js} +2 -2
- package/dist/owletto/dist/assets/{renderer-AJxSmE3-.js → renderer-DXfJaCCa.js} +23 -23
- package/dist/owletto/dist/assets/reset-password-Mx3baeNc.js +2 -0
- package/dist/owletto/dist/assets/run-activity-link-CaIBSRQj.js +2 -0
- package/dist/owletto/dist/assets/run-initiator-BvzQJYW9.js +2 -0
- package/dist/owletto/dist/assets/runs-fFJ1lPnw.js +2 -0
- package/dist/owletto/dist/assets/runs-panel-DEnZHTa5.js +2 -0
- package/dist/owletto/dist/assets/runs-table-XGnxJl7S.js +2 -0
- package/dist/owletto/dist/assets/{schema-type-editor-panel-C_Es0qDf.js → schema-type-editor-panel-C0_9VcSs.js} +2 -2
- package/dist/owletto/dist/assets/settings-CP4PjMQA.js +2 -0
- package/dist/owletto/dist/assets/settings-CgaUJMHH.js +2 -0
- package/dist/owletto/dist/assets/skills-D-e_h3a9.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-CjFPgKKJ.js → source-record-panels-Bh0n4gGw.js} +2 -2
- package/dist/owletto/dist/assets/{status-dot-CSBtKT4g.js → status-dot-Cpq63I7p.js} +2 -2
- package/dist/owletto/dist/assets/{table-DHM-vCxP.js → table-BUqshjxa.js} +2 -2
- package/dist/owletto/dist/assets/{use-automations-C4TSie1i.js → use-automations-BLNjxq2K.js} +2 -2
- package/dist/owletto/dist/assets/use-login-redirect-CmyQW7GT.js +2 -0
- package/dist/owletto/dist/assets/{use-mention-search-PfZrNbu_.js → use-mention-search-dn3ws1WB.js} +3 -3
- package/dist/owletto/dist/assets/use-scroll-sentinel-DRyBMueA.js +2 -0
- package/dist/owletto/dist/assets/view-param-filters-CER47Tlz.js +2 -0
- package/dist/owletto/dist/assets/{views-access-required-2ubIf_3N.js → views-access-required-C_b9itZ2.js} +2 -2
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +54218 -51082
- package/dist/server.bundle.mjs +5 -5
- package/dist/verify.mjs +1 -1
- package/npm-shrinkwrap.json +351 -371
- package/package.json +3 -4
- package/vendor/connector-sdk/dist/reaction-client-types.d.ts +8 -2
- package/vendor/connector-sdk/dist/reaction-sdk.d.ts +5 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/contracts/agent-settings.d.ts +61 -6
- package/vendor/core/dist/contracts/agent-settings.js +10 -7
- package/vendor/core/dist/contracts/tools/manage-agents.d.ts +473 -98
- package/vendor/core/dist/contracts/tools/manage-agents.js +111 -2
- package/vendor/core/dist/contracts/tools/manage-automations.d.ts +21 -18
- package/vendor/core/dist/contracts/tools/manage-automations.js +15 -15
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +2 -2
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +45 -20
- package/vendor/core/dist/contracts/tools/manage-entity.js +17 -5
- package/vendor/core/dist/contracts/tools/manage-inference-providers.d.ts +445 -0
- package/vendor/core/dist/contracts/tools/manage-inference-providers.js +133 -0
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +4 -4
- package/vendor/core/dist/contracts/tools/manage-views.js +5 -3
- package/vendor/core/dist/contracts/worker/device-automation.js +4 -2
- package/vendor/core/dist/error-report.d.ts +73 -0
- package/vendor/core/dist/error-report.js +346 -0
- package/vendor/core/dist/index.d.ts +4 -1
- package/vendor/core/dist/index.js +7 -1
- package/vendor/core/dist/logger.js +15 -6
- package/vendor/core/dist/otel-fetch.d.ts +19 -0
- package/vendor/core/dist/otel-fetch.js +96 -0
- package/vendor/core/dist/otel.d.ts +22 -2
- package/vendor/core/dist/otel.js +95 -48
- package/vendor/core/dist/reserved.d.ts +1 -1
- package/vendor/core/dist/reserved.js +6 -4
- package/vendor/core/dist/tool-result.d.ts +8 -0
- package/vendor/core/dist/tool-result.js +61 -0
- package/vendor/core/dist/trace-context.d.ts +12 -0
- package/vendor/core/dist/trace-context.js +50 -0
- package/vendor/core/dist/utils/diagnostic-scrubber.js +1 -1
- package/vendor/core/dist/worker/auth.js +4 -0
- package/vendor/core/package.json +6 -1
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-XKF0m81R.js +0 -3
- package/dist/owletto/dist/assets/_-e8MbEBtw.js +0 -2
- package/dist/owletto/dist/assets/_agentId-Cv9goIFf.js +0 -2
- package/dist/owletto/dist/assets/_agentId-emObu67X.js +0 -2
- package/dist/owletto/dist/assets/_automationId-CfFFAYK1.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-D6NKXSOE.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-DFrkLLTU.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-D3vuAQPe.js +0 -2
- package/dist/owletto/dist/assets/_eventId-BV5SQaUA.js +0 -2
- package/dist/owletto/dist/assets/_name-DjtJMop4.js +0 -2
- package/dist/owletto/dist/assets/_owner-oBX68rb9.js +0 -3
- package/dist/owletto/dist/assets/_shape-C4lLPAwI.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-Cw-7q6hI.js +0 -2
- package/dist/owletto/dist/assets/_slug-B2g5qzn3.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-CIKGCtdK.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-Dx4kJo7o.js +0 -2
- package/dist/owletto/dist/assets/accept-invitation-38lHBvjO.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-voRYSM3a.js +0 -2
- package/dist/owletto/dist/assets/agent-client-setup-list-Bkyw22GW.js +0 -5
- package/dist/owletto/dist/assets/agent-connect-pages-CpBxQCpx.js +0 -2
- package/dist/owletto/dist/assets/agent-editor-form-QrIDroFL.js +0 -2
- package/dist/owletto/dist/assets/agent-guardrails-route-CyoGSxcZ.js +0 -2
- package/dist/owletto/dist/assets/agent-skills-route-D-w3tY_2.js +0 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-CLqpn5Tb.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-CsRexwTv.js +0 -6
- package/dist/owletto/dist/assets/agents-DzH_FFKU.js +0 -2
- package/dist/owletto/dist/assets/agents-workbench-CmGrMvPC.js +0 -2
- package/dist/owletto/dist/assets/app._appId-BO7G38fL.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-DMYxs6F6.js +0 -2
- package/dist/owletto/dist/assets/automations-DzH_FFKU.js +0 -2
- package/dist/owletto/dist/assets/client-activity-scopes-BLIy1Zc3.js +0 -2
- package/dist/owletto/dist/assets/clients-8-EpRjsm.js +0 -2
- package/dist/owletto/dist/assets/code-editor-BFZa4EIt.js +0 -16
- package/dist/owletto/dist/assets/connect-C0cHE9Xl.js +0 -2
- package/dist/owletto/dist/assets/connect-menu-D2K4tmvW.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-D4EG5a0v.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-DhoCT6sT.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.activity-Dn4qw2Us.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.index-BTI5JXA3.js +0 -2
- package/dist/owletto/dist/assets/connection-X9VU9Ijm.js +0 -2
- package/dist/owletto/dist/assets/connection-feed-detail-B6ydKasK.js +0 -2
- package/dist/owletto/dist/assets/connectors-BroKpwhB.js +0 -2
- package/dist/owletto/dist/assets/consent-fzLN-Qy7.js +0 -2
- package/dist/owletto/dist/assets/copy-button-Df7QXE0w.js +0 -2
- package/dist/owletto/dist/assets/create-BjwsYarn.js +0 -2
- package/dist/owletto/dist/assets/create-Dzr4mlr0.js +0 -2
- package/dist/owletto/dist/assets/create-automation-form-DHW6OUoS.js +0 -3
- package/dist/owletto/dist/assets/create-c94SPL21.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-DLLn2nej.js +0 -2
- package/dist/owletto/dist/assets/cronstrue-xxpD1P2-.js +0 -2
- package/dist/owletto/dist/assets/device-C3AEoL5c.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-B_te59GE.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-ZU09qrot.js +0 -2
- package/dist/owletto/dist/assets/entity-options-DJv2EhVV.js +0 -2
- package/dist/owletto/dist/assets/entity-page-BUghWZ1s.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-Lf6ONdpf.js +0 -2
- package/dist/owletto/dist/assets/event-card-CBlsG32u.js +0 -2
- package/dist/owletto/dist/assets/event-detail-BKSGEOdW.js +0 -2
- package/dist/owletto/dist/assets/filter-bar-COU0sBFQ.js +0 -2
- package/dist/owletto/dist/assets/guardrails-6ZJv1uzM.js +0 -2
- package/dist/owletto/dist/assets/identity-BaFLmbSo.js +0 -2
- package/dist/owletto/dist/assets/index-008wj-Pz.js +0 -7950
- package/dist/owletto/dist/assets/index-BaetvYLa.js +0 -2
- package/dist/owletto/dist/assets/index-BiEf5xOE.css +0 -1
- package/dist/owletto/dist/assets/index-BrDP4PCs.js +0 -2
- package/dist/owletto/dist/assets/index-BuXIeK7D.js +0 -2
- package/dist/owletto/dist/assets/index-CAVcR9za.js +0 -2
- package/dist/owletto/dist/assets/index-CMLfWGPU.js +0 -2
- package/dist/owletto/dist/assets/index-D0YEYP7N.js +0 -2
- package/dist/owletto/dist/assets/index-DkO0nPex.js +0 -2
- package/dist/owletto/dist/assets/index-KlRId0g6.js +0 -2
- package/dist/owletto/dist/assets/index-Ywnqi4A6.js +0 -2
- package/dist/owletto/dist/assets/index-wHFQv1aT.js +0 -12
- package/dist/owletto/dist/assets/index-xnxhf3Op.js +0 -2
- package/dist/owletto/dist/assets/json-diff-LE_vNZrM.js +0 -4
- package/dist/owletto/dist/assets/login-DWOT6jtS.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-p2vIbfkC.js +0 -74
- package/dist/owletto/dist/assets/model-selector-3l9lY50C.js +0 -2
- package/dist/owletto/dist/assets/model-udnQ_S43.js +0 -2
- package/dist/owletto/dist/assets/models-CQj7GIOp.js +0 -2
- package/dist/owletto/dist/assets/new-BOwIHkre.js +0 -2
- package/dist/owletto/dist/assets/new-DTuFCQhV.js +0 -2
- package/dist/owletto/dist/assets/oauth-workspace-access-QPo4YwRX.js +0 -2
- package/dist/owletto/dist/assets/organization-BDzjnqPf.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-D7yt0PrA.js +0 -2
- package/dist/owletto/dist/assets/permissions-CfoY4WFY.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-CVkLnnKo.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-DXUTTGGp.js +0 -2
- package/dist/owletto/dist/assets/record-activity-BXhvJbd9.js +0 -2
- package/dist/owletto/dist/assets/reset-password-kRYyQuTY.js +0 -2
- package/dist/owletto/dist/assets/runs-lG2ChtOt.js +0 -2
- package/dist/owletto/dist/assets/runs-panel-LnGpHCAQ.js +0 -2
- package/dist/owletto/dist/assets/settings-CEAOg7fr.js +0 -2
- package/dist/owletto/dist/assets/settings-gGYXbFfd.js +0 -2
- package/dist/owletto/dist/assets/skills-BOL5c_Tk.js +0 -2
- package/dist/owletto/dist/assets/use-scroll-sentinel-D-fJx_Md.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-DkX4YdDT.js +0 -2
- /package/vendor/@better-auth-kysely-adapter/{.bun-tag-abf95749a412716 → .bun-tag-654b3a002b271269} +0 -0
- /package/vendor/postgres/{.bun-tag-22d644c2873790db → .bun-tag-c81dacd34e959a7a} +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManageInferenceProvidersResultSchema = exports.InferenceProviderDefaultResultSchema = exports.InferenceProviderSuccessSchema = exports.InferenceProviderUpdateResultSchema = exports.InferenceProviderCreateResultSchema = exports.InferenceProviderListResultSchema = exports.InferenceProviderListItemSchema = exports.InferenceProviderSummarySchema = exports.ManageInferenceProvidersSchema = exports.DeleteInferenceProviderAction = exports.RotateInferenceProviderKeyAction = exports.SetInferenceProviderCapabilityAction = exports.SetDefaultInferenceProviderAction = exports.UpdateInferenceProviderAction = exports.CreateInferenceProviderAction = exports.ListInferenceProvidersAction = exports.InferenceProviderSlugSchema = exports.InferenceCapabilitiesSchema = exports.InferenceCapabilityBlockSchema = exports.InferenceModalitySchema = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
exports.InferenceModalitySchema = typebox_1.Type.Union([
|
|
6
|
+
typebox_1.Type.Literal("text"),
|
|
7
|
+
typebox_1.Type.Literal("image"),
|
|
8
|
+
typebox_1.Type.Literal("stt"),
|
|
9
|
+
typebox_1.Type.Literal("tts"),
|
|
10
|
+
]);
|
|
11
|
+
exports.InferenceCapabilityBlockSchema = typebox_1.Type.Object({
|
|
12
|
+
base_url: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
13
|
+
model: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
14
|
+
models_endpoint: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
15
|
+
}, { additionalProperties: false });
|
|
16
|
+
exports.InferenceCapabilitiesSchema = typebox_1.Type.Object({
|
|
17
|
+
text: typebox_1.Type.Optional(exports.InferenceCapabilityBlockSchema),
|
|
18
|
+
image: typebox_1.Type.Optional(exports.InferenceCapabilityBlockSchema),
|
|
19
|
+
stt: typebox_1.Type.Optional(exports.InferenceCapabilityBlockSchema),
|
|
20
|
+
tts: typebox_1.Type.Optional(exports.InferenceCapabilityBlockSchema),
|
|
21
|
+
}, { additionalProperties: false });
|
|
22
|
+
exports.InferenceProviderSlugSchema = typebox_1.Type.String({
|
|
23
|
+
pattern: "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
|
|
24
|
+
description: "Provider slug: 1–63 lowercase letters, digits or hyphens; no leading/trailing hyphen.",
|
|
25
|
+
});
|
|
26
|
+
exports.ListInferenceProvidersAction = typebox_1.Type.Object({
|
|
27
|
+
action: typebox_1.Type.Literal("list", {
|
|
28
|
+
description: "List this organization's inference providers with health metadata; credentials are never returned.",
|
|
29
|
+
}),
|
|
30
|
+
}, { additionalProperties: false });
|
|
31
|
+
exports.CreateInferenceProviderAction = typebox_1.Type.Object({
|
|
32
|
+
action: typebox_1.Type.Literal("create", {
|
|
33
|
+
description: "Add an org-shared API-key provider; the key is stored in the credential vault. OAuth providers sign in interactively instead.",
|
|
34
|
+
}),
|
|
35
|
+
slug: exports.InferenceProviderSlugSchema,
|
|
36
|
+
kind: typebox_1.Type.String({ minLength: 1 }),
|
|
37
|
+
displayName: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
38
|
+
apiKey: typebox_1.Type.String({ minLength: 1, writeOnly: true }),
|
|
39
|
+
capabilities: typebox_1.Type.Optional(exports.InferenceCapabilitiesSchema),
|
|
40
|
+
}, { additionalProperties: false });
|
|
41
|
+
exports.UpdateInferenceProviderAction = typebox_1.Type.Object({
|
|
42
|
+
action: typebox_1.Type.Literal("update", {
|
|
43
|
+
description: "Rename a provider; slug and kind are immutable.",
|
|
44
|
+
}),
|
|
45
|
+
slug: exports.InferenceProviderSlugSchema,
|
|
46
|
+
displayName: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
47
|
+
}, { additionalProperties: false });
|
|
48
|
+
exports.SetDefaultInferenceProviderAction = typebox_1.Type.Object({
|
|
49
|
+
action: typebox_1.Type.Literal("set_default", {
|
|
50
|
+
description: "Make this provider the organization default model source; it needs a text model and an org-shared API key.",
|
|
51
|
+
}),
|
|
52
|
+
slug: exports.InferenceProviderSlugSchema,
|
|
53
|
+
}, { additionalProperties: false });
|
|
54
|
+
exports.SetInferenceProviderCapabilityAction = typebox_1.Type.Object({
|
|
55
|
+
action: typebox_1.Type.Literal("set_capability", {
|
|
56
|
+
description: "Replace one modality's capability block (base_url, model, models_endpoint); other modalities are kept.",
|
|
57
|
+
}),
|
|
58
|
+
slug: exports.InferenceProviderSlugSchema,
|
|
59
|
+
modality: exports.InferenceModalitySchema,
|
|
60
|
+
block: exports.InferenceCapabilityBlockSchema,
|
|
61
|
+
}, { additionalProperties: false });
|
|
62
|
+
exports.RotateInferenceProviderKeyAction = typebox_1.Type.Object({
|
|
63
|
+
action: typebox_1.Type.Literal("rotate_key", {
|
|
64
|
+
description: "Replace the provider's API key in the vault; the value is never echoed or audited.",
|
|
65
|
+
}),
|
|
66
|
+
slug: exports.InferenceProviderSlugSchema,
|
|
67
|
+
value: typebox_1.Type.String({ minLength: 1, writeOnly: true }),
|
|
68
|
+
}, { additionalProperties: false });
|
|
69
|
+
exports.DeleteInferenceProviderAction = typebox_1.Type.Object({
|
|
70
|
+
action: typebox_1.Type.Literal("delete", {
|
|
71
|
+
description: "Soft-delete a provider; if it was the default, the oldest remaining runnable provider is promoted.",
|
|
72
|
+
}),
|
|
73
|
+
slug: exports.InferenceProviderSlugSchema,
|
|
74
|
+
}, { additionalProperties: false });
|
|
75
|
+
exports.ManageInferenceProvidersSchema = typebox_1.Type.Union([
|
|
76
|
+
exports.ListInferenceProvidersAction,
|
|
77
|
+
exports.CreateInferenceProviderAction,
|
|
78
|
+
exports.UpdateInferenceProviderAction,
|
|
79
|
+
exports.SetDefaultInferenceProviderAction,
|
|
80
|
+
exports.SetInferenceProviderCapabilityAction,
|
|
81
|
+
exports.RotateInferenceProviderKeyAction,
|
|
82
|
+
exports.DeleteInferenceProviderAction,
|
|
83
|
+
]);
|
|
84
|
+
exports.InferenceProviderSummarySchema = typebox_1.Type.Object({
|
|
85
|
+
id: typebox_1.Type.Number(),
|
|
86
|
+
slug: typebox_1.Type.String(),
|
|
87
|
+
kind: typebox_1.Type.String(),
|
|
88
|
+
displayName: typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()]),
|
|
89
|
+
capabilities: exports.InferenceCapabilitiesSchema,
|
|
90
|
+
hasCustomUpstream: typebox_1.Type.Boolean(),
|
|
91
|
+
status: typebox_1.Type.String(),
|
|
92
|
+
createdAt: typebox_1.Type.String(),
|
|
93
|
+
});
|
|
94
|
+
exports.InferenceProviderListItemSchema = typebox_1.Type.Object({
|
|
95
|
+
...exports.InferenceProviderSummarySchema.properties,
|
|
96
|
+
errorMessage: typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()], {
|
|
97
|
+
description: "Most recent terminal provider failure, or null.",
|
|
98
|
+
}),
|
|
99
|
+
updatedAt: typebox_1.Type.String({
|
|
100
|
+
description: "When provider configuration or health last changed.",
|
|
101
|
+
}),
|
|
102
|
+
isDefault: typebox_1.Type.Boolean({
|
|
103
|
+
description: "Whether this row supplies the organization default model.",
|
|
104
|
+
}),
|
|
105
|
+
});
|
|
106
|
+
exports.InferenceProviderListResultSchema = typebox_1.Type.Object({
|
|
107
|
+
providers: typebox_1.Type.Array(exports.InferenceProviderListItemSchema),
|
|
108
|
+
});
|
|
109
|
+
exports.InferenceProviderCreateResultSchema = typebox_1.Type.Object({
|
|
110
|
+
provider: typebox_1.Type.Object({
|
|
111
|
+
...exports.InferenceProviderSummarySchema.properties,
|
|
112
|
+
isDefault: typebox_1.Type.Boolean(),
|
|
113
|
+
}),
|
|
114
|
+
});
|
|
115
|
+
exports.InferenceProviderUpdateResultSchema = typebox_1.Type.Object({
|
|
116
|
+
provider: exports.InferenceProviderSummarySchema,
|
|
117
|
+
});
|
|
118
|
+
exports.InferenceProviderSuccessSchema = typebox_1.Type.Object({
|
|
119
|
+
success: typebox_1.Type.Literal(true),
|
|
120
|
+
});
|
|
121
|
+
exports.InferenceProviderDefaultResultSchema = typebox_1.Type.Object({
|
|
122
|
+
success: typebox_1.Type.Literal(true),
|
|
123
|
+
slug: typebox_1.Type.String(),
|
|
124
|
+
isDefault: typebox_1.Type.Literal(true),
|
|
125
|
+
});
|
|
126
|
+
exports.ManageInferenceProvidersResultSchema = typebox_1.Type.Union([
|
|
127
|
+
exports.InferenceProviderListResultSchema,
|
|
128
|
+
exports.InferenceProviderCreateResultSchema,
|
|
129
|
+
exports.InferenceProviderUpdateResultSchema,
|
|
130
|
+
exports.InferenceProviderDefaultResultSchema,
|
|
131
|
+
exports.InferenceProviderSuccessSchema,
|
|
132
|
+
]);
|
|
133
|
+
//# sourceMappingURL=manage-inference-providers.js.map
|
|
@@ -96,7 +96,7 @@ export declare const ViewRowSchema: import("@sinclair/typebox").TObject<{
|
|
|
96
96
|
actions: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
97
97
|
emits: import("@sinclair/typebox").TString;
|
|
98
98
|
}>>;
|
|
99
|
-
last_writer: import("@sinclair/typebox").TString
|
|
99
|
+
last_writer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
100
100
|
updated_at: import("@sinclair/typebox").TString;
|
|
101
101
|
compiled_bytes: import("@sinclair/typebox").TInteger;
|
|
102
102
|
source_bytes: import("@sinclair/typebox").TInteger;
|
|
@@ -187,7 +187,7 @@ export declare const ManageViewsResultSchema: import("@sinclair/typebox").TUnion
|
|
|
187
187
|
actions: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
188
188
|
emits: import("@sinclair/typebox").TString;
|
|
189
189
|
}>>;
|
|
190
|
-
last_writer: import("@sinclair/typebox").TString
|
|
190
|
+
last_writer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
191
191
|
updated_at: import("@sinclair/typebox").TString;
|
|
192
192
|
compiled_bytes: import("@sinclair/typebox").TInteger;
|
|
193
193
|
source_bytes: import("@sinclair/typebox").TInteger;
|
|
@@ -227,7 +227,7 @@ export declare const ManageViewsResultSchema: import("@sinclair/typebox").TUnion
|
|
|
227
227
|
actions: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
228
228
|
emits: import("@sinclair/typebox").TString;
|
|
229
229
|
}>>;
|
|
230
|
-
last_writer: import("@sinclair/typebox").TString
|
|
230
|
+
last_writer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
231
231
|
updated_at: import("@sinclair/typebox").TString;
|
|
232
232
|
compiled_bytes: import("@sinclair/typebox").TInteger;
|
|
233
233
|
source_bytes: import("@sinclair/typebox").TInteger;
|
|
@@ -273,7 +273,7 @@ export declare const ManageViewsResultSchema: import("@sinclair/typebox").TUnion
|
|
|
273
273
|
actions: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
274
274
|
emits: import("@sinclair/typebox").TString;
|
|
275
275
|
}>>;
|
|
276
|
-
last_writer: import("@sinclair/typebox").TString
|
|
276
|
+
last_writer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
277
277
|
updated_at: import("@sinclair/typebox").TString;
|
|
278
278
|
compiled_bytes: import("@sinclair/typebox").TInteger;
|
|
279
279
|
source_bytes: import("@sinclair/typebox").TInteger;
|
|
@@ -119,9 +119,11 @@ exports.ViewRowSchema = typebox_1.Type.Object({
|
|
|
119
119
|
attach: typebox_1.Type.Array(exports.ViewAttachmentSchema),
|
|
120
120
|
params: typebox_1.Type.Record(typebox_1.Type.String(), exports.ViewParamDeclSchema),
|
|
121
121
|
actions: typebox_1.Type.Record(typebox_1.Type.String(), exports.ViewActionDeclSchema),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
// Optional because a reader outside the workspace (a public workspace's
|
|
123
|
+
// visitor) gets the list without anyone's user id in it.
|
|
124
|
+
last_writer: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
125
|
+
description: "apply:<apply_id> | <user_id> | migration:view-templates. Omitted for readers outside the workspace.",
|
|
126
|
+
})),
|
|
125
127
|
updated_at: typebox_1.Type.String(),
|
|
126
128
|
compiled_bytes: typebox_1.Type.Integer(),
|
|
127
129
|
source_bytes: typebox_1.Type.Integer(),
|
|
@@ -45,14 +45,16 @@ exports.DEVICE_AGENT_SPECS = [
|
|
|
45
45
|
binaryName: "claude",
|
|
46
46
|
promptDelivery: { kind: "flag", flag: "-p" },
|
|
47
47
|
// Automation runs have a narrow completion contract; do not merge in the
|
|
48
|
-
// user's global MCP config, and pre-approve
|
|
48
|
+
// user's global MCP config, and pre-approve only read-only SDK discovery
|
|
49
|
+
// plus the two completion tools. Keep in sync with the Claude Code ACP
|
|
50
|
+
// adapter's allowedTools in connector-worker's mac-device-daemon.
|
|
49
51
|
mcpDelivery: {
|
|
50
52
|
kind: "claude-config-file",
|
|
51
53
|
flag: "--mcp-config",
|
|
52
54
|
extraArgs: [
|
|
53
55
|
"--strict-mcp-config",
|
|
54
56
|
"--allowedTools",
|
|
55
|
-
"mcp__lobu__query_sdk,mcp__lobu__run_sdk",
|
|
57
|
+
"mcp__lobu__search_sdk,mcp__lobu__query_sdk,mcp__lobu__run_sdk",
|
|
56
58
|
],
|
|
57
59
|
},
|
|
58
60
|
headlessArgs: [],
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error grouping for telemetry: one function decides which issue a failure
|
|
3
|
+
* belongs to, for spans and log records alike.
|
|
4
|
+
*
|
|
5
|
+
* The fingerprint follows Sentry's grouping rules: hash the parts that identify
|
|
6
|
+
* the defect and none that vary per occurrence. A stack groups by the names of
|
|
7
|
+
* its in-app functions, never by line numbers, which move on every deploy. A
|
|
8
|
+
* failure without a usable stack groups by where it was reported and its
|
|
9
|
+
* message after every identifier, number and quoted value is replaced by a
|
|
10
|
+
* placeholder, so one defect affecting many users or rows stays one issue.
|
|
11
|
+
*
|
|
12
|
+
* Raw messages can carry credentials or source data, so the report keeps only
|
|
13
|
+
* the parameterized message and the stack's frame locations. Both pass through
|
|
14
|
+
* the diagnostic scrubber first.
|
|
15
|
+
*/
|
|
16
|
+
/** Bump when grouping changes, so old and new fingerprints are never compared. */
|
|
17
|
+
export declare const ERROR_GROUPING_VERSION = 1;
|
|
18
|
+
/**
|
|
19
|
+
* Who has to act: `user` is an expected rejection of the caller's input or
|
|
20
|
+
* access, `dependency` is a provider or upstream failing, `system` is ours.
|
|
21
|
+
*/
|
|
22
|
+
export type ErrorKind = "system" | "user" | "dependency";
|
|
23
|
+
export interface StackFrame {
|
|
24
|
+
function: string | null;
|
|
25
|
+
file: string;
|
|
26
|
+
line: number | null;
|
|
27
|
+
column: number | null;
|
|
28
|
+
inApp: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface ErrorReport {
|
|
31
|
+
type: string;
|
|
32
|
+
code: string | null;
|
|
33
|
+
kind: ErrorKind;
|
|
34
|
+
/** Parameterized and scrubbed; safe to store. */
|
|
35
|
+
message: string;
|
|
36
|
+
/** Frame locations only, one per line; no message text. */
|
|
37
|
+
stacktrace: string;
|
|
38
|
+
fingerprint: string;
|
|
39
|
+
/** The exact string that was hashed, for explaining a grouping decision. */
|
|
40
|
+
grouping: string;
|
|
41
|
+
}
|
|
42
|
+
/** Replace every per-occurrence value in a message with a named placeholder. */
|
|
43
|
+
export declare function parameterizeMessage(text: string): string;
|
|
44
|
+
/** Parse a V8/Bun stack into frames, outermost last. Message lines are skipped. */
|
|
45
|
+
export declare function parseStackFrames(stack: string): StackFrame[];
|
|
46
|
+
/** Derive the kind from structure only: a code or an HTTP status, never prose. */
|
|
47
|
+
export declare function classifyErrorKind(code: string | null, httpStatus: number | null): ErrorKind;
|
|
48
|
+
export interface DescribeErrorOptions {
|
|
49
|
+
/**
|
|
50
|
+
* Where the failure was reported, e.g. `tool query_sql` or a logger's
|
|
51
|
+
* service. Groups failures that carry no usable stack.
|
|
52
|
+
*/
|
|
53
|
+
scope: string;
|
|
54
|
+
/** Overrides the derived kind when the boundary knows better. */
|
|
55
|
+
kind?: ErrorKind;
|
|
56
|
+
}
|
|
57
|
+
/** Build the stored report and fingerprint for a thrown value or error-shaped object. */
|
|
58
|
+
export declare function describeError(error: unknown, options: DescribeErrorOptions): ErrorReport;
|
|
59
|
+
/** Span attributes for a report, using OpenTelemetry's exception conventions. */
|
|
60
|
+
export declare function errorReportAttributes(report: ErrorReport): Record<string, string>;
|
|
61
|
+
/**
|
|
62
|
+
* Stamp an error-level log record with its issue fingerprint. Both server
|
|
63
|
+
* loggers call this on the final record, so a failure logged through either
|
|
64
|
+
* groups the same way as the span that recorded it.
|
|
65
|
+
*/
|
|
66
|
+
export declare function annotateErrorLogRecord(record: Record<string, unknown>): void;
|
|
67
|
+
/**
|
|
68
|
+
* The log-record fields for one report: the same safe fields a span carries,
|
|
69
|
+
* so a consumer of the log never needs the raw message to title or explain
|
|
70
|
+
* the issue. A writer that stamps these keeps them through the annotator.
|
|
71
|
+
*/
|
|
72
|
+
export declare function errorReportLogFields(report: ErrorReport): Record<string, string>;
|
|
73
|
+
//# sourceMappingURL=error-report.d.ts.map
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Error grouping for telemetry: one function decides which issue a failure
|
|
4
|
+
* belongs to, for spans and log records alike.
|
|
5
|
+
*
|
|
6
|
+
* The fingerprint follows Sentry's grouping rules: hash the parts that identify
|
|
7
|
+
* the defect and none that vary per occurrence. A stack groups by the names of
|
|
8
|
+
* its in-app functions, never by line numbers, which move on every deploy. A
|
|
9
|
+
* failure without a usable stack groups by where it was reported and its
|
|
10
|
+
* message after every identifier, number and quoted value is replaced by a
|
|
11
|
+
* placeholder, so one defect affecting many users or rows stays one issue.
|
|
12
|
+
*
|
|
13
|
+
* Raw messages can carry credentials or source data, so the report keeps only
|
|
14
|
+
* the parameterized message and the stack's frame locations. Both pass through
|
|
15
|
+
* the diagnostic scrubber first.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ERROR_GROUPING_VERSION = void 0;
|
|
19
|
+
exports.parameterizeMessage = parameterizeMessage;
|
|
20
|
+
exports.parseStackFrames = parseStackFrames;
|
|
21
|
+
exports.classifyErrorKind = classifyErrorKind;
|
|
22
|
+
exports.describeError = describeError;
|
|
23
|
+
exports.errorReportAttributes = errorReportAttributes;
|
|
24
|
+
exports.annotateErrorLogRecord = annotateErrorLogRecord;
|
|
25
|
+
exports.errorReportLogFields = errorReportLogFields;
|
|
26
|
+
const node_crypto_1 = require("node:crypto");
|
|
27
|
+
const diagnostic_scrubber_1 = require("./utils/diagnostic-scrubber");
|
|
28
|
+
/** Bump when grouping changes, so old and new fingerprints are never compared. */
|
|
29
|
+
exports.ERROR_GROUPING_VERSION = 1;
|
|
30
|
+
const MAX_MESSAGE_INPUT = 8192;
|
|
31
|
+
const MAX_MESSAGE_OUTPUT = 300;
|
|
32
|
+
const MAX_STACK_FRAMES = 30;
|
|
33
|
+
/**
|
|
34
|
+
* A stack starts with the error's message, which can hold untrusted text of
|
|
35
|
+
* any size. The frame patterns backtrack, so only a bounded prefix is read and
|
|
36
|
+
* any line longer than a real frame is skipped before a pattern touches it.
|
|
37
|
+
*/
|
|
38
|
+
const MAX_STACK_INPUT = 64 * 1024;
|
|
39
|
+
const MAX_STACK_LINES = 200;
|
|
40
|
+
const MAX_FRAME_LINE = 512;
|
|
41
|
+
const GROUPING_FRAMES = 3;
|
|
42
|
+
/**
|
|
43
|
+
* Ordered like Sentry's parameterizer (`grouping/parameterization.py`): the
|
|
44
|
+
* more specific shapes run first so a URL is not half-eaten by the number rule.
|
|
45
|
+
*/
|
|
46
|
+
const PARAMETERS = [
|
|
47
|
+
// An HTTP credential in free text: the scrubber only knows keyed values.
|
|
48
|
+
["token", /\b(?:bearer|basic)\s+[\w.~+/-]+=*/gi],
|
|
49
|
+
["email", /[\w.+-]+@[\w-]+(?:\.[\w-]+)+/g],
|
|
50
|
+
["url", /\b[a-z][a-z0-9+.-]*:\/\/[^\s"'<>]+/gi],
|
|
51
|
+
["traceparent", /\b[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}\b/gi],
|
|
52
|
+
[
|
|
53
|
+
"uuid",
|
|
54
|
+
/\b[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}\b/gi,
|
|
55
|
+
],
|
|
56
|
+
["hash", /\b[0-9a-f]{32,64}\b/gi],
|
|
57
|
+
[
|
|
58
|
+
"date",
|
|
59
|
+
/\b\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?\b/g,
|
|
60
|
+
],
|
|
61
|
+
["ip", /\b(?:\d{1,3}\.){3}\d{1,3}(?::\d+)?\b/g],
|
|
62
|
+
["hex", /\b0x[0-9a-f]+\b/gi],
|
|
63
|
+
// Generated identifiers: run, conversation and token ids mix letters and
|
|
64
|
+
// digits, so a 12+ character run with a digit is an id; requiring the digit
|
|
65
|
+
// spares long ordinary words. Any 24+ character run is treated as an id too,
|
|
66
|
+
// since secrets are not guaranteed to contain a digit and no word is that long.
|
|
67
|
+
["id", /\b(?:(?=[\w-]*\d)(?=[\w-]*[a-z])[\w-]{12,}|[\w-]{24,})\b/gi],
|
|
68
|
+
["quoted", /"[^"\n]{0,200}"|'[^'\n]{0,200}'|`[^`\n]{0,200}`/g],
|
|
69
|
+
["num", /-?\b\d+(?:\.\d+)?/g],
|
|
70
|
+
];
|
|
71
|
+
/** Replace every per-occurrence value in a message with a named placeholder. */
|
|
72
|
+
function parameterizeMessage(text) {
|
|
73
|
+
if (!text)
|
|
74
|
+
return "";
|
|
75
|
+
let out = text.length > MAX_MESSAGE_INPUT ? text.slice(0, MAX_MESSAGE_INPUT) : text;
|
|
76
|
+
out = String((0, diagnostic_scrubber_1.scrubDiagnosticValue)(out));
|
|
77
|
+
for (const [name, pattern] of PARAMETERS) {
|
|
78
|
+
out = out.replace(pattern, `<${name}>`);
|
|
79
|
+
}
|
|
80
|
+
out = out.split("\n").slice(0, 2).join(" ").replace(/\s+/g, " ").trim();
|
|
81
|
+
return out.length > MAX_MESSAGE_OUTPUT
|
|
82
|
+
? out.slice(0, MAX_MESSAGE_OUTPUT)
|
|
83
|
+
: out;
|
|
84
|
+
}
|
|
85
|
+
const V8_FRAME = /^\s*at (?:(.+?) \()?(.+?):(\d+):(\d+)\)?\s*$/;
|
|
86
|
+
const V8_FRAME_NO_POSITION = /^\s*at (?:(.+?) \()?([^():]+)\)?\s*$/;
|
|
87
|
+
/**
|
|
88
|
+
* Make a frame's file portable: relative to the repo for workspace code, to
|
|
89
|
+
* `node_modules/` for dependencies, and the bare file name for any other
|
|
90
|
+
* absolute path, so no machine's checkout or home directory is recorded.
|
|
91
|
+
*/
|
|
92
|
+
function normalizeFile(raw) {
|
|
93
|
+
const file = raw.replace(/^file:\/\//, "");
|
|
94
|
+
const dependency = file.lastIndexOf("/node_modules/");
|
|
95
|
+
if (dependency >= 0)
|
|
96
|
+
return file.slice(dependency + 1);
|
|
97
|
+
const workspace = file.indexOf("/packages/");
|
|
98
|
+
if (workspace >= 0)
|
|
99
|
+
return file.slice(workspace + 1);
|
|
100
|
+
if (file.startsWith("/") || /^[A-Za-z]:[\\/]/.test(file)) {
|
|
101
|
+
return file.split(/[\\/]/).pop() || file;
|
|
102
|
+
}
|
|
103
|
+
return file;
|
|
104
|
+
}
|
|
105
|
+
function isInAppFile(file) {
|
|
106
|
+
return !(file.includes("node_modules/") ||
|
|
107
|
+
file.startsWith("node:") ||
|
|
108
|
+
file.startsWith("internal/") ||
|
|
109
|
+
file === "native" ||
|
|
110
|
+
file === "<anonymous>");
|
|
111
|
+
}
|
|
112
|
+
function normalizeFunction(raw) {
|
|
113
|
+
if (!raw)
|
|
114
|
+
return null;
|
|
115
|
+
const fn = raw
|
|
116
|
+
.replace(/^async /, "")
|
|
117
|
+
.replace(/ \[as [^\]]+\]$/, "")
|
|
118
|
+
.trim();
|
|
119
|
+
return fn && fn !== "<anonymous>" ? fn : null;
|
|
120
|
+
}
|
|
121
|
+
/** Parse a V8/Bun stack into frames, outermost last. Message lines are skipped. */
|
|
122
|
+
function parseStackFrames(stack) {
|
|
123
|
+
const frames = [];
|
|
124
|
+
const lines = stack.slice(0, MAX_STACK_INPUT).split("\n", MAX_STACK_LINES);
|
|
125
|
+
for (const line of lines) {
|
|
126
|
+
if (line.length > MAX_FRAME_LINE)
|
|
127
|
+
continue;
|
|
128
|
+
const match = V8_FRAME.exec(line);
|
|
129
|
+
if (match) {
|
|
130
|
+
const file = normalizeFile(match[2] ?? "");
|
|
131
|
+
frames.push({
|
|
132
|
+
function: normalizeFunction(match[1]),
|
|
133
|
+
file,
|
|
134
|
+
line: Number(match[3]),
|
|
135
|
+
column: Number(match[4]),
|
|
136
|
+
inApp: isInAppFile(file),
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
const bare = V8_FRAME_NO_POSITION.exec(line);
|
|
141
|
+
if (!bare)
|
|
142
|
+
continue;
|
|
143
|
+
const file = normalizeFile(bare[2] ?? "");
|
|
144
|
+
frames.push({
|
|
145
|
+
function: normalizeFunction(bare[1]),
|
|
146
|
+
file,
|
|
147
|
+
line: null,
|
|
148
|
+
column: null,
|
|
149
|
+
inApp: isInAppFile(file),
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
if (frames.length >= MAX_STACK_FRAMES)
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
return frames;
|
|
156
|
+
}
|
|
157
|
+
function formatFrames(frames) {
|
|
158
|
+
return frames
|
|
159
|
+
.map((frame) => {
|
|
160
|
+
const position = frame.line == null
|
|
161
|
+
? frame.file
|
|
162
|
+
: `${frame.file}:${frame.line}:${frame.column}`;
|
|
163
|
+
return frame.function
|
|
164
|
+
? `at ${frame.function} (${position})`
|
|
165
|
+
: `at ${position}`;
|
|
166
|
+
})
|
|
167
|
+
.join("\n");
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Frames that identify the defect: in-app, named, and not the error's own
|
|
171
|
+
* constructor (`new ToolUserError`), which every throw site of a class shares.
|
|
172
|
+
*/
|
|
173
|
+
function groupingFrames(frames) {
|
|
174
|
+
return frames
|
|
175
|
+
.filter((frame) => frame.inApp && frame.function && !frame.function.startsWith("new "))
|
|
176
|
+
.slice(0, GROUPING_FRAMES)
|
|
177
|
+
.map((frame) => frame.function);
|
|
178
|
+
}
|
|
179
|
+
const USER_TOOL_CODES = new Set([
|
|
180
|
+
"AUTH_MISSING",
|
|
181
|
+
"BROWSER_INTERRUPTED",
|
|
182
|
+
"NOT_FOUND",
|
|
183
|
+
"VALIDATION",
|
|
184
|
+
"PERMISSION",
|
|
185
|
+
"MANUAL_EDIT_NOT_ALLOWED",
|
|
186
|
+
]);
|
|
187
|
+
const DEPENDENCY_TOOL_CODES = new Set([
|
|
188
|
+
"AUTH_INVALID",
|
|
189
|
+
"RATE_LIMITED",
|
|
190
|
+
"UPSTREAM_TIMEOUT",
|
|
191
|
+
"UPSTREAM_5XX",
|
|
192
|
+
"NETWORK",
|
|
193
|
+
"UPSTREAM_UNAVAILABLE",
|
|
194
|
+
]);
|
|
195
|
+
/** Derive the kind from structure only: a code or an HTTP status, never prose. */
|
|
196
|
+
function classifyErrorKind(code, httpStatus) {
|
|
197
|
+
if (code) {
|
|
198
|
+
if (USER_TOOL_CODES.has(code))
|
|
199
|
+
return "user";
|
|
200
|
+
if (DEPENDENCY_TOOL_CODES.has(code) || code.startsWith("PROVIDER_"))
|
|
201
|
+
return "dependency";
|
|
202
|
+
}
|
|
203
|
+
if (httpStatus != null)
|
|
204
|
+
return httpStatus < 500 ? "user" : "system";
|
|
205
|
+
return "system";
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* A structured code: upper-case or numeric (`VALIDATION`, `ERR_X`, SQLSTATE
|
|
209
|
+
* `23505`) or lower-case snake case. Digits are allowed only in the first form,
|
|
210
|
+
* so a generated id or credential in a `code` field is never kept.
|
|
211
|
+
*/
|
|
212
|
+
function isErrorCode(value) {
|
|
213
|
+
return /^(?:[A-Z0-9][A-Z0-9_]{1,63}|[a-z][a-z_]{1,63})$/.test(value);
|
|
214
|
+
}
|
|
215
|
+
function readStatus(shape) {
|
|
216
|
+
for (const value of [shape.httpStatus, shape.statusCode, shape.status]) {
|
|
217
|
+
if (typeof value === "number" && value >= 100 && value <= 599)
|
|
218
|
+
return value;
|
|
219
|
+
}
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
/** Build the stored report and fingerprint for a thrown value or error-shaped object. */
|
|
223
|
+
function describeError(error, options) {
|
|
224
|
+
const shape = error && typeof error === "object"
|
|
225
|
+
? error
|
|
226
|
+
: { message: String(error) };
|
|
227
|
+
const type = typeof shape.name === "string" && shape.name
|
|
228
|
+
? shape.name
|
|
229
|
+
: typeof shape.type === "string" && shape.type
|
|
230
|
+
? shape.type
|
|
231
|
+
: error instanceof Error
|
|
232
|
+
? error.constructor.name
|
|
233
|
+
: typeof error === "string"
|
|
234
|
+
? "Message"
|
|
235
|
+
: "UnknownError";
|
|
236
|
+
const code = typeof shape.code === "string" && isErrorCode(shape.code)
|
|
237
|
+
? shape.code
|
|
238
|
+
: null;
|
|
239
|
+
const message = parameterizeMessage(typeof shape.message === "string" ? shape.message : "");
|
|
240
|
+
const frames = typeof shape.stack === "string" ? parseStackFrames(shape.stack) : [];
|
|
241
|
+
const kind = options.kind ?? classifyErrorKind(code, readStatus(shape));
|
|
242
|
+
const identity = groupingFrames(frames);
|
|
243
|
+
const parts = identity.length > 0
|
|
244
|
+
? [
|
|
245
|
+
`v${exports.ERROR_GROUPING_VERSION}`,
|
|
246
|
+
type,
|
|
247
|
+
code ?? "",
|
|
248
|
+
`frames:${identity.join(">")}`,
|
|
249
|
+
]
|
|
250
|
+
: [
|
|
251
|
+
`v${exports.ERROR_GROUPING_VERSION}`,
|
|
252
|
+
options.scope,
|
|
253
|
+
type,
|
|
254
|
+
code ?? "",
|
|
255
|
+
`message:${message}`,
|
|
256
|
+
];
|
|
257
|
+
const grouping = parts.join("|");
|
|
258
|
+
return {
|
|
259
|
+
type,
|
|
260
|
+
code,
|
|
261
|
+
kind,
|
|
262
|
+
message,
|
|
263
|
+
stacktrace: formatFrames(frames),
|
|
264
|
+
fingerprint: (0, node_crypto_1.createHash)("sha256")
|
|
265
|
+
.update(grouping)
|
|
266
|
+
.digest("hex")
|
|
267
|
+
.slice(0, 32),
|
|
268
|
+
grouping,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
/** Span attributes for a report, using OpenTelemetry's exception conventions. */
|
|
272
|
+
function errorReportAttributes(report) {
|
|
273
|
+
return {
|
|
274
|
+
"exception.type": report.type,
|
|
275
|
+
"exception.message": report.message,
|
|
276
|
+
...(report.stacktrace ? { "exception.stacktrace": report.stacktrace } : {}),
|
|
277
|
+
...(report.code ? { "error.code": report.code } : {}),
|
|
278
|
+
"error.kind": report.kind,
|
|
279
|
+
"error.fingerprint": report.fingerprint,
|
|
280
|
+
"error.grouping": report.grouping,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function isErrorShaped(value) {
|
|
284
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
285
|
+
return false;
|
|
286
|
+
const shape = value;
|
|
287
|
+
return (typeof shape.message === "string" &&
|
|
288
|
+
(typeof shape.stack === "string" || typeof shape.name === "string"));
|
|
289
|
+
}
|
|
290
|
+
/** First error-shaped value in a log record's conventional slots, depth-bounded. */
|
|
291
|
+
function findLoggedError(value, depth = 0) {
|
|
292
|
+
if (depth > 3 || !value || typeof value !== "object")
|
|
293
|
+
return null;
|
|
294
|
+
if (isErrorShaped(value))
|
|
295
|
+
return value;
|
|
296
|
+
const candidates = Array.isArray(value)
|
|
297
|
+
? value
|
|
298
|
+
: ["err", "error", "data", "cause"].map((key) => value[key]);
|
|
299
|
+
for (const candidate of candidates) {
|
|
300
|
+
const found = findLoggedError(candidate, depth + 1);
|
|
301
|
+
if (found)
|
|
302
|
+
return found;
|
|
303
|
+
}
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
const ERROR_LEVELS = new Set(["error", "fatal"]);
|
|
307
|
+
/**
|
|
308
|
+
* Stamp an error-level log record with its issue fingerprint. Both server
|
|
309
|
+
* loggers call this on the final record, so a failure logged through either
|
|
310
|
+
* groups the same way as the span that recorded it.
|
|
311
|
+
*/
|
|
312
|
+
function annotateErrorLogRecord(record) {
|
|
313
|
+
if (typeof record.level !== "string" || !ERROR_LEVELS.has(record.level))
|
|
314
|
+
return;
|
|
315
|
+
// A writer that already described its error (with the scope of the span it
|
|
316
|
+
// fails in) keeps that grouping instead of the generic log-line one.
|
|
317
|
+
if (typeof record.error_fingerprint === "string")
|
|
318
|
+
return;
|
|
319
|
+
const service = typeof record.service === "string" ? record.service : "unknown";
|
|
320
|
+
const logged = findLoggedError(record);
|
|
321
|
+
const message = typeof record.message === "string"
|
|
322
|
+
? record.message
|
|
323
|
+
: typeof record.msg === "string"
|
|
324
|
+
? record.msg
|
|
325
|
+
: "";
|
|
326
|
+
const report = describeError(logged ?? { name: "LoggedError", message }, {
|
|
327
|
+
scope: `log ${service}`,
|
|
328
|
+
});
|
|
329
|
+
Object.assign(record, errorReportLogFields(report));
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* The log-record fields for one report: the same safe fields a span carries,
|
|
333
|
+
* so a consumer of the log never needs the raw message to title or explain
|
|
334
|
+
* the issue. A writer that stamps these keeps them through the annotator.
|
|
335
|
+
*/
|
|
336
|
+
function errorReportLogFields(report) {
|
|
337
|
+
return {
|
|
338
|
+
error_fingerprint: report.fingerprint,
|
|
339
|
+
error_type: report.type,
|
|
340
|
+
error_kind: report.kind,
|
|
341
|
+
error_message: report.message,
|
|
342
|
+
error_grouping: report.grouping,
|
|
343
|
+
...(report.code ? { error_code: report.code } : {}),
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
//# sourceMappingURL=error-report.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
export * from "./agent-policy";
|
|
3
3
|
export * from "./tool-trace-summary";
|
|
4
|
+
export * from "./tool-result";
|
|
4
5
|
export * from "./shell-safety";
|
|
5
6
|
export * from "./turn-control";
|
|
6
7
|
export * from "./memory-flush";
|
|
@@ -24,8 +25,10 @@ export type { ProviderRegistryEntry, ProvidersConfigFile, } from "./integration-
|
|
|
24
25
|
export { renderFallbackSystemContext, renderSkillMemorySection, } from "./lobu-guidance";
|
|
25
26
|
export * from "./logger";
|
|
26
27
|
export * from "./modules";
|
|
28
|
+
export * from "./error-report";
|
|
27
29
|
export type { OtelConfig, Span, Tracer } from "./otel";
|
|
28
|
-
export { createChildSpan, createRootSpan, createSpan, flushTracing, getCurrentSpan, getTraceparent, getTracer, initTracing, runInSpanContext, SpanKind, SpanStatusCode, shutdownTracing, withChildSpan, withSpan, } from "./otel";
|
|
30
|
+
export { createChildSpan, createRootSpan, createSpan, flushTracing, getCurrentSpan, getTraceparent, getTracer, initTracing, recordError, runInSpanContext, SpanKind, SpanStatusCode, shutdownTracing, withChildSpan, withSpan, } from "./otel";
|
|
31
|
+
export { currentTraceLogFields, traceparentHeader } from "./trace-context";
|
|
29
32
|
export type { ProviderConfigEntry, ProviderOAuthConfig, ProviderOAuthGrantKind, } from "./provider-config-types";
|
|
30
33
|
export { isSdkCompat, type PiAiApi, resolveSdkCompat, SDK_COMPAT_PROTOCOLS, type SdkCompat, type SdkCompatProtocol, } from "./sdk-compat";
|
|
31
34
|
export * from "./secret-refs";
|