@truefoundry/trueforge 0.179.1 → 0.180.0-rc.1
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-KJETGNKQ-DnLvvpR_.js} +1 -1
- package/dist/_frontend/assets/AgentCodeSnippets-KJETGNKQ-DnLvvpR_.js.br +0 -0
- package/dist/_frontend/assets/AgentCodeSnippets-KJETGNKQ-DnLvvpR_.js.gz +0 -0
- package/dist/_frontend/assets/{AgentMetricChart-MMZYPKVN-8E4ELOjM.js → AgentMetricChart-WVOTRK46-BdnyQ_oy.js} +1 -1
- package/dist/_frontend/assets/AgentMetricChart-WVOTRK46-BdnyQ_oy.js.br +0 -0
- package/dist/_frontend/assets/AgentMetricChart-WVOTRK46-BdnyQ_oy.js.gz +0 -0
- package/dist/_frontend/assets/{AgentOverview-OBBGSUOK-D0-uAThW.js → AgentOverview-JQQP6DDA-CfAWTQzb.js} +1 -1
- package/dist/_frontend/assets/AgentOverview-JQQP6DDA-CfAWTQzb.js.br +0 -0
- package/dist/_frontend/assets/AgentOverview-JQQP6DDA-CfAWTQzb.js.gz +0 -0
- package/dist/_frontend/assets/{AgentSessionEventTimeline-ZBW3AIU2-BjA4oeYw.js → AgentSessionEventTimeline-J3AD4KFZ-rb89dfgl.js} +1 -1
- package/dist/_frontend/assets/AgentSessionEventTimeline-J3AD4KFZ-rb89dfgl.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimeline-J3AD4KFZ-rb89dfgl.js.gz +0 -0
- package/dist/_frontend/assets/{AgentSessionEventTimelineChart-VQNS2G4D-o3La8fse.js → AgentSessionEventTimelineChart-KQE3BNJP-DhfBHfpK.js} +1 -1
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-KQE3BNJP-DhfBHfpK.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-KQE3BNJP-DhfBHfpK.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessions-SD3U74MM-C7AvihJc.js +1 -0
- package/dist/_frontend/assets/AgentSessions-SD3U74MM-C7AvihJc.js.br +0 -0
- package/dist/_frontend/assets/AgentSessions-SD3U74MM-C7AvihJc.js.gz +0 -0
- package/dist/_frontend/assets/{ConnectorSettings-XXE32AUQ-Bi01homi.js → ConnectorSettings-73EOLURL-D0T099Hf.js} +1 -1
- package/dist/_frontend/assets/ConnectorSettings-73EOLURL-D0T099Hf.js.br +0 -0
- package/dist/_frontend/assets/ConnectorSettings-73EOLURL-D0T099Hf.js.gz +0 -0
- package/dist/_frontend/assets/{DockLayout-YSSOMIEK-S7QeeWVV.js → DockLayout-FPKAUN4P-CtsN7Dlz.js} +1 -1
- package/dist/_frontend/assets/DrawerLayout-WP7MROGW-DBvy2qrx.js +2 -0
- package/dist/_frontend/assets/DrawerLayout-WP7MROGW-DBvy2qrx.js.br +0 -0
- package/dist/_frontend/assets/DrawerLayout-WP7MROGW-DBvy2qrx.js.gz +0 -0
- package/dist/_frontend/assets/{EnvironmentsPage-OXKHJMOO-C-t7Dp_i.js → EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js} +2 -2
- package/dist/_frontend/assets/EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js.br +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-FCDIVAKH-Crq_Zjm_.js.gz +0 -0
- package/dist/_frontend/assets/{ModelSettings-J5QDA4OJ-1_KW1bju.js → ModelSettings-O2PPI7KP-B-pD-nIV.js} +1 -1
- package/dist/_frontend/assets/ModelSettings-O2PPI7KP-B-pD-nIV.js.br +0 -0
- package/dist/_frontend/assets/ModelSettings-O2PPI7KP-B-pD-nIV.js.gz +0 -0
- package/dist/_frontend/assets/{SandboxSettings-Y3NPODM5-CD9DUFxP.js → SandboxSettings-RA2QQA2U-BZ1p6y_g.js} +1 -1
- package/dist/_frontend/assets/SandboxSettings-RA2QQA2U-BZ1p6y_g.js.br +0 -0
- package/dist/_frontend/assets/SandboxSettings-RA2QQA2U-BZ1p6y_g.js.gz +0 -0
- package/dist/_frontend/assets/{SchedulesPage-HLHAOIS6-BcDOMjiM.js → SchedulesPage-YFIJGKZO-BbTOcGO5.js} +1 -1
- package/dist/_frontend/assets/SchedulesPage-YFIJGKZO-BbTOcGO5.js.br +0 -0
- package/dist/_frontend/assets/SchedulesPage-YFIJGKZO-BbTOcGO5.js.gz +0 -0
- package/dist/_frontend/assets/{SettingsBuilder-CVPLV5HY-D0lac3y-.js → SettingsBuilder-MZNSGTCG-DW5WrGhz.js} +2 -2
- package/dist/_frontend/assets/SettingsBuilder-MZNSGTCG-DW5WrGhz.js.br +0 -0
- package/dist/_frontend/assets/SettingsBuilder-MZNSGTCG-DW5WrGhz.js.gz +0 -0
- package/dist/_frontend/assets/ShellRouteSync-VORG6HSK-DlG8FUO5.js +1 -0
- package/dist/_frontend/assets/ShellRouteSync-VORG6HSK-DlG8FUO5.js.br +0 -0
- package/dist/_frontend/assets/ShellRouteSync-VORG6HSK-DlG8FUO5.js.gz +0 -0
- package/dist/_frontend/assets/SidebarLayout-2ZSKQ46M-DO6rRES5.js +2 -0
- package/dist/_frontend/assets/SidebarLayout-2ZSKQ46M-DO6rRES5.js.br +0 -0
- package/dist/_frontend/assets/SidebarLayout-2ZSKQ46M-DO6rRES5.js.gz +0 -0
- package/dist/_frontend/assets/{SkillSettings-6I63TUL7-D4s5Ticy.js → SkillSettings-EE4BYHMX-DhNcJrAy.js} +1 -1
- package/dist/_frontend/assets/SkillSettings-EE4BYHMX-DhNcJrAy.js.br +0 -0
- package/dist/_frontend/assets/SkillSettings-EE4BYHMX-DhNcJrAy.js.gz +0 -0
- package/dist/_frontend/assets/{TrueForgeUIWithRouter-SZT3KVCD-BMJaD7KT.js → TrueForgeUIWithRouter-IF7PNLNK-C3mp2pw1.js} +1 -1
- package/dist/_frontend/assets/{WebSearchSettings-SUBJH2C5-DL7KJKp-.js → WebSearchSettings-6L5OSPPU-CKnmuR-J.js} +1 -1
- package/dist/_frontend/assets/WebSearchSettings-6L5OSPPU-CKnmuR-J.js.br +0 -0
- package/dist/_frontend/assets/WebSearchSettings-6L5OSPPU-CKnmuR-J.js.gz +0 -0
- package/dist/_frontend/assets/{WidgetLayout-Q3F3UWN3-BQaDzdhk.js → WidgetLayout-IBJNY7CF-D3Hdd9b-.js} +1 -1
- package/dist/_frontend/assets/WidgetLayout-IBJNY7CF-D3Hdd9b-.js.br +0 -0
- package/dist/_frontend/assets/WidgetLayout-IBJNY7CF-D3Hdd9b-.js.gz +0 -0
- package/dist/_frontend/assets/{chunk-GSAVSNGR-BJhfT2HB.js → chunk-2UUABLZI-Dls_33ja.js} +1 -1
- package/dist/_frontend/assets/chunk-KIRLJDZF-D5aQQ46r.js +2 -0
- package/dist/_frontend/assets/chunk-KIRLJDZF-D5aQQ46r.js.br +0 -0
- package/dist/_frontend/assets/chunk-KIRLJDZF-D5aQQ46r.js.gz +0 -0
- package/dist/_frontend/assets/chunk-MTB32EHM-CWUHnCTs.js +1 -0
- package/dist/_frontend/assets/chunk-MTB32EHM-CWUHnCTs.js.br +0 -0
- package/dist/_frontend/assets/chunk-MTB32EHM-CWUHnCTs.js.gz +0 -0
- package/dist/_frontend/assets/{chunk-OB3PAWPO-WTBtRmxH.js → chunk-OB3PAWPO-dRLyZPUL.js} +1 -1
- package/dist/_frontend/assets/chunk-OB3PAWPO-dRLyZPUL.js.br +0 -0
- package/dist/_frontend/assets/chunk-OB3PAWPO-dRLyZPUL.js.gz +0 -0
- package/dist/_frontend/assets/{chunk-ICZTJLTU-CSBYGLaq.js → chunk-WG6NEBF3-D6-L7Ege.js} +1 -1
- package/dist/_frontend/assets/chunk-WG6NEBF3-D6-L7Ege.js.br +0 -0
- package/dist/_frontend/assets/chunk-WG6NEBF3-D6-L7Ege.js.gz +0 -0
- package/dist/_frontend/assets/{cssMode-BnrOGoXe.js → cssMode-B1pKERIR.js} +1 -1
- package/dist/_frontend/assets/cssMode-B1pKERIR.js.br +0 -0
- package/dist/_frontend/assets/cssMode-B1pKERIR.js.gz +0 -0
- package/dist/_frontend/assets/{freemarker2-Cu2qkLE9.js → freemarker2-D558YrVo.js} +1 -1
- package/dist/_frontend/assets/freemarker2-D558YrVo.js.br +0 -0
- package/dist/_frontend/assets/freemarker2-D558YrVo.js.gz +0 -0
- package/dist/_frontend/assets/{handlebars-qoIGMfY0.js → handlebars-DjToD8O0.js} +1 -1
- package/dist/_frontend/assets/handlebars-DjToD8O0.js.br +0 -0
- package/dist/_frontend/assets/handlebars-DjToD8O0.js.gz +0 -0
- package/dist/_frontend/assets/{html-jIKazNfg.js → html-Bj1OwSpp.js} +1 -1
- package/dist/_frontend/assets/html-Bj1OwSpp.js.br +0 -0
- package/dist/_frontend/assets/html-Bj1OwSpp.js.gz +0 -0
- package/dist/_frontend/assets/{htmlMode-M1ZSzZKt.js → htmlMode-1Un8e6H0.js} +1 -1
- package/dist/_frontend/assets/htmlMode-1Un8e6H0.js.br +0 -0
- package/dist/_frontend/assets/htmlMode-1Un8e6H0.js.gz +0 -0
- package/dist/_frontend/assets/{index-4r7-LeFK.js → index-BvbVkgsP.js} +1 -1
- package/dist/_frontend/assets/index-BvbVkgsP.js.br +0 -0
- package/dist/_frontend/assets/index-BvbVkgsP.js.gz +0 -0
- package/dist/_frontend/assets/{index-BJsGMvc-.js → index-Cq_o2Abd.js} +244 -244
- package/dist/_frontend/assets/index-Cq_o2Abd.js.br +0 -0
- package/dist/_frontend/assets/index-Cq_o2Abd.js.gz +0 -0
- package/dist/_frontend/assets/{index-YbpMGQU0.js → index-skbT0X6M.js} +3 -3
- package/dist/_frontend/assets/index-skbT0X6M.js.br +0 -0
- package/dist/_frontend/assets/index-skbT0X6M.js.gz +0 -0
- package/dist/_frontend/assets/{javascript-X_qdyURb.js → javascript-C0aMIA2x.js} +1 -1
- package/dist/_frontend/assets/{jsonMode-CT04G6VA.js → jsonMode-BGQys1IY.js} +1 -1
- package/dist/_frontend/assets/jsonMode-BGQys1IY.js.br +0 -0
- package/dist/_frontend/assets/jsonMode-BGQys1IY.js.gz +0 -0
- package/dist/_frontend/assets/{liquid-B2a653EE.js → liquid-BJfOa52w.js} +1 -1
- package/dist/_frontend/assets/liquid-BJfOa52w.js.br +0 -0
- package/dist/_frontend/assets/liquid-BJfOa52w.js.gz +0 -0
- package/dist/_frontend/assets/{lspLanguageFeatures-mffTaZGc.js → lspLanguageFeatures-BPXxuQUC.js} +1 -1
- package/dist/_frontend/assets/lspLanguageFeatures-BPXxuQUC.js.br +0 -0
- package/dist/_frontend/assets/lspLanguageFeatures-BPXxuQUC.js.gz +0 -0
- package/dist/_frontend/assets/{mdx-DN_e2xx5.js → mdx-DEftgzGF.js} +1 -1
- package/dist/_frontend/assets/mdx-DEftgzGF.js.br +0 -0
- package/dist/_frontend/assets/mdx-DEftgzGF.js.gz +0 -0
- package/dist/_frontend/assets/{python-CMZDwpP1.js → python-B9hN9eL0.js} +1 -1
- package/dist/_frontend/assets/python-B9hN9eL0.js.br +0 -0
- package/dist/_frontend/assets/python-B9hN9eL0.js.gz +0 -0
- package/dist/_frontend/assets/{razor-CJvSmNFI.js → razor-B_YBri1R.js} +1 -1
- package/dist/_frontend/assets/razor-B_YBri1R.js.br +0 -0
- package/dist/_frontend/assets/razor-B_YBri1R.js.gz +0 -0
- package/dist/_frontend/assets/{tsMode-ZJxciJ2G.js → tsMode-DmXjhObM.js} +1 -1
- package/dist/_frontend/assets/tsMode-DmXjhObM.js.br +0 -0
- package/dist/_frontend/assets/tsMode-DmXjhObM.js.gz +0 -0
- package/dist/_frontend/assets/{typescript-DS4oUy9B.js → typescript-CzGhzNVJ.js} +1 -1
- package/dist/_frontend/assets/typescript-CzGhzNVJ.js.br +0 -0
- package/dist/_frontend/assets/typescript-CzGhzNVJ.js.gz +0 -0
- package/dist/_frontend/assets/{workers-DPKHJxKo.js → workers-CKeuqANe.js} +1 -1
- package/dist/_frontend/assets/workers-CKeuqANe.js.br +0 -0
- package/dist/_frontend/assets/workers-CKeuqANe.js.gz +0 -0
- package/dist/_frontend/assets/{xml-BJmCYv7o.js → xml-BejVXqNL.js} +1 -1
- package/dist/_frontend/assets/xml-BejVXqNL.js.br +0 -0
- package/dist/_frontend/assets/xml-BejVXqNL.js.gz +0 -0
- package/dist/_frontend/assets/{yaml-DzYUCVsV.js → yaml-DThQJB0u.js} +1 -1
- package/dist/_frontend/assets/yaml-DThQJB0u.js.br +0 -0
- package/dist/_frontend/assets/yaml-DThQJB0u.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 +442 -259
- 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 +5 -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.br +0 -0
- package/dist/_frontend/assets/AgentMetricChart-MMZYPKVN-8E4ELOjM.js.gz +0 -0
- 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.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.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.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.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.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();
|
|
@@ -15013,14 +15147,15 @@ function serverTlsServeOptions(options) {
|
|
|
15013
15147
|
cert: Buffer.from(read(TLS_CERT_FILE)),
|
|
15014
15148
|
ca: Buffer.from(read(TLS_CA_FILE)),
|
|
15015
15149
|
requestCert: true,
|
|
15016
|
-
// Do not reject at handshake so /healthz probes without a cert still connect.
|
|
15150
|
+
// Do not reject at handshake so /healthz probes and /metrics scrapes without a cert still connect.
|
|
15017
15151
|
rejectUnauthorized: false
|
|
15018
15152
|
}
|
|
15019
15153
|
};
|
|
15020
15154
|
}
|
|
15155
|
+
var CLIENT_CERT_EXEMPT_PATHS = /* @__PURE__ */ new Set(["/healthz", "/metrics"]);
|
|
15021
15156
|
function createClientCertificateMiddleware(logger2) {
|
|
15022
15157
|
return async (c, next) => {
|
|
15023
|
-
if (c.req.path
|
|
15158
|
+
if (CLIENT_CERT_EXEMPT_PATHS.has(c.req.path)) {
|
|
15024
15159
|
await next();
|
|
15025
15160
|
return;
|
|
15026
15161
|
}
|
|
@@ -16941,7 +17076,7 @@ function turnStreamId(tenantId, sessionId, turnId) {
|
|
|
16941
17076
|
return redisKey("agent", "turn", tenantId, sessionId, turnId, "stream");
|
|
16942
17077
|
}
|
|
16943
17078
|
async function drainTurnEvents(input) {
|
|
16944
|
-
const { trackedStream, turnEventStream,
|
|
17079
|
+
const { trackedStream, turnEventStream, maxExecutionTimer, logger: logger2, onEvent } = input;
|
|
16945
17080
|
try {
|
|
16946
17081
|
for await (const event of trackedStream) {
|
|
16947
17082
|
const sequenceNumber = await turnEventStream.put(event, {
|
|
@@ -16951,17 +17086,9 @@ async function drainTurnEvents(input) {
|
|
|
16951
17086
|
}
|
|
16952
17087
|
} catch (error) {
|
|
16953
17088
|
if (error instanceof SessionStoreNotFoundError) {
|
|
16954
|
-
logger2.warn("Turn stream ended after session/turn was removed",
|
|
16955
|
-
sessionId,
|
|
16956
|
-
turnId,
|
|
16957
|
-
...extractErrorLogFields5(error)
|
|
16958
|
-
});
|
|
17089
|
+
logger2.warn("Turn stream ended after session/turn was removed", extractErrorLogFields5(error));
|
|
16959
17090
|
} else {
|
|
16960
|
-
logger2.error("Unexpected error in turn event drain",
|
|
16961
|
-
sessionId,
|
|
16962
|
-
turnId,
|
|
16963
|
-
...extractErrorLogFields5(error)
|
|
16964
|
-
});
|
|
17091
|
+
logger2.error("Unexpected error in turn event drain", extractErrorLogFields5(error));
|
|
16965
17092
|
}
|
|
16966
17093
|
} finally {
|
|
16967
17094
|
clearTimeout(maxExecutionTimer);
|
|
@@ -16972,11 +17099,16 @@ async function beginTurnExecution(params) {
|
|
|
16972
17099
|
assertGatewayMetadataRequestHeaders(requestHeaders);
|
|
16973
17100
|
const sessionId = session.session_id;
|
|
16974
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
|
+
});
|
|
16975
17108
|
const sessionAgent = session.record.agent;
|
|
16976
17109
|
const abortController = new AbortController();
|
|
16977
|
-
const tenant_id = session.tenant_id;
|
|
16978
17110
|
const webSearchProvider = await resolveWebSearchProvider({
|
|
16979
|
-
tenant_id,
|
|
17111
|
+
tenant_id: tenantId,
|
|
16980
17112
|
store: deps.webSearchProviderStore
|
|
16981
17113
|
});
|
|
16982
17114
|
const resolver = createTurnResolver({
|
|
@@ -17020,14 +17152,12 @@ async function beginTurnExecution(params) {
|
|
|
17020
17152
|
abortController,
|
|
17021
17153
|
stream: turn.stream()
|
|
17022
17154
|
});
|
|
17023
|
-
const turnEventStream = deps.eventSubscriptions.get(turnStreamId(
|
|
17155
|
+
const turnEventStream = deps.eventSubscriptions.get(turnStreamId(tenantId, sessionId, turn.id));
|
|
17024
17156
|
return {
|
|
17025
17157
|
turn,
|
|
17026
17158
|
drainInput: {
|
|
17027
17159
|
trackedStream,
|
|
17028
17160
|
turnEventStream,
|
|
17029
|
-
sessionId,
|
|
17030
|
-
turnId: turn.id,
|
|
17031
17161
|
maxExecutionTimer,
|
|
17032
17162
|
logger: deps.logger
|
|
17033
17163
|
}
|
|
@@ -17205,8 +17335,6 @@ function createTurnsRouter(deps) {
|
|
|
17205
17335
|
}
|
|
17206
17336
|
deps.logger.error("Sandbox file download failed", {
|
|
17207
17337
|
...extractErrorLogFields5(error),
|
|
17208
|
-
sessionId,
|
|
17209
|
-
turnId,
|
|
17210
17338
|
sandboxId,
|
|
17211
17339
|
path: path7
|
|
17212
17340
|
});
|
|
@@ -17290,6 +17418,7 @@ function createTurnsRouter(deps) {
|
|
|
17290
17418
|
}
|
|
17291
17419
|
referencedAgent = agent;
|
|
17292
17420
|
}
|
|
17421
|
+
const allowInlineResources = session.record.agent.type === "inline";
|
|
17293
17422
|
const turnParams = {
|
|
17294
17423
|
session,
|
|
17295
17424
|
input: body.input,
|
|
@@ -17298,9 +17427,17 @@ function createTurnsRouter(deps) {
|
|
|
17298
17427
|
requestHeaders: c.req.header(),
|
|
17299
17428
|
deps: {
|
|
17300
17429
|
...deps,
|
|
17301
|
-
modelProviderStore: deps.resolveModelProviderStore(
|
|
17302
|
-
|
|
17303
|
-
|
|
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 }),
|
|
17304
17441
|
agentStore: deps.resolveAgentStore(c),
|
|
17305
17442
|
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
17306
17443
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
@@ -17309,18 +17446,23 @@ function createTurnsRouter(deps) {
|
|
|
17309
17446
|
};
|
|
17310
17447
|
try {
|
|
17311
17448
|
if (!body.stream) {
|
|
17312
|
-
const
|
|
17313
|
-
return c.json({ data: toWireTurn(
|
|
17449
|
+
const turn2 = await startTurnInProcess(turnParams);
|
|
17450
|
+
return c.json({ data: toWireTurn(turn2.record) }, 200);
|
|
17314
17451
|
}
|
|
17315
|
-
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
|
+
};
|
|
17316
17458
|
let shouldWriteToSSEStream = true;
|
|
17317
17459
|
return streamSSE(c, async (stream) => {
|
|
17318
17460
|
stream.onAbort(() => {
|
|
17319
17461
|
shouldWriteToSSEStream = false;
|
|
17320
|
-
deps.logger.info(
|
|
17321
|
-
|
|
17322
|
-
|
|
17323
|
-
|
|
17462
|
+
deps.logger.info(
|
|
17463
|
+
"Create-turn SSE client disconnected, continuing drain without writing",
|
|
17464
|
+
disconnectLogContext
|
|
17465
|
+
);
|
|
17324
17466
|
});
|
|
17325
17467
|
await drainTurnEvents({
|
|
17326
17468
|
...drainInput,
|
|
@@ -17394,8 +17536,6 @@ function createTurnsRouter(deps) {
|
|
|
17394
17536
|
const timeoutMs = config_default.TURN_SUBSCRIBE_TIMEOUT_MS;
|
|
17395
17537
|
const timeoutHandler = setTimeout(() => {
|
|
17396
17538
|
deps.logger.info("Subscribe turn stream server-side timeout reached, closing stream", {
|
|
17397
|
-
sessionId,
|
|
17398
|
-
turnId,
|
|
17399
17539
|
afterSequenceNumber,
|
|
17400
17540
|
timeoutMs
|
|
17401
17541
|
});
|
|
@@ -17485,12 +17625,12 @@ async function startScheduleRunOnRequest(params) {
|
|
|
17485
17625
|
activeTurns: deps.activeTurns,
|
|
17486
17626
|
eventSubscriptions: deps.eventSubscriptions,
|
|
17487
17627
|
agentStore: deps.agentStore,
|
|
17488
|
-
modelProviderStore: deps.resolveModelProviderStore(c, prepared.agent),
|
|
17489
|
-
mcpServerStore: deps.resolveMcpServerStore(c, prepared.agent),
|
|
17628
|
+
modelProviderStore: deps.resolveModelProviderStore({ c, runAsAgent: prepared.agent }),
|
|
17629
|
+
mcpServerStore: deps.resolveMcpServerStore({ c, runAsAgent: prepared.agent }),
|
|
17490
17630
|
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
17491
17631
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
17492
17632
|
webSearchProviderStore: deps.resolveWebSearchProviderStore(c),
|
|
17493
|
-
skillStore: deps.
|
|
17633
|
+
skillStore: deps.resolveTurnSkillsStore({}),
|
|
17494
17634
|
logger: deps.logger
|
|
17495
17635
|
}
|
|
17496
17636
|
});
|
|
@@ -17563,6 +17703,7 @@ function createScheduleExecutionRouter(deps) {
|
|
|
17563
17703
|
created_by_subject: item.schedule.created_by_subject
|
|
17564
17704
|
})
|
|
17565
17705
|
);
|
|
17706
|
+
updateLogContext({ tenant_id: item.schedule.tenant_id });
|
|
17566
17707
|
await startScheduleRunOnRequest({ c, item, deps });
|
|
17567
17708
|
} catch (error) {
|
|
17568
17709
|
if (error instanceof ScheduleRunNotFoundError || error instanceof ScheduleNotFoundError || error instanceof ScheduleAgentNotFoundError) {
|
|
@@ -18127,6 +18268,7 @@ function cancelSessionTurnPeerHandler(activeTurns) {
|
|
|
18127
18268
|
async function cancelSessionTurn(deps, input) {
|
|
18128
18269
|
const { turnId, reason = CancellationReason2.ClientCancelled } = input;
|
|
18129
18270
|
const sessionId = deps.session.session_id;
|
|
18271
|
+
updateLogContext({ turn_id: turnId });
|
|
18130
18272
|
const turn = await deps.sessionStore.getTurn({
|
|
18131
18273
|
session_id: sessionId,
|
|
18132
18274
|
turn_id: turnId
|
|
@@ -18154,8 +18296,7 @@ async function cancelSessionTurn(deps, input) {
|
|
|
18154
18296
|
}
|
|
18155
18297
|
} catch (error) {
|
|
18156
18298
|
const fields = {
|
|
18157
|
-
|
|
18158
|
-
turnId,
|
|
18299
|
+
turn_id: turnId,
|
|
18159
18300
|
owner,
|
|
18160
18301
|
...extractErrorLogFields6(error)
|
|
18161
18302
|
};
|
|
@@ -18190,6 +18331,20 @@ function isSessionOwner2({
|
|
|
18190
18331
|
}) {
|
|
18191
18332
|
return subject_id === created_by_subject.subject_id;
|
|
18192
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
|
+
}
|
|
18193
18348
|
function createGetOrCreateSessionByExternalIdHandler(deps) {
|
|
18194
18349
|
return async (c) => {
|
|
18195
18350
|
const body = c.req.valid("json");
|
|
@@ -18227,16 +18382,10 @@ function createGetOrCreateSessionByExternalIdHandler(deps) {
|
|
|
18227
18382
|
}
|
|
18228
18383
|
agent = { type: "reference", id: named.id, name: named.name };
|
|
18229
18384
|
} else {
|
|
18230
|
-
await
|
|
18385
|
+
await validateInlineSessionSpec(deps, {
|
|
18386
|
+
c,
|
|
18231
18387
|
spec: body.agent.spec,
|
|
18232
|
-
|
|
18233
|
-
created_by_subject_id: requestContext.subject.id,
|
|
18234
|
-
modelProviderStore: deps.resolveModelProviderStore(c),
|
|
18235
|
-
mcpServerStore: deps.resolveMcpServerStore(c),
|
|
18236
|
-
skillStore: deps.resolveSkillStore(c),
|
|
18237
|
-
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
18238
|
-
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
18239
|
-
webSearchProviderStore: deps.resolveWebSearchProviderStore(c)
|
|
18388
|
+
requestContext
|
|
18240
18389
|
});
|
|
18241
18390
|
agent = { type: "inline", spec: body.agent.spec };
|
|
18242
18391
|
}
|
|
@@ -18271,6 +18420,7 @@ function createSessionsRouter(deps) {
|
|
|
18271
18420
|
const createSessionHandler = async (c) => {
|
|
18272
18421
|
const body = c.req.valid("json");
|
|
18273
18422
|
const sessionId = newId();
|
|
18423
|
+
updateLogContext({ session_id: sessionId });
|
|
18274
18424
|
const requestContext = deps.resolveRequestContext(c);
|
|
18275
18425
|
if (isSessionAgentNameRef(body.agent)) {
|
|
18276
18426
|
const agent = await agentIfAccessible({
|
|
@@ -18295,16 +18445,10 @@ function createSessionsRouter(deps) {
|
|
|
18295
18445
|
});
|
|
18296
18446
|
return c.json({ data: toWireSession(session2.record) }, 201);
|
|
18297
18447
|
}
|
|
18298
|
-
await
|
|
18448
|
+
await validateInlineSessionSpec(deps, {
|
|
18449
|
+
c,
|
|
18299
18450
|
spec: body.agent.spec,
|
|
18300
|
-
|
|
18301
|
-
created_by_subject_id: requestContext.subject.id,
|
|
18302
|
-
modelProviderStore: deps.resolveModelProviderStore(c),
|
|
18303
|
-
mcpServerStore: deps.resolveMcpServerStore(c),
|
|
18304
|
-
skillStore: deps.resolveSkillStore(c),
|
|
18305
|
-
sandboxProviderStore: deps.resolveSandboxProviderStore(c),
|
|
18306
|
-
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
18307
|
-
webSearchProviderStore: deps.resolveWebSearchProviderStore(c)
|
|
18451
|
+
requestContext
|
|
18308
18452
|
});
|
|
18309
18453
|
const session = await deps.sessions.create({
|
|
18310
18454
|
tenant_id: requestContext.tenant_id,
|
|
@@ -18379,17 +18523,25 @@ function createSessionsRouter(deps) {
|
|
|
18379
18523
|
return c.json({ error: { message: FORBIDDEN_SESSION_ACCESS2 } }, 403);
|
|
18380
18524
|
}
|
|
18381
18525
|
if (body.agent !== void 0) {
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18391
|
-
|
|
18392
|
-
|
|
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
|
+
}
|
|
18393
18545
|
}
|
|
18394
18546
|
try {
|
|
18395
18547
|
await deps.sessionStore.updateSession({
|
|
@@ -19444,7 +19596,7 @@ function createSettingsRouter(deps) {
|
|
|
19444
19596
|
router.route(
|
|
19445
19597
|
"/model-providers",
|
|
19446
19598
|
createModelProvidersRouter({
|
|
19447
|
-
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19599
|
+
resolveModelProviderStore: (c) => deps.resolveModelProviderStore({ c }),
|
|
19448
19600
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19449
19601
|
withTransaction: deps.withTransaction,
|
|
19450
19602
|
resolveRequestContext: deps.resolveRequestContext
|
|
@@ -19453,7 +19605,7 @@ function createSettingsRouter(deps) {
|
|
|
19453
19605
|
router.route(
|
|
19454
19606
|
"/mcp-servers",
|
|
19455
19607
|
createSettingsMcpServersRouter({
|
|
19456
|
-
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19608
|
+
resolveMcpServerStore: (c) => deps.resolveMcpServerStore({ c }),
|
|
19457
19609
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19458
19610
|
tokenStore: deps.tokenStore,
|
|
19459
19611
|
withTransaction: deps.withTransaction,
|
|
@@ -19492,6 +19644,25 @@ function createSettingsRouter(deps) {
|
|
|
19492
19644
|
|
|
19493
19645
|
// src/app.ts
|
|
19494
19646
|
init_config();
|
|
19647
|
+
|
|
19648
|
+
// src/http/prometheus.ts
|
|
19649
|
+
import { prometheus } from "@hono/prometheus";
|
|
19650
|
+
var DURATION_BUCKETS_SECONDS = [0.01, 0.05, 0.1, 0.2, 0.5, 1, 2.5, 5, 10, 30, 60, 120, 300];
|
|
19651
|
+
var requestDuration = {
|
|
19652
|
+
help: "Duration of HTTP requests in seconds",
|
|
19653
|
+
buckets: DURATION_BUCKETS_SECONDS
|
|
19654
|
+
};
|
|
19655
|
+
function createHttpMetrics() {
|
|
19656
|
+
const { printMetrics, registerMetrics } = prometheus({
|
|
19657
|
+
collectDefaultMetrics: true,
|
|
19658
|
+
metricOptions: {
|
|
19659
|
+
requestDuration
|
|
19660
|
+
}
|
|
19661
|
+
});
|
|
19662
|
+
return { middleware: registerMetrics, handler: printMetrics };
|
|
19663
|
+
}
|
|
19664
|
+
|
|
19665
|
+
// src/app.ts
|
|
19495
19666
|
init_schedule();
|
|
19496
19667
|
|
|
19497
19668
|
// src/zodErrorResponse.ts
|
|
@@ -19508,6 +19679,37 @@ var zodValidationHook = (result) => {
|
|
|
19508
19679
|
|
|
19509
19680
|
// src/app.ts
|
|
19510
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
|
+
}
|
|
19511
19713
|
function withAuth(router, middleware) {
|
|
19512
19714
|
const shell = new OpenAPIHono20();
|
|
19513
19715
|
shell.use("*", middleware);
|
|
@@ -19628,8 +19830,13 @@ function createServerApp(deps) {
|
|
|
19628
19830
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
19629
19831
|
resolveWebSearchProviderStore: deps.resolveWebSearchProviderStore,
|
|
19630
19832
|
activeTurns: deps.activeTurns,
|
|
19631
|
-
|
|
19833
|
+
resolveTurnSkillsStore: deps.resolveTurnSkillsStore
|
|
19632
19834
|
};
|
|
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());
|
|
19839
|
+
app.use("/api/*", httpMetrics.middleware);
|
|
19633
19840
|
if (config_default.ACCESS_LOGS) {
|
|
19634
19841
|
app.use("*", createAccessLogMiddleware(deps.logger));
|
|
19635
19842
|
}
|
|
@@ -19638,6 +19845,7 @@ function createServerApp(deps) {
|
|
|
19638
19845
|
}
|
|
19639
19846
|
app.use("*", createRequestBodyLimitMiddleware(config_default.MAX_REQUEST_BODY_BYTES));
|
|
19640
19847
|
app.get("/healthz", (c) => c.json({ status: "ok", version: PACKAGE_VERSION }));
|
|
19848
|
+
app.get("/metrics", httpMetrics.handler);
|
|
19641
19849
|
app.route(
|
|
19642
19850
|
"/api/v1/auth",
|
|
19643
19851
|
createAuthRouter({
|
|
@@ -19663,7 +19871,7 @@ function createServerApp(deps) {
|
|
|
19663
19871
|
"/api/v1/models",
|
|
19664
19872
|
withAuth(
|
|
19665
19873
|
createModelsRouter({
|
|
19666
|
-
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19874
|
+
resolveModelProviderStore: (c) => deps.resolveModelProviderStore({ c }),
|
|
19667
19875
|
withTransaction: deps.withTransaction,
|
|
19668
19876
|
resolveRequestContext
|
|
19669
19877
|
}),
|
|
@@ -19687,7 +19895,7 @@ function createServerApp(deps) {
|
|
|
19687
19895
|
"/api/v1/mcp-servers/oauth",
|
|
19688
19896
|
createMcpOAuthRouter({
|
|
19689
19897
|
tokenStore: deps.tokenStore,
|
|
19690
|
-
mcpServerStore: deps.resolveMcpServerStore(),
|
|
19898
|
+
mcpServerStore: deps.resolveMcpServerStore({}),
|
|
19691
19899
|
logger: deps.logger,
|
|
19692
19900
|
resolveSession: (c) => tryAuthenticate({ authenticator: deps.authenticator, context: c })
|
|
19693
19901
|
})
|
|
@@ -19696,7 +19904,7 @@ function createServerApp(deps) {
|
|
|
19696
19904
|
"/api/v1/mcp-servers",
|
|
19697
19905
|
withAuth(
|
|
19698
19906
|
createMcpServersRouter({
|
|
19699
|
-
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19907
|
+
resolveMcpServerStore: (c) => deps.resolveMcpServerStore({ c }),
|
|
19700
19908
|
tokenStore: deps.tokenStore,
|
|
19701
19909
|
withTransaction: deps.withTransaction,
|
|
19702
19910
|
logger: deps.logger,
|
|
@@ -19709,7 +19917,7 @@ function createServerApp(deps) {
|
|
|
19709
19917
|
"/api/v1/skills",
|
|
19710
19918
|
withAuth(
|
|
19711
19919
|
createAvailableSkillsRouter({
|
|
19712
|
-
resolveSkillStore: deps.resolveSkillStore,
|
|
19920
|
+
resolveSkillStore: (c) => deps.resolveSkillStore({ c }),
|
|
19713
19921
|
withTransaction: deps.withTransaction,
|
|
19714
19922
|
resolveRequestContext
|
|
19715
19923
|
}),
|
|
@@ -19721,9 +19929,9 @@ function createServerApp(deps) {
|
|
|
19721
19929
|
withAuth(
|
|
19722
19930
|
createAgentsRouter({
|
|
19723
19931
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19724
|
-
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19725
|
-
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19726
|
-
resolveSkillStore: deps.resolveSkillStore,
|
|
19932
|
+
resolveModelProviderStore: (c) => deps.resolveModelProviderStore({ c }),
|
|
19933
|
+
resolveMcpServerStore: (c) => deps.resolveMcpServerStore({ c }),
|
|
19934
|
+
resolveSkillStore: (c) => deps.resolveSkillStore({ c }),
|
|
19727
19935
|
resolveSandboxProviderStore: deps.resolveSandboxProviderStore,
|
|
19728
19936
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
19729
19937
|
resolveWebSearchProviderStore: deps.resolveWebSearchProviderStore,
|
|
@@ -19782,7 +19990,7 @@ function createServerApp(deps) {
|
|
|
19782
19990
|
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19783
19991
|
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19784
19992
|
tokenStore: deps.tokenStore,
|
|
19785
|
-
resolveSkillStore: deps.resolveSkillStore,
|
|
19993
|
+
resolveSkillStore: (c) => deps.resolveSkillStore({ c }),
|
|
19786
19994
|
resolveSandboxProviderStore: deps.resolveSandboxProviderStore,
|
|
19787
19995
|
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
19788
19996
|
resolveWebSearchProviderStore: deps.resolveWebSearchProviderStore,
|
|
@@ -19869,7 +20077,7 @@ function createServerApp(deps) {
|
|
|
19869
20077
|
activeTurns: deps.activeTurns,
|
|
19870
20078
|
resolveModelProviderStore: deps.resolveModelProviderStore,
|
|
19871
20079
|
resolveMcpServerStore: deps.resolveMcpServerStore,
|
|
19872
|
-
|
|
20080
|
+
resolveTurnSkillsStore: deps.resolveTurnSkillsStore,
|
|
19873
20081
|
resolveAgentStore: deps.resolveAgentStore,
|
|
19874
20082
|
eventSubscriptions: deps.eventSubscriptions,
|
|
19875
20083
|
resolveSandboxProviderStore: deps.resolveSandboxProviderStore,
|
|
@@ -20074,7 +20282,7 @@ function loadYamlAtPath(filePath, schema) {
|
|
|
20074
20282
|
}
|
|
20075
20283
|
|
|
20076
20284
|
// src/catalog/mcpCatalog.gen.ts
|
|
20077
|
-
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";
|
|
20078
20286
|
|
|
20079
20287
|
// src/catalog/McpCatalog.ts
|
|
20080
20288
|
var McpCatalog = class _McpCatalog {
|
|
@@ -20100,7 +20308,7 @@ var McpCatalog = class _McpCatalog {
|
|
|
20100
20308
|
init_config();
|
|
20101
20309
|
|
|
20102
20310
|
// src/catalog/modelCatalog.gen.ts
|
|
20103
|
-
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";
|
|
20104
20312
|
|
|
20105
20313
|
// src/catalog/ModelCatalog.ts
|
|
20106
20314
|
var ModelCatalog = class _ModelCatalog {
|
|
@@ -20590,7 +20798,7 @@ import { every } from "hono/combine";
|
|
|
20590
20798
|
import { compress } from "hono/compress";
|
|
20591
20799
|
import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
|
|
20592
20800
|
import path3 from "path";
|
|
20593
|
-
var SERVER_PATH_PREFIXES = ["/api", "/healthz"];
|
|
20801
|
+
var SERVER_PATH_PREFIXES = ["/api", "/healthz", "/metrics"];
|
|
20594
20802
|
var HASHED_ASSET_PREFIX = "/assets/";
|
|
20595
20803
|
var IMMUTABLE_CACHE_CONTROL = "public, max-age=31536000, immutable";
|
|
20596
20804
|
var REVALIDATE_CACHE_CONTROL = "no-cache";
|
|
@@ -20664,80 +20872,6 @@ function mountFrontend(app, options) {
|
|
|
20664
20872
|
return true;
|
|
20665
20873
|
}
|
|
20666
20874
|
|
|
20667
|
-
// src/logger.ts
|
|
20668
|
-
import winston from "winston";
|
|
20669
|
-
var STANDALONE_META_SKIP = /* @__PURE__ */ new Set(["level", "message", "timestamp", "version", "component", "stack", "splat"]);
|
|
20670
|
-
function shouldColorize() {
|
|
20671
|
-
const noColor = process.env["NO_COLOR"];
|
|
20672
|
-
if (noColor !== void 0 && noColor !== "") {
|
|
20673
|
-
return false;
|
|
20674
|
-
}
|
|
20675
|
-
const forceColor = process.env["FORCE_COLOR"];
|
|
20676
|
-
if (forceColor === "0") {
|
|
20677
|
-
return false;
|
|
20678
|
-
}
|
|
20679
|
-
if (forceColor !== void 0 && forceColor !== "") {
|
|
20680
|
-
return true;
|
|
20681
|
-
}
|
|
20682
|
-
return process.stderr.isTTY;
|
|
20683
|
-
}
|
|
20684
|
-
function standaloneMeta(info) {
|
|
20685
|
-
const copied = { ...info };
|
|
20686
|
-
const meta = {};
|
|
20687
|
-
for (const key of Object.keys(copied)) {
|
|
20688
|
-
if (STANDALONE_META_SKIP.has(key)) {
|
|
20689
|
-
continue;
|
|
20690
|
-
}
|
|
20691
|
-
meta[key] = copied[key];
|
|
20692
|
-
}
|
|
20693
|
-
if (Object.keys(meta).length === 0) {
|
|
20694
|
-
return "";
|
|
20695
|
-
}
|
|
20696
|
-
return ` ${JSON.stringify(meta)}`;
|
|
20697
|
-
}
|
|
20698
|
-
function standaloneFormat(color) {
|
|
20699
|
-
const parts = [
|
|
20700
|
-
winston.format.timestamp({ format: "HH:mm:ss" }),
|
|
20701
|
-
winston.format.errors({ stack: true })
|
|
20702
|
-
];
|
|
20703
|
-
if (color) {
|
|
20704
|
-
parts.push(winston.format.colorize({ level: true }));
|
|
20705
|
-
}
|
|
20706
|
-
parts.push(
|
|
20707
|
-
winston.format.printf((info) => {
|
|
20708
|
-
const extra = standaloneMeta(info);
|
|
20709
|
-
const stack = typeof info["stack"] === "string" ? `
|
|
20710
|
-
${info["stack"]}` : "";
|
|
20711
|
-
return `${String(info["timestamp"])} ${info.level} ${String(info.message)}${extra}${stack}`;
|
|
20712
|
-
})
|
|
20713
|
-
);
|
|
20714
|
-
return winston.format.combine(...parts);
|
|
20715
|
-
}
|
|
20716
|
-
function jsonFormat() {
|
|
20717
|
-
return winston.format.combine(
|
|
20718
|
-
winston.format.timestamp(),
|
|
20719
|
-
winston.format.errors({ stack: true }),
|
|
20720
|
-
winston.format.json()
|
|
20721
|
-
);
|
|
20722
|
-
}
|
|
20723
|
-
function serverLogFormat(options) {
|
|
20724
|
-
if (options.standalone) {
|
|
20725
|
-
return standaloneFormat(shouldColorize());
|
|
20726
|
-
}
|
|
20727
|
-
return jsonFormat();
|
|
20728
|
-
}
|
|
20729
|
-
function createLogger(options) {
|
|
20730
|
-
return winston.createLogger({
|
|
20731
|
-
level: options.level,
|
|
20732
|
-
defaultMeta: { version: options.version, component: options.component },
|
|
20733
|
-
format: serverLogFormat({ standalone: options.standalone }),
|
|
20734
|
-
transports: [new winston.transports.Console()]
|
|
20735
|
-
});
|
|
20736
|
-
}
|
|
20737
|
-
function createServerLogger(options) {
|
|
20738
|
-
return createLogger({ ...options, component: "server" });
|
|
20739
|
-
}
|
|
20740
|
-
|
|
20741
20875
|
// src/runtime/activeTurns.ts
|
|
20742
20876
|
import "@truefoundry/trueforge-core/agent-session";
|
|
20743
20877
|
function activeTurnKey(sessionId, turnId) {
|
|
@@ -21091,6 +21225,17 @@ init_skill();
|
|
|
21091
21225
|
var X_TFG_MCP = "x-tfg-mcp";
|
|
21092
21226
|
var X_TFG_SKILLS = "x-tfg-skills";
|
|
21093
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
|
+
}
|
|
21094
21239
|
function parseInlineMcpServers(raw) {
|
|
21095
21240
|
return parseByName({
|
|
21096
21241
|
raw,
|
|
@@ -21112,7 +21257,7 @@ function parseInlineSkills(raw) {
|
|
|
21112
21257
|
raw,
|
|
21113
21258
|
header: X_TFG_SKILLS,
|
|
21114
21259
|
parseEntry: (name, definition) => {
|
|
21115
|
-
const parsed =
|
|
21260
|
+
const parsed = GitSkillSchema.safeParse({ ...definition, type: "git", name });
|
|
21116
21261
|
return parsed.success ? { ok: true, manifest: parsed.data } : { ok: false, reason: "is not a valid skill definition" };
|
|
21117
21262
|
}
|
|
21118
21263
|
});
|
|
@@ -21160,74 +21305,67 @@ function isPlainObject(value) {
|
|
|
21160
21305
|
init_gitSkillMounts();
|
|
21161
21306
|
import { HTTPException as HTTPException23 } from "hono/http-exception";
|
|
21162
21307
|
var InlineSkillStore = class {
|
|
21163
|
-
#inner;
|
|
21164
21308
|
#inline;
|
|
21165
21309
|
constructor(input) {
|
|
21166
|
-
this.#inner = input.inner;
|
|
21167
21310
|
this.#inline = input.inline;
|
|
21168
21311
|
}
|
|
21169
|
-
|
|
21312
|
+
listSkills(input, _transaction) {
|
|
21313
|
+
void _transaction;
|
|
21170
21314
|
if (input.names === void 0) {
|
|
21171
|
-
return
|
|
21315
|
+
return Promise.resolve([]);
|
|
21172
21316
|
}
|
|
21173
21317
|
if (input.names.length === 0) {
|
|
21174
|
-
return [];
|
|
21318
|
+
return Promise.resolve([]);
|
|
21175
21319
|
}
|
|
21176
|
-
const
|
|
21177
|
-
|
|
21178
|
-
const registryRecords = registryNames.length > 0 ? await this.#inner.listSkills({ ...input, names: registryNames }, transaction) : [];
|
|
21179
|
-
return [...inlineRecords, ...registryRecords];
|
|
21320
|
+
const names = input.names;
|
|
21321
|
+
return Promise.resolve().then(() => names.map((name) => this.#toRecord({ tenant_id: input.tenant_id, name })));
|
|
21180
21322
|
}
|
|
21181
|
-
createSkill(
|
|
21182
|
-
|
|
21323
|
+
createSkill(_input, _transaction) {
|
|
21324
|
+
void _input;
|
|
21325
|
+
void _transaction;
|
|
21326
|
+
return unsupportedInlineSkillWrite();
|
|
21183
21327
|
}
|
|
21184
|
-
upsertSkill(
|
|
21185
|
-
|
|
21328
|
+
upsertSkill(_input, _transaction) {
|
|
21329
|
+
void _input;
|
|
21330
|
+
void _transaction;
|
|
21331
|
+
return unsupportedInlineSkillWrite();
|
|
21186
21332
|
}
|
|
21187
|
-
deleteSkill(
|
|
21188
|
-
|
|
21333
|
+
deleteSkill(_input, _transaction) {
|
|
21334
|
+
void _input;
|
|
21335
|
+
void _transaction;
|
|
21336
|
+
return unsupportedInlineSkillWrite();
|
|
21189
21337
|
}
|
|
21190
21338
|
listSkillVersions(input) {
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
|
|
21194
|
-
|
|
21339
|
+
return Promise.resolve().then(() => {
|
|
21340
|
+
this.#require(input.name);
|
|
21341
|
+
return [];
|
|
21342
|
+
});
|
|
21195
21343
|
}
|
|
21196
|
-
async validateAgentSkills(input,
|
|
21197
|
-
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
}
|
|
21201
|
-
if (registrySkills.length > 0) {
|
|
21202
|
-
await this.#inner.validateAgentSkills({ tenant_id: input.tenant_id, skills: registrySkills }, transaction);
|
|
21203
|
-
}
|
|
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 });
|
|
21204
21348
|
}
|
|
21205
21349
|
async resolveTurnSkills(input) {
|
|
21206
|
-
|
|
21207
|
-
|
|
21208
|
-
const registryMounts = registrySkills.length > 0 ? await this.#inner.resolveTurnSkills({ tenant_id: input.tenant_id, skills: registrySkills }) : [];
|
|
21209
|
-
const mounts = [...inlineMounts, ...registryMounts];
|
|
21210
|
-
const seen = /* @__PURE__ */ new Set();
|
|
21211
|
-
for (const mount of mounts) {
|
|
21212
|
-
if (seen.has(mount.name)) {
|
|
21213
|
-
throw new HTTPException23(422, {
|
|
21214
|
-
message: `Agent skills must have unique names; duplicate skill name(s): ${mount.name}`
|
|
21215
|
-
});
|
|
21216
|
-
}
|
|
21217
|
-
seen.add(mount.name);
|
|
21218
|
-
}
|
|
21219
|
-
return mounts;
|
|
21350
|
+
this.#assertNamesInInline(input.skills.map((skill) => skill.name));
|
|
21351
|
+
return resolveGitTurnSkills(this, { tenant_id: input.tenant_id, skills: input.skills });
|
|
21220
21352
|
}
|
|
21221
|
-
#
|
|
21222
|
-
|
|
21223
|
-
|
|
21224
|
-
|
|
21353
|
+
#assertNamesInInline(names) {
|
|
21354
|
+
for (const name of names) {
|
|
21355
|
+
this.#require(name);
|
|
21356
|
+
}
|
|
21225
21357
|
}
|
|
21226
|
-
#
|
|
21227
|
-
const manifest = this.#inline[
|
|
21358
|
+
#require(name) {
|
|
21359
|
+
const manifest = this.#inline[name];
|
|
21228
21360
|
if (manifest === void 0) {
|
|
21229
|
-
|
|
21361
|
+
throw new HTTPException23(422, {
|
|
21362
|
+
message: `Unknown skill "${name}" \u2014 not present in ${X_TFG_SKILLS}`
|
|
21363
|
+
});
|
|
21230
21364
|
}
|
|
21365
|
+
return manifest;
|
|
21366
|
+
}
|
|
21367
|
+
#toRecord(input) {
|
|
21368
|
+
const manifest = this.#require(input.name);
|
|
21231
21369
|
const now2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
21232
21370
|
return {
|
|
21233
21371
|
tenant_id: input.tenant_id,
|
|
@@ -21238,6 +21376,11 @@ var InlineSkillStore = class {
|
|
|
21238
21376
|
};
|
|
21239
21377
|
}
|
|
21240
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
|
+
}
|
|
21241
21384
|
|
|
21242
21385
|
// src/truefoundry/perServerMcpHeaders.ts
|
|
21243
21386
|
import { HTTPException as HTTPException24 } from "hono/http-exception";
|
|
@@ -23269,23 +23412,30 @@ function buildResolveSkillStore(options) {
|
|
|
23269
23412
|
context: requestContext
|
|
23270
23413
|
});
|
|
23271
23414
|
}
|
|
23272
|
-
function
|
|
23415
|
+
function buildResolveTurnSkillsStore(options) {
|
|
23273
23416
|
const { persistenceStore, client: client2 } = options;
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
|
|
23277
|
-
|
|
23417
|
+
const registry = client2 ? new TrueFoundryAdminSkillStore({ client: client2 }) : persistenceStore;
|
|
23418
|
+
return (input) => {
|
|
23419
|
+
if (input.inlineSkills !== void 0) {
|
|
23420
|
+
return new InlineSkillStore({ inline: input.inlineSkills });
|
|
23421
|
+
}
|
|
23422
|
+
return registry;
|
|
23423
|
+
};
|
|
23278
23424
|
}
|
|
23279
23425
|
function buildResolveModelProviderStore(options) {
|
|
23280
|
-
return (
|
|
23426
|
+
return (input) => {
|
|
23281
23427
|
const { persistenceStore, client: client2 } = options;
|
|
23282
23428
|
if (client2) {
|
|
23283
|
-
|
|
23429
|
+
const store = new TrueFoundryModelProviderStore({
|
|
23284
23430
|
client: client2,
|
|
23285
|
-
requestContext: rc,
|
|
23286
|
-
agent: runAsAgent,
|
|
23431
|
+
requestContext: input.rc,
|
|
23432
|
+
agent: input.runAsAgent,
|
|
23287
23433
|
logger: options.logger
|
|
23288
23434
|
});
|
|
23435
|
+
if (input.inlineModelProviders !== void 0) {
|
|
23436
|
+
return new InlineModelProviderStore({ inner: store, inline: input.inlineModelProviders });
|
|
23437
|
+
}
|
|
23438
|
+
return store;
|
|
23289
23439
|
}
|
|
23290
23440
|
return persistenceStore;
|
|
23291
23441
|
};
|
|
@@ -23296,16 +23446,20 @@ function buildResolveMcpServerStore(options) {
|
|
|
23296
23446
|
tokenStore: options.tokenStore,
|
|
23297
23447
|
clientName: configuration2.MCP_DCR_OAUTH_CLIENT_NAME
|
|
23298
23448
|
});
|
|
23299
|
-
return (
|
|
23449
|
+
return (input) => {
|
|
23300
23450
|
const { client: client2 } = options;
|
|
23301
23451
|
if (client2) {
|
|
23302
|
-
|
|
23452
|
+
const store = new TrueFoundryMcpServerStore({
|
|
23303
23453
|
client: client2,
|
|
23304
|
-
requestContext: rc,
|
|
23305
|
-
agent: runAsAgent,
|
|
23454
|
+
requestContext: input.rc,
|
|
23455
|
+
agent: input.runAsAgent,
|
|
23306
23456
|
logger: options.logger,
|
|
23307
|
-
...perServerHeaders === void 0 ? {} : { perServerHeaders }
|
|
23457
|
+
...input.perServerHeaders === void 0 ? {} : { perServerHeaders: input.perServerHeaders }
|
|
23308
23458
|
});
|
|
23459
|
+
if (input.inlineMcpServers !== void 0) {
|
|
23460
|
+
return new InlineMcpServerStore({ inner: store, inline: input.inlineMcpServers });
|
|
23461
|
+
}
|
|
23462
|
+
return store;
|
|
23309
23463
|
}
|
|
23310
23464
|
return withAuthMcpPersistenceStore;
|
|
23311
23465
|
};
|
|
@@ -23411,7 +23565,10 @@ async function createStandalonePersistence(options) {
|
|
|
23411
23565
|
agentStore,
|
|
23412
23566
|
sandboxEnvironmentStore,
|
|
23413
23567
|
sandboxProviderStore,
|
|
23414
|
-
|
|
23568
|
+
resolveTurnSkillsStore: buildResolveTurnSkillsStore({
|
|
23569
|
+
persistenceStore: skillStore,
|
|
23570
|
+
client: void 0
|
|
23571
|
+
}),
|
|
23415
23572
|
destroyDb: () => db.destroy(),
|
|
23416
23573
|
redis: void 0,
|
|
23417
23574
|
serviceFoundryClient: void 0
|
|
@@ -23497,7 +23654,7 @@ async function createDistributedPersistence(options) {
|
|
|
23497
23654
|
const skillStore = new PostgresSkillStore2(db);
|
|
23498
23655
|
const agentStore = new PostgresAgentStore3(db);
|
|
23499
23656
|
const sandboxEnvironmentStore = wrapSandboxEnvironmentStore(new PostgresSandboxEnvironmentStore2(db));
|
|
23500
|
-
const
|
|
23657
|
+
const resolveTurnSkillsStore = buildResolveTurnSkillsStore({
|
|
23501
23658
|
persistenceStore: skillStore,
|
|
23502
23659
|
client: serviceFoundryClient
|
|
23503
23660
|
});
|
|
@@ -23543,7 +23700,7 @@ async function createDistributedPersistence(options) {
|
|
|
23543
23700
|
agentStore,
|
|
23544
23701
|
sandboxEnvironmentStore,
|
|
23545
23702
|
sandboxProviderStore: resolveSandboxProviderStore(STANDALONE_REQUEST_CONTEXT),
|
|
23546
|
-
|
|
23703
|
+
resolveTurnSkillsStore,
|
|
23547
23704
|
destroyDb: () => db.destroy(),
|
|
23548
23705
|
redis: await connectRedis2({
|
|
23549
23706
|
connection: redisConnection,
|
|
@@ -23573,7 +23730,7 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23573
23730
|
mcpOAuthStore,
|
|
23574
23731
|
agentStore,
|
|
23575
23732
|
sandboxEnvironmentStore,
|
|
23576
|
-
|
|
23733
|
+
resolveTurnSkillsStore,
|
|
23577
23734
|
destroyDb,
|
|
23578
23735
|
redis,
|
|
23579
23736
|
serviceFoundryClient
|
|
@@ -23613,49 +23770,76 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23613
23770
|
withTransaction,
|
|
23614
23771
|
logger: logger2
|
|
23615
23772
|
}) : void 0;
|
|
23616
|
-
const
|
|
23617
|
-
|
|
23618
|
-
|
|
23619
|
-
|
|
23620
|
-
|
|
23621
|
-
|
|
23622
|
-
|
|
23623
|
-
|
|
23773
|
+
const isTrueFoundryMode = isTrueFoundryModeEnabled2(configuration2);
|
|
23774
|
+
const resolveModelProviderStore = (input) => {
|
|
23775
|
+
const { c, runAsAgent, allowInlineResources = false } = input;
|
|
23776
|
+
const rawInlineModelsHeader = c.req.header(X_TFG_MODELS);
|
|
23777
|
+
if (rawInlineModelsHeader !== void 0) {
|
|
23778
|
+
assertInlineResourceHeadersAllowed({
|
|
23779
|
+
headerNames: [X_TFG_MODELS],
|
|
23780
|
+
isTrueFoundryMode,
|
|
23781
|
+
allowInlineResources
|
|
23782
|
+
});
|
|
23624
23783
|
}
|
|
23625
|
-
return
|
|
23784
|
+
return persistence.resolveModelProviderStore({
|
|
23785
|
+
rc: resolveRequestContext(c),
|
|
23786
|
+
...runAsAgent !== void 0 ? { runAsAgent } : {},
|
|
23787
|
+
...rawInlineModelsHeader !== void 0 ? { inlineModelProviders: parseInlineModelProviders(rawInlineModelsHeader) } : {}
|
|
23788
|
+
});
|
|
23626
23789
|
};
|
|
23627
|
-
const resolveMcpServerStore = (
|
|
23790
|
+
const resolveMcpServerStore = (input) => {
|
|
23791
|
+
const { c, runAsAgent, allowInlineResources = false } = input;
|
|
23628
23792
|
if (c === void 0) {
|
|
23629
23793
|
return mcpOAuthStore;
|
|
23630
23794
|
}
|
|
23631
23795
|
const rawPerServerHeaders = c.req.header(X_TFG_MCP_HEADERS);
|
|
23632
|
-
const
|
|
23633
|
-
|
|
23634
|
-
|
|
23635
|
-
|
|
23636
|
-
|
|
23637
|
-
|
|
23638
|
-
|
|
23639
|
-
}
|
|
23640
|
-
const rawInline = c.req.header(X_TFG_MCP);
|
|
23641
|
-
if (rawInline === void 0) {
|
|
23642
|
-
return store;
|
|
23796
|
+
const rawInlineMcpServersHeader = c.req.header(X_TFG_MCP);
|
|
23797
|
+
if (rawInlineMcpServersHeader !== void 0) {
|
|
23798
|
+
assertInlineResourceHeadersAllowed({
|
|
23799
|
+
headerNames: [X_TFG_MCP],
|
|
23800
|
+
isTrueFoundryMode,
|
|
23801
|
+
allowInlineResources
|
|
23802
|
+
});
|
|
23643
23803
|
}
|
|
23644
|
-
return
|
|
23804
|
+
return persistence.resolveMcpServerStore({
|
|
23805
|
+
rc: resolveRequestContext(c),
|
|
23806
|
+
...runAsAgent !== void 0 ? { runAsAgent } : {},
|
|
23807
|
+
...rawPerServerHeaders !== void 0 ? { perServerHeaders: parsePerServerMcpHeaders(rawPerServerHeaders) } : {},
|
|
23808
|
+
...rawInlineMcpServersHeader !== void 0 ? { inlineMcpServers: parseInlineMcpServers(rawInlineMcpServersHeader) } : {}
|
|
23809
|
+
});
|
|
23645
23810
|
};
|
|
23646
23811
|
const resolveAgentStore = (c) => persistence.resolveAgentStore(resolveRequestContext(c));
|
|
23647
23812
|
const resolveSandboxProviderStore = (c) => persistence.resolveSandboxProviderStore(resolveRequestContext(c));
|
|
23648
23813
|
const resolveWebSearchProviderStore = (c) => persistence.resolveWebSearchProviderStore(resolveRequestContext(c));
|
|
23649
|
-
const resolveSkillStore = (
|
|
23650
|
-
const
|
|
23651
|
-
|
|
23652
|
-
|
|
23814
|
+
const resolveSkillStore = (input) => {
|
|
23815
|
+
const { c, allowInlineResources = false } = input;
|
|
23816
|
+
const rawInlineSkillsHeader = c.req.header(X_TFG_SKILLS);
|
|
23817
|
+
if (rawInlineSkillsHeader !== void 0) {
|
|
23818
|
+
assertInlineResourceHeadersAllowed({
|
|
23819
|
+
headerNames: [X_TFG_SKILLS],
|
|
23820
|
+
isTrueFoundryMode,
|
|
23821
|
+
allowInlineResources
|
|
23822
|
+
});
|
|
23823
|
+
return new InlineSkillStore({ inline: parseInlineSkills(rawInlineSkillsHeader) });
|
|
23653
23824
|
}
|
|
23654
|
-
|
|
23655
|
-
|
|
23656
|
-
|
|
23825
|
+
return persistence.resolveSkillStore(resolveRequestContext(c));
|
|
23826
|
+
};
|
|
23827
|
+
const resolveTurnSkillsStoreForRequest = (input) => {
|
|
23828
|
+
const { c, allowInlineResources = false } = input;
|
|
23829
|
+
if (c === void 0) {
|
|
23830
|
+
return resolveTurnSkillsStore({});
|
|
23831
|
+
}
|
|
23832
|
+
const rawInlineSkillsHeader = c.req.header(X_TFG_SKILLS);
|
|
23833
|
+
if (rawInlineSkillsHeader !== void 0) {
|
|
23834
|
+
assertInlineResourceHeadersAllowed({
|
|
23835
|
+
headerNames: [X_TFG_SKILLS],
|
|
23836
|
+
isTrueFoundryMode,
|
|
23837
|
+
allowInlineResources
|
|
23838
|
+
});
|
|
23657
23839
|
}
|
|
23658
|
-
return
|
|
23840
|
+
return resolveTurnSkillsStore(
|
|
23841
|
+
rawInlineSkillsHeader === void 0 ? {} : { inlineSkills: parseInlineSkills(rawInlineSkillsHeader) }
|
|
23842
|
+
);
|
|
23659
23843
|
};
|
|
23660
23844
|
const app = createServerApp({
|
|
23661
23845
|
modelCatalog: ModelCatalog.load(),
|
|
@@ -23669,13 +23853,13 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23669
23853
|
resolveSandboxProviderStore,
|
|
23670
23854
|
resolveWebSearchProviderStore,
|
|
23671
23855
|
resolveSkillStore,
|
|
23856
|
+
resolveTurnSkillsStore: resolveTurnSkillsStoreForRequest,
|
|
23672
23857
|
withTransaction,
|
|
23673
23858
|
tokenStore,
|
|
23674
23859
|
scheduleStore,
|
|
23675
23860
|
agentStore,
|
|
23676
23861
|
sandboxEnvironmentStore,
|
|
23677
23862
|
sandboxProviderStore: persistence.sandboxProviderStore,
|
|
23678
|
-
turnSkillsResolverStore,
|
|
23679
23863
|
sessionStore,
|
|
23680
23864
|
sessionMetricsStore,
|
|
23681
23865
|
sessions,
|
|
@@ -23693,8 +23877,7 @@ async function createServerRuntime(persistence, logger2) {
|
|
|
23693
23877
|
try {
|
|
23694
23878
|
const logger2 = createServerLogger({
|
|
23695
23879
|
level: configuration2.LOG_LEVEL,
|
|
23696
|
-
standalone: configuration2.STANDALONE
|
|
23697
|
-
version: PACKAGE_VERSION
|
|
23880
|
+
standalone: configuration2.STANDALONE
|
|
23698
23881
|
});
|
|
23699
23882
|
await initSentry(configuration2, logger2, { tags: { component: "server" } });
|
|
23700
23883
|
if (configuration2.STANDALONE) {
|