@myagentroam/server 0.13.17 → 0.13.19
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/node_modules/@myagentroam/protocol/dist/index.js +2 -0
- package/node_modules/@myagentroam/protocol/package.json +1 -1
- package/node_modules/@myagentroam/server-core/dist/git-skill-repository.d.ts +3 -0
- package/node_modules/@myagentroam/server-core/dist/git-skill-repository.js +90 -49
- package/node_modules/@myagentroam/server-core/dist/github-skill-provider.d.ts +1 -16
- package/node_modules/@myagentroam/server-core/dist/github-skill-provider.js +2 -250
- package/node_modules/@myagentroam/server-core/dist/mar-agent-model-service.d.ts +2 -0
- package/node_modules/@myagentroam/server-core/dist/mar-agent-model-service.js +5 -1
- package/node_modules/@myagentroam/server-core/dist/marctl-routes.js +1 -1
- package/node_modules/@myagentroam/server-core/dist/marctl-session-routes.d.ts +2 -1
- package/node_modules/@myagentroam/server-core/dist/marctl-session-routes.js +1 -1
- package/node_modules/@myagentroam/server-core/dist/skill-discovery-service.d.ts +1 -1
- package/node_modules/@myagentroam/server-core/dist/skill-discovery-service.js +6 -139
- package/node_modules/@myagentroam/server-core/dist/skill-favorite-service.d.ts +2 -2
- package/node_modules/@myagentroam/server-core/dist/skill-network-policy.d.ts +4 -1
- package/node_modules/@myagentroam/server-core/dist/skill-network-policy.js +1 -0
- package/node_modules/@myagentroam/server-core/package.json +2 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-application.js +4 -3
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-catalog.d.ts +6 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-catalog.js +10 -4
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/background-execution-preparation-service.d.ts +2 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/background-execution-preparation-service.js +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/mar-agent-model-service.d.ts +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/mar-agent-model-service.js +6 -15
- package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
- package/package.json +6 -6
- package/web/assets/{AuditManagementPage-DcMACR_Z.js → AuditManagementPage-gS05yjaK.js} +1 -1
- package/web/assets/{BusyIndicator-CwUqt2ZM.js → BusyIndicator-DzlD4BSf.js} +1 -1
- package/web/assets/{CodeFileEditor-B8Dd9aFI.js → CodeFileEditor-DrfR9GB7.js} +3 -3
- package/web/assets/{ConversationTemplateManagementPage-BtKbvgPg.js → ConversationTemplateManagementPage-DMbw794K.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage-0gC6igc2.js → ConversationTemplateManagementPage-DfkCJUJo.js} +1 -1
- package/web/assets/{EnterpriseUserManagementPage-BDzsezc7.js → EnterpriseUserManagementPage-DYJWcR7P.js} +1 -1
- package/web/assets/{EnvironmentSecretManager-BG0S-pOr.js → EnvironmentSecretManager-uf66KiG2.js} +1 -1
- package/web/assets/{FilePreviewLoading-CpCC6tJs.js → FilePreviewLoading-BaVt1M9V.js} +1 -1
- package/web/assets/HtmlPreviewFrame-CCtHdbs2.js +6 -0
- package/web/assets/{HtmlPreviewFrame-BQYCrD_N.css → HtmlPreviewFrame-DBTGgnc7.css} +1 -1
- package/web/assets/{LicenseManagementPage-DCfUEevh.js → LicenseManagementPage-Bi3bBc4m.js} +1 -1
- package/web/assets/{ManagementPagination-D8RLG1nf.js → ManagementPagination-oZTeRE4J.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-NqnYW_k0.js → MarAgentModelManagementPage-B-IxgtSK.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-JP3ZeUH5.js → MarAgentModelManagementPage-Cbxzgrrs.js} +1 -1
- package/web/assets/{MarIcon-D_TD9Vvv.js → MarIcon-DF2UIyhq.js} +1 -1
- package/web/assets/{MarkdownFilePreview-B4M2Tm3P.js → MarkdownFilePreview-APgCFgxr.js} +2 -2
- package/web/assets/{McpDetailsDialog-BygH0Lnc.js → McpDetailsDialog-xC3c6Snp.js} +1 -1
- package/web/assets/McpSourceManagementPage-CgRkSGUT.css +1 -0
- package/web/assets/McpSourceManagementPage-DOah5Nl1.js +1 -0
- package/web/assets/{McpSourceManagementPage-BmRrdyCi.js → McpSourceManagementPage-DquaXKXs.js} +1 -1
- package/web/assets/{NodeDetailsDialogs-wQ6FDWCV.js → NodeDetailsDialogs-BBJd2Bsw.js} +1 -1
- package/web/assets/NodeManagementPage-CVGWz-cm.js +1 -0
- package/web/assets/NodeManagementPage-XpseHJvK.js +1 -0
- package/web/assets/{OAuthManagementPage-CDXPJQd-.js → OAuthManagementPage-rtnThNxt.js} +1 -1
- package/web/assets/{OrganizationManagementPage-DF_Yk2Vq.js → OrganizationManagementPage-DMsAgigw.js} +1 -1
- package/web/assets/{RemoteDesktopPage-CLMIBPBw.js → RemoteDesktopPage-Dd89ESqD.js} +1 -1
- package/web/assets/{ResourceManagementPanel-DqwHAt6D.js → ResourceManagementPanel-I8qPlbgr.js} +1 -1
- package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-BNNYGM2e.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-dPjmZnnb.js} +1 -1
- package/web/assets/SecretManagementPage-S1t8t-Gf.js +1 -0
- package/web/assets/{SecretManagementPage-D5PX7SgZ.js → SecretManagementPage-z_CtChdp.js} +1 -1
- package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-BG3JrBGh.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-DxYwA-P9.js} +1 -1
- package/web/assets/{SessionSharePage-DpEEyhU3.js → SessionSharePage-DWpzehh3.js} +2 -2
- package/web/assets/{SettingsContent-BHXF6A3k.js → SettingsContent-CRV_UnZm.js} +1 -1
- package/web/assets/{SettingsContent-DkV6hv8S.js → SettingsContent-CU91S9oZ.js} +1 -1
- package/web/assets/{SkillCenterPage-CSosMy6N.js → SkillCenterPage-BS2vIa03.js} +1 -1
- package/web/assets/SkillCenterPage-CnciBJkz.js +1 -0
- package/web/assets/{SkillDetailsDialog-DEa67w3D.js → SkillDetailsDialog-BzaY_X3I.js} +1 -1
- package/web/assets/SkillSourceManagementPage-DAHRpJo1.js +1 -0
- package/web/assets/{SkillSourceManagementPage-COtemEgp.js → SkillSourceManagementPage-DDP9WvOL.js} +1 -1
- package/web/assets/SkillSourceManagementPage-X_g8Aumt.css +1 -0
- package/web/assets/{StandaloneFilePreviewPage-89jXFRFj.js → StandaloneFilePreviewPage-C82pj2Bv.js} +1 -1
- package/web/assets/{SystemConfigurationPage-BmKMkORW.js → SystemConfigurationPage-BmZum63y.js} +1 -1
- package/web/assets/SystemConfigurationPage-C6FZdxFe.js +1 -0
- package/web/assets/{SystemInformationPage-Dp-1hXGy.js → SystemInformationPage-DtPVj6dC.js} +1 -1
- package/web/assets/{TerminalTabView-bBiBC5z4.js → TerminalTabView-CZ67cf08.js} +1 -1
- package/web/assets/{WorkbenchPage-BF-eO2Bt.css → WorkbenchPage-B0KhrY0A.css} +1 -1
- package/web/assets/WorkbenchPage-DNopgU0M.js +22 -0
- package/web/assets/WorkspaceManagementPage-BDaKB7_-.js +1 -0
- package/web/assets/WorkspaceManagementPage-BGvl-g5c.js +1 -0
- package/web/assets/{_baseIteratee-B9BBcDq5.js → _baseIteratee-DSSGNDw6.js} +1 -1
- package/web/assets/{abnfDiagram-VCTEODGH-B-jPRhej.js → abnfDiagram-VCTEODGH-D79Rg0N6.js} +1 -1
- package/web/assets/{advancedFormat-CbLs2m7-.js → advancedFormat-BteKjhgD.js} +1 -1
- package/web/assets/{arc-btIRoF4h.js → arc-1N6xqfMt.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-DK0gRBum.js → architectureDiagram-5GKGNRK7-C1B7PpgN.js} +1 -1
- package/web/assets/{blockDiagram-OSKFZWR5-00KVU9j1.js → blockDiagram-OSKFZWR5-DbooRQlK.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-BYgaVDjL.js → c4Diagram-7LVT6UL2-ZlZivmDy.js} +1 -1
- package/web/assets/{catalog-ownership-service-k10sb1J_.js → catalog-ownership-service-rNR7-VV3.js} +1 -1
- package/web/assets/{catalog-page-service-E0QqBiJn.js → catalog-page-service-DfnSxVth.js} +1 -1
- package/web/assets/channel-B-dk8mJZ.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-C6pCAlK7.js → chunk-2Q5K7J3B-DGCXy2fK.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-Bl1i4GU9.js → chunk-5VM5RSS4-D_z5-J8N.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-CI1NJ1P4.js → chunk-F27PBJKO-Jk9sXmmN.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-SHOVJP7h.js → chunk-HLEWEB6X-CLw0TJDZ.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-BnvzL4pt.js → chunk-JWPE2WC7-C2Bdn72G.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-C7jY3-FJ.js → chunk-POPQ4Y6H-XDamLHVI.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-CqBusxLf.js → chunk-SVP7TREG-DjBvAa0f.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-BXmyVbhP.js → chunk-XXDRQBXY-DNlcY575.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-B0u38WqB.js → chunk-ZLD2IHE6-PSDkQOPj.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-Cj_zbAQF.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-Cj_zbAQF.js +1 -0
- package/web/assets/{conversation-history-Cayr0MFe.js → conversation-history-DG2S_wtQ.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-C4X-qkDF.js → cose-bilkent-JH36ORCC-BbhcuNoy.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-oX7-cPnT.js → cynefin-OW5HDTMX-C8-eaA16.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-DX5jPMDI.js → cynefinDiagram-5FMLGOSQ-CDfqFkdY.js} +1 -1
- package/web/assets/{dagre-OS7QT2EB-DVtcivBX.js → dagre-OS7QT2EB-hQsQhLVI.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-CIfz8Rne.js → diagram-S7CK7UJ4-C1XX45Zx.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-C7Stt5AH.js → diagram-UQ7AKVKN-D8hw8_Bv.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-BbnBQvSq.js → diagram-VSXAHHWV-8h69v8d-.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-DSq6UDNg.js → diagram-VX7I27RA-C8z0Xky8.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-qpEiwQsU.js → diagram-Z3DM3KII-CVsNyOxH.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-CpA-QeC5.js → ebnfDiagram-PWID7BFC-CIvNzvw7.js} +1 -1
- package/web/assets/{el-alert-B2wbIWBu.js → el-alert-oEOFdLn1.js} +1 -1
- package/web/assets/{el-cascader-kz2psvnJ.js → el-cascader-BBMwt973.js} +1 -1
- package/web/assets/{el-checkbox-AUzJR-y2.js → el-checkbox-1o0b0ylj.js} +1 -1
- package/web/assets/{el-date-picker-BChxItZl.js → el-date-picker-Dl1dvnxM.js} +1 -1
- package/web/assets/{el-descriptions-5vvOl2ah.js → el-descriptions-DyDcYvYm.js} +1 -1
- package/web/assets/{el-form-item-BOmb8aXD.js → el-form-item-Brp6-uco.js} +1 -1
- package/web/assets/{el-input-B1RdZbJQ.js → el-input-4mi2iUKr.js} +1 -1
- package/web/assets/{el-input-number-CDZDkRtY.js → el-input-number-TwwV6MrZ.js} +1 -1
- package/web/assets/{el-radio-Bu-4wDbV.js → el-radio-CPCGUGBz.js} +1 -1
- package/web/assets/{el-scrollbar-CeOZtG0w.js → el-scrollbar-L7tqMU32.js} +1 -1
- package/web/assets/{el-select-Bo6IO0_h.js → el-select-CX5hFC3O.js} +1 -1
- package/web/assets/{el-switch-CsqpF718.js → el-switch-DaYD6wnE.js} +1 -1
- package/web/assets/{el-tab-pane-BDeBfb6H.js → el-tab-pane-BC92zUdK.js} +1 -1
- package/web/assets/{el-table-column-DpWFB4w9.js → el-table-column-I0Pua-_R.js} +1 -1
- package/web/assets/{enterprise-management-service-BZm3jLDS.js → enterprise-management-service-BZ1-FUEt.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-CTHK1pe_.js → erDiagram-2YWLMYGG-C89b_z5U.js} +1 -1
- package/web/assets/{error-presentation-VXbGfXNh.js → error-presentation-Cpx3Ewgi.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-0FSiE6dH.js → flowDiagram-T62WH6J4-C6tpsQle.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-Bmo-PRWI.js → ganttDiagram-EL5Y4UJY-CzHSaL8p.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-CWJhdh2i.js → gitGraphDiagram-WWUBYQGX-BLGMU4h9.js} +1 -1
- package/web/assets/{hosted-conversation-template-client-Bl0zkMfl.js → hosted-conversation-template-client-DFzp_D-u.js} +1 -1
- package/web/assets/{index-C0ZcBJ1x.js → index-0b8wbJWm.js} +1 -1
- package/web/assets/{index-CoFa9OqO.js → index-14TrEdp0.js} +1 -1
- package/web/assets/{index-CZOO5D0X.js → index-3gidBMx3.js} +1 -1
- package/web/assets/{index-B17Ch5rp.js → index-B7Ozivz8.js} +3 -3
- package/web/assets/{index-CBbcMTUE.js → index-B8ef_pi-.js} +1 -1
- package/web/assets/{index-ySFMOeJ-.js → index-BNE4dZLp.js} +1 -1
- package/web/assets/{index-ClvOul2s.js → index-BWmCI3jC.js} +1 -1
- package/web/assets/{index-BrJKkPRm.js → index-BdpfpCFg.js} +1 -1
- package/web/assets/{index-CW5XYX5f.js → index-BeOOSJhy.js} +1 -1
- package/web/assets/{index-C9DmNxdA.js → index-BoFunDBm.js} +1 -1
- package/web/assets/{index-Cfj0V7hz.js → index-Bvga7-f0.js} +1 -1
- package/web/assets/{index-C0IPYzAA.js → index-ByfOk1vk.js} +1 -1
- package/web/assets/{index-B5vOFmrp.js → index-C9VHzt_Q.js} +1 -1
- package/web/assets/{index-DGHNJYLy.js → index-CFFiRxTK.js} +1 -1
- package/web/assets/{index-CfL8EWUl.js → index-COe2cWCH.js} +1 -1
- package/web/assets/{index-DTM8ZOaX.js → index-CUKgqTR4.js} +1 -1
- package/web/assets/{index-UM0IPa_5.js → index-C_cy18Lx.js} +1 -1
- package/web/assets/{index-egzaF8Es.js → index-D86SGzBw.js} +1 -1
- package/web/assets/{index-BlqDd_2L.js → index-DDgvGn4R.js} +1 -1
- package/web/assets/{index-CmoWsN11.js → index-DEl8A_UY.js} +1 -1
- package/web/assets/{index-DPtybmBV.js → index-DOLrW3Z1.js} +1 -1
- package/web/assets/{index-DwR_iI0g.js → index-DRhRS9V8.js} +1 -1
- package/web/assets/{index-QMXvbcwT.js → index-DW4oEIMi.js} +1 -1
- package/web/assets/{index-dP-FQoRl.js → index-DecshycD.js} +1 -1
- package/web/assets/{index-D1rDPGEr.js → index-FE1TgaI1.js} +1 -1
- package/web/assets/{index-C0EbAenW.js → index-SCLIQHlM.js} +1 -1
- package/web/assets/{index-C5gHbSNX.js → index-ZMdDBeOk.js} +1 -1
- package/web/assets/{index-Cf0iJXoo.js → index-pYPe17aT.js} +1 -1
- package/web/assets/{index-C5ySDdLv.js → index-yLn5sTyc.js} +1 -1
- package/web/assets/infoDiagram-FKFFQAWI-CfBQZhGP.js +2 -0
- package/web/assets/{isArrayLikeObject-FHw_1GeG.js → isArrayLikeObject-C_LZMoTb.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-D5CXsOKl.js → ishikawaDiagram-5VMMS53U-Ba2lyMis.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-BzO3bfgP.js → journeyDiagram-EYS64GPL-BhSHqOzi.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-Bn7ZCPSq.js → kanban-definition-UXKFOSKX-BH7eqdhZ.js} +1 -1
- package/web/assets/{layout-BHO91o8Z.js → layout-Bd1fEAaO.js} +1 -1
- package/web/assets/{linear-DrEiEXwm.js → linear-DEofrGYi.js} +1 -1
- package/web/assets/{management-url-service-D0Pd2Asc.js → management-url-service-BbGpTy_2.js} +1 -1
- package/web/assets/{mcp-center-service-gmJEe7J4.js → mcp-center-service-DKdUVLD6.js} +1 -1
- package/web/assets/{merge-BQV4utEa.js → merge--gS8-uhD.js} +1 -1
- package/web/assets/{mermaid.core-BmUIpx-h.js → mermaid.core-B-NOCiGg.js} +5 -5
- package/web/assets/{message-box-service-DBt9ZIgi.js → message-box-service-BANQmqyD.js} +1 -1
- package/web/assets/{mindmap-definition-THT77NOG-D14_2O1i.js → mindmap-definition-THT77NOG-DY9c51B6.js} +1 -1
- package/web/assets/{mobile-dialog-return-service-B1HsmHQ5.js → mobile-dialog-return-service-jTeuEFRg.js} +1 -1
- package/web/assets/{oauth-callback-BfRM_5Tj.js → oauth-callback-DNMTGVh8.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-J9FnfCNA.js → pegDiagram-XKGWAZYB-tpgXlHSF.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-BmNN2U6I.js → pieDiagram-E7YTZNPT-YsoVEI9q.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-xGvNtMqf.js → quadrantDiagram-AXDQQJYC-CLFrjCZM.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-mDmWjS4j.js → railroadDiagram-O6MQD6OU-Dku2Uz9Z.js} +1 -1
- package/web/assets/{requirementDiagram-IS5BZ75X-D7-2e-DE.js → requirementDiagram-IS5BZ75X-oCpMzTGQ.js} +1 -1
- package/web/assets/{runner-presentation-DowjpkVy.js → runner-presentation-BeSsQRos.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-HAQUzZOU.js → sankeyDiagram-P5KCCOFB-zgPD9gIz.js} +1 -1
- package/web/assets/{sequenceDiagram-WJ2MYXX4-CCcSUK4f.js → sequenceDiagram-WJ2MYXX4-CvPqxSqs.js} +1 -1
- package/web/assets/{session-share-client-service-ur9FAVao.js → session-share-client-service-Df9rjG2H.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-CYaeb0Ed.js → sizeCapture-INFHLROL-DBJmjRp1.js} +1 -1
- package/web/assets/{stateDiagram-XQSTLZYL-B1WSbP6b.js → stateDiagram-XQSTLZYL-IKc9wrse.js} +1 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-BtLJ1ryt.js +1 -0
- package/web/assets/{swimlanes-V6O3JKXN-C-TdlqaD.js → swimlanes-V6O3JKXN-CnYpufbT.js} +1 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-93dI7vtx.js +8 -0
- package/web/assets/{time-presentation-DpVyhRR8.js → time-presentation-CrBVc0Ju.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-2vCI_Vj1.js → timeline-definition-24CTP7MA-BVzgvIwv.js} +1 -1
- package/web/assets/{union-B5YA6cl-.js → union-C4E1n7c9.js} +1 -1
- package/web/assets/{use-form-common-props-CaA4hjwQ.js → use-form-common-props-CRfaJ_Aw.js} +1 -1
- package/web/assets/{use-wheel-Cz1gO4jm.js → use-wheel-BeYouTUj.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-4ZRgkj89.js → vennDiagram-4TSXK5OY-B9YDqalD.js} +1 -1
- package/web/assets/{vnode-B728-a5V.js → vnode-ChI3dzCj.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-Dob4RsZH.js → wardleyDiagram-VM6X3IG4-BXFZx5MG.js} +1 -1
- package/web/assets/{workbench-composer-interaction-controller-B9St9OnG.js → workbench-composer-interaction-controller-DtgBqeHw.js} +1 -1
- package/web/assets/{workbench-live-service-Cjt7NIMd.js → workbench-live-service-FD5GlDcJ.js} +1 -1
- package/web/assets/{workbench-presentation-BOnQ5ww6.js → workbench-presentation-CmIAiU_G.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-CziooMD7.js → xychartDiagram-S5SC5T6Z-C3IKEJ8H.js} +1 -1
- package/web/docs/404.html +2 -2
- package/web/docs/administration/account.html +3 -3
- package/web/docs/administration/audit.html +3 -3
- package/web/docs/administration/conversation-templates.html +5 -5
- package/web/docs/administration/email-notifications.html +3 -3
- package/web/docs/administration/license.html +3 -3
- package/web/docs/administration/nodes-workspaces.html +3 -3
- package/web/docs/administration/oauth.html +3 -3
- package/web/docs/administration/secrets.html +3 -3
- package/web/docs/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/administration/users-organizations.html +3 -3
- package/web/docs/assets/administration_conversation-templates.md.CxgeJX_-.js +1 -0
- package/web/docs/assets/{administration_conversation-templates.md.DR-Q8ZJH.lean.js → administration_conversation-templates.md.CxgeJX_-.lean.js} +1 -1
- package/web/docs/assets/{app.fLdJTVzd.js → app.SvElNR2K.js} +1 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.ClnyYGlb.js +1 -0
- package/web/docs/assets/chunks/@localSearchIndexroot.COh0XBni.js +1 -0
- package/web/docs/assets/chunks/{VPLocalSearchBox.DREG8G6H.js → VPLocalSearchBox.CglQG33h.js} +1 -1
- package/web/docs/assets/chunks/{theme.xMOlLgbi.js → theme.Czw6boKB.js} +2 -2
- package/web/docs/assets/en-US_administration_conversation-templates.md.Agw0_8Pj.js +1 -0
- package/web/docs/assets/{en-US_administration_conversation-templates.md.D7eekprK.lean.js → en-US_administration_conversation-templates.md.Agw0_8Pj.lean.js} +1 -1
- package/web/docs/assets/{en-US_workbench_file-reference-and-attachment.md.4m2Q4ywr.js → en-US_workbench_file-reference-and-attachment.md.CO_ZfbB9.js} +1 -1
- package/web/docs/assets/{en-US_workbench_file-reference-and-attachment.md.4m2Q4ywr.lean.js → en-US_workbench_file-reference-and-attachment.md.CO_ZfbB9.lean.js} +1 -1
- package/web/docs/assets/{en-US_workbench_files.md.DVFADqke.js → en-US_workbench_files.md.W16dZr3K.js} +1 -1
- package/web/docs/assets/{en-US_workbench_files.md.DVFADqke.lean.js → en-US_workbench_files.md.W16dZr3K.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_skills.md.CJrbkz96.js +1 -0
- package/web/docs/assets/{en-US_workbench_skills.md.xchi27R9.lean.js → en-US_workbench_skills.md.CJrbkz96.lean.js} +1 -1
- package/web/docs/assets/{workbench_file-reference-and-attachment.md.DYSIPaMf.js → workbench_file-reference-and-attachment.md.CkStAhL5.js} +1 -1
- package/web/docs/assets/{workbench_file-reference-and-attachment.md.DYSIPaMf.lean.js → workbench_file-reference-and-attachment.md.CkStAhL5.lean.js} +1 -1
- package/web/docs/assets/{workbench_files.md.CM-FwBlX.js → workbench_files.md.D3yBwkKe.js} +1 -1
- package/web/docs/assets/{workbench_files.md.CM-FwBlX.lean.js → workbench_files.md.D3yBwkKe.lean.js} +1 -1
- package/web/docs/assets/workbench_skills.md.C_DLeu5p.js +1 -0
- package/web/docs/assets/{workbench_skills.md.BQw1Wuiy.lean.js → workbench_skills.md.C_DLeu5p.lean.js} +1 -1
- package/web/docs/concepts/architecture.html +3 -3
- package/web/docs/concepts/data-and-security.html +3 -3
- package/web/docs/concepts/files-git-terminal.html +3 -3
- package/web/docs/concepts/node-and-workspace.html +3 -3
- package/web/docs/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/concepts/runner-control.html +3 -3
- package/web/docs/concepts/secrets.html +3 -3
- package/web/docs/concepts/session-run-turn.html +3 -3
- package/web/docs/deployment/backup-restore.html +3 -3
- package/web/docs/deployment/network.html +3 -3
- package/web/docs/deployment/node-installation.html +3 -3
- package/web/docs/deployment/node-linux.html +3 -3
- package/web/docs/deployment/node-macos.html +3 -3
- package/web/docs/deployment/node-windows.html +3 -3
- package/web/docs/deployment/production.html +3 -3
- package/web/docs/deployment/security-checklist.html +3 -3
- package/web/docs/deployment/upgrade.html +3 -3
- package/web/docs/en-US/administration/account.html +3 -3
- package/web/docs/en-US/administration/audit.html +3 -3
- package/web/docs/en-US/administration/conversation-templates.html +5 -5
- package/web/docs/en-US/administration/email-notifications.html +3 -3
- package/web/docs/en-US/administration/license.html +3 -3
- package/web/docs/en-US/administration/nodes-workspaces.html +3 -3
- package/web/docs/en-US/administration/oauth.html +3 -3
- package/web/docs/en-US/administration/secrets.html +3 -3
- package/web/docs/en-US/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/en-US/administration/users-organizations.html +3 -3
- package/web/docs/en-US/concepts/architecture.html +3 -3
- package/web/docs/en-US/concepts/data-and-security.html +3 -3
- package/web/docs/en-US/concepts/files-git-terminal.html +3 -3
- package/web/docs/en-US/concepts/node-and-workspace.html +3 -3
- package/web/docs/en-US/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/en-US/concepts/runner-control.html +3 -3
- package/web/docs/en-US/concepts/secrets.html +3 -3
- package/web/docs/en-US/concepts/session-run-turn.html +3 -3
- package/web/docs/en-US/deployment/backup-restore.html +3 -3
- package/web/docs/en-US/deployment/network.html +3 -3
- package/web/docs/en-US/deployment/node-installation.html +3 -3
- package/web/docs/en-US/deployment/node-linux.html +3 -3
- package/web/docs/en-US/deployment/node-macos.html +3 -3
- package/web/docs/en-US/deployment/node-windows.html +3 -3
- package/web/docs/en-US/deployment/production.html +3 -3
- package/web/docs/en-US/deployment/security-checklist.html +3 -3
- package/web/docs/en-US/deployment/upgrade.html +3 -3
- package/web/docs/en-US/getting-started/connect-node.html +3 -3
- package/web/docs/en-US/getting-started/first-agent-session.html +3 -3
- package/web/docs/en-US/getting-started/first-login.html +3 -3
- package/web/docs/en-US/getting-started/next-steps.html +3 -3
- package/web/docs/en-US/getting-started/npm-quick-start.html +3 -3
- package/web/docs/en-US/getting-started/overview.html +3 -3
- package/web/docs/en-US/getting-started/prerequisites.html +3 -3
- package/web/docs/en-US/getting-started/register-workspace.html +3 -3
- package/web/docs/en-US/getting-started/server-installation.html +3 -3
- package/web/docs/en-US/operations/marctl.html +3 -3
- package/web/docs/en-US/reference/configuration.html +3 -3
- package/web/docs/en-US/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/en-US/reference/limits.html +3 -3
- package/web/docs/en-US/reference/ports-paths-data.html +3 -3
- package/web/docs/en-US/reference/status-and-errors.html +3 -3
- package/web/docs/en-US/runners/claude-code.html +3 -3
- package/web/docs/en-US/runners/codex.html +3 -3
- package/web/docs/en-US/runners/mar-agent.html +3 -3
- package/web/docs/en-US/runners/opencode.html +3 -3
- package/web/docs/en-US/runners/overview.html +3 -3
- package/web/docs/en-US/runners/runner-troubleshooting.html +3 -3
- package/web/docs/en-US/troubleshooting/node-offline.html +3 -3
- package/web/docs/en-US/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/en-US/troubleshooting/session-run.html +3 -3
- package/web/docs/en-US/troubleshooting/terminal.html +3 -3
- package/web/docs/en-US/troubleshooting/workspace-files.html +3 -3
- package/web/docs/en-US/workbench/composer.html +3 -3
- package/web/docs/en-US/workbench/context-and-plan.html +3 -3
- package/web/docs/en-US/workbench/conversation.html +3 -3
- package/web/docs/en-US/workbench/file-reference-and-attachment.html +5 -5
- package/web/docs/en-US/workbench/files.html +5 -5
- package/web/docs/en-US/workbench/git-changes.html +3 -3
- package/web/docs/en-US/workbench/git-history.html +3 -3
- package/web/docs/en-US/workbench/hosted-conversations.html +3 -3
- package/web/docs/en-US/workbench/mobile.html +3 -3
- package/web/docs/en-US/workbench/navigation.html +3 -3
- package/web/docs/en-US/workbench/remote-desktop.html +3 -3
- package/web/docs/en-US/workbench/sessions.html +3 -3
- package/web/docs/en-US/workbench/skills.html +5 -5
- package/web/docs/en-US/workbench/terminal.html +3 -3
- package/web/docs/getting-started/connect-node.html +3 -3
- package/web/docs/getting-started/first-agent-session.html +3 -3
- package/web/docs/getting-started/first-login.html +3 -3
- package/web/docs/getting-started/next-steps.html +3 -3
- package/web/docs/getting-started/npm-quick-start.html +3 -3
- package/web/docs/getting-started/overview.html +3 -3
- package/web/docs/getting-started/prerequisites.html +3 -3
- package/web/docs/getting-started/register-workspace.html +3 -3
- package/web/docs/getting-started/server-installation.html +3 -3
- package/web/docs/hashmap.json +1 -1
- package/web/docs/operations/marctl.html +3 -3
- package/web/docs/reference/configuration.html +3 -3
- package/web/docs/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/reference/limits.html +3 -3
- package/web/docs/reference/ports-paths-data.html +3 -3
- package/web/docs/reference/status-and-errors.html +3 -3
- package/web/docs/runners/claude-code.html +3 -3
- package/web/docs/runners/codex.html +3 -3
- package/web/docs/runners/mar-agent.html +3 -3
- package/web/docs/runners/opencode.html +3 -3
- package/web/docs/runners/overview.html +3 -3
- package/web/docs/runners/runner-troubleshooting.html +3 -3
- package/web/docs/troubleshooting/node-offline.html +3 -3
- package/web/docs/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/troubleshooting/session-run.html +3 -3
- package/web/docs/troubleshooting/terminal.html +3 -3
- package/web/docs/troubleshooting/workspace-files.html +3 -3
- package/web/docs/workbench/composer.html +3 -3
- package/web/docs/workbench/context-and-plan.html +3 -3
- package/web/docs/workbench/conversation.html +3 -3
- package/web/docs/workbench/file-reference-and-attachment.html +5 -5
- package/web/docs/workbench/files.html +5 -5
- package/web/docs/workbench/git-changes.html +3 -3
- package/web/docs/workbench/git-history.html +3 -3
- package/web/docs/workbench/hosted-conversations.html +3 -3
- package/web/docs/workbench/mobile.html +3 -3
- package/web/docs/workbench/navigation.html +3 -3
- package/web/docs/workbench/remote-desktop.html +3 -3
- package/web/docs/workbench/sessions.html +3 -3
- package/web/docs/workbench/skills.html +5 -5
- package/web/docs/workbench/terminal.html +3 -3
- package/web/index.html +1 -1
- package/web/service-worker.js +1 -1
- package/web/web-version.json +1 -1
- package/web/assets/HtmlPreviewFrame-8NeV4D4Z.js +0 -6
- package/web/assets/McpSourceManagementPage-5F60rc79.js +0 -1
- package/web/assets/McpSourceManagementPage-kctug-Vc.css +0 -1
- package/web/assets/NodeManagementPage-D_dUDK2n.js +0 -1
- package/web/assets/NodeManagementPage-fTQ4EqAX.js +0 -1
- package/web/assets/SecretManagementPage-CRPCqBbs.js +0 -1
- package/web/assets/SkillCenterPage-BQ29uLem.js +0 -1
- package/web/assets/SkillSourceManagementPage-Citxyqsv.js +0 -1
- package/web/assets/SkillSourceManagementPage-bes89wDU.css +0 -1
- package/web/assets/SystemConfigurationPage-BCB__CRv.js +0 -1
- package/web/assets/WorkbenchPage-BCCeoeh-.js +0 -22
- package/web/assets/WorkspaceManagementPage-BCCwssJ4.js +0 -1
- package/web/assets/WorkspaceManagementPage-D1cfkgDt.js +0 -1
- package/web/assets/channel-I05xOeB8.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-DwZtOTh5.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-DwZtOTh5.js +0 -1
- package/web/assets/infoDiagram-FKFFQAWI-CD50tjKw.js +0 -2
- package/web/assets/stateDiagram-v2-IH3M54BS-Cyls4a-L.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-DkB3J6Tb.js +0 -8
- package/web/docs/assets/administration_conversation-templates.md.DR-Q8ZJH.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.DnHixIyt.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.CpNlW6Tb.js +0 -1
- package/web/docs/assets/en-US_administration_conversation-templates.md.D7eekprK.js +0 -1
- package/web/docs/assets/en-US_workbench_skills.md.xchi27R9.js +0 -1
- package/web/docs/assets/workbench_skills.md.BQw1Wuiy.js +0 -1
|
@@ -2406,6 +2406,7 @@ export const conversationTemplateQuotaSchema = z
|
|
|
2406
2406
|
});
|
|
2407
2407
|
export const conversationTemplateModelReferenceSchema = z
|
|
2408
2408
|
.object({
|
|
2409
|
+
// References the model configuration primary key, not its upstream modelId.
|
|
2409
2410
|
modelId: protocolIdSchema,
|
|
2410
2411
|
name: z.string().trim().min(1).max(128)
|
|
2411
2412
|
})
|
|
@@ -2420,6 +2421,7 @@ export const conversationTemplateDraftSchema = z
|
|
|
2420
2421
|
description: z.string().max(2000),
|
|
2421
2422
|
icon: z.string().trim().min(1).max(128).optional(),
|
|
2422
2423
|
allowedModels: z.array(conversationTemplateModelReferenceSchema).min(1).max(128),
|
|
2424
|
+
// Uses the same configuration primary key as allowedModels[].modelId.
|
|
2423
2425
|
defaultModelId: protocolIdSchema,
|
|
2424
2426
|
mcpIds: z.array(protocolIdSchema).max(128),
|
|
2425
2427
|
networkMode: conversationTemplateNetworkModeSchema,
|
|
@@ -6,7 +6,10 @@ export interface GitSkillCandidate {
|
|
|
6
6
|
readonly source: string;
|
|
7
7
|
readonly skillPath: string;
|
|
8
8
|
}
|
|
9
|
+
/** Owns complete Git snapshots; discovery and bundles only read locally before cleanup. */
|
|
9
10
|
export declare class GitSkillRepository {
|
|
11
|
+
private readonly tlsVerificationDisabled;
|
|
12
|
+
constructor(tlsVerificationDisabled?: () => Promise<boolean>);
|
|
10
13
|
discover(locator: string, query: string, limit: number): Promise<readonly GitSkillCandidate[]>;
|
|
11
14
|
resolve(input: {
|
|
12
15
|
readonly repositoryUrl: string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process';
|
|
2
2
|
import { mkdtemp, rm } from 'node:fs/promises';
|
|
3
|
-
import { tmpdir } from 'node:os';
|
|
3
|
+
import { devNull, tmpdir } from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { promisify } from 'node:util';
|
|
6
6
|
import { finalizeSkillBundle, normalizeSkillName, parseSkillFrontmatter } from './skill-bundle.js';
|
|
7
7
|
import { assertPublicSkillHost } from './skill-network-policy.js';
|
|
8
8
|
const execFileAsync = promisify(execFile);
|
|
9
|
-
const MAX_REPOSITORY_FILES = 5_000;
|
|
10
|
-
const MAX_REPOSITORY_BYTES = 100 * 1024 * 1024;
|
|
11
|
-
const MAX_SKILL_FILES = 1_000;
|
|
12
|
-
const MAX_SKILL_BYTES = 25 * 1024 * 1024;
|
|
13
|
-
const MAX_FILE_BYTES = 5 * 1024 * 1024;
|
|
14
9
|
const GIT_SSH_COMMAND = 'ssh -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null';
|
|
10
|
+
/** Owns complete Git snapshots; discovery and bundles only read locally before cleanup. */
|
|
15
11
|
export class GitSkillRepository {
|
|
12
|
+
tlsVerificationDisabled;
|
|
13
|
+
constructor(tlsVerificationDisabled = async () => false) {
|
|
14
|
+
this.tlsVerificationDisabled = tlsVerificationDisabled;
|
|
15
|
+
}
|
|
16
16
|
async discover(locator, query, limit) {
|
|
17
17
|
return this.withRepository(locator, async (repository) => {
|
|
18
18
|
const skillFiles = repository.files.map((file) => file.path).filter(isDiscoverableSkillPath);
|
|
@@ -32,18 +32,22 @@ export class GitSkillRepository {
|
|
|
32
32
|
? true
|
|
33
33
|
: `${candidate.name} ${candidate.skillPath}`.toLowerCase().includes(query.toLowerCase()))
|
|
34
34
|
.slice(0, limit);
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const result = [];
|
|
36
|
+
for (const { skillFile, ...candidate } of candidates) {
|
|
37
|
+
const content = await gitText(repository.directory, ['show', `HEAD:${skillFile}`]);
|
|
37
38
|
const metadata = parseSkillFrontmatter(content);
|
|
38
|
-
|
|
39
|
+
result.push({
|
|
39
40
|
...candidate,
|
|
40
41
|
name: normalizeSkillName(metadata.name),
|
|
41
42
|
description: metadata.description
|
|
42
|
-
};
|
|
43
|
-
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
async resolve(input) {
|
|
49
|
+
if (input.skillPath !== undefined && input.skillPath !== '.')
|
|
50
|
+
assertSafeRelativePath(input.skillPath);
|
|
47
51
|
return this.withRepository(input.repositoryUrl, async (repository) => {
|
|
48
52
|
const skillPath = resolveSkillPath(repository.files, input.skillPath, input.skillName);
|
|
49
53
|
const selected = repository.files
|
|
@@ -52,19 +56,10 @@ export class GitSkillRepository {
|
|
|
52
56
|
...file,
|
|
53
57
|
relativePath: skillPath === '.' ? file.path : file.path.slice(skillPath.length + 1)
|
|
54
58
|
}));
|
|
55
|
-
if (selected.length === 0 || selected.length > MAX_SKILL_FILES)
|
|
56
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
57
|
-
if (selected.reduce((total, file) => total + file.size, 0) > MAX_SKILL_BYTES)
|
|
58
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
59
59
|
const files = [];
|
|
60
60
|
let contentBytes = 0;
|
|
61
61
|
for (const file of selected) {
|
|
62
|
-
|
|
63
|
-
if (file.size > MAX_FILE_BYTES)
|
|
64
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
65
|
-
const content = await gitBuffer(repository.directory, ['show', `HEAD:${file.path}`], MAX_FILE_BYTES);
|
|
66
|
-
if (content.length !== file.size)
|
|
67
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
62
|
+
const content = await gitBuffer(repository.directory, ['show', `HEAD:${file.path}`]);
|
|
68
63
|
contentBytes += content.length;
|
|
69
64
|
files.push({ path: file.relativePath, contentBase64: content.toString('base64') });
|
|
70
65
|
}
|
|
@@ -74,47 +69,61 @@ export class GitSkillRepository {
|
|
|
74
69
|
skillPath,
|
|
75
70
|
commitSha: repository.commitSha,
|
|
76
71
|
contentBytes,
|
|
77
|
-
tlsVerified:
|
|
72
|
+
tlsVerified: repository.tlsVerified,
|
|
78
73
|
files
|
|
79
74
|
});
|
|
80
75
|
});
|
|
81
76
|
}
|
|
82
77
|
async withRepository(locator, operation) {
|
|
83
|
-
const parsed =
|
|
84
|
-
await assertPublicSkillHost(parsed.hostname);
|
|
78
|
+
const parsed = parseLocator(locator);
|
|
79
|
+
const address = await assertPublicSkillHost(parsed.hostname);
|
|
80
|
+
const tlsDisabled = parsed.https ? await this.tlsVerificationDisabled() : undefined;
|
|
81
|
+
const env = gitEnvironment(tlsDisabled);
|
|
82
|
+
const transport = parsed.https
|
|
83
|
+
? [
|
|
84
|
+
'-c',
|
|
85
|
+
'protocol.allow=never',
|
|
86
|
+
'-c',
|
|
87
|
+
'protocol.https.allow=always',
|
|
88
|
+
'-c',
|
|
89
|
+
'http.followRedirects=false',
|
|
90
|
+
'-c',
|
|
91
|
+
'http.proxy=',
|
|
92
|
+
'-c',
|
|
93
|
+
`http.sslVerify=${!tlsDisabled}`,
|
|
94
|
+
'-c',
|
|
95
|
+
`http.curloptResolve=${parsed.hostname}:${parsed.port}:${address.family === 6 ? `[${address.address}]` : address.address}`
|
|
96
|
+
]
|
|
97
|
+
: ['-c', 'protocol.file.allow=never'];
|
|
85
98
|
const directory = await mkdtemp(path.join(tmpdir(), 'mar-skill-git-'));
|
|
86
99
|
try {
|
|
87
|
-
await gitText(
|
|
88
|
-
|
|
89
|
-
'protocol.file.allow=never',
|
|
100
|
+
await gitText(directory, [
|
|
101
|
+
...transport,
|
|
90
102
|
'clone',
|
|
91
103
|
'--depth=1',
|
|
92
|
-
'--filter=blob:none',
|
|
93
104
|
'--no-checkout',
|
|
94
105
|
'--no-tags',
|
|
95
106
|
'--',
|
|
96
|
-
locator,
|
|
107
|
+
parsed.locator,
|
|
97
108
|
directory
|
|
98
|
-
], 1024 * 1024, 60_000);
|
|
109
|
+
], 1024 * 1024, 60_000, env);
|
|
99
110
|
const commitSha = (await gitText(directory, ['rev-parse', 'HEAD'], 1024)).trim();
|
|
100
111
|
if (!/^[0-9a-f]{40}$/u.test(commitSha))
|
|
101
112
|
throw new Error('SKILL_VERSION_COMMIT_INVALID');
|
|
102
|
-
const output = await gitBuffer(directory, ['ls-tree', '-r', '-
|
|
113
|
+
const output = await gitBuffer(directory, ['ls-tree', '-r', '-z', 'HEAD']);
|
|
103
114
|
const files = output
|
|
104
115
|
.toString('utf8')
|
|
105
116
|
.split('\0')
|
|
106
117
|
.filter(Boolean)
|
|
107
118
|
.map(parseTreeLine)
|
|
108
119
|
.filter((file) => file !== undefined);
|
|
109
|
-
if (files.length > MAX_REPOSITORY_FILES ||
|
|
110
|
-
files.reduce((sum, file) => sum + file.size, 0) > MAX_REPOSITORY_BYTES)
|
|
111
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
112
120
|
return await operation({
|
|
113
121
|
directory,
|
|
114
122
|
commitSha,
|
|
115
123
|
files,
|
|
116
124
|
identity: `${parsed.hostname.toLowerCase()}/${parsed.repositoryPath.toLowerCase()}`,
|
|
117
|
-
name: parsed.repositoryPath.split('/').at(-1)
|
|
125
|
+
name: parsed.repositoryPath.split('/').at(-1),
|
|
126
|
+
tlsVerified: parsed.https && !tlsDisabled
|
|
118
127
|
});
|
|
119
128
|
}
|
|
120
129
|
catch (error) {
|
|
@@ -127,53 +136,85 @@ export class GitSkillRepository {
|
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
}
|
|
130
|
-
function
|
|
139
|
+
function parseLocator(locator) {
|
|
140
|
+
if (locator.startsWith('https://')) {
|
|
141
|
+
const url = new URL(locator);
|
|
142
|
+
const repositoryPath = url.pathname.replace(/^\/+|\/+$/gu, '').replace(/\.git$/u, '');
|
|
143
|
+
if (url.username !== '' ||
|
|
144
|
+
url.password !== '' ||
|
|
145
|
+
url.search !== '' ||
|
|
146
|
+
url.hash !== '' ||
|
|
147
|
+
repositoryPath === '')
|
|
148
|
+
throw new Error('SKILL_SOURCE_PROVIDER_UNSUPPORTED');
|
|
149
|
+
return {
|
|
150
|
+
hostname: url.hostname,
|
|
151
|
+
port: url.port || '443',
|
|
152
|
+
repositoryPath,
|
|
153
|
+
locator: url.href,
|
|
154
|
+
https: true
|
|
155
|
+
};
|
|
156
|
+
}
|
|
131
157
|
const match = /^git@([A-Za-z0-9.-]+):([A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)+?)(?:\.git)?$/u.exec(locator);
|
|
132
158
|
if (match === null || match[1].startsWith('.') || match[1].endsWith('.'))
|
|
133
159
|
throw new Error('SKILL_SOURCE_PROVIDER_UNSUPPORTED');
|
|
134
|
-
return {
|
|
160
|
+
return {
|
|
161
|
+
hostname: match[1],
|
|
162
|
+
repositoryPath: match[2].replace(/\.git$/u, ''),
|
|
163
|
+
locator,
|
|
164
|
+
https: false,
|
|
165
|
+
port: '22'
|
|
166
|
+
};
|
|
135
167
|
}
|
|
136
168
|
function parseTreeLine(line) {
|
|
137
|
-
const match = /^\d+ (blob|commit) [0-9a-f]{40}\
|
|
169
|
+
const match = /^\d+ (blob|commit) [0-9a-f]{40}\t([\s\S]+)$/u.exec(line);
|
|
138
170
|
if (match === null)
|
|
139
171
|
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
140
172
|
if (match[1] !== 'blob')
|
|
141
173
|
return undefined;
|
|
142
|
-
const
|
|
143
|
-
const filePath = match[3];
|
|
144
|
-
if (!Number.isSafeInteger(size) || size < 0)
|
|
145
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
174
|
+
const filePath = match[2];
|
|
146
175
|
assertSafeRelativePath(filePath);
|
|
147
|
-
return { path: filePath
|
|
176
|
+
return { path: filePath };
|
|
148
177
|
}
|
|
149
|
-
async function gitText(directory, args, maxBuffer, timeout = 20_000) {
|
|
178
|
+
async function gitText(directory, args, maxBuffer = Infinity, timeout = 20_000, env = gitEnvironment()) {
|
|
150
179
|
const result = await execFileAsync('git', args, {
|
|
151
180
|
cwd: directory,
|
|
152
181
|
encoding: 'utf8',
|
|
153
|
-
env
|
|
182
|
+
env,
|
|
154
183
|
maxBuffer,
|
|
155
184
|
timeout,
|
|
156
185
|
windowsHide: true
|
|
157
186
|
});
|
|
158
187
|
return result.stdout;
|
|
159
188
|
}
|
|
160
|
-
async function gitBuffer(directory, args
|
|
189
|
+
async function gitBuffer(directory, args) {
|
|
161
190
|
const result = await execFileAsync('git', args, {
|
|
162
191
|
cwd: directory,
|
|
163
192
|
encoding: null,
|
|
164
193
|
env: gitEnvironment(),
|
|
165
|
-
maxBuffer,
|
|
194
|
+
maxBuffer: Infinity,
|
|
166
195
|
timeout: 20_000,
|
|
167
196
|
windowsHide: true
|
|
168
197
|
});
|
|
169
198
|
return result.stdout;
|
|
170
199
|
}
|
|
171
|
-
function gitEnvironment() {
|
|
172
|
-
|
|
200
|
+
function gitEnvironment(tlsDisabled) {
|
|
201
|
+
const env = {
|
|
173
202
|
...process.env,
|
|
174
203
|
GIT_TERMINAL_PROMPT: '0',
|
|
175
204
|
GIT_SSH_COMMAND
|
|
176
205
|
};
|
|
206
|
+
if (tlsDisabled !== undefined) {
|
|
207
|
+
// HTTPS must not inherit URL rewrites, proxy routing, or TLS policy overrides.
|
|
208
|
+
env['GIT_CONFIG_NOSYSTEM'] = '1';
|
|
209
|
+
env['GIT_CONFIG_GLOBAL'] = devNull;
|
|
210
|
+
if (tlsDisabled)
|
|
211
|
+
env['GIT_SSL_NO_VERIFY'] = 'true';
|
|
212
|
+
else
|
|
213
|
+
delete env['GIT_SSL_NO_VERIFY'];
|
|
214
|
+
delete env['GIT_CONFIG_COUNT'];
|
|
215
|
+
delete env['GIT_CONFIG_PARAMETERS'];
|
|
216
|
+
}
|
|
217
|
+
return env;
|
|
177
218
|
}
|
|
178
219
|
function resolveSkillPath(files, requestedPath, requestedName) {
|
|
179
220
|
const skillFiles = files
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { GitSkillRepository } from './git-skill-repository.js';
|
|
3
|
-
export declare class GithubSkillProvider {
|
|
4
|
-
private readonly fetchImpl;
|
|
5
|
-
private readonly tlsVerificationDisabled;
|
|
6
|
-
private readonly gitRepository;
|
|
7
|
-
constructor(fetchImpl?: typeof fetch, tlsVerificationDisabled?: () => Promise<boolean>, gitRepository?: GitSkillRepository);
|
|
8
|
-
resolve(input: {
|
|
9
|
-
readonly repositoryUrl: string;
|
|
10
|
-
readonly skillPath?: string;
|
|
11
|
-
readonly skillName?: string;
|
|
12
|
-
}): Promise<ResolvedSkillBundle>;
|
|
13
|
-
private resolveGitlab;
|
|
14
|
-
private json;
|
|
15
|
-
private arrayJson;
|
|
16
|
-
}
|
|
1
|
+
export { GitSkillRepository as GithubSkillProvider } from './git-skill-repository.js';
|
|
@@ -1,250 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const MAX_REPOSITORY_FILES = 5_000;
|
|
4
|
-
const MAX_REPOSITORY_BYTES = 100 * 1024 * 1024;
|
|
5
|
-
const MAX_SKILL_FILES = 1_000;
|
|
6
|
-
const MAX_SKILL_BYTES = 25 * 1024 * 1024;
|
|
7
|
-
const MAX_FILE_BYTES = 5 * 1024 * 1024;
|
|
8
|
-
export class GithubSkillProvider {
|
|
9
|
-
fetchImpl;
|
|
10
|
-
tlsVerificationDisabled;
|
|
11
|
-
gitRepository;
|
|
12
|
-
constructor(fetchImpl = fetch, tlsVerificationDisabled = async () => false, gitRepository = new GitSkillRepository()) {
|
|
13
|
-
this.fetchImpl = fetchImpl;
|
|
14
|
-
this.tlsVerificationDisabled = tlsVerificationDisabled;
|
|
15
|
-
this.gitRepository = gitRepository;
|
|
16
|
-
}
|
|
17
|
-
async resolve(input) {
|
|
18
|
-
if (input.skillPath !== undefined)
|
|
19
|
-
assertSkillPath(input.skillPath);
|
|
20
|
-
if (input.repositoryUrl.startsWith('git@'))
|
|
21
|
-
return this.gitRepository.resolve(input);
|
|
22
|
-
if (new URL(input.repositoryUrl).hostname.toLowerCase() !== 'github.com')
|
|
23
|
-
return this.resolveGitlab(input);
|
|
24
|
-
const repository = parseGithubRepository(input.repositoryUrl);
|
|
25
|
-
const headers = { accept: 'application/vnd.github+json', 'user-agent': 'MyAgentRoam' };
|
|
26
|
-
const metadata = await this.json(`https://api.github.com/repos/${repository.owner}/${repository.repo}`, headers);
|
|
27
|
-
const defaultBranch = textField(metadata, 'default_branch');
|
|
28
|
-
const commit = await this.json(`https://api.github.com/repos/${repository.owner}/${repository.repo}/commits/${encodeURIComponent(defaultBranch)}`, headers);
|
|
29
|
-
const commitSha = textField(commit, 'sha');
|
|
30
|
-
if (!/^[0-9a-f]{40}$/u.test(commitSha))
|
|
31
|
-
throw new Error('SKILL_VERSION_COMMIT_INVALID');
|
|
32
|
-
const treePayload = await this.json(`https://api.github.com/repos/${repository.owner}/${repository.repo}/git/trees/${commitSha}?recursive=1`, headers);
|
|
33
|
-
const tree = arrayField(treePayload, 'tree');
|
|
34
|
-
if (tree.length > MAX_REPOSITORY_FILES)
|
|
35
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
36
|
-
const blobs = tree
|
|
37
|
-
.map(treeBlob)
|
|
38
|
-
.filter((entry) => entry !== undefined);
|
|
39
|
-
if (blobs.reduce((total, file) => total + file.size, 0) > MAX_REPOSITORY_BYTES)
|
|
40
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
41
|
-
const skillPath = resolveSkillPath(blobs, input.skillPath, input.skillName);
|
|
42
|
-
const selected = blobs
|
|
43
|
-
.filter((entry) => skillPath === '.' || entry.path.startsWith(`${skillPath}/`))
|
|
44
|
-
.map((entry) => ({
|
|
45
|
-
...entry,
|
|
46
|
-
relativePath: skillPath === '.' ? entry.path : entry.path.slice(skillPath.length + 1)
|
|
47
|
-
}));
|
|
48
|
-
if (selected.length === 0 || selected.length > MAX_SKILL_FILES)
|
|
49
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
50
|
-
if (selected.reduce((total, file) => total + file.size, 0) > MAX_SKILL_BYTES)
|
|
51
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
52
|
-
const files = [];
|
|
53
|
-
let contentBytes = 0;
|
|
54
|
-
for (const file of selected) {
|
|
55
|
-
assertSafeRelativePath(file.relativePath);
|
|
56
|
-
if (file.size > MAX_FILE_BYTES)
|
|
57
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
58
|
-
const blob = await this.json(`https://api.github.com/repos/${repository.owner}/${repository.repo}/git/blobs/${file.sha}`, headers);
|
|
59
|
-
if (blob['encoding'] !== 'base64')
|
|
60
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
61
|
-
const encoded = textField(blob, 'content').replace(/\s/gu, '');
|
|
62
|
-
const content = Buffer.from(encoded, 'base64');
|
|
63
|
-
if (content.length !== file.size)
|
|
64
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
65
|
-
contentBytes += content.length;
|
|
66
|
-
files.push({ path: file.relativePath, contentBase64: content.toString('base64') });
|
|
67
|
-
}
|
|
68
|
-
return finalizeSkillBundle({
|
|
69
|
-
repositoryIdentity: `github.com/${repository.owner.toLowerCase()}/${repository.repo.toLowerCase()}`,
|
|
70
|
-
repositoryUrl: `https://github.com/${repository.owner}/${repository.repo}`,
|
|
71
|
-
skillPath,
|
|
72
|
-
commitSha,
|
|
73
|
-
contentBytes,
|
|
74
|
-
tlsVerified: !(await this.tlsVerificationDisabled()),
|
|
75
|
-
files
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
async resolveGitlab(input) {
|
|
79
|
-
const repository = parseGitlabRepository(input.repositoryUrl);
|
|
80
|
-
const headers = { accept: 'application/json', 'user-agent': 'MyAgentRoam' };
|
|
81
|
-
const projectKey = encodeURIComponent(repository.projectPath);
|
|
82
|
-
const metadata = await this.json(`${repository.origin}/api/v4/projects/${projectKey}`, headers);
|
|
83
|
-
const defaultBranch = textField(metadata, 'default_branch');
|
|
84
|
-
const commit = await this.json(`${repository.origin}/api/v4/projects/${projectKey}/repository/commits/${encodeURIComponent(defaultBranch)}`, headers);
|
|
85
|
-
const commitSha = textField(commit, 'id');
|
|
86
|
-
if (!/^[0-9a-f]{40}$/u.test(commitSha))
|
|
87
|
-
throw new Error('SKILL_VERSION_COMMIT_INVALID');
|
|
88
|
-
const tree = [];
|
|
89
|
-
for (let page = 1; page <= 51; page += 1) {
|
|
90
|
-
const result = await this.arrayJson(`${repository.origin}/api/v4/projects/${projectKey}/repository/tree?recursive=true&per_page=100&page=${page}&ref=${commitSha}`, headers);
|
|
91
|
-
tree.push(...result);
|
|
92
|
-
if (tree.length > MAX_REPOSITORY_FILES)
|
|
93
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
94
|
-
if (result.length < 100)
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
const blobs = tree
|
|
98
|
-
.map(gitlabTreeBlob)
|
|
99
|
-
.filter((entry) => entry !== undefined);
|
|
100
|
-
const skillPath = resolveSkillPath(blobs, input.skillPath, input.skillName);
|
|
101
|
-
const selected = blobs
|
|
102
|
-
.filter((entry) => skillPath === '.' || entry.path.startsWith(`${skillPath}/`))
|
|
103
|
-
.map((entry) => ({
|
|
104
|
-
...entry,
|
|
105
|
-
relativePath: skillPath === '.' ? entry.path : entry.path.slice(skillPath.length + 1)
|
|
106
|
-
}));
|
|
107
|
-
if (selected.length === 0 || selected.length > MAX_SKILL_FILES)
|
|
108
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
109
|
-
const files = [];
|
|
110
|
-
let contentBytes = 0;
|
|
111
|
-
for (const file of selected) {
|
|
112
|
-
assertSafeRelativePath(file.relativePath);
|
|
113
|
-
const blob = await this.json(`${repository.origin}/api/v4/projects/${projectKey}/repository/blobs/${file.sha}`, headers);
|
|
114
|
-
if (blob['encoding'] !== 'base64')
|
|
115
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
116
|
-
const declaredSize = Number(blob['size']);
|
|
117
|
-
const content = Buffer.from(textField(blob, 'content').replace(/\s/gu, ''), 'base64');
|
|
118
|
-
if (!Number.isSafeInteger(declaredSize) || declaredSize !== content.length)
|
|
119
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
120
|
-
if (content.length > MAX_FILE_BYTES)
|
|
121
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
122
|
-
contentBytes += content.length;
|
|
123
|
-
if (contentBytes > MAX_SKILL_BYTES)
|
|
124
|
-
throw new Error('SKILL_SOURCE_LIMIT_EXCEEDED');
|
|
125
|
-
files.push({ path: file.relativePath, contentBase64: content.toString('base64') });
|
|
126
|
-
}
|
|
127
|
-
return finalizeSkillBundle({
|
|
128
|
-
repositoryIdentity: `${new URL(repository.origin).hostname.toLowerCase()}/${repository.projectPath.toLowerCase()}`,
|
|
129
|
-
repositoryUrl: `${repository.origin}/${repository.projectPath}`,
|
|
130
|
-
skillPath,
|
|
131
|
-
commitSha,
|
|
132
|
-
contentBytes,
|
|
133
|
-
tlsVerified: !(await this.tlsVerificationDisabled()),
|
|
134
|
-
files
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
async json(url, headers) {
|
|
138
|
-
const response = await this.fetchImpl(url, { headers, signal: AbortSignal.timeout(20_000) });
|
|
139
|
-
if (response.status === 403 || response.status === 429)
|
|
140
|
-
throw new Error('SKILL_SOURCE_RATE_LIMITED');
|
|
141
|
-
if (!response.ok)
|
|
142
|
-
throw new Error('SKILL_SOURCE_UNAVAILABLE');
|
|
143
|
-
const payload = await response.json();
|
|
144
|
-
if (payload === null || typeof payload !== 'object' || Array.isArray(payload))
|
|
145
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
146
|
-
return payload;
|
|
147
|
-
}
|
|
148
|
-
async arrayJson(url, headers) {
|
|
149
|
-
const response = await this.fetchImpl(url, { headers, signal: AbortSignal.timeout(20_000) });
|
|
150
|
-
if (response.status === 403 || response.status === 429)
|
|
151
|
-
throw new Error('SKILL_SOURCE_RATE_LIMITED');
|
|
152
|
-
if (!response.ok)
|
|
153
|
-
throw new Error('SKILL_SOURCE_UNAVAILABLE');
|
|
154
|
-
const payload = await response.json();
|
|
155
|
-
if (!Array.isArray(payload))
|
|
156
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
157
|
-
return payload;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
function parseGitlabRepository(locator) {
|
|
161
|
-
const url = new URL(locator);
|
|
162
|
-
const parts = url.pathname.replace(/^\/+|\/+$/gu, '').split('/');
|
|
163
|
-
const marker = parts.indexOf('-');
|
|
164
|
-
const projectParts = (marker < 0 ? parts : parts.slice(0, marker)).filter(Boolean);
|
|
165
|
-
if (url.protocol !== 'https:' ||
|
|
166
|
-
url.username !== '' ||
|
|
167
|
-
url.password !== '' ||
|
|
168
|
-
projectParts.length < 2 ||
|
|
169
|
-
projectParts.some((part) => !/^[A-Za-z0-9_.-]+$/u.test(part)))
|
|
170
|
-
throw new Error('SKILL_SOURCE_PROVIDER_UNSUPPORTED');
|
|
171
|
-
projectParts[projectParts.length - 1] = projectParts.at(-1).replace(/\.git$/u, '');
|
|
172
|
-
return { origin: url.origin, projectPath: projectParts.join('/') };
|
|
173
|
-
}
|
|
174
|
-
function gitlabTreeBlob(value) {
|
|
175
|
-
if (value === null || typeof value !== 'object')
|
|
176
|
-
return undefined;
|
|
177
|
-
const row = value;
|
|
178
|
-
if (row['type'] !== 'blob' ||
|
|
179
|
-
typeof row['path'] !== 'string' ||
|
|
180
|
-
typeof row['id'] !== 'string' ||
|
|
181
|
-
!/^[0-9a-f]{40}$/u.test(row['id']))
|
|
182
|
-
return undefined;
|
|
183
|
-
return { path: row['path'], sha: row['id'], size: 0 };
|
|
184
|
-
}
|
|
185
|
-
function parseGithubRepository(locator) {
|
|
186
|
-
const url = new URL(locator);
|
|
187
|
-
const parts = url.pathname.replace(/^\/+|\/+$/gu, '').split('/');
|
|
188
|
-
if (url.protocol !== 'https:' ||
|
|
189
|
-
url.hostname.toLowerCase() !== 'github.com' ||
|
|
190
|
-
parts.length < 2 ||
|
|
191
|
-
!/^[A-Za-z0-9_.-]+$/u.test(parts[0]) ||
|
|
192
|
-
!/^[A-Za-z0-9_.-]+(?:\.git)?$/u.test(parts[1]))
|
|
193
|
-
throw new Error('SKILL_SOURCE_PROVIDER_UNSUPPORTED');
|
|
194
|
-
return { owner: parts[0], repo: parts[1].replace(/\.git$/u, '') };
|
|
195
|
-
}
|
|
196
|
-
function treeBlob(value) {
|
|
197
|
-
if (value === null || typeof value !== 'object')
|
|
198
|
-
return undefined;
|
|
199
|
-
const row = value;
|
|
200
|
-
if (row['type'] !== 'blob' || typeof row['path'] !== 'string' || typeof row['sha'] !== 'string')
|
|
201
|
-
return undefined;
|
|
202
|
-
const size = Number(row['size']);
|
|
203
|
-
if (!Number.isSafeInteger(size) || size < 0)
|
|
204
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
205
|
-
return { path: row['path'], sha: row['sha'], size };
|
|
206
|
-
}
|
|
207
|
-
function resolveSkillPath(blobs, requestedPath, requestedName) {
|
|
208
|
-
const skillFiles = blobs
|
|
209
|
-
.map((entry) => entry.path)
|
|
210
|
-
.filter((path) => path === 'SKILL.md' || path.endsWith('/SKILL.md'));
|
|
211
|
-
if (requestedPath !== undefined) {
|
|
212
|
-
assertSkillPath(requestedPath);
|
|
213
|
-
const skillFile = requestedPath === '.' ? 'SKILL.md' : `${requestedPath}/SKILL.md`;
|
|
214
|
-
if (!skillFiles.includes(skillFile))
|
|
215
|
-
throw new Error('SKILL_CONTENT_INVALID');
|
|
216
|
-
return requestedPath;
|
|
217
|
-
}
|
|
218
|
-
if (requestedName === undefined)
|
|
219
|
-
throw new Error('SKILL_CONTENT_INVALID');
|
|
220
|
-
const matches = skillFiles.filter((file) => file.split('/').at(-2) === requestedName);
|
|
221
|
-
if (matches.length === 0 && skillFiles.includes('SKILL.md'))
|
|
222
|
-
return '.';
|
|
223
|
-
if (matches.length !== 1)
|
|
224
|
-
throw new Error('SKILL_CONTENT_INVALID');
|
|
225
|
-
return matches[0].slice(0, -'/SKILL.md'.length);
|
|
226
|
-
}
|
|
227
|
-
function assertSkillPath(value) {
|
|
228
|
-
if (value !== '.')
|
|
229
|
-
assertSafeRelativePath(value);
|
|
230
|
-
}
|
|
231
|
-
function assertSafeRelativePath(value) {
|
|
232
|
-
if (value === '' ||
|
|
233
|
-
value.startsWith('/') ||
|
|
234
|
-
value.includes('\\') ||
|
|
235
|
-
value.includes('\0') ||
|
|
236
|
-
value.split('/').some((part) => part === '' || part === '.' || part === '..'))
|
|
237
|
-
throw new Error('SKILL_PATH_UNSAFE');
|
|
238
|
-
}
|
|
239
|
-
function textField(value, field) {
|
|
240
|
-
const result = value[field];
|
|
241
|
-
if (typeof result !== 'string')
|
|
242
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
243
|
-
return result;
|
|
244
|
-
}
|
|
245
|
-
function arrayField(value, field) {
|
|
246
|
-
const result = value[field];
|
|
247
|
-
if (!Array.isArray(result))
|
|
248
|
-
throw new Error('SKILL_SOURCE_RESPONSE_INVALID');
|
|
249
|
-
return result;
|
|
250
|
-
}
|
|
1
|
+
// Preserve the existing export while all transports use the shared Git snapshot reader.
|
|
2
|
+
export { GitSkillRepository as GithubSkillProvider } from './git-skill-repository.js';
|
|
@@ -40,6 +40,8 @@ export declare class MarAgentModelService {
|
|
|
40
40
|
listManagedForUser(userId: number): Promise<readonly MarAgentModelSummary[]>;
|
|
41
41
|
protected summaryRows(modelIds?: readonly string[], conversationOnly?: boolean): Promise<RowDataPacket[]>;
|
|
42
42
|
listForUser(userId: number): Promise<readonly MarAgentModelSummary[]>;
|
|
43
|
+
/** Keeps every authorized configuration; callers own any presentation-only name deduplication. */
|
|
44
|
+
protected listAuthorizedConversationModels(userId: number): Promise<readonly MarAgentModelSummary[]>;
|
|
43
45
|
listTemplateOptionsForNode(nodeId: string): Promise<readonly ConversationTemplateModelReference[]>;
|
|
44
46
|
create(userId: number, raw: unknown): Promise<MarAgentModelSummary>;
|
|
45
47
|
duplicate(userId: number, sourceId: string, raw: unknown): Promise<MarAgentModelSummary>;
|
|
@@ -121,13 +121,17 @@ export class MarAgentModelService {
|
|
|
121
121
|
return rows;
|
|
122
122
|
}
|
|
123
123
|
async listForUser(userId) {
|
|
124
|
+
return deduplicateModelsByName(await this.listAuthorizedConversationModels(userId));
|
|
125
|
+
}
|
|
126
|
+
/** Keeps every authorized configuration; callers own any presentation-only name deduplication. */
|
|
127
|
+
async listAuthorizedConversationModels(userId) {
|
|
124
128
|
const rows = await this.#candidateRows(true, true);
|
|
125
129
|
const visibleRows = this.access === undefined
|
|
126
130
|
? rows
|
|
127
131
|
: (await Promise.all(rows.map(async (row) => (await this.access.canUseModel(userId, String(row.id))) ? row : null))).filter((row) => row !== null);
|
|
128
132
|
const visible = await this.#summaries(await this.summaryRows(visibleRows.map((row) => String(row.id)), true));
|
|
129
133
|
const ordered = await this.#applyUserOrder(userId, visible);
|
|
130
|
-
return
|
|
134
|
+
return ordered.map(({ ownership: _ownership, ...model }) => model);
|
|
131
135
|
}
|
|
132
136
|
async listTemplateOptionsForNode(nodeId) {
|
|
133
137
|
if (this.access?.listTemplateOptionsForNode === undefined)
|
|
@@ -107,7 +107,7 @@ export function registerMarctlRoutes(input) {
|
|
|
107
107
|
...(binary === true ? { binary: true } : {}),
|
|
108
108
|
secretEnvironment: {
|
|
109
109
|
...(await input.secrets.resolve(user.userId, nodeId)),
|
|
110
|
-
...(await userCredentials.environment(user, publicOrigin))
|
|
110
|
+
...(await userCredentials.environment(user, (await input.marctlServerUrlForNode?.(nodeId)) ?? publicOrigin))
|
|
111
111
|
}
|
|
112
112
|
}, user);
|
|
113
113
|
const terminal = result !== null && typeof result === 'object' && 'terminal' in result
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FastifyInstance, FastifyReply } from 'fastify';
|
|
2
|
-
import type { MarctlUserCredentials } from './marctl-user-credentials.js';
|
|
2
|
+
import type { MarctlServerUrlForNode, MarctlUserCredentials } from './marctl-user-credentials.js';
|
|
3
3
|
import type { UserNodeAuthorization } from './node-access-contracts.js';
|
|
4
4
|
import type { PersonalInstructionReader, ProcessSecretResolver, MarAgentModelService, MarAgentRuntimeModelService } from './session-run-contracts.js';
|
|
5
5
|
import { type ConversationAuditObserver } from './conversation-audit.js';
|
|
6
6
|
export interface MarctlSessionDependencies {
|
|
7
|
+
readonly marctlServerUrlForNode?: MarctlServerUrlForNode;
|
|
7
8
|
readonly audits?: ConversationAuditObserver;
|
|
8
9
|
readonly personalInstructions?: PersonalInstructionReader;
|
|
9
10
|
readonly marAgentModels?: MarAgentModelService;
|
|
@@ -377,7 +377,7 @@ export function registerMarctlSessionRoutes(input) {
|
|
|
377
377
|
user: { ...user, scheduled, ...(channel === undefined ? {} : { channel }) },
|
|
378
378
|
nodeId: scope.nodeId,
|
|
379
379
|
workspaceId: scope.workspaceId,
|
|
380
|
-
serverUrl: input.publicOrigin,
|
|
380
|
+
serverUrl: (await input.marctlServerUrlForNode?.(scope.nodeId)) ?? input.publicOrigin,
|
|
381
381
|
...(input.searchBackendAvailable === undefined
|
|
382
382
|
? {}
|
|
383
383
|
: { searchBackendAvailable: input.searchBackendAvailable() }),
|
|
@@ -9,6 +9,7 @@ export interface SkillCandidate {
|
|
|
9
9
|
readonly skillPath: string | null;
|
|
10
10
|
readonly installs: number | null;
|
|
11
11
|
}
|
|
12
|
+
/** Owns bounded search caches and in-flight searches; repository reads belong to the Git reader. */
|
|
12
13
|
export declare class SkillDiscoveryService {
|
|
13
14
|
private readonly fetchImpl;
|
|
14
15
|
private readonly gitRepository;
|
|
@@ -20,5 +21,4 @@ export declare class SkillDiscoveryService {
|
|
|
20
21
|
private searchSkillsSh;
|
|
21
22
|
private loadSkillsShHot;
|
|
22
23
|
private searchRepository;
|
|
23
|
-
private searchGitlabRepository;
|
|
24
24
|
}
|