@truefoundry/trueforge 0.185.1 → 0.186.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_frontend/assets/{AgentCodeSnippets-H343VMKM-Bw48fB4V.js → AgentCodeSnippets-D2J3IH37-CQZZoOBC.js} +1 -1
- package/dist/_frontend/assets/AgentCodeSnippets-D2J3IH37-CQZZoOBC.js.br +0 -0
- package/dist/_frontend/assets/AgentCodeSnippets-D2J3IH37-CQZZoOBC.js.gz +0 -0
- package/dist/_frontend/assets/{AgentMetricChart-2A3Q73AO-ByPINDhM.js → AgentMetricChart-TCZEIIUV-5Rtf3TvY.js} +1 -1
- package/dist/_frontend/assets/AgentMetricChart-TCZEIIUV-5Rtf3TvY.js.br +0 -0
- package/dist/_frontend/assets/AgentMetricChart-TCZEIIUV-5Rtf3TvY.js.gz +0 -0
- package/dist/_frontend/assets/{AgentOverview-PLZP4BE4-B4luQD6n.js → AgentOverview-ZSZENAFZ-D0HM5BSW.js} +1 -1
- package/dist/_frontend/assets/AgentOverview-ZSZENAFZ-D0HM5BSW.js.br +0 -0
- package/dist/_frontend/assets/AgentOverview-ZSZENAFZ-D0HM5BSW.js.gz +0 -0
- package/dist/_frontend/assets/{AgentSessionEventTimeline-YANYUDA5-CZsR7Mad.js → AgentSessionEventTimeline-26TTGY3F-6FMUgy7r.js} +1 -1
- package/dist/_frontend/assets/AgentSessionEventTimeline-26TTGY3F-6FMUgy7r.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimeline-26TTGY3F-6FMUgy7r.js.gz +0 -0
- package/dist/_frontend/assets/{AgentSessionEventTimelineChart-E4JMM6YS-qdgLjjB4.js → AgentSessionEventTimelineChart-SV6ZYNU2-CNDMPnla.js} +1 -1
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-SV6ZYNU2-CNDMPnla.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-SV6ZYNU2-CNDMPnla.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessions-W2EDVBCS-lqR7dkcO.js +1 -0
- package/dist/_frontend/assets/AgentSessions-W2EDVBCS-lqR7dkcO.js.br +0 -0
- package/dist/_frontend/assets/AgentSessions-W2EDVBCS-lqR7dkcO.js.gz +0 -0
- package/dist/_frontend/assets/{ConnectorSettings-GKNCNULP-DWw6csCc.js → ConnectorSettings-E3KBW7HI-CMwC3bcI.js} +1 -1
- package/dist/_frontend/assets/ConnectorSettings-E3KBW7HI-CMwC3bcI.js.br +0 -0
- package/dist/_frontend/assets/ConnectorSettings-E3KBW7HI-CMwC3bcI.js.gz +0 -0
- package/dist/_frontend/assets/{DockLayout-IE3I37YU-CqOh_TZX.js → DockLayout-OYD7YJSD-CqCN5TbW.js} +1 -1
- package/dist/_frontend/assets/DrawerLayout-IGDKPIOC-CF0zSf6U.js +2 -0
- package/dist/_frontend/assets/DrawerLayout-IGDKPIOC-CF0zSf6U.js.br +0 -0
- package/dist/_frontend/assets/DrawerLayout-IGDKPIOC-CF0zSf6U.js.gz +0 -0
- package/dist/_frontend/assets/{EnvironmentsPage-Y7GUFDX6-B4lzlmZl.js → EnvironmentsPage-BUA2EGXE-Dt-L2w8t.js} +2 -2
- package/dist/_frontend/assets/EnvironmentsPage-BUA2EGXE-Dt-L2w8t.js.br +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-BUA2EGXE-Dt-L2w8t.js.gz +0 -0
- package/dist/_frontend/assets/{MemorySettings-4RRBDBV6-DeUiqqhK.js → MemorySettings-Y6HNEYIW-DL6nR8e0.js} +1 -1
- package/dist/_frontend/assets/MemorySettings-Y6HNEYIW-DL6nR8e0.js.br +0 -0
- package/dist/_frontend/assets/MemorySettings-Y6HNEYIW-DL6nR8e0.js.gz +0 -0
- package/dist/_frontend/assets/{ModelSettings-GYHM5IRX-CETYKyCX.js → ModelSettings-3RSWQ5WD-YyI5xGN4.js} +1 -1
- package/dist/_frontend/assets/ModelSettings-3RSWQ5WD-YyI5xGN4.js.br +0 -0
- package/dist/_frontend/assets/ModelSettings-3RSWQ5WD-YyI5xGN4.js.gz +0 -0
- package/dist/_frontend/assets/{SandboxSettings-64C4LPUD-Cnonjif3.js → SandboxSettings-YIEGCYQO-Bn_-fbRJ.js} +1 -1
- package/dist/_frontend/assets/SandboxSettings-YIEGCYQO-Bn_-fbRJ.js.br +0 -0
- package/dist/_frontend/assets/SandboxSettings-YIEGCYQO-Bn_-fbRJ.js.gz +0 -0
- package/dist/_frontend/assets/{SchedulesPage-7LTCQWDY-BZlW89Yr.js → SchedulesPage-OVDMYD6Q-DWmVgOrq.js} +1 -1
- package/dist/_frontend/assets/SchedulesPage-OVDMYD6Q-DWmVgOrq.js.br +0 -0
- package/dist/_frontend/assets/SchedulesPage-OVDMYD6Q-DWmVgOrq.js.gz +0 -0
- package/dist/_frontend/assets/SettingsBuilder-6WNST3GI-CQudqTjg.js +2 -0
- package/dist/_frontend/assets/SettingsBuilder-6WNST3GI-CQudqTjg.js.br +0 -0
- package/dist/_frontend/assets/SettingsBuilder-6WNST3GI-CQudqTjg.js.gz +0 -0
- package/dist/_frontend/assets/{ShellRouteSync-4T763MWC-Bk2ZHjFW.js → ShellRouteSync-4T763MWC-BOFQkqAR.js} +1 -1
- package/dist/_frontend/assets/ShellRouteSync-4T763MWC-BOFQkqAR.js.br +0 -0
- package/dist/_frontend/assets/ShellRouteSync-4T763MWC-BOFQkqAR.js.gz +0 -0
- package/dist/_frontend/assets/SidebarLayout-YWA6PPZM-CFjD1Kmo.js +2 -0
- package/dist/_frontend/assets/SidebarLayout-YWA6PPZM-CFjD1Kmo.js.br +0 -0
- package/dist/_frontend/assets/SidebarLayout-YWA6PPZM-CFjD1Kmo.js.gz +0 -0
- package/dist/_frontend/assets/{SkillSettings-2HF7EG6X-BjVk8qd8.js → SkillSettings-XLK6REIA-CJVGKalf.js} +1 -1
- package/dist/_frontend/assets/SkillSettings-XLK6REIA-CJVGKalf.js.br +0 -0
- package/dist/_frontend/assets/SkillSettings-XLK6REIA-CJVGKalf.js.gz +0 -0
- package/dist/_frontend/assets/{TrueForgeUIWithRouter-T3W5RMEH-DF5Vv3-l.js → TrueForgeUIWithRouter-LFJ4E5VL-o7uC8O0Z.js} +1 -1
- package/dist/_frontend/assets/WebSearchSettings-PKYKXD26-Ccfvu3fp.js +1 -0
- package/dist/_frontend/assets/WebSearchSettings-PKYKXD26-Ccfvu3fp.js.br +0 -0
- package/dist/_frontend/assets/WebSearchSettings-PKYKXD26-Ccfvu3fp.js.gz +0 -0
- package/dist/_frontend/assets/{WidgetLayout-VEILCOPB-CT3L-nt5.js → WidgetLayout-HQZFWVZ2-CW9j2zi5.js} +1 -1
- package/dist/_frontend/assets/WidgetLayout-HQZFWVZ2-CW9j2zi5.js.br +0 -0
- package/dist/_frontend/assets/WidgetLayout-HQZFWVZ2-CW9j2zi5.js.gz +0 -0
- package/dist/_frontend/assets/chunk-HED32BFK-CHoNWtNi.js +2 -0
- package/dist/_frontend/assets/chunk-HED32BFK-CHoNWtNi.js.br +0 -0
- package/dist/_frontend/assets/chunk-HED32BFK-CHoNWtNi.js.gz +0 -0
- package/dist/_frontend/assets/chunk-HK4WITDD-Dk6A8b9_.js +1 -0
- package/dist/_frontend/assets/chunk-HK4WITDD-Dk6A8b9_.js.br +0 -0
- package/dist/_frontend/assets/chunk-HK4WITDD-Dk6A8b9_.js.gz +0 -0
- package/dist/_frontend/assets/{chunk-4LY4NAUC-C1iAiAXz.js → chunk-HWOHXUGH-IwYpHY-Y.js} +1 -1
- package/dist/_frontend/assets/chunk-HWOHXUGH-IwYpHY-Y.js.br +0 -0
- package/dist/_frontend/assets/chunk-HWOHXUGH-IwYpHY-Y.js.gz +0 -0
- package/dist/_frontend/assets/{chunk-US5DQOBQ-Bu-huQ7M.js → chunk-LFIIKLPG-gJeIso6M.js} +1 -1
- package/dist/_frontend/assets/{chunk-OB3PAWPO-CcC39jqv.js → chunk-OB3PAWPO-B6HZEUGp.js} +1 -1
- package/dist/_frontend/assets/chunk-OB3PAWPO-B6HZEUGp.js.br +0 -0
- package/dist/_frontend/assets/chunk-OB3PAWPO-B6HZEUGp.js.gz +0 -0
- package/dist/_frontend/assets/chunk-OXW7TUTC-moy4-cpX.js +1 -0
- package/dist/_frontend/assets/chunk-OXW7TUTC-moy4-cpX.js.br +0 -0
- package/dist/_frontend/assets/chunk-OXW7TUTC-moy4-cpX.js.gz +0 -0
- package/dist/_frontend/assets/{cssMode-Dj2Xz6jz.js → cssMode-BHHgzHoT.js} +1 -1
- package/dist/_frontend/assets/cssMode-BHHgzHoT.js.br +0 -0
- package/dist/_frontend/assets/cssMode-BHHgzHoT.js.gz +0 -0
- package/dist/_frontend/assets/{freemarker2-943N0gt5.js → freemarker2-tWNHna9o.js} +1 -1
- package/dist/_frontend/assets/freemarker2-tWNHna9o.js.br +0 -0
- package/dist/_frontend/assets/freemarker2-tWNHna9o.js.gz +0 -0
- package/dist/_frontend/assets/{handlebars-BmWTi7ZS.js → handlebars-YCt9F20a.js} +1 -1
- package/dist/_frontend/assets/handlebars-YCt9F20a.js.br +0 -0
- package/dist/_frontend/assets/handlebars-YCt9F20a.js.gz +0 -0
- package/dist/_frontend/assets/{html-8lmTcm-G.js → html-Vo6CgJvZ.js} +1 -1
- package/dist/_frontend/assets/html-Vo6CgJvZ.js.br +0 -0
- package/dist/_frontend/assets/html-Vo6CgJvZ.js.gz +0 -0
- package/dist/_frontend/assets/{htmlMode-DfBGge2N.js → htmlMode-BkGzSsp7.js} +1 -1
- package/dist/_frontend/assets/htmlMode-BkGzSsp7.js.br +0 -0
- package/dist/_frontend/assets/htmlMode-BkGzSsp7.js.gz +0 -0
- package/dist/_frontend/assets/{index-BQmZxgUA.js → index-CdSOK6zy.js} +3 -3
- package/dist/_frontend/assets/index-CdSOK6zy.js.br +0 -0
- package/dist/_frontend/assets/index-CdSOK6zy.js.gz +0 -0
- package/dist/_frontend/assets/{index-CVbSocf1.js → index-DY4Vt5qS.js} +437 -352
- package/dist/_frontend/assets/index-DY4Vt5qS.js.br +0 -0
- package/dist/_frontend/assets/index-DY4Vt5qS.js.gz +0 -0
- package/dist/_frontend/assets/{javascript-BrPBFTYF.js → javascript-hhlexC1d.js} +1 -1
- package/dist/_frontend/assets/{jsonMode-BJ-YqiW2.js → jsonMode-CmaZrTmo.js} +1 -1
- package/dist/_frontend/assets/jsonMode-CmaZrTmo.js.br +0 -0
- package/dist/_frontend/assets/jsonMode-CmaZrTmo.js.gz +0 -0
- package/dist/_frontend/assets/{liquid-DHofx8Gl.js → liquid-B12Ow-wY.js} +1 -1
- package/dist/_frontend/assets/liquid-B12Ow-wY.js.br +0 -0
- package/dist/_frontend/assets/liquid-B12Ow-wY.js.gz +0 -0
- package/dist/_frontend/assets/{lspLanguageFeatures-C36LEzPR.js → lspLanguageFeatures-BAdtNMdy.js} +1 -1
- package/dist/_frontend/assets/lspLanguageFeatures-BAdtNMdy.js.br +0 -0
- package/dist/_frontend/assets/lspLanguageFeatures-BAdtNMdy.js.gz +0 -0
- package/dist/_frontend/assets/{mdx-DKcVoDZ1.js → mdx-DnqsUsp9.js} +1 -1
- package/dist/_frontend/assets/mdx-DnqsUsp9.js.br +0 -0
- package/dist/_frontend/assets/mdx-DnqsUsp9.js.gz +0 -0
- package/dist/_frontend/assets/{python-BJ1tC8V2.js → python-zclzTpCV.js} +1 -1
- package/dist/_frontend/assets/python-zclzTpCV.js.br +0 -0
- package/dist/_frontend/assets/python-zclzTpCV.js.gz +0 -0
- package/dist/_frontend/assets/{razor-DwNLptja.js → razor-DXCJzDhT.js} +1 -1
- package/dist/_frontend/assets/razor-DXCJzDhT.js.br +0 -0
- package/dist/_frontend/assets/razor-DXCJzDhT.js.gz +0 -0
- package/dist/_frontend/assets/{tsMode-LvSj4QG5.js → tsMode-ba0WSSwR.js} +1 -1
- package/dist/_frontend/assets/tsMode-ba0WSSwR.js.br +0 -0
- package/dist/_frontend/assets/tsMode-ba0WSSwR.js.gz +0 -0
- package/dist/_frontend/assets/{typescript-ByGf1nW8.js → typescript-Cxw8coCj.js} +1 -1
- package/dist/_frontend/assets/typescript-Cxw8coCj.js.br +0 -0
- package/dist/_frontend/assets/typescript-Cxw8coCj.js.gz +0 -0
- package/dist/_frontend/assets/{workers-Ds-LWqXu.js → workers-RQlmz_Lv.js} +1 -1
- package/dist/_frontend/assets/workers-RQlmz_Lv.js.br +0 -0
- package/dist/_frontend/assets/workers-RQlmz_Lv.js.gz +0 -0
- package/dist/_frontend/assets/{xml-D-KxU_aA.js → xml-Bb7-oq8W.js} +1 -1
- package/dist/_frontend/assets/xml-Bb7-oq8W.js.br +0 -0
- package/dist/_frontend/assets/xml-Bb7-oq8W.js.gz +0 -0
- package/dist/_frontend/assets/{yaml-Dctt39Xw.js → yaml-DqJHVcwV.js} +1 -1
- package/dist/_frontend/assets/yaml-DqJHVcwV.js.br +0 -0
- package/dist/_frontend/assets/yaml-DqJHVcwV.js.gz +0 -0
- package/dist/_frontend/index.html +1 -1
- package/dist/controller-main.js +6 -0
- package/dist/controller-main.js.map +1 -1
- package/dist/main.js +333 -164
- package/dist/main.js.map +1 -1
- package/dist/postgres/migrations/20260727_000001_init.js +6 -0
- package/dist/postgres/migrations/20260727_000001_init.js.map +1 -1
- package/dist/postgres/migrations/20261103_000001_sandbox_environment_type_truefoundry.js +6 -0
- package/dist/postgres/migrations/20261103_000001_sandbox_environment_type_truefoundry.js.map +1 -1
- package/package.json +3 -3
- package/dist/_frontend/assets/AgentCodeSnippets-H343VMKM-Bw48fB4V.js.br +0 -0
- package/dist/_frontend/assets/AgentCodeSnippets-H343VMKM-Bw48fB4V.js.gz +0 -0
- package/dist/_frontend/assets/AgentMetricChart-2A3Q73AO-ByPINDhM.js.br +0 -0
- package/dist/_frontend/assets/AgentMetricChart-2A3Q73AO-ByPINDhM.js.gz +0 -0
- package/dist/_frontend/assets/AgentOverview-PLZP4BE4-B4luQD6n.js.br +0 -0
- package/dist/_frontend/assets/AgentOverview-PLZP4BE4-B4luQD6n.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimeline-YANYUDA5-CZsR7Mad.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimeline-YANYUDA5-CZsR7Mad.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-E4JMM6YS-qdgLjjB4.js.br +0 -0
- package/dist/_frontend/assets/AgentSessionEventTimelineChart-E4JMM6YS-qdgLjjB4.js.gz +0 -0
- package/dist/_frontend/assets/AgentSessions-D6O2XY6Y-C4oQgmHA.js +0 -1
- package/dist/_frontend/assets/AgentSessions-D6O2XY6Y-C4oQgmHA.js.br +0 -0
- package/dist/_frontend/assets/AgentSessions-D6O2XY6Y-C4oQgmHA.js.gz +0 -0
- package/dist/_frontend/assets/ConnectorSettings-GKNCNULP-DWw6csCc.js.br +0 -0
- package/dist/_frontend/assets/ConnectorSettings-GKNCNULP-DWw6csCc.js.gz +0 -0
- package/dist/_frontend/assets/DrawerLayout-RF5C5UUW-CdYLoo0Y.js +0 -2
- package/dist/_frontend/assets/DrawerLayout-RF5C5UUW-CdYLoo0Y.js.br +0 -0
- package/dist/_frontend/assets/DrawerLayout-RF5C5UUW-CdYLoo0Y.js.gz +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-Y7GUFDX6-B4lzlmZl.js.br +0 -0
- package/dist/_frontend/assets/EnvironmentsPage-Y7GUFDX6-B4lzlmZl.js.gz +0 -0
- package/dist/_frontend/assets/MemorySettings-4RRBDBV6-DeUiqqhK.js.br +0 -0
- package/dist/_frontend/assets/MemorySettings-4RRBDBV6-DeUiqqhK.js.gz +0 -0
- package/dist/_frontend/assets/ModelSettings-GYHM5IRX-CETYKyCX.js.br +0 -0
- package/dist/_frontend/assets/ModelSettings-GYHM5IRX-CETYKyCX.js.gz +0 -0
- package/dist/_frontend/assets/SandboxSettings-64C4LPUD-Cnonjif3.js.br +0 -0
- package/dist/_frontend/assets/SandboxSettings-64C4LPUD-Cnonjif3.js.gz +0 -0
- package/dist/_frontend/assets/SchedulesPage-7LTCQWDY-BZlW89Yr.js.br +0 -0
- package/dist/_frontend/assets/SchedulesPage-7LTCQWDY-BZlW89Yr.js.gz +0 -0
- package/dist/_frontend/assets/SettingsBuilder-EFI3M2WM-C5-UGRAl.js +0 -2
- package/dist/_frontend/assets/SettingsBuilder-EFI3M2WM-C5-UGRAl.js.br +0 -0
- package/dist/_frontend/assets/SettingsBuilder-EFI3M2WM-C5-UGRAl.js.gz +0 -0
- package/dist/_frontend/assets/ShellRouteSync-4T763MWC-Bk2ZHjFW.js.br +0 -0
- package/dist/_frontend/assets/ShellRouteSync-4T763MWC-Bk2ZHjFW.js.gz +0 -0
- package/dist/_frontend/assets/SidebarLayout-SLXLQ4KI-CgK26FAl.js +0 -2
- package/dist/_frontend/assets/SidebarLayout-SLXLQ4KI-CgK26FAl.js.br +0 -0
- package/dist/_frontend/assets/SidebarLayout-SLXLQ4KI-CgK26FAl.js.gz +0 -0
- package/dist/_frontend/assets/SkillSettings-2HF7EG6X-BjVk8qd8.js.br +0 -0
- package/dist/_frontend/assets/SkillSettings-2HF7EG6X-BjVk8qd8.js.gz +0 -0
- package/dist/_frontend/assets/WebSearchSettings-HDYOF3AO-yXj5D86c.js +0 -1
- package/dist/_frontend/assets/WebSearchSettings-HDYOF3AO-yXj5D86c.js.br +0 -0
- package/dist/_frontend/assets/WebSearchSettings-HDYOF3AO-yXj5D86c.js.gz +0 -0
- package/dist/_frontend/assets/WidgetLayout-VEILCOPB-CT3L-nt5.js.br +0 -0
- package/dist/_frontend/assets/WidgetLayout-VEILCOPB-CT3L-nt5.js.gz +0 -0
- package/dist/_frontend/assets/chunk-2DR7SPLX-lhr7WyYV.js +0 -2
- package/dist/_frontend/assets/chunk-2DR7SPLX-lhr7WyYV.js.br +0 -0
- package/dist/_frontend/assets/chunk-2DR7SPLX-lhr7WyYV.js.gz +0 -0
- package/dist/_frontend/assets/chunk-4LY4NAUC-C1iAiAXz.js.br +0 -0
- package/dist/_frontend/assets/chunk-4LY4NAUC-C1iAiAXz.js.gz +0 -0
- package/dist/_frontend/assets/chunk-OB3PAWPO-CcC39jqv.js.br +0 -0
- package/dist/_frontend/assets/chunk-OB3PAWPO-CcC39jqv.js.gz +0 -0
- package/dist/_frontend/assets/chunk-WUWRYVPF-CCSQgb1W.js +0 -1
- package/dist/_frontend/assets/chunk-WUWRYVPF-CCSQgb1W.js.br +0 -0
- package/dist/_frontend/assets/chunk-WUWRYVPF-CCSQgb1W.js.gz +0 -0
- package/dist/_frontend/assets/cssMode-Dj2Xz6jz.js.br +0 -0
- package/dist/_frontend/assets/cssMode-Dj2Xz6jz.js.gz +0 -0
- package/dist/_frontend/assets/freemarker2-943N0gt5.js.br +0 -0
- package/dist/_frontend/assets/freemarker2-943N0gt5.js.gz +0 -0
- package/dist/_frontend/assets/handlebars-BmWTi7ZS.js.br +0 -0
- package/dist/_frontend/assets/handlebars-BmWTi7ZS.js.gz +0 -0
- package/dist/_frontend/assets/html-8lmTcm-G.js.br +0 -0
- package/dist/_frontend/assets/html-8lmTcm-G.js.gz +0 -0
- package/dist/_frontend/assets/htmlMode-DfBGge2N.js.br +0 -0
- package/dist/_frontend/assets/htmlMode-DfBGge2N.js.gz +0 -0
- package/dist/_frontend/assets/index-BQmZxgUA.js.br +0 -0
- package/dist/_frontend/assets/index-BQmZxgUA.js.gz +0 -0
- package/dist/_frontend/assets/index-CVbSocf1.js.br +0 -0
- package/dist/_frontend/assets/index-CVbSocf1.js.gz +0 -0
- package/dist/_frontend/assets/jsonMode-BJ-YqiW2.js.br +0 -0
- package/dist/_frontend/assets/jsonMode-BJ-YqiW2.js.gz +0 -0
- package/dist/_frontend/assets/liquid-DHofx8Gl.js.br +0 -0
- package/dist/_frontend/assets/liquid-DHofx8Gl.js.gz +0 -0
- package/dist/_frontend/assets/lspLanguageFeatures-C36LEzPR.js.br +0 -0
- package/dist/_frontend/assets/lspLanguageFeatures-C36LEzPR.js.gz +0 -0
- package/dist/_frontend/assets/mdx-DKcVoDZ1.js.br +0 -0
- package/dist/_frontend/assets/mdx-DKcVoDZ1.js.gz +0 -0
- package/dist/_frontend/assets/python-BJ1tC8V2.js.br +0 -0
- package/dist/_frontend/assets/python-BJ1tC8V2.js.gz +0 -0
- package/dist/_frontend/assets/razor-DwNLptja.js.br +0 -0
- package/dist/_frontend/assets/razor-DwNLptja.js.gz +0 -0
- package/dist/_frontend/assets/tsMode-LvSj4QG5.js.br +0 -0
- package/dist/_frontend/assets/tsMode-LvSj4QG5.js.gz +0 -0
- package/dist/_frontend/assets/typescript-ByGf1nW8.js.br +0 -0
- package/dist/_frontend/assets/typescript-ByGf1nW8.js.gz +0 -0
- package/dist/_frontend/assets/workers-Ds-LWqXu.js.br +0 -0
- package/dist/_frontend/assets/workers-Ds-LWqXu.js.gz +0 -0
- package/dist/_frontend/assets/xml-D-KxU_aA.js.br +0 -0
- package/dist/_frontend/assets/xml-D-KxU_aA.js.gz +0 -0
- package/dist/_frontend/assets/yaml-Dctt39Xw.js.br +0 -0
- package/dist/_frontend/assets/yaml-Dctt39Xw.js.gz +0 -0
package/dist/main.js
CHANGED
|
@@ -205,6 +205,7 @@ import { isIPv6 } from "net";
|
|
|
205
205
|
import os from "os";
|
|
206
206
|
import path2 from "path";
|
|
207
207
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
208
|
+
import { DEFAULT_MAX_PARALLEL_SUB_AGENTS } from "@truefoundry/trueforge-core/core";
|
|
208
209
|
import envPaths from "env-paths";
|
|
209
210
|
import { z } from "zod";
|
|
210
211
|
function getEnv(key, options) {
|
|
@@ -774,6 +775,11 @@ var init_config = __esm({
|
|
|
774
775
|
defaultValue: 30
|
|
775
776
|
}),
|
|
776
777
|
SERVER_EXECUTION_TIMEOUT_SECONDS: serverExecutionTimeoutSeconds,
|
|
778
|
+
MAX_PARALLEL_SUB_AGENTS: parsePositiveInt({
|
|
779
|
+
envKey: "MAX_PARALLEL_SUB_AGENTS",
|
|
780
|
+
raw: getEnv("MAX_PARALLEL_SUB_AGENTS"),
|
|
781
|
+
defaultValue: DEFAULT_MAX_PARALLEL_SUB_AGENTS
|
|
782
|
+
}),
|
|
777
783
|
TURN_STREAM_TTL_SECONDS: parsePositiveInt({
|
|
778
784
|
envKey: "TURN_STREAM_TTL_SECONDS",
|
|
779
785
|
raw: getEnv("TURN_STREAM_TTL_SECONDS"),
|
|
@@ -3732,7 +3738,7 @@ var init_skillStore = __esm({
|
|
|
3732
3738
|
});
|
|
3733
3739
|
|
|
3734
3740
|
// src/db/gitSkillMounts.ts
|
|
3735
|
-
import { HTTPException as
|
|
3741
|
+
import { HTTPException as HTTPException26 } from "hono/http-exception";
|
|
3736
3742
|
async function validateGitAgentSkills(store, input) {
|
|
3737
3743
|
const { tenant_id, skills } = input;
|
|
3738
3744
|
if (skills.length === 0) {
|
|
@@ -3740,7 +3746,7 @@ async function validateGitAgentSkills(store, input) {
|
|
|
3740
3746
|
}
|
|
3741
3747
|
for (const skill of skills) {
|
|
3742
3748
|
if (skill.preload) {
|
|
3743
|
-
throw new
|
|
3749
|
+
throw new HTTPException26(422, {
|
|
3744
3750
|
message: `Skill "${skill.name}": preload is not supported for git skills`
|
|
3745
3751
|
});
|
|
3746
3752
|
}
|
|
@@ -3750,12 +3756,12 @@ async function validateGitAgentSkills(store, input) {
|
|
|
3750
3756
|
for (const skill of skills) {
|
|
3751
3757
|
const record = byName.get(skill.name);
|
|
3752
3758
|
if (record === void 0) {
|
|
3753
|
-
throw new
|
|
3759
|
+
throw new HTTPException26(422, {
|
|
3754
3760
|
message: `Unknown skill "${skill.name}" \u2014 not configured`
|
|
3755
3761
|
});
|
|
3756
3762
|
}
|
|
3757
3763
|
if (record.manifest.type !== "git") {
|
|
3758
|
-
throw new
|
|
3764
|
+
throw new HTTPException26(422, {
|
|
3759
3765
|
message: `Skill "${skill.name}" is not a git skill`
|
|
3760
3766
|
});
|
|
3761
3767
|
}
|
|
@@ -3773,13 +3779,13 @@ async function resolveGitTurnSkills(store, input) {
|
|
|
3773
3779
|
for (const skill of skills) {
|
|
3774
3780
|
const record = byName.get(skill.name);
|
|
3775
3781
|
if (record === void 0) {
|
|
3776
|
-
throw new
|
|
3782
|
+
throw new HTTPException26(422, {
|
|
3777
3783
|
message: `Unknown skill "${skill.name}" \u2014 not configured`
|
|
3778
3784
|
});
|
|
3779
3785
|
}
|
|
3780
3786
|
const git = parseGitSkill(record.manifest);
|
|
3781
3787
|
if (git === void 0) {
|
|
3782
|
-
throw new
|
|
3788
|
+
throw new HTTPException26(422, {
|
|
3783
3789
|
message: `Skill "${skill.name}" is not a git skill`
|
|
3784
3790
|
});
|
|
3785
3791
|
}
|
|
@@ -5492,7 +5498,7 @@ var init_mcpAuth = __esm({
|
|
|
5492
5498
|
});
|
|
5493
5499
|
|
|
5494
5500
|
// src/db/sessionAgentColumns.ts
|
|
5495
|
-
import { AgentSpecSchema as
|
|
5501
|
+
import { AgentSpecSchema as AgentSpecSchema5 } from "@truefoundry/trueforge-core/agent-session";
|
|
5496
5502
|
function sessionAgentToColumns(agent) {
|
|
5497
5503
|
if (agent.type === "reference") {
|
|
5498
5504
|
return { agent_id: agent.id, agent_name: agent.name, agent_spec: null };
|
|
@@ -5504,7 +5510,7 @@ function sessionAgentFromColumns(input) {
|
|
|
5504
5510
|
return { type: "reference", id: input.agent_id, name: input.agent_name };
|
|
5505
5511
|
}
|
|
5506
5512
|
if (input.agent_id === null && input.agent_spec !== null) {
|
|
5507
|
-
return { type: "inline", spec:
|
|
5513
|
+
return { type: "inline", spec: AgentSpecSchema5.parse(input.agent_spec) };
|
|
5508
5514
|
}
|
|
5509
5515
|
throw new Error(
|
|
5510
5516
|
`Session ${input.session_id} has invalid agent binding (exactly one of agent_id or agent_spec required)`
|
|
@@ -11640,7 +11646,7 @@ import { swaggerUI } from "@hono/swagger-ui";
|
|
|
11640
11646
|
import { OpenAPIHono as OpenAPIHono23, z as z51 } from "@hono/zod-openapi";
|
|
11641
11647
|
import { extractErrorLogFields as extractErrorLogFields9 } from "@truefoundry/trueforge-core/core";
|
|
11642
11648
|
import { bodyLimit } from "hono/body-limit";
|
|
11643
|
-
import { HTTPException as
|
|
11649
|
+
import { HTTPException as HTTPException23 } from "hono/http-exception";
|
|
11644
11650
|
import { randomUUID as randomUUID7 } from "crypto";
|
|
11645
11651
|
|
|
11646
11652
|
// src/apis/agents.ts
|
|
@@ -11733,13 +11739,16 @@ function savedAgentAccess(input) {
|
|
|
11733
11739
|
};
|
|
11734
11740
|
}
|
|
11735
11741
|
function callerAccessToken(context) {
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11742
|
+
return () => {
|
|
11743
|
+
if (context.user_credential === null) {
|
|
11744
|
+
return Promise.reject(
|
|
11745
|
+
new HTTPException2(401, {
|
|
11746
|
+
message: "Authentication token required to list or call TrueFoundry models, MCP servers, skills, and agents"
|
|
11747
|
+
})
|
|
11748
|
+
);
|
|
11749
|
+
}
|
|
11750
|
+
return Promise.resolve(context.user_credential);
|
|
11751
|
+
};
|
|
11743
11752
|
}
|
|
11744
11753
|
function accessTokenForRequest(input) {
|
|
11745
11754
|
if (input.agent === void 0) {
|
|
@@ -13954,6 +13963,25 @@ function createApiKeyAuthMiddleware(apiKey) {
|
|
|
13954
13963
|
return next();
|
|
13955
13964
|
};
|
|
13956
13965
|
}
|
|
13966
|
+
function createAuthOrServiceKeyMiddleware(params) {
|
|
13967
|
+
const { authenticator, apiKey } = params;
|
|
13968
|
+
return async (c, next) => {
|
|
13969
|
+
const token = readBearerToken(c);
|
|
13970
|
+
if (token && matchesServiceKey({ provided: token, expected: apiKey })) {
|
|
13971
|
+
c.set("request_context", void 0);
|
|
13972
|
+
c.set("subject", void 0);
|
|
13973
|
+
return next();
|
|
13974
|
+
}
|
|
13975
|
+
const requestContext = await tryAuthenticate({ authenticator, context: c });
|
|
13976
|
+
if (!requestContext) {
|
|
13977
|
+
throw new HTTPException5(401, { message: "Authentication required" });
|
|
13978
|
+
}
|
|
13979
|
+
c.set("subject", requestContext.subject);
|
|
13980
|
+
c.set("request_context", requestContext);
|
|
13981
|
+
updateLogContext({ tenant_id: requestContext.tenant_id });
|
|
13982
|
+
return next();
|
|
13983
|
+
};
|
|
13984
|
+
}
|
|
13957
13985
|
async function resolveOidcRequestContext(c) {
|
|
13958
13986
|
const oidcVerify2 = getOidcVerify();
|
|
13959
13987
|
if (!oidcVerify2) {
|
|
@@ -17459,7 +17487,7 @@ import { OpenAPIHono as OpenAPIHono13 } from "@hono/zod-openapi";
|
|
|
17459
17487
|
import {
|
|
17460
17488
|
InvalidPageTokenError as InvalidPageTokenError3
|
|
17461
17489
|
} from "@truefoundry/trueforge-core/agent-session";
|
|
17462
|
-
import { HTTPException as
|
|
17490
|
+
import { HTTPException as HTTPException16 } from "hono/http-exception";
|
|
17463
17491
|
|
|
17464
17492
|
// src/controller/scheduleDispatch.ts
|
|
17465
17493
|
init_scheduleStore();
|
|
@@ -18161,9 +18189,51 @@ import {
|
|
|
18161
18189
|
redisRequest,
|
|
18162
18190
|
RequestTimeoutError
|
|
18163
18191
|
} from "@truefoundry/trueforge-core/request-reply";
|
|
18164
|
-
import { HTTPException as
|
|
18192
|
+
import { HTTPException as HTTPException15 } from "hono/http-exception";
|
|
18165
18193
|
import { streamSSE } from "hono/streaming";
|
|
18166
18194
|
import { z as z42 } from "zod";
|
|
18195
|
+
|
|
18196
|
+
// src/auth/assumeUser.ts
|
|
18197
|
+
import { HTTPException as HTTPException11 } from "hono/http-exception";
|
|
18198
|
+
var ASSUME_USER_HEADER = "assume-user";
|
|
18199
|
+
var ASSUME_USER_HEADER_PARAM = {
|
|
18200
|
+
name: ASSUME_USER_HEADER,
|
|
18201
|
+
in: "header",
|
|
18202
|
+
required: false,
|
|
18203
|
+
description: "Service API key only: which user identity to assume. Currently only session-creator.",
|
|
18204
|
+
schema: { type: "string", enum: ["session-creator"] }
|
|
18205
|
+
};
|
|
18206
|
+
function parseAssumeUserHeader(header) {
|
|
18207
|
+
const raw = header?.trim();
|
|
18208
|
+
if (!raw) {
|
|
18209
|
+
throw new HTTPException11(400, { message: `Missing ${ASSUME_USER_HEADER} header` });
|
|
18210
|
+
}
|
|
18211
|
+
if (raw !== "session-creator") {
|
|
18212
|
+
throw new HTTPException11(400, {
|
|
18213
|
+
message: `Invalid ${ASSUME_USER_HEADER}: only "session-creator" is supported`
|
|
18214
|
+
});
|
|
18215
|
+
}
|
|
18216
|
+
return raw;
|
|
18217
|
+
}
|
|
18218
|
+
async function applyAssumeUserToContext(params) {
|
|
18219
|
+
const { c, resolveCreatedBy } = params;
|
|
18220
|
+
const assumed = parseAssumeUserHeader(c.req.header(ASSUME_USER_HEADER));
|
|
18221
|
+
const createdBy = await resolveCreatedBy();
|
|
18222
|
+
const requestContext = requestContextFromCreatedBySubject({
|
|
18223
|
+
tenant_id: createdBy.tenant_id,
|
|
18224
|
+
created_by_subject: createdBy.created_by_subject,
|
|
18225
|
+
user_credential: null
|
|
18226
|
+
});
|
|
18227
|
+
c.set("request_context", requestContext);
|
|
18228
|
+
c.set("assume_user", assumed);
|
|
18229
|
+
updateLogContext({
|
|
18230
|
+
tenant_id: createdBy.tenant_id,
|
|
18231
|
+
...createdBy.session_id ? { session_id: createdBy.session_id } : {}
|
|
18232
|
+
});
|
|
18233
|
+
return requestContext;
|
|
18234
|
+
}
|
|
18235
|
+
|
|
18236
|
+
// src/apis/turns.ts
|
|
18167
18237
|
init_config();
|
|
18168
18238
|
|
|
18169
18239
|
// src/mcp/server/trueforge/headers.ts
|
|
@@ -18948,6 +19018,7 @@ var listTurnsRoute = createRoute14({
|
|
|
18948
19018
|
tags: ["Agent Sessions" /* AGENT_SESSIONS */],
|
|
18949
19019
|
summary: "List turns in a session",
|
|
18950
19020
|
description: "List turns for a session (newest first by default), token-paginated. Allowed for the creator, a manager of the bound named agent, or any tenant member when the session is shared.",
|
|
19021
|
+
parameters: [ASSUME_USER_HEADER_PARAM],
|
|
18951
19022
|
"x-fern-sdk-group-name": ["sessions"],
|
|
18952
19023
|
"x-fern-sdk-method-name": "list_turns",
|
|
18953
19024
|
"x-fern-pagination": TOKEN_PAGINATION,
|
|
@@ -19135,6 +19206,7 @@ Only the session creator may create turns.
|
|
|
19135
19206
|
When \`stream\` is true (default), respond with a Server-Sent Events stream of turn events.
|
|
19136
19207
|
When \`stream\` is false, return the turn immediately with \`state.status: "running"\` while execution continues in the background; use get turn or subscribe to observe completion.
|
|
19137
19208
|
Use \`previous_turn_id\` to chain to the session's last turn (defaults to \`auto\`); use \`none\` for a new root.`,
|
|
19209
|
+
parameters: [ASSUME_USER_HEADER_PARAM],
|
|
19138
19210
|
"x-fern-sdk-group-name": ["sessions"],
|
|
19139
19211
|
"x-fern-sdk-method-name": "create_turn",
|
|
19140
19212
|
"x-fern-streaming": {
|
|
@@ -20369,7 +20441,7 @@ function elapsedMs(startedAt) {
|
|
|
20369
20441
|
}
|
|
20370
20442
|
|
|
20371
20443
|
// src/truefoundry/gatewayMetadata.ts
|
|
20372
|
-
import { HTTPException as
|
|
20444
|
+
import { HTTPException as HTTPException12 } from "hono/http-exception";
|
|
20373
20445
|
import { z as z39 } from "zod";
|
|
20374
20446
|
var X_TFY_METADATA = "x-tfy-metadata";
|
|
20375
20447
|
var X_TFY_CONVERSATION_ID = "x-tfy-conversation-id";
|
|
@@ -20380,11 +20452,11 @@ function parseGatewayMetadataHeader(raw) {
|
|
|
20380
20452
|
try {
|
|
20381
20453
|
decoded = JSON.parse(raw);
|
|
20382
20454
|
} catch (error) {
|
|
20383
|
-
throw new
|
|
20455
|
+
throw new HTTPException12(400, { message: `${X_TFY_METADATA} must be a JSON object`, cause: error });
|
|
20384
20456
|
}
|
|
20385
20457
|
const parsed = GatewayMetadataSchema.safeParse(decoded);
|
|
20386
20458
|
if (!parsed.success) {
|
|
20387
|
-
throw new
|
|
20459
|
+
throw new HTTPException12(400, {
|
|
20388
20460
|
message: `${X_TFY_METADATA} must be a JSON object of string values`
|
|
20389
20461
|
});
|
|
20390
20462
|
}
|
|
@@ -20461,7 +20533,7 @@ function headerValue(headers, name) {
|
|
|
20461
20533
|
|
|
20462
20534
|
// src/truefoundry/inlineResources.ts
|
|
20463
20535
|
import { ToolSchema as McpToolSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
20464
|
-
import { HTTPException as
|
|
20536
|
+
import { HTTPException as HTTPException13 } from "hono/http-exception";
|
|
20465
20537
|
import { z as z40 } from "zod";
|
|
20466
20538
|
init_skill();
|
|
20467
20539
|
var X_TFG_MCP = "x-tfg-mcp";
|
|
@@ -20490,10 +20562,10 @@ var InlineToolsHeaderSchema = z40.array(McpToolSchema, {
|
|
|
20490
20562
|
function assertInlineResourceHeadersAllowed(input) {
|
|
20491
20563
|
const labeled = input.headerNames.join("/");
|
|
20492
20564
|
if (!input.isTrueFoundryMode) {
|
|
20493
|
-
throw new
|
|
20565
|
+
throw new HTTPException13(400, { message: `${labeled} requires TrueFoundry mode` });
|
|
20494
20566
|
}
|
|
20495
20567
|
if (!input.allowInlineResources) {
|
|
20496
|
-
throw new
|
|
20568
|
+
throw new HTTPException13(400, {
|
|
20497
20569
|
message: `${labeled} is only allowed when creating or updating an inline session, or on a turn for one`
|
|
20498
20570
|
});
|
|
20499
20571
|
}
|
|
@@ -20536,17 +20608,17 @@ function parseInlineModelProviders(raw) {
|
|
|
20536
20608
|
}
|
|
20537
20609
|
function parseInlineTools(raw) {
|
|
20538
20610
|
if (raw.length > MAX_TFG_TOOLS_HEADER_LENGTH) {
|
|
20539
|
-
throw new
|
|
20611
|
+
throw new HTTPException13(400, { message: `${X_TFG_TOOLS} is too large` });
|
|
20540
20612
|
}
|
|
20541
20613
|
let decoded;
|
|
20542
20614
|
try {
|
|
20543
20615
|
decoded = JSON.parse(raw);
|
|
20544
20616
|
} catch (error) {
|
|
20545
|
-
throw new
|
|
20617
|
+
throw new HTTPException13(400, { message: `${X_TFG_TOOLS} must be a JSON array`, cause: error });
|
|
20546
20618
|
}
|
|
20547
20619
|
const parsed = InlineToolsHeaderSchema.safeParse(decoded);
|
|
20548
20620
|
if (!parsed.success) {
|
|
20549
|
-
throw new
|
|
20621
|
+
throw new HTTPException13(400, {
|
|
20550
20622
|
message: `${X_TFG_TOOLS}
|
|
20551
20623
|
${z40.prettifyError(parsed.error)}`,
|
|
20552
20624
|
cause: parsed.error
|
|
@@ -20560,20 +20632,20 @@ function parseByName(input) {
|
|
|
20560
20632
|
try {
|
|
20561
20633
|
decoded = JSON.parse(raw);
|
|
20562
20634
|
} catch (error) {
|
|
20563
|
-
throw new
|
|
20635
|
+
throw new HTTPException13(400, { message: `${header} must be a JSON object`, cause: error });
|
|
20564
20636
|
}
|
|
20565
20637
|
if (!isPlainObject(decoded)) {
|
|
20566
|
-
throw new
|
|
20638
|
+
throw new HTTPException13(400, { message: `${header} must map each name to a definition` });
|
|
20567
20639
|
}
|
|
20568
20640
|
const manifests = {};
|
|
20569
20641
|
Object.setPrototypeOf(manifests, null);
|
|
20570
20642
|
for (const [name, definition] of Object.entries(decoded)) {
|
|
20571
20643
|
if (!isPlainObject(definition)) {
|
|
20572
|
-
throw new
|
|
20644
|
+
throw new HTTPException13(400, { message: `${header} entry "${name}" must be an object` });
|
|
20573
20645
|
}
|
|
20574
20646
|
const parsed = parseEntry(name, definition);
|
|
20575
20647
|
if (!parsed.ok) {
|
|
20576
|
-
throw new
|
|
20648
|
+
throw new HTTPException13(400, { message: `${header} entry "${name}" ${parsed.reason}` });
|
|
20577
20649
|
}
|
|
20578
20650
|
manifests[name] = parsed.manifest;
|
|
20579
20651
|
}
|
|
@@ -20584,7 +20656,7 @@ function isPlainObject(value) {
|
|
|
20584
20656
|
}
|
|
20585
20657
|
|
|
20586
20658
|
// src/truefoundry/perServerMcpHeaders.ts
|
|
20587
|
-
import { HTTPException as
|
|
20659
|
+
import { HTTPException as HTTPException14 } from "hono/http-exception";
|
|
20588
20660
|
import { z as z41 } from "zod";
|
|
20589
20661
|
var X_TFG_MCP_HEADERS = "x-tfg-mcp-headers";
|
|
20590
20662
|
var PerServerMcpHeadersSchema = z41.record(z41.string().min(1), z41.record(z41.string().min(1), z41.string()));
|
|
@@ -20593,11 +20665,11 @@ function parsePerServerMcpHeaders(raw) {
|
|
|
20593
20665
|
try {
|
|
20594
20666
|
decoded = JSON.parse(raw);
|
|
20595
20667
|
} catch (error) {
|
|
20596
|
-
throw new
|
|
20668
|
+
throw new HTTPException14(400, { message: `${X_TFG_MCP_HEADERS} must be a JSON object`, cause: error });
|
|
20597
20669
|
}
|
|
20598
20670
|
const parsed = PerServerMcpHeadersSchema.safeParse(decoded);
|
|
20599
20671
|
if (!parsed.success) {
|
|
20600
|
-
throw new
|
|
20672
|
+
throw new HTTPException14(400, {
|
|
20601
20673
|
message: `${X_TFG_MCP_HEADERS} must map each MCP server name to a header map`
|
|
20602
20674
|
});
|
|
20603
20675
|
}
|
|
@@ -20745,7 +20817,7 @@ function createTurnResolver(deps) {
|
|
|
20745
20817
|
turnMetadata
|
|
20746
20818
|
});
|
|
20747
20819
|
if (connection === void 0) {
|
|
20748
|
-
throw new
|
|
20820
|
+
throw new HTTPException15(422, {
|
|
20749
20821
|
message: `Unknown MCP server "${id}" \u2014 not configured`
|
|
20750
20822
|
});
|
|
20751
20823
|
}
|
|
@@ -20754,6 +20826,7 @@ function createTurnResolver(deps) {
|
|
|
20754
20826
|
mcpRequestTimeoutMs: config_default.MCP_REQUEST_TIMEOUT_MS,
|
|
20755
20827
|
mcpConnectTimeoutMs: config_default.MCP_CONNECT_TIMEOUT_MS,
|
|
20756
20828
|
mcpMaxResponseBytes: config_default.MCP_TOOL_CALL_MAX_RESPONSE_BYTES,
|
|
20829
|
+
maxParallelSubAgents: config_default.MAX_PARALLEL_SUB_AGENTS,
|
|
20757
20830
|
sandboxProvider: async ({ spec, existingSandboxId, tracing }) => {
|
|
20758
20831
|
const provider = await resolveSandboxProvider({
|
|
20759
20832
|
tenant_id,
|
|
@@ -20762,7 +20835,7 @@ function createTurnResolver(deps) {
|
|
|
20762
20835
|
sessionId
|
|
20763
20836
|
});
|
|
20764
20837
|
if (provider === void 0) {
|
|
20765
|
-
throw new
|
|
20838
|
+
throw new HTTPException15(422, {
|
|
20766
20839
|
message: "no sandbox provider configured \u2014 PUT /settings/sandbox-providers"
|
|
20767
20840
|
});
|
|
20768
20841
|
}
|
|
@@ -20802,7 +20875,7 @@ function createTurnResolver(deps) {
|
|
|
20802
20875
|
agent: async (agentId) => {
|
|
20803
20876
|
const record = await agentStore.getAgent({ tenant_id, id: agentId });
|
|
20804
20877
|
if (record === void 0) {
|
|
20805
|
-
throw new
|
|
20878
|
+
throw new HTTPException15(422, { message: `Agent not found: ${agentId}` });
|
|
20806
20879
|
}
|
|
20807
20880
|
return record.manifest;
|
|
20808
20881
|
},
|
|
@@ -21210,7 +21283,7 @@ async function resumePausedTurn(input) {
|
|
|
21210
21283
|
};
|
|
21211
21284
|
}
|
|
21212
21285
|
function getTurnExecutionError(error) {
|
|
21213
|
-
if (error instanceof
|
|
21286
|
+
if (error instanceof HTTPException15) {
|
|
21214
21287
|
if (error.status === 400 || error.status === 404 || error.status === 422) {
|
|
21215
21288
|
return { status: error.status, message: error.message };
|
|
21216
21289
|
}
|
|
@@ -21239,7 +21312,7 @@ function resolveAfterSequenceNumber(c, bodyAfterSequenceNumber) {
|
|
|
21239
21312
|
if (lastEventId) {
|
|
21240
21313
|
const sequenceNumber = Number(lastEventId);
|
|
21241
21314
|
if (!Number.isInteger(sequenceNumber) || sequenceNumber < 0) {
|
|
21242
|
-
throw new
|
|
21315
|
+
throw new HTTPException15(400, { message: "Invalid Last-Event-Id header" });
|
|
21243
21316
|
}
|
|
21244
21317
|
return sequenceNumber;
|
|
21245
21318
|
}
|
|
@@ -21251,6 +21324,37 @@ function isSessionOwner({
|
|
|
21251
21324
|
}) {
|
|
21252
21325
|
return created_by_subject.subject_id === subject_id;
|
|
21253
21326
|
}
|
|
21327
|
+
async function resolveTurnRequestContext(params) {
|
|
21328
|
+
const { c, sessions, session_id: sessionId, resolveRequestContext: resolveRequestContext2 } = params;
|
|
21329
|
+
const existing = c.get("request_context");
|
|
21330
|
+
if (existing) {
|
|
21331
|
+
return existing;
|
|
21332
|
+
}
|
|
21333
|
+
if (c.req.header(ASSUME_USER_HEADER)?.trim()) {
|
|
21334
|
+
return applyAssumeUserToContext({
|
|
21335
|
+
c,
|
|
21336
|
+
resolveCreatedBy: async () => {
|
|
21337
|
+
const session = await sessions.getById({ session_id: sessionId });
|
|
21338
|
+
if (!session) {
|
|
21339
|
+
throw new HTTPException15(404, { message: `Session not found: ${sessionId}` });
|
|
21340
|
+
}
|
|
21341
|
+
return {
|
|
21342
|
+
tenant_id: session.record.tenant_id,
|
|
21343
|
+
created_by_subject: session.record.created_by_subject,
|
|
21344
|
+
session_id: sessionId
|
|
21345
|
+
};
|
|
21346
|
+
}
|
|
21347
|
+
});
|
|
21348
|
+
}
|
|
21349
|
+
try {
|
|
21350
|
+
return resolveRequestContext2(c);
|
|
21351
|
+
} catch (error) {
|
|
21352
|
+
if (error instanceof Error && error.message === "RequestContext missing; auth middleware did not run") {
|
|
21353
|
+
throw new HTTPException15(400, { message: `Missing ${ASSUME_USER_HEADER} header`, cause: error });
|
|
21354
|
+
}
|
|
21355
|
+
throw error;
|
|
21356
|
+
}
|
|
21357
|
+
}
|
|
21254
21358
|
var TURNS_SEND_EVENTS_PATH = "turns/send-events";
|
|
21255
21359
|
var PeerRequestContextSchema = z42.object({
|
|
21256
21360
|
tenant_id: z42.string(),
|
|
@@ -21727,7 +21831,12 @@ function createTurnsRouter(deps) {
|
|
|
21727
21831
|
const listTurnsHandler = async (c) => {
|
|
21728
21832
|
const { session_id: sessionId } = c.req.valid("param");
|
|
21729
21833
|
const query = c.req.valid("query");
|
|
21730
|
-
const requestContext =
|
|
21834
|
+
const requestContext = await resolveTurnRequestContext({
|
|
21835
|
+
c,
|
|
21836
|
+
sessions: deps.sessions,
|
|
21837
|
+
session_id: sessionId,
|
|
21838
|
+
resolveRequestContext: deps.resolveRequestContext
|
|
21839
|
+
});
|
|
21731
21840
|
const session = await deps.sessions.get({
|
|
21732
21841
|
tenant_id: requestContext.tenant_id,
|
|
21733
21842
|
session_id: sessionId
|
|
@@ -21755,7 +21864,7 @@ function createTurnsRouter(deps) {
|
|
|
21755
21864
|
return c.json({ data: data.map(toWireTurn), pagination }, 200);
|
|
21756
21865
|
} catch (error) {
|
|
21757
21866
|
if (error instanceof SessionStoreConflictError) {
|
|
21758
|
-
throw new
|
|
21867
|
+
throw new HTTPException15(400, { message: error.message, cause: error });
|
|
21759
21868
|
}
|
|
21760
21869
|
throw error;
|
|
21761
21870
|
}
|
|
@@ -21834,7 +21943,7 @@ function createTurnsRouter(deps) {
|
|
|
21834
21943
|
});
|
|
21835
21944
|
} catch (error) {
|
|
21836
21945
|
if (error instanceof SandboxError2) {
|
|
21837
|
-
throw new
|
|
21946
|
+
throw new HTTPException15(error.statusCode, { message: error.message, cause: error });
|
|
21838
21947
|
}
|
|
21839
21948
|
deps.logger.error("Sandbox file download failed", {
|
|
21840
21949
|
...extractErrorLogFields7(error),
|
|
@@ -21882,7 +21991,7 @@ function createTurnsRouter(deps) {
|
|
|
21882
21991
|
return c.json({ data, pagination }, 200);
|
|
21883
21992
|
} catch (error) {
|
|
21884
21993
|
if (error instanceof SessionStoreConflictError) {
|
|
21885
|
-
throw new
|
|
21994
|
+
throw new HTTPException15(400, { message: error.message, cause: error });
|
|
21886
21995
|
}
|
|
21887
21996
|
throw error;
|
|
21888
21997
|
}
|
|
@@ -21890,7 +21999,13 @@ function createTurnsRouter(deps) {
|
|
|
21890
21999
|
const createAndExecuteTurnHandler = async (c) => {
|
|
21891
22000
|
const { session_id: sessionId } = c.req.valid("param");
|
|
21892
22001
|
const body = c.req.valid("json");
|
|
21893
|
-
const
|
|
22002
|
+
const serviceAuth = !c.get("request_context") && Boolean(c.req.header(ASSUME_USER_HEADER)?.trim());
|
|
22003
|
+
const requestContext = await resolveTurnRequestContext({
|
|
22004
|
+
c,
|
|
22005
|
+
sessions: deps.sessions,
|
|
22006
|
+
session_id: sessionId,
|
|
22007
|
+
resolveRequestContext: deps.resolveRequestContext
|
|
22008
|
+
});
|
|
21894
22009
|
const session = await deps.sessions.get({
|
|
21895
22010
|
tenant_id: requestContext.tenant_id,
|
|
21896
22011
|
session_id: sessionId
|
|
@@ -21898,22 +22013,39 @@ function createTurnsRouter(deps) {
|
|
|
21898
22013
|
if (!session) {
|
|
21899
22014
|
return c.json({ error: { message: `Session not found: ${sessionId}` } }, 404);
|
|
21900
22015
|
}
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
|
|
21906
|
-
|
|
21907
|
-
|
|
21908
|
-
|
|
21909
|
-
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21914
|
-
|
|
22016
|
+
let referencedAgent;
|
|
22017
|
+
if (serviceAuth) {
|
|
22018
|
+
if (session.record.agent.type !== "reference") {
|
|
22019
|
+
throw new HTTPException15(422, {
|
|
22020
|
+
message: "Service create-turn requires a session bound to a named agent (not an inline agent spec)"
|
|
22021
|
+
});
|
|
22022
|
+
}
|
|
22023
|
+
const agent = await deps.resolveAgentStore(requestContext).getAgent({
|
|
22024
|
+
tenant_id: requestContext.tenant_id,
|
|
22025
|
+
id: session.record.agent.id
|
|
22026
|
+
});
|
|
22027
|
+
if (!agent) {
|
|
22028
|
+
return c.json({ error: { message: `Agent not found: ${session.record.agent.id}` } }, 422);
|
|
22029
|
+
}
|
|
22030
|
+
referencedAgent = agent;
|
|
22031
|
+
} else {
|
|
22032
|
+
if (!isSessionOwner({
|
|
22033
|
+
subject_id: requestContext.subject.id,
|
|
22034
|
+
created_by_subject: session.record.created_by_subject
|
|
22035
|
+
})) {
|
|
22036
|
+
return c.json({ error: { message: FORBIDDEN_CREATE_TURN } }, 403);
|
|
22037
|
+
}
|
|
22038
|
+
const agentUse = await referencedAgentForUse({
|
|
22039
|
+
session,
|
|
22040
|
+
requestContext,
|
|
22041
|
+
agentStore: deps.resolveAgentStore(requestContext),
|
|
22042
|
+
authorizer: deps.authorizer
|
|
22043
|
+
});
|
|
22044
|
+
if (agentUse.type === "rejected") {
|
|
22045
|
+
return c.json({ error: { message: agentUse.message } }, agentUse.status);
|
|
22046
|
+
}
|
|
22047
|
+
referencedAgent = agentUse.agent;
|
|
21915
22048
|
}
|
|
21916
|
-
const referencedAgent = agentUse.agent;
|
|
21917
22049
|
const turnParams = {
|
|
21918
22050
|
session,
|
|
21919
22051
|
input: body.input,
|
|
@@ -21925,7 +22057,7 @@ function createTurnsRouter(deps) {
|
|
|
21925
22057
|
session,
|
|
21926
22058
|
requestContext,
|
|
21927
22059
|
requestHeaders: c.req.header(),
|
|
21928
|
-
...referencedAgent
|
|
22060
|
+
...referencedAgent ? { runAsAgent: referencedAgent } : {}
|
|
21929
22061
|
})
|
|
21930
22062
|
};
|
|
21931
22063
|
try {
|
|
@@ -21983,7 +22115,7 @@ function createTurnsRouter(deps) {
|
|
|
21983
22115
|
} catch (error) {
|
|
21984
22116
|
const turnError = getTurnExecutionError(error);
|
|
21985
22117
|
if (turnError) {
|
|
21986
|
-
throw new
|
|
22118
|
+
throw new HTTPException15(turnError.status, { message: turnError.message, cause: error });
|
|
21987
22119
|
}
|
|
21988
22120
|
throw error;
|
|
21989
22121
|
}
|
|
@@ -22065,15 +22197,15 @@ function createTurnsRouter(deps) {
|
|
|
22065
22197
|
const afterEventId = query.after_event_id;
|
|
22066
22198
|
const afterSequenceNumber = resolveAfterSequenceNumber(c, query.after_sequence_number);
|
|
22067
22199
|
if (afterSequenceNumber !== void 0 && (fromEventId !== void 0 || afterEventId !== void 0)) {
|
|
22068
|
-
throw new
|
|
22200
|
+
throw new HTTPException15(400, {
|
|
22069
22201
|
message: "Pass only one of after_sequence_number, from_event_id, or after_event_id."
|
|
22070
22202
|
});
|
|
22071
22203
|
}
|
|
22072
22204
|
if (fromEventId !== void 0 && eventIdTimestampMs(fromEventId) === void 0) {
|
|
22073
|
-
throw new
|
|
22205
|
+
throw new HTTPException15(400, { message: "Invalid event id." });
|
|
22074
22206
|
}
|
|
22075
22207
|
if (afterEventId !== void 0 && eventIdTimestampMs(afterEventId) === void 0) {
|
|
22076
|
-
throw new
|
|
22208
|
+
throw new HTTPException15(400, { message: "Invalid event id." });
|
|
22077
22209
|
}
|
|
22078
22210
|
const requestContext = deps.resolveRequestContext(c);
|
|
22079
22211
|
const session = await deps.sessions.get({
|
|
@@ -22112,24 +22244,24 @@ function createTurnsRouter(deps) {
|
|
|
22112
22244
|
await turnEventStream.assertSubscribable();
|
|
22113
22245
|
} catch (error) {
|
|
22114
22246
|
if (error instanceof StreamGoneError) {
|
|
22115
|
-
throw new
|
|
22247
|
+
throw new HTTPException15(412, { message: error.message, cause: error });
|
|
22116
22248
|
}
|
|
22117
22249
|
throw error;
|
|
22118
22250
|
}
|
|
22119
22251
|
const resumeEventId = fromEventId ?? afterEventId;
|
|
22120
22252
|
if (resumeEventId !== void 0 && !await turnEventStream.hasEventId(resumeEventId)) {
|
|
22121
|
-
throw new
|
|
22253
|
+
throw new HTTPException15(400, { message: "Event id is not part of this turn stream." });
|
|
22122
22254
|
}
|
|
22123
22255
|
let includeSequenceId = false;
|
|
22124
22256
|
if (afterSequenceNumber !== void 0) {
|
|
22125
22257
|
const firstEntryId = await turnEventStream.firstEntryId();
|
|
22126
22258
|
if (firstEntryId !== void 0 && !isLegacySequenceEntryId(firstEntryId)) {
|
|
22127
|
-
throw new
|
|
22259
|
+
throw new HTTPException15(400, {
|
|
22128
22260
|
message: "after_sequence_number is not supported on this stream. Use from_event_id or after_event_id."
|
|
22129
22261
|
});
|
|
22130
22262
|
}
|
|
22131
22263
|
if (afterSequenceNumber > LEGACY_SEQUENCE_ID_MAX) {
|
|
22132
|
-
throw new
|
|
22264
|
+
throw new HTTPException15(400, {
|
|
22133
22265
|
message: "after_sequence_number is not supported above 50000."
|
|
22134
22266
|
});
|
|
22135
22267
|
}
|
|
@@ -22407,7 +22539,7 @@ function createSchedulesRouter(deps) {
|
|
|
22407
22539
|
return c.json({ data: data.map(toWireSchedule), pagination }, 200);
|
|
22408
22540
|
} catch (error) {
|
|
22409
22541
|
if (error instanceof InvalidPageTokenError3) {
|
|
22410
|
-
throw new
|
|
22542
|
+
throw new HTTPException16(400, { message: error.message, cause: error });
|
|
22411
22543
|
}
|
|
22412
22544
|
throw error;
|
|
22413
22545
|
}
|
|
@@ -22442,7 +22574,7 @@ function createSchedulesRouter(deps) {
|
|
|
22442
22574
|
return c.json({ data: data.map(toWireScheduleRun), pagination }, 200);
|
|
22443
22575
|
} catch (error) {
|
|
22444
22576
|
if (error instanceof InvalidPageTokenError3) {
|
|
22445
|
-
throw new
|
|
22577
|
+
throw new HTTPException16(400, { message: error.message, cause: error });
|
|
22446
22578
|
}
|
|
22447
22579
|
throw error;
|
|
22448
22580
|
}
|
|
@@ -22504,7 +22636,7 @@ function createSchedulesRouter(deps) {
|
|
|
22504
22636
|
}
|
|
22505
22637
|
const turnError = getTurnExecutionError(error);
|
|
22506
22638
|
if (turnError) {
|
|
22507
|
-
throw new
|
|
22639
|
+
throw new HTTPException16(turnError.status, { message: turnError.message, cause: error });
|
|
22508
22640
|
}
|
|
22509
22641
|
throw error;
|
|
22510
22642
|
}
|
|
@@ -22886,7 +23018,7 @@ import {
|
|
|
22886
23018
|
redisRequest as redisRequest2,
|
|
22887
23019
|
RequestTimeoutError as RequestTimeoutError2
|
|
22888
23020
|
} from "@truefoundry/trueforge-core/request-reply";
|
|
22889
|
-
import { HTTPException as
|
|
23021
|
+
import { HTTPException as HTTPException17 } from "hono/http-exception";
|
|
22890
23022
|
import { z as z44 } from "zod";
|
|
22891
23023
|
init_config();
|
|
22892
23024
|
init_id();
|
|
@@ -23012,10 +23144,10 @@ async function requireOwnedSession(deps, input) {
|
|
|
23012
23144
|
session_id: input.session_id
|
|
23013
23145
|
});
|
|
23014
23146
|
if (!record) {
|
|
23015
|
-
throw new
|
|
23147
|
+
throw new HTTPException17(404, { message: `Session not found: ${input.session_id}` });
|
|
23016
23148
|
}
|
|
23017
23149
|
if (!isSessionOwner2({ subject_id: requestContext.subject.id, created_by_subject: record.created_by_subject })) {
|
|
23018
|
-
throw new
|
|
23150
|
+
throw new HTTPException17(403, { message: FORBIDDEN_SESSION_ACCESS_MANAGEMENT });
|
|
23019
23151
|
}
|
|
23020
23152
|
return { requestContext, record };
|
|
23021
23153
|
}
|
|
@@ -23263,7 +23395,7 @@ function createSessionsRouter(deps) {
|
|
|
23263
23395
|
return c.json({ error: { message: `Session not found: ${sessionId}` } }, 404);
|
|
23264
23396
|
}
|
|
23265
23397
|
if (error instanceof SessionStoreInvariantError) {
|
|
23266
|
-
throw new
|
|
23398
|
+
throw new HTTPException17(422, { message: error.message, cause: error });
|
|
23267
23399
|
}
|
|
23268
23400
|
throw error;
|
|
23269
23401
|
}
|
|
@@ -23304,7 +23436,7 @@ function createSessionsRouter(deps) {
|
|
|
23304
23436
|
return c.json({ data: data.map(toWireSession), pagination }, 200);
|
|
23305
23437
|
} catch (error) {
|
|
23306
23438
|
if (error instanceof SessionStoreConflictError2) {
|
|
23307
|
-
throw new
|
|
23439
|
+
throw new HTTPException17(400, { message: error.message, cause: error });
|
|
23308
23440
|
}
|
|
23309
23441
|
throw error;
|
|
23310
23442
|
}
|
|
@@ -23364,7 +23496,7 @@ function createSessionsRouter(deps) {
|
|
|
23364
23496
|
return c.json({ data, pagination }, 200);
|
|
23365
23497
|
} catch (error) {
|
|
23366
23498
|
if (error instanceof SessionStoreConflictError2) {
|
|
23367
|
-
throw new
|
|
23499
|
+
throw new HTTPException17(400, { message: error.message, cause: error });
|
|
23368
23500
|
}
|
|
23369
23501
|
if (error instanceof SessionStoreNotFoundError2) {
|
|
23370
23502
|
return c.json({ error: { message: error.message } }, 404);
|
|
@@ -23389,21 +23521,21 @@ function createSessionsRouter(deps) {
|
|
|
23389
23521
|
const toRevoke = uniqueSubjects(body.revoke);
|
|
23390
23522
|
const revokeKeys = new Set(toRevoke.map(subjectKey));
|
|
23391
23523
|
if (toGrant.some((subject) => revokeKeys.has(subjectKey(subject)))) {
|
|
23392
|
-
throw new
|
|
23524
|
+
throw new HTTPException17(422, { message: "A subject cannot be both granted and revoked." });
|
|
23393
23525
|
}
|
|
23394
23526
|
if (toGrant.some((subject) => subject.subject_type === "tenant" && subject.subject_id !== requestContext.tenant_id)) {
|
|
23395
|
-
throw new
|
|
23527
|
+
throw new HTTPException17(422, { message: "A tenant subject must be your own tenant." });
|
|
23396
23528
|
}
|
|
23397
23529
|
const userIds = toGrant.filter((subject) => subject.subject_type === "user").map((subject) => subject.subject_id);
|
|
23398
23530
|
if (userIds.includes(requestContext.subject.id)) {
|
|
23399
|
-
throw new
|
|
23531
|
+
throw new HTTPException17(422, { message: "The session creator already has access." });
|
|
23400
23532
|
}
|
|
23401
23533
|
if (userIds.length > 0) {
|
|
23402
23534
|
const knownUsers = await deps.userStore.getUsersByIds({ context: requestContext, ids: userIds });
|
|
23403
23535
|
const knownIds = new Set(knownUsers.map((user) => user.id));
|
|
23404
23536
|
const unknownIds = userIds.filter((id) => !knownIds.has(id));
|
|
23405
23537
|
if (unknownIds.length > 0) {
|
|
23406
|
-
throw new
|
|
23538
|
+
throw new HTTPException17(422, { message: `Unknown users: ${unknownIds.join(", ")}` });
|
|
23407
23539
|
}
|
|
23408
23540
|
}
|
|
23409
23541
|
await deps.withTransaction(async (transaction) => {
|
|
@@ -23450,7 +23582,7 @@ import { OpenAPIHono as OpenAPIHono21 } from "@hono/zod-openapi";
|
|
|
23450
23582
|
|
|
23451
23583
|
// src/apis/memoryProviders.ts
|
|
23452
23584
|
import { OpenAPIHono as OpenAPIHono16 } from "@hono/zod-openapi";
|
|
23453
|
-
import { HTTPException as
|
|
23585
|
+
import { HTTPException as HTTPException18 } from "hono/http-exception";
|
|
23454
23586
|
|
|
23455
23587
|
// src/routes/memoryProviderRoutes.ts
|
|
23456
23588
|
import { createRoute as createRoute16 } from "@hono/zod-openapi";
|
|
@@ -23562,7 +23694,7 @@ function createMemoryProvidersRouter(deps) {
|
|
|
23562
23694
|
return c.json({ data: toWireProvider(record) }, 200);
|
|
23563
23695
|
} catch (error) {
|
|
23564
23696
|
if (error instanceof MissingStoredSecretError) {
|
|
23565
|
-
throw new
|
|
23697
|
+
throw new HTTPException18(400, { message: "API key is required", cause: error });
|
|
23566
23698
|
}
|
|
23567
23699
|
throw error;
|
|
23568
23700
|
}
|
|
@@ -23577,7 +23709,7 @@ function createMemoryProvidersRouter(deps) {
|
|
|
23577
23709
|
init_modelProviderStore();
|
|
23578
23710
|
import { OpenAPIHono as OpenAPIHono17 } from "@hono/zod-openapi";
|
|
23579
23711
|
import { assertSafeOutboundUrl as assertSafeOutboundUrl2, OUTBOUND_URL_BLOCKED as OUTBOUND_URL_BLOCKED2 } from "@truefoundry/trueforge-core/core";
|
|
23580
|
-
import { HTTPException as
|
|
23712
|
+
import { HTTPException as HTTPException19 } from "hono/http-exception";
|
|
23581
23713
|
|
|
23582
23714
|
// src/routes/modelProviderRoutes.ts
|
|
23583
23715
|
import { createRoute as createRoute17, z as z45 } from "@hono/zod-openapi";
|
|
@@ -23765,7 +23897,7 @@ function createModelProvidersRouter(deps) {
|
|
|
23765
23897
|
await assertSafeOutboundUrl2(provider.base_url);
|
|
23766
23898
|
} catch (error) {
|
|
23767
23899
|
const message = error instanceof Error ? error.message : OUTBOUND_URL_BLOCKED2;
|
|
23768
|
-
throw new
|
|
23900
|
+
throw new HTTPException19(400, { message, cause: error });
|
|
23769
23901
|
}
|
|
23770
23902
|
try {
|
|
23771
23903
|
const manifest = resolveModelProviderManifestForWrite({ incoming: provider, existing: void 0 });
|
|
@@ -23777,7 +23909,7 @@ function createModelProvidersRouter(deps) {
|
|
|
23777
23909
|
return c.json({ data: toWireProvider2(record) }, 201);
|
|
23778
23910
|
} catch (error) {
|
|
23779
23911
|
if (error instanceof MissingStoredSecretError) {
|
|
23780
|
-
throw new
|
|
23912
|
+
throw new HTTPException19(400, { message: "API key is required", cause: error });
|
|
23781
23913
|
}
|
|
23782
23914
|
if (error instanceof ModelProviderNameConflictError) {
|
|
23783
23915
|
return c.json({ error: { message: error.message } }, 409);
|
|
@@ -23795,7 +23927,7 @@ function createModelProvidersRouter(deps) {
|
|
|
23795
23927
|
await assertSafeOutboundUrl2(provider.base_url);
|
|
23796
23928
|
} catch (error) {
|
|
23797
23929
|
const message = error instanceof Error ? error.message : OUTBOUND_URL_BLOCKED2;
|
|
23798
|
-
throw new
|
|
23930
|
+
throw new HTTPException19(400, { message, cause: error });
|
|
23799
23931
|
}
|
|
23800
23932
|
try {
|
|
23801
23933
|
const outcome = await deps.withTransaction(
|
|
@@ -23829,7 +23961,7 @@ function createModelProvidersRouter(deps) {
|
|
|
23829
23961
|
return c.json({ data: toWireProvider2(outcome.record) }, 200);
|
|
23830
23962
|
} catch (error) {
|
|
23831
23963
|
if (error instanceof MissingStoredSecretError) {
|
|
23832
|
-
throw new
|
|
23964
|
+
throw new HTTPException19(400, { message: "API key is required", cause: error });
|
|
23833
23965
|
}
|
|
23834
23966
|
throw error;
|
|
23835
23967
|
}
|
|
@@ -23876,7 +24008,7 @@ function createModelProvidersRouter(deps) {
|
|
|
23876
24008
|
|
|
23877
24009
|
// src/apis/sandboxProviders.ts
|
|
23878
24010
|
import { OpenAPIHono as OpenAPIHono18 } from "@hono/zod-openapi";
|
|
23879
|
-
import { HTTPException as
|
|
24011
|
+
import { HTTPException as HTTPException20 } from "hono/http-exception";
|
|
23880
24012
|
|
|
23881
24013
|
// src/routes/sandboxProviderRoutes.ts
|
|
23882
24014
|
import { createRoute as createRoute18 } from "@hono/zod-openapi";
|
|
@@ -24054,16 +24186,16 @@ function createSandboxProvidersRouter(deps) {
|
|
|
24054
24186
|
);
|
|
24055
24187
|
} catch (error) {
|
|
24056
24188
|
if (error instanceof MissingStoredSecretError) {
|
|
24057
|
-
throw new
|
|
24189
|
+
throw new HTTPException20(400, { message: "API key is required", cause: error });
|
|
24058
24190
|
}
|
|
24059
24191
|
if (isDaytonaAuthError(error)) {
|
|
24060
|
-
throw new
|
|
24192
|
+
throw new HTTPException20(422, {
|
|
24061
24193
|
message: "Sandbox provider rejected the API key \u2014 check the credentials",
|
|
24062
24194
|
cause: error
|
|
24063
24195
|
});
|
|
24064
24196
|
}
|
|
24065
24197
|
if (isDaytonaPermissionError(error)) {
|
|
24066
|
-
throw new
|
|
24198
|
+
throw new HTTPException20(422, {
|
|
24067
24199
|
message: "Sandbox provider denied access: the API key is missing required permissions. Grant write:sandboxes, write:snapshots, and delete:snapshots on the key, then try again.",
|
|
24068
24200
|
cause: error
|
|
24069
24201
|
});
|
|
@@ -24370,7 +24502,7 @@ function createAvailableSkillsRouter(deps) {
|
|
|
24370
24502
|
|
|
24371
24503
|
// src/apis/webSearchProviders.ts
|
|
24372
24504
|
import { OpenAPIHono as OpenAPIHono20 } from "@hono/zod-openapi";
|
|
24373
|
-
import { HTTPException as
|
|
24505
|
+
import { HTTPException as HTTPException21 } from "hono/http-exception";
|
|
24374
24506
|
|
|
24375
24507
|
// src/routes/webSearchProviderRoutes.ts
|
|
24376
24508
|
import { createRoute as createRoute20 } from "@hono/zod-openapi";
|
|
@@ -24483,7 +24615,7 @@ function createWebSearchProvidersRouter(deps) {
|
|
|
24483
24615
|
return c.json({ data: toWireProvider3(record) }, 200);
|
|
24484
24616
|
} catch (error) {
|
|
24485
24617
|
if (error instanceof MissingStoredSecretError) {
|
|
24486
|
-
throw new
|
|
24618
|
+
throw new HTTPException21(400, { message: "API key is required", cause: error });
|
|
24487
24619
|
}
|
|
24488
24620
|
throw error;
|
|
24489
24621
|
}
|
|
@@ -24560,7 +24692,7 @@ import {
|
|
|
24560
24692
|
decodeOffsetPageToken,
|
|
24561
24693
|
encodeOffsetPageToken
|
|
24562
24694
|
} from "@truefoundry/trueforge-core/agent-session/store/OffsetPageToken";
|
|
24563
|
-
import { HTTPException as
|
|
24695
|
+
import { HTTPException as HTTPException22 } from "hono/http-exception";
|
|
24564
24696
|
|
|
24565
24697
|
// src/routes/userRoutes.ts
|
|
24566
24698
|
import { createRoute as createRoute21 } from "@hono/zod-openapi";
|
|
@@ -24623,7 +24755,7 @@ function decodeOffset(pageToken) {
|
|
|
24623
24755
|
return decodeOffsetPageToken(pageToken);
|
|
24624
24756
|
} catch (error) {
|
|
24625
24757
|
if (error instanceof InvalidPageTokenError4) {
|
|
24626
|
-
throw new
|
|
24758
|
+
throw new HTTPException22(400, { message: error.message, cause: error });
|
|
24627
24759
|
}
|
|
24628
24760
|
throw error;
|
|
24629
24761
|
}
|
|
@@ -24912,6 +25044,7 @@ async function runTool(fn) {
|
|
|
24912
25044
|
|
|
24913
25045
|
// src/mcp/server/trueforge/tools/custom.ts
|
|
24914
25046
|
init_sandboxEnvironment();
|
|
25047
|
+
import { AgentSpecSchema as AgentSpecSchema4 } from "@truefoundry/trueforge-core/agent-session";
|
|
24915
25048
|
import { z as z48 } from "zod";
|
|
24916
25049
|
|
|
24917
25050
|
// src/mcp/server/trueforge/wireApiClient.ts
|
|
@@ -25050,6 +25183,34 @@ function registerCurrentSessionTool(server, client2) {
|
|
|
25050
25183
|
})
|
|
25051
25184
|
);
|
|
25052
25185
|
}
|
|
25186
|
+
function registerUpdateCurrentSessionTool(server, client2) {
|
|
25187
|
+
const descriptor = {
|
|
25188
|
+
name: "update_current_session",
|
|
25189
|
+
description: "Update this session's spec. Send the full spec back with edits; omitted fields are removed.",
|
|
25190
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
25191
|
+
method: "PATCH",
|
|
25192
|
+
path: "/api/v1/sessions/{session_id}",
|
|
25193
|
+
inputSchema: {},
|
|
25194
|
+
pathParameters: ["session_id"],
|
|
25195
|
+
queryParameters: [],
|
|
25196
|
+
bodyParameters: ["agent"]
|
|
25197
|
+
};
|
|
25198
|
+
server.registerTool(
|
|
25199
|
+
descriptor.name,
|
|
25200
|
+
{
|
|
25201
|
+
description: descriptor.description,
|
|
25202
|
+
inputSchema: { spec: AgentSpecSchema4 },
|
|
25203
|
+
annotations: descriptor.annotations
|
|
25204
|
+
},
|
|
25205
|
+
async ({ spec }, extra) => runTool(async () => {
|
|
25206
|
+
const sessionId = headerValue2(extra.requestInfo?.headers, TRUEFORGE_SESSION_HEADER);
|
|
25207
|
+
if (sessionId === void 0) {
|
|
25208
|
+
throw new ToolResultError(400, "No current chat. This tool is only available during a draft session turn.");
|
|
25209
|
+
}
|
|
25210
|
+
return client2.execute(descriptor, { session_id: sessionId, agent: { spec } }, extra.signal);
|
|
25211
|
+
})
|
|
25212
|
+
);
|
|
25213
|
+
}
|
|
25053
25214
|
function registerSandboxEnvironmentUpdateTool(server, client2, tools) {
|
|
25054
25215
|
const getEnvironment = openApiTool(tools, "get_sandbox_environment");
|
|
25055
25216
|
const descriptor = {
|
|
@@ -25083,6 +25244,7 @@ function registerSandboxEnvironmentUpdateTool(server, client2, tools) {
|
|
|
25083
25244
|
}
|
|
25084
25245
|
function registerCustomTools(server, client2, tools) {
|
|
25085
25246
|
registerCurrentSessionTool(server, client2);
|
|
25247
|
+
registerUpdateCurrentSessionTool(server, client2);
|
|
25086
25248
|
registerSandboxEnvironmentUpdateTool(server, client2, tools);
|
|
25087
25249
|
}
|
|
25088
25250
|
|
|
@@ -25283,7 +25445,7 @@ function createAppErrorHandler(params) {
|
|
|
25283
25445
|
logError(400, "Client API error");
|
|
25284
25446
|
return c.json({ error: { message: error.message } }, 400);
|
|
25285
25447
|
}
|
|
25286
|
-
if (error instanceof
|
|
25448
|
+
if (error instanceof HTTPException23) {
|
|
25287
25449
|
logError(error.status, error.status >= 500 ? "Server API error" : "Client API error");
|
|
25288
25450
|
return c.json({ error: { message: error.message } }, error.status);
|
|
25289
25451
|
}
|
|
@@ -25601,6 +25763,35 @@ function createServerApp(deps) {
|
|
|
25601
25763
|
authMiddleware
|
|
25602
25764
|
)
|
|
25603
25765
|
);
|
|
25766
|
+
const turnsRouter = new OpenAPIHono23();
|
|
25767
|
+
turnsRouter.use(
|
|
25768
|
+
"/:session_id/turns",
|
|
25769
|
+
createAuthOrServiceKeyMiddleware({
|
|
25770
|
+
authenticator: deps.authenticator,
|
|
25771
|
+
apiKey: config_default.TRUEFORGE_API_KEY
|
|
25772
|
+
})
|
|
25773
|
+
);
|
|
25774
|
+
turnsRouter.use("/:session_id/turns/:turn_id/*", authMiddleware);
|
|
25775
|
+
turnsRouter.route(
|
|
25776
|
+
"/",
|
|
25777
|
+
createTurnsRouter({
|
|
25778
|
+
accessControlStore: deps.accessControlStore,
|
|
25779
|
+
activeTurns: deps.activeTurns,
|
|
25780
|
+
authorizer: deps.authorizer,
|
|
25781
|
+
eventSubscriptions: deps.eventSubscriptions,
|
|
25782
|
+
logger: deps.logger,
|
|
25783
|
+
redis: deps.redis,
|
|
25784
|
+
requestReplyRouter: deps.requestReplyRouter,
|
|
25785
|
+
resolveAgentStore: deps.resolveAgentStore,
|
|
25786
|
+
resolveRequestContext,
|
|
25787
|
+
resolveTurnExecutionStores: deps.resolveTurnExecutionStores,
|
|
25788
|
+
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
25789
|
+
sandboxProviderStore: deps.sandboxProviderStore,
|
|
25790
|
+
sessions: deps.sessions,
|
|
25791
|
+
sessionStore: deps.sessionStore
|
|
25792
|
+
})
|
|
25793
|
+
);
|
|
25794
|
+
app.route("/api/v1/sessions", turnsRouter);
|
|
25604
25795
|
app.route(
|
|
25605
25796
|
"/api/v1/sessions",
|
|
25606
25797
|
withAuth(
|
|
@@ -25629,28 +25820,6 @@ function createServerApp(deps) {
|
|
|
25629
25820
|
authMiddleware
|
|
25630
25821
|
)
|
|
25631
25822
|
);
|
|
25632
|
-
app.route(
|
|
25633
|
-
"/api/v1/sessions",
|
|
25634
|
-
withAuth(
|
|
25635
|
-
createTurnsRouter({
|
|
25636
|
-
accessControlStore: deps.accessControlStore,
|
|
25637
|
-
activeTurns: deps.activeTurns,
|
|
25638
|
-
authorizer: deps.authorizer,
|
|
25639
|
-
eventSubscriptions: deps.eventSubscriptions,
|
|
25640
|
-
logger: deps.logger,
|
|
25641
|
-
redis: deps.redis,
|
|
25642
|
-
requestReplyRouter: deps.requestReplyRouter,
|
|
25643
|
-
resolveAgentStore: deps.resolveAgentStore,
|
|
25644
|
-
resolveRequestContext,
|
|
25645
|
-
resolveTurnExecutionStores: deps.resolveTurnExecutionStores,
|
|
25646
|
-
sandboxEnvironmentStore: deps.sandboxEnvironmentStore,
|
|
25647
|
-
sandboxProviderStore: deps.sandboxProviderStore,
|
|
25648
|
-
sessions: deps.sessions,
|
|
25649
|
-
sessionStore: deps.sessionStore
|
|
25650
|
-
}),
|
|
25651
|
-
authMiddleware
|
|
25652
|
-
)
|
|
25653
|
-
);
|
|
25654
25823
|
app.use("/mcp", authMiddleware);
|
|
25655
25824
|
app.route(
|
|
25656
25825
|
"/mcp",
|
|
@@ -25767,7 +25936,7 @@ var TrueForgeAuthorizer = class {
|
|
|
25767
25936
|
init_config();
|
|
25768
25937
|
|
|
25769
25938
|
// src/truefoundry/TrueFoundryAuthenticator.ts
|
|
25770
|
-
import { HTTPException as
|
|
25939
|
+
import { HTTPException as HTTPException24 } from "hono/http-exception";
|
|
25771
25940
|
var TrueFoundryAuthenticator = class {
|
|
25772
25941
|
#client;
|
|
25773
25942
|
constructor(client2) {
|
|
@@ -25776,7 +25945,7 @@ var TrueFoundryAuthenticator = class {
|
|
|
25776
25945
|
async authenticate(c) {
|
|
25777
25946
|
const token = extractRequestToken(c);
|
|
25778
25947
|
if (!token) {
|
|
25779
|
-
throw new
|
|
25948
|
+
throw new HTTPException24(401, { message: "Authentication required" });
|
|
25780
25949
|
}
|
|
25781
25950
|
const session = await this.#client.getSession(token);
|
|
25782
25951
|
const { subject } = session.user;
|
|
@@ -25794,17 +25963,17 @@ var TrueFoundryAuthenticator = class {
|
|
|
25794
25963
|
};
|
|
25795
25964
|
|
|
25796
25965
|
// src/auth/oidcAuthenticator.ts
|
|
25797
|
-
import { HTTPException as
|
|
25966
|
+
import { HTTPException as HTTPException25 } from "hono/http-exception";
|
|
25798
25967
|
import { jwtVerify as jwtVerify2 } from "jose";
|
|
25799
25968
|
var OidcAuthenticator = class {
|
|
25800
25969
|
async authenticate(c) {
|
|
25801
25970
|
const oidcVerify2 = getOidcVerify();
|
|
25802
25971
|
if (!oidcVerify2) {
|
|
25803
|
-
throw new
|
|
25972
|
+
throw new HTTPException25(401, { message: "Authentication required" });
|
|
25804
25973
|
}
|
|
25805
25974
|
const token = extractRequestToken(c);
|
|
25806
25975
|
if (!token) {
|
|
25807
|
-
throw new
|
|
25976
|
+
throw new HTTPException25(401, { message: "Authentication required" });
|
|
25808
25977
|
}
|
|
25809
25978
|
let payload;
|
|
25810
25979
|
try {
|
|
@@ -25813,7 +25982,7 @@ var OidcAuthenticator = class {
|
|
|
25813
25982
|
audience: oidcVerify2.audience
|
|
25814
25983
|
}));
|
|
25815
25984
|
} catch {
|
|
25816
|
-
throw new
|
|
25985
|
+
throw new HTTPException25(401, { message: "Authentication required" });
|
|
25817
25986
|
}
|
|
25818
25987
|
try {
|
|
25819
25988
|
const claims = { ...payload };
|
|
@@ -25823,7 +25992,7 @@ var OidcAuthenticator = class {
|
|
|
25823
25992
|
user_credential: token
|
|
25824
25993
|
});
|
|
25825
25994
|
} catch (error) {
|
|
25826
|
-
throw new
|
|
25995
|
+
throw new HTTPException25(401, { message: "Authentication required", cause: error });
|
|
25827
25996
|
}
|
|
25828
25997
|
}
|
|
25829
25998
|
};
|
|
@@ -25935,7 +26104,7 @@ var MemoryCatalog = class _MemoryCatalog {
|
|
|
25935
26104
|
init_config();
|
|
25936
26105
|
|
|
25937
26106
|
// src/catalog/modelCatalog.gen.ts
|
|
25938
|
-
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: chat-latest\n name: chat-latest\n properties:\n context_length: 400000\n max_output_tokens: 128000\n reasoning_efforts:\n - medium\n - model_id: gpt-5.3-codex\n name: gpt-5-3-codex\n properties:\n context_length: 400000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\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 - model_id: gpt-6.1-terra\n name: gpt-6-1-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 - 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-fable-5-2\n name: claude-fable-5-2\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-6\n name: claude-opus-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-opus-4-7\n name: claude-opus-4-7\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 - none\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 reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\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 - none\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 - none\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 - model_id: gemini-4-argon\n name: gemini-4-argon\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-4-carbon\n name: gemini-4-carbon\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-flash-latest\n name: gemini-flash-latest\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-flash-lite-latest\n name: gemini-flash-lite-latest\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: gemma-4-26b-a4b-it\n name: gemma-4-26b-a4b-it\n properties:\n context_length: 262144\n max_output_tokens: 32768\n - model_id: gemma-4-31b-it\n name: gemma-4-31b-it\n properties:\n context_length: 256000\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: 1048576\n - model_id: accounts/fireworks/models/deepseek-v4p1-flash-1017\n name: deepseek-v4p1-flash-1017\n properties:\n context_length: 1048576\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/kimi-k3p1-pro\n name: kimi-k3p1-pro\n properties:\n context_length: 1048576\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 - model_id: accounts/fireworks/models/minimax-m3p1-flash\n name: minimax-m3p1-flash\n properties:\n context_length: 1048576\n reasoning_efforts:\n - low\n - medium\n - high\n - max\n - model_id: accounts/fireworks/models/muse-spark-open\n name: muse-spark-open\n properties:\n context_length: 1048576\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: deepseek-ai/DeepSeek-V4.1-Flash-1017\n name: deepseek-v4-1-flash-1017\n properties:\n context_length: 1048576\n max_output_tokens: 384000\n - model_id: google/gemma-4-12B-it\n name: gemma-4-12b-it\n properties:\n context_length: 262144\n - model_id: google/gemma-4-26B-A4B-it\n name: gemma-4-26b-a4b-it\n properties:\n context_length: 262144\n - model_id: google/gemma-4-E2B-it\n name: gemma-4-e2b-it\n properties:\n context_length: 128000\n - model_id: google/gemma-4-E4B-it\n name: gemma-4-e4b-it\n properties:\n context_length: 131072\n - model_id: meta-models/Muse-Glimmer-30B\n name: muse-glimmer-30b\n properties:\n context_length: 131072\n - model_id: meta-models/Muse-Spark-Open-816B-A42B\n name: muse-spark-open-816b-a42b\n properties:\n context_length: 1048576\n - model_id: MiniMaxAI/MiniMax-M2.7\n name: minimax-m2-7\n properties:\n context_length: 228700\n - model_id: MiniMaxAI/MiniMax-M3\n name: minimax-m3\n properties:\n context_length: 524288\n - model_id: MiniMaxAI/MiniMax-M3.1-Flash\n name: minimax-m3-1-flash\n properties:\n context_length: 1048576\n max_output_tokens: 524288\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: moonshotai/Kimi-K2.6\n name: kimi-k2-6\n properties:\n context_length: 262144\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: moonshotai/Kimi-K3.1-Pro\n name: kimi-k3-1-pro\n properties:\n context_length: 1048576\n - model_id: nvidia/nemotron-3-ultra-550b-a55b\n name: nemotron-3-ultra-550b-a55b\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16\n name: nvidia-nemotron-3-nano-30b-a3b-bf16\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16\n name: nvidia-nemotron-3-super-120b-a12b-bf16\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8\n name: nvidia-nemotron-3-super-120b-a12b-fp8\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3.5-Super-VL\n name: nvidia-nemotron-3-5-super-vl\n properties:\n context_length: 262144\n - model_id: openai/gpt-oss-120b\n name: gpt-oss-120b\n properties:\n context_length: 131072\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: Prism-ML/Ternary-Bonsai-27B\n name: ternary-bonsai-27b\n properties:\n context_length: 262144\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - max\n - model_id: Qwen/Qwen3.6-35B-A3B-FP8\n name: qwen3-6-35b-a3b-fp8\n properties:\n context_length: 262144\n - model_id: Qwen/Qwen3.6-Plus\n name: qwen3-6-plus\n properties:\n context_length: 1000000\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: reflection/Beam-1.0-501B-A23B\n name: beam-1-0-501b-a23b\n properties:\n context_length: 1048576\n - model_id: thinkingmachines/Inkling\n name: inkling\n properties:\n context_length: 524288\n - model_id: thinkingmachines/Inkling-Small\n name: inkling-small\n properties:\n context_length: 524288\n reasoning_efforts:\n - minimal\n - low\n - medium\n - high\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.2-FP8\n name: glm-5-2-fp8\n properties:\n context_length: 1048576\n max_output_tokens: 131072\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: 1048575\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: zai-org/GLM-5.3-FP8\n name: glm-5-3-fp8\n properties:\n context_length: 1048576\n reasoning_efforts:\n - low\n - high\n - max\n";
|
|
26107
|
+
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: chat-latest\n name: chat-latest\n properties:\n context_length: 400000\n max_output_tokens: 128000\n reasoning_efforts:\n - medium\n - model_id: gpt-5.3-codex\n name: gpt-5-3-codex\n properties:\n context_length: 400000\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\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 - model_id: gpt-6.1-terra\n name: gpt-6-1-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 - 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-fable-5-2\n name: claude-fable-5-2\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-6\n name: claude-opus-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-opus-4-7\n name: claude-opus-4-7\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 - none\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 reasoning_efforts:\n - none\n - minimal\n - low\n - medium\n - high\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 - none\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 - none\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 - model_id: gemini-4-argon\n name: gemini-4-argon\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-4-carbon\n name: gemini-4-carbon\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-flash-latest\n name: gemini-flash-latest\n properties:\n context_length: 1048576\n max_output_tokens: 65536\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: gemini-flash-lite-latest\n name: gemini-flash-lite-latest\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: gemma-4-26b-a4b-it\n name: gemma-4-26b-a4b-it\n properties:\n context_length: 262144\n max_output_tokens: 32768\n - model_id: gemma-4-31b-it\n name: gemma-4-31b-it\n properties:\n context_length: 256000\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: 1048576\n - model_id: accounts/fireworks/models/deepseek-v4p1-flash-1017\n name: deepseek-v4p1-flash-1017\n properties:\n context_length: 1048576\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/kimi-k3p1-pro\n name: kimi-k3p1-pro\n properties:\n context_length: 1048576\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 - model_id: accounts/fireworks/models/minimax-m3p1-flash\n name: minimax-m3p1-flash\n properties:\n context_length: 1048576\n reasoning_efforts:\n - low\n - medium\n - high\n - max\n - model_id: accounts/fireworks/models/muse-spark-open\n name: muse-spark-open\n properties:\n context_length: 1048576\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: deepseek-ai/DeepSeek-V4.1-Flash-1017\n name: deepseek-v4-1-flash-1017\n properties:\n context_length: 1048576\n max_output_tokens: 384000\n - model_id: google/gemma-4-12B-it\n name: gemma-4-12b-it\n properties:\n context_length: 262144\n - model_id: google/gemma-4-26B-A4B-it\n name: gemma-4-26b-a4b-it\n properties:\n context_length: 262144\n - model_id: google/gemma-4-E2B-it\n name: gemma-4-e2b-it\n properties:\n context_length: 128000\n - model_id: google/gemma-4-E4B-it\n name: gemma-4-e4b-it\n properties:\n context_length: 131072\n - model_id: meta-models/Muse-Glimmer-30B\n name: muse-glimmer-30b\n properties:\n context_length: 131072\n - model_id: meta-models/Muse-Spark-Open-816B-A42B\n name: muse-spark-open-816b-a42b\n properties:\n context_length: 1048576\n - model_id: MiniMaxAI/MiniMax-M2.7\n name: minimax-m2-7\n properties:\n context_length: 228700\n - model_id: MiniMaxAI/MiniMax-M3\n name: minimax-m3\n properties:\n context_length: 524288\n - model_id: MiniMaxAI/MiniMax-M3.1-Flash\n name: minimax-m3-1-flash\n properties:\n context_length: 1048576\n max_output_tokens: 524288\n reasoning_efforts:\n - low\n - medium\n - high\n - xhigh\n - max\n - model_id: moonshotai/Kimi-K2.6\n name: kimi-k2-6\n properties:\n context_length: 262144\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: moonshotai/Kimi-K3.1-Pro\n name: kimi-k3-1-pro\n properties:\n context_length: 1048576\n - model_id: nvidia/nemotron-3-ultra-550b-a55b\n name: nemotron-3-ultra-550b-a55b\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16\n name: nvidia-nemotron-3-nano-30b-a3b-bf16\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16\n name: nvidia-nemotron-3-super-120b-a12b-bf16\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8\n name: nvidia-nemotron-3-super-120b-a12b-fp8\n properties:\n context_length: 1000000\n - model_id: nvidia/NVIDIA-Nemotron-3.5-Super-VL\n name: nvidia-nemotron-3-5-super-vl\n properties:\n context_length: 262144\n - model_id: openai/gpt-oss-120b\n name: gpt-oss-120b\n properties:\n context_length: 131072\n reasoning_efforts:\n - low\n - medium\n - high\n - model_id: Prism-ML/Ternary-Bonsai-27B\n name: ternary-bonsai-27b\n properties:\n context_length: 262144\n reasoning_efforts:\n - none\n - low\n - medium\n - high\n - max\n - model_id: Qwen/Qwen3.6-35B-A3B-FP8\n name: qwen3-6-35b-a3b-fp8\n properties:\n context_length: 262144\n - model_id: Qwen/Qwen3.6-Plus\n name: qwen3-6-plus\n properties:\n context_length: 1000000\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: 131072\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: reflection/Beam-1.0-501B-A23B\n name: beam-1-0-501b-a23b\n properties:\n context_length: 1048576\n - model_id: thinkingmachines/Inkling\n name: inkling\n properties:\n context_length: 524288\n - model_id: thinkingmachines/Inkling-Small\n name: inkling-small\n properties:\n context_length: 524288\n reasoning_efforts:\n - minimal\n - low\n - medium\n - high\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.2-FP8\n name: glm-5-2-fp8\n properties:\n context_length: 1048575\n max_output_tokens: 131072\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: 1048575\n max_output_tokens: 128000\n reasoning_efforts:\n - low\n - high\n - max\n - model_id: zai-org/GLM-5.3-FP8\n name: glm-5-3-fp8\n properties:\n context_length: 1048576\n reasoning_efforts:\n - low\n - high\n - max\n";
|
|
25939
26108
|
|
|
25940
26109
|
// src/catalog/ModelCatalog.ts
|
|
25941
26110
|
var ModelCatalog = class _ModelCatalog {
|
|
@@ -27427,7 +27596,7 @@ var InlineModelProviderStore = class {
|
|
|
27427
27596
|
|
|
27428
27597
|
// src/truefoundry/InlineSkillStore.ts
|
|
27429
27598
|
init_gitSkillMounts();
|
|
27430
|
-
import { HTTPException as
|
|
27599
|
+
import { HTTPException as HTTPException27 } from "hono/http-exception";
|
|
27431
27600
|
var InlineSkillStore = class {
|
|
27432
27601
|
#inline;
|
|
27433
27602
|
constructor(input) {
|
|
@@ -27482,7 +27651,7 @@ var InlineSkillStore = class {
|
|
|
27482
27651
|
#require(name) {
|
|
27483
27652
|
const manifest = this.#inline[name];
|
|
27484
27653
|
if (manifest === void 0) {
|
|
27485
|
-
throw new
|
|
27654
|
+
throw new HTTPException27(422, {
|
|
27486
27655
|
message: `Unknown skill "${name}" \u2014 not present in ${X_TFG_SKILLS}`
|
|
27487
27656
|
});
|
|
27488
27657
|
}
|
|
@@ -27502,7 +27671,7 @@ var InlineSkillStore = class {
|
|
|
27502
27671
|
};
|
|
27503
27672
|
function unsupportedInlineSkillWrite() {
|
|
27504
27673
|
return Promise.reject(
|
|
27505
|
-
new
|
|
27674
|
+
new HTTPException27(400, { message: `Request-scoped skills from ${X_TFG_SKILLS} do not support writes` })
|
|
27506
27675
|
);
|
|
27507
27676
|
}
|
|
27508
27677
|
|
|
@@ -27560,7 +27729,7 @@ import {
|
|
|
27560
27729
|
getOperationMetrics as getOperationMetrics3,
|
|
27561
27730
|
httpStatusClass
|
|
27562
27731
|
} from "@truefoundry/trueforge-core/core";
|
|
27563
|
-
import { HTTPException as
|
|
27732
|
+
import { HTTPException as HTTPException28 } from "hono/http-exception";
|
|
27564
27733
|
import { LRUCache } from "lru-cache";
|
|
27565
27734
|
import { fetch as undiciFetch2 } from "undici";
|
|
27566
27735
|
import { z as z55 } from "zod";
|
|
@@ -27954,7 +28123,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
27954
28123
|
...extractErrorLogFields10(parsed.error),
|
|
27955
28124
|
reportable_error: { error: parsed.error }
|
|
27956
28125
|
});
|
|
27957
|
-
throw new
|
|
28126
|
+
throw new HTTPException28(424, {
|
|
27958
28127
|
message: "TrueFoundry ServiceFoundry put remote agent returned an unexpected response",
|
|
27959
28128
|
cause: parsed.error
|
|
27960
28129
|
});
|
|
@@ -28030,7 +28199,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28030
28199
|
this.#logger.error("TrueFoundry ServiceFoundry resolve agent-skill-versions returned an unexpected response", {
|
|
28031
28200
|
...extractErrorLogFields10(error)
|
|
28032
28201
|
});
|
|
28033
|
-
throw new
|
|
28202
|
+
throw new HTTPException28(500, {
|
|
28034
28203
|
message: "TrueFoundry ServiceFoundry resolve agent-skill-versions returned an unexpected response",
|
|
28035
28204
|
cause: error
|
|
28036
28205
|
});
|
|
@@ -28084,7 +28253,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28084
28253
|
...extractErrorLogFields10(error),
|
|
28085
28254
|
reportable_error: { error, extra: { mcp_server_id: input.mcpServerId } }
|
|
28086
28255
|
});
|
|
28087
|
-
throw new
|
|
28256
|
+
throw new HTTPException28(424, {
|
|
28088
28257
|
message: "TrueFoundry ServiceFoundry MCP authorize returned an unexpected response",
|
|
28089
28258
|
cause: error
|
|
28090
28259
|
});
|
|
@@ -28109,7 +28278,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28109
28278
|
...extractErrorLogFields10(error),
|
|
28110
28279
|
reportable_error: { error, extra: { mcp_server_id: input.mcpServerId } }
|
|
28111
28280
|
});
|
|
28112
|
-
throw new
|
|
28281
|
+
throw new HTTPException28(424, {
|
|
28113
28282
|
message: "TrueFoundry ServiceFoundry MCP auth status returned an unexpected response",
|
|
28114
28283
|
cause: error
|
|
28115
28284
|
});
|
|
@@ -28143,23 +28312,23 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28143
28312
|
method: "GET"
|
|
28144
28313
|
});
|
|
28145
28314
|
} catch (error) {
|
|
28146
|
-
if (error instanceof
|
|
28315
|
+
if (error instanceof HTTPException28 && (error.status === 401 || error.status === 403)) {
|
|
28147
28316
|
throw error;
|
|
28148
28317
|
}
|
|
28149
|
-
throw new
|
|
28318
|
+
throw new HTTPException28(500, {
|
|
28150
28319
|
message: "TrueFoundry ServiceFoundry session request failed",
|
|
28151
28320
|
cause: error
|
|
28152
28321
|
});
|
|
28153
28322
|
}
|
|
28154
28323
|
const parsed = GetSessionWireSchema.safeParse(payload);
|
|
28155
28324
|
if (!parsed.success) {
|
|
28156
|
-
throw new
|
|
28325
|
+
throw new HTTPException28(500, {
|
|
28157
28326
|
message: "TrueFoundry ServiceFoundry session response was malformed",
|
|
28158
28327
|
cause: parsed.error
|
|
28159
28328
|
});
|
|
28160
28329
|
}
|
|
28161
28330
|
if (parsed.data.user === null) {
|
|
28162
|
-
throw new
|
|
28331
|
+
throw new HTTPException28(401, { message: "Authentication required" });
|
|
28163
28332
|
}
|
|
28164
28333
|
return parsed.data;
|
|
28165
28334
|
}
|
|
@@ -28182,14 +28351,14 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28182
28351
|
});
|
|
28183
28352
|
} catch (error) {
|
|
28184
28353
|
const causeString = error instanceof Error ? error.message : String(error);
|
|
28185
|
-
throw new
|
|
28354
|
+
throw new HTTPException28(500, {
|
|
28186
28355
|
message: `TrueFoundry ServiceFoundry session request failed: ${causeString}`,
|
|
28187
28356
|
cause: error
|
|
28188
28357
|
});
|
|
28189
28358
|
}
|
|
28190
28359
|
const parsed = TenantControlPlaneUrlSchema.safeParse(payload);
|
|
28191
28360
|
if (!parsed.success) {
|
|
28192
|
-
throw new
|
|
28361
|
+
throw new HTTPException28(500, {
|
|
28193
28362
|
message: "TrueFoundry ServiceFoundry session response was malformed",
|
|
28194
28363
|
cause: parsed.error
|
|
28195
28364
|
});
|
|
@@ -28215,7 +28384,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28215
28384
|
...extractErrorLogFields10(parsed.error),
|
|
28216
28385
|
reportable_error: { error: parsed.error }
|
|
28217
28386
|
});
|
|
28218
|
-
throw new
|
|
28387
|
+
throw new HTTPException28(424, {
|
|
28219
28388
|
message: "TrueFoundry ServiceFoundry agent permissions response was malformed",
|
|
28220
28389
|
cause: parsed.error
|
|
28221
28390
|
});
|
|
@@ -28239,7 +28408,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28239
28408
|
...extractErrorLogFields10(parsed.error),
|
|
28240
28409
|
reportable_error: { error: parsed.error }
|
|
28241
28410
|
});
|
|
28242
|
-
throw new
|
|
28411
|
+
throw new HTTPException28(424, {
|
|
28243
28412
|
message: "TrueFoundry ServiceFoundry tenant permissions response was malformed",
|
|
28244
28413
|
cause: parsed.error
|
|
28245
28414
|
});
|
|
@@ -28271,7 +28440,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28271
28440
|
this.#logger.error("TrueFoundry ServiceFoundry subjects response was malformed", {
|
|
28272
28441
|
...extractErrorLogFields10(parsed.error)
|
|
28273
28442
|
});
|
|
28274
|
-
throw new
|
|
28443
|
+
throw new HTTPException28(424, {
|
|
28275
28444
|
message: "TrueFoundry ServiceFoundry subjects response was malformed",
|
|
28276
28445
|
cause: parsed.error
|
|
28277
28446
|
});
|
|
@@ -28303,7 +28472,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28303
28472
|
...extractErrorLogFields10(parsed.error),
|
|
28304
28473
|
reportable_error: { error: parsed.error }
|
|
28305
28474
|
});
|
|
28306
|
-
throw new
|
|
28475
|
+
throw new HTTPException28(424, {
|
|
28307
28476
|
message: "TrueFoundry ServiceFoundry vend-token response was malformed",
|
|
28308
28477
|
cause: parsed.error
|
|
28309
28478
|
});
|
|
@@ -28317,7 +28486,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28317
28486
|
...extractErrorLogFields10(parsed.error),
|
|
28318
28487
|
reportable_error: { error: parsed.error }
|
|
28319
28488
|
});
|
|
28320
|
-
throw new
|
|
28489
|
+
throw new HTTPException28(424, {
|
|
28321
28490
|
message: "TrueFoundry ServiceFoundry server returned an unexpected list response",
|
|
28322
28491
|
cause: parsed.error
|
|
28323
28492
|
});
|
|
@@ -28375,7 +28544,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28375
28544
|
timedOut,
|
|
28376
28545
|
...extractErrorLogFields10(error)
|
|
28377
28546
|
});
|
|
28378
|
-
throw new
|
|
28547
|
+
throw new HTTPException28(500, {
|
|
28379
28548
|
message: timedOut ? `TrueFoundry ServiceFoundry server request timed out after ${String(timeoutMs / 1e3)}s` : "TrueFoundry ServiceFoundry server request failed",
|
|
28380
28549
|
cause: error
|
|
28381
28550
|
});
|
|
@@ -28389,7 +28558,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28389
28558
|
if (response.status === 401 || response.status === 403) {
|
|
28390
28559
|
record("error", response.status);
|
|
28391
28560
|
const detail = await readServiceFoundryErrorMessage(response);
|
|
28392
|
-
throw new
|
|
28561
|
+
throw new HTTPException28(response.status, {
|
|
28393
28562
|
message: `TrueFoundry ServiceFoundry server rejected the request: ${detail ?? `HTTP ${String(response.status)}`}`
|
|
28394
28563
|
});
|
|
28395
28564
|
}
|
|
@@ -28400,7 +28569,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28400
28569
|
if (!response.ok) {
|
|
28401
28570
|
record("error", response.status);
|
|
28402
28571
|
const detail = await readServiceFoundryErrorMessage(response);
|
|
28403
|
-
throw new
|
|
28572
|
+
throw new HTTPException28(424, {
|
|
28404
28573
|
message: `TrueFoundry ServiceFoundry server request failed: ${detail ?? `HTTP ${String(response.status)}`}`
|
|
28405
28574
|
});
|
|
28406
28575
|
}
|
|
@@ -28424,7 +28593,7 @@ var TrueFoundryServiceFoundryServerClient = class {
|
|
|
28424
28593
|
...extractErrorLogFields10(error),
|
|
28425
28594
|
reportable_error: { error }
|
|
28426
28595
|
});
|
|
28427
|
-
throw new
|
|
28596
|
+
throw new HTTPException28(424, {
|
|
28428
28597
|
message: "TrueFoundry ServiceFoundry server returned non-JSON",
|
|
28429
28598
|
cause: error
|
|
28430
28599
|
});
|
|
@@ -28637,14 +28806,14 @@ var TrueFoundryAgentStore = class {
|
|
|
28637
28806
|
|
|
28638
28807
|
// src/truefoundry/TrueFoundryMcpServerStore.ts
|
|
28639
28808
|
import { McpConnectionError as McpConnectionError6 } from "@truefoundry/trueforge-core/core";
|
|
28640
|
-
import { HTTPException as
|
|
28809
|
+
import { HTTPException as HTTPException30 } from "hono/http-exception";
|
|
28641
28810
|
init_config();
|
|
28642
28811
|
init_mcpServerStore();
|
|
28643
28812
|
|
|
28644
28813
|
// src/truefoundry/mapEnabledModels.ts
|
|
28645
28814
|
init_config();
|
|
28646
28815
|
import { SUPPORTED_REASONING_EFFORTS as SUPPORTED_REASONING_EFFORTS3 } from "@truefoundry/trueforge-core/core";
|
|
28647
|
-
import { HTTPException as
|
|
28816
|
+
import { HTTPException as HTTPException29 } from "hono/http-exception";
|
|
28648
28817
|
import { z as z56 } from "zod";
|
|
28649
28818
|
var ModelParamSchema = z56.object({
|
|
28650
28819
|
key: z56.string(),
|
|
@@ -28734,7 +28903,7 @@ function resolveDefaultGatewayUrl(payload) {
|
|
|
28734
28903
|
return installation.manifest.url;
|
|
28735
28904
|
}
|
|
28736
28905
|
}
|
|
28737
|
-
throw new
|
|
28906
|
+
throw new HTTPException29(502, { message: "No default TrueFoundry AI gateway installation is configured" });
|
|
28738
28907
|
}
|
|
28739
28908
|
|
|
28740
28909
|
// src/truefoundry/TrueFoundryMcpServerStore.ts
|
|
@@ -28788,7 +28957,7 @@ var TrueFoundryMcpServerStore = class {
|
|
|
28788
28957
|
if (status.status === "auth_required") {
|
|
28789
28958
|
const authUrl = status.authorization_url;
|
|
28790
28959
|
if (authUrl === void 0 || authUrl.length === 0) {
|
|
28791
|
-
throw new
|
|
28960
|
+
throw new HTTPException30(422, {
|
|
28792
28961
|
message: `MCP server "${record.name}" requires authentication but returned no authorization URL`
|
|
28793
28962
|
});
|
|
28794
28963
|
}
|
|
@@ -29063,7 +29232,7 @@ function toManifest(input) {
|
|
|
29063
29232
|
}
|
|
29064
29233
|
|
|
29065
29234
|
// src/truefoundry/TrueFoundrySkillStore.ts
|
|
29066
|
-
import { HTTPException as
|
|
29235
|
+
import { HTTPException as HTTPException31 } from "hono/http-exception";
|
|
29067
29236
|
function toRegistryRecord(tenant_id, skill) {
|
|
29068
29237
|
const now2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
29069
29238
|
const manifest = {
|
|
@@ -29104,18 +29273,18 @@ var TrueFoundryAdminSkillStore = class {
|
|
|
29104
29273
|
return skills.map((skill) => {
|
|
29105
29274
|
const row = byFqn.get(skill.name);
|
|
29106
29275
|
if (row === void 0) {
|
|
29107
|
-
throw new
|
|
29276
|
+
throw new HTTPException31(422, {
|
|
29108
29277
|
message: `Unknown skill "${skill.name}" \u2014 not configured`
|
|
29109
29278
|
});
|
|
29110
29279
|
}
|
|
29111
29280
|
if (row.presigned_url === void 0) {
|
|
29112
|
-
throw new
|
|
29281
|
+
throw new HTTPException31(422, {
|
|
29113
29282
|
message: `Skill "${skill.name}" did not return a presigned URL`
|
|
29114
29283
|
});
|
|
29115
29284
|
}
|
|
29116
29285
|
const skillMdContent = skill.preload ? row.skill_md_content ?? null : null;
|
|
29117
29286
|
if (skill.preload && (skillMdContent === null || skillMdContent.length === 0)) {
|
|
29118
|
-
throw new
|
|
29287
|
+
throw new HTTPException31(422, {
|
|
29119
29288
|
message: `Skill "${skill.name}" did not return SKILL.md for preload`
|
|
29120
29289
|
});
|
|
29121
29290
|
}
|
|
@@ -29142,7 +29311,7 @@ var TrueFoundrySkillStore = class extends TrueFoundryAdminSkillStore {
|
|
|
29142
29311
|
async listSkills(input, transaction) {
|
|
29143
29312
|
void transaction;
|
|
29144
29313
|
if (input.names !== void 0) {
|
|
29145
|
-
throw new
|
|
29314
|
+
throw new HTTPException31(422, {
|
|
29146
29315
|
message: "TrueFoundry skill list does not support name filters"
|
|
29147
29316
|
});
|
|
29148
29317
|
}
|
|
@@ -29190,7 +29359,7 @@ var TrueFoundrySkillStore = class extends TrueFoundryAdminSkillStore {
|
|
|
29190
29359
|
const seenFqns = /* @__PURE__ */ new Set();
|
|
29191
29360
|
for (const skill of skills) {
|
|
29192
29361
|
if (seenFqns.has(skill.name)) {
|
|
29193
|
-
throw new
|
|
29362
|
+
throw new HTTPException31(422, {
|
|
29194
29363
|
message: `Duplicate skill FQN "${skill.name}"`
|
|
29195
29364
|
});
|
|
29196
29365
|
}
|
|
@@ -29204,7 +29373,7 @@ var TrueFoundrySkillStore = class extends TrueFoundryAdminSkillStore {
|
|
|
29204
29373
|
const byFqn = new Map(resolved.map((row) => [row.fqn, row]));
|
|
29205
29374
|
for (const skill of skills) {
|
|
29206
29375
|
if (!byFqn.has(skill.name)) {
|
|
29207
|
-
throw new
|
|
29376
|
+
throw new HTTPException31(422, {
|
|
29208
29377
|
message: `Unknown skill "${skill.name}" \u2014 not configured`
|
|
29209
29378
|
});
|
|
29210
29379
|
}
|
|
@@ -29212,7 +29381,7 @@ var TrueFoundrySkillStore = class extends TrueFoundryAdminSkillStore {
|
|
|
29212
29381
|
const seenNames = /* @__PURE__ */ new Set();
|
|
29213
29382
|
for (const row of resolved) {
|
|
29214
29383
|
if (seenNames.has(row.name)) {
|
|
29215
|
-
throw new
|
|
29384
|
+
throw new HTTPException31(422, {
|
|
29216
29385
|
message: `Agent skills must have unique names; duplicate skill name(s): ${row.name}`
|
|
29217
29386
|
});
|
|
29218
29387
|
}
|
|
@@ -30152,7 +30321,7 @@ function printStandaloneStartupBanner(options) {
|
|
|
30152
30321
|
}
|
|
30153
30322
|
|
|
30154
30323
|
// src/truefoundry/TrueFoundryAuthorizer.ts
|
|
30155
|
-
import { HTTPException as
|
|
30324
|
+
import { HTTPException as HTTPException32 } from "hono/http-exception";
|
|
30156
30325
|
var permissionByAction = {
|
|
30157
30326
|
read: "READ_AGENT",
|
|
30158
30327
|
use: "USE_AGENT",
|
|
@@ -30173,7 +30342,7 @@ function toResourcePermissions(permissions) {
|
|
|
30173
30342
|
}
|
|
30174
30343
|
function requireUserCredential(context) {
|
|
30175
30344
|
if (context.user_credential === null) {
|
|
30176
|
-
throw new
|
|
30345
|
+
throw new HTTPException32(401, { message: "Authentication token required for agent authorization" });
|
|
30177
30346
|
}
|
|
30178
30347
|
return context.user_credential;
|
|
30179
30348
|
}
|