@truefoundry/trueforge 0.179.2 → 0.180.0-rc.2
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/_frontend/assets/{AgentCodeSnippets-GX5MTZLF-D1o4DvyC.js → AgentCodeSnippets-EI7L6AZD-B95q1Hjm.js} +1 -1
- package/dist/_frontend/assets/AgentCodeSnippets-EI7L6AZD-B95q1Hjm.js.br +0 -0
- package/dist/_frontend/assets/AgentCodeSnippets-EI7L6AZD-B95q1Hjm.js.gz +0 -0
- package/dist/_frontend/assets/AgentMetricChart-2UEF3GEL-DBH9LK9O.js +1 -0
- package/dist/_frontend/assets/AgentMetricChart-2UEF3GEL-DBH9LK9O.js.br +0 -0
- package/dist/_frontend/assets/AgentMetricChart-2UEF3GEL-DBH9LK9O.js.gz +0 -0
- package/dist/_frontend/assets/AgentOverview-HEFKPIVO-Dq6tr7kQ.js +1 -0
- package/dist/_frontend/assets/AgentOverview-HEFKPIVO-Dq6tr7kQ.js.br +0 -0
- package/dist/_frontend/assets/AgentOverview-HEFKPIVO-Dq6tr7kQ.js.gz +0 -0
- package/dist/_frontend/assets/{AgentSessionEventTimeline-ZBW3AIU2-BjA4oeYw.js → AgentSessionEventTimeline-5AMYAJEU-B57r1KB8.js} +1 -1
- package/dist/_frontend/assets/AgentSessionEventTimeline-5AMYAJEU-B57r1KB8.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimeline-5AMYAJEU-B57r1KB8.js.gz +0 -0
- package/dist/_frontend/assets/{AgentSessionEventTimelineChart-VQNS2G4D-o3La8fse.js → AgentSessionEventTimelineChart-MCIIMESZ-tHXn5h6a.js} +1 -1
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-MCIIMESZ-tHXn5h6a.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-MCIIMESZ-tHXn5h6a.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessions-IBTWEXR3-BkHj0ugQ.js +1 -0
- package/dist/_frontend/assets/AgentSessions-IBTWEXR3-BkHj0ugQ.js.br +0 -0
- package/dist/_frontend/assets/AgentSessions-IBTWEXR3-BkHj0ugQ.js.gz +0 -0
- package/dist/_frontend/assets/ConnectorSettings-WIXOLTUY-DCK3VbLC.js +1 -0
- package/dist/_frontend/assets/ConnectorSettings-WIXOLTUY-DCK3VbLC.js.br +0 -0
- package/dist/_frontend/assets/ConnectorSettings-WIXOLTUY-DCK3VbLC.js.gz +0 -0
- package/dist/_frontend/assets/{DockLayout-YSSOMIEK-S7QeeWVV.js → DockLayout-W7IJXA3A-46pvLKrm.js} +1 -1
- package/dist/_frontend/assets/DrawerLayout-6NM2OK7V-DNiz2kq8.js +2 -0
- package/dist/_frontend/assets/DrawerLayout-6NM2OK7V-DNiz2kq8.js.br +0 -0
- package/dist/_frontend/assets/DrawerLayout-6NM2OK7V-DNiz2kq8.js.gz +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-CP45I45Z-Qvooua0r.js +3 -0
- package/dist/_frontend/assets/EnvironmentsPage-CP45I45Z-Qvooua0r.js.br +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-CP45I45Z-Qvooua0r.js.gz +0 -0
- package/dist/_frontend/assets/ModelSettings-RORWGM3U-C46mJ_bm.js +1 -0
- package/dist/_frontend/assets/ModelSettings-RORWGM3U-C46mJ_bm.js.br +0 -0
- package/dist/_frontend/assets/ModelSettings-RORWGM3U-C46mJ_bm.js.gz +0 -0
- package/dist/_frontend/assets/{SandboxSettings-Y3NPODM5-CD9DUFxP.js → SandboxSettings-HHLZG6WS-DGO4et3u.js} +1 -1
- package/dist/_frontend/assets/SandboxSettings-HHLZG6WS-DGO4et3u.js.br +0 -0
- package/dist/_frontend/assets/SandboxSettings-HHLZG6WS-DGO4et3u.js.gz +0 -0
- package/dist/_frontend/assets/SchedulesPage-T7EAUTOK-N-OW1kvz.js +1 -0
- package/dist/_frontend/assets/SchedulesPage-T7EAUTOK-N-OW1kvz.js.br +0 -0
- package/dist/_frontend/assets/SchedulesPage-T7EAUTOK-N-OW1kvz.js.gz +0 -0
- package/dist/_frontend/assets/{SettingsBuilder-CVPLV5HY-D0lac3y-.js → SettingsBuilder-L2OFMRXP-Dh8lEf0J.js} +2 -2
- package/dist/_frontend/assets/SettingsBuilder-L2OFMRXP-Dh8lEf0J.js.br +0 -0
- package/dist/_frontend/assets/SettingsBuilder-L2OFMRXP-Dh8lEf0J.js.gz +0 -0
- package/dist/_frontend/assets/ShellRouteSync-ZNUJRPCZ-RP3jr7cD.js +1 -0
- package/dist/_frontend/assets/ShellRouteSync-ZNUJRPCZ-RP3jr7cD.js.br +0 -0
- package/dist/_frontend/assets/ShellRouteSync-ZNUJRPCZ-RP3jr7cD.js.gz +0 -0
- package/dist/_frontend/assets/SidebarLayout-5ZOKBF2G-bNBjXx3r.js +2 -0
- package/dist/_frontend/assets/SidebarLayout-5ZOKBF2G-bNBjXx3r.js.br +0 -0
- package/dist/_frontend/assets/SidebarLayout-5ZOKBF2G-bNBjXx3r.js.gz +0 -0
- package/dist/_frontend/assets/SkillSettings-TGEVQYVZ-7tUcODoO.js +1 -0
- package/dist/_frontend/assets/SkillSettings-TGEVQYVZ-7tUcODoO.js.br +0 -0
- package/dist/_frontend/assets/SkillSettings-TGEVQYVZ-7tUcODoO.js.gz +0 -0
- package/dist/_frontend/assets/{TrueForgeUIWithRouter-SZT3KVCD-BMJaD7KT.js → TrueForgeUIWithRouter-CXREADWK-Qoq2vKOi.js} +1 -1
- package/dist/_frontend/assets/{WebSearchSettings-SUBJH2C5-DL7KJKp-.js → WebSearchSettings-SXQIWYIB-BL4uxR02.js} +1 -1
- package/dist/_frontend/assets/WebSearchSettings-SXQIWYIB-BL4uxR02.js.br +0 -0
- package/dist/_frontend/assets/WebSearchSettings-SXQIWYIB-BL4uxR02.js.gz +0 -0
- package/dist/_frontend/assets/{WidgetLayout-Q3F3UWN3-BQaDzdhk.js → WidgetLayout-7WFNZ2IB-DOiTcCPs.js} +1 -1
- package/dist/_frontend/assets/WidgetLayout-7WFNZ2IB-DOiTcCPs.js.br +0 -0
- package/dist/_frontend/assets/WidgetLayout-7WFNZ2IB-DOiTcCPs.js.gz +0 -0
- package/dist/_frontend/assets/{chunk-ICZTJLTU-CSBYGLaq.js → chunk-4BKRLRXL--PTlsbLc.js} +1 -1
- package/dist/_frontend/assets/chunk-4BKRLRXL--PTlsbLc.js.br +0 -0
- package/dist/_frontend/assets/chunk-4BKRLRXL--PTlsbLc.js.gz +0 -0
- package/dist/_frontend/assets/{chunk-GSAVSNGR-BJhfT2HB.js → chunk-HEZQT2S7-Cy_0RIlD.js} +1 -1
- package/dist/_frontend/assets/{chunk-OB3PAWPO-WTBtRmxH.js → chunk-OB3PAWPO-D_HivAkv.js} +1 -1
- package/dist/_frontend/assets/chunk-OB3PAWPO-D_HivAkv.js.br +0 -0
- package/dist/_frontend/assets/chunk-OB3PAWPO-D_HivAkv.js.gz +0 -0
- package/dist/_frontend/assets/chunk-PMXDHCX7-CdA5wX19.js +1 -0
- package/dist/_frontend/assets/chunk-PMXDHCX7-CdA5wX19.js.br +0 -0
- package/dist/_frontend/assets/chunk-PMXDHCX7-CdA5wX19.js.gz +0 -0
- package/dist/_frontend/assets/chunk-ROEY5URA-D9QfyGUQ.js +2 -0
- package/dist/_frontend/assets/chunk-ROEY5URA-D9QfyGUQ.js.br +0 -0
- package/dist/_frontend/assets/chunk-ROEY5URA-D9QfyGUQ.js.gz +0 -0
- package/dist/_frontend/assets/{cssMode-BnrOGoXe.js → cssMode-DYweAuD0.js} +1 -1
- package/dist/_frontend/assets/cssMode-DYweAuD0.js.br +0 -0
- package/dist/_frontend/assets/cssMode-DYweAuD0.js.gz +0 -0
- package/dist/_frontend/assets/{freemarker2-Cu2qkLE9.js → freemarker2-BgnrKMUJ.js} +1 -1
- package/dist/_frontend/assets/freemarker2-BgnrKMUJ.js.br +0 -0
- package/dist/_frontend/assets/freemarker2-BgnrKMUJ.js.gz +0 -0
- package/dist/_frontend/assets/{handlebars-qoIGMfY0.js → handlebars-BuxRYVDg.js} +1 -1
- package/dist/_frontend/assets/handlebars-BuxRYVDg.js.br +0 -0
- package/dist/_frontend/assets/handlebars-BuxRYVDg.js.gz +0 -0
- package/dist/_frontend/assets/{html-jIKazNfg.js → html-B26vpw9A.js} +1 -1
- package/dist/_frontend/assets/html-B26vpw9A.js.br +0 -0
- package/dist/_frontend/assets/html-B26vpw9A.js.gz +0 -0
- package/dist/_frontend/assets/{htmlMode-M1ZSzZKt.js → htmlMode-DmYbS8Mn.js} +1 -1
- package/dist/_frontend/assets/htmlMode-DmYbS8Mn.js.br +0 -0
- package/dist/_frontend/assets/htmlMode-DmYbS8Mn.js.gz +0 -0
- package/dist/_frontend/assets/{index-BJsGMvc-.js → index-BkqFR0mB.js} +243 -243
- package/dist/_frontend/assets/index-BkqFR0mB.js.br +0 -0
- package/dist/_frontend/assets/index-BkqFR0mB.js.gz +0 -0
- package/dist/_frontend/assets/{index-YbpMGQU0.js → index-DO2Lw8LG.js} +3 -3
- package/dist/_frontend/assets/index-DO2Lw8LG.js.br +0 -0
- package/dist/_frontend/assets/index-DO2Lw8LG.js.gz +0 -0
- package/dist/_frontend/assets/{index-4r7-LeFK.js → index-ouLu_TJW.js} +1 -1
- package/dist/_frontend/assets/index-ouLu_TJW.js.br +0 -0
- package/dist/_frontend/assets/index-ouLu_TJW.js.gz +0 -0
- package/dist/_frontend/assets/{javascript-X_qdyURb.js → javascript-DM8v37Dy.js} +1 -1
- package/dist/_frontend/assets/{jsonMode-CT04G6VA.js → jsonMode-DMae7QLZ.js} +1 -1
- package/dist/_frontend/assets/jsonMode-DMae7QLZ.js.br +0 -0
- package/dist/_frontend/assets/jsonMode-DMae7QLZ.js.gz +0 -0
- package/dist/_frontend/assets/{liquid-B2a653EE.js → liquid-lgQW01T7.js} +1 -1
- package/dist/_frontend/assets/liquid-lgQW01T7.js.br +0 -0
- package/dist/_frontend/assets/liquid-lgQW01T7.js.gz +0 -0
- package/dist/_frontend/assets/{lspLanguageFeatures-mffTaZGc.js → lspLanguageFeatures-dlo6U4a7.js} +1 -1
- package/dist/_frontend/assets/lspLanguageFeatures-dlo6U4a7.js.br +0 -0
- package/dist/_frontend/assets/lspLanguageFeatures-dlo6U4a7.js.gz +0 -0
- package/dist/_frontend/assets/{mdx-DN_e2xx5.js → mdx-B56hEfFP.js} +1 -1
- package/dist/_frontend/assets/mdx-B56hEfFP.js.br +0 -0
- package/dist/_frontend/assets/mdx-B56hEfFP.js.gz +0 -0
- package/dist/_frontend/assets/{python-CMZDwpP1.js → python-D3uJaW0Z.js} +1 -1
- package/dist/_frontend/assets/python-D3uJaW0Z.js.br +0 -0
- package/dist/_frontend/assets/python-D3uJaW0Z.js.gz +0 -0
- package/dist/_frontend/assets/{razor-CJvSmNFI.js → razor-CA2L2x1h.js} +1 -1
- package/dist/_frontend/assets/razor-CA2L2x1h.js.br +0 -0
- package/dist/_frontend/assets/razor-CA2L2x1h.js.gz +0 -0
- package/dist/_frontend/assets/{tsMode-ZJxciJ2G.js → tsMode-DqNAhXjm.js} +1 -1
- package/dist/_frontend/assets/tsMode-DqNAhXjm.js.br +0 -0
- package/dist/_frontend/assets/tsMode-DqNAhXjm.js.gz +0 -0
- package/dist/_frontend/assets/{typescript-DS4oUy9B.js → typescript-gk4F4p_p.js} +1 -1
- package/dist/_frontend/assets/typescript-gk4F4p_p.js.br +0 -0
- package/dist/_frontend/assets/typescript-gk4F4p_p.js.gz +0 -0
- package/dist/_frontend/assets/{workers-DPKHJxKo.js → workers-Dt5cwyc9.js} +1 -1
- package/dist/_frontend/assets/workers-Dt5cwyc9.js.br +0 -0
- package/dist/_frontend/assets/workers-Dt5cwyc9.js.gz +0 -0
- package/dist/_frontend/assets/{xml-BJmCYv7o.js → xml-CzsdIMnF.js} +1 -1
- package/dist/_frontend/assets/xml-CzsdIMnF.js.br +0 -0
- package/dist/_frontend/assets/xml-CzsdIMnF.js.gz +0 -0
- package/dist/_frontend/assets/{yaml-DzYUCVsV.js → yaml-BnfYb4jg.js} +1 -1
- package/dist/_frontend/assets/yaml-BnfYb4jg.js.br +0 -0
- package/dist/_frontend/assets/yaml-BnfYb4jg.js.gz +0 -0
- package/dist/_frontend/index.html +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/controller-main.js +27 -5
- package/dist/controller-main.js.map +1 -1
- package/dist/main.js +419 -257
- package/dist/main.js.map +1 -1
- package/dist/postgres/migrations/20261009_000001_model_message_model_backfill.js +94 -0
- package/dist/postgres/migrations/20261009_000001_model_message_model_backfill.js.map +1 -0
- package/dist/sqlite/migrations/20261009_000001_model_message_model_backfill.js +91 -0
- package/dist/sqlite/migrations/20261009_000001_model_message_model_backfill.js.map +1 -0
- package/package.json +3 -3
- package/dist/_frontend/assets/AgentCodeSnippets-GX5MTZLF-D1o4DvyC.js.br +0 -0
- package/dist/_frontend/assets/AgentCodeSnippets-GX5MTZLF-D1o4DvyC.js.gz +0 -0
- package/dist/_frontend/assets/AgentMetricChart-MMZYPKVN-8E4ELOjM.js +0 -1
- package/dist/_frontend/assets/AgentMetricChart-MMZYPKVN-8E4ELOjM.js.br +0 -0
- package/dist/_frontend/assets/AgentMetricChart-MMZYPKVN-8E4ELOjM.js.gz +0 -0
- package/dist/_frontend/assets/AgentOverview-OBBGSUOK-D0-uAThW.js +0 -1
- package/dist/_frontend/assets/AgentOverview-OBBGSUOK-D0-uAThW.js.br +0 -0
- package/dist/_frontend/assets/AgentOverview-OBBGSUOK-D0-uAThW.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimeline-ZBW3AIU2-BjA4oeYw.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimeline-ZBW3AIU2-BjA4oeYw.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-VQNS2G4D-o3La8fse.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-VQNS2G4D-o3La8fse.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessions-OB32CD3H-BvEB36Q4.js +0 -1
- package/dist/_frontend/assets/AgentSessions-OB32CD3H-BvEB36Q4.js.br +0 -0
- package/dist/_frontend/assets/AgentSessions-OB32CD3H-BvEB36Q4.js.gz +0 -0
- package/dist/_frontend/assets/ConnectorSettings-XXE32AUQ-Bi01homi.js +0 -1
- package/dist/_frontend/assets/ConnectorSettings-XXE32AUQ-Bi01homi.js.br +0 -0
- package/dist/_frontend/assets/ConnectorSettings-XXE32AUQ-Bi01homi.js.gz +0 -0
- package/dist/_frontend/assets/DrawerLayout-T6U5AGG7-BQoBVjqu.js +0 -2
- package/dist/_frontend/assets/DrawerLayout-T6U5AGG7-BQoBVjqu.js.br +0 -0
- package/dist/_frontend/assets/DrawerLayout-T6U5AGG7-BQoBVjqu.js.gz +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-OXKHJMOO-C-t7Dp_i.js +0 -3
- package/dist/_frontend/assets/EnvironmentsPage-OXKHJMOO-C-t7Dp_i.js.br +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-OXKHJMOO-C-t7Dp_i.js.gz +0 -0
- package/dist/_frontend/assets/ModelSettings-J5QDA4OJ-1_KW1bju.js +0 -1
- package/dist/_frontend/assets/ModelSettings-J5QDA4OJ-1_KW1bju.js.br +0 -0
- package/dist/_frontend/assets/ModelSettings-J5QDA4OJ-1_KW1bju.js.gz +0 -0
- package/dist/_frontend/assets/SandboxSettings-Y3NPODM5-CD9DUFxP.js.br +0 -0
- package/dist/_frontend/assets/SandboxSettings-Y3NPODM5-CD9DUFxP.js.gz +0 -0
- package/dist/_frontend/assets/SchedulesPage-HLHAOIS6-BcDOMjiM.js +0 -1
- package/dist/_frontend/assets/SchedulesPage-HLHAOIS6-BcDOMjiM.js.br +0 -0
- package/dist/_frontend/assets/SchedulesPage-HLHAOIS6-BcDOMjiM.js.gz +0 -0
- package/dist/_frontend/assets/SettingsBuilder-CVPLV5HY-D0lac3y-.js.br +0 -0
- package/dist/_frontend/assets/SettingsBuilder-CVPLV5HY-D0lac3y-.js.gz +0 -0
- package/dist/_frontend/assets/ShellRouteSync-XIPKA3OH-ByKCgD91.js +0 -1
- package/dist/_frontend/assets/ShellRouteSync-XIPKA3OH-ByKCgD91.js.br +0 -0
- package/dist/_frontend/assets/ShellRouteSync-XIPKA3OH-ByKCgD91.js.gz +0 -0
- package/dist/_frontend/assets/SidebarLayout-LHIKWYLB-DgTk6yLL.js +0 -2
- package/dist/_frontend/assets/SidebarLayout-LHIKWYLB-DgTk6yLL.js.br +0 -0
- package/dist/_frontend/assets/SidebarLayout-LHIKWYLB-DgTk6yLL.js.gz +0 -0
- package/dist/_frontend/assets/SkillSettings-6I63TUL7-D4s5Ticy.js +0 -1
- package/dist/_frontend/assets/SkillSettings-6I63TUL7-D4s5Ticy.js.br +0 -0
- package/dist/_frontend/assets/SkillSettings-6I63TUL7-D4s5Ticy.js.gz +0 -0
- package/dist/_frontend/assets/WebSearchSettings-SUBJH2C5-DL7KJKp-.js.br +0 -0
- package/dist/_frontend/assets/WebSearchSettings-SUBJH2C5-DL7KJKp-.js.gz +0 -0
- package/dist/_frontend/assets/WidgetLayout-Q3F3UWN3-BQaDzdhk.js.br +0 -0
- package/dist/_frontend/assets/WidgetLayout-Q3F3UWN3-BQaDzdhk.js.gz +0 -0
- package/dist/_frontend/assets/chunk-BZ2EOR5X-BgN-bqzz.js +0 -1
- package/dist/_frontend/assets/chunk-ICZTJLTU-CSBYGLaq.js.br +0 -0
- package/dist/_frontend/assets/chunk-ICZTJLTU-CSBYGLaq.js.gz +0 -0
- package/dist/_frontend/assets/chunk-NYCSPKHJ-BXKEzm55.js +0 -1
- package/dist/_frontend/assets/chunk-NYCSPKHJ-BXKEzm55.js.br +0 -0
- package/dist/_frontend/assets/chunk-NYCSPKHJ-BXKEzm55.js.gz +0 -0
- package/dist/_frontend/assets/chunk-OB3PAWPO-WTBtRmxH.js.br +0 -0
- package/dist/_frontend/assets/chunk-OB3PAWPO-WTBtRmxH.js.gz +0 -0
- package/dist/_frontend/assets/chunk-OD7JCND5-BlwWGx2k.js +0 -2
- package/dist/_frontend/assets/chunk-OD7JCND5-BlwWGx2k.js.br +0 -0
- package/dist/_frontend/assets/chunk-OD7JCND5-BlwWGx2k.js.gz +0 -0
- package/dist/_frontend/assets/cssMode-BnrOGoXe.js.br +0 -0
- package/dist/_frontend/assets/cssMode-BnrOGoXe.js.gz +0 -0
- package/dist/_frontend/assets/freemarker2-Cu2qkLE9.js.br +0 -0
- package/dist/_frontend/assets/freemarker2-Cu2qkLE9.js.gz +0 -0
- package/dist/_frontend/assets/handlebars-qoIGMfY0.js.br +0 -0
- package/dist/_frontend/assets/handlebars-qoIGMfY0.js.gz +0 -0
- package/dist/_frontend/assets/html-jIKazNfg.js.br +0 -0
- package/dist/_frontend/assets/html-jIKazNfg.js.gz +0 -0
- package/dist/_frontend/assets/htmlMode-M1ZSzZKt.js.br +0 -0
- package/dist/_frontend/assets/htmlMode-M1ZSzZKt.js.gz +0 -0
- package/dist/_frontend/assets/index-4r7-LeFK.js.br +0 -0
- package/dist/_frontend/assets/index-4r7-LeFK.js.gz +0 -0
- package/dist/_frontend/assets/index-BJsGMvc-.js.br +0 -0
- package/dist/_frontend/assets/index-BJsGMvc-.js.gz +0 -0
- package/dist/_frontend/assets/index-YbpMGQU0.js.br +0 -0
- package/dist/_frontend/assets/index-YbpMGQU0.js.gz +0 -0
- package/dist/_frontend/assets/jsonMode-CT04G6VA.js.br +0 -0
- package/dist/_frontend/assets/jsonMode-CT04G6VA.js.gz +0 -0
- package/dist/_frontend/assets/liquid-B2a653EE.js.br +0 -0
- package/dist/_frontend/assets/liquid-B2a653EE.js.gz +0 -0
- package/dist/_frontend/assets/lspLanguageFeatures-mffTaZGc.js.br +0 -0
- package/dist/_frontend/assets/lspLanguageFeatures-mffTaZGc.js.gz +0 -0
- package/dist/_frontend/assets/mdx-DN_e2xx5.js.br +0 -0
- package/dist/_frontend/assets/mdx-DN_e2xx5.js.gz +0 -0
- package/dist/_frontend/assets/python-CMZDwpP1.js.br +0 -0
- package/dist/_frontend/assets/python-CMZDwpP1.js.gz +0 -0
- package/dist/_frontend/assets/razor-CJvSmNFI.js.br +0 -0
- package/dist/_frontend/assets/razor-CJvSmNFI.js.gz +0 -0
- package/dist/_frontend/assets/tsMode-ZJxciJ2G.js.br +0 -0
- package/dist/_frontend/assets/tsMode-ZJxciJ2G.js.gz +0 -0
- package/dist/_frontend/assets/typescript-DS4oUy9B.js.br +0 -0
- package/dist/_frontend/assets/typescript-DS4oUy9B.js.gz +0 -0
- package/dist/_frontend/assets/workers-DPKHJxKo.js.br +0 -0
- package/dist/_frontend/assets/workers-DPKHJxKo.js.gz +0 -0
- package/dist/_frontend/assets/xml-BJmCYv7o.js.br +0 -0
- package/dist/_frontend/assets/xml-BJmCYv7o.js.gz +0 -0
- package/dist/_frontend/assets/yaml-DzYUCVsV.js.br +0 -0
- package/dist/_frontend/assets/yaml-DzYUCVsV.js.gz +0 -0
package/dist/main.js
CHANGED
|
@@ -10040,6 +10040,7 @@ import { OpenAPIHono as OpenAPIHono20, z as z41 } from "@hono/zod-openapi";
|
|
|
10040
10040
|
import { extractErrorLogFields as extractErrorLogFields7 } from "@truefoundry/trueforge-core/core";
|
|
10041
10041
|
import { bodyLimit } from "hono/body-limit";
|
|
10042
10042
|
import { HTTPException as HTTPException18 } from "hono/http-exception";
|
|
10043
|
+
import { randomUUID as randomUUID5 } from "crypto";
|
|
10043
10044
|
|
|
10044
10045
|
// src/apis/agents.ts
|
|
10045
10046
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
@@ -10740,6 +10741,7 @@ function toDaytonaSandboxProviderInput(manifest) {
|
|
|
10740
10741
|
|
|
10741
10742
|
// src/sandbox/providerUtils.ts
|
|
10742
10743
|
var DAYTONA_RPC_TIMEOUT_MS = 5e3;
|
|
10744
|
+
var DAYTONA_REQUEST_TIMEOUT_MS = 6e4;
|
|
10743
10745
|
function isDaytonaAuthError(error) {
|
|
10744
10746
|
return error instanceof DaytonaError && error.statusCode === 401;
|
|
10745
10747
|
}
|
|
@@ -10788,7 +10790,7 @@ function toDaytonaSandboxProvider({
|
|
|
10788
10790
|
}
|
|
10789
10791
|
const { apiKey, ...settings } = toDaytonaSandboxProviderInput(manifest);
|
|
10790
10792
|
return new DaytonaSandboxProvider({
|
|
10791
|
-
client: new Daytona({ apiKey }),
|
|
10793
|
+
client: new Daytona({ apiKey, requestTimeoutMs: DAYTONA_REQUEST_TIMEOUT_MS }),
|
|
10792
10794
|
apiKey,
|
|
10793
10795
|
...settings,
|
|
10794
10796
|
tenantName: tenant_id,
|
|
@@ -11037,9 +11039,9 @@ async function validateAgentSpec({
|
|
|
11037
11039
|
const reasoningEffort = spec.model.params?.reasoning_effort;
|
|
11038
11040
|
if (reasoningEffort !== void 0) {
|
|
11039
11041
|
const efforts = resolved.reasoningEfforts;
|
|
11040
|
-
if (!efforts
|
|
11042
|
+
if (efforts && efforts.length > 0 && !efforts.some((effort) => effort === reasoningEffort)) {
|
|
11041
11043
|
throw new HTTPException3(422, {
|
|
11042
|
-
message:
|
|
11044
|
+
message: `Reasoning effort "${reasoningEffort}" is not supported by model "${spec.model.name}"`
|
|
11043
11045
|
});
|
|
11044
11046
|
}
|
|
11045
11047
|
}
|
|
@@ -11567,9 +11569,131 @@ function readAccessTokenCookie(params) {
|
|
|
11567
11569
|
}
|
|
11568
11570
|
|
|
11569
11571
|
// src/auth/middleware.ts
|
|
11572
|
+
import { timingSafeEqual } from "crypto";
|
|
11570
11573
|
import { HTTPException as HTTPException5 } from "hono/http-exception";
|
|
11571
11574
|
import { jwtVerify } from "jose";
|
|
11572
11575
|
|
|
11576
|
+
// src/logger.ts
|
|
11577
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
11578
|
+
import winston from "winston";
|
|
11579
|
+
var STANDALONE_META_SKIP = /* @__PURE__ */ new Set(["level", "message", "timestamp", "component", "stack", "splat"]);
|
|
11580
|
+
var LOG_CONTEXT_KEYS = ["tenant_id", "request_id", "session_id", "turn_id"];
|
|
11581
|
+
var logContextStorage = new AsyncLocalStorage();
|
|
11582
|
+
function assignDefined(target, fields) {
|
|
11583
|
+
for (const key of LOG_CONTEXT_KEYS) {
|
|
11584
|
+
const value = fields[key];
|
|
11585
|
+
if (value !== void 0) {
|
|
11586
|
+
target[key] = value;
|
|
11587
|
+
}
|
|
11588
|
+
}
|
|
11589
|
+
}
|
|
11590
|
+
function runWithLogContext(fields, fn) {
|
|
11591
|
+
const parent = logContextStorage.getStore();
|
|
11592
|
+
const next = parent === void 0 ? {} : { ...parent };
|
|
11593
|
+
assignDefined(next, fields);
|
|
11594
|
+
return logContextStorage.run(next, fn);
|
|
11595
|
+
}
|
|
11596
|
+
function updateLogContext(fields) {
|
|
11597
|
+
const store = logContextStorage.getStore();
|
|
11598
|
+
if (store === void 0) {
|
|
11599
|
+
return;
|
|
11600
|
+
}
|
|
11601
|
+
assignDefined(store, fields);
|
|
11602
|
+
}
|
|
11603
|
+
function currentLogContext() {
|
|
11604
|
+
return logContextStorage.getStore();
|
|
11605
|
+
}
|
|
11606
|
+
function logContextFormat() {
|
|
11607
|
+
return winston.format((info) => {
|
|
11608
|
+
const store = logContextStorage.getStore();
|
|
11609
|
+
if (store === void 0) {
|
|
11610
|
+
return info;
|
|
11611
|
+
}
|
|
11612
|
+
for (const key of LOG_CONTEXT_KEYS) {
|
|
11613
|
+
if (info[key] !== void 0) {
|
|
11614
|
+
continue;
|
|
11615
|
+
}
|
|
11616
|
+
const value = store[key];
|
|
11617
|
+
if (value !== void 0) {
|
|
11618
|
+
info[key] = value;
|
|
11619
|
+
}
|
|
11620
|
+
}
|
|
11621
|
+
return info;
|
|
11622
|
+
})();
|
|
11623
|
+
}
|
|
11624
|
+
function shouldColorize() {
|
|
11625
|
+
const noColor = process.env["NO_COLOR"];
|
|
11626
|
+
if (noColor !== void 0 && noColor !== "") {
|
|
11627
|
+
return false;
|
|
11628
|
+
}
|
|
11629
|
+
const forceColor = process.env["FORCE_COLOR"];
|
|
11630
|
+
if (forceColor === "0") {
|
|
11631
|
+
return false;
|
|
11632
|
+
}
|
|
11633
|
+
if (forceColor !== void 0 && forceColor !== "") {
|
|
11634
|
+
return true;
|
|
11635
|
+
}
|
|
11636
|
+
return process.stderr.isTTY;
|
|
11637
|
+
}
|
|
11638
|
+
function standaloneMeta(info) {
|
|
11639
|
+
const copied = { ...info };
|
|
11640
|
+
const meta = {};
|
|
11641
|
+
for (const key of Object.keys(copied)) {
|
|
11642
|
+
if (STANDALONE_META_SKIP.has(key)) {
|
|
11643
|
+
continue;
|
|
11644
|
+
}
|
|
11645
|
+
meta[key] = copied[key];
|
|
11646
|
+
}
|
|
11647
|
+
if (Object.keys(meta).length === 0) {
|
|
11648
|
+
return "";
|
|
11649
|
+
}
|
|
11650
|
+
return ` ${JSON.stringify(meta)}`;
|
|
11651
|
+
}
|
|
11652
|
+
function standaloneFormat(color) {
|
|
11653
|
+
const parts = [
|
|
11654
|
+
winston.format.timestamp({ format: "HH:mm:ss" }),
|
|
11655
|
+
winston.format.errors({ stack: true }),
|
|
11656
|
+
logContextFormat()
|
|
11657
|
+
];
|
|
11658
|
+
if (color) {
|
|
11659
|
+
parts.push(winston.format.colorize({ level: true }));
|
|
11660
|
+
}
|
|
11661
|
+
parts.push(
|
|
11662
|
+
winston.format.printf((info) => {
|
|
11663
|
+
const extra = standaloneMeta(info);
|
|
11664
|
+
const stack = typeof info["stack"] === "string" ? `
|
|
11665
|
+
${info["stack"]}` : "";
|
|
11666
|
+
return `${String(info["timestamp"])} ${info.level} ${String(info.message)}${extra}${stack}`;
|
|
11667
|
+
})
|
|
11668
|
+
);
|
|
11669
|
+
return winston.format.combine(...parts);
|
|
11670
|
+
}
|
|
11671
|
+
function jsonFormat() {
|
|
11672
|
+
return winston.format.combine(
|
|
11673
|
+
winston.format.timestamp(),
|
|
11674
|
+
winston.format.errors({ stack: true }),
|
|
11675
|
+
logContextFormat(),
|
|
11676
|
+
winston.format.json()
|
|
11677
|
+
);
|
|
11678
|
+
}
|
|
11679
|
+
function serverLogFormat(options) {
|
|
11680
|
+
if (options.standalone) {
|
|
11681
|
+
return standaloneFormat(shouldColorize());
|
|
11682
|
+
}
|
|
11683
|
+
return jsonFormat();
|
|
11684
|
+
}
|
|
11685
|
+
function createLogger(options) {
|
|
11686
|
+
return winston.createLogger({
|
|
11687
|
+
level: options.level,
|
|
11688
|
+
defaultMeta: { component: options.component },
|
|
11689
|
+
format: serverLogFormat({ standalone: options.standalone }),
|
|
11690
|
+
transports: [new winston.transports.Console()]
|
|
11691
|
+
});
|
|
11692
|
+
}
|
|
11693
|
+
function createServerLogger(options) {
|
|
11694
|
+
return createLogger({ ...options, component: "server" });
|
|
11695
|
+
}
|
|
11696
|
+
|
|
11573
11697
|
// src/auth/emailAllowlist.ts
|
|
11574
11698
|
var EmailNotAllowedError = class extends Error {
|
|
11575
11699
|
constructor() {
|
|
@@ -11816,6 +11940,7 @@ function createAuthMiddleware(authenticator) {
|
|
|
11816
11940
|
throw new HTTPException5(401, { message: "Authentication required" });
|
|
11817
11941
|
}
|
|
11818
11942
|
c.set("request_context", requestContext);
|
|
11943
|
+
updateLogContext({ tenant_id: requestContext.tenant_id });
|
|
11819
11944
|
return next();
|
|
11820
11945
|
};
|
|
11821
11946
|
}
|
|
@@ -11825,6 +11950,7 @@ function createAdminAuthMiddleware(authenticator) {
|
|
|
11825
11950
|
if (requestContext === void 0) {
|
|
11826
11951
|
throw new HTTPException5(401, { message: "Authentication required" });
|
|
11827
11952
|
}
|
|
11953
|
+
updateLogContext({ tenant_id: requestContext.tenant_id });
|
|
11828
11954
|
if (!hasAdminRole(requestContext)) {
|
|
11829
11955
|
throw new HTTPException5(403, { message: "Admin access required" });
|
|
11830
11956
|
}
|
|
@@ -11832,10 +11958,18 @@ function createAdminAuthMiddleware(authenticator) {
|
|
|
11832
11958
|
return next();
|
|
11833
11959
|
};
|
|
11834
11960
|
}
|
|
11961
|
+
function matchesServiceKey({ provided, expected }) {
|
|
11962
|
+
const providedBytes = Buffer.from(provided, "utf8");
|
|
11963
|
+
const expectedBytes = Buffer.from(expected, "utf8");
|
|
11964
|
+
if (providedBytes.length !== expectedBytes.length) {
|
|
11965
|
+
return false;
|
|
11966
|
+
}
|
|
11967
|
+
return timingSafeEqual(providedBytes, expectedBytes);
|
|
11968
|
+
}
|
|
11835
11969
|
function createApiKeyAuthMiddleware(apiKey) {
|
|
11836
11970
|
return async (c, next) => {
|
|
11837
11971
|
const token = readBearerToken(c);
|
|
11838
|
-
if (token === void 0 || token
|
|
11972
|
+
if (token === void 0 || !matchesServiceKey({ provided: token, expected: apiKey })) {
|
|
11839
11973
|
throw new HTTPException5(401, { message: "Invalid service credential" });
|
|
11840
11974
|
}
|
|
11841
11975
|
return next();
|
|
@@ -16942,7 +17076,7 @@ function turnStreamId(tenantId, sessionId, turnId) {
|
|
|
16942
17076
|
return redisKey("agent", "turn", tenantId, sessionId, turnId, "stream");
|
|
16943
17077
|
}
|
|
16944
17078
|
async function drainTurnEvents(input) {
|
|
16945
|
-
const { trackedStream, turnEventStream,
|
|
17079
|
+
const { trackedStream, turnEventStream, maxExecutionTimer, logger: logger2, onEvent } = input;
|
|
16946
17080
|
try {
|
|
16947
17081
|
for await (const event of trackedStream) {
|
|
16948
17082
|
const sequenceNumber = await turnEventStream.put(event, {
|
|
@@ -16952,17 +17086,9 @@ async function drainTurnEvents(input) {
|
|
|
16952
17086
|
}
|
|
16953
17087
|
} catch (error) {
|
|
16954
17088
|
if (error instanceof SessionStoreNotFoundError) {
|
|
16955
|
-
logger2.warn("Turn stream ended after session/turn was removed",
|
|
16956
|
-
sessionId,
|
|
16957
|
-
turnId,
|
|
16958
|
-
...extractErrorLogFields5(error)
|
|
16959
|
-
});
|
|
17089
|
+
logger2.warn("Turn stream ended after session/turn was removed", extractErrorLogFields5(error));
|
|
16960
17090
|
} else {
|
|
16961
|
-
logger2.error("Unexpected error in turn event drain",
|
|
16962
|
-
sessionId,
|
|
16963
|
-
turnId,
|
|
16964
|
-
...extractErrorLogFields5(error)
|
|
16965
|
-
});
|
|
17091
|
+
logger2.error("Unexpected error in turn event drain", extractErrorLogFields5(error));
|
|
16966
17092
|
}
|
|
16967
17093
|
} finally {
|
|
16968
17094
|
clearTimeout(maxExecutionTimer);
|
|
@@ -16973,11 +17099,16 @@ async function beginTurnExecution(params) {
|
|
|
16973
17099
|
assertGatewayMetadataRequestHeaders(requestHeaders);
|
|
16974
17100
|
const sessionId = session.session_id;
|
|
16975
17101
|
const turnId = newId();
|
|
17102
|
+
const tenantId = session.tenant_id;
|
|
17103
|
+
updateLogContext({
|
|
17104
|
+
tenant_id: tenantId,
|
|
17105
|
+
session_id: sessionId,
|
|
17106
|
+
turn_id: turnId
|
|
17107
|
+
});
|
|
16976
17108
|
const sessionAgent = session.record.agent;
|
|
16977
17109
|
const abortController = new AbortController();
|
|
16978
|
-
const tenant_id = session.tenant_id;
|
|
16979
17110
|
const webSearchProvider = await resolveWebSearchProvider({
|
|
16980
|
-
tenant_id,
|
|
17111
|
+
tenant_id: tenantId,
|
|
16981
17112
|
store: deps.webSearchProviderStore
|
|
16982
17113
|
});
|
|
16983
17114
|
const resolver = createTurnResolver({
|
|
@@ -17021,14 +17152,12 @@ async function beginTurnExecution(params) {
|
|
|
17021
17152
|
abortController,
|
|
17022
17153
|
stream: turn.stream()
|
|
17023
17154
|
});
|
|
17024
|
-
const turnEventStream = deps.eventSubscriptions.get(turnStreamId(
|
|
17155
|
+
const turnEventStream = deps.eventSubscriptions.get(turnStreamId(tenantId, sessionId, turn.id));
|
|
17025
17156
|
return {
|
|
17026
17157
|
turn,
|
|
17027
17158
|
drainInput: {
|
|
17028
17159
|
trackedStream,
|
|
17029
17160
|
turnEventStream,
|
|
17030
|
-
sessionId,
|
|
17031
|
-
turnId: turn.id,
|
|
17032
17161
|
maxExecutionTimer,
|
|
17033
17162
|
logger: deps.logger
|
|
17034
17163
|
}
|
|
@@ -17206,8 +17335,6 @@ function createTurnsRouter(deps) {
|
|
|
17206
17335
|
}
|
|
17207
17336
|
deps.logger.error("Sandbox file download failed", {
|
|
17208
17337
|
...extractErrorLogFields5(error),
|
|
17209
|
-
sessionId,
|
|
17210
|
-
turnId,
|
|
17211
17338
|
sandboxId,
|
|
17212
17339
|
path: path7
|
|
17213
17340
|
});
|
|
@@ -17291,6 +17418,7 @@ function createTurnsRouter(deps) {
|
|
|
17291
17418
|
}
|
|
17292
17419
|
referencedAgent = agent;
|
|
17293
17420
|
}
|
|
17421
|
+
const allowInlineResources = session.record.agent.type === "inline";
|
|
17294
17422
|
const turnParams = {
|
|
17295
17423
|
session,
|
|
17296
17424
|
input: body.input,
|
|
@@ -17299,9 +17427,17 @@ function createTurnsRouter(deps) {
|
|
|
17299
17427
|
requestHeaders: c.req.header(),
|
|
17300
17428
|
deps: {
|
|
17301
17429
|
...deps,
|
|
17302
|
-
modelProviderStore: deps.resolveModelProviderStore(
|
|
17303
|
-
|
|
17304
|
-
|
|
17430
|
+
modelProviderStore: deps.resolveModelProviderStore({
|
|
17431
|
+
c,
|
|
17432
|
+
allowInlineResources,
|
|
17433
|
+
...referencedAgent !== void 0 ? { runAsAgent: referencedAgent } : {}
|
|
17434
|
+
}),
|
|
17435
|
+
mcpServerStore: deps.resolveMcpServerStore({
|
|
17436
|
+
c,
|
|
17437
|
+
allowInlineResources,
|
|
17438
|
+
...referencedAgent !== void 0 ? { runAsAgent: referencedAgent } : {}
|
|
17439
|
+
}),
|
|
17440
|
+
skillStore: deps.resolveTurnSkillsStore({ c, allowInlineResources }),
|
|
17305
17441
|
agentStore: deps.resolveAgentStore(c),
|
|
17306
17442
|
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
17307
17443
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
@@ -17310,18 +17446,23 @@ function createTurnsRouter(deps) {
|
|
|
17310
17446
|
};
|
|
17311
17447
|
try {
|
|
17312
17448
|
if (!body.stream) {
|
|
17313
|
-
const
|
|
17314
|
-
return c.json({ data: toWireTurn(
|
|
17449
|
+
const turn2 = await startTurnInProcess(turnParams);
|
|
17450
|
+
return c.json({ data: toWireTurn(turn2.record) }, 200);
|
|
17315
17451
|
}
|
|
17316
|
-
const { drainInput } = await beginTurnExecution(turnParams);
|
|
17452
|
+
const { drainInput, turn } = await beginTurnExecution(turnParams);
|
|
17453
|
+
const disconnectLogContext = {
|
|
17454
|
+
...currentLogContext(),
|
|
17455
|
+
session_id: sessionId,
|
|
17456
|
+
turn_id: turn.id
|
|
17457
|
+
};
|
|
17317
17458
|
let shouldWriteToSSEStream = true;
|
|
17318
17459
|
return streamSSE(c, async (stream) => {
|
|
17319
17460
|
stream.onAbort(() => {
|
|
17320
17461
|
shouldWriteToSSEStream = false;
|
|
17321
|
-
deps.logger.info(
|
|
17322
|
-
|
|
17323
|
-
|
|
17324
|
-
|
|
17462
|
+
deps.logger.info(
|
|
17463
|
+
"Create-turn SSE client disconnected, continuing drain without writing",
|
|
17464
|
+
disconnectLogContext
|
|
17465
|
+
);
|
|
17325
17466
|
});
|
|
17326
17467
|
await drainTurnEvents({
|
|
17327
17468
|
...drainInput,
|
|
@@ -17395,8 +17536,6 @@ function createTurnsRouter(deps) {
|
|
|
17395
17536
|
const timeoutMs = config_default.TURN_SUBSCRIBE_TIMEOUT_MS;
|
|
17396
17537
|
const timeoutHandler = setTimeout(() => {
|
|
17397
17538
|
deps.logger.info("Subscribe turn stream server-side timeout reached, closing stream", {
|
|
17398
|
-
sessionId,
|
|
17399
|
-
turnId,
|
|
17400
17539
|
afterSequenceNumber,
|
|
17401
17540
|
timeoutMs
|
|
17402
17541
|
});
|
|
@@ -17486,12 +17625,12 @@ async function startScheduleRunOnRequest(params) {
|
|
|
17486
17625
|
activeTurns: deps.activeTurns,
|
|
17487
17626
|
eventSubscriptions: deps.eventSubscriptions,
|
|
17488
17627
|
agentStore: deps.agentStore,
|
|
17489
|
-
modelProviderStore: deps.resolveModelProviderStore(c, prepared.agent),
|
|
17490
|
-
mcpServerStore: deps.resolveMcpServerStore(c, prepared.agent),
|
|
17628
|
+
modelProviderStore: deps.resolveModelProviderStore({ c, runAsAgent: prepared.agent }),
|
|
17629
|
+
mcpServerStore: deps.resolveMcpServerStore({ c, runAsAgent: prepared.agent }),
|
|
17491
17630
|
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
17492
17631
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
17493
17632
|
webSearchProviderStore: deps.resolveWebSearchProviderStore(c),
|
|
17494
|
-
skillStore: deps.
|
|
17633
|
+
skillStore: deps.resolveTurnSkillsStore({}),
|
|
17495
17634
|
logger: deps.logger
|
|
17496
17635
|
}
|
|
17497
17636
|
});
|
|
@@ -17564,6 +17703,7 @@ function createScheduleExecutionRouter(deps) {
|
|
|
17564
17703
|
created_by_subject: item.schedule.created_by_subject
|
|
17565
17704
|
})
|
|
17566
17705
|
);
|
|
17706
|
+
updateLogContext({ tenant_id: item.schedule.tenant_id });
|
|
17567
17707
|
await startScheduleRunOnRequest({ c, item, deps });
|
|
17568
17708
|
} catch (error) {
|
|
17569
17709
|
if (error instanceof ScheduleRunNotFoundError || error instanceof ScheduleNotFoundError || error instanceof ScheduleAgentNotFoundError) {
|
|
@@ -18128,6 +18268,7 @@ function cancelSessionTurnPeerHandler(activeTurns) {
|
|
|
18128
18268
|
async function cancelSessionTurn(deps, input) {
|
|
18129
18269
|
const { turnId, reason = CancellationReason2.ClientCancelled } = input;
|
|
18130
18270
|
const sessionId = deps.session.session_id;
|
|
18271
|
+
updateLogContext({ turn_id: turnId });
|
|
18131
18272
|
const turn = await deps.sessionStore.getTurn({
|
|
18132
18273
|
session_id: sessionId,
|
|
18133
18274
|
turn_id: turnId
|
|
@@ -18155,8 +18296,7 @@ async function cancelSessionTurn(deps, input) {
|
|
|
18155
18296
|
}
|
|
18156
18297
|
} catch (error) {
|
|
18157
18298
|
const fields = {
|
|
18158
|
-
|
|
18159
|
-
turnId,
|
|
18299
|
+
turn_id: turnId,
|
|
18160
18300
|
owner,
|
|
18161
18301
|
...extractErrorLogFields6(error)
|
|
18162
18302
|
};
|
|
@@ -18191,6 +18331,20 @@ function isSessionOwner2({
|
|
|
18191
18331
|
}) {
|
|
18192
18332
|
return subject_id === created_by_subject.subject_id;
|
|
18193
18333
|
}
|
|
18334
|
+
function validateInlineSessionSpec(deps, input) {
|
|
18335
|
+
const { c, spec, requestContext } = input;
|
|
18336
|
+
return validateAgentSpec({
|
|
18337
|
+
spec,
|
|
18338
|
+
tenant_id: requestContext.tenant_id,
|
|
18339
|
+
created_by_subject_id: requestContext.subject.id,
|
|
18340
|
+
modelProviderStore: deps.resolveModelProviderStore({ c, allowInlineResources: true }),
|
|
18341
|
+
mcpServerStore: deps.resolveMcpServerStore({ c, allowInlineResources: true }),
|
|
18342
|
+
skillStore: deps.resolveSkillStore({ c, allowInlineResources: true }),
|
|
18343
|
+
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
18344
|
+
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
18345
|
+
webSearchProviderStore: deps.resolveWebSearchProviderStore(c)
|
|
18346
|
+
});
|
|
18347
|
+
}
|
|
18194
18348
|
function createGetOrCreateSessionByExternalIdHandler(deps) {
|
|
18195
18349
|
return async (c) => {
|
|
18196
18350
|
const body = c.req.valid("json");
|
|
@@ -18228,16 +18382,10 @@ function createGetOrCreateSessionByExternalIdHandler(deps) {
|
|
|
18228
18382
|
}
|
|
18229
18383
|
agent = { type: "reference", id: named.id, name: named.name };
|
|
18230
18384
|
} else {
|
|
18231
|
-
await
|
|
18385
|
+
await validateInlineSessionSpec(deps, {
|
|
18386
|
+
c,
|
|
18232
18387
|
spec: body.agent.spec,
|
|
18233
|
-
|
|
18234
|
-
created_by_subject_id: requestContext.subject.id,
|
|
18235
|
-
modelProviderStore: deps.resolveModelProviderStore(c),
|
|
18236
|
-
mcpServerStore: deps.resolveMcpServerStore(c),
|
|
18237
|
-
skillStore: deps.resolveSkillStore(c),
|
|
18238
|
-
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
18239
|
-
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
18240
|
-
webSearchProviderStore: deps.resolveWebSearchProviderStore(c)
|
|
18388
|
+
requestContext
|
|
18241
18389
|
});
|
|
18242
18390
|
agent = { type: "inline", spec: body.agent.spec };
|
|
18243
18391
|
}
|
|
@@ -18272,6 +18420,7 @@ function createSessionsRouter(deps) {
|
|
|
18272
18420
|
const createSessionHandler = async (c) => {
|
|
18273
18421
|
const body = c.req.valid("json");
|
|
18274
18422
|
const sessionId = newId();
|
|
18423
|
+
updateLogContext({ session_id: sessionId });
|
|
18275
18424
|
const requestContext = deps.resolveRequestContext(c);
|
|
18276
18425
|
if (isSessionAgentNameRef(body.agent)) {
|
|
18277
18426
|
const agent = await agentIfAccessible({
|
|
@@ -18296,16 +18445,10 @@ function createSessionsRouter(deps) {
|
|
|
18296
18445
|
});
|
|
18297
18446
|
return c.json({ data: toWireSession(session2.record) }, 201);
|
|
18298
18447
|
}
|
|
18299
|
-
await
|
|
18448
|
+
await validateInlineSessionSpec(deps, {
|
|
18449
|
+
c,
|
|
18300
18450
|
spec: body.agent.spec,
|
|
18301
|
-
|
|
18302
|
-
created_by_subject_id: requestContext.subject.id,
|
|
18303
|
-
modelProviderStore: deps.resolveModelProviderStore(c),
|
|
18304
|
-
mcpServerStore: deps.resolveMcpServerStore(c),
|
|
18305
|
-
skillStore: deps.resolveSkillStore(c),
|
|
18306
|
-
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
18307
|
-
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
18308
|
-
webSearchProviderStore: deps.resolveWebSearchProviderStore(c)
|
|
18451
|
+
requestContext
|
|
18309
18452
|
});
|
|
18310
18453
|
const session = await deps.sessions.create({
|
|
18311
18454
|
tenant_id: requestContext.tenant_id,
|
|
@@ -18380,17 +18523,25 @@ function createSessionsRouter(deps) {
|
|
|
18380
18523
|
return c.json({ error: { message: FORBIDDEN_SESSION_ACCESS2 } }, 403);
|
|
18381
18524
|
}
|
|
18382
18525
|
if (body.agent !== void 0) {
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18391
|
-
|
|
18392
|
-
|
|
18393
|
-
|
|
18526
|
+
if (existing.agent.type === "inline") {
|
|
18527
|
+
await validateInlineSessionSpec(deps, {
|
|
18528
|
+
c,
|
|
18529
|
+
spec: body.agent.spec,
|
|
18530
|
+
requestContext
|
|
18531
|
+
});
|
|
18532
|
+
} else {
|
|
18533
|
+
await validateAgentSpec({
|
|
18534
|
+
spec: body.agent.spec,
|
|
18535
|
+
tenant_id: requestContext.tenant_id,
|
|
18536
|
+
created_by_subject_id: requestContext.subject.id,
|
|
18537
|
+
modelProviderStore: deps.resolveModelProviderStore({ c }),
|
|
18538
|
+
mcpServerStore: deps.resolveMcpServerStore({ c }),
|
|
18539
|
+
skillStore: deps.resolveSkillStore({ c }),
|
|
18540
|
+
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
18541
|
+
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
18542
|
+
webSearchProviderStore: deps.resolveWebSearchProviderStore(c)
|
|
18543
|
+
});
|
|
18544
|
+
}
|
|
18394
18545
|
}
|
|
18395
18546
|
try {
|
|
18396
18547
|
await deps.sessionStore.updateSession({
|
|
@@ -19445,7 +19596,7 @@ function createSettingsRouter(deps) {
|
|
|
19445
19596
|
router.route(
|
|
19446
19597
|
"/model-providers",
|
|
19447
19598
|
createModelProvidersRouter({
|
|
19448
|
-
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19599
|
+
resolveModelProviderStore: (c) => deps.resolveModelProviderStore({ c }),
|
|
19449
19600
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19450
19601
|
withTransaction: deps.withTransaction,
|
|
19451
19602
|
resolveRequestContext: deps.resolveRequestContext
|
|
@@ -19454,7 +19605,7 @@ function createSettingsRouter(deps) {
|
|
|
19454
19605
|
router.route(
|
|
19455
19606
|
"/mcp-servers",
|
|
19456
19607
|
createSettingsMcpServersRouter({
|
|
19457
|
-
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19608
|
+
resolveMcpServerStore: (c) => deps.resolveMcpServerStore({ c }),
|
|
19458
19609
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19459
19610
|
tokenStore: deps.tokenStore,
|
|
19460
19611
|
withTransaction: deps.withTransaction,
|
|
@@ -19528,6 +19679,37 @@ var zodValidationHook = (result) => {
|
|
|
19528
19679
|
|
|
19529
19680
|
// src/app.ts
|
|
19530
19681
|
var BEARER_AUTH_SCHEME = "BearerAuth";
|
|
19682
|
+
var REQUEST_ID_HEADER = "x-request-id";
|
|
19683
|
+
var SAFE_REQUEST_ID = /^[A-Za-z0-9._:-]{1,200}$/;
|
|
19684
|
+
function requestIdFromHeader(raw) {
|
|
19685
|
+
if (raw !== void 0 && SAFE_REQUEST_ID.test(raw)) {
|
|
19686
|
+
return raw;
|
|
19687
|
+
}
|
|
19688
|
+
return randomUUID5();
|
|
19689
|
+
}
|
|
19690
|
+
function createRequestLogContextMiddleware() {
|
|
19691
|
+
return async (c, next) => {
|
|
19692
|
+
const request_id = requestIdFromHeader(c.req.header(REQUEST_ID_HEADER));
|
|
19693
|
+
c.header(REQUEST_ID_HEADER, request_id);
|
|
19694
|
+
await runWithLogContext({ request_id }, async () => {
|
|
19695
|
+
await next();
|
|
19696
|
+
});
|
|
19697
|
+
};
|
|
19698
|
+
}
|
|
19699
|
+
function createSessionPathLogContextMiddleware() {
|
|
19700
|
+
return async (c, next) => {
|
|
19701
|
+
const session_id = c.req.param("session_id");
|
|
19702
|
+
const turn_id = c.req.param("turn_id");
|
|
19703
|
+
const fields = {
|
|
19704
|
+
...session_id === void 0 ? {} : { session_id },
|
|
19705
|
+
...turn_id === void 0 ? {} : { turn_id }
|
|
19706
|
+
};
|
|
19707
|
+
if (session_id !== void 0 || turn_id !== void 0) {
|
|
19708
|
+
updateLogContext(fields);
|
|
19709
|
+
}
|
|
19710
|
+
await next();
|
|
19711
|
+
};
|
|
19712
|
+
}
|
|
19531
19713
|
function withAuth(router, middleware) {
|
|
19532
19714
|
const shell = new OpenAPIHono20();
|
|
19533
19715
|
shell.use("*", middleware);
|
|
@@ -19648,9 +19830,12 @@ function createServerApp(deps) {
|
|
|
19648
19830
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
19649
19831
|
resolveWebSearchProviderStore: deps.resolveWebSearchProviderStore,
|
|
19650
19832
|
activeTurns: deps.activeTurns,
|
|
19651
|
-
|
|
19833
|
+
resolveTurnSkillsStore: deps.resolveTurnSkillsStore
|
|
19652
19834
|
};
|
|
19653
19835
|
const httpMetrics = createHttpMetrics();
|
|
19836
|
+
app.use("*", createRequestLogContextMiddleware());
|
|
19837
|
+
app.use("/api/v1/sessions/:session_id/*", createSessionPathLogContextMiddleware());
|
|
19838
|
+
app.use("/api/v1/sessions/:session_id/turns/:turn_id/*", createSessionPathLogContextMiddleware());
|
|
19654
19839
|
app.use("/api/*", httpMetrics.middleware);
|
|
19655
19840
|
if (config_default.ACCESS_LOGS) {
|
|
19656
19841
|
app.use("*", createAccessLogMiddleware(deps.logger));
|
|
@@ -19686,7 +19871,7 @@ function createServerApp(deps) {
|
|
|
19686
19871
|
"/api/v1/models",
|
|
19687
19872
|
withAuth(
|
|
19688
19873
|
createModelsRouter({
|
|
19689
|
-
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19874
|
+
resolveModelProviderStore: (c) => deps.resolveModelProviderStore({ c }),
|
|
19690
19875
|
withTransaction: deps.withTransaction,
|
|
19691
19876
|
resolveRequestContext
|
|
19692
19877
|
}),
|
|
@@ -19710,7 +19895,7 @@ function createServerApp(deps) {
|
|
|
19710
19895
|
"/api/v1/mcp-servers/oauth",
|
|
19711
19896
|
createMcpOAuthRouter({
|
|
19712
19897
|
tokenStore: deps.tokenStore,
|
|
19713
|
-
mcpServerStore: deps.resolveMcpServerStore(),
|
|
19898
|
+
mcpServerStore: deps.resolveMcpServerStore({}),
|
|
19714
19899
|
logger: deps.logger,
|
|
19715
19900
|
resolveSession: (c) => tryAuthenticate({ authenticator: deps.authenticator, context: c })
|
|
19716
19901
|
})
|
|
@@ -19719,7 +19904,7 @@ function createServerApp(deps) {
|
|
|
19719
19904
|
"/api/v1/mcp-servers",
|
|
19720
19905
|
withAuth(
|
|
19721
19906
|
createMcpServersRouter({
|
|
19722
|
-
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19907
|
+
resolveMcpServerStore: (c) => deps.resolveMcpServerStore({ c }),
|
|
19723
19908
|
tokenStore: deps.tokenStore,
|
|
19724
19909
|
withTransaction: deps.withTransaction,
|
|
19725
19910
|
logger: deps.logger,
|
|
@@ -19732,7 +19917,7 @@ function createServerApp(deps) {
|
|
|
19732
19917
|
"/api/v1/skills",
|
|
19733
19918
|
withAuth(
|
|
19734
19919
|
createAvailableSkillsRouter({
|
|
19735
|
-
resolveSkillStore: deps.resolveSkillStore,
|
|
19920
|
+
resolveSkillStore: (c) => deps.resolveSkillStore({ c }),
|
|
19736
19921
|
withTransaction: deps.withTransaction,
|
|
19737
19922
|
resolveRequestContext
|
|
19738
19923
|
}),
|
|
@@ -19744,9 +19929,9 @@ function createServerApp(deps) {
|
|
|
19744
19929
|
withAuth(
|
|
19745
19930
|
createAgentsRouter({
|
|
19746
19931
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19747
|
-
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19748
|
-
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19749
|
-
resolveSkillStore: deps.resolveSkillStore,
|
|
19932
|
+
resolveModelProviderStore: (c) => deps.resolveModelProviderStore({ c }),
|
|
19933
|
+
resolveMcpServerStore: (c) => deps.resolveMcpServerStore({ c }),
|
|
19934
|
+
resolveSkillStore: (c) => deps.resolveSkillStore({ c }),
|
|
19750
19935
|
resolveSandboxProviderStore: deps.resolveSandboxProviderStore,
|
|
19751
19936
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
19752
19937
|
resolveWebSearchProviderStore: deps.resolveWebSearchProviderStore,
|
|
@@ -19805,7 +19990,7 @@ function createServerApp(deps) {
|
|
|
19805
19990
|
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19806
19991
|
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19807
19992
|
tokenStore: deps.tokenStore,
|
|
19808
|
-
resolveSkillStore: deps.resolveSkillStore,
|
|
19993
|
+
resolveSkillStore: (c) => deps.resolveSkillStore({ c }),
|
|
19809
19994
|
resolveSandboxProviderStore: deps.resolveSandboxProviderStore,
|
|
19810
19995
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
19811
19996
|
resolveWebSearchProviderStore: deps.resolveWebSearchProviderStore,
|
|
@@ -19892,7 +20077,7 @@ function createServerApp(deps) {
|
|
|
19892
20077
|
activeTurns: deps.activeTurns,
|
|
19893
20078
|
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19894
20079
|
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19895
|
-
|
|
20080
|
+
resolveTurnSkillsStore: deps.resolveTurnSkillsStore,
|
|
19896
20081
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19897
20082
|
eventSubscriptions: deps.eventSubscriptions,
|
|
19898
20083
|
resolveSandboxProviderStore: deps.resolveSandboxProviderStore,
|
|
@@ -20097,7 +20282,7 @@ function loadYamlAtPath(filePath, schema) {
|
|
|
20097
20282
|
}
|
|
20098
20283
|
|
|
20099
20284
|
// src/catalog/mcpCatalog.gen.ts
|
|
20100
|
-
var shippedMcpCatalogYaml = "# Shipped MCP catalog: server presets offered by\n# GET /api/v1/catalog/mcp-servers for the UI to copy into\n# PUT /api/v1/settings/mcp-servers bodies. Discovery-only \u2014 never executed against.\nmcp_servers:\n - type: remote\n name: linear\n logo: https://assets.production.truefoundry.com/linear.svg\n url: https://mcp.linear.app/mcp\n description: Search, read, and create Linear issues.\n auth:\n type: dcr\n - type: remote\n name: notion\n logo: https://assets.production.truefoundry.com/notion.svg\n url: https://mcp.notion.com/mcp\n description: Search pages, read content, query databases, create pages.\n auth:\n type: dcr\n - type: remote\n name: sentry\n logo: https://assets.production.truefoundry.com/sentry.svg\n url: https://mcp.sentry.dev/mcp\n description: Search errors, read stack traces, and check releases.\n auth:\n type: dcr\n - type: remote\n name: deepwiki\n logo: https://assets.production.truefoundry.com/deepwiki.png\n url: https://mcp.deepwiki.com/mcp\n description: Read documentation and ask questions about any public GitHub repository.\n - type: remote\n name: exa\n logo: https://assets.production.truefoundry.com/exa.svg\n url: https://mcp.exa.ai/mcp\n description: Search the web, fetch page contents, and find similar pages.\n - type: remote\n name: parallel-web\n logo: https://assets.production.truefoundry.com/parallel-web.svg\n url: https://search.parallel.ai/mcp\n description: Search the web and get ranked results with extracted content.\n - type: remote\n name: github\n logo: https://assets.production.truefoundry.com/github.svg\n url: https://api.githubcopilot.com/mcp/\n description: Work with issues, pull requests, repository files, and CI status.\n auth:\n type: header\n headers:\n Authorization: Bearer YOUR_GITHUB_PAT\n - type: remote\n name: tavily\n logo: https://assets.production.truefoundry.com/tavily.svg\n url: https://mcp.tavily.com/mcp\n description: Search the web, extract page content, and crawl sites.\n auth:\n type: header\n headers:\n Authorization: Bearer YOUR_TAVILY_API_KEY\n - type: remote\n name: bright-data\n logo: https://assets.production.truefoundry.com/bright-data.png\n url: https://mcp.brightdata.com/mcp\n description: Search the web and scrape pages, including sites behind bot protection.\n auth:\n type: header\n headers:\n Authorization: Bearer YOUR_BRIGHT_DATA_API_TOKEN\n - type: remote\n name: supabase\n logo: https://assets.production.truefoundry.com/supabase.svg\n url: https://mcp.supabase.com/mcp\n description: Run SQL queries, manage tables, and inspect Supabase projects.\n auth:\n type: dcr\n - type: remote\n name: stripe\n logo: https://assets.production.truefoundry.com/stripe.svg\n url: https://mcp.stripe.com\n description: Create and manage customers, payments, invoices, and subscriptions.\n auth:\n type: dcr\n - type: remote\n name: confluence\n logo: https://assets.production.truefoundry.com/confluence.svg\n url: https://mcp.atlassian.com/v1/mcp\n description: Search spaces, read pages, and create or update content.\n auth:\n type: dcr\n - type: remote\n name: jira\n logo: https://assets.production.truefoundry.com/jira.png\n url: https://mcp.atlassian.com/v1/mcp\n description: Search, read, create, and update Jira issues.\n auth:\n type: dcr\n - type: remote\n name: posthog\n logo: https://assets.production.truefoundry.com/posthog.svg\n url: https://mcp.posthog.com/mcp\n description: Query product analytics, run SQL, and manage feature flags.\n auth:\n type: dcr\n";
|
|
20285
|
+
var shippedMcpCatalogYaml = "# Shipped MCP catalog: server presets offered by\n# GET /api/v1/catalog/mcp-servers for the UI to copy into\n# PUT /api/v1/settings/mcp-servers bodies. Discovery-only \u2014 never executed against.\nmcp_servers:\n - type: remote\n name: linear\n logo: https://assets.production.truefoundry.com/linear.svg\n url: https://mcp.linear.app/mcp\n description: Search, read, and create Linear issues.\n auth:\n type: dcr\n - type: remote\n name: notion\n logo: https://assets.production.truefoundry.com/notion.svg\n url: https://mcp.notion.com/mcp\n description: Search pages, read content, query databases, create pages.\n auth:\n type: dcr\n - type: remote\n name: sentry\n logo: https://assets.production.truefoundry.com/sentry.svg\n url: https://mcp.sentry.dev/mcp\n description: Search errors, read stack traces, and check releases.\n auth:\n type: dcr\n - type: remote\n name: deepwiki\n logo: https://assets.production.truefoundry.com/deepwiki.png\n url: https://mcp.deepwiki.com/mcp\n description: Read documentation and ask questions about any public GitHub repository.\n - type: remote\n name: exa\n logo: https://assets.production.truefoundry.com/exa.svg\n url: https://mcp.exa.ai/mcp\n description: Search the web, fetch page contents, and find similar pages.\n - type: remote\n name: parallel-web\n logo: https://assets.production.truefoundry.com/parallel-web.svg\n url: https://search.parallel.ai/mcp\n description: Search the web and get ranked results with extracted content.\n - type: remote\n name: github\n logo: https://assets.production.truefoundry.com/github.svg\n url: https://api.githubcopilot.com/mcp/\n description: Work with issues, pull requests, repository files, and CI status.\n auth:\n type: header\n headers:\n Authorization: Bearer YOUR_GITHUB_PAT\n - type: remote\n name: tavily\n logo: https://assets.production.truefoundry.com/tavily.svg\n url: https://mcp.tavily.com/mcp\n description: Search the web, extract page content, and crawl sites.\n auth:\n type: header\n headers:\n Authorization: Bearer YOUR_TAVILY_API_KEY\n - type: remote\n name: bright-data\n logo: https://assets.production.truefoundry.com/bright-data.png\n url: https://mcp.brightdata.com/mcp\n description: Search the web and scrape pages, including sites behind bot protection.\n auth:\n type: header\n headers:\n Authorization: Bearer YOUR_BRIGHT_DATA_API_TOKEN\n - type: remote\n name: supabase\n logo: https://assets.production.truefoundry.com/supabase.svg\n url: https://mcp.supabase.com/mcp\n description: Run SQL queries, manage tables, and inspect Supabase projects.\n auth:\n type: dcr\n - type: remote\n name: stripe\n logo: https://assets.production.truefoundry.com/stripe.svg\n url: https://mcp.stripe.com\n description: Create and manage customers, payments, invoices, and subscriptions.\n auth:\n type: dcr\n - type: remote\n name: confluence\n logo: https://assets.production.truefoundry.com/confluence.svg\n url: https://mcp.atlassian.com/v1/mcp\n description: Search spaces, read pages, and create or update content.\n auth:\n type: dcr\n - type: remote\n name: jira\n logo: https://assets.production.truefoundry.com/jira.png\n url: https://mcp.atlassian.com/v1/mcp\n description: Search, read, create, and update Jira issues.\n auth:\n type: dcr\n - type: remote\n name: posthog\n logo: https://assets.production.truefoundry.com/posthog.svg\n url: https://mcp.posthog.com/mcp\n description: Query product analytics, run SQL, and manage feature flags.\n auth:\n type: dcr\n - type: remote\n logo: https://assets.production.truefoundry.com/you.svg\n name: you\n url: https://api.you.com/mcp?profile=free\n description: Search the web, fetch page content, and run multi-step research using You.com. Keyless free profile; pass a You.com API key at https://api.you.com/mcp for full-rate access.\n";
|
|
20101
20286
|
|
|
20102
20287
|
// src/catalog/McpCatalog.ts
|
|
20103
20288
|
var McpCatalog = class _McpCatalog {
|
|
@@ -20123,7 +20308,7 @@ var McpCatalog = class _McpCatalog {
|
|
|
20123
20308
|
init_config();
|
|
20124
20309
|
|
|
20125
20310
|
// src/catalog/modelCatalog.gen.ts
|
|
20126
|
-
var shippedModelCatalogYaml = "# Shipped model catalog: provider/model presets offered by\n# GET /api/v1/catalog/model-providers for the UI to copy into\n# PUT /api/v1/settings/model-providers bodies. Discovery-only \u2014 never executed against.\nproviders:\n - type: openai\n logo: https://assets.production.truefoundry.com/openai.svg\n models:\n - model_id: gpt-5.4-mini\n name: gpt-5-4-mini\n properties:\n context_length: 400000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - model_id: gpt-5.5\n name: gpt-5-5\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - model_id: gpt-5.6-luna\n name: gpt-5-6-luna\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-5.6-sol\n name: gpt-5-6-sol\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-5.6-terra\n name: gpt-5-6-terra\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-6-astra\n name: gpt-6-astra\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-6-luna\n name: gpt-6-luna\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-6-sol\n name: gpt-6-sol\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - type: anthropic\n logo: https://assets.production.truefoundry.com/anthropic.svg\n models:\n - model_id: claude-fable-5\n name: claude-fable-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-fable-5-1\n name: claude-fable-5-1\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-haiku-4-5\n name: claude-haiku-4-5\n properties:\n context_length: 200000\n max_output_tokens: 64000\n - model_id: claude-opus-4-8\n name: claude-opus-4-8\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-opus-5\n name: claude-opus-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-opus-5-5\n name: claude-opus-5-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-sonnet-4-6\n name: claude-sonnet-4-6\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - max\n - model_id: claude-sonnet-5\n name: claude-sonnet-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - type: google-gemini\n logo: https://assets.production.truefoundry.com/google-gemini.svg\n models:\n - model_id: gemini-3.1-pro-preview\n name: gemini-3-1-pro-preview\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-3.6-flash\n name: gemini-3-6-flash\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - minimal\n - low\n - medium\n - high\n - model_id: gemini-3.7-flash\n name: gemini-3-7-flash\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-3.8-flash\n name: gemini-3-8-flash\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - type: fireworks\n logo: https://assets.production.truefoundry.com/fireworks.svg\n models:\n - model_id: accounts/fireworks/models/deepseek-v4-pro\n name: deepseek-v4-pro\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/deepseek-v4p1-flash\n name: deepseek-v4p1-flash\n properties:\n context_length: 1000000\n - model_id: accounts/fireworks/models/glm-5p2\n name: glm-5p2\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/glm-5p3\n name: glm-5p3\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: accounts/fireworks/models/glm-5p3-flash\n name: glm-5p3-flash\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: accounts/fireworks/models/kimi-k2p7-code\n name: kimi-k2p7-code\n properties:\n context_length: 262144\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/kimi-k3\n name: kimi-k3\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/minimax-m3\n name: minimax-m3\n properties:\n context_length: 512000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - type: zai\n logo: https://assets.production.truefoundry.com/zai.svg\n models:\n - model_id: glm-5-turbo\n name: glm-5-turbo\n properties:\n context_length: 200000\n max_output_tokens: 131072\n - model_id: glm-5.1\n name: glm-5-1\n properties:\n context_length: 200000\n max_output_tokens: 131072\n - model_id: glm-5.2\n name: glm-5-2\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: glm-5.3\n name: glm-5-3\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: glm-5.3-flash\n name: glm-5-3-flash\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: glm-5.3-prime\n name: glm-5-3-prime\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - low\n - high\n - max\n - type: moonshot\n logo: https://assets.production.truefoundry.com/moonshot.png\n models:\n - model_id: kimi-k2.7-code\n name: kimi-k2-7-code\n properties:\n context_length: 262144\n - model_id: kimi-k3\n name: kimi-k3\n properties:\n context_length: 1048576\n reasoning_efforts:\n - low\n - high\n - max\n - type: alibaba\n logo: https://assets.production.truefoundry.com/alibaba.png\n models:\n - model_id: qwen3.7-flash\n name: qwen3-7-flash\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: qwen3.7-max\n name: qwen3-7-max\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: qwen3.7-plus\n name: qwen3-7-plus\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: qwen3.8-flash\n name: qwen3-8-flash\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - low\n - medium\n - xhigh\n - model_id: qwen3.8-max\n name: qwen3-8-max\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - max\n - type: together\n logo: https://assets.production.truefoundry.com/togetherai.svg\n models:\n - model_id: deepseek-ai/DeepSeek-V4-Pro\n name: deepseek-v4-pro\n properties:\n context_length: 512000\n reasoning_efforts:\n - high\n - max\n - model_id: deepseek-ai/DeepSeek-V4.1-Flash\n name: deepseek-v4-1-flash\n properties:\n context_length: 1000000\n - model_id: MiniMaxAI/MiniMax-M3\n name: minimax-m3\n properties:\n context_length: 524288\n - model_id: moonshotai/Kimi-K2.7-Code\n name: kimi-k2-7-code\n properties:\n context_length: 262144\n - model_id: moonshotai/Kimi-K3\n name: kimi-k3\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - max\n - model_id: Qwen/Qwen3.7-Max\n name: qwen3-7-max\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: Qwen/Qwen3.7-Plus\n name: qwen3-7-plus\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: Qwen/Qwen3.8-2.4T-A95B\n name: qwen3-8-2-4t-a95b\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - xhigh\n - model_id: Qwen/Qwen3.8-Flash\n name: qwen3-8-flash\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - low\n - medium\n - xhigh\n - model_id: zai-org/GLM-5.2\n name: glm-5-2\n properties:\n context_length: 512000\n reasoning_efforts:\n - high\n - max\n - model_id: zai-org/GLM-5.3\n name: glm-5-3\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: zai-org/GLM-5.3-Flash\n name: glm-5-3-flash\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n";
|
|
20311
|
+
var shippedModelCatalogYaml = "# Shipped model catalog: provider/model presets offered by\n# GET /api/v1/catalog/model-providers for the UI to copy into\n# PUT /api/v1/settings/model-providers bodies. Discovery-only \u2014 never executed against.\nproviders:\n - type: openai\n logo: https://assets.production.truefoundry.com/openai.svg\n models:\n - model_id: gpt-5.4\n name: gpt-5-4\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - model_id: gpt-5.4-mini\n name: gpt-5-4-mini\n properties:\n context_length: 400000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - model_id: gpt-5.4-nano\n name: gpt-5-4-nano\n properties:\n context_length: 400000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - model_id: gpt-5.4-pro\n name: gpt-5-4-pro\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - medium\n - high\n - xhigh\n - model_id: gpt-5.5\n name: gpt-5-5\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - model_id: gpt-5.5-pro\n name: gpt-5-5-pro\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - medium\n - high\n - xhigh\n - model_id: gpt-5.6-luna\n name: gpt-5-6-luna\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-5.6-sol\n name: gpt-5-6-sol\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-5.6-terra\n name: gpt-5-6-terra\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-6-astra\n name: gpt-6-astra\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-6-luna\n name: gpt-6-luna\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-6-sol\n name: gpt-6-sol\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: gpt-6.1-sol\n name: gpt-6-1-sol\n properties:\n context_length: 1050000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - type: anthropic\n logo: https://assets.production.truefoundry.com/anthropic.svg\n models:\n - model_id: claude-fable-5\n name: claude-fable-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-fable-5-1\n name: claude-fable-5-1\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-haiku-4-5\n name: claude-haiku-4-5\n properties:\n context_length: 200000\n max_output_tokens: 64000\n - model_id: claude-haiku-5-5\n name: claude-haiku-5-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-opus-4-8\n name: claude-opus-4-8\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-opus-5\n name: claude-opus-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-opus-5-5\n name: claude-opus-5-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-sonnet-4-6\n name: claude-sonnet-4-6\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - max\n - model_id: claude-sonnet-5\n name: claude-sonnet-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: claude-sonnet-5-5\n name: claude-sonnet-5-5\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - type: google-gemini\n logo: https://assets.production.truefoundry.com/google-gemini.svg\n models:\n - model_id: gemini-3.1-flash-lite\n name: gemini-3-1-flash-lite\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - minimal\n - low\n - medium\n - high\n - model_id: gemini-3.1-pro-preview\n name: gemini-3-1-pro-preview\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-3.5-flash\n name: gemini-3-5-flash\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n - model_id: gemini-3.5-flash-lite\n name: gemini-3-5-flash-lite\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - minimal\n - low\n - medium\n - high\n - model_id: gemini-3.6-flash\n name: gemini-3-6-flash\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - minimal\n - low\n - medium\n - high\n - model_id: gemini-3.7-flash\n name: gemini-3-7-flash\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-3.8-flash\n name: gemini-3-8-flash\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - type: fireworks\n logo: https://assets.production.truefoundry.com/fireworks.svg\n models:\n - model_id: accounts/fireworks/models/deepseek-v4-pro\n name: deepseek-v4-pro\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/deepseek-v4p1-flash\n name: deepseek-v4p1-flash\n properties:\n context_length: 1000000\n - model_id: accounts/fireworks/models/ember-1\n name: ember-1\n properties:\n context_length: 1048576\n max_output_tokens: 943718\n - model_id: accounts/fireworks/models/glm-5p2\n name: glm-5p2\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/glm-5p3\n name: glm-5p3\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: accounts/fireworks/models/glm-5p3-flash\n name: glm-5p3-flash\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: accounts/fireworks/models/kimi-k2p7-code\n name: kimi-k2p7-code\n properties:\n context_length: 262144\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/kimi-k3\n name: kimi-k3\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: accounts/fireworks/models/minimax-m3\n name: minimax-m3\n properties:\n context_length: 512000\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - xhigh\n - max\n - type: zai\n logo: https://assets.production.truefoundry.com/zai.svg\n models:\n - model_id: glm-5-turbo\n name: glm-5-turbo\n properties:\n context_length: 200000\n max_output_tokens: 131072\n - model_id: glm-5.1\n name: glm-5-1\n properties:\n context_length: 200000\n max_output_tokens: 131072\n - model_id: glm-5.2\n name: glm-5-2\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: glm-5.3\n name: glm-5-3\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: glm-5.3-flash\n name: glm-5-3-flash\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: glm-5.3-flashx\n name: glm-5-3-flashx\n properties:\n context_length: 1048576\n max_output_tokens: 131072\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: glm-5.3-prime\n name: glm-5-3-prime\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: glm-5v-turbo\n name: glm-5v-turbo\n properties:\n context_length: 202752\n max_output_tokens: 131072\n - type: moonshot\n logo: https://assets.production.truefoundry.com/moonshot.png\n models:\n - model_id: kimi-k2.7-code\n name: kimi-k2-7-code\n properties:\n context_length: 262144\n - model_id: kimi-k3\n name: kimi-k3\n properties:\n context_length: 1048576\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: kimi-k3-fast\n name: kimi-k3-fast\n properties:\n context_length: 1048576\n - type: alibaba\n logo: https://assets.production.truefoundry.com/alibaba.png\n models:\n - model_id: qwen3.7-flash\n name: qwen3-7-flash\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: qwen3.7-max\n name: qwen3-7-max\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: qwen3.7-plus\n name: qwen3-7-plus\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: qwen3.8-flash\n name: qwen3-8-flash\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - low\n - medium\n - xhigh\n - model_id: qwen3.8-max\n name: qwen3-8-max\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: qwen3.8-omni-flash\n name: qwen3-8-omni-flash\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n - type: together\n logo: https://assets.production.truefoundry.com/togetherai.svg\n models:\n - model_id: deepseek-ai/DeepSeek-V4-Flash-0731\n name: deepseek-v4-flash-0731\n properties:\n context_length: 1000000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: deepseek-ai/DeepSeek-V4-Pro\n name: deepseek-v4-pro\n properties:\n context_length: 512000\n reasoning_efforts:\n - high\n - max\n - model_id: deepseek-ai/DeepSeek-V4-Pro-0813\n name: deepseek-v4-pro-0813\n properties:\n context_length: 1048576\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: deepseek-ai/DeepSeek-V4.1-Flash\n name: deepseek-v4-1-flash\n properties:\n context_length: 1000000\n - model_id: MiniMaxAI/MiniMax-M3\n name: minimax-m3\n properties:\n context_length: 524288\n - model_id: moonshotai/Kimi-K2.7-Code\n name: kimi-k2-7-code\n properties:\n context_length: 262144\n - model_id: moonshotai/Kimi-K3\n name: kimi-k3\n properties:\n context_length: 1048576\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - max\n - model_id: Qwen/Qwen3.7-Max\n name: qwen3-7-max\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: Qwen/Qwen3.7-Plus\n name: qwen3-7-plus\n properties:\n context_length: 1000000\n max_output_tokens: 65536\n reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\n - xhigh\n - model_id: Qwen/Qwen3.8-2.4T-A95B\n name: qwen3-8-2-4t-a95b\n properties:\n context_length: 1000000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - xhigh\n - model_id: Qwen/Qwen3.8-Flash\n name: qwen3-8-flash\n properties:\n context_length: 1000000\n max_output_tokens: 131072\n reasoning_efforts:\n - low\n - medium\n - xhigh\n - model_id: zai-org/GLM-5.2\n name: glm-5-2\n properties:\n context_length: 1048576\n max_output_tokens: 131072\n reasoning_efforts:\n - high\n - max\n - model_id: zai-org/GLM-5.3\n name: glm-5-3\n properties:\n context_length: 1048575\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: zai-org/GLM-5.3-Flash\n name: glm-5-3-flash\n properties:\n context_length: 1048576\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n";
|
|
20127
20312
|
|
|
20128
20313
|
// src/catalog/ModelCatalog.ts
|
|
20129
20314
|
var ModelCatalog = class _ModelCatalog {
|
|
@@ -20687,80 +20872,6 @@ function mountFrontend(app, options) {
|
|
|
20687
20872
|
return true;
|
|
20688
20873
|
}
|
|
20689
20874
|
|
|
20690
|
-
// src/logger.ts
|
|
20691
|
-
import winston from "winston";
|
|
20692
|
-
var STANDALONE_META_SKIP = /* @__PURE__ */ new Set(["level", "message", "timestamp", "version", "component", "stack", "splat"]);
|
|
20693
|
-
function shouldColorize() {
|
|
20694
|
-
const noColor = process.env["NO_COLOR"];
|
|
20695
|
-
if (noColor !== void 0 && noColor !== "") {
|
|
20696
|
-
return false;
|
|
20697
|
-
}
|
|
20698
|
-
const forceColor = process.env["FORCE_COLOR"];
|
|
20699
|
-
if (forceColor === "0") {
|
|
20700
|
-
return false;
|
|
20701
|
-
}
|
|
20702
|
-
if (forceColor !== void 0 && forceColor !== "") {
|
|
20703
|
-
return true;
|
|
20704
|
-
}
|
|
20705
|
-
return process.stderr.isTTY;
|
|
20706
|
-
}
|
|
20707
|
-
function standaloneMeta(info) {
|
|
20708
|
-
const copied = { ...info };
|
|
20709
|
-
const meta = {};
|
|
20710
|
-
for (const key of Object.keys(copied)) {
|
|
20711
|
-
if (STANDALONE_META_SKIP.has(key)) {
|
|
20712
|
-
continue;
|
|
20713
|
-
}
|
|
20714
|
-
meta[key] = copied[key];
|
|
20715
|
-
}
|
|
20716
|
-
if (Object.keys(meta).length === 0) {
|
|
20717
|
-
return "";
|
|
20718
|
-
}
|
|
20719
|
-
return ` ${JSON.stringify(meta)}`;
|
|
20720
|
-
}
|
|
20721
|
-
function standaloneFormat(color) {
|
|
20722
|
-
const parts = [
|
|
20723
|
-
winston.format.timestamp({ format: "HH:mm:ss" }),
|
|
20724
|
-
winston.format.errors({ stack: true })
|
|
20725
|
-
];
|
|
20726
|
-
if (color) {
|
|
20727
|
-
parts.push(winston.format.colorize({ level: true }));
|
|
20728
|
-
}
|
|
20729
|
-
parts.push(
|
|
20730
|
-
winston.format.printf((info) => {
|
|
20731
|
-
const extra = standaloneMeta(info);
|
|
20732
|
-
const stack = typeof info["stack"] === "string" ? `
|
|
20733
|
-
${info["stack"]}` : "";
|
|
20734
|
-
return `${String(info["timestamp"])} ${info.level} ${String(info.message)}${extra}${stack}`;
|
|
20735
|
-
})
|
|
20736
|
-
);
|
|
20737
|
-
return winston.format.combine(...parts);
|
|
20738
|
-
}
|
|
20739
|
-
function jsonFormat() {
|
|
20740
|
-
return winston.format.combine(
|
|
20741
|
-
winston.format.timestamp(),
|
|
20742
|
-
winston.format.errors({ stack: true }),
|
|
20743
|
-
winston.format.json()
|
|
20744
|
-
);
|
|
20745
|
-
}
|
|
20746
|
-
function serverLogFormat(options) {
|
|
20747
|
-
if (options.standalone) {
|
|
20748
|
-
return standaloneFormat(shouldColorize());
|
|
20749
|
-
}
|
|
20750
|
-
return jsonFormat();
|
|
20751
|
-
}
|
|
20752
|
-
function createLogger(options) {
|
|
20753
|
-
return winston.createLogger({
|
|
20754
|
-
level: options.level,
|
|
20755
|
-
defaultMeta: { version: options.version, component: options.component },
|
|
20756
|
-
format: serverLogFormat({ standalone: options.standalone }),
|
|
20757
|
-
transports: [new winston.transports.Console()]
|
|
20758
|
-
});
|
|
20759
|
-
}
|
|
20760
|
-
function createServerLogger(options) {
|
|
20761
|
-
return createLogger({ ...options, component: "server" });
|
|
20762
|
-
}
|
|
20763
|
-
|
|
20764
20875
|
// src/runtime/activeTurns.ts
|
|
20765
20876
|
import "@truefoundry/trueforge-core/agent-session";
|
|
20766
20877
|
function activeTurnKey(sessionId, turnId) {
|
|
@@ -21114,6 +21225,17 @@ init_skill();
|
|
|
21114
21225
|
var X_TFG_MCP = "x-tfg-mcp";
|
|
21115
21226
|
var X_TFG_SKILLS = "x-tfg-skills";
|
|
21116
21227
|
var X_TFG_MODELS = "x-tfg-models";
|
|
21228
|
+
function assertInlineResourceHeadersAllowed(input) {
|
|
21229
|
+
const labeled = input.headerNames.join("/");
|
|
21230
|
+
if (!input.isTrueFoundryMode) {
|
|
21231
|
+
throw new HTTPException21(400, { message: `${labeled} requires TrueFoundry mode` });
|
|
21232
|
+
}
|
|
21233
|
+
if (!input.allowInlineResources) {
|
|
21234
|
+
throw new HTTPException21(400, {
|
|
21235
|
+
message: `${labeled} is only allowed when creating or updating an inline session, or on a turn for one`
|
|
21236
|
+
});
|
|
21237
|
+
}
|
|
21238
|
+
}
|
|
21117
21239
|
function parseInlineMcpServers(raw) {
|
|
21118
21240
|
return parseByName({
|
|
21119
21241
|
raw,
|
|
@@ -21135,7 +21257,7 @@ function parseInlineSkills(raw) {
|
|
|
21135
21257
|
raw,
|
|
21136
21258
|
header: X_TFG_SKILLS,
|
|
21137
21259
|
parseEntry: (name, definition) => {
|
|
21138
|
-
const parsed =
|
|
21260
|
+
const parsed = GitSkillSchema.safeParse({ ...definition, type: "git", name });
|
|
21139
21261
|
return parsed.success ? { ok: true, manifest: parsed.data } : { ok: false, reason: "is not a valid skill definition" };
|
|
21140
21262
|
}
|
|
21141
21263
|
});
|
|
@@ -21183,74 +21305,67 @@ function isPlainObject(value) {
|
|
|
21183
21305
|
init_gitSkillMounts();
|
|
21184
21306
|
import { HTTPException as HTTPException23 } from "hono/http-exception";
|
|
21185
21307
|
var InlineSkillStore = class {
|
|
21186
|
-
#inner;
|
|
21187
21308
|
#inline;
|
|
21188
21309
|
constructor(input) {
|
|
21189
|
-
this.#inner = input.inner;
|
|
21190
21310
|
this.#inline = input.inline;
|
|
21191
21311
|
}
|
|
21192
|
-
|
|
21312
|
+
listSkills(input, _transaction) {
|
|
21313
|
+
void _transaction;
|
|
21193
21314
|
if (input.names === void 0) {
|
|
21194
|
-
return
|
|
21315
|
+
return Promise.resolve([]);
|
|
21195
21316
|
}
|
|
21196
21317
|
if (input.names.length === 0) {
|
|
21197
|
-
return [];
|
|
21318
|
+
return Promise.resolve([]);
|
|
21198
21319
|
}
|
|
21199
|
-
const
|
|
21200
|
-
|
|
21201
|
-
const registryRecords = registryNames.length > 0 ? await this.#inner.listSkills({ ...input, names: registryNames }, transaction) : [];
|
|
21202
|
-
return [...inlineRecords, ...registryRecords];
|
|
21320
|
+
const names = input.names;
|
|
21321
|
+
return Promise.resolve().then(() => names.map((name) => this.#toRecord({ tenant_id: input.tenant_id, name })));
|
|
21203
21322
|
}
|
|
21204
|
-
createSkill(
|
|
21205
|
-
|
|
21323
|
+
createSkill(_input, _transaction) {
|
|
21324
|
+
void _input;
|
|
21325
|
+
void _transaction;
|
|
21326
|
+
return unsupportedInlineSkillWrite();
|
|
21206
21327
|
}
|
|
21207
|
-
upsertSkill(
|
|
21208
|
-
|
|
21328
|
+
upsertSkill(_input, _transaction) {
|
|
21329
|
+
void _input;
|
|
21330
|
+
void _transaction;
|
|
21331
|
+
return unsupportedInlineSkillWrite();
|
|
21209
21332
|
}
|
|
21210
|
-
deleteSkill(
|
|
21211
|
-
|
|
21333
|
+
deleteSkill(_input, _transaction) {
|
|
21334
|
+
void _input;
|
|
21335
|
+
void _transaction;
|
|
21336
|
+
return unsupportedInlineSkillWrite();
|
|
21212
21337
|
}
|
|
21213
21338
|
listSkillVersions(input) {
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21339
|
+
return Promise.resolve().then(() => {
|
|
21340
|
+
this.#require(input.name);
|
|
21341
|
+
return [];
|
|
21342
|
+
});
|
|
21218
21343
|
}
|
|
21219
|
-
async validateAgentSkills(input,
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21223
|
-
}
|
|
21224
|
-
if (registrySkills.length > 0) {
|
|
21225
|
-
await this.#inner.validateAgentSkills({ tenant_id: input.tenant_id, skills: registrySkills }, transaction);
|
|
21226
|
-
}
|
|
21344
|
+
async validateAgentSkills(input, _transaction) {
|
|
21345
|
+
void _transaction;
|
|
21346
|
+
this.#assertNamesInInline(input.skills.map((skill) => skill.name));
|
|
21347
|
+
await validateGitAgentSkills(this, { tenant_id: input.tenant_id, skills: input.skills });
|
|
21227
21348
|
}
|
|
21228
21349
|
async resolveTurnSkills(input) {
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
const registryMounts = registrySkills.length > 0 ? await this.#inner.resolveTurnSkills({ tenant_id: input.tenant_id, skills: registrySkills }) : [];
|
|
21232
|
-
const mounts = [...inlineMounts, ...registryMounts];
|
|
21233
|
-
const seen = /* @__PURE__ */ new Set();
|
|
21234
|
-
for (const mount of mounts) {
|
|
21235
|
-
if (seen.has(mount.name)) {
|
|
21236
|
-
throw new HTTPException23(422, {
|
|
21237
|
-
message: `Agent skills must have unique names; duplicate skill name(s): ${mount.name}`
|
|
21238
|
-
});
|
|
21239
|
-
}
|
|
21240
|
-
seen.add(mount.name);
|
|
21241
|
-
}
|
|
21242
|
-
return mounts;
|
|
21350
|
+
this.#assertNamesInInline(input.skills.map((skill) => skill.name));
|
|
21351
|
+
return resolveGitTurnSkills(this, { tenant_id: input.tenant_id, skills: input.skills });
|
|
21243
21352
|
}
|
|
21244
|
-
#
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21353
|
+
#assertNamesInInline(names) {
|
|
21354
|
+
for (const name of names) {
|
|
21355
|
+
this.#require(name);
|
|
21356
|
+
}
|
|
21248
21357
|
}
|
|
21249
|
-
#
|
|
21250
|
-
const manifest = this.#inline[
|
|
21358
|
+
#require(name) {
|
|
21359
|
+
const manifest = this.#inline[name];
|
|
21251
21360
|
if (manifest === void 0) {
|
|
21252
|
-
|
|
21361
|
+
throw new HTTPException23(422, {
|
|
21362
|
+
message: `Unknown skill "${name}" \u2014 not present in ${X_TFG_SKILLS}`
|
|
21363
|
+
});
|
|
21253
21364
|
}
|
|
21365
|
+
return manifest;
|
|
21366
|
+
}
|
|
21367
|
+
#toRecord(input) {
|
|
21368
|
+
const manifest = this.#require(input.name);
|
|
21254
21369
|
const now2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
21255
21370
|
return {
|
|
21256
21371
|
tenant_id: input.tenant_id,
|
|
@@ -21261,6 +21376,11 @@ var InlineSkillStore = class {
|
|
|
21261
21376
|
};
|
|
21262
21377
|
}
|
|
21263
21378
|
};
|
|
21379
|
+
function unsupportedInlineSkillWrite() {
|
|
21380
|
+
return Promise.reject(
|
|
21381
|
+
new HTTPException23(400, { message: `Request-scoped skills from ${X_TFG_SKILLS} do not support writes` })
|
|
21382
|
+
);
|
|
21383
|
+
}
|
|
21264
21384
|
|
|
21265
21385
|
// src/truefoundry/perServerMcpHeaders.ts
|
|
21266
21386
|
import { HTTPException as HTTPException24 } from "hono/http-exception";
|
|
@@ -21572,13 +21692,15 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
21572
21692
|
/**
|
|
21573
21693
|
* Model integrations. No limit/offset → full match set in one response.
|
|
21574
21694
|
* Pass `filter` (account + model name together) for a point lookup.
|
|
21695
|
+
* `mergeParams` folds provider defaults into `metadata.params`, which
|
|
21696
|
+
* is the only params list the model mapping reads.
|
|
21575
21697
|
*/
|
|
21576
21698
|
async listProviderIntegrations(input) {
|
|
21577
21699
|
const filterQuery = input.filter === void 0 ? {} : {
|
|
21578
21700
|
provider_account_name: input.filter.provider_account_name,
|
|
21579
21701
|
name: input.filter.name
|
|
21580
21702
|
};
|
|
21581
|
-
const query = { type: "model", ...filterQuery };
|
|
21703
|
+
const query = { type: "model", mergeParams: "true", ...filterQuery };
|
|
21582
21704
|
const payload = await this.#requestJson({
|
|
21583
21705
|
url: this.#url(INTEGRATIONS_PATH, query),
|
|
21584
21706
|
accessToken: input.accessToken,
|
|
@@ -23292,23 +23414,30 @@ function buildResolveSkillStore(options) {
|
|
|
23292
23414
|
context: requestContext
|
|
23293
23415
|
});
|
|
23294
23416
|
}
|
|
23295
|
-
function
|
|
23417
|
+
function buildResolveTurnSkillsStore(options) {
|
|
23296
23418
|
const { persistenceStore, client: client2 } = options;
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23419
|
+
const registry = client2 ? new TrueFoundryAdminSkillStore({ client: client2 }) : persistenceStore;
|
|
23420
|
+
return (input) => {
|
|
23421
|
+
if (input.inlineSkills !== void 0) {
|
|
23422
|
+
return new InlineSkillStore({ inline: input.inlineSkills });
|
|
23423
|
+
}
|
|
23424
|
+
return registry;
|
|
23425
|
+
};
|
|
23301
23426
|
}
|
|
23302
23427
|
function buildResolveModelProviderStore(options) {
|
|
23303
|
-
return (
|
|
23428
|
+
return (input) => {
|
|
23304
23429
|
const { persistenceStore, client: client2 } = options;
|
|
23305
23430
|
if (client2) {
|
|
23306
|
-
|
|
23431
|
+
const store = new TrueFoundryModelProviderStore({
|
|
23307
23432
|
client: client2,
|
|
23308
|
-
requestContext: rc,
|
|
23309
|
-
agent: runAsAgent,
|
|
23433
|
+
requestContext: input.rc,
|
|
23434
|
+
agent: input.runAsAgent,
|
|
23310
23435
|
logger: options.logger
|
|
23311
23436
|
});
|
|
23437
|
+
if (input.inlineModelProviders !== void 0) {
|
|
23438
|
+
return new InlineModelProviderStore({ inner: store, inline: input.inlineModelProviders });
|
|
23439
|
+
}
|
|
23440
|
+
return store;
|
|
23312
23441
|
}
|
|
23313
23442
|
return persistenceStore;
|
|
23314
23443
|
};
|
|
@@ -23319,16 +23448,20 @@ function buildResolveMcpServerStore(options) {
|
|
|
23319
23448
|
tokenStore: options.tokenStore,
|
|
23320
23449
|
clientName: configuration2.MCP_DCR_OAUTH_CLIENT_NAME
|
|
23321
23450
|
});
|
|
23322
|
-
return (
|
|
23451
|
+
return (input) => {
|
|
23323
23452
|
const { client: client2 } = options;
|
|
23324
23453
|
if (client2) {
|
|
23325
|
-
|
|
23454
|
+
const store = new TrueFoundryMcpServerStore({
|
|
23326
23455
|
client: client2,
|
|
23327
|
-
requestContext: rc,
|
|
23328
|
-
agent: runAsAgent,
|
|
23456
|
+
requestContext: input.rc,
|
|
23457
|
+
agent: input.runAsAgent,
|
|
23329
23458
|
logger: options.logger,
|
|
23330
|
-
...perServerHeaders === void 0 ? {} : { perServerHeaders }
|
|
23459
|
+
...input.perServerHeaders === void 0 ? {} : { perServerHeaders: input.perServerHeaders }
|
|
23331
23460
|
});
|
|
23461
|
+
if (input.inlineMcpServers !== void 0) {
|
|
23462
|
+
return new InlineMcpServerStore({ inner: store, inline: input.inlineMcpServers });
|
|
23463
|
+
}
|
|
23464
|
+
return store;
|
|
23332
23465
|
}
|
|
23333
23466
|
return withAuthMcpPersistenceStore;
|
|
23334
23467
|
};
|
|
@@ -23434,7 +23567,10 @@ async function createStandalonePersistence(options) {
|
|
|
23434
23567
|
agentStore,
|
|
23435
23568
|
sandboxEnvironmentStore,
|
|
23436
23569
|
sandboxProviderStore,
|
|
23437
|
-
|
|
23570
|
+
resolveTurnSkillsStore: buildResolveTurnSkillsStore({
|
|
23571
|
+
persistenceStore: skillStore,
|
|
23572
|
+
client: void 0
|
|
23573
|
+
}),
|
|
23438
23574
|
destroyDb: () => db.destroy(),
|
|
23439
23575
|
redis: void 0,
|
|
23440
23576
|
serviceFoundryClient: void 0
|
|
@@ -23520,7 +23656,7 @@ async function createDistributedPersistence(options) {
|
|
|
23520
23656
|
const skillStore = new PostgresSkillStore2(db);
|
|
23521
23657
|
const agentStore = new PostgresAgentStore3(db);
|
|
23522
23658
|
const sandboxEnvironmentStore = wrapSandboxEnvironmentStore(new PostgresSandboxEnvironmentStore2(db));
|
|
23523
|
-
const
|
|
23659
|
+
const resolveTurnSkillsStore = buildResolveTurnSkillsStore({
|
|
23524
23660
|
persistenceStore: skillStore,
|
|
23525
23661
|
client: serviceFoundryClient
|
|
23526
23662
|
});
|
|
@@ -23566,7 +23702,7 @@ async function createDistributedPersistence(options) {
|
|
|
23566
23702
|
agentStore,
|
|
23567
23703
|
sandboxEnvironmentStore,
|
|
23568
23704
|
sandboxProviderStore: resolveSandboxProviderStore(STANDALONE_REQUEST_CONTEXT),
|
|
23569
|
-
|
|
23705
|
+
resolveTurnSkillsStore,
|
|
23570
23706
|
destroyDb: () => db.destroy(),
|
|
23571
23707
|
redis: await connectRedis2({
|
|
23572
23708
|
connection: redisConnection,
|
|
@@ -23596,7 +23732,7 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23596
23732
|
mcpOAuthStore,
|
|
23597
23733
|
agentStore,
|
|
23598
23734
|
sandboxEnvironmentStore,
|
|
23599
|
-
|
|
23735
|
+
resolveTurnSkillsStore,
|
|
23600
23736
|
destroyDb,
|
|
23601
23737
|
redis,
|
|
23602
23738
|
serviceFoundryClient
|
|
@@ -23636,49 +23772,76 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23636
23772
|
withTransaction,
|
|
23637
23773
|
logger: logger2
|
|
23638
23774
|
}) : void 0;
|
|
23639
|
-
const
|
|
23640
|
-
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23775
|
+
const isTrueFoundryMode = isTrueFoundryModeEnabled2(configuration2);
|
|
23776
|
+
const resolveModelProviderStore = (input) => {
|
|
23777
|
+
const { c, runAsAgent, allowInlineResources = false } = input;
|
|
23778
|
+
const rawInlineModelsHeader = c.req.header(X_TFG_MODELS);
|
|
23779
|
+
if (rawInlineModelsHeader !== void 0) {
|
|
23780
|
+
assertInlineResourceHeadersAllowed({
|
|
23781
|
+
headerNames: [X_TFG_MODELS],
|
|
23782
|
+
isTrueFoundryMode,
|
|
23783
|
+
allowInlineResources
|
|
23784
|
+
});
|
|
23647
23785
|
}
|
|
23648
|
-
return
|
|
23786
|
+
return persistence.resolveModelProviderStore({
|
|
23787
|
+
rc: resolveRequestContext(c),
|
|
23788
|
+
...runAsAgent !== void 0 ? { runAsAgent } : {},
|
|
23789
|
+
...rawInlineModelsHeader !== void 0 ? { inlineModelProviders: parseInlineModelProviders(rawInlineModelsHeader) } : {}
|
|
23790
|
+
});
|
|
23649
23791
|
};
|
|
23650
|
-
const resolveMcpServerStore = (
|
|
23792
|
+
const resolveMcpServerStore = (input) => {
|
|
23793
|
+
const { c, runAsAgent, allowInlineResources = false } = input;
|
|
23651
23794
|
if (c === void 0) {
|
|
23652
23795
|
return mcpOAuthStore;
|
|
23653
23796
|
}
|
|
23654
23797
|
const rawPerServerHeaders = c.req.header(X_TFG_MCP_HEADERS);
|
|
23655
|
-
const
|
|
23656
|
-
|
|
23657
|
-
|
|
23658
|
-
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
}
|
|
23663
|
-
const rawInline = c.req.header(X_TFG_MCP);
|
|
23664
|
-
if (rawInline === void 0) {
|
|
23665
|
-
return store;
|
|
23798
|
+
const rawInlineMcpServersHeader = c.req.header(X_TFG_MCP);
|
|
23799
|
+
if (rawInlineMcpServersHeader !== void 0) {
|
|
23800
|
+
assertInlineResourceHeadersAllowed({
|
|
23801
|
+
headerNames: [X_TFG_MCP],
|
|
23802
|
+
isTrueFoundryMode,
|
|
23803
|
+
allowInlineResources
|
|
23804
|
+
});
|
|
23666
23805
|
}
|
|
23667
|
-
return
|
|
23806
|
+
return persistence.resolveMcpServerStore({
|
|
23807
|
+
rc: resolveRequestContext(c),
|
|
23808
|
+
...runAsAgent !== void 0 ? { runAsAgent } : {},
|
|
23809
|
+
...rawPerServerHeaders !== void 0 ? { perServerHeaders: parsePerServerMcpHeaders(rawPerServerHeaders) } : {},
|
|
23810
|
+
...rawInlineMcpServersHeader !== void 0 ? { inlineMcpServers: parseInlineMcpServers(rawInlineMcpServersHeader) } : {}
|
|
23811
|
+
});
|
|
23668
23812
|
};
|
|
23669
23813
|
const resolveAgentStore = (c) => persistence.resolveAgentStore(resolveRequestContext(c));
|
|
23670
23814
|
const resolveSandboxProviderStore = (c) => persistence.resolveSandboxProviderStore(resolveRequestContext(c));
|
|
23671
23815
|
const resolveWebSearchProviderStore = (c) => persistence.resolveWebSearchProviderStore(resolveRequestContext(c));
|
|
23672
|
-
const resolveSkillStore = (
|
|
23673
|
-
const
|
|
23674
|
-
|
|
23675
|
-
|
|
23816
|
+
const resolveSkillStore = (input) => {
|
|
23817
|
+
const { c, allowInlineResources = false } = input;
|
|
23818
|
+
const rawInlineSkillsHeader = c.req.header(X_TFG_SKILLS);
|
|
23819
|
+
if (rawInlineSkillsHeader !== void 0) {
|
|
23820
|
+
assertInlineResourceHeadersAllowed({
|
|
23821
|
+
headerNames: [X_TFG_SKILLS],
|
|
23822
|
+
isTrueFoundryMode,
|
|
23823
|
+
allowInlineResources
|
|
23824
|
+
});
|
|
23825
|
+
return new InlineSkillStore({ inline: parseInlineSkills(rawInlineSkillsHeader) });
|
|
23676
23826
|
}
|
|
23677
|
-
|
|
23678
|
-
|
|
23679
|
-
|
|
23827
|
+
return persistence.resolveSkillStore(resolveRequestContext(c));
|
|
23828
|
+
};
|
|
23829
|
+
const resolveTurnSkillsStoreForRequest = (input) => {
|
|
23830
|
+
const { c, allowInlineResources = false } = input;
|
|
23831
|
+
if (c === void 0) {
|
|
23832
|
+
return resolveTurnSkillsStore({});
|
|
23833
|
+
}
|
|
23834
|
+
const rawInlineSkillsHeader = c.req.header(X_TFG_SKILLS);
|
|
23835
|
+
if (rawInlineSkillsHeader !== void 0) {
|
|
23836
|
+
assertInlineResourceHeadersAllowed({
|
|
23837
|
+
headerNames: [X_TFG_SKILLS],
|
|
23838
|
+
isTrueFoundryMode,
|
|
23839
|
+
allowInlineResources
|
|
23840
|
+
});
|
|
23680
23841
|
}
|
|
23681
|
-
return
|
|
23842
|
+
return resolveTurnSkillsStore(
|
|
23843
|
+
rawInlineSkillsHeader === void 0 ? {} : { inlineSkills: parseInlineSkills(rawInlineSkillsHeader) }
|
|
23844
|
+
);
|
|
23682
23845
|
};
|
|
23683
23846
|
const app = createServerApp({
|
|
23684
23847
|
modelCatalog: ModelCatalog.load(),
|
|
@@ -23692,13 +23855,13 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23692
23855
|
resolveSandboxProviderStore,
|
|
23693
23856
|
resolveWebSearchProviderStore,
|
|
23694
23857
|
resolveSkillStore,
|
|
23858
|
+
resolveTurnSkillsStore: resolveTurnSkillsStoreForRequest,
|
|
23695
23859
|
withTransaction,
|
|
23696
23860
|
tokenStore,
|
|
23697
23861
|
scheduleStore,
|
|
23698
23862
|
agentStore,
|
|
23699
23863
|
sandboxEnvironmentStore,
|
|
23700
23864
|
sandboxProviderStore: persistence.sandboxProviderStore,
|
|
23701
|
-
turnSkillsResolverStore,
|
|
23702
23865
|
sessionStore,
|
|
23703
23866
|
sessionMetricsStore,
|
|
23704
23867
|
sessions,
|
|
@@ -23716,8 +23879,7 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23716
23879
|
try {
|
|
23717
23880
|
const logger2 = createServerLogger({
|
|
23718
23881
|
level: configuration2.LOG_LEVEL,
|
|
23719
|
-
standalone: configuration2.STANDALONE
|
|
23720
|
-
version: PACKAGE_VERSION
|
|
23882
|
+
standalone: configuration2.STANDALONE
|
|
23721
23883
|
});
|
|
23722
23884
|
await initSentry(configuration2, logger2, { tags: { component: "server" } });
|
|
23723
23885
|
if (configuration2.STANDALONE) {
|