@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
|
@@ -16,9 +16,10 @@ 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.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;
|
|
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.traceparentHeader = exports.currentTraceLogFields = exports.withSpan = exports.withChildSpan = exports.shutdownTracing = exports.SpanStatusCode = exports.SpanKind = exports.runInSpanContext = exports.recordError = 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
|
+
__exportStar(require("./tool-result"), exports);
|
|
22
23
|
__exportStar(require("./shell-safety"), exports);
|
|
23
24
|
__exportStar(require("./turn-control"), exports);
|
|
24
25
|
__exportStar(require("./memory-flush"), exports);
|
|
@@ -54,6 +55,7 @@ Object.defineProperty(exports, "renderSkillMemorySection", { enumerable: true, g
|
|
|
54
55
|
__exportStar(require("./logger"), exports);
|
|
55
56
|
// Module system
|
|
56
57
|
__exportStar(require("./modules"), exports);
|
|
58
|
+
__exportStar(require("./error-report"), exports);
|
|
57
59
|
// OpenTelemetry tracing
|
|
58
60
|
var otel_1 = require("./otel");
|
|
59
61
|
Object.defineProperty(exports, "createChildSpan", { enumerable: true, get: function () { return otel_1.createChildSpan; } });
|
|
@@ -64,12 +66,16 @@ Object.defineProperty(exports, "getCurrentSpan", { enumerable: true, get: functi
|
|
|
64
66
|
Object.defineProperty(exports, "getTraceparent", { enumerable: true, get: function () { return otel_1.getTraceparent; } });
|
|
65
67
|
Object.defineProperty(exports, "getTracer", { enumerable: true, get: function () { return otel_1.getTracer; } });
|
|
66
68
|
Object.defineProperty(exports, "initTracing", { enumerable: true, get: function () { return otel_1.initTracing; } });
|
|
69
|
+
Object.defineProperty(exports, "recordError", { enumerable: true, get: function () { return otel_1.recordError; } });
|
|
67
70
|
Object.defineProperty(exports, "runInSpanContext", { enumerable: true, get: function () { return otel_1.runInSpanContext; } });
|
|
68
71
|
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function () { return otel_1.SpanKind; } });
|
|
69
72
|
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function () { return otel_1.SpanStatusCode; } });
|
|
70
73
|
Object.defineProperty(exports, "shutdownTracing", { enumerable: true, get: function () { return otel_1.shutdownTracing; } });
|
|
71
74
|
Object.defineProperty(exports, "withChildSpan", { enumerable: true, get: function () { return otel_1.withChildSpan; } });
|
|
72
75
|
Object.defineProperty(exports, "withSpan", { enumerable: true, get: function () { return otel_1.withSpan; } });
|
|
76
|
+
var trace_context_1 = require("./trace-context");
|
|
77
|
+
Object.defineProperty(exports, "currentTraceLogFields", { enumerable: true, get: function () { return trace_context_1.currentTraceLogFields; } });
|
|
78
|
+
Object.defineProperty(exports, "traceparentHeader", { enumerable: true, get: function () { return trace_context_1.traceparentHeader; } });
|
|
73
79
|
// Wire-protocol registry (sdkCompat → pi-ai adapter)
|
|
74
80
|
var sdk_compat_1 = require("./sdk-compat");
|
|
75
81
|
Object.defineProperty(exports, "isSdkCompat", { enumerable: true, get: function () { return sdk_compat_1.isSdkCompat; } });
|
|
@@ -7,9 +7,11 @@ exports.createLogger = createLogger;
|
|
|
7
7
|
// Use simple console.log-based logger by default (unbuffered, 12-factor compliant)
|
|
8
8
|
// Set USE_WINSTON_LOGGER=true only if you need Winston features (file rotation, multiple transports)
|
|
9
9
|
const USE_WINSTON_LOGGER = process.env.USE_WINSTON_LOGGER === "true";
|
|
10
|
-
// Use JSON format for structured logging (
|
|
10
|
+
// Use JSON format for structured logging (parsed by the production log pipeline)
|
|
11
11
|
const USE_JSON_FORMAT = process.env.LOG_FORMAT === "json";
|
|
12
12
|
const winston_1 = __importDefault(require("winston"));
|
|
13
|
+
const error_report_1 = require("./error-report");
|
|
14
|
+
const trace_context_1 = require("./trace-context");
|
|
13
15
|
const diagnostic_scrubber_1 = require("./utils/diagnostic-scrubber");
|
|
14
16
|
function safeStringify(value, space) {
|
|
15
17
|
try {
|
|
@@ -59,23 +61,30 @@ function createConsoleLogger(serviceName) {
|
|
|
59
61
|
// all of these, and that coverage now lives here.
|
|
60
62
|
msgStr = (0, diagnostic_scrubber_1.scrubDiagnosticValue)(String(message));
|
|
61
63
|
}
|
|
64
|
+
const traceFields = (0, trace_context_1.currentTraceLogFields)();
|
|
62
65
|
if (USE_JSON_FORMAT) {
|
|
63
|
-
|
|
66
|
+
const record = {
|
|
64
67
|
timestamp,
|
|
65
68
|
level: lvl,
|
|
66
69
|
service: serviceName,
|
|
67
70
|
release: process.env.APP_GIT_SHA,
|
|
71
|
+
...traceFields,
|
|
68
72
|
message: msgStr,
|
|
69
73
|
...(args.length > 0
|
|
70
74
|
? { data: args.length === 1 ? args[0] : args }
|
|
71
75
|
: {}),
|
|
72
|
-
}
|
|
76
|
+
};
|
|
77
|
+
(0, error_report_1.annotateErrorLogRecord)(record);
|
|
78
|
+
return safeStringify(record);
|
|
73
79
|
}
|
|
74
80
|
// Append remaining args
|
|
75
81
|
if (args.length > 0) {
|
|
76
82
|
msgStr += ` ${safeStringify(args.length === 1 ? args[0] : args)}`;
|
|
77
83
|
}
|
|
78
|
-
|
|
84
|
+
const traced = traceFields.trace_id
|
|
85
|
+
? ` trace_id=${traceFields.trace_id} span_id=${traceFields.span_id}`
|
|
86
|
+
: "";
|
|
87
|
+
return `[${timestamp.replace("T", " ").slice(0, 19)}] [${lvl}] [${serviceName}] ${msgStr}${traced}`;
|
|
79
88
|
};
|
|
80
89
|
return {
|
|
81
90
|
error: (message, ...args) => {
|
|
@@ -111,7 +120,7 @@ function createLogger(serviceName) {
|
|
|
111
120
|
}
|
|
112
121
|
const isProduction = process.env.NODE_ENV === "production";
|
|
113
122
|
const level = process.env.LOG_LEVEL || "info";
|
|
114
|
-
// JSON format for structured logging (
|
|
123
|
+
// JSON format for structured logging (parsed by the production log pipeline)
|
|
115
124
|
const jsonFormat = winston_1.default.format.combine(winston_1.default.format.timestamp({ format: "YYYY-MM-DDTHH:mm:ss.SSSZ" }), winston_1.default.format.json());
|
|
116
125
|
// Human-readable format for development
|
|
117
126
|
const humanFormat = winston_1.default.format.combine(...(isProduction ? [] : [winston_1.default.format.colorize()]), winston_1.default.format.printf(({ timestamp, level, message, service, ...meta }) => {
|
|
@@ -131,7 +140,7 @@ function createLogger(serviceName) {
|
|
|
131
140
|
format: winston_1.default.format.combine(winston_1.default.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }), winston_1.default.format.errors({ stack: true }), winston_1.default.format.splat(), winston_1.default.format((info) => {
|
|
132
141
|
// Preserve Winston's symbol fields while applying the same boundary
|
|
133
142
|
// scrubbing as the default console transport.
|
|
134
|
-
return Object.assign(info, (0, diagnostic_scrubber_1.scrubDiagnosticValue)(info));
|
|
143
|
+
return Object.assign(info, (0, diagnostic_scrubber_1.scrubDiagnosticValue)(info), (0, trace_context_1.currentTraceLogFields)());
|
|
135
144
|
})()),
|
|
136
145
|
defaultMeta: { service: serviceName, release: process.env.APP_GIT_SHA },
|
|
137
146
|
transports,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client spans for outbound `fetch`, from the events Node's built-in undici
|
|
3
|
+
* publishes on `diagnostics_channel`. No monkey-patching: the channels exist
|
|
4
|
+
* whether or not anyone listens, and an unsubscribed channel costs nothing.
|
|
5
|
+
*
|
|
6
|
+
* A span records method, host and a parameterized path (no query string, ids
|
|
7
|
+
* replaced), the response status and duration. A span is recorded only
|
|
8
|
+
* under an active span, so a call joins the trace of the work that made it; a
|
|
9
|
+
* background fetch with no surrounding work would only add a stray root trace
|
|
10
|
+
* per call. Upstream 5xx responses and
|
|
11
|
+
* transport failures are recorded as dependency errors; a 4xx is often an
|
|
12
|
+
* expected answer, so it is kept as an attribute rather than an error.
|
|
13
|
+
*/
|
|
14
|
+
import type { Span, Tracer } from "@opentelemetry/api";
|
|
15
|
+
export declare function instrumentFetch(options: {
|
|
16
|
+
tracer: () => Tracer | null;
|
|
17
|
+
recordError: (span: Span, error: unknown) => void;
|
|
18
|
+
}): void;
|
|
19
|
+
//# sourceMappingURL=otel-fetch.d.ts.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Client spans for outbound `fetch`, from the events Node's built-in undici
|
|
4
|
+
* publishes on `diagnostics_channel`. No monkey-patching: the channels exist
|
|
5
|
+
* whether or not anyone listens, and an unsubscribed channel costs nothing.
|
|
6
|
+
*
|
|
7
|
+
* A span records method, host and a parameterized path (no query string, ids
|
|
8
|
+
* replaced), the response status and duration. A span is recorded only
|
|
9
|
+
* under an active span, so a call joins the trace of the work that made it; a
|
|
10
|
+
* background fetch with no surrounding work would only add a stray root trace
|
|
11
|
+
* per call. Upstream 5xx responses and
|
|
12
|
+
* transport failures are recorded as dependency errors; a 4xx is often an
|
|
13
|
+
* expected answer, so it is kept as an attribute rather than an error.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.instrumentFetch = instrumentFetch;
|
|
20
|
+
const node_diagnostics_channel_1 = __importDefault(require("node:diagnostics_channel"));
|
|
21
|
+
const api_1 = require("@opentelemetry/api");
|
|
22
|
+
const error_report_1 = require("./error-report");
|
|
23
|
+
const spans = new WeakMap();
|
|
24
|
+
let subscribed = false;
|
|
25
|
+
let activeTracer = () => null;
|
|
26
|
+
let recordFailure = null;
|
|
27
|
+
function pathTemplate(path) {
|
|
28
|
+
const bare = (path ?? "/").split("?")[0] || "/";
|
|
29
|
+
return (0, error_report_1.parameterizeMessage)(bare).replace(/\s+/g, "");
|
|
30
|
+
}
|
|
31
|
+
function host(origin) {
|
|
32
|
+
if (!origin)
|
|
33
|
+
return "unknown";
|
|
34
|
+
try {
|
|
35
|
+
return new URL(origin).host;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return "unknown";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function instrumentFetch(options) {
|
|
42
|
+
activeTracer = options.tracer;
|
|
43
|
+
recordFailure = options.recordError;
|
|
44
|
+
if (subscribed)
|
|
45
|
+
return;
|
|
46
|
+
subscribed = true;
|
|
47
|
+
node_diagnostics_channel_1.default.subscribe("undici:request:create", (message) => {
|
|
48
|
+
const { request } = message;
|
|
49
|
+
const tracer = activeTracer();
|
|
50
|
+
if (!tracer || !request || !api_1.trace.getSpan(api_1.context.active()))
|
|
51
|
+
return;
|
|
52
|
+
const method = (request.method ?? "GET").toUpperCase();
|
|
53
|
+
const address = host(request.origin);
|
|
54
|
+
const span = tracer.startSpan(`HTTP ${method} ${address}`, {
|
|
55
|
+
kind: api_1.SpanKind.CLIENT,
|
|
56
|
+
attributes: {
|
|
57
|
+
"http.request.method": method,
|
|
58
|
+
"server.address": address,
|
|
59
|
+
"url.template": pathTemplate(request.path),
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
spans.set(request, span);
|
|
63
|
+
});
|
|
64
|
+
node_diagnostics_channel_1.default.subscribe("undici:request:headers", (message) => {
|
|
65
|
+
const { request, response } = message;
|
|
66
|
+
const span = spans.get(request);
|
|
67
|
+
if (!span || typeof response?.statusCode !== "number")
|
|
68
|
+
return;
|
|
69
|
+
span.setAttribute("http.response.status_code", response.statusCode);
|
|
70
|
+
if (response.statusCode >= 500) {
|
|
71
|
+
recordFailure?.(span, {
|
|
72
|
+
name: "UpstreamHttpError",
|
|
73
|
+
message: `HTTP ${response.statusCode}`,
|
|
74
|
+
code: "UPSTREAM_5XX",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
node_diagnostics_channel_1.default.subscribe("undici:request:trailers", (message) => {
|
|
79
|
+
const { request } = message;
|
|
80
|
+
const span = spans.get(request);
|
|
81
|
+
if (!span)
|
|
82
|
+
return;
|
|
83
|
+
spans.delete(request);
|
|
84
|
+
span.end();
|
|
85
|
+
});
|
|
86
|
+
node_diagnostics_channel_1.default.subscribe("undici:request:error", (message) => {
|
|
87
|
+
const { request, error } = message;
|
|
88
|
+
const span = spans.get(request);
|
|
89
|
+
if (!span)
|
|
90
|
+
return;
|
|
91
|
+
spans.delete(request);
|
|
92
|
+
recordFailure?.(span, error);
|
|
93
|
+
span.end();
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=otel-fetch.js.map
|
|
@@ -1,19 +1,39 @@
|
|
|
1
1
|
import type { Span, Tracer } from "@opentelemetry/api";
|
|
2
2
|
import { SpanKind, SpanStatusCode } from "@opentelemetry/api";
|
|
3
|
+
import type { SpanProcessor } from "@opentelemetry/sdk-trace-node";
|
|
4
|
+
import { type DescribeErrorOptions } from "./error-report";
|
|
3
5
|
export interface OtelConfig {
|
|
4
6
|
serviceName: string;
|
|
5
7
|
serviceVersion?: string;
|
|
6
8
|
otlpEndpoint?: string;
|
|
7
9
|
enabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Replaces the OTLP exporter. Tests pass an in-memory processor so init
|
|
12
|
+
* never constructs a gRPC client. Production leaves this unset.
|
|
13
|
+
*/
|
|
14
|
+
spanProcessors?: SpanProcessor[];
|
|
8
15
|
}
|
|
9
16
|
export declare function initTracing(config: OtelConfig): void;
|
|
10
17
|
export declare function getTracer(): Tracer | null;
|
|
11
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Flush and stop tracing. With `timeoutMs`, an unreachable collector cannot
|
|
20
|
+
* hold up process exit past that budget; the timeout rejects.
|
|
21
|
+
*/
|
|
22
|
+
export declare function shutdownTracing(timeoutMs?: number): Promise<void>;
|
|
12
23
|
export declare function flushTracing(): Promise<void>;
|
|
13
24
|
export declare function createSpan(name: string, attributes?: Record<string, string | number | boolean>, kind?: SpanKind): Span | null;
|
|
25
|
+
/**
|
|
26
|
+
* Mark a span failed and attach its grouped error report: exception type,
|
|
27
|
+
* parameterized message, frame-only stack, kind and fingerprint. The raw
|
|
28
|
+
* message is never recorded, because it can carry credentials or source data.
|
|
29
|
+
* `scope` defaults to the span's name; pass it when the span was not the
|
|
30
|
+
* reporting boundary.
|
|
31
|
+
*/
|
|
32
|
+
export declare function recordError(span: Span | null | undefined, error: unknown, options?: Partial<DescribeErrorOptions>): void;
|
|
14
33
|
export declare function withSpan<T>(name: string, fn: (span: Span | null) => Promise<T>, attributes?: Record<string, string | number | boolean>): Promise<T>;
|
|
15
34
|
export declare function getCurrentSpan(): Span | undefined;
|
|
16
|
-
|
|
35
|
+
/** Run `fn` with `span` active, or plainly when tracing produced no span. */
|
|
36
|
+
export declare function runInSpanContext<T>(span: Span | null, fn: () => T): T;
|
|
17
37
|
export declare function createRootSpan(name: string, attributes?: Record<string, string | number | boolean>): {
|
|
18
38
|
span: Span | null;
|
|
19
39
|
traceparent: string | null;
|
package/vendor/core/dist/otel.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.getTracer = getTracer;
|
|
|
6
6
|
exports.shutdownTracing = shutdownTracing;
|
|
7
7
|
exports.flushTracing = flushTracing;
|
|
8
8
|
exports.createSpan = createSpan;
|
|
9
|
+
exports.recordError = recordError;
|
|
9
10
|
exports.withSpan = withSpan;
|
|
10
11
|
exports.getCurrentSpan = getCurrentSpan;
|
|
11
12
|
exports.runInSpanContext = runInSpanContext;
|
|
@@ -16,7 +17,10 @@ exports.getTraceparent = getTraceparent;
|
|
|
16
17
|
const api_1 = require("@opentelemetry/api");
|
|
17
18
|
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function () { return api_1.SpanKind; } });
|
|
18
19
|
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function () { return api_1.SpanStatusCode; } });
|
|
20
|
+
const error_report_1 = require("./error-report");
|
|
19
21
|
const logger_1 = require("./logger");
|
|
22
|
+
const otel_fetch_1 = require("./otel-fetch");
|
|
23
|
+
const trace_context_1 = require("./trace-context");
|
|
20
24
|
const logger = (0, logger_1.createLogger)("otel");
|
|
21
25
|
let provider = null;
|
|
22
26
|
let tracer = null;
|
|
@@ -24,7 +28,9 @@ function initTracing(config) {
|
|
|
24
28
|
if (provider) {
|
|
25
29
|
return;
|
|
26
30
|
}
|
|
27
|
-
const
|
|
31
|
+
const customProcessors = config.spanProcessors;
|
|
32
|
+
const useCustomProcessors = (customProcessors?.length ?? 0) > 0;
|
|
33
|
+
const enabled = config.enabled ?? (!!config.otlpEndpoint || useCustomProcessors);
|
|
28
34
|
if (!enabled) {
|
|
29
35
|
logger.debug("Tracing disabled (no OTEL_EXPORTER_OTLP_ENDPOINT configured)");
|
|
30
36
|
return;
|
|
@@ -33,25 +39,39 @@ function initTracing(config) {
|
|
|
33
39
|
// require, bun provides one for src TS, and the server ESM bundle banner
|
|
34
40
|
// defines `const require = __createRequire(import.meta.url)` for exactly
|
|
35
41
|
// these calls — while __filename has no shim there and would throw.
|
|
36
|
-
let exporterCtor;
|
|
37
42
|
let resourceFromAttributes;
|
|
38
43
|
let NodeTracerProvider;
|
|
39
|
-
let SimpleSpanProcessor;
|
|
40
44
|
let ATTR_SERVICE_NAME;
|
|
41
45
|
let ATTR_SERVICE_VERSION;
|
|
46
|
+
let spanProcessors;
|
|
42
47
|
try {
|
|
43
|
-
exporterCtor =
|
|
44
|
-
require("@opentelemetry/exporter-trace-otlp-grpc").OTLPTraceExporter;
|
|
45
48
|
resourceFromAttributes =
|
|
46
49
|
require("@opentelemetry/resources").resourceFromAttributes;
|
|
50
|
+
let BatchSpanProcessor;
|
|
47
51
|
({
|
|
52
|
+
BatchSpanProcessor,
|
|
48
53
|
NodeTracerProvider,
|
|
49
|
-
SimpleSpanProcessor,
|
|
50
54
|
} = require("@opentelemetry/sdk-trace-node"));
|
|
51
55
|
({
|
|
52
56
|
ATTR_SERVICE_NAME,
|
|
53
57
|
ATTR_SERVICE_VERSION,
|
|
54
58
|
} = require("@opentelemetry/semantic-conventions"));
|
|
59
|
+
if (customProcessors?.length) {
|
|
60
|
+
// A caller-supplied processor (tests) never loads the gRPC exporter.
|
|
61
|
+
spanProcessors = customProcessors;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// The server is long-lived: a batch keeps export off the request path
|
|
65
|
+
// and bounds memory with a drop-on-full queue while a collector is
|
|
66
|
+
// down. shutdownTracing flushes it.
|
|
67
|
+
const exporterCtor = require("@opentelemetry/exporter-trace-otlp-grpc").OTLPTraceExporter;
|
|
68
|
+
spanProcessors = [
|
|
69
|
+
new BatchSpanProcessor(new exporterCtor({
|
|
70
|
+
url: config.otlpEndpoint,
|
|
71
|
+
timeoutMillis: 30000,
|
|
72
|
+
})),
|
|
73
|
+
];
|
|
74
|
+
}
|
|
55
75
|
}
|
|
56
76
|
catch (err) {
|
|
57
77
|
// Only a missing module means the optional peers aren't installed. A
|
|
@@ -65,27 +85,51 @@ function initTracing(config) {
|
|
|
65
85
|
[ATTR_SERVICE_NAME]: config.serviceName,
|
|
66
86
|
[ATTR_SERVICE_VERSION]: config.serviceVersion || "1.0.0",
|
|
67
87
|
});
|
|
68
|
-
const exporter = new exporterCtor({
|
|
69
|
-
url: config.otlpEndpoint,
|
|
70
|
-
timeoutMillis: 30000,
|
|
71
|
-
});
|
|
72
|
-
// SimpleSpanProcessor exports immediately — workers are short-lived
|
|
73
88
|
provider = new NodeTracerProvider({
|
|
74
89
|
resource,
|
|
75
|
-
spanProcessors
|
|
90
|
+
spanProcessors,
|
|
76
91
|
});
|
|
77
92
|
provider.register();
|
|
78
|
-
tracer
|
|
79
|
-
|
|
93
|
+
// Bind the tracer we just built. trace.getTracer() stays on the first
|
|
94
|
+
// globally registered provider, so a later init would otherwise export
|
|
95
|
+
// into a provider this call does not own.
|
|
96
|
+
tracer = provider.getTracer(config.serviceName, config.serviceVersion);
|
|
97
|
+
(0, otel_fetch_1.instrumentFetch)({
|
|
98
|
+
tracer: () => tracer,
|
|
99
|
+
recordError: (span, error) => recordError(span, error, { kind: "dependency" }),
|
|
100
|
+
});
|
|
101
|
+
logger.info(useCustomProcessors
|
|
102
|
+
? `Tracing initialized: ${config.serviceName} (custom span processors)`
|
|
103
|
+
: `Tracing initialized: ${config.serviceName} -> ${config.otlpEndpoint}`);
|
|
80
104
|
}
|
|
81
105
|
function getTracer() {
|
|
82
106
|
return tracer;
|
|
83
107
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Flush and stop tracing. With `timeoutMs`, an unreachable collector cannot
|
|
110
|
+
* hold up process exit past that budget; the timeout rejects.
|
|
111
|
+
*/
|
|
112
|
+
async function shutdownTracing(timeoutMs) {
|
|
113
|
+
if (!provider)
|
|
114
|
+
return;
|
|
115
|
+
const shutdown = provider.shutdown();
|
|
116
|
+
provider = null;
|
|
117
|
+
tracer = null;
|
|
118
|
+
if (timeoutMs === undefined) {
|
|
119
|
+
await shutdown;
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
let timer;
|
|
123
|
+
try {
|
|
124
|
+
await Promise.race([
|
|
125
|
+
shutdown,
|
|
126
|
+
new Promise((_, reject) => {
|
|
127
|
+
timer = setTimeout(() => reject(new Error(`Tracing shutdown exceeded its ${timeoutMs}ms budget`)), timeoutMs);
|
|
128
|
+
}),
|
|
129
|
+
]);
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
clearTimeout(timer);
|
|
89
133
|
}
|
|
90
134
|
}
|
|
91
135
|
async function flushTracing() {
|
|
@@ -103,6 +147,26 @@ function createSpan(name, attributes, kind = api_1.SpanKind.INTERNAL) {
|
|
|
103
147
|
});
|
|
104
148
|
return span;
|
|
105
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Mark a span failed and attach its grouped error report: exception type,
|
|
152
|
+
* parameterized message, frame-only stack, kind and fingerprint. The raw
|
|
153
|
+
* message is never recorded, because it can carry credentials or source data.
|
|
154
|
+
* `scope` defaults to the span's name; pass it when the span was not the
|
|
155
|
+
* reporting boundary.
|
|
156
|
+
*/
|
|
157
|
+
function recordError(span, error, options = {}) {
|
|
158
|
+
if (!span)
|
|
159
|
+
return;
|
|
160
|
+
const name = span.name;
|
|
161
|
+
const report = (0, error_report_1.describeError)(error, {
|
|
162
|
+
scope: options.scope ?? (typeof name === "string" ? name : "span"),
|
|
163
|
+
...(options.kind ? { kind: options.kind } : {}),
|
|
164
|
+
});
|
|
165
|
+
const attributes = (0, error_report_1.errorReportAttributes)(report);
|
|
166
|
+
span.setAttributes(attributes);
|
|
167
|
+
span.addEvent("exception", attributes);
|
|
168
|
+
span.setStatus({ code: api_1.SpanStatusCode.ERROR, message: report.message });
|
|
169
|
+
}
|
|
106
170
|
async function runInSpan(span, fn) {
|
|
107
171
|
try {
|
|
108
172
|
const result = await fn(span);
|
|
@@ -110,13 +174,7 @@ async function runInSpan(span, fn) {
|
|
|
110
174
|
return result;
|
|
111
175
|
}
|
|
112
176
|
catch (error) {
|
|
113
|
-
|
|
114
|
-
span.setStatus({
|
|
115
|
-
code: api_1.SpanStatusCode.ERROR,
|
|
116
|
-
message: error instanceof Error ? error.message : String(error),
|
|
117
|
-
});
|
|
118
|
-
span.recordException(error);
|
|
119
|
-
}
|
|
177
|
+
recordError(span, error);
|
|
120
178
|
throw error;
|
|
121
179
|
}
|
|
122
180
|
finally {
|
|
@@ -129,43 +187,33 @@ async function withSpan(name, fn, attributes) {
|
|
|
129
187
|
function getCurrentSpan() {
|
|
130
188
|
return api_1.trace.getActiveSpan();
|
|
131
189
|
}
|
|
190
|
+
/** Run `fn` with `span` active, or plainly when tracing produced no span. */
|
|
132
191
|
function runInSpanContext(span, fn) {
|
|
133
|
-
|
|
134
|
-
|
|
192
|
+
if (!span)
|
|
193
|
+
return fn();
|
|
194
|
+
return api_1.context.with(api_1.trace.setSpan(api_1.context.active(), span), fn);
|
|
135
195
|
}
|
|
136
196
|
function createRootSpan(name, attributes) {
|
|
137
197
|
if (!tracer) {
|
|
138
198
|
return { span: null, traceparent: null };
|
|
139
199
|
}
|
|
200
|
+
// Not the active context. Callers that want logs to see this span run
|
|
201
|
+
// the work through runInSpanContext.
|
|
140
202
|
const span = tracer.startSpan(name, {
|
|
141
203
|
kind: api_1.SpanKind.SERVER,
|
|
142
204
|
attributes,
|
|
143
205
|
});
|
|
144
|
-
|
|
145
|
-
const traceparent = `00-${spanContext.traceId}-${spanContext.spanId}-01`;
|
|
146
|
-
return { span, traceparent };
|
|
206
|
+
return { span, traceparent: (0, trace_context_1.formatTraceparent)(span.spanContext()) };
|
|
147
207
|
}
|
|
148
208
|
function createChildSpan(name, traceparent, attributes) {
|
|
149
209
|
if (!tracer) {
|
|
150
210
|
return null;
|
|
151
211
|
}
|
|
152
|
-
|
|
212
|
+
const parent = (0, trace_context_1.parseTraceparent)(traceparent);
|
|
213
|
+
if (!parent) {
|
|
153
214
|
return createSpan(name, attributes);
|
|
154
215
|
}
|
|
155
|
-
|
|
156
|
-
const parts = traceparent.split("-");
|
|
157
|
-
if (parts.length !== 4) {
|
|
158
|
-
return createSpan(name, attributes);
|
|
159
|
-
}
|
|
160
|
-
const traceId = parts[1];
|
|
161
|
-
const parentSpanId = parts[2];
|
|
162
|
-
const parentContext = api_1.trace.setSpanContext(api_1.context.active(), {
|
|
163
|
-
traceId,
|
|
164
|
-
spanId: parentSpanId,
|
|
165
|
-
traceFlags: 1,
|
|
166
|
-
isRemote: true,
|
|
167
|
-
});
|
|
168
|
-
return tracer.startSpan(name, { kind: api_1.SpanKind.INTERNAL, attributes }, parentContext);
|
|
216
|
+
return tracer.startSpan(name, { kind: api_1.SpanKind.INTERNAL, attributes }, api_1.trace.setSpanContext(api_1.context.active(), parent));
|
|
169
217
|
}
|
|
170
218
|
async function withChildSpan(name, traceparent, fn, attributes) {
|
|
171
219
|
return runInSpan(createChildSpan(name, traceparent, attributes), fn);
|
|
@@ -173,7 +221,6 @@ async function withChildSpan(name, traceparent, fn, attributes) {
|
|
|
173
221
|
function getTraceparent(span) {
|
|
174
222
|
if (!span)
|
|
175
223
|
return null;
|
|
176
|
-
|
|
177
|
-
return `00-${ctx.traceId}-${ctx.spanId}-01`;
|
|
224
|
+
return (0, trace_context_1.formatTraceparent)(span.spanContext());
|
|
178
225
|
}
|
|
179
226
|
//# sourceMappingURL=otel.js.map
|
|
@@ -38,7 +38,7 @@ export declare const RESERVED_PATHS_SET: ReadonlySet<string>;
|
|
|
38
38
|
* product words that are not knowledge types. Create-time hygiene only — not
|
|
39
39
|
* hide/prune policy (that is `$` prefix only).
|
|
40
40
|
*/
|
|
41
|
-
export declare const RESERVED_ENTITY_TYPE_SLUGS: readonly ["activity", "agents", "connectors", "data", "memory", "members", "settings", "events", "automations", "connections", "sources", "environments", "infrastructure", "inference-providers", "devices", "entity-types", "recent", "chat", "-", "organization", "user", "automation", "content", "source", "connector"];
|
|
41
|
+
export declare const RESERVED_ENTITY_TYPE_SLUGS: readonly ["activity", "agents", "connectors", "data", "memory", "members", "settings", "events", "automations", "connections", "sources", "environments", "infrastructure", "inference-providers", "devices", "entity-types", "recent", "chat", "views", "-", "organization", "user", "automation", "content", "source", "connector"];
|
|
42
42
|
/**
|
|
43
43
|
* Whether a proposed entity-type slug is illegal for user/API create.
|
|
44
44
|
* `$…` is reserved for platform-named types ($member, $resource).
|
|
@@ -113,15 +113,17 @@ exports.RESERVED_ENTITY_TYPE_SLUGS = [
|
|
|
113
113
|
// Live /$owner/<segment> routes that are NOT owner-nav segments (so they are
|
|
114
114
|
// absent from OWNER_ROUTE_SEGMENTS). Entity pages render through the
|
|
115
115
|
// `/$owner/$` splat, which a static segment always outranks, so an entity
|
|
116
|
-
// type with one of these slugs is permanently shadowed: `recent`
|
|
117
|
-
// list page to /$owner/recent
|
|
118
|
-
//
|
|
119
|
-
// /$owner/
|
|
116
|
+
// type with one of these slugs is permanently shadowed: `recent` and `chat`
|
|
117
|
+
// lose their list page to the /$owner/recent and /$owner/chat index routes,
|
|
118
|
+
// while `entity-types` and `views` have no index route and instead lose
|
|
119
|
+
// every detail page to /$owner/entity-types/$slug and
|
|
120
|
+
// /$owner/views/$view. Create-time hygiene only — deliberately not added to
|
|
120
121
|
// OWNER_ROUTE_SEGMENTS, which also feeds the SPA's entity-splat routing
|
|
121
122
|
// guard and would break any existing entity type already using the slug.
|
|
122
123
|
"entity-types",
|
|
123
124
|
"recent",
|
|
124
125
|
"chat",
|
|
126
|
+
"views",
|
|
125
127
|
// The web host's view marker (`/<type>/-/views/<key>`): a type stored as `-`
|
|
126
128
|
// would make its own list page parse as a view path.
|
|
127
129
|
view_path_1.VIEW_PATH_MARKER,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Recognize accepted approvals without treating them as completed writes. */
|
|
2
|
+
export declare function isPendingToolApproval(value: unknown): boolean;
|
|
3
|
+
/** Interpret legacy application result values; protocol errors stay with their transport. */
|
|
4
|
+
export declare function getToolResultFailure(actionName: string, value: unknown): {
|
|
5
|
+
message: string;
|
|
6
|
+
result: Record<string, unknown>;
|
|
7
|
+
} | null;
|
|
8
|
+
//# sourceMappingURL=tool-result.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPendingToolApproval = isPendingToolApproval;
|
|
4
|
+
exports.getToolResultFailure = getToolResultFailure;
|
|
5
|
+
/** Recognize accepted approvals without treating them as completed writes. */
|
|
6
|
+
function isPendingToolApproval(value) {
|
|
7
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
8
|
+
return false;
|
|
9
|
+
const result = value;
|
|
10
|
+
return (result.status === "pending_approval" || result.approval_queued === true);
|
|
11
|
+
}
|
|
12
|
+
/** Interpret legacy application result values; protocol errors stay with their transport. */
|
|
13
|
+
function getToolResultFailure(actionName, value) {
|
|
14
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
15
|
+
return null;
|
|
16
|
+
const result = value;
|
|
17
|
+
const hasError = result.error !== undefined && result.error !== null;
|
|
18
|
+
const summary = result.summary &&
|
|
19
|
+
typeof result.summary === "object" &&
|
|
20
|
+
!Array.isArray(result.summary)
|
|
21
|
+
? result.summary
|
|
22
|
+
: null;
|
|
23
|
+
const allAggregateItemsFailed = typeof summary?.failed === "number" &&
|
|
24
|
+
summary.failed > 0 &&
|
|
25
|
+
summary.successful === 0;
|
|
26
|
+
// Some mutation policies return `success:false` while durably queueing an
|
|
27
|
+
// approval. That is a non-terminal accepted outcome, not a business failure;
|
|
28
|
+
// callers need its approval URL/run id to continue the workflow.
|
|
29
|
+
const acceptedForApproval = isPendingToolApproval(result);
|
|
30
|
+
const reportsFailure = !acceptedForApproval &&
|
|
31
|
+
(result.success === false ||
|
|
32
|
+
result.ok === false ||
|
|
33
|
+
result.status === "failed" ||
|
|
34
|
+
result.status === "error" ||
|
|
35
|
+
result.status === "timeout" ||
|
|
36
|
+
allAggregateItemsFailed);
|
|
37
|
+
if (!hasError && !reportsFailure)
|
|
38
|
+
return null;
|
|
39
|
+
const failedItem = Array.isArray(result.results)
|
|
40
|
+
? result.results.find((item) => item !== null &&
|
|
41
|
+
typeof item === "object" &&
|
|
42
|
+
!Array.isArray(item) &&
|
|
43
|
+
item.success === false)
|
|
44
|
+
: undefined;
|
|
45
|
+
const candidates = [
|
|
46
|
+
result.error,
|
|
47
|
+
result.error_message,
|
|
48
|
+
result.message,
|
|
49
|
+
result.reason,
|
|
50
|
+
failedItem?.error,
|
|
51
|
+
failedItem?.error_message,
|
|
52
|
+
failedItem?.message,
|
|
53
|
+
failedItem?.reason,
|
|
54
|
+
];
|
|
55
|
+
const message = candidates.find((candidate) => typeof candidate === "string" && candidate.trim().length > 0);
|
|
56
|
+
return {
|
|
57
|
+
message: message?.trim() ?? `Action '${actionName}' failed`,
|
|
58
|
+
result,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=tool-result.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SpanContext } from "@opentelemetry/api";
|
|
2
|
+
/** The remote parent a valid `traceparent` names, or null for anything else. */
|
|
3
|
+
export declare function parseTraceparent(value: unknown): SpanContext | null;
|
|
4
|
+
export declare function formatTraceparent(spanContext: SpanContext): string;
|
|
5
|
+
/** A W3C `traceparent` value, or null when the input is not one. */
|
|
6
|
+
export declare function traceparentHeader(value: unknown): string | null;
|
|
7
|
+
/** W3C ids of the active span. Empty when the log is outside a real span. */
|
|
8
|
+
export declare function currentTraceLogFields(): {
|
|
9
|
+
trace_id?: string;
|
|
10
|
+
span_id?: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=trace-context.d.ts.map
|